mastodon.world is one of the many independent Mastodon servers you can use to participate in the fediverse.
Generic Mastodon server for anyone to use.

Server stats:

8.1K
active users

#codegolf

3 posts2 participants0 posts today

I kind of irrationally #CodeGolf my #Makefile rules, but sometimes I sit down to straighten out something awkward that bugged me for years, and get kind of mad when I seem to have been the first to actually treat `make` like the tool it is instead of as a broken shell script runner.

This time it was #Python #VirtualEnv setup:

```
dep: .venv/bin/pip .venv/lib/*/site-packages/__pycache__

.venv/lib/%/site-packages/__pycache__: .venv/bin/pip requirements.txt
.venv/bin/pip install -Ur requirements.txt

%/bin/pip:
/usr/bin/virtualenv $*
```

(Yeah pretend those are tabs. Yeah that is make's worst wart.)

I even use `!#.venv/bin/python3` in my scripts and hey presto everything just works everywhere and I can focus on the actual code.

I'm curious what cases I'm ignoring or missing here. Non-install upgrades may deserve a target perhaps...

Ich folge zu wenigen kreativen Accounts. Ich suche coole Software Spielereien, weniger klassische Kunst oder Hardware. Leute die Neues ausprobieren und Sachen aus Spaß programmieren, ohne konkrete Probleme damit lösen zu wollen. Code Golf, Experimente, ultra detaillierte Analysen und Deep-dives. Vorschläge? :BoostOK:

So I watched this video youtube.com/watch?v=RcVA8Nj6HE

And I decided to check what "plus times plus" actually computes. Luckily, I have my own #LambdaCalculus compiling language, #Lamber f github.com/aartaka/lamber

So I ran "* + + 1 2 3" and got... 36. So a number from a #math operator applied to other operators and then to data. Which seems like a nice basis for math conspiracy theories. How many of the basic arithmetic functions can we combine, and to what result? Might even end up with lambda calculus #codegolf things, like this division function John Tromp listed with attribution to Bertram Felgenhauer:

def div fn (dividend divisor)
local F = fn (m f t)
m T' (fn (c) f : c t) id .
int (fn (f x)
(int dividend) T' (K x) ((int dividend) (F (int divisor) f) x)) .

Adapted to Lamber, of course. But not any more readable than it used to be. Which is a cool feature of LC—you can apply anything to anything and get something as a result, albeit with a really confusing program flow.

I'm that close to learning some logical language and trying to devise mine, with lambda diagrams as concept ideograms and function application as the only syntactic relation. Yeah I know I'm going crazy, but at least it's fun.