sam's capsule - Tiny Log

Bad programming, bad jokes, bad idea.

author: samhunter

avatar: ๐Ÿ’ก

license: DWTFYW

Mon 06 Feb 2023 06:57:02 PM CET

me: excelling at "slow internet" with over two months between tinylogs :D

Mon 28 Nov 2022 04:05:17 PM CET

Testing the chess thingie..

Waiting to get my arse served to me on a tablet...

Still not a chess player...

  +---+---+---+---+---+---+---+---+
 8| r | . | b | . | k | b | n | r |
  +---+---+---+---+---+---+---+---+
 7| . | p | . | . | . | p | . | p |
  +---+---+---+---+---+---+---+---+
 6| . | . | p | p | . | p | . | . |
  +---+---+---+---+---+---+---+---+
 5| p | . | . | P | . | . | . | . |
  +---+---+---+---+---+---+---+---+
 4| . | . | P | . | P | . | . | . |
  +---+---+---+---+---+---+---+---+
 3| . | . | . | B | . | . | . | . |
  +---+---+---+---+---+---+---+---+
 2| P | P | . | . | . | P | P | P |
  +---+---+---+---+---+---+---+---+
 1| R | N | B | . | K | . | . | R |
  +---+---+---+---+---+---+---+---+
    a   b   c   d   e   f   g   h  
Last move by samhunter: a7-a5      
Your move [? for help]:            

Sun 27 Nov 2022 06:54:59 PM CET

Wrote a small chess-over-gab client in bash, as a break from my (now daily) "toiling" at my editor's development.

Clean ASCII version

Unicode chess pieces

And no, I don't play chess...

Thu 24 Nov 2022 06:58:40 PM CET

Re: @monolalia Thu 24 Nov 2022 16:23 UTC

What about linking your notes to the projects and not moving/copying into them?

I usually write "stuff" down, then tag it. It's either in my lab or in my notes.

Sun 20 Nov 2022 10:52:43 PM CET

People from Bell Labs often tell the story of the 'pipe orgy' happening after Ken Thompson finally gave in and implemented pipes, as imagined by McIlroy.

I guess spending a day extending my toy project with external macros day after I added support for them, comes pretty close.

Except it's not the Pantheon of Unix gods playing with awesome shit...

Sun 20 Nov 2022 02:10:05 PM CET

Adding custom keybindings to my editor took exactly *ba-dummm-tsss* 3 lines...

Sun 20 Nov 2022 01:44:21 AM CET

Added named buffers to my editor, so now I have a choice between pushing and popping the yanked lines from stack or using the session-persistent named buffers.

Sat 19 Nov 2022 10:06:00 PM CET

My day job is awesome, but there are days I seriously doubt my life choices...

"Learn, son, or you'll have to work at weird times..."

Sat 19 Nov 2022 09:55:01 AM CET

The subtle line diving the state "why tf can't I figure out why it isn't working" and "Oh, that's a minor bug, I'll fix it tomorrow" -- priceless.

Last night I could execute a statement defined outside of the main program, in it's profile file - it feel like I am slowly getting somewhere with the little project.

It made me think though - to make custom keyboard shortcuts possible I'll probably have to:

- move some code I wrote directly in the "keyboard handler" into small utility expressions;

- rewrite or extend the keyboard handler to use an assoc with keybindings;

- add more helpers to make programming of the extensions easier;

- ... and -- gods help me -- document it.

Fri 18 Nov 2022 11:01:44 PM CET

It looks as if my little project didn't move a bit, but after today's session I have:

- a reliably working scrolling

- faster display

- a quite solid list browser in Slope I can re-use (soon, hopefully) when writing a client for my chat.

Fri 18 Nov 2022 02:05:57 PM CET

Yay! The !@#$ing scrollin works now. I created also a keyhole into the interpreter (like "ex-mode" in vi, except it gives access to the interpreter beneath the editor.

40 years ago some sad fuck thought making Lisp accessible from his editor is a brilliant idea... Everybody knows what happened later :D

Thu 17 Nov 2022 10:02:36 PM CET

+31 lines added, 30 lines removed later scrolling works, finally (wonky, but stable).

Things like that make me thing: is it the reason Bill Joy stopped using `vi`, while Ken Thompson is still a fan of `ed`?

Because honestly, if you only programmed with ncurses -- you don't know shit :D

Thu 17 Nov 2022 01:30:30 PM CET

(Storing for later) Two African recipes from yesterday's feed:

Jollof Rice

Chicken Yassa

Both can be done without meat.

Thu 17 Nov 2022 12:41:04 PM CET

Never underestimate readline-type libraries. One day you're mucking around with one editable line, the next day you're falling down the rabbit hole, thinking about the right way to add syntax highlighting to your text editor...

Wed 16 Nov 2022 11:33:24 PM CET

