<whitequark>
as you can see llvm just constant-folded that shit completely
<joelteon>
neat
<whitequark>
yup
* whitequark
is refactoring the goddamn compiler again
<whitequark>
it's like, since its inception I've wrote 60k lines
<whitequark>
then erased the fuck out of 50k of them
yorick has quit [Remote host closed the connection]
<joelteon>
is it Sufficiently Clever yet?
<devyn>
whitequark: haha. can it gets.to_i (or rather, to_u32) yet? I wanna see what it generates when it can't constant fold
<whitequark>
devyn: there's no gets or string
<whitequark>
but it's about the same as atoi(gets())
<whitequark>
would be.
<whitequark>
also yes, I'm sort of pissed off at LLVM
<whitequark>
so far it folded down *every*single*program* I wrote into a set of constants
<whitequark>
YOU ARE A COMPILER Y U NOT EMIT CODE
<whitequark>
oh, no, actually mandel.fy is a whole one function
<devyn>
that's a good thing if there's no user input, isn't it? if it decides a constant is smaller and will require less work, then it should just do that
<whitequark>
sure, I was joking
<devyn>
:p
<devyn>
whitequark: maybe do something that generates a large data structure so that it won't constant fold it
<whitequark>
devyn: well, it doesn't fold mandelbrot
<whitequark>
and I can tweak the optimization params anyway
<whitequark>
so it doesn't matter very much
<devyn>
mmm yes but I want to see some actual IR :(
<whitequark>
if you look at it, there's like dozens of duplicated functions
<whitequark>
it's correct though.
<whitequark>
F5 it, I added the source
<whitequark>
LLVM will actually optimize it to the C level, even though the input is horrible
<whitequark>
LLVM rocks
<joelteon>
holy jesus
<joelteon>
what's going on
<devyn>
whitequark: I ran it and it works :p
<whitequark>
devyn: of course
<devyn>
whitequark: ran it through opt -O3 and the IR went from 2774 lines to 1306 lines
<whitequark>
try opt -std-link-opts
<whitequark>
and perhaps -mergefunc
<devyn>
whitequark: woo, that got it down to 166 lines
<devyn>
and the IR is pretty crazy looking
<whitequark>
exactly
<joelteon>
I need to find a use for the mouse operator <>~
<devyn>
in what? lol
<purr>
lol
<joelteon>
in anything
<joelteon>
maybe some kind of
<joelteon>
regular expression library
<joelteon>
but it combines <> and ~, so
<joelteon>
..."append match"
<whitequark>
wat
<joelteon>
<> is mappend
<joelteon>
and ~ is ruby and perl for regex
<whitequark>
it's not
<whitequark>
=~ is
<joelteon>
it totally is
<joelteon>
=~
<joelteon>
yeah, but = is everything
<joelteon>
~ is specifically regex
<whitequark>
~foo is unary negation
<whitequark>
er, bitwise
<joelteon>
but it's ALSO regex
<whitequark>
oh god.
<joelteon>
and bitwise ops in haskell look totally different
* whitequark
wrote down a type for Assoc.fold2
* whitequark
feels dirty.
<whitequark>
val fold2 : f:(string -> 'c -> 'a -> 'a -> 'c) -> 'c -> ('a, 'b) t -> ('a, 'b) t -> 'c
<whitequark>
I *hate* fold.
<whitequark>
I can never write down its signature or arguments the first time correctly.
<joelteon>
yeh, fold is very unintuitive for me
<joelteon>
even though it really shouldn't be
<devyn>
foldl :: (a -> b -> a) -> a -> [b] -> a, foldr :: (a -> b -> b) -> b -> [a] -> b
<devyn>
it's not that hard
<devyn>
:p
<devyn>
(watch, I probably got foldr wrong)
<devyn>
nope
<devyn>
lol
<purr>
lol
<devyn>
^_^
<joelteon>
you know what's a clusterfuck
<joelteon>
the new Data.Typeable
<devyn>
it changed?
<joelteon>
Typeable{1..7} don't exist anymore
<joelteon>
Typeable is poly-kinded
<devyn>
how does that work? o.o
<joelteon>
well, that's a GREAT question
<joelteon>
I have no idea
<joelteon>
cabal sandbox is neat though
<joelteon>
i have only positive things to say about it
<devyn>
xmonad multimonitor is excellent for development guys
<devyn>
especially if you actually take the time to configure it
<joelteon>
i'm sure it is jerry
<devyn>
also, unclutter, which hides the mouse pointer when you're not using it
<whitequark>
I never understood multimonitor
<whitequark>
maybe it's good for web developers
<whitequark>
I'm completely OK with desktops, if I can switch two most recent with a keybinding.
<devyn>
I like having IRC + music player most of the time on my secondary monitor, but sometimes it's useful for web stuff, yes
<devyn>
really the secondary monitor, for me, is a monitor in the literal sense
<devyn>
it's for monitoring things
<devyn>
good for documentation, actually, too
<devyn>
that's another use
<vil>
^
<vil>
my main screen is what I'm doing, secondary is status stuff and twitter
<devyn>
yeah
<devyn>
anyway I really like the way xmonad does it, because it treats workspaces as single screens which you can just flip between screens as much as you want
<devyn>
if I have a workspace on my primary that I want to display on secondary instead, I just open that workspace on secondary