madmansnest
24 subscribers
92 photos
4 videos
1 file
57 links
Languages, Visuals, and Dangerous Things
Download Telegram
It’s Baader–Meinhof all right, but what are the odds of me contemplating whether i’ll have to rewrite my Haskell pet project in Rust for performance at some point, later randomly reading about some Haskell optimisation stuff and then encountering the article ‘We’ve implemented Aho-Corasick search in Haskell that is faster than Rust’ and said search being exactly what i am currently using ripgrep in the prototype for?
It does feel much easier to write from under my PKM system directory. Even without complex things like block linking etc. Just feels good that you have all other texts on the topic within quick reach. While i was not planning to have one big directory for all my texts, and i even used to have separate knowledge bases in Logseq and vimwiki and elsewhere, now i am contemplating actually pulling all of the texts i have ever written together so that they can be cross-linked.
Qwen AI might translate Hong Kong as 香港, not 中国香港. What a revolt!
I must admit i’m still struggling in terms of productivity with my newly acquired Corne split ortholinear keyboard.

My qwerty typing speed dropped significantly, and only today it is suddenly back to 60 wpm.

My йцукен typing speed went down so abysmally and it was unpleasant enough on a staggered keyboard already that i went against my common sense and my deeply ingrained prejudice against alternative layouts and set out to learn Диктор layout that is essentially the Russian Dvorak.

I could only achieve 26 wpm after two weeks but the feeling is much nicer so i’ll see whether i can actually stick with it and make up with my former speed.

The biggest problem to overcome is of course the splitness of the keyboard which exposed my dirty secret of a habit to type mid-keyboard keys with the wrong hand.

Another thing i suddenly realised is that some common 汉字 are typed with one hand, for example 市 is typed with one finger.

Maybe i actually should dedicate some time for 五笔 practice on this keyboard as well.
All rightey, i’ve implemented the working document parser-indexer in Haskell. It runs 32 times faster than the shell+ripgrep prototype.
Looks like i’ve found the right book for me
i think the moment when i (perplexed by the initial cognitive load of trying to write something in Haskell without knowing Haskell) to drop the distinction between linked and unlinked references (and treat all as if they were unlinked) not only was the greatest aha moment in the process of development but also the ultimate decision that defines my PKM system.

Without needing to bother about linking i no longer even think that i am making a note in my knowledge management system, and i no longer think that i need to have links, it does not feel like Wikipedia editing experience any more, i’m simply making a note while reading a book.

And when i save it, as i do often to prevent potential accidental data loss, completely in the background, with not more distraction than “loaded references” message being printed essentially telling me that the system works and i don’t have to go fix bugs, it tracks any mentions i naturally come up with while writing the note.

Again, i don’t have to have a mindset “here i have to write this because i need to link to that other article i have written before”. Nothing distracts me from actual reading (other than the realisation of the said lack of distraction that is so surprising it now compels me to write to my social media about it, ironically). And every time i need to see the list of related articles, i press <leader>l and there they are, with the option of opening any i find useful.

i don’t even have to open them. If i mention something that is a topic like Haskell, i can simply leave the insert mode, put my cursor on the word “Haskell”, press <leader>e and the article on Haskell will open.

i never had this kind of nonintrusive experience with Logsec, or with anything else, before. Maybe with notes on paper. But those don’t link by topic all by themselves.
First it lures you with its inventive point free notation and lulls you into a false sense of security with the syntax that looks so clear and readable, so you can‘t even pinpoint the exact moment when your descent into madness begins…
🥰1
Another brainstorm during subwaking state made me realise i don’t need no uuids, no additional database tables, no logic complexity increase to implement embedded blocks.

I‘ll simply use Obsidian style block links in curly braces.

It’s so simplex that my minimalistic inner child is dancing!
Dream comes true! Embedded blocks are now supported!
👍1
This book is what originally got me hooked on ed, the standard Unix text editor.
It had been written as an April Fool’s joke.
But what i saw in it was a great tool for mindful and distraction free writing.
I already knew how vim’s ex commands were more convenient sometimes than vim commands.

But this takes it to a whole new level. You don’t have the whole wall of text staring at you all the time, you only print out the lines you need to focus on.
And when writing, after you have added a line, it is committed, and to edit you have to use regexes. This adds some weight and consideration to every line.

You also have marks set throughout the meaningful places in your document as you work with it.
And when you need to find something, you use search.
(The latter two are also staple commands in vim.)

This makes you think about the whole document in a structural way.
1
Because of that, i always wanted to use ed more in my daily practice. One great improvement that meant a lot was command filtering that is supported in modern GNU ed. It meant i can use all my other commands to manipulate text.

However, some essential things were still limited. I could not easily work on a project containing many files, as you have to open separate tmux panes for each file, and to transfer text you have to save the first file, switch to the second, remembering line numbers from the first, and use r !head second | tail to read those lines.
And i could not simplify my workflow by saving and replaying command sequences, like i can with macros in vim.

I always wanted to implement my own text editor, but reimplementing vim was too complex for me. However when i got into Rust programming, i started implementing an ed clone. Then i switched to Haskell because i got addicted to its minimal syntax while having all (if not more) power of a strong type system (and no worries about the borrow checker, but in practice you worry just as much about type compatibility as you spend on borrow checker in Rust, although you get better at it gradually).

That is how i wrote led, the line editor (still unreleased).

And now that has almost everything i need, i realise i really prefer using it more often.
I guess in the future, after i add syntax highlighting and some kind of completion, i could completely switch to it even for coding.
1❤‍🔥1
This is not some complex benchmark but it shows that led is actually faster than BSD ed!

I wonder if GHC optimises some operations to use threads by default…
❤‍🔥1
This is now official. Haskell is faster than C!
🔥1
When you are frightened by something, you have to relate with fear, explore why you are frightened, and develop some sense of conviction. You can actually look at fear. Then fear ceases to be the dominant situation that is going to defeat you. Fear can be conquered. You can be free from fear if you realize that fear is not the ogre. You can step on fear, and therefore, you can attain what is known as fearlessness. But that requires that, when you see fear, you smile.
—— Chogyam Trungpa