sam's capsule - Tiny Log
Bad programming, bad jokes, bad idea.
author: @samhunter
avatar: 💡
license: Unlicense
2025-12-08 21:02 +0100
To be honest I never looked closely at this particular model, but -- after seeing some pictures online I am aghast and perplexed (and sharing your dismay) :/-- what did they exactly achieve by going full gonzo on the layout? It's a big ass, 100% size keyboard -- not that cramming all the keys together saved much "desk estate"...
Not what I would expect from an otherwise solid brand.
BTW: did you look at Cherry KC 4500 Ergo? It's 50 Euro, has the "notebook style" Fn key squeezed between Left Ctrl and Alt, but other than that it looks normal.
2025-12-02 08:51 +0100
No worries, we're on the 'slow internet' ;) I see my tinylog more as a place of posting unsolicited opinions than a communication platform.
Well, as I'm already at it: you might look into 'tenless' (or 'semi-tenless' keyboards with detached number block) and split keyboards. Many people complain the angle between two halves isn't fitting their needs -- with a split keyboard the problem disappears completely. A potential drawback is either the cable connecting the two halves or (in some cases) having two Bluetooth devices paired... But I didn't see anyone really despising that part ;)
If possible -- try to put your hands on a real, physical one at a brick-and-mortar store before buying.
I'm partial to Microsoft keyboards (a definitely personal preference -- I am on my second (in 10 years) Sculpt, and I had Ergonomic before. That's pretty much the only M$ product I used voluntarily since 2000s.
Evoluent Goldtouch looks 'legit', and -- based on their left-handed vertical mouse's quality -- I'm sure it's solid. There's of course the Kinesis, but you'll pay through your nose to get one... But then -- it's an investment everyone has to consideer for themselves -- I'm a cheap bastard ;)
Logitech is another brand with good keyboards, but their ergonomic keyboards are not my thing -- I have no idea what doesn't match my expectations, but something feels off when I try to type on them.
Wireless or 'optionally wireless' with a detachable USB cable -- I shunned them for years ("what I'm going to do when my keyboard stops working?"), but in reality it takes months to drain the two AAA batteries -- and I'm typing for a living (and fun, after work...)
There are also many mechanical designs as well -- I was raised on IBM and Wang "concrete slab" keyboards, but somehow I'm not missing the "click-clack" or the long travel on every tap.
2025-10-07 23:39 +0200
It's a crazy day at work when I actually use Levenshtein distance for log evaluation...
2025-10-02 20:21 +0200
TIL: a mildly interesting trick -- signing a file with ssh public key:
< content.txt ssh-keygen -Y sign -n file -f ~/.ssh/id_ed25519.pub > content.txt.sig Signing data on standard input
To verify the file:
< content.txt ssh-keygen -Y check-novalidate -n file -f ~/.ssh/id_ed25519.pub -s content.txt.sig Good "file" signature with ED25519 key SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2025-09-27 20:45 +0200
I'm programming my own "Core War" version in Python. Funny thing -- the only area where I went "canonically pythonic" is the visualisation. The VM and compiler use techniques I could easily translate one day into C -- bitmasks et al.
I started 32-bit ops, I think I'll eventually move to 64-bit, to stuff more information into a single instruction. I'm not using the existing code for reference, reverse-engineering the redcode examples and making them work the way they are described is kind of fun, and I definitely learn a lot in process.
2025-09-09 14:53 +0200
No censorship is good. And doing a "right (in your eyes) thing" doesn't make a villain one of the "good guys".
2025-09-09 14:52 +0200
"It does not matter what technology you use as long as you're growing."
2025-09-06 19:00 +0200
A good, ergonomic keyboard, and a good, ergonomic mouse (for the times when I'm in `acme` and/or on Plan9) make a big difference.
There's essentially _no reason_ to waste your time and health on typing on cheap or overhyped ("mechanical", "gaming", "75%" and whatever the cat dragged home from TikTok or Youtube) keyboards.
2025-09-03 19:32 +0200
Python dependencies + SUSE's refusal to actually maintain their Ansible packages = bloody frustration. Every major upgrade makes me think of a snail moving over broken glass.
2025-08-30 19:46 +0200
I started a small project, as a joke -- a rewrite of `nano` "editor" in Bash... I must say -- the joke is on me -- it's a little over 200 lines of Bash and it has more functionality than an average nano user ever needs...
(having said that... it's kind of hilarious, actually).
2025-08-28 13:00 +0200
I've noticed most of my work recently is pressing ^R to find and execute something I already did once in the past. On a side note I increased my HISTSIZE to 200k... Alright, maybe not "most of it", but there's a line in my history for pretty much every ad-hoc task...
2025-08-25 22:29 +0200
Linux is 34 today
On this day in 1991, 21-year-old Finnish student Linus Torvalds posted to the comp.os.minix newsgroup: “I’m doing a (free) operating system (just a hobby, won’t be big and professional like gnu) for 386(486) AT clones.”
2025-08-21 19:13 +0000
Trying to "shitpost" from sam (samterm running locally, editor's backend -- on RTC). The tinylog poster script is on RTC too.. Let's see how it works :D
2025-08-21 20:14 +0200
I converted it some time ago to gemtext.
Neal Stephenson is a giant nerd, and a great writer.
2025-08-20 17:05 +0200
TECO-64 is so far the nicest version of "The Editor From Hell" I used. It's pretty well done (according to the site it's a rewrite, not a patched TecoC version), and it's actually comfortable (assuming one spent a few minutes reading the manual).
2025-08-18 20:51 +0200
A bunch of scripts in a pipeline for reading, then one of scripts I wrote in Lua, Slope, or Bash for writing/replying.
This way I read/write tinylogs no matter if I am on the ConnectBot on my phone, tmux on RTC or acme on my home system.
2025-08-14 20:04 +0200
What if... instead of lugging my dotfiles and scripts everywhere I go I'll just mount the remote filesystem and use my local tools -- the "Plan9 way"?
2025-08-13 10:17 +0200
It might be a kind of "hot take", but did you ever notice that having a good tool you know is detrimental to your other skills?
The typical "when all you have is a hammer every problem looks like a nail"...
I always interpreted the saying as a commentary on insufficient, or narrowly specialised skills, but it might go a little deeper, actually.
It gets even worse if your mindset is "we vs. them", when you see your favourite tool as superior to other tools available on the system, and not as a part of a bigger ("systemic") toolbox.
In my case, when I began my IT journey, it was creating ad hoc scripts in vim -- read in the list of files, edit it with g// and %s///, write out to !bash -- instead of using a for loop or an xargs pipeline...
There's of course the other side too: having a set of well-integrated tools removes the "need" for new tools. Why should I write a full program when what I need is done with a few scripts shelled-out from `acme`, `vim` or `kakoune`?
They say "Better is the enemy of good", and I seem to agree with it more and more.
2025-08-03 19:55 +0200
Kakoune text editor is a nice concept, but in case I develop a brain tumour -- I'm attributing it to the short exposure to asinine stupidity of its users over the last few days.
Choosing an editor where the main page of the project states explicitly it should remain orthogonal, free of bloat of "user-requested" features, and playing well with POSIX shell, and whining like a little bitch that it doesn't have all the crap a middle-sized IDE under Windows has, and about the "shortcomings" of the POSIX shell? *In an editor scripted in the fucking POSIX shell*??
If you want Lisp, Lua, LSPs -- there's plenty of editors that can do it out-of-the-box, and you *know* where to find them.
And honestly -- people who base their understanding of Unix philosophy on their sporadic, inept use of _GNU-flavoured_ versions of POSIX tools, with their Bysantine selection of verbose options, are a special kind of stupid.
Yes, your bastardised (GNU) grep tries to do much more than one thing, but it's on you and your ilk -- you idiots couldn't build a pipe, and now you're using an Emacs-worthy parody of the real tool and blame the system for "not following its own philosophy"...
2025-08-02 19:46 +0200
[I'll answer this obviously rhetoric question...]
That's giving in to an extortion. No more, no less.
And they kept telling us there's no negotiating with terrorists and no ransom paying to blackmailers...
2025-07-30 12:54 +0200
Someone on kakoune's discord asked about (awk) script that could turn
/* foo bar baaz*/
into
/*--------------------foobar--------------------*/
It wasn't difficult, also a sed(1) version wasn't really complex, but can I do it in bare bash?
Sure:
#! /bin/bash
readonly L=${1:-50}
IFS='' read a
(( L >= ${#a} )) || { echo "$a"; exit; }
: "${a//\/\*/-}"
: "${_//\*\//-}"
: "${_// /@}"
: "$(printf "%-*s%s" $(( (L - ${#_}) / 2 )) '/*' "$_")"
: "$(printf "%s%*s\n" "$_" $((L-${#_})) '*/')"
: "${_// /-}"
echo "${_//@/ }"
Not sure if I will ever need it, but I saved it for use with '|' etc. in vim/sam/acme/kakoune etc...
/* Note: it's written for fun, not efficiency... that would be 2 lines in Python, tops... */
2025-07-27 11:36 +0200
Getting acme2k modifications to work with the current plan9port took me all the morning, but now it works. I also managed to make use of config.h colours more consistent.
It seems the 'main' is introducing some of the acme2k functionality, but so far no luck with the obnoxious focus following the mouse -- good for WM, not so great in the narrow taglines of the editor...
2025-07-26 21:31 +0200
"The console utility clear(1), which simply clears your screen, is the purest possible cantrip; it doesn't even take command-line options[1], ."
- esr in "The Art of Unix Programming"
Why isn't "cantrip" a thing?
[1] of course GNU clear _takes_ command-line options.
2025-07-25 21:35 +0200
don't do with a configuration switch what can be done with a script wrapper or a trivial pipeline.
The fucking GNU `ls` has 60 switches... Just saying.
2025-07-25 20:55 +0200
By the year 2000 awk had become little more than a memory for most old-school Unix hackers, and not a particularly nostalgic one.
- esr (ca 2003)
You can't even imagine how hard I'm laughing at that statement, especially as he mentions Perl as an alternative... Let's agree -- it's hard to be a prophet in one's own profession...
2025-07-25 17:22 +0200
I am browsing through
It's definitely a quite interesting read, written around 2003 by Eric S. Raymond.
Many chapters are "still" relevant, some are slightly outdated, some won't work anymore -- not without a serious rewrite (ESR won't do it anymore, I guess).
Re-reading it, over 2 decades later, made me see how "Unix" isn't really about software, but more about a "can do" mindset and problem-solving attitude.
Things like Perl (used it intensively for over a decade, then pretty much forgot it ever existed... it pops up from time to time in a form of an outdated monitoring plugin for Icinga, but that's pretty much it... And anything "Parrot" driven? Did I see anything done in Raku or its ilk? Nope.) or Tcl/Tk rode into the sunset while everybody was busy with adopting Python...
The "basics" -- shell/sed/awk/grep combo -- mainly -- stayed and are still going strong.
I wonder how the "Editors" section would like if anyone "updated" it... Would they remove "ed", "sam", "vi", "emacs"? Nope. Only "wily" would probably disappear, although I still use it sometimes... But mostly because "the real shit" -- Acme editor is available now, as part of plan9port projects.
2025-07-24 19:15 +0200
Remember Perl, a language people used to write everything, back then, in the dark ages^W^W^W^Wa decade ago?
To be honest, personally I am both glad that it existed and that it's gone.
2025-07-17 18:48 +0200
That's exactly the kind of joke that would make the "Pearls before swine" rat swing his baseball bat...
2025-06-30 17:15 +0200
Yay, it lives. In full 3440x1440 resolution, too. Now I can use the box till the last Linux distro obsoletes x86_64 architecture...
2025-06-28 22:12 +0200
I honestly hoped your middle.finger would be used for shit posting...
2025-06-28 22:04 +0200
So, my desktop computer began (again) to show the signs of aging. It was a great machine 10 or 12 year ago when I got it as my workspace computer at my previous work. Years later I got it as part of my "severance" when the company dissolved, and to this day it's pretty great.
There's still the original Windows 7 licence sticker on it, but it never ran any M$ system -- we were a Unix shop, I ran SUSE Linux for years on it, then I switched to Ubuntu, and till the last week my only grievance was its inability to use the full width of my new, ultrawide monitor.
But a few days ago it stopped booting, and I traced the problem down to the old gfx card. After I removed it physically the PC booted (in headless mode) and I'm happily using it from an improvised terminal I made out of my Raspberry 400...
New card is ordered, I hope it will work, as getting new things compatible with the old mainboard is tricky, and it's trickiness I do not enjoy anymore.
I'm a systems person, the hardware is merely means to run what I care about...
I really hope my online research wasn't faulty and the new card will give my trusty "home" a new lease of life.
Time will show.
2025-06-17 22:22 +0200
Started reading "We, Programmers. A Chronicle of Coders from Ada to AI." by Robert C. Martin (aka Uncle Bob).
A great read, even if I know some of the characters by heart and I know how it ends...
2025-06-17 12:25 +0200
A truly minimalistic editor
A _text_ editor, to be more precise. Not a '_file_ editor', not a 'filesystem browser', not a 'text formatter'...
I'm mucking around with a proof of concept of 'enough of an editor':
- it allows me to edit the text (and I am using a Tk text component)
- the other function is "pipe to|through an external program", invoked by Acme-style middle click
Yes, that's all. No open (I "pipe in" the file I want to edit), no save (I "pipe out" the selection, into a file I specify before clicking), no formatting (you guessed right, "pipe through a code beautifier").
Removing anything else would render it unusable, so I guess I found the "most Unix way" to edit texts. I doubt it will ever replace 'vi' for me, but it's actully quite usable. I think I'll archive the "project" after I implement and test the filter functionality (accept the text from stdin, write to stdout on exit).
2025-06-16 16:59 +0200
I admire the thinking behind `kakoune` editor. Consequent, but not dogmatic.
No bloat, really good integration with other Unix tools, piping in and out feels as natural as in Acme, but at the same time it retained the vi/vim movements. Well, close enough to vi.
It never left it's niche, and remains a gonzo editor for a few people crazy enough to use a tool that isn't installed anywhere by default. The `helix`, an editor heavily inspired by `kakoune` is probably much more popular, but doesn't have the same vibe.
Helix is an editor, admittedly much faster and much more versatile, especially for programming, but it isn't an extension of commandline the way `kakoune` is.
Does it matter? I don't know, I like it that way, if I didn't want to be "bothered" with system tools I would use Windows. There are good editors for Windows.
2025-06-16 16:25 +0200
If you create a system that any idiot can use, then only idiots will find it useful.
Addendum: if you failed at making it easy enough for idiots - display help by default.
2025-06-03 18:52 +0200
At this point I am not even sure if I "like" computers.
It might be a weird thing to say when you're working in IT (for decades now), but honestly -- what do I do with the physical boxes anymore? I press the big button on my workstation, 5 seconds later I got my login screen, go in, start the fullscreen terminal, tmux is already running in it, and I spend the next 8 to 10 hours just reading, writing and shuffling panes.
I manage hundreds of systems, but do I really care if they are "real" or virtual? The former are just the slower ones, without the safety net of a snapshot, but as long as they run there's no difference for me.
The last time I did care about the model of my gfx card was... Well, yeah... I can't recall anymore.
(of course, I do not take the fact the systems I work with run for granted, I am perfectly aware there's some heavy, loud and warm hardware running somewhere under the multiple layers of systems, but am I really interested in details? I don't think so. The next CPU will be faster, but my colleagues in the development will find creative ways to keep the speed of the system at the usual level)
2025-05-02 21:50 +0200
Funny, I was playing with the idea of generating my tinylog from single-entry files. In the end I gave up on it, exactly for the "overengineered" reason... I planned to run it on demand though, your approach is less wasteful, hands down.
2025-05-01 10:00 +0200
So, what exactly did change?
2025-04-18 22:47 +0200
Ok, using UTC offsets makes sense. And in the conversion it's just '%z' instead of '%Z'
2025-04-18 13:03 +0200
I noticed the date format change in the RFC. As it's reversible -- as long as I am not stripping any date information -- I decided to convert my tinylog.gmi to the new specification (also discovering in process that dateutil parser is more reliable than built-in strptime, and also that one of my entries was written at "15 PM" :D )
2025-04-17 20:25 +0200
I didn't expect any reaction to my venting, thank you for your informative reply and a quick fix (at the moment it seems to be back to its former glory). Happy Easter!
2025-04-16 20:35 +0200
"Quiet" by Susan Cain
I finished the book a few days ago. For the first time (not exaggerating)
I felt the author was mentally at spots I visit frequently. Kind of "from an introvert to an introvert" experience.
There are so many things I couldn't fully grasp from the forced perspective of our predominantly extrovert society that make absolute sense when taken "the introvert way". My frequent inner rebellion against going out, but at the same time not minding visiting a friend for the third time in one week. Perfectly explainable, if one doesn't force it through a hole not meant for it.
(that sounded dirty... I meant - don't explain an introvert handling in extrovert way, you'll end up with rubbish).
So. The reading is done, but it definitely left a mark.
Now reading "Ikigai" - a book a friend recommended. I'm not particularly fond of "self-improvement guides", but it's well written, and I grant it extra points for mentioning pottery -- everything is better with nice "shards".
2025-04-16 20:31 +0200
I'm not sure what's going on with the tinylog aggregation at bacardi's place. The tlogs seem to come and go, randomly.
I doubt it's anything on my side of the connection, as it's basically retrieving a single "file". Nothing good lasts forever?
2025-04-10 15:03 +0200
Retrieved and reformatted for Gemini two pages from now-demised Bell Laps site:
It's sad how historical places like the Labs disappear from the network.
2025-03-16 23:35 +0100
What's the point of those "text-only challenges" actually?
Does anyone ever learn anything from the experience?
I mean - aside from having a strong opinion about those "events" I am sincerely
curious if anyone, anywhere, at any point actually went "text-mode" and decided
to keep using any of the tools they were "forced to use" during their interminent
GUI fasting...
2024-07-11 20:11 +0200
Working with people who are willing to learn is a daily blessing.
2024-07-05 20:44 +0200
"I love the demons in your head" is an entirely different level of
appreciation.
2023-09-27 17:08 +0200
Writing a novel around one scene I envisioned somewhere in the middle is a bitch...
Especially when it requires a vampire character. So many questions, so many contradicting answers...
2023-02-06 18:57 +0100
me: excelling at "slow internet" with over two months between tinylogs :D
2022-11-28 16:05 +0100
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]:
2022-11-27 18:54 +0100
Wrote a small chess-over-gab client in bash, as a break from my (now daily) "toiling" at my editor's development.
And no, I don't play chess...
2022-11-24 18:58 +0100
Re: @monolalia Thu 24 Nov 2022 16 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.
2022-11-20 22:52 +0100
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...
2022-11-20 14:10 +0100
Adding custom keybindings to my editor took exactly *ba-dummm-tsss* 3 lines...
2022-11-20 01:44 +0100
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.
2022-11-19 22:06 +0100
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..."
2022-11-19 09:55 +0100
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.
2022-11-18 23:01 +0100
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.
2022-11-18 14:05 +0100
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
2022-11-17 22:02 +0100
+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
2022-11-17 13:30 +0100
(Storing for later) Two African recipes from yesterday's feed:
Both can be done without meat.
2022-11-17 12:41 +0100
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...
2022-11-16 23:33 +0100
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
2022-11-16 17:47 +0100
"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"
2022-11-16 13:47 +0100
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.
2022-11-16 11:43 +0100
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...)
2022-11-16 01:14 +0100
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...)
2022-11-16 01:11 +0100
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.
2022-11-14 23:02 +0100
Getting the scrolling and vertical cursor movement right is such a pain in...
2022-11-11 23:38 +0100
Upgrade to tinylog.slo - "readline" support (thanks to Sloum's "line-edit" module).
No more retyping of lines (and I typo a lot...)
2022-11-10 23:07 +0100
Kind of reduced tic-tac-toe to one regex: \(\([XO]\).\{0,3}\)\1\2
2022-11-07 22:16 +0100
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...
2022-11-06 21:32 +0100
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.
2022-11-05 21:48 +0100
"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)
2022-11-05 15:44 +0100
Yay, Slope has net-listen now :)
2022-11-05 11:13 +0100
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.
2022-11-05 11:06 +0100
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.
2022-11-04 2200 +0100
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'
}
2022-11-03 23:21 +0100
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.
2022-11-02 10:30 +0100
“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]
2022-11-01 22:33 +0100
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.
2022-11-01 22:30 +0100
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`)
2022-11-01 20:53 +0100
Considering rewriting the "displaying" parts as wrappers for `.g`lobal.
2022-10-31 23:38 +0100
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.
2022-10-29 22:18 +0200
Extended `.a`ppend and `.i`nsert commands in bemacs.sh to mimic their `ed` equivalents.
2022-10-29 14:25 +0200
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?)
2022-10-16 18:41 +0200
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"
2022-10-16 14:50 +0200
The meek will inherit the Earth, but the lazy will rule the IT.
2022-10-13 19:54 +0200
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...
2022-10-13 19:50 +0200
I think being nostalgic in IT comes easier when you weren't actually working with the old crap.
2022-10-10 21:46 +0200
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)...
2022-10-09 14:20 +0200
Writing a small script for every little, mundane thing I might want to do again some time.
2022-10-09 13:41 +0200
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.
2022-10-09 13:39 +0200
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).
2022-10-09 13:38 +0200
My work-related pet peeves: people who use lists created weeks ago to handle dynamically changing processes.
2022-10-09 13:37 +0200
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.
2022-10-09 13:36 +0200
My work-related pet peeves: people who scroll through shell history instead of using the reverse search function.
2022-10-09 13:35 +0200
My work-related pet peeves: people using nano or notepad for serious text editing.
2022-07-05 14:43 +0200
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...
2022-06-29 22:49 +0200
Re: @monolalia Tue 28 Jun 2022 21 UTC ▒
What about "Nothi me non tere"?
(My sole contact with Latin are mariachi bands :D)
2022-06-27 21:05 +0200
If life gives you lemons -- that's a nicer alternative to scurvy...
2022-06-11 16:38 +0200
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.
2022-06-08 22:25 +0200
@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)
2022-06-08 19:17 +0200
`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
2022-04-18 13:47 +0200
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?
2022-04-15 23:01 +0200
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
2022-04-07 11:29 +0200
`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.
2022-04-02 10:27 +0200
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.
2022-03-29 20:48 +0200
I finally wrote the long (decades) overdue Brainfuck interpreter.
The prototype in Python was rewritten in JavaScript and now it resides
2022-01-31 21:55 +0100
Unassuming elegance of a well-written Ansible playbook.
2022-01-20 09:20 +0100
I seriously hate the hoops one has to jump through to create a working EFI boot CD image...
2022-01-04 10:06 +0100
Re: @guigui3000@pollux.casa Mon 03 Jan 2022 20 +0100
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.
2021-12-30 21:59 +0100
Honestly, there's a separate circle in hell for people who defined keyboard shortcuts in `nano`
2021-11-29 10:45 +0100
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.
2021-09-09 15:16 +0200
Re: @hexdsl Wed 08 Sep 2021 21 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.
2021-09-07 12:44 +0200
Re: @deerbard Sep 7 12:12 PM +0200 2021
I could download it. Quite cool, the creature...
2021-08-29 15:56 +0200
Re: @deerbard Sun 29 Aug 2021 13 +0200
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"...
2021-08-29 15:53 +0200
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).
2021-08-29 13:11 +0200
Re: @deerbard Sun Aug 29 01:07 PM +0200 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'
2021-08-27 08:56 +0200
Re: @deerbard Wed 25 Aug 2021 17 +0200
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.
2021-08-24 21:51 +0200
Re: @hexdsl Tue 24 Aug 2021 19 BST
teeline -- as in 'shorthand system'?
2021-08-24 12:42 +0200
Context: Not so important, are you?
# ## you are #### here #### | ##### v , #####--.--o--o---°------(()---(/)---O-----O----------------------------------- ##### '
2021-08-24 10:21 +0200
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...
2021-08-23 15:22 +0200
Bigger scheme
/ \ /
k --- a b --- f
/ \ / \
me --- l i
\ / \ /
j --- c d --- e
\ /
g --- h
2021-08-23 13:29 +0200
Learning to keep tabs on my projects in 'swim' (think "Trello on the commandline"):
2021-08-22 19:16 +0200
2021-08-21 16:41 +0200
Re: @bacardi55 Sat 21 Aug 2021 16 +0200
you can always check gemini://tinylogs.gmi.bacardi55.io
That's what I do :)
2021-08-21 13:10 +0200
I might have patched the problem 'lace' has with incorrectly formatted dates (or at least I found a good place to do so).
2021-08-21 12:39 +0200
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'...]
2021-08-21 12:33 +0200
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)
2021-08-19 23:33 +0200
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)
2021-08-19 22:10 +0200
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?"
2021-08-19 20:34 +0200
tinylog.slo:
[x] Added prompt to the 'editor'
[x] Will skip the header to the first entry (= first line starting with "##")
2021-08-19 19:14 +0200
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...
2021-08-19 12:47 +0200
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.
2021-08-19 12:38 +0200
@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? ;)
2021-08-19 07:56 +0200
Woke up to a new time/data functions specification ;-) Format of the timestamp changed slightly, hopefully it doesn't break anything...
2021-08-18 18:28 +0200
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...
2021-08-18 18:22 +0200
- 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:
2021-08-18 12:26 +0200
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 ;)
2021-08-18 12:15 +0200
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 ;-) )...
2021-08-17 21:51 +0200
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...
2021-08-17 19:34 +0200
Gemini client in six-ish lines of code? nice :) #slope
2021-08-17 18:27 +0200
2021-08-17 18:27 +0200
Yessss! It definitely did!
2021-08-17 18:26 +0200
Will the other entry land where I expected it to appear?
2021-08-17 18:22 +0200
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...
2021-08-17 10:32 +0200
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?
2021-08-15 18:55 +0200
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?
2021-08-12 22:38 +0200
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
2021-08-11 22:27 +0200
Harvested my first astrobotany plant. Farewell, Abigail! Hello, Abigail. Now growing at 1.2x speed.
2021-08-06 22:24 +0200
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:
[1]It looks great and I would love to use it, but for some reasons it refuses to react to my mouse-clicks.
2021-08-06 18:59 +0200
Started a new project:
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;
}
}
2021-08-05 08:57 +0200
Added -t (user template) to poll. Now everyone can create their own polls/questionnaires.
2021-08-05 08:17 +0200
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).
2021-08-04 18:27 +0200
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
2021-08-04 13:59 +0200
A weirdo like 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>