A normal person: How many IDs between 'aa' and 'zz'? ๐Ÿค”.... 26 * 26 = 676

Me, the shell junkie ๐Ÿง:

$ echo {a..z}{a..z} | wc -w 
676

Wed 16 Nov 2022 05:47:30 PM CET

"I'm too lazy, I'll rather write a program than do it by hand"

Exhibit A:

(list->string (map bytes->string (range 26 65)))
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"

Wed 16 Nov 2022 01:47:39 PM CET

Setting my EDITOR environment variable to `xi` was probably the most brain-dead idea I had this week (let us hope it was).

As a consequence of the _obviously self-inflicted_ drama I am stumbling all the time ("if you wanted vi - why didn't you code it that way?"), but it certainly helps me lint the issues.

Like: I didn't notice how much I rely on range operations (hard to do anything "range" in a line-oriented editor without the concept of "global") or ability to read-in a block of text from an external file.

I didn't set a roadmap for the little project, but I think - if I keep using it, of course - the project will show me where I should go next.

Wed 16 Nov 2022 11:43:50 AM CET

Sometimes I think `nano` is not a text editor but a symptom of a rather specific, closed, and quite disagreeable mindset.

(not all nano users are incompetent wankers, but it certainly helps...)

Wed 16 Nov 2022 01:14:32 AM CET

Thinking about some low-cost (computationally speaking) HTML to annotated text conversion...

Somehow old school - cut the irrelevant parts off, strip html tags to their meanings (<h3 style="big"> becomes .h3, for example), break the remaining text on spaces, decide what to do with the markup, concatenate the words back into lines intertwined with markup, fold.

It could reduce all the fuss to something malleable and easily manageable through pipes. Gopher, Gemini, Spartan and shlogs, as text-based media, are much easier to handle, so I am already "there" - building my own "retrievers" and piping them through various filters.

