8

I wrote a blog post comparing several range libraries for a case that is doing filter with non-trivial lambda and then reverse.

[-] Serpent7776@programming.dev 1 points 5 months ago

I added bun and deno. Updated results are on the github page. Deno is similar to node, bun takes much less time.

https://github.com/serpent7776/startup-shutdown-bench

10

A blog post shows an example usage of hyperfine CLI tool to measure and plot time of startup and shutdown of several code interpreters.

8

A Programming Language Learner's Resource. Contains descriptions of many ineresting programming languages, like APL, ABC, FP, Factor with examples and further links.

[-] Serpent7776@programming.dev 2 points 9 months ago

It should be easy to edit the existing code to add support for i18n, but there's probably no way to make in generic (except for macros).

[-] Serpent7776@programming.dev 10 points 9 months ago

Yeah, that was basically it.

[-] Serpent7776@programming.dev 14 points 9 months ago

There's no purpose really. It was more of "wonder if I can" and also nice way to learn custom literals.

19

I did a code that uses custom literals to allow indexing arrays with ordinals (1st, 2nd, 3rd), all at compile time. Additionally _st works only with 1, _nd only with 2, _rd only with 3. Zero and negative numbers are also not supported and fail compilation.

https://github.com/serpent7776/bits/blob/master/th.cpp/th.cpp

8
5

I created a very simple script that shows the history usage of your shell. Should work with bash and fish shells.

This basically goes through the history and counts the command names. So all of git push, git pull, etc will count as just git.

Example output:

    847 pacman
    296 cd
    206 git
    203 time
    180 vim
    172 awk
    166 aur
    142 strace
    141 cat
    125 ls
Total commands:  7008
Unique commands: 753
[-] Serpent7776@programming.dev 2 points 9 months ago

I can actually define this in TCL:

% proc ifn't {cond cmds} {if {!$cond} {uplevel $cmds}}
% ifn't false {puts 12}
12
% ifn't true {puts 12}
% 

Serpent7776

joined 9 months ago