-
[[roam-traverse-graph]]
-
oh snap, re: #[[(hidden) HIYk9LKno]] -- previously i tried jsedn [1], but it immediately broke when i tried parsing my graph. but now, in the wiki of edn [2], i also noticed the "TypeScript" implementation [3]. huh!? and it is instead of 11 years old [1], 1 years old [3], and the API itself looks way better
-
[1] https://github.com/shaunxcode/jsedn
-
[2] https://github.com/edn-format/edn/wiki/Implementations
-
[3] https://github.com/jorinvo/edn-data
-
you can even use it to convert from/to JSON, & it's first-class as well!
-
{{[[TODO]]}} maybe we can work w/ #[[(hidden) HIYk9LKno]] then? it'd be so much better because:
-
{{[[TODO]]}} if the TS version works, update the wiki of edn
-
i realized this when replying to [[(hidden) LYMrimQBb]]
-
(hidden) Em9Yj1Pbf #[[(hidden) 7c2C8PgIV]]
-
(hidden) RRYnx535c
-
(hidden) wMAQaWARY
-
Me: not sure if that'd help much, and wouldn't want this to be the right solution regardless tbh. what you could technically do, is re-create your graph, i.e., traverse the json, then have a modifier to remove a block if it contains a DONE linked reference, then reset your graph to an empty state on roam, and then upload the new graph w/ json. i can do this w/ #roam-traverse-graph - i'm working on it atm, and i'll open source in the coming months. but even if you could do that now, there're 2 problems: 1. some metadata will be lost - e.g. if you shared a page, it has some metadata in the edn that doesn't get added to the json document when you export from roam, and #roam-traverse-graph works with json so no luck there until roam team would expand the json structure 2. i've been doing a lot of automated reset of the graph & re-uploading of the json. turns out, even if the graph was initially fast (because it wasn't that big), after some resetting & importing, it gets extremely slow (currently kiprasmel [1] takes >1h to load, if ever). so this is another issue that i'd depend on the roam team to fix. and ofc, i never did this w/ my actual graph - what im doing is exporting only public pages into another graph, while leaving my main one untouched. because of pt. 2, i'd really not recommend doing it, ever:D --- is there a native way in roam? i mean, you could export the graph as json, collect the blocks that have that tag similarly, get their IDs, and then from the browser console, using window.roamAlphaAPI.deleteBlock function, you could pass in the IDs, probably like so: let IDs = ["b4e5a6", "d52ca6", "445a63f"] IDs.forEach((id) => { // i don't remember the exact structure, // i think it's something like // deleteBlock({ id }) but not sure window.roamAlphaAPI.deleteBlock(id) } see https://roamresearch.com/#/app/developer-documentation/page/49715b-M2 but i myself would be quite afraid to do this on my main graph. i'd first export my graph as json, then create a new graph & import the same json there, and then experiment on it. the roamAlphaAPI also has querying, so that might be useful for finding the blocks - i haven't used it so not sure, but letting you know. --- but again, even if you can, does not mean you should:D it'd instead be more useful for everyone if you consulted w/ the roam team, because it's likely that a lot of people will start reaching such boundaries, and if the roam team is aware and can start working on them earlier, it'll be best for everyone. e.g. maybe you could get access to Experimental Roam Graphs, as mentioned in the Datomic Alpha API [2], and seeing if that helps? [1] roamresearch.com/#[[(hidden) 0eq2i9Com]] [2] https://roamresearch.com/#/app/developer-documentation/page/RPQgIfLzH
-
-
-
-
-
[[(hidden) gneWzf7F3]]
-
oh idea - just use `joinWith("\n")([ "line1", "line2", ])` to make it way clearer!
-
also, now it looks like a taggedTemplateLiteral call, i.e. we could do
-
-
{{[[TODO]]}} also `joinAllWith` or `joinWith("\n", true)` (meh) to also include joining the 1st element (often needed for e.g. newline from the very start)
-
{{[[TODO]]}} allow passing in not only `string`s, but anything that has a `.toString()`
-
{{[[TODO]]}} in general, keeping track of how much left padding we have?
-
-
(hidden) 6XEYry6oh
-
[[git-stacked-rebase]]
-
{{[[TODO]]}} create issue @ #typescript - allow type guards, without generalizing a readonly value, thus turning it from a specific one into a union (current behavior, want to both guard __and__ have the exact type).
-
reading the [[(hidden) U5k5oJ6YK]] implementation of [[git-rebase]] atm.
-
...because trying to create git-rebase-todo from git-stacked-rebase's git-rebase-todo, but there's more than that file to make it work -- there's also `head-name`, `onto` (both figured out already), `head` (missing, idk what it should be set to - that's why i'm here) (needed when `git rebase --abort`).
-
{{[[TODO]]}} we might as well write our variables in snake_case, will be clearer thb
-
#observation sequencer.c is huge, used in 12 commands (rather, can be used to __sequence__ any command of the available 12).
-
re: ((5SYschHTB))
-
{{[[TODO]]}} gotta handle comments
-
okay, looks like the filename is incorrect - it prints `"warning: could not read '.git/rebase-merge/head': No such file or directory"`, but it looks like the actual file (when you do a proper git rebase) that gets modified is `.git/HEAD` - normally it's set to `ref: refs/heads/extraction-6-create-4th-transform-rename-style-tokens`, and in rebase, it gets set to some SHA (looks like the very first commit of the rebase, ofc).
-
did that. now we checkout into the first commit, and all files are added, what the heck?:D
-
maybe let's write into that `.git/rebase-merge/head` file even tho we can't see it?
-
[[(hidden) DY6wPnICE]]! `git rebase --abort` worked now! though, i got checked out into the initial branch's commit :D
-
i previously set `head-name` to the latest branch's commit sha, instead of the initial branch's one
-
`interactive` file missing from me
-
also `no-reschedule-failed-exec`
-
also `orig-head` (`head-name` should be the ref (`refs/heads/branch-name`), and `orig-head` - the commit of the latest branch (before rebase))
-
SHEEESH! `rebase --edit-todo` shows up & works!!!
-
`commit --amend` also shows up, but editing it edits something wrong & my statusbar shows both rebase & ahead/behind commit counts, so something definitely wrong lmao
-
do i need the `index` file as well? git-rebase-todo.backup?
-
git-rebase-todo.backup doesn't seem to help
-
index nope, identical gets generated
-
.todo -> .backup
-
head-name: head commit sha -> latest branch name
-
ok so in regular case, status bar shows 1/21 commits, ours doesn't. `index`?
-
`done`, `msgnum`, `end`
-
-
-
-
-
-
okay, it's gonna be tricky. at first we can try monkey-patching, tho the end user will have to be very careful - everywhere, but especially at branch boundaries lmao
-
{{[[TODO]]}} as i though, we might need to use the `git rebase -i` initially to get all the stuff in the right places
-
{{[[TODO]]}} fuck, why is the rebase stuff so meh? will i have to handle every single operation myself?... why is there no `rebase.continue()`?...
-
rebase.c
-
git_commit_free
-
yeah the libgit2 stuff is outdated sadly, at least for rebase... the `cmt.%` stuff - git itself does not have it...
-
git hooks?
-
https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
-
i remember when i was ((GpT9-n253)) recently -- there were some mentions of hooks. will see
-
ah yes, in the sequencer: ((5SYschHTB))
-
`post-rewrite`
-
yep. works.
-
eh, it gets called multiple times. i might as well stick to my "insert additional `break` at the very end & handle it myself there
-
-
`prepare-commit-msg`
-
`post-commit`
-
-
-
-
-
-
-
-
-
(hidden) rYKCFT1Eg
-
(hidden) d2uneIEPS
-
(hidden) JxnfOkjVn
-
(hidden) 09xXLednk
-
(hidden) 9w9kQ-Vgu
-
(hidden) 46mFyd3Vy