#code-golf #decision-problem #restricted-source #permutations #self-referential
Origin | Interest | Match
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...
I'm submitting a "creepy" entry to this 1KB JS competition.
I've currently got 6 whole bytes spare. Wonder what I'll use them for?
every wanna golf your css color codes? yeah, me neither. just use my postcss plugin to do it for you
https://github.com/xero/postcss-color-golf
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?
rose quartz + DOF #glsl #generative #tinycode #codegolf
vec3 q=vec3(0,0,7e3),v=FC.rgb-r.xyx*.5,p,u=sin(FC.rgb*PI);v-=u*4.;for(float i,s;i++<67.;s=abs(2e3-length(p.yz))-3e1,q+=sin(i)+v*.7/r.x*s,o+=exp(-s*s/vec4(4,1,2,1))/i)for(p=q+u*4e4/r.x,s=7e3;9.<s;p=p.zxy+s*.02*sin(p/s*17.),s*=.8)p.zx*=rotate2D(s+(s==7e3?t*.2:0.));
More #codegolf #programming - this time it's for some space invader animations. (140 characters was not enough to make the game interactive)
So I watched this video https://www.youtube.com/watch?v=RcVA8Nj6HEo
And I decided to check what "plus times plus" actually computes. Luckily, I have my own #LambdaCalculus compiling language, #Lamber f https://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.
3rd place for my "10 Line Dino" - happy with that :)
JavaScript piano one-liner :) #codegolf
for(p='',y=5;y--;p+="\n")for(x=80;x--;)p+=x&1?5-y<4*((59&(1<<((x>>1)%7)))>0)|0?'#':'|':' ';console.log(p)