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
<devyn> linux's container_of() macro is brilliant
fwg has quit [Ping timeout: 246 seconds]
<whitequark> it's pretty horrible though
<whitequark> y u looking at linux?
<devyn> looking at how they do rbtrees
<devyn> and it's not even really necessary in this case
<devyn> (container_of)
<devyn> they use it anyway but really you don't need to
<whitequark> I actually wonder if this is legal
<whitequark> because I'm pretty sure this violates C aliasing rules
<whitequark> "A pointer value is associated with the addresses associated with any value it is based on."
<whitequark> my brain hurts.
<whitequark> but it seems that yes, that kind of hackery is indeed legal.
<devyn> anyway, it isn't really necessary in rbtree's case; if the node struct is the first member of your container struct, then you should just be able to cast
<whitequark> right, it's basically the same case as &arr[1] - 1
<whitequark> that is legal, so container_of should be legal too
<whitequark> ... I think.
<devyn> ...yes I think that makes sense
<whitequark> time to join ##c!
<whitequark> (not actually)
<devyn> from what I've heard of ##c, someone will immediately beat you over the head and verbally abuse you for not knowing, and tell you to RTFM
<devyn> and then maybe if you're lucky, and hour later someone nicer will come along
<alexgordon> ...and that person will be elliott
<alexgordon> O_O
<ELLIOTTCABLE__> D'awwwww
<alexgordon> HOLY SHIT IT'S THE PROPHET
<whitequark> devyn: you see, I would have no problems doing the exact same thing back, toghether with an incorrect interpretation of the standard
<devyn> heh
<alexgordon> I still don't understand what container_of does
<alexgordon> and I just read two articles about it
<whitequark> which will hopefully enrage the other party either until they have a stroke, or to the point when they actually explain shit
<ELLIOTTCABLE__> Love you too, alexgordon
<whitequark> alexgordon: struct { int x; int y; } s;
<whitequark> given &s.y, get &s
<alexgordon> ah
<devyn> alexgordon: if you have a struct, and its contained in memory within another struct, container_of will give you the container struct by subtracting the offset
<devyn> and casting
<joelteon> that's cool
<alexgordon> whitequark: this immediately begs the question: why, just why?
<whitequark> devyn: that was too many words
<devyn> because kernel
<devyn> whitequark: heh
<whitequark> alexgordon: because you can then pass one pointer
<alexgordon> why not pass the outer pointer -_-
<whitequark> that would not violate the abstraction
<whitequark> too clean :p
<alexgordon> haha
<whitequark> actually though, linux has a lot of uses of the pimpl pattern
<alexgordon> also I too thought this was illegal
<whitequark> you know what that is, right?
<devyn> alexgordon: in the case of rbtree, it allows it to be implementation-independent, so the rbtree handling code just handles what it knows, and gives you what it knows, and then you get what you need from outside of it
<devyn> although... container_of is really not necessary
<whitequark> so container_of allows you to get the public wrapper based on just the private implementation
<whitequark> it's pretty tame actually, there is an 1:1 correspondence between those two
<whitequark> always
<devyn> yeah
<whitequark> well, tame in kernel context
<alexgordon> remind me never to write a kernel
<alexgordon> or at least, not in C ;)
<whitequark> don't ever do that
<devyn> I am doing that :(
<alexgordon> write a kernel in C, write a kernel not in C, or either?
* whitequark goes back to figuring out how to write a kernel in rust
<alexgordon> OMG GUYS. FURROW. KERNEL
<alexgordon> lulz
<alexgordon> slightly less insane than a haskell kernel
<devyn> lol
<purr> lol
<alexgordon> at least there's no GC :P
* devyn coughs
<devyn> House
<whitequark> alexgordon: haskell kernel has been done
<alexgordon> or language for that matter
<whitequark> for x86
<alexgordon> no furrow compiler exists: it'll be the fastest kernel ever
<whitequark> well, not haskell, a dialect of haskell: habit
<whitequark> it mainly differs in being strict
<alexgordon> sounds like my kinda language
<whitequark> why the FUCK it uses comic sans ms
<devyn> that's in a presentation image
<devyn> and I have no clue
<devyn> > ICFP'05
<devyn> 2005.
<devyn> Comic Sans was hot shit in 2005.
* whitequark sighs
<whitequark> at the morning I explained llvm-general to cuttle
<whitequark> now I'm reading a kernel in haskell
<whitequark> I have never ever launched ghc in my life, why the fuck I know this language
<whitequark> or more likely, I actually just know llvm and osdev
<whitequark> and the rest I'm blissfully ignorant about
<whitequark> still, it's kinda easier to figure out than I expected
<alexgordon> whitequark: bitch, I am the KING of comic sans MS
yorick has quit [Remote host closed the connection]
<cuttle> ELLIOTTCABLE__:
<cuttle> ELLIOTTCABLE__: want to design a syntax
<cuttle> alexgordon: or you
<cuttle> whitequark: or you
<cuttle> devyn: or you
<ELLIOTTCABLE__> lol
<purr> lol
* joelteon crosses fingers
<alexgordon> cuttle
<alexgordon> cuttle: I am the king of comic sans, and syntax
<joelteon> i'm the king of carrot flowers
<alexgordon> cuttle: that must be the least trusthworthy thing I've ever said
<ELLIOTTCABLE__> comic sans tax
<cuttle> hahaha
<cuttle> ok so I want to design a syntax for multimethods
<cuttle> I don't want it to look like ruby or io with a.f(b, c) because that privileges the first argument
<cuttle> I don't want it to look like lisp, but I'm holding out hope for something that doesn't look like f(a, b, c) and ideally doesn't syntactically privilege infixes
<cuttle> I should probably give up on the non-privileged infixes but
<cuttle> I kind of want something other than f(a, b, c)
<cuttle> like, a postfix/infix thingy like smalltalk
<alexgordon> ah, interesting
<alexgordon> well
<alexgordon> how about picking a special case: bimethods first
<alexgordon> then extrapolate a solution to n-ary methods
<alexgordon> bimethods sounds kinky
<cuttle> lol
<purr> lol
<joelteon> whats a multimethod
<alexgordon> like I always think about zip
<cuttle> joelteon: you know how when you have a class A with a method f, and B and C subclass A and override f
<joelteon> yes
<cuttle> then b.f() and c.f() call different methods
<joelteon> yes
<alexgordon> ([1, 2, 3], [7, 8, 9]).zipWith(f)
<cuttle> well, in effect, f has one argument, and there are 3 versions of f, and a runtime decision is made based on the type of f's argument
<alexgordon> is a shit syntax
<cuttle> well, what if you write it like this
<cuttle> f(a) instead of a.f()
<cuttle> and then you extend that to multiple arguments
<cuttle> and classes Y and Z extend class X
<cuttle> and you have f(b, y) and f(c, z) and the other two combinations
<cuttle> and those are all different versions of f that are chosen at runtime
<cuttle> based on the argument types
<cuttle> alexgordon: right yeah
<cuttle> I like [1, 2, 3] zipWith(f) [4, 5, 6]
<cuttle> which is basically APL/J/etc.
<cuttle> although zipWith is implicit, but there are adverbs that go in the middle like that
<alexgordon> though I suppose the real solution is
<alexgordon> f.zipWith([1, 2, 3], [4, 5, 6])
<cuttle> hm
<alexgordon> ok how about something else
<cuttle> i want an unordered smalltalk keyword arguments thing
<alexgordon> mathematica has a function called
<alexgordon> erm
<devyn> [1, 2, 3] \f/ [4, 5, 6]
<devyn> :D
<alexgordon> should be o since it's an operator
<cuttle> devyn: are you deriving that from J
<alexgordon> [1, 2, 3] \o/ [4, 5, 6]
<cuttle> devyn: since in J, 1 2 3 +/ 4 5 6 is literally a thing
<devyn> yeah I know
<cuttle> ok :p
<alexgordon> so in mathematica
<alexgordon> inner(f, xs, ys, g) = fold f $ zipWith g xs ys
<alexgordon> ?
<joelteon> heh
<joelteon> wordpress is pretty bad
<joelteon> are there any decent, moron-usable blogging engines that aren't wordpress
<alexgordon> wait it's the other way around
<alexgordon> stupid mathematica, I'm always getting this wrong
<alexgordon> inner(g, xs, ys, f) = fold f $ zipWith g xs ys
<alexgordon> in my pseudo-haskell
<alexgordon> anyway point is, this is ideal for your syntax example cuttle
<alexgordon> because there's actually two members of each type
<alexgordon> two functions, and two lists
<devyn> though really... why not just allow as many args on either side, like 1 2 3 [[zipWith] f] 4 5 6 or something
<alexgordon> I've always wanted to make a language where . wasn't the only combinator
<alexgordon> e.g. you have
<alexgordon> f(x)
<alexgordon> but you can also do
<alexgordon> x.f()
<alexgordon> right?
<alexgordon> ok but then you have other things like . for map, fold, filter, etc
<alexgordon> e.g. x./f for map
<alexgordon> x.?pred for filter
<devyn> honestly alexgordon just go learn J
<cuttle> haha
<alexgordon> devyn: fuck languages without infix notation
<cuttle> alexgordon: j is entirely infix
<cuttle> alexgordon: every function is both prefix and infix
<alexgordon> does it have precedence?
<cuttle> no
<alexgordon> fuck it
<cuttle> everything is right associative
<alexgordon> I copy and paste equations from google
<alexgordon> I expect it to *work*
<devyn> really, who does that
<cuttle> quitely honestly I'd prefer my ideal syntax to have no precedence
<alexgordon> 2*3+4*5 is 26 god fucking dammit
<cuttle> either infix is privileged or there's no precedence
<devyn> I try to avoid patterns like 2*3+4*5
<alexgordon> devyn: my reaction to that: "silly programmers."
<devyn> or if it really does look cleaner I'll write it 2*3 + 4*5
<alexgordon> if there's one thing I know, it's that mathematicians are smarter than programmers (except haskell programmers who are mathematicians)
<alexgordon> and *they* use precedence and infix notation
<alexgordon> so there must be something to it. if it was a problem, they would use something else
<devyn> ok I'll admit to using precedence and infix notation in haskell
<devyn> :p
<cuttle> alexgordon: mathematicians aren't smarter than programmers when designing machine-parsable syntaxes
<devyn> I still think predecence rules should be minimal
<alexgordon> not only mathematics though. pretty much every human written language
<alexgordon> I feel that precedence and infix is very "human"
<alexgordon> english isn't stack based
<cuttle> alexgordon: also the first mathematican who designed a syntax was Ken Iverson who got us APL
<cuttle> and removed precedence
<cuttle> so there you go
<alexgordon> cuttle: yeah but I bet all his mathematics papers still used infix notation
<devyn> alexgordon: well there are languages that are much less dependent upon such things
<alexgordon> devyn: true
<devyn> and they're generally considered to be less ambiguous
<alexgordon> like chinese
<devyn> mandarin is still SVO
<alexgordon> it still has less structure than european languages
<devyn> structure, done right, generally removes ambiguity...
<alexgordon> nah
<alexgordon> no!
<cuttle> alexgordon: because they're *papers* :p
<alexgordon> cuttle: i.e. more important than APL :P
<devyn> alexgordon: unless you mean structure as in fixed places for things, in which case I agree
* cuttle sighs
<cuttle> I love math, I'm fucking majoring in math
<alexgordon> devyn: structure as in words must be uttered in a specific order
<cuttle> but "more important"
<cuttle> it's meant to be read and understood by humans
<devyn> alexgordon: ah, yes, okay, never mind then
<alexgordon> cuttle: it was a joke
<cuttle> ok
<cuttle> lol
<purr> lol
<alexgordon> devyn: it's actually pretty cool how humans can get stuff from context
<devyn> alexgordon: honestly I'd say Japanese is less dependent upon order... there's still a conventional order, but really it's all tagged so it shouldn't matter too much, and passive form and such are all explicit
<alexgordon> but some languages rely on that more than others
<devyn> Chinese, being SVO, relies on the whole infix thing
<devyn> well mandarin
<devyn> classical chinese is SOV
<alexgordon> yeah maybe japanese is a better example
<alexgordon> though it has different structure to it
<alexgordon> japanese is a hard fucking language
<cuttle> japanese is very easy
<devyn> everything is extremely regular though, and explicit
<devyn> so not really hard
<alexgordon> once you master the three alphabets, the words, the grammar and the culture, sure
<cuttle> the writing system isn't easy
<cuttle> well, the smaller two are very easy
<cuttle> the grammar is the fucking simplest thing ever
<alexgordon> oh I forgot pronunciation
<cuttle> pronunication is also very easy
<devyn> the writing system and pronunciation of Mandarin are way harder lol
<purr> lol
<cuttle> much smaller phonemic inventory and simpler phonotactics than most languages
<devyn> Japanese actually yes, has a very small phonemic inventory
<alexgordon> cuttle: even if japanese is easy, speaking japanese *without offending everybody* is harder
<cuttle> shouldn't really say "most" but most european for instance
<cuttle> and I would disagree with that too
<alexgordon> unless you're a rich old man, then it doesn't matter
<cuttle> formality isn't much harder than most languages
<cuttle> back me up here devyn
<cuttle> there are certainly more conjugations and titles and shit
* devyn backs up cuttle
<cuttle> but that's like
<devyn> it's actually easier because it's so explicit
<cuttle> at the pronoun stage of learning the language
<alexgordon> devyn: well you're canadian
<alexgordon> americans don't give a SHIT about offending people
<devyn> you're not american
<alexgordon> they just say what's on their mind
<alexgordon> well yeah, brits are worse than canadians in that respect
<alexgordon> at least english people, the welsh don't give a shit either
<alexgordon> ok, maybe southern english people
<devyn> I don't know; we line up for buses and thank the bus driver and such
<cuttle> so do we
<cuttle> ...
<cuttle> lol
<purr> lol
<alexgordon> lol not what I mean
<alexgordon> like I always have to worry about whether I'm saying something someone wants to hear?
<alexgordon> it's rude to disagree
<alexgordon> but americans don't care..
<alexgordon> it's like they don't know the *rules* to disagreeing with someone
<devyn> not sure whether it's because Americans, but I basically made that exact point on reddit and I got downvoted to hell
<alexgordon> :D
<cuttle> not quite sure what you mean
<alexgordon> cuttle: ok so like if you said "I'm going to study art history"
<alexgordon> cuttle: I can't say "I think art history is a poor choice"
<alexgordon> even if that's what I think
<alexgordon> I have to say something like "art history sounds fun, blah blah blah"
<devyn> well, I'd probably also ask them why they want to study art history
<cuttle> alexgordon: I feel like that's not at all a difference between uk and us
<devyn> that's perfectly non-offensive
<devyn> cuttle: yeah I don't think it's a difference
<cuttle> alexgordon: everyone here feels obligated to say "art history sounds fun blah blah blah" and most do
<cuttle> there are always rude people who say the previous
<alexgordon> cuttle: it's hard to describe then
<cuttle> but that's more of an aspergers or general asshole thing
<cuttle> than american
<alexgordon> but americans are more sincere and more abrupt
<alexgordon> every american I've talked to has been this way
<alexgordon> british people will lie to your face, to not hurt your feelings
<cuttle> :/
<alexgordon> funny thing is, I can't work out which way is better
<alexgordon> talking to americans is more stressful for sure, because you never know when they're going to turn your worldview upside down when you were just trying to have a nice chat
<devyn> haha
<alexgordon> on the other hand, never ask a british person for advice
<joelteon> like i'm going to follow that advice
<devyn> honestly I don't think it has all that much to do with culture on a national level
<devyn> it's more localized than that
<alexgordon> devyn: yeah, like I said it's more associated with south england
<devyn> well the US is really goddamn gigantic in both population and land mass
<devyn> and there are so, so many different subcultures
<cuttle> alexgordon: do you talk to most americans over irc
<cuttle> alexgordon: or in real life
<cuttle> because I would agree that *people on irc* may turn your worldview upside down when you're just trying to have a nice chat
<cuttle> lol
<purr> lol
<alexgordon> cuttle: by virtue of not living in america, I talk to most americans on IRC
<devyn> oh that's why then
<cuttle> see, that's about the worst sample set you can have
<alexgordon> cuttle: but I was talking about real people
<devyn> the internet can turn anyone into an argumentative dick
<alexgordon> no really, americans in real life are like this
<devyn> some *people* are like that, but I'm not sure it has anything to do with being american
<devyn> and then the rest is just cognitive bias
<cuttle> well I notice a very large difference between the argumentativeness of irc and real life and I live in america
<alexgordon> cuttle: yeah even english like me turn into argumentative dicks on IRC
<joelteon> fuck you
<alexgordon> I remember something I read on HN
<devyn> oops
<alexgordon> asking vs something else (intuiting?)
<alexgordon> a bit like high and low context cultures
<devyn> pff forget culture, Japanese is a high-context *language*. I swear half the sentences people tell me are just <modified verb> and that's it, and maybe an object
<alexgordon> but I love that
<alexgordon> the more I learn about linguistics, the more I feel that English is a pile of crap
<alexgordon> look at how many words that sentence required
<alexgordon> it should just be
<devyn> except when you actually need context, Japanese is horrible; the syllable count is just too damn high
<alexgordon> "as I learn more linguistics, I feel english crap"
<cuttle> alexgordon: entropy per second in speech or whatever tends to be constant between languages
<cuttle> probably reduces to the speed of thought
<alexgordon> cuttle: right but in terms of elegance, less words = better
<cuttle> so langauges like http://ithkuil.net
<cuttle> are really cool but not better for actual humans :p
<alexgordon> it's like haskell vs python
<cuttle> also no one can ever leran ithkuil
<cuttle> but yeah take a look, you'll like it
<alexgordon> sure haskell code is shorter, but it takes the same amount of time to write
<cuttle> much more successful as an ideal language than lojban
<joelteon> depends on whether you write haskell or python
<cuttle> I would say haskell takes a bunch shorter to write
<joelteon> as a habit
<alexgordon> cool link though bro
<cuttle> but yeah
<joelteon> haskell is way faster
<devyn> ithkuil would probably have to be spoken quite slowly; all that would actually be faster would be set phrases
<alexgordon> cuttle: you haven't seen me write python in chocolat ;)
<joelteon> i'd challenge you to a duel
<joelteon> but
<joelteon> i don't feel confident in my haskell abilities anymore
<alexgordon> haha
<devyn> joelteon: you're comparing a programming language to a human language?
<cuttle> haskell's probably the language I know best tbh
<cuttle> devyn: no, two programming languages
<alexgordon> C++ is probably the language I know best
<alexgordon> that's *scary*
<devyn> I think I know Ruby best, just in terms of esoteric features and kinks
<joelteon> me too
<alexgordon> I used to know objc really well, but there's been so much complexity added now, I don't feel as confident
<joelteon> let's have a ruby circlejerk
<cuttle> I know C++ pretty well
<cuttle> I know a lot of Ruby's kinks but not too much
<cuttle> I'm at a very comfortable place with Python
<alexgordon> when I started objc, it was simple and elegant. but horrible to code in
<joelteon> now it's neither
<cuttle> I probably still have every detail of Game Maker ingrained in my head
<alexgordon> now it's easy to code in, but really inelegant
<alexgordon> ha
<joelteon> python makes me feel really uncomfortable
<cuttle> lua's not hard to know all of
<alexgordon> I <3 python
<cuttle> python is just great
<cuttle> just very pleasant to use
<alexgordon> most people code, I write it once, then never touch it again
<alexgordon> I'm not sure if that makes it brilliant, or terrible
<alexgordon> *python code
<alexgordon> lol people code
<purr> lol
<devyn> I love lua
<devyn> it has just enough
<alexgordon> I can't wait for when I can program myself
<alexgordon> actually, you know what, I CAN wait for that
<joelteon> i would agree devyn
<joelteon> but lua has nothing
<alexgordon> "I installed a package from npm, but it gave me cancer"
<joelteon> well, you wouldn't know you had cancer
<devyn> joelteon: well, it's an embedded language; it's a platform upon which to build your own ecosystem essentially
<joelteon> it would just be
<alexgordon> oh I'm not too sure, have you seen most node code?
<devyn> joelteon: but it has just enough things built in to be perfect
<joelteon> Property 'undefined' of alexgordon is not a function
<joelteon> and you'd have a tumor
<joelteon> "where'd this come from?" "no way to know"
<devyn> haha
<alexgordon> devyn: that's its downfall
<alexgordon> devyn: there's no standards to it
<joelteon> "someone forgot to set an attribute 250 stack frames ago"
<alexgordon> no community
<joelteon> RIP
<alexgordon> if languages were countries, then lua would be siberia
<alexgordon> not even a country! ;)
<joelteon> lua is a language though
<devyn> alexgordon: that's kind of the point though; Lua itself can't really have a community, but whatever platform that uses it certainly can
<devyn> alexgordon: look for example at love2d
<devyn> I've used it and it's really quite fantastic
<alexgordon> devyn: that goes against everything I believe in and hold dear
<alexgordon> languages are communities, the #1 goal of a language is to become as popular as possible, to aid network effects
<joelteon> mari0 is lua?
<devyn> lol
<purr> lol
<whitequark> lua is quite popular though
<joelteon> da fuk
<devyn> it's very popular and its syntax and semantics are very well understood because, well, they're so tiny
<alexgordon> but nobody actually *uses* it
<devyn> sure they do...?
<devyn> it's a scripting language
<alexgordon> apart from a few gamedevs
<alexgordon> nah python is a scripting language
<devyn> no, this is literally a scripting language
<devyn> it's for scripting things
<alexgordon> ...that's what I use python for
<alexgordon> scripting things
<alexgordon> where things = my computer
<joelteon> easier to embed lua
<joelteon> oh, good
<cuttle> I don't really like using lua relaly
<joelteon> so
<alexgordon> lua is merely a turing complete HTTP api
<cuttle> really
<whitequark> alexgordon: off the top of my head: awesome, nginx, tessel, cmake
<devyn> alexgordon: sure, if you're scripting your entire computer
<cuttle> just because of how sparse it is
<cuttle> no tools
<joelteon> mari0 will not let you use , for controls
<cuttle> like, you can have a minimalistic language that's less bare
<whitequark> alexgordon: openwrt
<joelteon> fuck dvorak users, am i right?
<devyn> just switch layouts lol
<whitequark> and I'm not even particularly interested in lua
<joelteon> that works about 50% of the time
<devyn> I never force games to give me ,aoe
<joelteon> mari0 will be convinced that i'm still in dvorak
<joelteon> so i guess
<alexgordon> you guys are only proving my point, in my eyes anyway
<joelteon> kill, switch, launch, switch
<devyn> joelteon: on OS X, you have to exit the game and reopen it before SDL sees that I think
<joelteon> convenienct
<alexgordon> ok maybe let me put it another way
<joelteon> how do you jump?
<alexgordon> lua is a leaky interface
<joelteon> oh space
<alexgordon> you have to use this shitty programming language because technical reasons
<alexgordon> but if it were possible to use a proper language, people would
<whitequark> if it were possible to use js everywhere, people would
<whitequark> oh crap that actually happens, someone tear off their hands.
<alexgordon> js is preferable to lua tbh
<devyn> :p
<devyn> how so alexgordon
<alexgordon> zero indexing for a start
<whitequark> js is never preferable.
<alexgordon> also coffeescript
<alexgordon> I can get along with that
<purr> hah
<devyn> hahahaha
<whitequark> especially not in fucking init.
<devyn> even purr finds that ridiculous
<alexgordon> js has a bunch of libraries
<whitequark> >a bunch of shitty libraries
<alexgordon> lua has, maybe a package manager with no libraries
<whitequark> fixed
<alexgordon> not sure even if it has a package manager
<devyn> a bunch of libraries which you can't necessarily use in an embedded environment
<whitequark> it does
<joelteon> luarocks
<alexgordon> devyn: right there you go. technical reasons
<alexgordon> only reason people use lua
<alexgordon> maybe some day rust will replace lua, you know?
<whitequark> alexgordon: also only reason people use C++ or SQL or Ruby
<devyn> well it also happens to be very nice to use and look at...
<alexgordon> whitequark: not at all. I prefer C++ to python for some things
<whitequark> if it was possible for you to wish code into existence
<whitequark> you would do that
<whitequark> but there's a technical reason you can't do that
<alexgordon> SQL is also great (watch sqlite guy's C4 talk)
<alexgordon> ruby? fuck ruby
<devyn> >SQL is great
<devyn> >Lua isn't
<joelteon> lol
<purr> lol
<joelteon> good argument
<alexgordon> SQL is great because I can express things with SQL that I can't easily express with other languages
<alexgordon> hence why they added bastard SQL to C#
<alexgordon> as a language feature!
<cuttle> I love sql and linq
<devyn> people who use the SQL-like linq syntax suck
<alexgordon> there is NOTHING I can do with lua that I can't do with python
<devyn> much prefer the OO sytnax
<devyn> syntax*
<alexgordon> (talking about the language, not the implementation)
<cuttle> devyn: why
<whitequark> alexgordon: that's pointless
<cuttle> devyn: the sql syntax is *great*
<cuttle> i wish it worked in unity
<devyn> cuttle: idk I just think it's kind of ugly
<whitequark> all turing-complete languages are equivalent for that matter
<cuttle> it literally removes ()=>.(()<,.,(09++==+.>>
<cuttle> it's less ugly
<cuttle> :p
<devyn> hahaa
<alexgordon> devyn: you should see the for loops it replaces
<alexgordon> yeah
<cuttle> whitequark: that's not what he's saying, python is like a lua with more useful things
<devyn> it's really not that bad
<devyn> the method syntax looks better IMO
<alexgordon> lua is python without the cool stuff
<cuttle> whitequark: like, generators/comprehensions, while lua has a form of them, are reason enough I'd say
<alexgordon> hell even python's set()
<cuttle> yeah python just has a really nice dovetailing set of features
<cuttle> that make writing programs really natural
<alexgordon> how much code does it take to do the equivalent of sorted(list(set(xs))) in lua?
<joelteon> and a nicely polluted global namespace
<joelteon> hey guys
<joelteon> guys
<joelteon> file() should be a top-level function
<alexgordon> joelteon: lol I think they removed that in 3
<purr> lol
<cuttle> alexgordon: what's set
<joelteon> oh ok
<cuttle> joelteon: haha
<devyn> cuttle: set() is sets
<joelteon> it's nub, cuttle
<whitequark> alexgordon: map() is still broken though
<whitequark> because guido can't compute
<cuttle> ah ok
<alexgordon> cuttle: takes a generator and turns it into a set
<cuttle> num
<cuttle> nub
<cuttle> oh cool
<joelteon> uniq
<cuttle> yeah that's what this langauge is going to be all about
<alexgordon> cuttle: right but faster
<whitequark> honestly I have less respect for guido than rasmus lerdorf
<joelteon> it's better than uniq because it's a letter shorter
<cuttle> I want EVERYTHING to look like linq
<devyn> joelteon: uhh, no, set() actually creates a set
<whitequark> because rasmus at least admits he's incompetent
<joelteon> oh so it's fromList
<alexgordon> whitequark: hyperbolic statement of 2013!
<devyn> joelteon: it's not nub
<joelteon> ok
<cuttle> and every value is a generator
<devyn> joelteon: Set.fromList, yes
<joelteon> yeah
<joelteon> that's what i said
<whitequark> and guido just forces shitty decisions by being a dictator
<cuttle> whitequark: well to an extent
<joelteon> so sorted(list(set(xs)) is sort . nub
<cuttle> whitequark: I feel that python is a really really good imperative language
<devyn> fromList is a function in many modules :p
<joelteon> yeah i absolutely prefer the python one
<alexgordon> joelteon: the python one is O(n log n) though
<alexgordon> joelteon: haskell one is O(n^2)
<joelteon> ok my mistake
<joelteon> it's
<joelteon> toList . fromList
<devyn> is nub really O(n^2)?
<joelteon> yeah
<devyn> ew
<joelteon> but it's nlogn on a sorted list
<joelteon> but it can't ensure that
<joelteon> so never mind
<joelteon> it's not
<alexgordon> maybe if you sort first then?
<joelteon> ok
<devyn> nub . sort maybe yeah
<joelteon> well, or with OverloadedLists, list(set(xs)) is actually just toList
<alexgordon> you can't sort first in python because the argument may not be a list
<alexgordon> although maybe if you did
<joelteon> that's why i don't use dynamic languages
<alexgordon> list(set(sorted(list(xs)))) lol
<purr> lol
<alexgordon> joelteon: basically I use python for programs where I can keep ALL of it in my head
<devyn> hmm, nub only requires Eq, so how could sorting the list make it faster
<alexgordon> joelteon: including the types of everything. so not a big deal
<joelteon> it's pretty cynical devyn
<joelteon> if you need performance you use Set
<joelteon> if you need performance, you're not using a goddamn shell script
<joelteon> or writing the entire program in 5 minutes
<devyn> haha
<alexgordon> I know I was shitting on big oh the other day
<alexgordon> but
<joelteon> "nub is O(n^2)" oh right because the point of python is to be SUPER FAST
<alexgordon> it matters here
<cuttle> alexgordon: yeah i just realized a big priority in my language is having like, infix/mixfix sql things
<joelteon> how long is xs? 30 million elements?
<joelteon> or 5?
<cuttle> for like map and filter and hist
<cuttle> shit*
<cuttle> because I want extensible generator comprehensions effectively
<alexgordon> "big O" sounds like a good name for a porno
<joelteon> i just got 5000 points on the flag in mari 0
<alexgordon> joelteon: let's say 10000
<joelteon> ok
<joelteon> well
<joelteon> i'll do it again
<devyn> why not just keep a flipped map and filter around and use them as infix
<devyn> in Haskell
<alexgordon> I love how this has sparked so much debate
<alexgordon> cuttle: yeah
<alexgordon> cuttle: I feel like haskell is not abstracted enough
<joelteon> nigga is u srs
<alexgordon> cuttle: the functions are abstracted, but the data is not, if you know what I mean
<joelteon> no idea
<alexgordon> still loads of stuff that uses String for instance
<joelteon> what does
<alexgordon> code!
<cuttle> alexgordon: yeah i feel like it is more than most languages but yeah I want a better data model
<devyn> alexgordon: eh I think people just tend to think some languages are objectively better than others, which isn't really true at all IMO
<alexgordon> I dunno, hoogle for things that use String
<devyn> even though I do it too
<joelteon> ok
<joelteon> yeah
<joelteon> fair point
<devyn> even PHP is good for something
<joelteon> i see some parser instances for String, some TH stuff, lexing strings
<joelteon> and the definition of String
<purr> lolphp
<alexgordon> cuttle: as I was saying the other day, ranges/iterators are fucking awesome
<alexgordon> most of the time people don't need a list, they just need a sequence
<joelteon> shit
<joelteon> i fell in a hole
<alexgordon> joelteon: you are a hole
<joelteon> unevaluated
<joelteon> FUCK
<cuttle> alexgordon: yeah and it's easy to get between the two
<joelteon> I HIT A PLANT THING
<joelteon> i need a MOUSE
<joelteon> FUCK
<joelteon> I HIT THE SAME PLANT THING
<devyn> I like Ruby's enumerators
<alexgordon> cuttle: and C++ has this concept of random access iterators
<joelteon> FUCK ANOTHER PLANT
<cuttle> alexgordon: yeah it's more Arrays The Interface
<joelteon> alexgordon: what so like
<joelteon> is it O(n)
<alexgordon> joelteon: it's just like, things that support foo[5]
<joelteon> ok
<joelteon> and iterators are
<joelteon> listy things?
<alexgordon> arrayey things
<alexgordon> erm
<alexgordon> iterators are listy things yeah
<alexgordon> I guess?
<joelteon> ok
<joelteon> what's the use of a random access iterator?
<alexgordon> iterators are sequences
<alexgordon> joelteon: ok well consider a list shuffling algorithm
<alexgordon> joelteon: it doesn't need to know whether the input is an array
<alexgordon> only that it supports the foo[idx] operator
<alexgordon> and its length
<joelteon> i see
<devyn> joelteon: iterators are like Enumerator in Ruby
<alexgordon> in C++ iterators are supposed to be like pointers
<joelteon> i don't understand the point of enumerators
<alexgordon> and *ranges* are like enumerator
<alexgordon> but C++ butchers terminology
<alexgordon> joelteon: use python, then you shall be enlightened
<joelteon> well ruby has enumerators too
<joelteon> i don't understand the point of them
<devyn> ...or just, you know, use the enumerators in Ruby effectively
<devyn> basically they're streams joelteon
<joelteon> okay
<joelteon> so you've just s/enumerator/stream/
<devyn> okay, so I gather that means you don't get how this is a stream
<alexgordon> joelteon: the benefit of enumerators is efficiency
<devyn> look at the instance methods for Enumerator
<alexgordon> joelteon: instead of joining two arrays, you can just join two enumerators
<alexgordon> which requires little to no extra allocation
<joelteon> ok
<devyn> that's just a tiny, tiny part of what they're useful for
<devyn> joelteon: you could think of them as kind of like lazy lists in haskell I guess
<devyn> I stress 'kind of'
<joelteon> well they seem to be insanely complicated
<devyn> but basically if you have something that produces values, it can be wrapped up in an Enumerator
<devyn> which just has a way to get the next value
<joelteon> ok so like pipes
<devyn> e = [1,2].each
<devyn> e.next
<devyn> e.nxet
<devyn> e.next*
<joelteon> sure
<devyn> but with that a whoooole ton of additional methods can be constructed
<devyn> that produce other Enumerators
<devyn> for example you can select{}
<joelteon> which is implemented in terms of next
<devyn> e = [1,2,3].each.select { |n| n % 2 == 1 }
<devyn> e.next
<devyn> e.next
<joelteon> how is this not like a lazy list
<devyn> it really basically is
<devyn> let me just test one thing first
<joelteon> i'm going to shower
<joelteon> be back
<devyn> joelteon: anyway the point is that it avoids creating an entirely new array just to do your modifications and stuff
<cuttle> alexgordon: so I want to make a syntax that allows you to define linq, or linq with a bit more punctuation
<devyn> joelteon: though I'm not sure whether you have to use #lazy to ensure that
<cuttle> that doesn't privilege an argument and that includes infix
<alexgordon> punctured linq
<devyn> I /think/ so
<cuttle> lol
<purr> lol
<cuttle> but i mean even just colons after the keywords
<cuttle> like
<cuttle> xs map: f
<alexgordon> smalltalk?
<cuttle> yeah basically but smalltalk has privileged infix
<devyn> joelteon: yes, you have to use #lazy. [1,2,3].lazy.select {...}
<cuttle> alexgordon: wondering whether to go with 3 +: 3
<alexgordon> ?
<cuttle> for syntax
<cuttle> so here's what I'm thinking
<cuttle> first argument comes before method name
<cuttle> then subsequent arguments come after words with colons at the end like smalltalk
<cuttle> but those can be optional
<cuttle> so parens are needed but not as bad as lisp
<alexgordon> hm
<cuttle> and here's the cool thing
<cuttle> you can basically method chain
<cuttle> so you can like
<cuttle> 3 (+ 4) (- 5)
<cuttle> I want some way to reorder too
<cuttle> but yeah
<alexgordon> this sounds complex
<alexgordon> need examples plox
<cuttle> ok so like
<cuttle> 3 print
<cuttle> list sorted
<cuttle> list sorted by: f
<alexgordon> ah
<cuttle> list zippedWith otherlist by: f
<cuttle> or
<cuttle> I'm being vague, forgot some colons
<alexgordon> cuttle: you know the concept of "line noise"?
<cuttle> yeah
<alexgordon> yeah well... this is the opposite problem to that
<cuttle> lol
<purr> lol
<cuttle> well yeah hence the nice chaining syntax
<cuttle> so you don't have lots of ((((
<cuttle> or )))
<cuttle> just () () ()
<alexgordon> there's no visual landmarks
<cuttle> well you can say the same about haskell or smalltalk
<alexgordon> and I do :P
<cuttle> and it's not as bad as lisp
<alexgordon> eh
<alexgordon> lisp has the ((((()))))
<alexgordon> syntax is about the two R's
<alexgordon> syntax needs Redundancy because humans are Retarded
<cuttle> :
<cuttle> there's very little redundancy in any programming language
<cuttle> or math
<devyn> Haskell has no visual landmarks? it's very visually structured...
<cuttle> in fact math notation has been through a process of removing redudancy over time
<cuttle> order of operations is about less redundancy
<alexgordon> math notation does have redundancy
<alexgordon> but it's more subtle
<alexgordon> math notation has the redundancy of "if it was this other thing, then it would be nonsensical"
<alexgordon> programmers invent new functions and stuff all the time, so they don't benefit from this
<alexgordon> like think about e^10
<alexgordon> I know it's not e*10 or 10^e
<alexgordon> because those make no. goddamn. sense.
<cuttle> well yeah context is more useful in math
<cuttle> and also you talk about the small tractable subset of functions
<cuttle> whereas many functions in programming aren't mathematically tractable but you write them anyway
<alexgordon> hm
<alexgordon> in mathematics you split things into smaller parts than programming
<alexgordon> like a lemma in mathematics might be half a page, or two pages
<alexgordon> a class can be a thousand lines, easy
<cuttle> yeah
<cuttle> i mean you do that in haskell or forth or clojure too
<alexgordon> kinda interesting really
<cuttle> but where you don't see 10e written in math because it's uninteresting
<cuttle> you could very well see that written in a program
<alexgordon> pages are much better sized chunk for humans than files
<alexgordon> I always feel like if a file doesn't use the whole of my editor window it's not done
<alexgordon> the ideal size for me is about 300-500 lines
<devyn> then just make your editor window smaller
<alexgordon> a page is obviously not 300 lines
<joelteon> 500 lines, wow
<alexgordon> joelteon: I have a good memory for this stuff, it doesn't seem like a lot to me
<alexgordon> I can fit 500 lines in my head, easy
<alexgordon> or at least, the steps for recreating those 500 lines
<alexgordon> actually a big problem with programming is the size of constant data
<alexgordon> mathematicians avoid big tables 'o stuff
<alexgordon> because it's inelegant
<alexgordon> programmers don't have a choice
<joelteon> oh ok
eligrey has quit [Ping timeout: 240 seconds]
eligrey has joined #elliottcable
<devyn> joelteon: what did you think about https://gist.github.com/devyn/7ac34ce45a902517f1ee
<devyn> does it now come near your old one?
<joelteon> leeeeeeeets find out
<devyn> the pretty-printing isn't an issue, by the way; it creates very tiny overhead
<devyn> I'd say it's insignificant
<joelteon> it's to 0.263
<joelteon> equivalent performance to the old one
<devyn> yay
<joelteon> so you rewrote the whole algorithm
<joelteon> teach me how to you did it
<joelteon> teach me how* you did it
<devyn> it's essentially how you did it, with walking by neighbors
<joelteon> in the new one or the old one
<joelteon> but now you're in the Maybe monad
<devyn> in the new one
<joelteon> and
<joelteon> I'm pretty sure
<joelteon> Maybe is more TCO-friendly
<devyn> I'm not using any monads
<joelteon> whoops
<devyn> well
<devyn> monadically
<joelteon> it's super TCO friendly then
<joelteon> :U
<devyn> not inherently
<devyn> look at how it works:
<joelteon> i don't get it
<devyn> walk :: [Path] -> [String] -> Maybe Path
<joelteon> oh no but you are doing it the same way unscramble works
<devyn> each invocation walks all of the paths
<joelteon> that makes sense
<joelteon> instead of spawning off a new search for every neighbor, so to speak
<joelteon> let me prof it
<joelteon> solid work
<joelteon> i feel like a moron
<devyn> essentially walk just calls walk again with a new set of paths
<devyn> from 'branch'
<joelteon> i think my days as a programmer are drawing to a close
<devyn> which creates zero-or-more new paths
<devyn> from each path
<devyn> given the token
<joelteon> yeah, I get it now
<joelteon> you just add to paths every time
<joelteon> really simple
<devyn> well sometimes paths have a dead-end
<devyn> so they produce []
<joelteon> sure
<devyn> and eventually there may be multiple paths produced by this
<devyn> but I only need one
<devyn> so I listToMaybe
<joelteon> so pick the first one
<joelteon> yeah
<devyn> mmhm
<devyn> joelteon: don't get down over this though; this actually took me a while to think of
<devyn> even though it seems simple...
<joelteon> how could you
<joelteon> FUCK
<joelteon> i was trying to resize my chrome window and I accidentally hit Boot on my droplet
<devyn> 'hit boot on my droplet' what?
<joelteon> digitalocean
<joelteon> boot
<joelteon> droplet = vps
<joelteon> i was taking it down to change the kernel
<devyn> ah
<devyn> lol
<purr> lol
<devyn> joelteon: anyway, how could I what
<joelteon> ok so
<joelteon> no just "how could you!"
<devyn> oh
<devyn> :p
<joelteon> you motherfucker
<joelteon> anyway
<joelteon> i'll add Devyn Cairns to the contributors list and push unscramble-1.0
<joelteon> the current version has been a pain in my ass for a long time
<devyn> alright. you may want to clean up 'import Prelude hiding ...'
<joelteon> or you could pull request the change
<devyn> it's rather messy
<devyn> sure, I can do that
<joelteon> because i use the SWF scoring system and stuff
<joelteon> so it's not as trivial as listToMaybe in the [] case
<joelteon> you have to pick the highest-scoring path
<joelteon> yep, beautiful
<joelteon> tail calls get optimized out
<joelteon> walk called 2x per word
<joelteon> search called once
<joelteon> rather than 5.1 million times
<joelteon> jsesu h. christ
<devyn> of course they do; all walk does in the last case is call walk again
<devyn> that's the only rule you have to keep in mind joelteon
<devyn> and that's where monads will trip you up
<joelteon> why didn't that work last time
<devyn> because it seems like it's not
<joelteon> because
<joelteon> of monads
<devyn> it is*
<joelteon> and the reason unscramble didn't do that
<joelteon> is because i was using the state monad
<joelteon> i think.
<devyn> even though it's the last thing in the 'do' block, it's not the result of the function
<joelteon> or, maybe not
<devyn> if you rewrite it with >>= and >>
<devyn> you will see why
<joelteon> yep
<joelteon> or better yet
<joelteon> with concatMap
<devyn> mmhm
alexgordon has quit [Quit: Textual IRC Client: www.textualapp.com]
<joelteon> ok
<joelteon> at least i knew the list monad was bad
<joelteon> good job joel
<devyn> anyway, monads can be TCO'd just not like that
<devyn> I forget what the property is called that determines that
<joelteon> something with ism
<joelteon> in it
<devyn> of course :p
<joelteon> homozygomorphism
<devyn> haha
<joelteon> i'm amazed i stumbled onto the fast method the first time
<devyn> joelteon: how come unscramble has 9.95 MiB of history lol
<purr> lol
<joelteon> probably because it has the enable list in it
<devyn> oh, I guess
<joelteon> we should come up with a clever way to get around that, then purge it from history
<joelteon> maybe just download to ~/.unscramble_lists
<joelteon> yeah that's a good one
<joelteon> i didn't think of it at the time
<joelteon> there were many things i didn't think of at the time
<devyn> alright, I'm not entirely sure how to integrate this unscramble.hs into your program
<devyn> what specifically needs to be replaced
<joelteon> just fucking
<joelteon> see search.hs
<joelteon> here, I'll do it
<joelteon> it's a pretty fucked up program
<joelteon> i was doing some weird stuff back then
<devyn> yeah ok
<devyn> go ahead and do it and then I can clean it up a bit more
<joelteon> wow
<joelteon> this code is "cringeworthy"
<joelteon> this is back when I wanted to use lens for everything
<devyn> haha
<devyn> isn't lens just a way to essentially reintroduce mutable state?
<devyn> if so
<devyn> ew
<cuttle> devyn: not at alllll
<devyn> okay, then I'm slightly confused by it
<cuttle> it's a cool generic way to edit data structures
<cuttle> a little heavy to use everywhere but pretty cool
<devyn> ah I think I get it
<devyn> ok
<devyn> it seems like the kind of thing you'd only want to use where it's actually beneficial though
<cuttle> a bit like zippers but extra generic
<joelteon> yeah
<joelteon> well
<joelteon> this was back when i liked lens a lot
<devyn> it seems like a sensible way to access and modify deep data structures in Haskell
<joelteon> sure
<joelteon> but just do \(_,b,_) -> b instead of view _2
<cuttle> yeah haha
<devyn> well that's why I said *deep*
<devyn> don't use it on easy data strctures
<devyn> :p
<joelteon> ya
<joelteon> maintaining my bot's arbitrary JSON config with it is a lifesaver
<joelteon> this is back when cabal generated capitalized field names by default
<devyn> in the cabal config?
<devyn> that wasn't so long ago
<joelteon> lol
<purr> lol
<joelteon> hmmmmm
<joelteon> ok
<joelteon> so the program is now taking Awhile
<joelteon> it's 0.5x as fast :\
<joelteon> might be overhead from reading the grid, or something
<devyn> profile it
<devyn> lol
<purr> lol
<joelteon> oh lol
<joelteon> I had profiling *enabled*
<joelteon> that's why
<joelteon> ok it's down to 0.224
<joelteon> beauty
<devyn> heh
<devyn> push and let me clean it up?
<joelteon> yeah
<joelteon> hold on
<joelteon> oh that diff is going to be a pain since I moved stuff
<joelteon> >me
<joelteon> oh no it isn't
<joelteon> yay
<joelteon> pretty sure i don't need lens anymore
<joelteon> let me remove the dependency
<devyn> I'm fairly certain the INLINE directives are unnecessary
<joelteon> i pushed it
<joelteon> ok
<joelteon> i'm of the edwardk school of inline literally everything
<joelteon> but if you want to remove it, go ahead
<devyn> it's best to just let the compiler inline what it wants to
<devyn> and since they're not exported
<devyn> the compiler won't care
<devyn> er, well, you know
<devyn> anyway unless you're absolutely sure that it's a tiny function that would best be inlined and GHC isn't already doing it for some reason
<devyn> don't need to INLINE
<joelteon> ok
<joelteon> fine
eligrey has quit [Quit: Leaving]
<joelteon> fiiiiine
<devyn> :p
<devyn> joelteon: and damn it, long variable names are not the enemy :p
<cuttle> devyn: i kind of like short ones thoug
<cuttle> h
<joelteon> devyn: yes they are
<devyn> cuttle: they're fine for writing but unless they're very simple they impede reading again
<devyn> if it's just something like x:xs then that's fine
<joelteon> but if it's
<joelteon> score s sy sx a
<joelteon> then it's not helpful
<joelteon> you guys ever read the source of Data.Map
<joelteon> balanceR is just fantastic
<devyn> where is balanceR
<cuttle> oh god data.map.base froze my browser on cmd f
<cuttle> devyn: data.map.base
<devyn> ah got it
<cuttle> balanceR k x l r = case l of
<cuttle> Tip -> case r of
<cuttle> (Bin _ _ _ Tip Tip) -> Bin 2 k x Tip r
<cuttle> (Bin _ rk rx Tip rr@(Bin _ _ _ _ _)) -> Bin 3 rk rx (Bin 1 k x Tip Tip) rr
<cuttle> Tip -> Bin 1 k x Tip Tip
<cuttle> (Bin _ rk rx (Bin _ rlk rlx _ _) Tip) -> Bin 3 rlk rlx (Bin 1 k x Tip Tip) (Bin 1 rk rx Tip Tip)
<cuttle> (Bin rs rk rx rl@(Bin rls rlk rlx rll rlr) rr@(Bin rrs _ _ _ _))
<cuttle> | rls < ratio*rrs -> Bin (1+rs) rk rx (Bin (1+rls) k x Tip rl) rr
<cuttle> | otherwise -> Bin (1+rs) rlk rlx (Bin (1+size rll) k x Tip rll) (Bin (1+rrs+size rlr) rk rx rlr rr)
<cuttle> (Bin ls _ _ _ _) -> case r of
<cuttle> Tip -> Bin (1+ls) k x l Tip
<devyn> jesus micah
<cuttle> (Bin rs rk rx rl rr)
<cuttle> | rs > delta*ls -> case (rl, rr) of
<joelteon> stop
<cuttle> (Bin rls rlk rlx rll rlr, Bin rrs _ _ _ _)
<cuttle> | rls < ratio*rrs -> Bin (1+ls+rs) rk rx (Bin (1+ls+rls) k x l rl) rr
<joelteon> STOP
<cuttle> | otherwise -> Bin (1+ls+rs) rlk rlx (Bin (1+ls+size rll) k x l rll) (Bin (1+rrs+size rlr) rk rx rlr rr)
cuttle was kicked from #elliottcable by devyn [cuttle]
cuttle has joined #elliottcable
<devyn> y u flud
<cuttle> how can i stop it
<devyn> I forget uh
<joelteon> you can't
<cuttle> what command is it
<joelteon> can you
<devyn> /server purge
<devyn> ?
<joelteon> you can
<cuttle> yeah ok
<joelteon> of course you can
<joelteon> can i test it
<cuttle> i did my best
<cuttle> i'm sorry folks
<joelteon> no jk
<joelteon> hue
<devyn> it's ok cuttle
<devyn> I only kicked you to stop it
<devyn> :p
<joelteon> cuttle you're banned from elliottcable forever
<devyn> anyway, yeah, that's fucked lol
<purr> lol
<joelteon> it's really clever though
<joelteon> i don't know how they wrote it
<joelteon> it was probably pretty simple
<devyn> well
<devyn> the names actually do make some sense
<devyn> I assume rk is 'right key'
<devyn> rx is 'right value'
<devyn> and rlk is right-left key
<devyn> etc.
<joelteon> suuuure
<devyn> well it's just tree balancing
<devyn> joelteon: it's more complicated because they're size-balanced trees
<devyn> this ain't some kinda pussy red-black tree, yo
<joelteon> ok
<devyn> joelteon: hold on, why do you need to score the paths
<devyn> oh
<devyn> for different games
<devyn> got it
<cuttle> kill meee
<devyn> joelteon: also, man, too many tuples :p
<joelteon> ok
<devyn> joelteon: also found a problem: seems like the path to enable.txt is hardcoded or something
<devyn> but it's ok
<joelteon> getDataFileName?
<devyn> hmm
<devyn> well I didn't install it; I'm just running dist/build/unscramble/unscramble
<devyn> surely that shouldn't break it
<joelteon> no, that happened to me too
<devyn> this is a pretty neat program
<devyn> joelteon: did you forget to give me commit rights?
<joelteon> i said fork it
<joelteon> so yeah
<devyn> ah
<devyn> okay
<devyn> :p
<devyn> joelteon: also, is the blue tile meant to indicate the starting tile?
<joelteon> yes
<devyn> ok these paths need to be reversed then
<devyn> haha
<joelteon> ok
<joelteon> whoops
<devyn> that was my fault
<devyn> no worries
<joelteon> are you making more changes
<devyn> joelteon: yes, I should reverse the paths eh?
<joelteon> just curious when to merge it
<joelteon> #digitalocean is having an internet security discussion
<devyn> joelteon: ok, pull now
<devyn> sorry, I get distracted easily
<devyn> :p
<joelteon> why are you reversing all the paths instead of the best one
<devyn> I wasn't sure if the scoring algorithm was order-dependent or not
<joelteon> nope
<devyn> is it?
<devyn> no? ok
<devyn> I'll change that
<devyn> joelteon: changed
<joelteon> lots of tuples
<devyn> honestly ideally walk should just output [[Coordinate]]
<joelteon> yep
<joelteon> but then scoring would have to be a separate step
<devyn> I already did that
<devyn> chooseBestPath
<devyn> joelteon: there
<joelteon> does it still work the same way
<joelteon> what's going on here
<joelteon> oh
<joelteon> i was misreading the diff
<joelteon> everything is ok
<joelteon> :')
<devyn> I just had to watch this
<devyn> again
<devyn> it was really popular when I was 10
<devyn> lol
<purr> lol
eligrey has joined #elliottcable
eligrey has quit [Client Quit]
yorick has joined #elliottcable
niggler has quit [Ping timeout: 272 seconds]
Sgeo has quit [Read error: Connection reset by peer]
fwg has joined #elliottcable
fwg has quit [Ping timeout: 246 seconds]
sharkbot has quit [Remote host closed the connection]
sharkbot has joined #elliottcable
fwg has joined #elliottcable
fwg has quit [Ping timeout: 240 seconds]
fwg has joined #elliottcable
fwg has quit [Ping timeout: 272 seconds]
<joelteon> ok so now we need to write the bit where it downloads the ENABLE list
alexgordon has joined #elliottcable
<alexgordon> clever people, I need your help
<alexgordon> is there a language that compiles to both C and JS?
<whitequark> C
<alexgordon> lol
<purr> lol
<alexgordon> I asked for that
<alexgordon> I could use emscripten
<alexgordon> but
<alexgordon> it sucks :\
<whitequark> oh, so you mean without emscripten?
<whitequark> no, there is not.
<alexgordon> maybe if I use JS
<alexgordon> then javascriptcore to run it from C
<alexgordon> but that's unnecessarily slow
<whitequark> what do you want?
<alexgordon> whitequark: last year I made this https://github.com/fileability/colours
<alexgordon> which is a library for converting between color spaces
<alexgordon> I want to write some code that automatically generates nice text editor themes
<alexgordon> and to have it work both in the browser, and in cocoa
<whitequark> write it twice
<alexgordon> lol
<purr> lol
<alexgordon> fuck that :P
<alexgordon> eh maybe I'll just emscripten then
<whitequark> that's going to take you WHOLE TWO HOURS
<whitequark> emscripten is shit, you won't be able to interface with it
<alexgordon> at all?
<alexgordon> :|
<whitequark> well, you can add a canvas and sdl
<whitequark> or you could create virtual files
<whitequark> emscripten is not for libraries, it's for convering existing unix executables
<alexgordon> is there no way to like, call a "C" function from JS?
<whitequark> there is
<alexgordon> I can just make it an executable then
<whitequark> but you'd still need to wrap it in C
<whitequark> then you'd need to wrap JS the other way
<whitequark> it's silly
<whitequark> you'll write more wrappers than code, and debug it longer than it would take a rewrite
<alexgordon> I could compile it then make it a web service
<alexgordon> on my server
<alexgordon> then just ajax from the js
<whitequark> just. fucking. rewrite. it.
<alexgordon> whitequark: it's not the rewriting, but the keeping it up to date
dimamay has joined #elliottcable
dimamay has quit [Remote host closed the connection]
<whitequark> fucking awesome. 256 votes and 64 favorites
<cuttle> whitequark: what do you mean?
<cuttle> :p
<joelteon> ok there we go
<joelteon> devyn: it's down to 9.29 KiB
<joelteon> in the past, I have committed:
<joelteon> cabal-dev/
<joelteon> dist/
<joelteon> lists/
<joelteon> i'm an idiot
eligrey has joined #elliottcable
niggler has joined #elliottcable
<joelteon> are there any miners that let you use your own GPU
<whitequark> cgminer?
<whitequark> or like, develop your own GPU architecture? :p
<joelteon> cgminer does?
<joelteon> what do you configure it with
<audy> joelteon command line or config file or curses interface
<joelteon> yeah, it says "No mining configured in"
<joelteon> oh shit I found devyn on reddit
<whitequark> yeah he's completely silent
<whitequark> silence of devyns.
<joelteon> heh
<cuttle> joelteon, whitequark http://www.reddit.com/user/devynci
<joelteon> i know
<alexgordon> whitequark: you'll love this
<alexgordon> had a weird bug with chocolat's release note page
<alexgordon> was showing dates for versions like 1.6.1
<alexgordon> but not for 1.6
<alexgordon> turns out PHP was interpreting 1.6 as a number!
<alexgordon> -__-
<whitequark> lol
<purr> lol
<alexgordon> awww yeeeeeah https://chocolatapp.com/release-blog/
<alexgordon> now to add the blog bit
<gkatsev> alexgordon: so, is the "download" option some kind of trial orthe full version?
<alexgordon> gkatsev: both
<alexgordon> I'm doing an experiment
<gkatsev> so, kind of like sublime except not nagware?
<alexgordon> you get 14 days
<gkatsev> ah, right
<gkatsev> I wonder if there is a monospaced font a la comic sans
<alexgordon> there is, in fact
<alexgordon> can't find it
<alexgordon> but be safe in the knowledge that it does exist
Sgeo has joined #elliottcable