HTML? Not so much yet, output from text-based browsers is okayish, but still incomplete (I'd like some formatting and functioning links, but the blanket here is definitely too short...)

Wed 16 Nov 2022 01:11:59 AM CET

Vertical systems' redundancy sucks.

It's maybe nice to test something in a lower tier before bringing it into production, but making a trivial update of one system in the production tier a "measurable risk", because its (theoretical) redundancy does other jobs is kind of meh.

Mon 14 Nov 2022 11:02:50 PM CET

Getting the scrolling and vertical cursor movement right is such a pain in...

Fri 11 Nov 2022 11:38:20 PM CET

Upgrade to tinylog.slo - "readline" support (thanks to Sloum's "line-edit" module).

No more retyping of lines (and I typo a lot...)

Thu 10 Nov 2022 11:07:00 PM CET

Kind of reduced tic-tac-toe to one regex: \(\([XO]\).\{0,3}\)\1\2

Mon 07 Nov 2022 10:16:23 PM CET

My little chat project reached 130 (server) + 70 (client) lines of Slope code.

It's going to be less, at least on the server side, after I move some of the "/utilities" into the separate bot/utility program...

I'll have to write some summary of development goals, as people who tested it kind of assume I'm going to replace the IRC.

I am not (what a surprise) - I simply want a chatroom I can spin up when working on some project, to move from the kind of working, but cumbersome email+gab communication to something more realtime...

Sun 06 Nov 2022 09:32:36 PM CET

Does a "slow internet" site like RTC need a realtime chat? I don't know, but now we have one...

It's amazing how easy(-ish, juggling with ANSI seqs almost killed me :D...) it was to write in Slope.

Sat 05 Nov 2022 09:48:56 PM CET

"Slope has net-listen now" -- well, and I have a chat server in ~100[1] lines of Slope code now...

[1] under 60 without '/' functions (they are not crucial for the functioning of the server)

Sat 05 Nov 2022 03:44:35 PM CET

Yay, Slope has net-listen now :)

Sat 05 Nov 2022 11:13:19 AM CET

The editor I "discovered" a few days ago - `sim` performs - against my expectations, quite well.

Especially when I have to make some small, localised changes in one or three files while I'm connected over ConnectBot from my phone.

The "all editing happens in the middle line" is really comfortable in a terminal constantly changing its geometry depending on the visibility of the soft-keyboard.

Unless I hack the code it's rather improbable it will replace `vim` or virtually any other editor I frequently use, but... But I am keeping it, I guess - for all the emergency INI file edits while I'm commuting.

Sat 05 Nov 2022 11:06:32 AM CET

Yesterday I've noticed that `recent++` reactions became a little sluggish ("a little" being going from ~400ms to +3 seconds).

NGL, it made me think about the future of the tool. What if the pubnix I am on grows? There's no caching, and traversals over more and more files *will* take more time.

Well, then the reboot came, and now we're back at <400ms. But I'll keep thinking about possible optimisations. So far I run it on 3 systems outside of my "$HOME's home pubnix" -- some with well over 500 users logged in all the time and generating content, and the "lag" is still acceptable. We will see.

Fri 04 Nov 2022 22:48 CET

My interaction with Gemini is 95-98% limited to two little scripts I wrote a while ago in a Scheme dialect. One is basically `cat gemini://url`, the other I use rn for "patching" my fresh tinylog entries between the header and my older ramblings.

I tried a few browsers (Linux, Windows, Android apps) and honestly - I don't care. None of them came even close to my ideas of aesthetic or ergonomy. And you know what? I cannot write a functional browser for 2020's web, but I pretty much can do this for Gemini. To get the content I want, where I want, and in exactly the form I want.

Lol, I didn't remember, but my tinylog reader is just this:

tl ()  { 
  gemini.slo gemini://tinylogs.gmi.bacardi55.io/ \
    | sed -e 's!_\([^_]\+\)_!\x1b[4m\1\x1b[0m!g
      s!\(\(gemini\|https*\)://[-~a-zA-Z0-9\.\/]\+\)!\x1b[32;4m\1\x1b[0m!
      s/^##[^#].*$/\x1b[33m&\x1b[0m/g' 
}

Thu 03 Nov 2022 11:21:01 PM CET

Discovered a whole bunch of modal editors: neatvi, nextvi (apparently improvement on neatvi), and sim.

While the first two are simply rather lean clones of the original vi with some interesting additions like bi-directional entry (the author of `neatvi` is Persian, I guess) `sim` is where the gonzo zone begins...

I can't see (yet) the alleged Plan9 `sam` inspiration, but the idea of editing your text with the cursor line staying firmly in the middle of the screen, with the text moving up and down instead is quite nice. A little like writing on a typewriter. Or in `wordgrinder`.

For some reasons the default keybindings (defined suckless-style, in config.h) didn't include "^". A strange omission for a) an editor inspired by `vi`, that b) has StartLine function implemented already. One edit later it worked.

Wed 02 Nov 2022 10:30:42 AM CET

โ€œWhy do people only understand what they want to...

...instead of what they could or should understand?โ€

โ€• Beatrice James

The problem aren't people who use `nano` or any other "small" editor, but the people who aren't using enough of it.

[rant]Doesn't make any difference when you're changing 1 to 0 in a short INI file, but wastes your and your co-workers' time when you're applying the same approach when making critical changes to multiple unformatted XML files all over your filesystem..[/rant]

Tue 01 Nov 2022 10:33:26 PM CET

Watching "Oral History of Guido van Rossum" on YT and reading about the "ABC" language.

Lots of recycling when it comes to syntax, ngl.

But GvD doesn't make a secret out of it.

Tue 01 Nov 2022 10:30:11 PM CET

Reading the original Bill Joy's "screen editing with vi" manual.

One thing learnt - <Esc> and <Enter> are equivalent after "ex/:" commands (only the original vi honours it, though)

One thing re-learnt (`` and '' can be used to jump back after a cursor moving operation - I used it a lot... and then I stopped - I blame vim's `v`)

Tue 01 Nov 2022 08:53:01 PM CET

Considering rewriting the "displaying" parts as wrappers for `.g`lobal.

Mon 31 Oct 2022 11:38:44 PM CET

Added `.s`ubstitute and it was quite fun. The bemacs' command language is quite verbose already:

what would be simply a `,s/Foo/Bar/g` in other editors becomes `.s Foo Bar g` in bemacs, but `1,10s/Foo/Bar/g` is `.s Foo Bar g 1 10`...

Well, that's actually not much longer -- maybe the order of parameters is what throws me off.

Anyway, at some point I might write a simple wrapper around the functions - pretty much nullifying the "editing without leaving the shell" effect.

Sat 29 Oct 2022 10:18:49 PM CEST

Extended `.a`ppend and `.i`nsert commands in bemacs.sh to mimic their `ed` equivalents.

Sat 29 Oct 2022 02:25:18 PM CEST

Is writing a text editor in Bash a sign of spiralling down into madness?

By 'an editor in Bash' I don't mean a program written in bash and stored in an .sh file with a proper shebang line.

It's literally a set of macros modifying a file in a buffer straight from the shell prompt's level.

I added search `.q`(uery) today, and the nice side effect was Bash match operator actually understanding regexes.

And a pipe-out/shell-out function `.!` -- at this stage I am actually able to write and run programs without actually storing them anywhere on the filesystem.

Can it be usable? Idk. On a read-only $HOME, perhaps. The more functionality I put into it, the more closely it resembles Smalltalk VMs (of the past? Does anyone still use ST?)

Sun 16 Oct 2022 06:41:36 PM CEST

Chicken and egg problem: I want to install a newer version of an interpreter I use on my local system, but compiling a new binary requires some preprocessing done in the language itself.

The version installed on the remote system is too old and the translation breaks. I cannot upload a newer version, because I am on Linux and the remote system is OpenBSD...

Well... Ended up mounting the remote install dir via sshfs, starting the compilation on Linux, switching to BSD, removing object and binary files and restarting. Compiler happily used the intermediate files generated on my local system, voila - a fresh version...

I fucking love "Lunix"

Sun 16 Oct 2022 02:50:09 PM CEST

The meek will inherit the Earth, but the lazy will rule the IT.

Thu 13 Oct 2022 07:54:04 PM CEST

My work-related pet peeves: people using characters outside of the ASCII subset on old systems.

It's 2022 and you may take UTF-8 for granted, buttercup, but we're working with dozens of early 2000's machines here...

Thu 13 Oct 2022 07:50:54 PM CEST

I think being nostalgic in IT comes easier when you weren't actually working with the old crap.

Mon 10 Oct 2022 09:46:49 PM CEST

Well formatted and reasonably well documented `ed(1)` subset written in Snobol4?

Why not? So far it took 82 lines of code (including command description and a shebang)...

Sun 09 Oct 2022 02:20:49 PM CEST

Writing a small script for every little, mundane thing I might want to do again some time.

Sun 09 Oct 2022 01:41:35 PM CEST

Side note: really getting into line-oriented editors rn. It's not that they're new, to me, or in general, but the nearly distraction-free workflow when writing stuff in `ed`, `sam`, `ex`, `qed` or even `edlin` is a real therapy after workweek spent on shuffling information in dozens of windows and panes.

Sun 09 Oct 2022 01:39:40 PM CEST

My work-related pet peeves: people who refuse to follow ANY, no matter how basic, but *consistent* formatting when preparing documentation. Also - the ones who say: "I am a system administrator, not an artist" (the fuck, that's why you should keep documentation consistent and easily readable).

Sun 09 Oct 2022 01:38:22 PM CEST

My work-related pet peeves: people who use lists created weeks ago to handle dynamically changing processes.

Sun 09 Oct 2022 01:37:09 PM CEST

My work-related pet peeves: people who don't use editor's own copy/paste function but rely completely on mouse selection. People who insist on using context menu to do copy/paste.

Sun 09 Oct 2022 01:36:31 PM CEST

My work-related pet peeves: people who scroll through shell history instead of using the reverse search function.

Sun 09 Oct 2022 01:35:41 PM CEST

My work-related pet peeves: people using nano or notepad for serious text editing.

Tue 05 Jul 2022 02:43:03 PM CEST

It seems when it comes to software and operating systems there's a wide gap between what I'd consider a "household item" and a "tool".

My customisations are restricted to "household item" programs ($HOME, get it? :irritating_chuckle:) -- I modify my local/at-home configuration, my .vimrc has chapters and my .bashrc uses a big-ass library of small scripts. I compile my editors from source, I write utility scripts in all shades of exotic scripting languages.

Then, there are tools. Things I use everywhere, things that I expect to work (more or less) the same way everywhere. So, unless there's `exa` installed by default on the oldest Solaris I have to manage -- tough luck. Besides, the "added functionality" is as useful as sequins on jeans...

Wed 29 Jun 2022 10:49:44 PM CEST

Re: @monolalia Tue 28 Jun 2022 21:18 UTC โ–’

What about "Nothi me non tere"?

(My sole contact with Latin are mariachi bands :D)

Mon 27 Jun 2022 09:05:02 PM CEST

If life gives you lemons -- that's a nicer alternative to scurvy...

Sat 11 Jun 2022 04:38:35 PM CEST

I read Brian Kernighan's UNIX memoir a while ago. I guess that's how a successful life looks like -- you're so busy writing about awesome people you worked with that in the end your "memoir" is barely about yourself.

I am especially glad BWK wrote a lot about AWK and Doug McIlroy -- I am pretty sure UNIX wouldn't be such a great system without those two. A small language that could, and a largely unsung genius who invented the Unix pipeline.

Wed 08 Jun 2022 10:25:56 PM CEST

@deerbard: check your _local_ vim: `vim --version |grep xterm_clip`... if it says something like '+xterm_clipboard' the "+y will work... If not (or if you're on a remote system) -- you'll have to use your mouse (or the copy/paste functionality of your screen/tmux/dvtm)

Wed 08 Jun 2022 07:17:23 PM CEST

`vim` on the console can only use its own clipboard (copy-paste buffer. Actually something like 28 of them. Named.)

If you are using it in an xterm (or whatever people use these days) window, and you want to use your mouse to copy stuff from/into Vim: press and hold Shift while selecting. Then paste it elsewhere, as usual.

You might use the '+' buffer in Gvim (that's mapped to system clipboard IIRC) --> "+y

Mon 18 Apr 2022 01:47:46 PM CEST

Reading an old manual file for a Lisp Machine (dated June 8th, 1984) . Just stumbled upon `with-open-file` working exactly the way the the similar statement works in Python.

We're not making much progress, m'key?

Fri 15 Apr 2022 11:01:38 PM CEST

How to water your plant "without" a Gemini client:

echo "gemini://astrobotany.mozz.us:1965/app/plant/water" | openssl s_client --connect "astrobotany.mozz.us:1965" -cert $CERTDIR/cert.pem -key $CERTDIR/key.pem -crlf -quiet -ign_eof

Thu 07 Apr 2022 11:29:38 AM CEST

`slope` can be compiled now -- ~sloum wrote a nice compiler/linker - it resembles slightly the way the old DOS BASIC compiler worked - by embedding the source and the interpreter in a single executable file.

It might not be the most storage-efficient way, but giving someone a file/link to the file is much easiert than asking them to install all dependencies.

Sat 02 Apr 2022 10:27:36 AM CEST

I'm kind of having a Hannibal Smith moment right now: "I love it when a plan comes together"

Except - it never was a "plan". It started with a shocking (not anymore) discovery, that the system I'm on doesn't have the `bc` calculator.

After looking around and finding some, not so suitable, tools a normal person would just find the source package, compile bc and move on.

Well, not me, obviously - I decided to write an RPN calculator in bash... Then the way assemblylanguage routines should handle the stack made me rework the stack of my calc.

Then I wanted to see it... Then it wasn't a calculator anymore -- it turned into a set of command-line macros that allowed me basically write and run ASM programs in Bash ("in", as in mixing bash and assembly commands and sharing the screen and variables.

And now I am just translating the lines into Javascript to make it less 1970's-chic.

A MASM-like assembly interpreter (WiP)

A MASM-like assembly interpreter (WiP)

Tue 29 Mar 2022 08:48:54 PM CEST

I finally wrote the long (decades) overdue Brainfuck interpreter.

The prototype in Python was rewritten in JavaScript and now it resides

here

.. or here.

Mon 31 Jan 2022 09:55:32 PM CET

Unassuming elegance of a well-written Ansible playbook.

Thu 20 Jan 2022 09:20:24 AM CET

I seriously hate the hoops one has to jump through to create a working EFI boot CD image...

Tue 04 Jan 2022 10:06:18 AM CET

Re: @guigui3000@pollux.casa Mon 03 Jan 2022 20:40 CET

1. You can have more than one SSH key. Just give it a different name than id_rsa*

2. As they are all by default located in your ~/.ssh directory you can simply backup them as any other file on the system.

3. Restoring them is easy too -- just copy them back into ~/.ssh.

4. Guestbook for the capsule would require a CGI script, but it's doable.

Thu 30 Dec 2021 09:59:23 PM CET

Honestly, there's a separate circle in hell for people who defined keyboard shortcuts in `nano`

https://nano-editor.org/cheatsheet.html

Mon 29 Nov 2021 10:45:56 AM CET

Regaining momentum after a longish break from online activities (the meaningful ones at least) is hard.

At the moment I'm just trying to water my plant on astrobotany (ngl it would wilt without @deerbard's help, thanks, buddy!) and keep the software I wrote and made public running and patched.

Writing anything new? No, not yet.

Thu 09 Sep 2021 03:16:21 PM CEST

Re: @hexdsl Wed 08 Sep 2021 21:47 BST

You can consider me the last person who wouldn't like to try something new, but `fish` is an eleven-foot pole case for me (that's a pole I keep for touching things I wouldn't touch with a ten-foot pole).

I tried to use it, years ago, and I am still slightly appaled.

Tue 07 Sep 2021 12:44:11 PM CEST

Re: @deerbard Sep 7 12:12:02 PM CEST 2021

I could download it. Quite cool, the creature...

Sun 29 Aug 2021 03:56:41 PM CEST

Re: @deerbard Sun 29 Aug 2021 13:35 CEST

I should stop trying to use backquoted preformatted text in my tinylog, I already found a workaround for GTL, but apparently the issue hits harder in "lace"...

Sun 29 Aug 2021 03:53:51 PM CEST

Can you imagine the existential fear of a person who knows everything? (just a thought, luckily I am as ignorant as it gets, with lots still to learn).

Sun 29 Aug 2021 01:11:52 PM CEST

Re: @deerbard Sun Aug 29 01:07:10 PM CEST 2021

 ~/.config/amfora/config.toml
 [auth.certs]
 # Client certificates
 # Set domain name equal to path to client cert
 # "example.com" = 'mycert.crt'
 'astrobotany.mozz.us' = '/home/samhunter/.config/certs/cert.pem'

Fri 27 Aug 2021 08:56:13 AM CEST

Re: @deerbard Wed 25 Aug 2021 17:49 CEST

No, it's *years* since I played chess last time. I kind of lost interest, I guess having to "think ahead" at work all the time doesn't help. And -- I should actually begin with that -- I never was a good player.

Tue 24 Aug 2021 09:51:28 PM CEST

Re: @hexdsl Tue 24 Aug 2021 19:17 BST

teeline -- as in 'shorthand system'?

Tue 24 Aug 2021 12:42:25 PM CEST

Context: Not so important, are you?

 #
 ##         you are
 ####        here
 ####         |
 #####        v                  ,
 #####--.--o--o---ยฐ------(()---(/)---O-----O-----------------------------------
 #####                         '

Tue 24 Aug 2021 10:21:30 AM CEST

I guess it's time to stop calling chess a 'strategy game'. It's tactics. You win a battle in chess, not a war. And I guess all the generals that declared any war in the last century a win -- played chess. If chess was a war game the playing should continue after the 'king is defeated' (checkmate). The whites won? Great. Now the whites help blacks rebuild their society. How is the chessboard divided now? Is is still 32 fields for each side? Can a kingless bunch of rooks, lead by a bishop, still try to assasinate the white king?๐Ÿค”

I can see some variations of the game:

- "German chess" - the losing side divides their side of the board in two, has a small checkers minigame;

- "Polish chess" - after the opening a third side appears on the board and works together with blacks or whites. The losing side never accepts the 'checkmate', at once a king reappears in the different part of the chessboard...;

- "Russian chess" - for every rook killed two new appear, no piece is allowed to retreat;

- "Japanese chess" - there's no particular strategy, all pieces move at once, sacrificing a rook isn't actually optional;

- ... and so on, and so on...

Mon 23 Aug 2021 03:22:46 PM CEST

Bigger scheme

                 
           /       \       /
    k --- a         b --- f 
   /       \       /       \
           me --- l         i
   \       /       \       /
    j --- c         d --- e
           \       /
            g --- h

Mon 23 Aug 2021 01:29:56 PM CEST

Learning to keep tabs on my projects in 'swim' (think "Trello on the commandline"):

'Swim' repository at tildegit

Sun 22 Aug 2021 07:16:41 PM CEST

My astrobotany plant

Sat 21 Aug 2021 04:41:48 PM CEST

Re: @bacardi55 Sat 21 Aug 2021 16:16 CEST

you can always check gemini://tinylogs.gmi.bacardi55.io

That's what I do :)

Sat 21 Aug 2021 01:10:24 PM CEST

I might have patched the problem 'lace' has with incorrectly formatted dates (or at least I found a good place to do so).

My modified lace (WIP)

Sat 21 Aug 2021 12:39:04 PM CEST

People 'sent' almost 500 messages via gab in the course of the last two weeks. Seeing how much 'life' everybody gets in spite of if -- maybe it's not 'social network' that ruins your lives, but the notifications? ;) [I doubt anyone expects an instant reply in 'gab'...]

Sat 21 Aug 2021 12:33:22 PM CEST

Slope has the 'file-append-to', I added a few lines of code to have 'file-read-from' -- for symmetry. To do - 'file-prepend-to' and probably 'file-prepend-at-tag' or something like that for tinylog type files (where all the new content goes between the header and the latest entry)

Thu 19 Aug 2021 11:33:26 PM CEST

A: What are you doing on Friday?

B: I want to buy glasses in the afternoon...

A: And then?...

B: And then... We will see.

(I show myself out)

Thu 19 Aug 2021 10:10:37 PM CEST

Watching "A Very Secret Service" on Netflix. The French humour at its best. A bit like Louis de Funรจs movies. Minus the outright slapstick scenes. "Who won WW2?" "...France?"

Thu 19 Aug 2021 08:34:07 PM CEST

tinylog.slo:

[x] Added prompt to the 'editor'

[x] Will skip the header to the first entry (= first line starting with "##")

Thu 19 Aug 2021 07:14:27 PM CEST

I had a rather lengthy exchange about the rather inadequate support for Unicode characters on Linux console. What works perfectly in a 'text' terminal emulator gets mangled and partially replaced with white squares on the console. Even in FB mode, with the proper encoding and font loaded -- there's still lots of _actually not so weird shit_ that just can't be displayed properly. Okay, meanwhile, Russian or Polish people are not fucked anyymore when trying to read or write on the console. But I pity you if you're trying to write math formulas. I guess only 2ยฒ gets displayed properly, all the rest is simply a square.

"I hope it will get better..." said my interlocutor. I'm thinking and thinking and I just cannot see it. Everybody drifted into the world of graphical interfaces, plus the text console does what it was intended to do -- gives you access to the system on a very close, very basic level. Will we ever see emojis in kernel messages? Well, I hope not, because they won't be properly displayed...

Thu 19 Aug 2021 12:47:58 PM CEST

Ever noticed how you grow when something you need isn't available? I guess lack of something is a good impulse to kick our butts out off the consumption circle. And every temporary need creates a permanent value.

Thu 19 Aug 2021 12:38:46 PM CEST

@deerbard: I don't think I overdo it. I just don't keep using 'you' or their nicknames. Besides: you do realise it's a tongue-in-cheek remark? ;)

Thu 19 Aug 2021 07:56:32 AM CEST

Woke up to a new time/data functions specification ;-) Format of the timestamp changed slightly, hopefully it doesn't break anything...

Wed 18 Aug 2021 06:28:40 PM CEST

Aside from being one sexy mofo (ngl - can't breathe from laughing) I managed to enable multiline entries in tinylog.slo. It's not a bad day, overall...

Wed 18 Aug 2021 06:22:20 PM CEST

Psych2Go "6 Sexy Habits"

- Always learning โœ…

- Relaxed body language โœ…

- Mindful during discussions โœ…

- Don't check the phone 24/7 โœ…

- Don't try to be perfect โœ…

- Say their name often โœ…

Also: _me_ :rofl:

Wed 18 Aug 2021 12:26:26 PM CEST

Being "thrown into deep water" at the very beginning of a new job has its advantages. I'm in a training, level 'advanced', for a system I didn't know at all a few months ago, and I do not feel too dumb for it. The feeling of being an impostor is actually a good thing. Keeps you on your toes. If I only had so much fun learning back then, at school ;)

Wed 18 Aug 2021 12:15:15 PM CEST

Changed the date format in tinylog.slo. Let's see how it works. Thanks @deerbard for pointing it out (I didn't know I'm under surveillance now ;-) )...

Tue 17 Aug 2021 09:51:28 PM CEST

In case someone needs to fold text after 60th column ;-) ->

(for-each (lambda (line) (display line)(newline)) (regex-find ".\{60}[^ ]* *|.*$" Long)) 

<- Yes. That's pretty much all. 'Long' is a variable holding the long text line you want to fold...

Tue 17 Aug 2021 07:34:30 PM CEST

Gemini client in six-ish lines of code? nice :) #slope

Tue 17 Aug 2021 06:27:52 PM CEST

The script itself...

Tue 17 Aug 2021 06:27:13 PM CEST

Yessss! It definitely did!

Tue 17 Aug 2021 06:26:50 PM CEST

Will the other entry land where I expected it to appear?

Tue 17 Aug 2021 06:22:23 PM CEST

So, it happened. I didn't expect the first slope script I _might_ use regularly would be a tinylog updater. The gab client (gaby) is already at a quite advanced development stage (minus a necessary rewrite to replace my /etc/passwd hack with a much more standard and efficient fileglob), but wrapping a oneliner I already had in some file updating logic wasn't particularly complex. So here we are. An update from inside a slope script...

Tue 17 Aug 2021 10:32:06 AM CEST

After years of avoiding?/neglecting?/not finding use for? Scheme I took a deep dive into a "locally developed" Scheme's dialect - 'slope'. It's really refreshing to take a different approach to solving problems. I am actually amazed how deep has the basic syntax of the language embossed itself in my mind. I must admit -- every time I start a new project in Python -- I have a moment of hesitation -- "how exactly am I going to make it run?". Nothing like that with Scheme. For example - I've noticed slope has a for-each expression, and (I tested it at some point) it works exactly as your intuition tells you, but doing a "loop" using recursion felt so natural. Why is it so? And why am I "at home" with Scheme, but somehow cannot stand Lisp? Questions ;)

Slope is a 'for fun' project. You didn't believe the world needs another language? Another interpreted language? Another interpreted language with lots of parens? Good. That would be a weird assumption. Sloum writes it for fun, because he can. And, kind of as a side effect -- a working, slick and fast tool was created. I did some timing, comparing a standard program running here (written in Python) with my less-than-masterfully crafted bootleg version of it.

$ time ./gab.slo -c test >/dev/null >>> real 0m0.012s|user 0m0.001s|sys  0m0.011s
$ time gab -c test > /dev/null      >>> real 0m0.066s|user 0m0.054s|sys  0m0.010s

Not bad for a 'toy' language, huh?

Slope repository

Sun 15 Aug 2021 06:55:05 PM CEST

I talked with a stranger. Why do people hesitate so much? Postpone stuff indefinitely. Don't call, don't text. Don't outline that story or essay, don't fill the gaps. Don't learn that song, don't lookup that information. When did everybody become so apathetic?

Thu 12 Aug 2021 10:38:59 PM CEST

Time to walk the walk - today's snapshot of the zeitgeist on the server -- who would expect that?

Pineapple on a pizza?

- 5 yummy! :P

- 1 disgusting :$

- 1 A pizza is a pizza :D

A bit less of a surprise here, though -- we're definitely the vi(m) crew here...

What editors do you use?

4 vim

2 vi

1 sam

1 ed

1 chalk

1 acme

Wed 11 Aug 2021 10:27:28 PM CEST

Harvested my first astrobotany plant. Farewell, Abigail! Hello, Abigail. Now growing at 1.2x speed.

Fri 06 Aug 2021 10:24:20 PM CEST

I kind of love-hate the simplicity of Plan9 editors. From one point of view they're strictly following the tenets of Unix - "one job, but well done". An editor isn't a mail client, web browser, file manager... They're not syntax highlighter either... They're heavily depending on mouse. Or mouse chordings, combined with keyboad operations. They probably work great with mouse held in right hand (what I, as a lefty, don't do).

Still prefer the "impure" versions:

Deadpixi's sam

A great set of patches bringing acme into XXI century. A must have in my opinion.

Acme in Go

MDI version of Acme

Acme in text-mode[1]

[1]It looks great and I would love to use it, but for some reasons it refuses to react to my mouse-clicks.

Fri 06 Aug 2021 06:59:20 PM CEST

Started a new project:

A personal assistant for the RTC shell

Tweaking on the 'odyssey'

I must admit, some pieces of code I (re-)write make me proud, even if it's basically just snipping on the existing code.

diff --git a/files/update.cpp b/files/update.cpp
index 773dbc6..6fdfd4b 100644
--- a/files/update.cpp
+++ b/files/update.cpp
@@ -37,23 +37,11 @@ int main(int argc, char *argv[]) {
                 current_mission.ships[i].x += dx[i];
         // Check if there is a change of status
         for (int i = 0; i < current_mission.nfleet; i++) {
-            if (current_mission.ships[i].status == STATUS_LEG1 && 
-                    (int)current_mission.ships[i].x >= current_mission.duration[STATUS_LEG1]) {
-                current_mission.ships[i].status= STATUS_MISSION;
-                current_mission.ships[i].x = 0;
-            }
-            if (current_mission.ships[i].status == STATUS_MISSION && 
-                    (int)current_mission.ships[i].x >= current_mission.duration[STATUS_MISSION]) {
-                current_mission.ships[i].status= STATUS_LEG2;
-                current_mission.ships[i].x = 0;
-            }
-            if (current_mission.ships[i].status == STATUS_LEG2 && 
-                    (int)current_mission.ships[i].x >= current_mission.duration[STATUS_LEG2]) {
-                current_mission.ships[i].status= STATUS_DONE;
-                current_mission.ships[i].x = 0;
-            }
             if (current_mission.ships[i].status == STATUS_DONE) {
                 current_mission.ships[i].x = 0;
+            } else if ( (int)current_mission.ships[i].x >= current_mission.duration[current_mission.ships[i].status]) {
+                current_mission.ships[i].status++;
+                current_mission.ships[i].x = 0;
             }
         }

Odyssey repository

Thu 05 Aug 2021 08:57:32 AM CEST

Added -t (user template) to poll. Now everyone can create their own polls/questionnaires.

Thu 05 Aug 2021 08:17:40 AM CEST

recent.py

Freshly created linkulator files of a new user caused a false positive, because linkulator change detection used simple mtime check. It's fixed now. Because the script has to read the last line of the linkulator.data file the timing slightly increased (~260-270ish now).

Changed the checking method for all 'folder based' services: recent.py dives (one level so far) into them and returns mtime of the newest file (was the folder itself before).

Wed 04 Aug 2021 06:27:11 PM CEST

poll

That was quick, approximately 30 minutes from a vague idea to implementation. And it's simple - just a text file with an obvious markup, extendable and completely under control of the user (as it should be on RTC).

$ poll -l
editor
  What editors do you use? 
geek4hire
  Programmer, looking for project 
os
  What's your primary operating system?
sodapop
  Pepsi or Coke?

So far only a couple of polls, and not-yet-decentralised (I'm working on it), but already usable. Due to the methodology behind it (files in users' HOMEs) not really a democracy tool (voting is far from anonymous), but I hope it'll find some use here. Or not...

What editors do you use? 
(mark the ones you use frequently, you can add others, just keep the file clean)
[x] vi
[x] vim
[ ] emacs
[ ] nano
[ ] joe
[x] ed
[x] sam
[x] acme

Wed 04 Aug 2021 01:59:54 PM CEST

A weirdo as myself cannot just do the stuff in awk(1) and move on...

Both oneliners:

+ filter out the "comment lines" beginning with "##"

+ create an entry for every first word of remaining lines in an associative array/hash

+ output a list of unique usernames

tmp $ time awk '!/^##/{a[$1]++}END{for(u in a){print u}}' online.log | sort > online.a

real  0m0.013s
user  0m0.009s
sys 0m0.003s

tmp $ time { unset -v 'q'; declare -A q; while read -r a b ; do [[ "$a" =~ ^##$ ]] || q[$a]="x" ; done < online.log; printf "%s\n" ${!q[@]} ;} | sort > online.s

real  0m0.152s
user  0m0.105s
sys 0m0.045s

tmp $ diff online.a online.s
tme $

Fun ;)

<EOL>