<joelteon>
it's saying "i can't find an overload for << that takes these two arguments"
<joelteon>
it doesn't mention what type the arguments are or what the return type should be
<joelteon>
and the reason it can't find an overload is because one of the arguments is a type error
<ELLIOTTCABLE>
so much to learn ugh
<ELLIOTTCABLE>
so google's bugging me again
<joelteon>
but good luck figuring that out
<ELLIOTTCABLE>
and I'm thinking of giving in ...
<devyn>
._.
<ELLIOTTCABLE>
I wonder how much I'd hate myself, working in Java or Python all day ...
<ELLIOTTCABLE>
but. tick-mark for my resume.
<joelteon>
i hate myself writing python all day
<ELLIOTTCABLE>
and they have a Chicago office. wouldn't need to move again.
<joelteon>
it's so not good
<joelteon>
alexgordon loves python
<joelteon>
i don't think there exists a person in the world whom i disagree with about more things
<joelteon>
than alexgordon
<joelteon>
he's cool though
* ELLIOTTCABLE
laughs
<devyn>
I've tried to use python a bit, and honestly it feels like Ruby done completely wrong in every way it could be done wrong
<ELLIOTTCABLE>
you both write haskell.
<alexgordon>
joelteon: I like writing python on my own
<alexgordon>
joelteon: for the kinds of things I use python for
<joelteon>
i know alexgordon, i just think it's funny how much our opinions differ
eligrey has joined #elliottcable
<alexgordon>
but I don't believe it's suitable for a day job
<alexgordon>
devyn: wtf?
<joelteon>
if someone wanted my opinion on something, they could probably ask you what you think about it, then do the exact opposite
<alexgordon>
devyn: then you haven't experienced the POWER of generators
<joelteon>
alexgordon: how do you feel about pizza
<alexgordon>
joelteon: honestly? don't like it
<joelteon>
lol...like clockwork
<purr>
lol
<joelteon>
i like pizza
<alexgordon>
can't stand stringy melted cheese
<ELLIOTTCABLE>
devyn: what about generators? huh?
<alexgordon>
I don't really like dairy stuff in general, I think I was born on the wrong continent
<ELLIOTTCABLE>
idk python, 'splain
<ELLIOTTCABLE>
joelteon: do you like dogs?
<joelteon>
ruby has "generators"
<joelteon>
yes
<alexgordon>
it doesn't really
<ELLIOTTCABLE>
alexgordon hates dogs.
<ELLIOTTCABLE>
alexgordon, we can't be friends.
<alexgordon>
ELLIOTTCABLE: nah dogs are OK
<joelteon>
no, it definitely has "generators"
<alexgordon>
ELLIOTTCABLE: I wouldn't want a pet dog though, too lazy
<ELLIOTTCABLE>
I HATE
<ELLIOTTCABLE>
everything.
<joelteon>
in a couple months i'm going to be able to afford a russian domestic fox
<joelteon>
i'm really excited
<devyn>
alexgordon: Ruby's Enumerators are exactly like generators, and then there's also block syntax which generalizes this whole thing and makes it way simpler
<devyn>
instead of needing list comprehensions
<ELLIOTTCABLE>
I miss Ruby v.v
<ELLIOTTCABLE>
i *hate* comprehensions.
<alexgordon>
devyn: they're not really
<joelteon>
so generators are like infinite lists, but you have to put some extra pipelining on it, right?
<ELLIOTTCABLE>
only place I'm familiar with them is CoffeeScript, so maybe they're less terrible elsewhere; but just, fucking ew.
<alexgordon>
joelteon: no, generators are a limited form of co-routines
<devyn>
yes, which is exactly what you can do with lazy enumerators
<devyn>
I know how it works
<devyn>
lol
<joelteon>
alexgordon how do you feel about foot ball
<alexgordon>
joelteon: I love it! when it's not on
<joelteon>
yeah that one's a little more common
<joelteon>
learnt not to bring it up
<ELLIOTTCABLE>
alexgordon, joelteon: penises?
<joelteon>
i like mine
<ELLIOTTCABLE>
I truly hate trying to do cross-platform development. This is hellish. /=
<joelteon>
you mean other peoples'?
<ELLIOTTCABLE>
of course. it was plural.
<joelteon>
no
<alexgordon>
devyn: how would you write say zip(*d.iteritems()) ?
<alexgordon>
in ruby
<joelteon>
whats that do
<ELLIOTTCABLE>
ditto
<devyn>
yeah, explain that first
<alexgordon>
joelteon: takes a dictionary and returns a list of keys and a list of values
<joelteon>
if you call it on an array, the contents of the array are in memory
<joelteon>
how is space complexity relevant
<devyn>
yeah, that wouldn't make a difference in Python either, alexgordon
<devyn>
if you call it on an array, obviously you need the array first
<devyn>
lol
<devyn>
alexgordon: now, if you're talking about lazy map, that's what Enumerator::Lazy provides; you can map over an enumerator without actually mapping the entire thing first
<devyn>
and other such functions
<devyn>
filter etc.
<devyn>
(well #select)
<joelteon>
i have tried to 'filter' a ruby array so goddamn many times
<ELLIOTTCABLE>
jesus christ devyn, is there any language you *don't* know in intimate detail
<devyn>
alexgordon: (1..Float::INFINITY).lazy.filter_map{|i| i*i if i.even?}.first(5)
<joelteon>
'select' is such a stupid name
<alexgordon>
devyn: yeah... now do iteritems
<joelteon>
...
<joelteon>
{a: 1, b: 2}.to_enum
<devyn>
alexgordon: I need you to explain that a bit more; it looks like the * actually makes it unzip instead of zipping
<alexgordon>
devyn: yeah probably
<alexgordon>
devyn: but not the point :P
<devyn>
okay, so first of all, what does iteritems() provide
<devyn>
generate
<ELLIOTTCABLE>
CoverageError: Could not parse n\b\n\b\t\f\foo.coffee: [stdin]:1:1: error: unexpected //
<ELLIOTTCABLE>
n\b\n\b\t\f\foo.coffee
<ELLIOTTCABLE>
n\b\n\b\t\f\
<alexgordon>
devyn: it enumerates over (key, value) tuples of the dictionary
<devyn>
alexgordon: okay, so, iteritems() is definitely equivalent to just Hash#each then... the problem with translating your exact example to Ruby is that there doesn't appear to be any lazy unzip, but you could easily implement it... in any case, that seems like a pretty contrived example, so think of something a bit more useful :p
<alexgordon>
devyn: I can't because code snippets small enough to post into IRC are never useful
<devyn>
alexgordon: h.to_a.transpose would do what that does though, just using about double the space I think
<alexgordon>
devyn: all I can say is, python's generators are very useful
<joelteon>
so zip performs an unzip?
<alexgordon>
joelteon: aren't they the same?
<joelteon>
if they were, i wouldn't be asking
<alexgordon>
they're the same
<joelteon>
quickCheck (\ x -> zip x == unzip x)
<joelteon>
wait no
<joelteon>
that doesn't make sense
<joelteon>
that won't even typecheck
<devyn>
alexgordon: zip and unzip are definitely not the same lol
<purr>
lol
<joelteon>
unzip is, strangely enough, the inverse of zip
<devyn>
alexgordon: Python for some reason treats zip(*...) as unzip(...) and I'm not really sure why
<devyn>
alexgordon: gotta look up what * means
<alexgordon>
devyn: transpose is an involution
<joelteon>
zip [a,b] [c,d] is [(a,c),(b,d)]
<alexgordon>
devyn: * means "as arguments"
<alexgordon>
devyn: it's the same in ruby
<joelteon>
unzip [(a,c),(b,d)] is ([a,c],[b,d])
<ELLIOTTCABLE>
ugh no idea wat am doin' rong her
<joelteon>
no, [a,b],[c,d]
<joelteon>
my mistake
<joelteon>
my examples aren't very helpful when i keep typing wrong
<alexgordon>
joelteon: ok but python doesn't have currying
<devyn>
alexgordon, joelteon: oh okay, so I see, basically it's taking that generator as an argument stream to zip()
<joelteon>
my brian hurts
<devyn>
so basically, d.iteritems() to [('a',1),('b',2)] to zip(('a', 1), ('b', 2))
<devyn>
which obviously would result in [('a','b'), (1,2)]
<joelteon>
that's so weird
<devyn>
yeah, seems pretty weird to me too
<alexgordon>
it is weird
<alexgordon>
but I guess they wanted to support
<alexgordon>
zip(a, b)
<devyn>
well really it works because zip can take any n
<devyn>
zip(a, b, c, d...)
<devyn>
and then that combined with the *
<devyn>
basically turns that into unzip
<devyn>
*why* they chose to do it that way, I have no idea
<devyn>
seems weird
<alexgordon>
devyn: like I said, they wanted to have the two-list version as
<alexgordon>
zip(a, b)
<alexgordon>
not zip([a, b])
<alexgordon>
so it was a concession to the norm
<devyn>
no, *that* part makes sense, but why they don't have unzip() instead of doing zip(*...)
<devyn>
but I guess it's the whole 'there should only be one way to do things'
<alexgordon>
devyn: one and only one (preferably obvious) way to do it
<devyn>
even when clarity suffers
<devyn>
lol
<purr>
lol
<devyn>
yeah
<alexgordon>
hey this is the language that got rid of reduce() and sort comparators
<alexgordon>
;P
<devyn>
that whole philosophy is my biggest thing about Python
<devyn>
against*
<devyn>
Ruby has all kinds of redundancy that makes code look way nicer
<devyn>
anyway, gtg, bbiab
<devyn>
ELLIOTTCABLE: oh and yeah I tend to learn the languages I like in pretty ridiculous detail haha... I probably still know Ruby the best of any of the languages I know
<ELLIOTTCABLE>
oh, really?
<joelteon>
i like ruby
<ELLIOTTCABLE>
I always thought of you as a Haskell-born.
<ELLIOTTCABLE>
We should mutually masturbate about metasingletons sometime.
<joelteon>
eigenclasses?
<ELLIOTTCABLE>
orthogonal, actually.
<ELLIOTTCABLE>
I remember a project where I meaningfully had to handle, uh, if I recall this correctly,
<ELLIOTTCABLE>
a meta-metasingleton meta-eigenclass?
<ELLIOTTCABLE>
or something?
<ELLIOTTCABLE>
maybe an extra meta- in there.
<joelteon>
there's no reason to do that
<ELLIOTTCABLE>
there was a reason.
<ELLIOTTCABLE>
trying to find the code now.
<ELLIOTTCABLE>
was a part of my 'refinery' gem, which I never managed to complete to my satisfaction
<ELLIOTTCABLE>
I think I rewrote that tiny little single-purpose library at *least* five times?
<ELLIOTTCABLE>
hm. can't find any of it.
<ELLIOTTCABLE>
none of my work appears to have ever made it into the one git repository I can find for that project.
<ELLIOTTCABLE>
lol, elliott-as-a-developer in the mid 2000's.
<purr>
lol
<ELLIOTTCABLE>
ooo, here's some specifiations for it.