Advertisement · 728 × 90

Posts by chayleaf

Kyūjitai - Wikipedia

en.wikipedia.org/wiki/Ky%C5%A...

Japanese (traditional)
Japanese (simplified)

1 month ago 0 0 0 0

something like

let x = if cond() then { x = 5; y = 6; } else { x = 10; };
let y = x.x;

could very plausibly work without boxing
most system languages are sadly still too "C-brained", but theres so much room for both automatic optimization and non-C-like manual low-level layout control

1 month ago 1 0 0 0

not in rust, but you could do probably do something like this with dataflow analysis and subtyping
i think "dataflow for automatic memory layout optimization" is an exciting concept in general

1 month ago 1 0 1 0
def f(x):
 s=len(str(x))
 r=0
 for c,q in zip(range(2,1+s),b'ddcdbdccb'):
  n=s//c
  p=10**n
  d=(p**c-1)//(p-1)
  m=1+(x-1)//d
  r+=(q-99)*(1-p-d*(s%c<1)*(p*p-m*m+m-p)+sum(10**i*(p**i-1)*b'\tc'[i>c]//(100*10**i-100)for i in range(2,c+2)))
 return r//2
t=0
for x in open('02.txt').read().strip().split(','):a,b=map(int,x.split('-'));t+=f(b+1)-f(a)
print(t)

def f(x): s=len(str(x)) r=0 for c,q in zip(range(2,1+s),b'ddcdbdccb'): n=s//c p=10**n d=(p**c-1)//(p-1) m=1+(x-1)//d r+=(q-99)*(1-p-d*(s%c<1)*(p*p-m*m+m-p)+sum(10**i*(p**i-1)*b'\tc'[i>c]//(100*10**i-100)for i in range(2,c+2))) return r//2 t=0 for x in open('02.txt').read().strip().split(','):a,b=map(int,x.split('-'));t+=f(b+1)-f(a) print(t)

day 2 part 2 this is so stupid

2 months ago 0 0 0 0

funnily enough, this is almost shorter than my (ungolfed) apl solution:

+/a[;2]-(a←{n←⌊(l←1+⌊10⍟⍵)÷2◊⌊((((((m-1)×m←m+((10*n)|⍵)>m←⌊⍵÷10*n)×1+10*n)-⌊(110+10*3×n)÷111) (((¯1+10*3×n)×110÷111)-10*n))[1+2|l]+1+⌊(¯1+10*2×n)÷11)÷2}¨⊃{(0 1)+⍎¨(⍵≠"-")⊂⍵}¨((x≠",")⊂x←(x≠"\n")/x←⎕FIO[26]"02.txt"))[;1]

2 months ago 0 0 0 0

for aoc2025 day 2, i went with python over apl

def f(x):
s=len(str(x))
n=s//2
p=10**n
m=x//p
m+=m<x%p
if s%2:m=p
return((m-1)*m*(p+1)-(110+10**(3*n))//111+1+(10**(2*n)-1)//11)//2
print(sum(f(b+1)-f(a)for a,b in (map(int,x.split('-'))for x in open('02.txt').read().strip().split(','))))

2 months ago 0 0 2 0

got a highscore of a 26 move 15 puzzle solve on flipper zero which is only possible in one of 72.5k games. safe to say i'm not beating that one...

3 months ago 0 0 0 0
youtube video called [World Record] Super Mario Bros. Any% in 4:54.415 by averge11

youtube video called [World Record] Super Mario Bros. Any% in 4:54.415 by averge11

not niftski???

3 months ago 0 0 0 0

there's a surprisingly high chance your car runs kubernetes btw. like inside the car.

4 months ago 263 16 13 6
Advertisement

cursed idea: semantic whitespace for function application

f g(h) -> apply f to g(h)
f g (h) -> apply f g to h
or even
f g h -> apply f to g h

4 months ago 0 0 0 0

regex polyfill

4 months ago 0 0 0 0

oh, that character there is genocide guy, he's kind of a fan favorite. the one next to him, though, that's the one everyone hates, she was rude once.

4 months ago 3354 1307 30 98
osu! world cup finals, poland vs usa (two top seeded teams) 6-6, leading to a tiebreaker

osu! world cup finals, poland vs usa (two top seeded teams) 6-6, leading to a tiebreaker

peeeeeak

4 months ago 0 0 0 0

it's okay i'm not completely gone yet only the first 28 moves are valid and then i misremember the board state, and also third move should be 6 instead of 9 in order to get an optimal solution

4 months ago 0 0 0 0
a screenshot of the wikipedia page on the 15 puzzle, showing a random position that i'm describing a (fairly optimal but probably not 100% perfect) solution to

a screenshot of the wikipedia page on the 15 puzzle, showing a random position that i'm describing a (fairly optimal but probably not 100% perfect) solution to

i hate that i see this and immediately go “oh yeah 13, 10, 9, 5, 8, 4, 3, 14, 10, 9, 5, 9, 4, 3, 8, 5, 6, 11, 12, 1, 2, 4, 3, 15, 4, 3, 15, 8, 15, 11, 12, 7, 6, 5, 11, 12, 7, 6, 5, 9, uuh i forgot”

4 months ago 0 0 1 0

eva piloting for dummies

4 months ago 0 0 0 0
soundcloud displaying a track's "top fans", with me with 599 plays followed by people with resp. 25, 11, 7, 7 plays

soundcloud displaying a track's "top fans", with me with 599 plays followed by people with resp. 25, 11, 7, 7 plays

minor gap

4 months ago 0 0 0 0
Advertisement

the more I learn about cryptography the more I think Alice and Bob should probably just talk in person

1 year ago 468 116 11 2
Preview
rrr.js GitHub Gist: instantly share code, notes, and snippets.

yours is too enterprise ready for my liking, wrote my own gist.github.com/chayleaf/118...

4 months ago 1 0 0 0

how did they manage to make nulls even more broken

4 months ago 0 0 0 0

omg i just somehow ran into a situation where NullReferenceException was being thrown even after a null check??? sure c# whatever you say i'll just use a try catch...

4 months ago 0 0 1 0

currying may feel like a gimmick but when the argument you're passing is non-trivial (like the result of calling a function) they can actually give you performance savings for free (can be emulated by storing that result into a captured variable but that's much more boilerplate)

4 months ago 1 0 0 0

This Pluribus ad on a fridge caused a schizophrenic woman named Carol to be hospitalized.

4 months ago 6881 2999 150 317

shortened to just z←0◊z+50=100|{z←z+50=100|⍵◊⍺+⍵}/⌽{(⍎1↓⍵)×1-2×⍵[1]="L"}¨(x≠"\n")⊂x←⎕FIO[26]"01.txt"

4 months ago 0 0 0 0

aoc day 1

a←⌽,⍉⊃{(⍎1↓⍵)×(1-2×⍵[1]="L")}¨((x≠"\n")⊂x←⎕FIO[26]"01.txt")◊z←0◊z←z+50=100|{z←z+50=100|⍵◊⍺+⍵}/a◊z

can i go home please 🥺

4 months ago 0 0 1 0

dsls should be graphical not just textual programmers are so boring

4 months ago 0 0 0 0

oh wow i got yuri'd

4 months ago 1 0 0 0
Advertisement

maybe i should do advent of code in apl... time though...

4 months ago 2 0 1 0
New AI slop signal: code blocks with weird indentation The newest post on Xe Iaso's blog

New AI slop signal: code blocks with weird indentation

https://xeiaso.net/notes/2025/slop-signal-indentation/

4 months ago 18 3 2 0
God only knows
God only knows YouTube video by Oratorio The World God Only Knows - Topic

god only knows (a great opening from a bad anime) has a line "anyone could be a hero and heroine", it always felt very trans coded to me (probably unintentional but i couldn't care less)

youtu.be/iYP5EzO9lJE at 3:44

4 months ago 1 0 0 0