<devyn>
well the one on GitHub is a lot more readable haha
<joelteon>
it sure is
<joelteon>
i don't even understand how find works
<joelteon>
seriously dont
<joelteon>
but the one on github is written retardedly
<joelteon>
it's like
<joelteon>
"take this word, find every possible list of coordinates that contain those letters, then figure out which ones are paths"
<devyn>
what do you mean you don't understand how find works? it's just like Ruby's Array#find
<joelteon>
no
<joelteon>
the find i defined as part of search
<joelteon>
in the gist
<devyn>
ah lol
<purr>
lol
<joelteon>
and the one in the gist is "take this letter and the next one, figure out whether any of the neighboring tiles have the next letter, and if not then bail"
<joelteon>
and it's about 5x slower
<devyn>
apparently I didn't have profiling libs installed
<devyn>
so.... sigh, doing that
<cuttle>
devyn, joelteon: laziness can alleviate that problem with lists and monads
<cuttle>
laziness can prevent you from blowing up in recursion
<joelteon>
sure i guess
<cuttle>
and also if the compiler knows +5 is associative, it can do TCO. I know Refal does that with list-consing
<cuttle>
but i mean that's not really a general solutoin
<cuttle>
"suffiently advanced compiler" is not a good thing to rely on
<devyn>
yes
<devyn>
joelteon: wait so this gist is the new one? I thought you weren't using the list monad anymore
fwg has quit [Ping timeout: 272 seconds]
<joelteon>
no, i started using the list monad
<joelteon>
the old one uses a weird state monad thing
<devyn>
ahh
<devyn>
heh
<devyn>
hm
<devyn>
isNeighbor (x,y) (a,b) is True even if (x,y) == (a,b)
<devyn>
that should most likely be False
<devyn>
?
<joelteon>
whoops
<joelteon>
ok, fixed that
<joelteon>
it was not The Solution though
<devyn>
yes I know
<devyn>
still looking
<devyn>
joelteon: ok so is the whole point to find a path through the grid to make a word?
<joelteon>
yes
<joelteon>
REALLY FAST
<devyn>
:p
fwg has joined #elliottcable
fwg has quit [Ping timeout: 260 seconds]
* whitequark
was dreaming about a cat who got a concussion and perhaps something worse
<whitequark>
I wanted to call an ambulance so I put him into the fridge to minimize damage
<devyn>
o_O
<whitequark>
but then actually forgot about it
<whitequark>
so I opened it in about a day, and voila, the cat was fine!
<devyn>
I love dreams
<whitequark>
also there was a fragment about Swiss embassy being located on top of a 1000-ft pole, inside which there was a gigantic arms exhibit
<whitequark>
I'm not sure how was it related, but *it was*
<devyn>
hahaha, I feel like I've had a similar dream, about a building on top of a pole
<whitequark>
ooooh and you had to weld your hard drive to thousand others in order to pass it through
<whitequark>
on that fucking pole
<whitequark>
...
<devyn>
wat
<whitequark>
exactly
<whitequark>
it even had a name there, "nettle"
<whitequark>
what the fuck does that even mean, let me look it up
<whitequark>
...
fwg has joined #elliottcable
devyn changed the topic of #elliottcable to: 22:53:14 <+whitequark> also there was a fragment about Swiss embassy being located on top of a 1000-ft pole, inside which there was a gigantic arms exhibit
<whitequark>
and by gigantic I mean, just like in game of thrones
<whitequark>
even though I don't quite recall whether there *was* a gigantic arms exhibit there, you still see what I mean
<devyn>
so the swiss are preparing for air warfare by throwing knives
<joelteon>
i had a dream where i was in breaking bad, but it had an alternate ending
<joelteon>
i lived on a beach
<joelteon>
at the end of the show, a bunch of aliens showed up and started killing everyone
<joelteon>
well, not aliens
<joelteon>
but like
<joelteon>
well, i assume they were aliens
<joelteon>
they were all in big ships
<joelteon>
and the military tried to kill them but
<joelteon>
it didn't work out
<joelteon>
i lived with some woman on the beach, and one time i think i got in trouble or something
<joelteon>
oh no, wait, her house got robbed by like 5 people
<whitequark>
you should have put your cat in the fridge
<joelteon>
and they found me in it, tied me up, and left me in there
<whitequark>
that never goes wrong
<joelteon>
for 18 hours
<joelteon>
and stole all her shit
<joelteon>
and as a punishment for letting them steal her shit
<joelteon>
she knocked me out with drugs and took me to the hospital and had my anus surgically removed
<devyn>
if you had put your cat in the fridge
<joelteon>
and then after that i went to go live with my dad
<devyn>
perhaps she wouldn't have removed your anus
<joelteon>
and for some reason I was *really* mad at him
<joelteon>
for losing my anus
<joelteon>
and using a colostomy bag
<joelteon>
so i ran away
<joelteon>
ended up on a highway
<joelteon>
that's when the aliens showed up and started killing everybody
<joelteon>
i'm not making any of this up
<joelteon>
longest, weirdest, most emotionally intense dream i've ever had
<whitequark>
when I was eight or something, I dreamed that I was awake, and accidentally pulled my guts out, under the blankets
<whitequark>
and then someone asked me to go somewhere, and I started making up excuses, because I was afraid of punishment
<whitequark>
it was weird
fwg has quit [Ping timeout: 240 seconds]
fwg has joined #elliottcable
<whitequark>
cuttle: re llvm-general, wanna talk about it?
<devyn>
joelteon: ok, I've thought of a way to make this TCO-friendly
<devyn>
writing it now
<joelteon>
ok
<devyn>
joelteon: it's way faster now. I'm just verifying that I haven't done anything done
<devyn>
dumb*
<joelteon>
i'm pretty sure i'm retarded
<devyn>
how so?
<joelteon>
because you made it way faster
<devyn>
yeah but I had to basically rewrite it
<devyn>
it's just a different algorithm
<devyn>
that's all
<joelteon>
ok
<joelteon>
sooooooooooooooooooooooooooooo
<joelteon>
maybe i'll one day see it
<devyn>
joelteon: I'm going to gist it lol just wait
<purr>
lol
<devyn>
I'm just checking it over
<joelteon>
ok
<devyn>
joelteon: how long does it take your old one to do the same thing? the one on GitHub?
<joelteon>
.208 seconds or something
<joelteon>
i think
<devyn>
oh :/ this doesn't come anywhere near that
<devyn>
AMD FX-8320 running at stock, which I think is 3.1 GHz
<devyn>
FX-8120*
<devyn>
not 8320
<devyn>
oops
<joelteon>
ok
<joelteon>
well
<joelteon>
huh
<joelteon>
amazing how that happened
<devyn>
joelteon: if you run it several times does it change?
<joelteon>
yeah it hovers around .410
<devyn>
and the old one is definitely .208 on the exact same grid and dictionary?
<joelteon>
yep
<joelteon>
it also has a very minor IO overhead because it has to read the grid from stdin
<devyn>
ok... I'll see whether I can do better, then
<joelteon>
i know right
<joelteon>
wtf
<devyn>
21:37:50 <+joelteon> "take this word, find every possible list of coordinates that contain those letters, then figure out which ones are paths"
<devyn>
I really, really don't see how that could possibly ever be faster
<joelteon>
me neither
<joelteon>
maybe that's not what i'm doing
<joelteon>
i must be crazy
<joelteon>
actually, not only that, but unscramble also sorts the words by descending score
<devyn>
ditching Set brought it down very, very slightly
<devyn>
lol
<purr>
lol
<devyn>
oooooh
<devyn>
I got something!
<devyn>
adding walk [] _ = Nothing as a special case
<devyn>
brought it down about 0.1 second
<devyn>
wtf, GHC. in what world is specifying every single possible neighbor and then testing equality just as fast as doing it mathematically
<devyn>
it should be slower
<devyn>
o_O
<whitequark>
maybe it just sucks at math
<devyn>
nah, I'm just suspicious of the abs function
<devyn>
yeah, getting rid of abs seems to have helped. probably was causing an actual function call
<cuttle>
time to learn plain old llvm for real now
<whitequark>
"yay, it's just five files, that's nice!"
<cuttle>
whitequark: hm?
<whitequark>
"oh fuck every single one of those is 100KB of C spaghetti"
<whitequark>
cuttle: hm? ?
<whitequark>
I'm porting rust to bare metal
<whitequark>
pxList->xListEnd.pxPrevious = ( xListItem * ) &( pxList->xListEnd );/*lint !e826 !e740 The mini list structure is used as the list end to save RAM. This is checked and valid. */
<whitequark>
-_-
<devyn>
whitequark: jesus, you aren't kidding
<cuttle>
haha awgh
<devyn>
looking at it now
<whitequark>
well, it's not bad really, it's mostly whitespace and comments
<whitequark>
freertos is pretty simple both conceptually and internally