00:00:12 <monqy> active worlds: yes
00:00:34 <monqy> what are active worlds bots and why do they need continuations
00:01:37 <monqy> mmm the pure wikipedia page
00:01:38 <monqy> Calling C functions from Pure is very easy. E.g., the following imports the puts function from the C library and uses it to print the string "Hello, world!" on the terminal:
00:01:41 <monqy> extern int puts(char*);
00:01:44 <monqy> hello = puts "Hello, world!";
00:02:05 <Sgeo> monqy, a bot in AW is a program that connects to the AW universe
00:02:16 <Sgeo> Continuations should make all sorts of things about making bots easier
00:02:29 <Sgeo> My current/dormant C# project could really have used them
00:02:31 <monqy> yeah but what do the bots do
00:02:42 <Sgeo> monqy, whatever the programmer of the bot wants them to do
00:02:50 <Sgeo> They can run worlds, so that the world is a game
00:03:03 <monqy> is active worlds the one with the hilarious 3d models
00:03:08 <monqy> or is it just ugly
00:03:31 <monqy> I must have been thinking of something else
00:03:42 <monqy> how many of these virtual reality things do you do
00:03:44 <monqy> it has to be one of them
00:03:52 <monqy> I remember there was another that was hilariously outdated
00:05:01 <elliott> all of them are hideously outdated
00:05:03 <Sgeo> Active Worlds, Cybertown, occasional visitor of There (deceased), Worlds, Metaplace, occasional visitor of Utherverse (I visited once or twice, not for perverse reasons, really), visited IMVU once or twice and hated it, Second Life,
00:05:05 <elliott> like, apart from second life
00:05:08 <elliott> which is inexplicably popular
00:05:24 <Sgeo> I visited Lively once or twice (deceased)
00:05:41 <monqy> cybertown is the hilariously outdated one
00:05:42 <Sgeo> There's one beginning with a k...
00:05:44 <elliott> why would you make sgeo talk about this
00:05:52 <monqy> I am a horrible person
00:06:04 <elliott> but lol this utherverse thing is like a virtual reality porn game??
00:06:25 <Sgeo> I was more of a pervert in Metaplace than Utherverse
00:07:21 <Sgeo> I invented Metaplace sex >.>
00:08:08 <elliott> am i really reading these things
00:08:13 <monqy> A social network for adults only. Meet real people and explore our online virtual world. All for FREE!
00:08:13 <elliott> `addquote <Sgeo> I was more of a pervert in Metaplace than Utherverse <Sgeo> I invented Metaplace sex >.>
00:08:14 <HackEgo> 411) <Sgeo> I was more of a pervert in Metaplace than Utherverse <Sgeo> I invented Metaplace sex >.>
00:08:22 <elliott> sgeo you're like eight years old jesus christ
00:08:26 <elliott> this just isnt appropriate
00:08:41 <monqy> do 8 years olds invent metaplace sex
00:09:24 <monqy> http://www.utherverse.com/Sites/Utherverse/images/animeAvatarsOver.jpg
00:12:06 <Sgeo> I only visited once or twice
00:12:15 <Sgeo> Just to see yet another virtual world
00:12:53 <monqy> I don't want to think about what I would be like if I obsessed over virtual worlds
00:12:54 <elliott> how does metaplace sex work
00:13:06 <monqy> or invented metaplace sex
00:13:36 <monqy> "proud not to have invented metaplace sex" monqy motto
00:13:51 <Sgeo> All it is is just a "fainting" animation repeatedly :/. It looks more like fish flopping around than anything that I'd imagine sex would look like, really
00:15:35 <elliott> sgeo do you actually know what sex looks like i am just checking here
00:16:06 <monqy> after all he invented it in metaplace
00:16:48 <elliott> `addquote <elliott> sgeo do you actually know what sex looks like i am just checking here <Sgeo> I think so
00:16:50 <HackEgo> 412) <elliott> sgeo do you actually know what sex looks like i am just checking here <Sgeo> I think so
00:17:54 -!- Ycros has quit (Quit: No Ping reply in 180 seconds.).
00:18:03 <monqy> is "I think so" the best possible answer to that question
00:18:45 -!- augur has joined.
00:18:57 <Sgeo> "I'll find out in person in a bit"
00:20:06 -!- lambdabot has quit (Read error: Operation timed out).
00:20:15 <Sgeo> Suppose you have (define (get-cc) (call/cc (lambda (cc) cc)))
00:20:23 <Sgeo> Can call/cc be implemented in terms of get-cc?
00:21:45 <Sgeo> (define (my-call/cc func) (func (get-cc))) ?
00:21:51 <Sgeo> Or is there an oddity there?
00:24:36 <elliott> Think about what the continuation is there.
00:25:13 <Sgeo> It's right before func is called... so if func calls it, func will be called again?
00:25:56 -!- Ycros has joined.
00:30:54 -!- EgoBot has quit (Ping timeout: 260 seconds).
00:31:06 -!- EgoBot has joined.
00:48:37 -!- poiuy_qwert has joined.
00:56:04 <Sgeo> I just realized the symmatry between continuations and the functions passed into call/cc
00:56:07 <Sgeo> Is that deliberate?
00:56:15 <Sgeo> Yes, I know I can't spel
00:57:00 <Sgeo> The continuation provided by call/cc is a function that takes one argument. The function that accepts the continuation accepts one argument
00:57:12 -!- augur has quit (Remote host closed the connection).
00:57:45 <elliott> What makes you think continuations take one argument?
00:59:51 <Sgeo> http://c2.com/cgi/wiki?CallWithCurrentContinuation
01:00:23 <elliott> <elliott> What makes you think continuations take one argument?
01:01:25 <Sgeo> That's how they're used on that page and elsewhere
01:01:30 <elliott> For instance, please explain: (call-with-values (lambda () (values 1 2)) (lambda v v)).
01:01:52 <Sgeo> I don't know what call-with-values is >.>
01:02:07 <Sgeo> But can continuations take 0 or several arguments?
01:02:29 <elliott> (call-with-values f k) calls f with k as f's continuation.
01:02:39 <elliott> Calls f with no arguments, that is.
01:02:54 <elliott> For instance, (call-with-values (lambda () (+ 9 9)) (lambda (x) (display x) (newline))) prints the number eighteen and a newline.
01:03:28 <elliott> (call-with-values (lambda () (values 'a 'b)) cons) => (a . b)
01:04:22 <elliott> (call-with-values (lambda () (call/cc (lambda (k) (k 'a 'b)))) cons)
01:04:25 -!- poiuy_qwert has quit (Read error: Operation timed out).
01:05:04 -!- augur has joined.
01:05:05 * Sgeo decides that Racket's escape continuations are both confusing and a premature optimization
01:05:06 -!- poiuy_qwert has joined.
01:05:27 <elliott> Sgeo: please observe my above lines.
01:05:40 <elliott> Escape continuations -- as in shift/reduce?
01:05:46 <elliott> They aren't an optimisation, they have different semantics.
01:06:03 -!- augur has quit (Remote host closed the connection).
01:06:09 <elliott> They're a continuation, except you can only go down the stack, and probably only once.
01:06:16 <elliott> They're identical to try/except/throw.
01:06:26 <elliott> Also I don't mean shift/reduce.
01:08:06 * Sgeo tries to wrap his mind around dynamic-wind. I mean, it sounds simple enough, but I may have an utterly mistaken idea
01:10:19 <elliott> DYNAMIC-WIND itself is quite simple, but its interactions with CALL-WITH-CURRENT-CONTINUATION are subtle.
01:10:44 <elliott> Remember that the blocks execute /every/ time the thunk is left, including multiple times thanks to CALL-WITH-CURRENT-CONTINUATION.
01:11:11 <elliott> Can dynamic-wind be implemented in Scheme?
01:11:12 <elliott> The procedures call-with-current-continuation and dynamic-wind engage in quite subtle interaction with each other. Many Schemes implement both in Scheme on top of a primitive, non-"wind-safe" call-with-current-continuation. This is a particularly common implementation strategy because previous versions of the Scheme standard did not include dynamic-wind and wind-safe call-with-current-continuation. Not
01:11:12 <elliott> e that implementations following this strategy must ensure that the original call-with-current-continuation is no longer reachable from application code since that could compromise the wind-safety of the entire application.
01:11:14 <elliott> -- http://community.schemewiki.org/?scheme-faq-misc
01:14:18 <elliott> Sgeo: http://www.cs.hmc.edu/~fleck/envision/scheme48/meeting/node7.html
01:14:28 <elliott> A (badly-formatted) dynamic-wind in Scheme.
01:14:50 * Sgeo still wants to read about how events work in Racket
01:15:32 <elliott> Oh and yes you can make a continuation which takes no arguments.
01:17:22 <elliott> > (call-with-values (lambda () (call-with-current-continuation (lambda (k) (k)))) (lambda () 42))
01:17:32 <elliott> (Thunk passed is the same as (lambda () (values)).)
01:17:51 * Sgeo goes back to reading websites about Scheme
01:20:32 <Sgeo> "The question is answered in section 6.4 of R5RS: "Except for continuations created by the call-with-values procedure, all continuations take exactly one value."
01:21:17 * elliott thinks about how to do a lazy term-rewriting language
01:21:35 <elliott> Sgeo: This is because the CALL-WITH-VALUES procedure is exactly the way to create continuations with more than or less than one value.
01:27:06 -!- augur has joined.
01:28:28 <elliott> I really wish Scheme didn't have set-c[ad]r!.
01:28:54 <Sgeo> Racket's regular conses are immutable
01:29:36 <elliott> Actually I'm also vaguely annoyed that pairs aren't identified with vectors of length two.
01:29:46 <elliott> (a . b . c) would be a snazzy syntax for a length-three vector, too. :p
01:29:50 <Sgeo> Is there a good reason for me to learn R5RS Scheme instead of Racket?
01:30:36 -!- augur has quit (Remote host closed the connection).
01:31:20 -!- azaq23 has quit (Quit: Leaving.).
01:35:40 <pikhq_> Y'know, the whole mess that is C portability is probably the single best argument against C.
01:38:11 <pikhq_> If you want to write a program that will run anywhere with a C compiler, give up now.
01:38:25 <elliott> That's relatively easy for numeric crunching.
01:38:34 <pikhq_> You can't even be sure it will have the standard headers.
01:38:44 <elliott> Standalone implementations hardly count.
01:38:55 <pikhq_> I'm not including those.
01:39:24 <elliott> Well, OK, and it's hard to write a program that runs in both Python and Ruby interpreters too.
01:39:31 <elliott> You're trying to write a polyglot, which is just stupid.
01:39:41 <elliott> ANSI C and K[and]R C are two different languages.
01:39:53 <elliott> They are so different as to be almost incomparable.
01:41:14 <pikhq_> Anyways, *disregarding that*, unless every function you want is in the commonly supported subset of the C library, you're in for a world of hurt.
01:41:35 <elliott> So we are counting non-implementations of ANSI C too?
01:41:41 <elliott> If they don't follow the standard, they aren't implementations.
01:41:52 <elliott> And everything follows ANSI C nowadays (C99 not so much).
01:41:59 -!- poiuy_qwert has quit (Read error: Operation timed out).
01:42:10 <Sgeo> Is C in better or worse shape than Scheme?
01:42:19 -!- Slereah has quit (Ping timeout: 264 seconds).
01:42:22 <elliott> Define shape, better, worse, and what you think Scheme's "shape" is.
01:43:05 <pikhq_> elliott: There's still a large amount of really, really stupid shit out there. For instance: apparently, on Darwin, you have to explicitly include stdio.h if you are including stdlib.h.
01:44:21 <elliott> Like, what? You can't include stdlib without stdio?
01:45:06 -!- poiuy_qwert has joined.
01:45:45 <elliott> pikhq_: If you mean <stdlib.h> doesn't implicitly include <stdio.h>, it's not specified to.
01:46:30 <elliott> "div always rounds towards 0, unlike ordinary integer division in C, where rounding for negative numbers is implementation-dependent."
01:46:40 <elliott> Hey Gregor, Fythe [caret] :P
01:46:47 <pikhq_> That declarations in their stdlib.h depend on declarations in stdio.h.
01:47:04 * Sgeo watches Racket install
01:47:53 <elliott> pikhq_: I'm pretty much entirely sure that's false.
01:48:30 <Gregor> elliott: It's defined in C99.
01:48:42 <Gregor> elliott: And just-so-happens to be the same in every implementation :P
01:48:55 <elliott> Gregor: Isn't Fythe ANSI, though? :P
01:49:26 <pikhq_> Gregor: Then you might want to make it check for C99. :P
01:49:28 <elliott> BTW, sorry I've not done anything with the bignums, I'm sort of waiting until I can type C again.
01:49:40 <Gregor> elliott: Fythe's division operator is implemented in ASM ...
01:50:05 <elliott> OK, so gcc will never do anything other than generating a plain div instruction.
01:50:23 <Gregor> elliott: It's generated ONCE by GCC.
01:50:29 <Gregor> elliott: Then the same one is used in every installation.
01:50:34 <Gregor> So what's important is the ASM, not GCC.
01:51:09 <Gregor> And no, pikhq_, I'm not going to check for C99 to make sure that division behaves like it did in all pre-C99 compilers anyway.
01:52:35 -!- Slereah has joined.
01:54:18 <elliott> What, is this an error in the specification...
01:54:25 <Sgeo> DrRacket froze up when I typed (/ 1 0)
01:54:31 <elliott> In the following example the only tail call is the call to f. None of the calls to g or h are tail calls. The reference to x is in a tail context, but it is not a call and thus is not a tail call.
01:54:36 <elliott> That (f) is so blatantly not a tail call.
01:54:46 <Sgeo> Ok, it ust took a distressing amount of time to work out that I divided by 0
01:54:57 <elliott> and is control flow just like if.
01:55:31 -!- augur has joined.
01:59:40 -!- augur has quit (Remote host closed the connection).
01:59:55 -!- TeruFSX has joined.
02:03:31 -!- poiuy_qwert has quit (Read error: Connection reset by peer).
02:05:08 -!- poiuy_qwert has joined.
02:05:28 -!- lambdabot has joined.
02:24:01 <elliott> lambdabot more like bambdalot
02:26:37 -!- dbc has joined.
02:54:04 -!- wth has joined.
02:54:29 -!- wth has quit (Client Quit).
02:58:55 -!- Ycros has quit (Read error: Connection reset by peer).
03:01:19 -!- Ycros has joined.
03:05:25 -!- augur has joined.
03:32:48 -!- poiuy_qwert has quit (Read error: Connection reset by peer).
03:41:24 -!- poiuy_qwert has joined.
04:13:15 -!- Ycros has quit (Read error: Connection reset by peer).
04:15:27 -!- Ycros has joined.
04:20:31 <pikhq_> Google is now a *TV* ad agency as well.
04:21:15 <pikhq_> http://www.youtube.com/watch?v=peqnSTBnTVk
04:39:12 -!- elliott has quit (Remote host closed the connection).
04:50:26 <coppro> pikhq_: I should be less surprised
04:50:56 -!- ralc has joined.
05:00:42 -!- elliott has joined.
05:08:46 <elliott> Does anyone know if there's some sort of DVCS-backed FUSE filesystem that just commits every time you save?
05:08:57 <elliott> And then some kind of undo-tree UI for actually finding a revision in the mess, I guess.
05:09:18 <elliott> You'd do actual commits separately, this would just be so you can make experimental changes without relying on your editor's undo capabilities...
05:28:26 -!- siracusa has quit (Read error: Connection reset by peer).
05:31:35 -!- siracusa has joined.
06:01:17 -!- pikhq has joined.
06:01:29 -!- pikhq_ has quit (Quit: Reconnecting).
06:16:23 <elliott> Finger tree: http://i.imgur.com/sRyCi.png
06:17:14 -!- elliott has left ("Leaving").
06:17:24 -!- elliott has joined.
06:17:34 <elliott> I can't stop laughing at my own damn creation.
06:18:25 <elliott> I kind of wish my hand was a finger tree now.
06:19:47 -!- FireFly has joined.
06:20:06 <olsner> luckily I have my 25cl of fantastic pear-flavoured fruit drink, that'll totally make me fit-for-fight
06:20:31 <elliott> i drew a finger tree http://i.imgur.com/sRyCi.png
06:20:42 <olsner> yeah, I saw, that looks nice
06:21:00 <olsner> the spitting image of a something-or-other
06:30:54 * pikhq wonders why ar is only used for static libraries and .debs
06:31:58 <pikhq> It's a freaking general-purpose archiver.
06:32:36 <olsner> maybe it doesn't support directories
06:33:26 <olsner> and file permissions, and other fancy features that you want from actual general-purpose archivers
06:34:13 <pikhq> Oh, right, it's got retarded limitations.
06:34:18 <pikhq> Question answered!
06:37:21 <fizzie> On the third hand, it does have (well, GNU ar does; and probably many others, incompatibly) that symbol table thing, which is certainly something you'd want in a general-purpose archiver.
06:39:23 <fizzie> olsner: It does, however, have mtime/uid/gid/permissions entries in the file header.
06:40:01 <fizzie> Didn't someone speak of a "nest ar files in ar files to simulate directories" scheme once?
06:40:14 <fizzie> It sounds like something you'd do, yes.
06:40:41 <elliott> I will choose to take that as a compliment.
06:41:15 <fizzie> A dazzling display of optimism.
06:41:35 <elliott> Hey fizzie, ban clog, it'll be swell.
06:43:45 <fizzie> Suddenly I am suspicious; this must be some sort of a trick, even though I can't see any harm in it.
06:44:14 <pikhq> Now I just wonder what anyone was thinking when they came up with .deb.
06:44:33 <pikhq> It literally has 2 tarballs in an arball.
06:45:03 <fizzie> "Arball" is a funny word. Arball, arball, arball. Repeat it a couple of times.
06:47:07 <elliott> fizzie: It's not a trick, I'm just insane.
06:47:54 <fizzie> I am still suspicious, but here goes.
06:47:56 -!- ChanServ has set channel mode: +q clog!~nef@bespin.org.
06:48:35 <fizzie> clog: Ha, finally your inane babbling has been silenced!
06:48:47 <fizzie> Peace and quiet, at last.
06:51:18 -!- Slereah has quit (Ping timeout: 260 seconds).
06:51:37 <Sgeo> Some people blame PLT for R6RS
06:53:38 <olsner> fizzie: that should probably be spelled arbl
06:54:54 <fizzie> Oh arbl, arbl arbl, I made it out of clay.
06:55:02 <fizzie> (Add the missing comma.)
06:58:37 <elliott> IT IS UTTERLY UNDAMAGED BY THIS
06:58:59 <elliott> -Lymia- VERSION BusyBox v1.14.2 (FreeDos 1.0) multi-purpose chat client <-- SUUUURE
07:01:45 <Sgeo> elliott, do you think PLT is to blame for R6RS?
07:02:25 <elliott> If a tree falls in the forest and nobody is around to see it, does Sgeo keep asking stupid, unanswerable questions?
07:02:39 <monqy> I don't think anything could stop that
07:03:18 <elliott> maybe if all the virtual worlds in the universe had a gigantic party together
07:03:26 <elliott> but the condition was you had to stop asking stupid questions for a whole day
07:07:51 -!- oerjan has joined.
07:11:59 * oerjan assumes this is because of the error messages it gives to unknown CTCP's
07:13:10 <elliott> fizzie is just this huge fascist
07:13:47 <oerjan> 't log its own responses, probably
07:14:29 <oerjan> 15:31:03 <cpressey> the thing oerjan said about counting down for my head to explode which i can;t find in my scrollback
07:14:32 <oerjan> 15:31:10 <cpressey> it applies now.
07:14:35 <oerjan> 15:31:12 <cpressey> BOOM
07:14:39 <oerjan> EVERYTHING WENT AS EXPECTED
07:16:52 <oerjan> glogbot's logs aren't loading...
07:17:24 <oerjan> oh hm it was the wrong date anyway
07:18:03 <oerjan> elliott: wait, clog did absolutely _nothing_?
07:19:41 <oerjan> oh you wanted to test it?
07:20:57 <oerjan> i guess if VERSION replies aren't to the channel anyhow, it won't make a difference
07:21:30 <elliott> oerjan: i just wanted it to happen since it would have no effect anyway ;D
07:22:11 <oerjan> <CTCP>ARGLE BARGLE<CTCP>
07:22:36 <oerjan> right not even the error replies go to channel
07:31:38 -!- FireFly has quit (Quit: swatted to death).
07:32:51 <elliott> oerjan: have you seen my picture of a finger tree
07:35:30 * oerjan swats elliott -----###
07:38:15 <oerjan> it is somewhat disturbingly similar to a penis tree
07:39:57 <Lymia> Is Python's slice notation inclusive, or exclusive for the second parameter?
07:40:18 <Lymia> i.e. would x[a:b] include b
07:40:52 <elliott> >>> 'abcdefghijklmnopqrstuvwxyz'[0:9]
07:40:52 <elliott> >>> len('abcdefghijklmnopqrstuvwxyz'[0:9])
07:40:58 <elliott> I can't give more useful examples since I can't type the relevant numbers.
07:42:05 <oerjan> elliott, so numerically challenged
07:44:24 <elliott> can someone say sixty four
07:44:47 <elliott> fizzie: plz ban oerjan for troll
07:45:31 <oerjan> hey if roman numerals were good enough for jesus...
07:46:35 <elliott> fizzie: religious trolling at that
07:51:23 <pikhq> oerjan: THOV HAST VVIN
07:52:08 <pikhq> (HEY, IF AN ALPHABET VVITHOVT "W" OR "J" VVAS GOOD ENOVGH FOR IESVS...)
07:57:49 <pikhq> elliott: "JEW" IS INCORRECT. "IVDAEVM" IS THE VVORD THOV VVISHEST, FOR REFERING TO THE OLDEST OF THE THREE MAIN ABRAHAMIC FAITHS
07:58:06 <pikhq> elliott: ALSO, THERE IS NO LETTER "J" OR "W". I THINK YOV MEAN "I" and "VV".
07:58:38 <pikhq> ("U" IS, OF COVRSE, JVST A CVRVIER "V")
07:58:45 <pikhq> ... CVRSES VNTO ME
08:03:35 <pikhq> Define "lozenge", and I'll tell you.
08:04:40 <pikhq> Clearly, strcmp("lozenge", "people")!=0.
08:05:06 * Sgeo risks brain-damage and downloads newLISP
08:06:01 <elliott> i love how monqy bypassed the naive optimistic esolang-liking of this place and skipped straight to the Sgeo mockery
08:06:16 <elliott> it's pretty much what this place exists for
08:06:50 -!- pikhq_ has joined.
08:07:13 <elliott> http://esolangs.org/w/index.php?title=Befunge&diff=next&oldid=22874
08:07:19 <Sgeo> Mock Tailsteak?
08:07:27 <elliott> im gonna find what fucker made this and beat them with a shiro
08:08:17 <elliott> FUCK IT IMPLEMENTS MORE FINGERPRINTS THAN SHIRO FUCK
08:08:21 <monqy> looks like the same person that added that bit
08:08:49 -!- pikhq has quit (Read error: Operation timed out).
08:09:36 <elliott> HAHA YES ITS FUNGESPACE IS MORE NAIVE THAN MINE
08:09:39 <elliott> TAKE THAT YOU PIECE OF CRAP
08:09:49 <elliott> It's also N-dimensional though :P
08:09:54 <monqy> or maybe a fungi fanboy, but I doubt such a person exists
08:10:05 <elliott> Upload dateTue Oct 5 04:24:08 UTC 2010
08:10:19 <elliott> hey i should generalise shiro to n dimensions
08:10:23 <elliott> that would be fun and profitable
08:11:16 <oerjan> to truly beat em, you must support fractal dimensions
08:11:24 * oerjan lurks away cackling evilly
08:11:51 -!- siracusa has quit (Ping timeout: 252 seconds).
08:12:39 <monqy> support vortex math
08:13:26 <Sgeo> I'm already ticked off by newLISP's REPL of all things
08:13:29 <pikhq_> Support the hyperbolic plane.
08:13:31 -!- siracusa has joined.
08:13:46 <Sgeo> .....The fudge?
08:13:54 <Sgeo> The damn editor doesn't do automatic indentation?/
08:14:48 <pikhq_> You are allowed to say "the fuck".
08:14:54 <pikhq_> We are not afraid of copulation here.
08:15:00 <pikhq_> Sleep, maybe, but not copulation.
08:15:04 * Sgeo gives newLISP-GS a gigantic middle finger
08:15:29 <monqy> I'm sure it appreciates it
08:15:39 <oerjan> Sgeo: i suggest applying elliott's finger tree
08:15:47 <monqy> maybe you should use a real whatever newLISP-GS is supposed to be
08:15:50 <monqy> maybe you should use a real language
08:15:54 <elliott> can never have enough fingers on the tree
08:16:52 <elliott> ok things i need for this: haskell with a lot of packages, emacs set up correctly
08:17:06 <elliott> hey did i ever get oerjan to answer my haskell structuring question ;D
08:18:26 <elliott> basically avoiding stacks of what amount to case statements on Maybes with a consistent failure mode...
08:18:31 <elliott> I'm pretty sure it's a MaybeT but I'm not sure.
08:18:37 <elliott> I think it's a MaybeT but I'm not sure.
08:19:08 <oerjan> assuming you need an underlying monad
08:19:18 <elliott> I do, since the code without it is extremely ugly and leans right
08:19:21 <elliott> the problem is that when I result in Nothing, I /don't/ want to rewind the state
08:19:33 <oerjan> elliott: erm i mean _besides_ the Maybe part
08:19:40 <elliott> ah. well yes, but let me explain
08:19:44 <elliott> I don't need an _underlying_ monad
08:20:01 <elliott> the Shiro monad: StateT FungeState IO
08:20:10 -!- Sgeo has quit (Ping timeout: 246 seconds).
08:20:13 <elliott> wrong: MaybeT (StateT FungeState IO) (or however you say it)
08:20:21 <elliott> because when it's Nothing, the state /should not rewind/
08:20:26 <elliott> StateT FungeState (MaybeT IO)
08:20:39 <oerjan> i don't know why the state would rewind...
08:20:51 <elliott> oerjan: um because when the stack returned Nothing you wouldn't be able to get the state out
08:20:55 <elliott> state can change /before/ it fails
08:20:57 <elliott> and that state should not rewind
08:21:00 <oerjan> i'd expect it to rewind only for StateT FungeState (MaybeT IO)
08:21:42 <oerjan> except that there are some monad transformers that take pains to commute anyhow iirc
08:21:57 <elliott> i'm not sure you understand
08:22:00 <elliott> the structure is basically like
08:22:21 <elliott> case foo of Nothing -> reflect; Just yayy -> ...
08:22:30 <elliott> when I reflect, that's the end of the entire function
08:22:35 <elliott> /but/ I can't have the whole thing be Maybe
08:22:41 <elliott> because if I did, and it returned Nothing
08:22:46 <elliott> I couldn't get at the modified state
08:23:38 <elliott> i sure hope oerjan is understanding me here :D
08:24:43 <monqy> do notation and state shit
08:24:47 <oerjan> elliott: i don't think you understand how monad transformers stack
08:25:06 <elliott> oerjan: I might be misunderstanding MaybeT in particular, but I don't think so
08:25:24 <oerjan> i fully expect MaybeT (StateT FungeState IO) not to rewind state, because it cannot possibly rewind IO
08:26:11 <elliott> oerjan: I think I was confusing (MaybeT (StateT FungeState IO) a) with (Maybe (StateT FungeState IO a)) or something like that
08:26:20 <oerjan> although it is _possible_ MaybeT takes pains to modify get and put to ruin my assumption
08:26:47 <elliott> one annoying thing is the delimitation of these "possibly-failing computations"
08:26:59 <elliott> I /think/ it's just per-instruction
08:27:07 <oerjan> (i recall at one time finding a monad transformer which did something like that)
08:27:28 <elliott> oerjan: anyway, the only problem now is all the unholy lifting I'll have to do :(
08:27:47 <elliott> I could make a type class dealie but eurgh
08:28:06 <elliott> m <- gets (fpInstructions . currentIP)
08:28:14 <elliott> Just (_:xs) -> modifyFPInstructions (Map.insert ins xs)
08:28:33 <elliott> m <- lift [dollar] gets blah blah
08:28:41 <elliott> yeah there is going to be a lot of lifts is my point
08:30:37 <oerjan> well make all your base operations work with MaybeT ... i guess
08:31:22 <elliott> oerjan: um you realise there is tons of code /outside/ of the MaybeT?
08:31:37 <elliott> the MaybeT is basically just a readability optimisation for a very very common pattern of code in instructions
08:31:43 <elliott> it's not essential to the structure or anything
08:31:56 <elliott> case (toFPIns asem, toFPIns bsem) of
08:31:57 <elliott> m <- gets (fpInstructions . currentIP)
08:31:57 <elliott> case (maybe reflect head (Map.lookup a m),
08:31:57 <elliott> maybe reflect Map.lookup b m) of
08:32:05 <elliott> there's no code after that line :)
08:33:01 <oerjan> and i assume that gets (fpInstructions . currentIP) is a monadic operation
08:33:14 <elliott> yes, in Shiro (== StateT FungeState IO)
08:33:33 <elliott> but gets is in MonadState, so actually I could easily avoid lift there
08:33:37 <elliott> it's everything /else/ that'd suffer
08:34:05 <elliott> WOW this hGetLineWithTerminator is ugly.
08:34:09 <oerjan> hm i wonder, what about making a slightly more compact higher order function instead?
08:34:31 <oerjan> testReflect (Just j) x = x
08:34:40 <oerjan> testReflect Nothing _ = reflect
08:35:03 <oerjan> * testReflect (Just j) x = x j
08:35:18 <elliott> oerjan: that wouldn't help, since after reflect the instruction has to /stop/
08:35:25 <elliott> oh, wait, that's continuation passing styl
08:35:31 <elliott> well yes but it'll still lean rightwards...
08:35:35 <elliott> whereas this code should be flat
08:35:50 <oerjan> yes but maybe a little less?
08:36:00 <oerjan> i guess the do's ruin some things
08:36:10 <elliott> it'd just help by one indentation level every block, I think
08:36:38 <elliott> oerjan: behold the (unrelated) ugly :D http://sprunge.us/NTbX
08:36:51 <elliott> well it does have one such block but it's not a problem function
08:37:09 <elliott> line <- ioReflect $ hGetLineWithTerminator handle
08:37:10 <elliott> push . fromIntegral . length $ line
08:37:15 <elliott> I should halt after the reflect
08:41:13 <oerjan> so then i guess you either get rightwards leaning, lots of lifting, or embedding the MaybeT in your main monad.
08:41:33 <elliott> or typeclassing everything
08:41:50 <elliott> instead of Shiro a, MonadShiro m => m a, etc.
08:42:11 <oerjan> one more stopgap might be to use some >>= instead of do blocks
08:44:35 <oerjan> fpRun _ Y = pop >>= \sem -> checkReflect toFPIns sem $ \ins -> gets (fpInstructions . currentIP) >>= \m ->
08:44:51 <oerjan> you don't need new indentation to use >>=
08:44:51 <elliott> so make it uglier and even more indented?
08:45:05 <oerjan> um that was just to put it on one line
08:45:30 <oerjan> although i stopped there because the three-way case doesn't fit with checkReflect
08:45:49 <oerjan> also i'm missing some parentheses
08:46:38 -!- Sgeo has joined.
08:46:57 <oerjan> that could make it less indented, although of course uglier
08:49:06 <Sgeo> Features needed to be a half-decent Lisp editor: Easy to see matching parens, and automatic indentation.
08:49:09 <oerjan> hm you could also make the first part monadic
08:49:23 <Sgeo> Percentage of such features newLISP-GS provides: 50%
08:49:28 <elliott> Sgeo: first is semi-irrelevant, all you really need is the blink to let you know which block you just closde
08:49:41 <Sgeo> That's what I meant by the first
08:50:02 <oerjan> checkReflect m f = m >>= \x -> case x of Nothing -> reflect; Just y -> f y
08:50:37 <oerjan> fpRun _ Y = checkReflect (toFPIns <$> pop) $ \ins -> ...
08:51:56 -!- elliott_ has joined.
08:51:56 <oerjan> fpRun _ Y = toFPIns <$> pop `checkReflect` \ins -> ...
08:52:02 -!- elliott has quit (Read error: Connection reset by peer).
08:52:58 <oerjan> you could make it a proper fixity 0 operator
08:53:17 <elliott_> Shiro/Fingerprints/FILE.hs:38:2:
08:53:18 <elliott_> Warning: Pattern match(es) are non-exhaustive
08:54:04 <oerjan> fpRun _ Y = toFPIns <$> pop -->- \ins ->
08:54:35 <lambdabot> The operator `Data.Functor.<$>' [infixl 4] of a section
08:54:48 <elliott_> oerjan: you're just trying to get me to stop using do notation :D
08:55:05 <oerjan> elliott_: well i'm pointing out that's the simplest way to reduce indentation here
08:55:27 <elliott_> it strikes me as less elegant than a transformer, personally
08:56:10 <elliott_> Warning: The import of `Data.ByteString' is redundant
08:56:10 <elliott_> except perhaps to import instances from `Data.ByteString'
08:56:10 <elliott_> To import instances alone, use: import Data.ByteString()
08:56:16 <oerjan> hm maybe >>=| would be a good name
08:56:23 <elliott_> im pretty sure theres a reason i imported it so shut up
08:56:31 <elliott_> Warning: The import of `Shiro.FungeSpace' is redundant
08:56:31 <elliott_> except perhaps to import instances from `Shiro.FungeSpace'
08:56:31 <elliott_> To import instances alone, use: import Shiro.FungeSpace()
08:56:34 <elliott_> FungeSpace m (minX,minY) (maxX,maxY) m2 m3 ->
08:56:42 <elliott_> its becuase shiro.types has it
08:57:12 <elliott_> surprisingly, I depend on nothing not in the Haskell Platform
08:58:02 <oerjan> m >>|= f = m >>= \x -> case x of Nothing -> reflect; Just y -> f y
08:58:19 <elliott_> ugh, does the ubuntu haskell platform have profiling libs
08:58:48 <elliott_> probably not ugh ill just build the fuckshit myself
08:59:42 <elliott_> oerjan: the thing is that do notation fits the /rest/ of these things' code
09:00:47 <elliott_> "Calvin and Hobbes is quite possibly the best philosophy put into a comic strip. It was named after John Calvin and Thomas Hobbes, two famous philosophers."
09:00:50 <elliott_> HOW THE FUCK CAN YOU NOT KNOW THIS
09:01:54 <oerjan> i cannot say i have actually checked how consistent calvin and hobbes's philosophies are with their namesakes'
09:02:41 <oerjan> (should there be an 's on calvin or not, there?)
09:11:24 <elliott_> (coreIns . chr . fromIntegral $ i) `catchShiro`
09:11:25 <elliott_> \(ShiroIOException st) -> put st >> reflect
09:11:44 <elliott_> io . hPutStrLn stderr $ "*** [Reflecting on IO exception: " ++ show e ++ "]"
09:11:51 <elliott_> yes, I keep the state by throwing an exception with the state
09:27:51 <Sgeo> http://common-lisp.net/project/cl-cont/
09:28:04 <Sgeo> call/cc with random restrictions is no fun
09:28:14 <elliott_> that's not random restrictions
09:28:28 <elliott_> which is arguably more fundamental than call/cc
09:28:36 <elliott_> http://en.wikipedia.org/wiki/Delimited_continuation
09:28:36 <elliott_> http://okmij.org/ftp/continuations/index.html
09:29:25 <Sgeo> Says it can't be used in mapcar and the like
09:29:31 <Sgeo> Sounds like a random restriction to me
09:29:41 <elliott_> um, that's because common lisp doesn't have continuations
09:29:47 <elliott_> and so, mapcar will be written in a way ignorant of continuation-passing style
09:30:01 <elliott_> p.s. the map/callcc interaction is very hard to get right anyway
09:30:31 <elliott_> "map: tail recursive, call/cc friendly, goes over the list only once: pick two"
09:30:56 <elliott_> so arguably you don't /want/ to use it from higher order functions like that
09:32:00 <Sgeo> Just googled it, couldn't find where that's from
09:32:12 <Sgeo> Unless you're quoting yourself...
09:32:32 -!- hiato has quit (Ping timeout: 252 seconds).
09:33:26 -!- hiato has joined.
09:35:45 -!- monqy has quit (Quit: hello).
09:38:06 <oerjan> "I never quote myself" -- Elliott Hird
09:41:34 <elliott_> Sgeo: it's from the sisc page, paraphrased
09:42:14 <elliott_> http://sisc-scheme.org/r5rs_pitfall.php
09:44:50 <elliott_> The expression (call/cc (lambda (c) (0 (c 1)))) is a legal expression
09:44:51 <elliott_> according to r5rs, whose semantics are that 1 gets returned when it is
09:44:51 <elliott_> passed to the escape procedure c during the evaluation of the
09:44:51 <elliott_> positions of the combination (0 (c 1)).
09:47:00 <elliott_> (should-be 8.2 '(1 2 3 4 1 2 3 4 5)
09:47:23 -!- hagb4rd has joined.
09:52:46 <oerjan> so r5rs requires all arguments to be evaluated before checking whether the first one is a function?
09:54:16 <elliott_> it's "evaluate arguments and function in unspecified order", then "give arguments to function"
09:54:20 <elliott_> except written less ambiguously :)
09:54:48 <oerjan> looks like nvg is shutting down for a couple days here due to building maintenance, i may not be on irc then
09:55:19 <elliott_> oerjan: YOU'RE NOT ALLOWED A BREAK
09:55:43 -!- hagb4rd has quit (Ping timeout: 246 seconds).
10:04:53 <elliott_> http://rationalwiki.org/w/index.php?title=RationalWiki:Chicken_coop&curid=2919&diff=786201&oldid=786194
10:04:58 <cheater_> http://news.ycombinator.com/item?id=60357
10:17:14 <elliott_> "If the strip goes through today without an update, this will be the longest hiatus the strip has ever gone on, at 8 days." ;; welp, at least now I know my perception of time is fucked up for sure
10:17:21 <elliott_> oerjan: hey, does iwc actually ever go on hiatuses?
10:17:27 <elliott_> apart from those caused by software bugs
10:18:53 <oerjan> elliott_: hasn't skipped an update since the second year, or was that first
10:19:31 <elliott_> oerjan: :( your saline drip is more reliable than mine
10:19:50 * elliott_ lols a bit more at an eight day break being called a "hiatus"
10:20:00 <oerjan> there have been some very few that were a few hours delayed
10:20:01 <elliott_> hmm that means that all the flash updates were made in less than seven days... impressive
10:20:32 <oerjan> elliott_: DMM just came back from a three week holiday, and there was no significant glitch
10:20:44 <elliott_> oerjan: yeah yeah stop rubbing it into my face
10:21:01 <oerjan> the only thing that went on hiatus was comments on a postcard, there weren't enough submissions to get through
10:21:03 <elliott_> oerjan: does DMM have an untarnished record of starting his next comic less than a week after the previous one??
10:21:11 <elliott_> where will YOU go when it all ends
10:21:19 <elliott_> also, heh; you'd think comments on a postcard would be the easiest to keep up
10:24:03 <oerjan> i'd say DMM has an untarnished record of having more projects going on perfectly at once than a human could reasonably keep up with
10:24:38 <elliott_> oerjan: yes but it's not like mezzacotta is a replacement for iwc if it ends ;D
10:25:08 <oerjan> indeed. anyway the servers here are shutting down in minutes and i need to shower
10:25:20 -!- oerjan has quit (Quit: See you, maybe).
10:25:24 <elliott_> NOOOOOOOOOOOOOOOOooooooooooooo
10:29:45 -!- elliott_ has set topic: "And without manifestation, who can say that this passage would exist since light *is* Being as manifestation? Thus light lies somewhere between an infinitely dark source and the immeasurable matrix of solidity." --Ernest Hemingway | Logs: http://codu.org/logs/_esoteric/ and http://tunes.org/~nef/logs/esoteric/?C=M;O=D.
10:32:40 -!- FireFly has joined.
10:35:23 -!- azaq23 has joined.
10:49:24 -!- FireFly has quit (Read error: Operation timed out).
10:50:20 -!- FireFly has joined.
11:00:03 -!- Slereah has joined.
11:09:41 -!- Slereah has quit (Ping timeout: 252 seconds).
11:10:06 -!- Slereah has joined.
11:13:47 -!- augur has quit (Remote host closed the connection).
11:23:09 -!- ais523 has joined.
11:29:00 -!- BeholdMyGlory has joined.
11:48:36 -!- Slereah has quit (Ping timeout: 240 seconds).
11:50:24 -!- Cheery has joined.
11:50:33 -!- augur has joined.
11:51:01 -!- poiuy_qwert has quit (Read error: Connection reset by peer).
11:52:51 -!- poiuy_qwert has joined.
12:03:27 <elliott_> "Recently I have just been wondering. How did the universe start? In school they explained the Big Bang theory, but when I thought about it; I wondered. Where did all the matter that supposedly exploded into what is now the universe come from. So could r/askscience give me an answer? How did the universe begin?"
12:03:32 <elliott_> seriously, /r/askscience is the worst thing ever
12:03:41 <elliott_> i wish oerjan didn't tell me about it.
12:11:01 -!- poiuy_qwert has quit (Read error: Connection reset by peer).
12:12:51 -!- poiuy_qwert has joined.
12:31:01 -!- poiuy_qwert has quit (Read error: Connection reset by peer).
12:32:54 -!- poiuy_qwert has joined.
12:40:51 -!- ais523 has quit (Read error: No route to host).
12:43:25 -!- ais523 has joined.
12:47:35 -!- poiuy_qwert has quit (Read error: Operation timed out).
12:48:15 -!- ais523 has quit (Ping timeout: 260 seconds).
12:52:50 -!- poiuy_qwert has joined.
13:11:31 -!- poiuy_qwert has quit (Read error: Connection reset by peer).
13:13:02 -!- poiuy_qwert has joined.
13:36:54 -!- poiuy_qwert has quit (Quit: This computer has gone to sleep).
13:50:23 -!- ais523_ has joined.
13:52:44 -!- hiato has quit (Ping timeout: 240 seconds).
13:53:07 -!- ais523 has joined.
13:58:03 -!- Slereah has joined.
13:58:47 -!- hiato has joined.
14:03:04 -!- hiato has quit (Ping timeout: 240 seconds).
14:04:41 -!- hiato has joined.
14:04:54 -!- MigoMipo has joined.
14:09:12 -!- aloril has quit (Ping timeout: 250 seconds).
14:09:56 <ais523> elliott_: do you have any good ideas about how to implement polymorphism? in general, I mean
14:10:13 <elliott_> i'm going to do that obnoxious thing i do
14:10:30 <ais523> elliott_: well, part of the issue is coming up with a good definition
14:11:10 <elliott_> Do you mean polymorphism as in rank-one universal quantification in a function type?
14:11:14 <ais523> but what I want is a language that lets me do something like let flip a b c = a c b; then call flip with two different arguments of different types
14:11:30 <elliott_> Or perhaps parametric polymorphism, i.e. the same applied to types?
14:11:33 -!- ZOMGMODULES has joined.
14:11:44 <elliott_> ais523: But not higher-rank polymorphism?
14:11:59 <ais523_> well, what I have at the moment works almost entirely on type inference
14:12:07 <elliott_> e.g. ((forall a. a -> a) -> Int) being a function that takes (a function that takes an argument of any type and returns a value of the same type), and returns Int
14:12:16 <ais523_> with the bizarre result that you can define two identical functions flip1 and flip2 and have them both work
14:12:18 <elliott_> compare ((a -> a) -> Int); you could feed e.g. (+one) to this
14:12:23 <ais523_> but combining them doesn't as you get a type inference error
14:12:36 -!- Vorpal has joined.
14:12:40 <elliott_> but (+one) wouldn't work as an argument to the first
14:12:42 <ais523_> you're talking about passing polymorphic functions to other polymorphic functions
14:12:47 <elliott_> (in fact, the only acceptable arguments are id and _|_)
14:13:14 <elliott_> ais523_: right. higher-rank polymorphism corresponds to higher-order logic
14:13:26 -!- hiato has quit (Ping timeout: 260 seconds).
14:13:29 <elliott_> rank-one types handle 90 percent of things, though, and can be inferred
14:13:41 <elliott_> (rank-two+ types aren't haskell 9eight, for instance)
14:13:52 <ais523> yep; additionally, I need to desugar everything into known non-polymorphic non-parametric types anyway
14:13:57 <elliott_> (but they might be haskell twentyten and they're definitely a relatively popular GHC extension)
14:14:05 <elliott_> ais523: well, I guess my next question is define "implement" ;)
14:14:12 <ais523> so really I'm looking for some way to automatically infer polymorphism then desugar it into the equivalence of C++ templates
14:14:19 <ais523> then desugar /those/ into macro expansions, and do the expansions
14:14:22 <ZOMGMODULES> enjoy being locked in your immeasurable matrix of solidity
14:14:29 <elliott_> ais523: well, you know about Hindley-Milner, right?
14:14:36 * elliott_ prays deeply the answer to that isn't "no"
14:14:52 <elliott_> I actually put my hands together and closed my eyes there. That's how deeply I'm prayin'.
14:14:54 <Vorpal> elliott_, any progress on the spec?
14:15:06 <ais523> elliott_: I am aware that it's a common type-inference algorithm; I have also implemented an obvious type-inference algorithm, and think it's very likely they're the same
14:15:06 <ais523> but I've never actually checked
14:15:20 <elliott_> Vorpal: Uh, whoops. I've been rather exceedingly busy. You might just wanna buy something.
14:15:29 <ZOMGMODULES> ais523: it feels like the "obvious" one, from what i recall of it, so yeah
14:15:31 <elliott_> ais523: Well, Hindley-Milner handles polymorphic inference.
14:15:41 <elliott_> It is, after all, what Haskell (ninety-eight) uses.
14:15:43 <Vorpal> elliott_, well I'm busy until tomorrow anyway
14:16:10 <ais523> ah right, my algo does that, more or less, but then tries to throw that information away, and errors out if it can't
14:16:22 <elliott_> Well, don't do that if you can avoid it.
14:16:34 <elliott_> I'd say you want to throw things away at the very last moment, not as soon as you infer a specific type.
14:16:39 <ais523> sometimes it takes a conversation on IRC to know you're doing something stupid
14:16:48 <ais523> well, it needs an exact type for everything, is the issue
14:16:48 <elliott_> ais523: Re: the compiling down to C templates -- are you saying that you want there to be one and only one implementation of a polymorphic function, right?
14:17:05 <ais523> it's OK to have multiple implementations behind the scenes; in fact, if they're of different types, they have to be
14:17:13 <ais523> it should just look like one function to the user
14:17:18 <ais523> I'm compiling into hardware
14:17:27 <ais523> it absolutely needs to know the type of everything
14:17:49 <elliott_> Then I'd just do regular Hindley-Milner all the way through, and then when you have a call to a polymorphic function, see what the fully inferred type is, and compile the function accordingly.
14:17:58 <Vorpal> question about haskell: how does the "magic" string you get from stuff like hGetContents actually work? Is it possible to invent similar magic strings yourself or does it need special runtime support?
14:18:07 <elliott_> Vorpal: It's not magic, it's just a lazy string.
14:18:17 <elliott_> You can do it with unsafeInterleaveIO.
14:18:24 <elliott_> The only unsafe thing is that effects can leak.
14:18:26 <ais523> it's sufficiently nonmagic that you can even do that sort of thing in Python
14:18:43 <ais523> and the unsafety is because you can't tell when or if side-effects will happen
14:18:44 <elliott_> For instance, readFile followed by a writeFile based on it is a Bad Idea generally.
14:18:58 <elliott_> (readFile is just opening a file + hGetContents)
14:19:04 <ais523> but that's normally considered OK because not knowing when or if a file will be read is safe if you never write to it, and if reading it doesn't have side-effects
14:19:14 <elliott_> ais523: it's not normally considered OK
14:19:21 <elliott_> I would never use hGetContents in a "production" interface
14:19:23 <ais523> well, depends on who by
14:19:25 <Vorpal> elliott_, hm hGetContents isn't actually safe is it? Unless it takes some sort of OS level exclusive lock on the file someone else could modify it right ahead of where you read.
14:19:25 <elliott_> it's simply not predictable enough
14:19:26 <ZOMGMODULES> see this is how lazy evaluation makes your life simpler
14:19:30 -!- hiato has joined.
14:19:31 <elliott_> Vorpal: Yes, it's not really safe.
14:19:36 <elliott_> Vorpal: unsafeInterleaveIO is :: IO a -> IO a.
14:19:51 <elliott_> The conceptual implementation is (return . unsafePerformIO).
14:20:03 <elliott_> The basic idea is that it splits it off into "another" IO world, so that its effects can happen irrespective of the main world you're in.
14:20:24 <elliott_> That doesn't actually make any sense, but we kindly request that you pretend it does.
14:20:55 <Vorpal> elliott_, this would kind of work if you had transactions on file system level
14:21:34 <Vorpal> then you could be certain you got an atomic snapshot of a file you started reading
14:21:46 -!- aloril has joined.
14:23:13 <Vorpal> elliott_, That's hardly news
14:23:37 <elliott_> Vorpal: its ever-increasing feats of stupidity are.
14:23:56 <ZOMGMODULES> So I have to play with node.js. Should I care?
14:24:16 <elliott_> ZOMGMODULES: No, it's terrible.
14:24:18 <Vorpal> elliott_, what did it do this time?
14:24:26 <elliott_> ZOMGMODULES: People have literally said "it's fast because it uses callbacks".
14:24:33 <elliott_> ZOMGMODULES: What this means is you have to write your entire program in continuation-passing style.
14:24:35 <ZOMGMODULES> I can trust elliott_ to have an opinion on anything and everything
14:24:44 <elliott_> And the best thing is: it is the correct opinion.
14:24:52 <elliott_> Hey, ask Gregor, he STUDIES THE JAVAS for a living :P
14:25:17 <Vorpal> come on, what is node.js?
14:25:29 <elliott_> A shitty server-side javascript async IO framework thing.
14:25:42 <ZOMGMODULES> Well, the thing that struck me about it is that it seems to provide an interface to Javascript as an "actual programming language", i.e., something I can use without too much pain outside a web browser. It even gives a REPL...
14:25:45 <elliott_> Vorpal: Re what did it do this time: Paraphrase from reddit comment: "Of course, I support gay marriage. But HERE'S an objection I haven't been able to answer: WHAT IF THREE PEOPLE WANT TO GET MARRIED?????"
14:25:50 * Vorpal remembers the time when javascript on websites mostly consisted of random alert()s and mouse over menus...
14:26:04 <elliott_> ZOMGMODULES: v[eight] provides the REPL afaik.
14:26:27 <elliott_> ZOMGMODULES: http://www.commonjs.org/ is meant to be the "JS outside the browser" thing that's spin off from all this. I'm not sure how much node.js obeys, but it apparently tries to.
14:26:32 <Vorpal> <elliott_> Hipper than Rails used to be. <-- wow
14:26:37 <ZOMGMODULES> Does V8 provide enough of a standard library to make things non-hell? B/c that's the other thing that it seemed to be doing. e.g. a console object
14:26:54 <elliott_> OK, apparently node.js is a "CommonJS Implementaiton".
14:27:03 <Gregor> It's a poor CommonJS implementation :P
14:27:04 <elliott_> I'm not even going to try and understand that one.
14:27:09 <elliott_> ZOMGMODULES: Yeah no V8 has no libraries.
14:27:18 <elliott_> Erm, CouchDB queries are written in JS.
14:27:22 <elliott_> Because JS, like Erlang, is HIP.
14:27:27 <elliott_> Hipper than a literal fucking hip.
14:27:35 <Gregor> elliott_: Imagine if POSIX was like this: "To be POSIX-conforming, you must implement open, read and write. The remainder of this spec is optional."
14:27:36 <elliott_> I am poking my hip right now. It is not nearly as hip as Erlang.
14:27:39 <Gregor> elliott_: That's CommonJS.
14:27:47 <elliott_> Gregor: To be fair, POSIX is sort of like that :P
14:27:48 <ZOMGMODULES> I'm so hip, I have trouble seeing past my pelvis.
14:28:37 <elliott_> http://en.wikipedia.org/wiki/SproutCore ... also a CommonJS implementation????
14:28:39 <Gregor> elliott_: Yeah, but CommonJS is more extreme. It's a collection of sub-standards, and the only one necessary to be "a CommonJS implementation" is require() (think #include, but not quite so dumb)
14:28:44 <elliott_> I'm not even going to try and understand this. Not. Even. Going. To. Try.
14:28:56 <Vorpal> <elliott_> Gregor: To be fair, POSIX is sort of like that :P <-- much less in POSIX 2008 though
14:29:09 <elliott_> Gregor: Oh man, #include. Because what we've learned since the seventies is, the seventies way to do a module system is DEFINITELY the best way to do a module system.
14:29:18 <elliott_> That is why everyone loves .h files.
14:29:40 <Gregor> Well, JS require() is include() except that you dump stuff into an object, and that object is exposed under the theory that it's like a module.
14:29:47 <Gregor> Oh, and it only includes once.
14:29:50 <Vorpal> elliott_, alas I suspect the reason is a lot more prosaic. Because breaking backward compatibility is expensive
14:29:58 <elliott_> Gregor: It's still not a module system X-p
14:30:11 <Gregor> But it's better than #include :P
14:30:23 <Sgeo> Some girl wants to pay me to teach her how to set up a blog
14:30:33 <Sgeo> (Not a girl I've mentioned here before)
14:30:42 <Gregor> elliott_: Anyway, since require() is implementable in a browser, yes, browser JS libraries can be CommonJS implementations too *brain explodes*
14:31:04 <Vorpal> elliott_, why AT for everyone
14:31:47 <elliott_> Vorpal: Because of the ridiculous melding of Alluded-To Female with Katie to produce K(a)T(ie)-A(lluded)T(o) the Alluded-To Female.
14:32:01 <elliott_> And it sounds like a robot from Doctor Who.
14:32:09 <Vorpal> elliott_, KT-AT sounds like something from starwars to me...
14:32:10 <Sgeo> elliott_, there was an F there originally, iirc
14:32:28 <Sgeo> Or maybe I'm wrong
14:33:00 <Vorpal> elliott_, I just don't remember what in star wars I'm thinking of...
14:33:36 <Vorpal> oh I think those walking thingies the Empire used on the ice planet or something had some such name
14:33:55 <Vorpal> or was it those found in the last movie, on that forest moon maybe
14:34:16 <ZOMGMODULES> Vorpal: http://en.wikipedia.org/wiki/Walker_%28Star_Wars%29#All_Terrain_Armored_Transport_.28AT-AT.29
14:34:39 <Vorpal> and there is AT-ST too hm
14:34:47 -!- hiato has quit (Ping timeout: 246 seconds).
14:35:10 <Vorpal> wikipedia: best reference on in-universe details for movies in existence.
14:35:43 <Vorpal> elliott_, well I meant in general
14:35:54 -!- hiato has joined.
14:35:58 <Gregor> AT-ST? All Terrain Silly Transport?
14:35:59 <Vorpal> elliott_, that one wouldn't cover Dr Who, Star Trek and so on
14:36:01 <ZOMGMODULES> If it's hip, I better implement something cool in it, so I can put it on my resume in case I need to get hired by one of them hip web 2.0 companies. This is the wisdom of ZOMGMODULES; do not reject it.
14:36:03 <elliott_> augur: Do you URGENTLY need a FINN.
14:36:10 <Vorpal> Gregor, "scout" it seems, but yes rather silly
14:36:13 <augur> but crucially, the same finn as last time!
14:36:24 <Vorpal> augur, no, check /whois
14:36:28 <elliott_> Vorpal: It's like calling the drink Doctor Pepper :P
14:36:40 <Vorpal> elliott_, err? yes and?
14:36:58 <elliott_> ZOMGMODULES: Hired by a hip web 2.0 companies??? SIGNS ME UP
14:37:06 <Vorpal> elliott_, Dr is perfectly okay way to abbrev the word "Doctor"
14:37:25 <elliott_> Vorpal: For a start, no it's not, "Dr." is.
14:37:29 <Vorpal> ZOMGMODULES, yes indeed, but only inside other abbrev
14:37:40 <Vorpal> elliott_, I don't care about "." on irc mostly
14:37:43 <elliott_> For second, it suggests that his name is Dr. Who, which is patently false, it isn't, it's The Doctor (not "The Dr." that's ridiculous).
14:37:50 <ZOMGMODULES> elliott_: I thought you Brits didn't do that dot thing on titular abbreviations
14:37:57 <elliott_> Also I demand you call him Philosophiae Doctor Who.
14:38:13 <elliott_> ZOMGMODULES: I ... don't think we don't.
14:38:19 <Vorpal> elliott_, well the tv series is called "Doctor Who" iirc rather than "The Doctor"?
14:38:34 <elliott_> Vorpal: Yes, but that doesn't make "Dr. Who" any less misleading :P
14:38:34 <augur> Vorpal: the credits do
14:38:43 <augur> in-show they never refer to the doctor as Doctor Who
14:38:46 <Vorpal> elliott_, I disagree, but I don't care to argue about it
14:38:56 <augur> except maybe once, in a throwaway situation where he's disguised
14:38:57 <ZOMGMODULES> elliott_: comes from when I read HHGttG for the first time... though that might have been an Australian printing, come to think of it
14:38:58 <Vorpal> elliott_, anyway is there a wiki about that tv series?
14:39:12 <augur> Vorpal: about doctor who?
14:39:18 <elliott_> The chances of there not being a Doctor Who wiki is... like... less than zero.
14:39:21 <augur> http://tardis.wikia.com/wiki/Doctor_Who_Wiki
14:39:28 <Vorpal> augur, I said the name of the tv series itself, I never said the name of the guy who is the main figure
14:39:39 <Vorpal> so what the credits list him as is completely irrelevant
14:39:45 <augur> oh yes, then thats correct, Vorpal
14:39:48 <augur> the series is Doctor Who
14:40:00 <elliott_> yes but "Dr. Who" is still a misleading abbreviation :)
14:40:05 <Vorpal> augur, which I argue can be abbreviated to "Dr. Who"
14:40:10 <elliott_> because "Dr." is afaik universally used to put in front of people's names
14:40:11 <Vorpal> and on irc I can drop that dot
14:40:12 -!- wareya_ has changed nick to wareya.
14:40:16 <augur> i think it's been abbreviated like that afaik
14:40:30 <elliott_> it may have been abbreviated like that, but that doesn't make the abbreviation any less misleading
14:40:44 <augur> but its not TOO misleading
14:41:02 <elliott_> It's more misleading than Ph.D. Whence, the One True Name of the series.
14:41:06 -!- hiato has quit (Ping timeout: 240 seconds).
14:41:15 <augur> because the fridgelogic behind it all is that he's the Doctor, and if he's a doctor, then his titled name is Dr. something or other
14:41:25 <elliott_> Isn't he actually a four time Earth doctorate?
14:41:28 <augur> But.. Dr. /who/, exactly?
14:41:33 <elliott_> So he's Dr. Dr. Dr. Dr. The Doctor.
14:41:52 -!- hiato has joined.
14:41:58 <Gregor> Professor Pepper, Ph.D. SDD
14:41:58 <Vorpal> elliott_, I think you collapse them?
14:42:17 <ZOMGMODULES> Hello Kitty is now a CommonJS implementation.
14:42:22 <Gregor> (SDD = Soft Drink Design)
14:42:32 <Vorpal> elliott_, either works, that is my point
14:42:34 <elliott_> Hey Gregor, what does Dr Pepper fnarf like.
14:42:55 <Gregor> Professor Pepper, Ph.D. SDD is deliciousness.
14:43:23 <elliott_> Finally your sense of fnarf coincides with the more common sense of taste.
14:43:50 <olsner> deliciousness is a fnarf?
14:44:37 <Vorpal> elliott_, does haskell's System.IO function expect UTF-8 or is there a way to specify perhaps?
14:44:55 <elliott_> Vorpal: UTF-8 by default; see http://www.haskell.org/ghc/docs/latest/html/libraries/base/System-IO.html for how to change that.
14:45:01 <elliott_> Protip: http://www.haskell.org/ghc/docs/latest/html/libraries/base/System-IO.html#g:23
14:45:09 <elliott_> There's also the openBinaryFile stuff.
14:45:14 <Gregor> olsner: Fnarf is the sense I apparently have to replace a more conventional sense of taste, without an adequately-functioning sense of smell.
14:45:28 <Vorpal> elliott_, hm, I'm working on a bit older system here, I guess I'll get 6.12.1 docs instead
14:45:45 <elliott_> 6.12.1 is not the latest release.
14:45:54 <elliott_> it is not even the latest 6-series release.
14:45:57 <Vorpal> elliott_, this is Ubuntu 10.04 LTS
14:46:00 <Vorpal> it is what I got on here
14:46:15 -!- hiato has quit (Ping timeout: 258 seconds).
14:46:20 <elliott_> Vorpal: Yes, but you really should update regardless; that release is over a year old.
14:46:24 <elliott_> In fact, almost a year and a half.
14:46:29 <Vorpal> elliott_, 10.04? yes indeed
14:46:34 <elliott_> And the current Haskell Platform won't even build with the six series.
14:46:43 <elliott_> That GHC doesn't even support the latest Haskell standard.
14:46:51 <Vorpal> elliott_, well I want my system to work with older stuff
14:47:01 <Vorpal> elliott_, why do you not code C99, but mostly C89?
14:47:04 -!- hiato has joined.
14:47:08 <elliott_> Um, GHC 7 is perfectly backwards-compatible.
14:47:27 <Vorpal> elliott_, so everything I write for GHC 7 will work with GHC 6.12.1? I doubt that
14:47:33 <Vorpal> the reverse is probably true
14:47:38 <elliott_> Yes, unless you use certain Template Haskell features.
14:47:50 <elliott_> Since Haskell twothousandandten is mostly a formalisation of various GHC extensions that have existed for years.
14:48:01 <elliott_> And the C89/C99 comparison is disingenuous for several reasons that I don't nearly care enough to devote the time towards.
14:48:07 <Vorpal> elliott_, so the only new thing in ghc 7 is template stuff?
14:48:26 <elliott_> Vorpal: That is the only thing that will affect you; a minor top-level Template Haskell syntax change (the optional omission of three characters).
14:48:36 <elliott_> There are other changes, but they are even more irrelevant.
14:48:44 <Vorpal> elliott_, well I don't use template haskell afaik.
14:48:54 <Vorpal> why is it useful, should I learn it?
14:49:08 <elliott_> It's useful for automating declarations and the like.
14:49:21 <elliott_> It's basically Lisp macros for Haskell on crack.
14:49:23 <Vorpal> elliott_, probably not needed to implement a compiler for a simple esolang
14:49:34 <elliott_> It's not the most pleasant thing to use most of the time, but the end results are swanky.
14:50:42 <Vorpal> elliott_, hm which sort of grammars can Parsec deal with btw (not that I need it for ↓→.... it is trivial to parse)...
14:51:10 <Vorpal> ZOMGMODULES, context sensitive ones? ;P
14:51:13 <Gregor> Wow, Parsec can handle CSGs? :P
14:51:21 <Vorpal> Gregor, beat you to it
14:52:06 <elliott_> Parsec can handle more than just context-free, I believe
14:52:09 -!- Phantom_Hoover has joined.
14:52:11 <elliott_> It's effectively Turing complete.
14:52:17 <elliott_> Phantom_Hoover: Don't say a word you have like fifty messages.
14:52:35 <elliott_> ZOMGMODULES: Well, no, it can't handle the grammars a UTM can't parse :>
14:53:13 <Phantom_Hoover> @say I wonder if lambdabot will count this as me asking it for messages...
14:53:35 <elliott_> SAY SOMETHING NORMAL SO IT TELLS YOU
14:53:54 <HackEgo> 292) <olsner> actually, I think vorpal is the "retarded team member" to the left
14:54:04 <Vorpal> elliott_, next question: haskell libraries for DFA based regexp engine?
14:54:15 <elliott_> Vorpal: regex-dfa, but why do you want regexps?
14:54:21 <elliott_> Vorpal: I don't see anything in DownRight warranting them and they are ugly.
14:54:41 <Vorpal> elliott_, no it was just in general
14:54:45 <Vorpal> elliott_, I was thinking about parsing
14:54:55 <Gregor> POSIX regexps? *vomits*
14:55:02 <elliott_> Vorpal: Parsing -> Parsec. No exceptions.
14:55:11 <elliott_> Unless it's binary data, in which case binary, or ByteStrings (network stuff), in which case attoparsec.
14:55:15 <Vorpal> elliott_, from what I remember posix regexp are not dfa based on linux at least, unless it has it's own implementation
14:55:15 <elliott_> But really. Parsec. No exceptions.
14:55:24 <Phantom_Hoover> elliott_, lambdabot timed out when I asked it for your messages.
14:55:36 <Vorpal> elliott_, I refuse to use Parsec for ↓→ because that would be utterly silly :P
14:55:49 <elliott_> Parsec is completely lightweight.
14:56:01 <elliott_> It's like refusing to use a list because you only need four elements.
14:56:01 <Vorpal> elliott_, wait what? It is a simple splitting on whitespaces?
14:56:10 <elliott_> ...no? It's grouped into blocks.
14:56:23 <Vorpal> elliott_, hm, so then I would have to learn parsec
14:56:29 <Vorpal> what is parsec like then
14:57:02 <Vorpal> ZOMGMODULES, space separates groups?
14:57:17 <Vorpal> ZOMGMODULES, any number of spaces btw
14:57:45 <Vorpal> <elliott_> Avoid left recursion. Done.
14:57:50 <elliott_> Actually Parsec might be a bitch in that it's a two-dimensional language, but parsing those is a bitch in any circumstance, and Parsec will at least lessen the pain.
14:58:00 <Vorpal> elliott_, well what stuff do I call? Does it work like lex or such?
14:58:15 <Vorpal> elliott_, right I have never used it
14:58:35 <Vorpal> elliott_, I presume you give it a grammar definition somehow, like you do for lex, yacc and so on?
14:58:59 <Vorpal> elliott_, so how do I use the libary then, what calls?
14:59:18 <Vorpal> oh wait I just do Parsec.DownRight.ParseMagially()
14:59:35 <elliott_> Right, I am going to recite the manual for you since you want to know what calls I guess
14:59:52 <elliott_> * module Text.Parsec.Combinator
14:59:56 <elliott_> * module Text.Parsec.ByteString
14:59:58 <elliott_> * module Text.Parsec.ByteString.Lazy
15:00:02 <elliott_> * errorPos :: ParseError -> SourcePos
15:00:12 <elliott_> * sourceName :: SourcePos -> SourceName
15:00:14 <elliott_> * sourceLine :: SourcePos -> Line
15:00:16 <elliott_> * sourceColumn :: SourcePos -> Column
15:00:18 <elliott_> * incSourceLine :: SourcePos -> Line -> SourcePos
15:00:22 <elliott_> * incSourceColumn :: SourcePos -> Column -> SourcePos
15:00:24 <elliott_> * setSourceLine :: SourcePos -> Line -> SourcePos
15:00:26 <elliott_> * setSourceColumn :: SourcePos -> Column -> SourcePos
15:00:28 <elliott_> * setSourceName :: SourcePos -> SourceName -> SourcePos
15:00:32 <Phantom_Hoover> elliott_, erm, you're probably going to have to tell me the last messages you sent.
15:00:42 <elliott_> module Text.Parsec.ByteString.Lazy
15:01:27 <ais523> Vorpal: if you learn to do it in Prolog first, the Haskell version will be much clearer
15:01:57 <ais523> elliott_: you think Haskell invented parser combinators?
15:01:58 <Vorpal> ais523, okay.... But will the total work of Prolog + Haskell be less than Haskell from the start?
15:02:02 <elliott_> I say what, that's actually a perfectly typical ais523 statement but then one of their defining properties is that they floor me.
15:02:08 <Vorpal> ais523, then I'll pass
15:02:12 <elliott_> Especially since Parsec's model of parser combinators is very unlike Prolog parsing.
15:02:34 <ais523> Vorpal: anyway, you can compose parsers more or less the same way you can compose functions
15:02:56 <elliott_> Vorpal: It's like writing a PEG grammar but with a bunch of Haskell operators.
15:02:57 <ais523> except that instead of operating on the result of each other, they parse adjacent bits of the input
15:03:26 <ais523> elliott_: something I'm not sure of about Parsec; does the parsers it generates do any sort of backtracking, or is it just lookahead-based?
15:03:32 <ais523> the syntax used would work for either
15:03:38 <elliott_> ais523: Backtracking, naturally.
15:03:40 <Vorpal> ais523, would I actually want it to parse ↓→ though...?
15:03:48 <Vorpal> I don't trust elliott_ about such things
15:03:59 <elliott_> Parsec is only marginally overweight for /brainfuck/.
15:04:09 <elliott_> It is literally a small pile of functions included with every Haskell distribution.
15:04:14 <Vorpal> elliott_, yes but parsing ↓→ is easier than bf :P
15:04:14 <ais523> `addquote <ZOMGMODULES> I can trust elliott_ to have an opinion on anything and everything <elliott_> Yes. <elliott_> And the best thing is: it is the correct opinion.
15:04:16 <HackEgo> 413) <ZOMGMODULES> I can trust elliott_ to have an opinion on anything and everything <elliott_> Yes. <elliott_> And the best thing is: it is the correct opinion.
15:04:20 <elliott_> It just so happens that it's extensible, fast, and has addon modules that makes parsing everything trivial.
15:04:35 <elliott_> The alternative is manually writing a recursive parser, which is just throwing simple abstraction out the window.
15:04:45 <elliott_> ais523: I would fix that with the correct spacing, but delquote is broken
15:05:05 <ais523> note that ↳ is actually parsed in a 1D style, according to the spec
15:05:08 <ais523> so Parsec's even more appropriate
15:05:12 <Vorpal> elliott_, for bf yes, for this however I would only tail recurse, but sure.
15:05:12 <elliott_> Why is it okay for one person to say no to sex in a marriage? And why is it not okay to cheat in this situation? :( (self.AskReddit)
15:05:25 <ais523> (despite being a 2D language, the input is interpreted as a stream of bytes)
15:05:50 <ais523> elliott_: I would love it if you gave an answer to that based on game theory and Nash equilibria
15:05:58 <ais523> which is, I suspect, the only technically correct answer
15:06:18 <elliott_> ais523: Unfortunately I'm too busy crying that someone could possibly ask "And why is it not okay to cheat this situation?", and then especially follow it up with ":(".
15:06:47 <elliott_> Actually the first sentence has pretty much lead me into facepalm city already so I'm just going to forget I ever saw it.
15:07:00 <ais523> well, I can only trace the why back one level
15:07:40 <ais523> it's sort-of like asking why a certain species of insect, when it needs to hide from predators, has the rule that it can hide in any hiding place used by another of the same species of insect, and the other insect has to leave to make room
15:07:55 <ais523> this leads to an interesting sort of relay race of running from predators, even if it makes no sense
15:08:10 <ais523> well, it makes some sense, but it's hard to see how it came about in the first place
15:08:18 <ais523> I'm not entirely sure it's relevant to cheating on spouses, though
15:08:23 <ZOMGMODULES> Vorpal: for using Parsec, I found working from a simple example helps
15:08:40 <Vorpal> ZOMGMODULES, yes, thanks
15:09:01 <Vorpal> ZOMGMODULES, do you have one for parsing ↓→? ;)
15:09:34 <ais523> <Vorpal> wikipedia: best reference on in-universe details for movies in existence. <-- I disagree, there's nearly always a specialist wiki that does better, and I generally seek it out when I need to know that sort of information
15:10:07 <elliott_> <ais523> I'm not entirely sure it's relevant to cheating on spouses, though
15:10:19 <Vorpal> ais523, well okay, but the joke was that wikipedia shouldn't really deal with that level of detail that it has
15:10:26 <ais523> <elliott_> For second, it suggests that his name is Dr. Who, which is patently false, it isn't, it's The Doctor (not "The Dr." that's ridiculous). <--- he was once actually called Doctor Who by a character in the series, but it's generally regarded to be a mistake
15:10:55 <Vorpal> ais523, the funny thing is that I was talking about the name of the series, not the name of the character
15:11:34 <elliott_> I never once contradicted that or believed otherwise.
15:11:36 <oklofok> what the fuck is dr who anyway?
15:11:41 <oklofok> i always assumed he's a rapper
15:11:50 <elliott_> you have got it completely right
15:12:37 <ais523> Vorpal: if you think Wikipedia is full of irrelevant in-universe speculation, you should see some of the more specific wikis
15:12:42 <oklofok> elliott_: you sound slightly sarcastific
15:12:45 <ZOMGMODULES> pastie's literate haskell synatx highlighting leaves something to be desired
15:12:48 <elliott_> ZOMGMODULES: ew, mingling whitespace skipping in with the rest of the parsing :)
15:12:54 <elliott_> THERE'S YOUR OPINION FOR THE MOMENT
15:13:03 <Vorpal> oklofok, actually it is a sci-fi TV series featuring a time traveling "police box" (which is a weird UK thingy looking a bit like an old style telephone booth)
15:13:31 <ais523> I recently found a page on Bulbapedia that was all about fan speculation as to which characters from Pokémon would be likely to have a romantic relationship if they ever met, which they hadn't
15:13:45 <ais523> most of the evidence was incredibly tenuous
15:13:52 <Vorpal> oklofok, if you google you will find elliott_ is the one trolling you
15:13:57 <elliott_> ais523: PETTY CONCERNS LIKE PLOT CANNOT GET IN THE WAY OF SHIPPING
15:14:04 <elliott_> oklofok: Google is communist lies.
15:14:07 <elliott_> oklofok: Don't believe the reptilian Jews.
15:14:09 <oklofok> Vorpal: better to live in a lie than have more time travel in my world
15:14:13 <elliott_> oklofok: Dr Who is the only true rapper out there.
15:14:23 <ais523> elliott_: it was more, that the only evidence that they had was that the characters were similar
15:14:40 <oklofok> what? what? i'm dr. who, and i'm here to do a check-up on you - woooo woooo
15:14:48 <Vorpal> elliott_, no the only true rapper would surely be MC Frontalot?
15:14:59 <elliott_> oklofok: Dr Who specialises in one-word rhymes.
15:15:07 <elliott_> Dr Who / Blue / Shoe / Flew / Out / The / Windoo
15:15:16 <ais523> only one of them was technically impossible (Kris was replaced by Lyra in an updated remake, they just renamed and restyled the main character of the game, which lead to Kris x Lyra shippings which makes no sense at all, as in it's not clear what it's even meant to mean)
15:15:54 <ais523> it'd be like shipping the Python 2 print statement and Python 3 print function
15:15:59 <oklofok> also don't you mean ... oot / thoo ...
15:16:02 <ais523> on the basis that they're similar
15:16:08 <ais523> (come to think of it, someone's probably already done that)
15:16:11 <elliott_> ais523: Yeah, I'm ... gonna do that now.
15:16:17 <Vorpal> are there any tools to generate parsers given BNF?
15:16:28 <elliott_> Vorpal: It's... called yacc...
15:16:35 <elliott_> `addquote <Vorpal> are there any tools to generate parsers given BNF? <Vorpal> that would be cool
15:16:36 <HackEgo> 414) <Vorpal> are there any tools to generate parsers given BNF? <Vorpal> that would be cool
15:16:36 <Vorpal> elliott_, that's not exactly BNF iirc
15:16:43 <Vorpal> elliott_, besides I meant for haskell
15:17:11 <oklofok> there's some stupid hacks on top of it
15:17:15 <Vorpal> elliott_, from what I remember yacc/bison does a superset of BNF
15:17:28 <oklofok> = stupid hacks on top of it
15:17:54 <Vorpal> ZOMGMODULES, maybe another day, but I don't want to reinvent the wheel
15:17:59 <ais523> you can, in yacc, more or less literally write BNF and get a parser
15:18:11 -!- hiato has quit (Ping timeout: 260 seconds).
15:18:12 <ais523> but it's not massively useful, as all you'll get is either a parse error or successful termination
15:18:18 <Vorpal> ais523, well it isn't exactly the same syntax, so it doesn't really count
15:18:23 -!- hiato has joined.
15:18:39 <ZOMGMODULES> data BNF x = Seq BNF BNF | Alt BNF BNF | Kleene BNF | Literal x
15:18:43 <ais523> the whole point of yacc is that you can add actions as well to actually make the parser do something
15:18:52 <ZOMGMODULES> then interpret that structure, calling Parsec to do the actual work
15:19:10 <Vorpal> ais523, well, is there yacc for haskell
15:19:16 <Vorpal> parsec looks annoying compared to yacc
15:19:26 <ais523> parsec's a lot simpler than yacc
15:19:31 <Vorpal> ais523, I mean, to use
15:19:39 <ais523> I imagine you could easily get a BNF->parsec compiler, though
15:19:45 <Vorpal> ais523, possibly because I know yacc but not parsec
15:19:53 <ais523> I know both, parsec is simpler
15:19:54 <elliott_> ais523: Augh, you've made me want to figure out the number of possible Homestuck ships out of utter morbid curiosity just so I can boggle at the combinatorial ridiculousness of the resulting number.
15:20:02 <Vorpal> ZOMGMODULES, I shall google yaskell, I assume you wouldn't have mentioned it unless it exists
15:20:03 <elliott_> Thankfully my desire to spend NO TIME ON DOING THAT WHATSOEVER outweighs the morbid curiosity.
15:20:03 <ais523> elliott_: 2^(number of characters)
15:20:12 <elliott_> ais523: That only applies if you have one type of romantic relationship.
15:20:14 <ZOMGMODULES> ais523: or a BNF interpreter, implemented using Parsec
15:20:22 <ais523> elliott_: I didn't say (number of characters)^2
15:20:36 <ais523> I assume people can come up with 0-person and 1-person ships
15:20:45 <ais523> because they've managed to come up with everything /else/
15:21:07 <elliott_> ais523: That would work for matespritship, but not moirallegiance, kismessisitude or auspisticism.
15:21:16 <elliott_> And the last involves three elements.
15:21:19 <elliott_> Do not want to think about this any further.
15:21:29 <ZOMGMODULES> Vorpal: Do not use it. Use Parsec. This is the wisdom of ZOMGMODULES.
15:21:43 <elliott_> `addquote <ZOMGMODULES> Vorpal: it's actually called Happy <ZOMGMODULES> Vorpal: Do not use it. Use Parsec. This is the wisdom of ZOMGMODULES.
15:21:44 <HackEgo> 414) <ZOMGMODULES> Vorpal: it's actually called Happy <ZOMGMODULES> Vorpal: Do not use it. Use Parsec. This is the wisdom of ZOMGMODULES.
15:21:47 <elliott_> ZOMGMODULES strongly discourages the use of happiness.
15:21:53 <Vorpal> ZOMGMODULES, so why do you hate yacc syntax?
15:21:56 <ZOMGMODULES> Also, protip: when saying phrases like "This is the wisdom of ZOMGMODULES" on IRC, you can tab-complete your own nick.
15:22:40 <oklofok> what the fuck is this homestuck thing anyway? i always assumed he was a rapper
15:22:41 <ais523> ZOMGMODULES: I've changed my nick just to be able to tab-complete a particular word before
15:22:58 <Vorpal> oklofok, a web comic :P
15:23:05 <ZOMGMODULES> Vorpal: I don't like the interleaving of BNF++ and C.
15:23:11 <Vorpal> oklofok, about... uh that's a bit compled
15:23:28 <elliott_> oklofok: Homestuck is a rapper.
15:23:35 <oklofok> yo they call me homestuck, i don't give no fuck
15:23:55 <Vorpal> <elliott_> He's the kismesis of Dr Who. <-- which quadrant was that, I forgot
15:24:21 <Vorpal> elliott_, and left or right side?
15:24:33 <elliott_> I am so glad my head contains this information.
15:24:53 <elliott_> SO GLAD THIS IS TAKING UP SPACE IN MY HEAD
15:24:55 <Vorpal> ais523, anyway homestuck allows more than one relationship at once so...
15:25:02 <Vorpal> ais523, yeah your logic doesn't work
15:25:44 <elliott_> ais523: To summarise in less infuriatingly unrevealing terms, there are three two-pairing types and one three-pairing type, so I'm fairly sure the actual total number is ridiculous.
15:25:59 <elliott_> Especially if you count every single soldier as a character which OBVIOUSLY you do.
15:26:05 <ZOMGMODULES> I think I'm gonna go join another channel now
15:26:08 <elliott_> These are things that logical people do.
15:26:13 <ais523> wait, there's a finite list of allowed sorts of ships?
15:26:18 <ais523> hmm, can we make an esolang out of this?
15:26:36 <ais523> you'd need to implement reproduction in order to make it TC, though, otherwise you'd only have finite storage
15:26:38 <elliott_> ais523: Don't make me try and explain troll romance. It's basically a gigantic ploy by Andrew Hussie to troll every single one of his readers by bullshitting them.
15:26:40 <Vorpal> elliott_, that only applies to the trolls though
15:26:57 <Phantom_Hoover> <elliott_> ais523: That would work for matespritship, but not moirallegiance, kismessisitude or auspisticism.
15:26:59 <elliott_> Vorpal: Moirallegiance probably still applies augh why am I humouring AH the bastard.
15:27:11 <elliott_> ZOMGMODULES: ISN'T THIS CHANNEL GREAT RIGHT NOW IT TOTALLY IS
15:27:17 <Vorpal> elliott_, that is... which quadrant?
15:27:27 <Phantom_Hoover> 4^|characters| is the absolute upper bound on relationships.
15:27:39 <elliott_> `addquote <oklofok> i hope that isn't child pornography <oklofok> whew <oklofok> equally cute tho, have to admit
15:27:41 <HackEgo> 415) <oklofok> i hope that isn't child pornography <oklofok> whew <oklofok> equally cute tho, have to admit
15:27:42 <Vorpal> elliott_, yes I didn't remember the names for it
15:28:44 <elliott_> Excellent channel-killing move by me there
15:28:48 <elliott_> I think we've officially hit rock-bottom
15:29:13 <ais523> I know I was once asked to kill a channel as people there didn't like the current conversation
15:29:25 <oklofok> that's a horrible catch phrase
15:29:26 <ais523> so I said "I mostly play Nintendo portables and Linux games", and that worked fine
15:29:30 <ais523> I doubt it'll work again, though
15:29:59 <Vorpal> ais523, what was the channel about? Not Nintendo portables and Linux games I guess?
15:30:04 <ais523> it was about gaming generally
15:30:07 <elliott_> it was [hash]luigiandalsonethack
15:30:24 <ais523> I'm not sure if even derailing a channel can cure me of my desire to be ontopic
15:30:37 <elliott_> ais523: Says the guy just talking about Pokemon shipping.
15:30:46 <Vorpal> elliott_, ah, I read that as "lugi" first what with the nintendo stuff, so the rest didn't parse for me
15:30:54 <cheater_> i've seen a girl with the biggest tits ever today, and she was skinny too
15:31:02 <ais523> elliott_: I still have a desire to be ontopic
15:31:08 <ais523> it's just kind-of hard in here
15:31:29 <ais523> elliott_: I don't think that's a standard whoosh circumstance
15:31:40 <ais523> it's more missing the syntax of the joke, than the semantics
15:31:45 * cheater_ tried killing the chat but didn't manage
15:32:48 <Vorpal> ais523, is there an ISO standard perhaps defining standard whoosh circumstance?
15:32:55 <ais523> Vorpal: I don't think so
15:34:31 -!- elliott_ has quit (Remote host closed the connection).
15:35:12 -!- elliott has joined.
15:35:23 <ais523> elliott: I was wondering if we'd scared you off
15:36:49 <ais523> hmm, I wonder if I'll be here forever
15:36:56 <ais523> even if I do prefer it when it's talking about esolangs
15:37:03 <oklofok> cheater_: my dick gets np-hard when i'm soaked in pee-space
15:37:05 <ais523> nowadays it's typically tolerable even when it isn't
15:37:25 <ZOMGMODULES> esolangs and off-colour complexity theory humour
15:37:31 <elliott> i plan to stick around here until i've been here long enough that nobody can come up with any excuse not to op me any more
15:37:49 <elliott> right after i laugh this off as a joke to get the final op bit of course
15:37:55 <ais523> isn't the excuse "this channel doesn't need any more ops"?
15:38:59 <elliott> ais523: Counter: "I'm so elder, people leave and never come back just because I tell them I'm banning them"
15:39:17 -!- SOLEIL has joined.
15:39:49 -!- SOLEIL has quit (Quit: MegaIRC v4.06 http://ironfist.at.tut.by).
15:40:11 <cheater_> oklofok: i heard pgraham was so good, he doesn't need viagra, because he's np-hard!
15:50:13 <elliott> ais523: OK I hate what I have become but I will say that Homestuck has at the very least over 6448 possible shippings.
15:50:24 <elliott> Counting only major characters.
15:50:31 <elliott> I'm going to go get drunk and shoot myself.
15:51:16 <ZOMGMODULES> It's not a *very* specific hate though, because I have only inferred what any of this is or means.
15:51:27 <ZOMGMODULES> And I wish no more knowledge of it than that.
15:52:49 <Sgeo> My aglets have short life spans
15:54:11 <elliott> BACK TO HOW UGLY THIS HASKELL CODE IS
15:56:17 -!- hagb4rd has joined.
15:58:28 <elliott> ZOMGMODULES: btw i agree re: pure's input is horrible
15:58:44 <elliott> assign a to gets and then evaluate a+a, it reads a line twice... augh
15:58:50 <elliott> i mean, i get the motivation but
16:01:48 <elliott> ais523: tehz's response at http://esolangs.org/wiki/Talk:Unparseable makes no sense, right?
16:01:52 <elliott> just checking it's not just me
16:03:26 <Vorpal> <Sgeo> My aglets have short life spans <-- why
16:03:30 <Phantom_Hoover> (foo)bar does foo, then bar, while (foo loop)bar does foo over and over again.
16:03:50 <Sgeo> I think it's because they tend to get stepped on. Not sure
16:04:04 <ZOMGMODULES> "Felix has the best everything of all languages." -- Felix home page
16:04:38 -!- hagb4rd has quit (Ping timeout: 246 seconds).
16:04:43 <Sgeo> But it's a real problem, it makes it impossible to keep my laces in without them, so I tend to walk around with my shoes undone. This wouldn't be a problem except for people always pointing it out
16:05:36 <ZOMGMODULES> re Unparseable, I could only make sense of "loop" if it means "block"
16:05:44 <Sgeo> ZOMGMODULES, except it doesn't actually say that
16:06:00 <ZOMGMODULES> Sgeo: do you think I would LIE about FELIX?
16:06:05 <Sgeo> "megathreadingng"? Really?
16:06:26 <ZOMGMODULES> Felix's home page and Falcon's home page are actually the same page
16:06:42 <Vorpal> <ZOMGMODULES> elliott: TRY FELIX NAO <-- every time people write "now" as "nao" I think of nethack.alt.org...
16:07:14 <ZOMGMODULES> "Felix provides the best contract programming system of any production language." if you want accuracy
16:07:26 <Vorpal> <Sgeo> But it's a real problem, it makes it impossible to keep my laces in without them, so I tend to walk around with my shoes undone. This wouldn't be a problem except for people always pointing it out <-- use shorter laces so you don't step on them
16:07:40 <ZOMGMODULES> but the stuff about how it's a scripting language that compiles to C++ to take advantage of ZOMGOPTOMIZATIONS also tickles me
16:08:19 <elliott> `addquote <ZOMGMODULES> Felix's home page and Falcon's home page are actually the same page
16:08:20 <ZOMGMODULES> scripting language. whole program analysis. together at last
16:08:21 <HackEgo> 416) <ZOMGMODULES> Felix's home page and Falcon's home page are actually the same page
16:08:34 <elliott> `addquote <ZOMGMODULES> scripting language. whole program analysis. together at last
16:08:36 <HackEgo> 417) <ZOMGMODULES> scripting language. whole program analysis. together at last
16:08:38 <Vorpal> <ZOMGMODULES> Felix's home page and Falcon's home page are actually the same page <-- that explains so much
16:09:02 <Phantom_Hoover> <Sgeo> I think it's because they tend to get stepped on. Not sure
16:09:27 <Vorpal> Phantom_Hoover, either that or he uses way too long ones
16:09:28 <Phantom_Hoover> The laces should be well off the ground, unless they're pointlessly long.
16:09:46 <ais523> <elliott> ais523: tehz's response at http://esolangs.org/wiki/Talk:Unparseable makes no sense, right? <--- it took me rather aback, I think loops in Unparseable are like Perl's degenerate loop {}, which iterates exactly once
16:10:04 <elliott> ais523: TehZ says something stupid?
16:10:10 <Sgeo> I want to say that sometimes I don't tie my shoes, even when those things aren't damaged, but I have shoes that I'd prefer in those circumstances
16:10:13 <ais523> and is only useful because it obeys loop control instructions like last and redo
16:10:14 * elliott takes his aback back where it came from
16:10:15 <Vorpal> ais523, that would surely make it sub-tc, unless there is another way to make an infinite loop
16:10:20 <Sgeo> So I'm not sure how they get damaged
16:10:20 <elliott> Sgeo: That's not answering PH's question
16:10:48 <Sgeo> Phantom_Hoover, I can tie my shoes just fine. Although I learned to do so a few years later than the other kids
16:10:49 <ais523> Vorpal: you can just to the equivalent of {redo;} from Perl
16:11:03 <Vorpal> ais523, I don't know much perl, what does redo do?
16:11:25 <ais523> goes back to the start of the loop, without checking the condition again (for any loop with conditions) or doing the for loop go-to-next-element bit
16:11:34 <ais523> basically, like gotoing a label just inside the loop
16:11:50 <Vorpal> ais523, so not exactly like continue; then?
16:12:04 <ais523> nope; Perl has next which is exactly like continue
16:12:07 <ais523> but it has redo as well, which isn't
16:12:23 <Vorpal> ais523, does perl have goto in the C sense=
16:12:49 <Vorpal> ZOMGMODULES, ugly but I get it
16:13:06 <ZOMGMODULES> Vorpal: it's like the opposite of Mouse's loop, which I actually like
16:13:29 <Vorpal> ZOMGMODULES, I'm not familiar with Mouse's loop
16:13:41 <ZOMGMODULES> I forget the syntax, but all loops are of the form: is while(1) { ... if (x) break; ... }
16:13:58 <Vorpal> ZOMGMODULES, that is also ugly :P
16:14:08 <Vorpal> the condition is there for a reason
16:14:24 <Vorpal> ZOMGMODULES, of course the proper way to do a loop is by tail recursion
16:14:38 <ZOMGMODULES> that is also the proper way to design a microprocessor
16:14:48 <Vorpal> ZOMGMODULES, tail recursion? hm
16:14:50 <ais523> Vorpal: Perl does have a C-style goto, but you aren't really supposed to use it
16:14:56 <elliott> tail recursion is just low-level iteration in disguise
16:14:56 <ais523> it also uses the goto keyword for tail-recursion
16:15:06 <elliott> in fact it's practically goto ;)
16:15:08 <ZOMGMODULES> that's the "good goto" in perl. i quite like that
16:15:19 <Vorpal> <elliott> tail recursion is just low-level iteration in disguise <-- yes
16:15:19 <elliott> ais523: asterisk tail calls
16:15:37 <ais523> it can do other sorts of tail calls too
16:15:46 <ais523> but tail recursion is the only time where you really get a gain from tail-calling
16:16:15 <ais523> well, the rest of the time, it just hurts O(1) in stack space
16:16:40 <elliott> <ais523> but tail recursion is the only time where you really get a gain from tail-calling
16:16:56 <elliott> with tail recursion, you can just replace it with a while one loop, basically
16:17:08 <elliott> with mutually recursive functions, tail calls are impossible to optimise locally
16:17:09 <ais523> ZOMGMODULES: that is tail recursion, by definition
16:17:19 <elliott> tail recursion is when you tail call yourself directly
16:17:21 <Vorpal> ZOMGMODULES, that is still tail recursion, but involving more than one function in the cycle?
16:17:23 <ais523> elliott: I consider mutual recursion purely via tailcalls to still be tail recursion
16:17:24 <ZOMGMODULES> mututally recursive tail recursion may or may not be recursion.
16:17:29 <ais523> so we're just using different terminology here, I fear
16:17:31 <elliott> ais523: then you are using a different definition to everyone else.
16:17:36 <ais523> also, does your computer have a numpad?
16:17:48 <elliott> ais523: Your definition isn't really useful because your definition of "tail call" becomes kind of pointless because "tail recursion" is the only real useful sense
16:18:00 <elliott> And you have no language to talk about the trivially-optimisable kind that Guido thinks are the only kind :)
16:18:03 <elliott> ais523: And no, it's a laptop.
16:18:05 <ais523> elliott: and that's exactly what I was been saying!
16:18:16 <ZOMGMODULES> still, tail calls w/o recursion may permit inlining, or something
16:18:26 <elliott> ais523: Then stop using a less universal language that nobody else is using :)
16:18:26 <Vorpal> <ais523> also, does your computer have a numpad? <-- yes my desktop does, by laptop doesn't, unless you count the useless one accessed with the Fn key
16:18:28 <ZOMGMODULES> which might lead to different cache behavior
16:18:31 <elliott> Less universal in that it can express less.
16:18:35 <ZOMGMODULES> which might lead to significant performance changes
16:18:44 <ais523> Vorpal: that response would have been correct if zzo38 had asked the question
16:18:47 <elliott> ZOMGMODULES: I'm still miffed Pure has modules.
16:18:54 <Vorpal> elliott, he never said a nick, so that isn't very clear
16:19:08 <ais523> because anything zzo38 says is, by default, out of context
16:19:10 <Vorpal> ais523, but yes your question seemed very zzoish in that context
16:19:48 <Vorpal> <elliott> It was perfectly clear. <-- nope
16:20:01 <Vorpal> (we can go on forever)
16:20:03 <ais523> who'd be miffed at something having modules?
16:20:08 <ais523> as long as you weren't forced to use them
16:20:09 <elliott> No, I assure you I can go on longer.
16:20:16 <Vorpal> elliott, no I said we, not I
16:20:28 <elliott> There is no way you have the same amount of patience for this I do.
16:20:37 <elliott> ZOMGMODULES: They're just a kludge for not having a good inliner :(
16:20:45 <ZOMGMODULES> And it's sort of an example of the non-design behind the language in general, for me
16:20:46 <ais523> elliott: I suppose the issue is that I've been dealing with my PhD, where any situation in which the same function can appear on the call stack has to be considered to be recursion
16:20:56 <ais523> *can appear twice or more on the call stack
16:20:56 <elliott> Strange how you know these are directed at you, I mentioned no nick
16:20:57 <Vorpal> elliott, anyway it wasn't clear to me
16:20:57 <ZOMGMODULES> I keep seeing things in it, and saying, "... why?"
16:21:09 <Vorpal> <elliott> Nope <-- hah I won!
16:21:17 <elliott> I contradicted myself immediately.
16:21:43 <Vorpal> ... yes indeed I did, and thats final
16:22:07 <Vorpal> elliott, so you agree that you disagree on this?
16:22:09 <ais523> elliott, Vorpal: sorry, I'm slow, I spent a while trying to work out the context for your latest stream of comments, and only recently realised that they weren't meant to have one
16:22:39 <elliott> quality of the channel is increasing already
16:23:05 <Vorpal> elliott, nope, and what was this about now again?
16:23:26 <Vorpal> <elliott> quality of the channel is increasing already <-- yes indeed
16:23:43 <Vorpal> ZOMGMODULES, no you don't!
16:23:55 <ZOMGMODULES> having said that, for whatever it's worth, yup
16:24:54 <Vorpal> anyway I have other things to do, *hits ctrl-c at /usr/bin/elliott*
16:25:01 <Vorpal> (god that would be a nice feature)
16:25:24 <Vorpal> ZOMGMODULES, then elliott did
16:25:39 <ZOMGMODULES> assertion has been redefined to mean apathy
16:25:45 <Vorpal> ZOMGMODULES, good idea
16:26:22 <ais523> that's a stupid conversation between you lot
16:26:39 <ZOMGMODULES> it's a lovely day for a stupid conversation
16:26:43 <Vorpal> <ais523> elliott, Vorpal: sorry, I'm slow, I spent a while trying to work out the context for your latest stream of comments, and only recently realised that they weren't meant to have one <-- so was that about this convo?
16:26:51 <ZOMGMODULES> it's also a stupid day for a lovely conversation
16:26:56 <ais523> Vorpal: you just made me literally facepalm
16:27:05 <ais523> although not very hard, as I'm at work
16:27:22 <Vorpal> elliott, yes indeed since that was redefined to mean lose
16:27:38 <Vorpal> <ZOMGMODULES> it's a lovely day for a stupid conversation <-- very true
16:28:28 <ZOMGMODULES> TDD is best when the failing tests you intially write are completely random and have no bearing on your requirements
16:28:50 <Vorpal> and lets drop the law of the excluded middle
16:29:12 <Vorpal> ZOMGMODULES, how familiar
16:30:11 <Vorpal> elliott, if you have time to do this convo, lets retarget your focus to computer components
16:30:24 <elliott> ZOMGMODULES: are you the guy who comments a lot on arcane sentiment btw
16:30:49 <Vorpal> elliott, well I'm off, have to do some stuff, deadline and such
16:30:52 <elliott> i'm waaaay too tired for that now anyway. you'd get a hideous monstrosity powered by hatred.
16:31:02 <elliott> maybe: you will get that anyway. perhaps.
16:38:49 -!- variable has quit (Ping timeout: 260 seconds).
16:39:28 -!- SgeoN1 has joined.
16:41:04 -!- SgeoN1 has quit (Read error: Connection reset by peer).
16:41:18 -!- SgeoN1 has joined.
16:44:42 -!- monqy has joined.
16:47:18 -!- cheater_ has quit (Ping timeout: 240 seconds).
16:47:38 -!- cheater_ has joined.
16:49:03 -!- ais523 has quit (Ping timeout: 276 seconds).
16:51:38 -!- ais523 has joined.
16:53:18 <ais523> elliott: Vorpal: got bored yet?
16:56:17 <Vorpal> <elliott> maybe: you will get that anyway. perhaps. <-- I will do a sanity check against some people I know :P
17:02:39 <elliott> May be the stupidest code I've ever written
17:03:50 <ais523> elliott: that isn't the whole expression, is it?
17:03:56 <ais523> presumably there's more after the do
17:04:15 <elliott> but it's irrelevant to the stupidity
17:04:29 <ais523> I suppose you could write it as _:_:_ -> do { ... }; _ -> reflect
17:04:35 <ais523> but I'm not sure that that's any less stupid
17:04:45 <elliott> if length ss < two then reflect else do
17:04:57 <ais523> that doesn't work on infinite lists
17:05:00 <ais523> whereas what you wrote does
17:05:02 <Deewiant> Which turns an O(1) algorithm into an O(n) algorithm
17:05:06 <ais523> also, it's O(n) rather than O(1)
17:05:33 <elliott> I'm like a hundred percent certain GHC can optimise that
17:05:46 <Deewiant> Optimizing it would change the semantics
17:05:51 <ais523> Deewiant: I was about to say that
17:06:00 <elliott> Deewiant: Does _|_ really count as semantics here
17:06:17 <elliott> Well sure, but that's gross.
17:06:29 <elliott> Anyway if Integer is lazy then it's fine.
17:06:43 <elliott> Hey, it's Int, the result can't be _|_ can it.
17:06:45 <ais523> it isn't, as far as I know
17:06:46 <elliott> It'll overflow eventually.
17:07:00 <ais523> and an overflow is also normally represented by bottom
17:07:03 <elliott> ais523: I think Integer's laziness is actually unspecified.
17:07:05 <Deewiant> compareLength :: [a] -> Int -> Ordering
17:07:05 <Deewiant> compareLength _ n | n < 0 = GT
17:07:08 <Deewiant> compareLength (_:as) n = compareLength as (n-1)
17:07:17 <ais523> Deewiant: standard library?
17:07:21 <elliott> Deewiant: Wow, no, I prefer the case statement.
17:07:30 <elliott> <Deewiant> compareLength _ n | n < 0 = GT
17:07:34 <elliott> Why would you ever pass a negative to that.
17:07:54 <ais523> elliott: in case it wasn't a constant
17:08:00 <Deewiant> I'd rather make it correct in case you do
17:08:10 -!- variable has joined.
17:08:17 <elliott> Deewiant: It should take a natural as the second argument
17:08:31 <ais523> elliott: but that's strictly less useful
17:08:42 <ais523> in fact, there's no real reason it couldn't take arbitrary reals (that could be notated in Haskell)
17:08:54 <elliott> And yes, there is; computable reals can't be compared like that.
17:08:55 <Deewiant> elliott: If you have lazy naturals, you can just use length
17:09:03 <elliott> Deewiant: I never said lazy naturals.
17:09:13 <elliott> The fact that Haskell doesn't come with an unsigned Natural type is a flaw. :)
17:09:31 <ais523> elliott: they can be compared if they happen not to be equal
17:09:48 <pikhq_> ais523: s/arbitrary/arbitrary computable/
17:09:48 <ais523> and if they are equal, the real must actually be an integer, and you know how to work with those too
17:10:01 <elliott> ais523: There's no way to determine it's an integer, though
17:10:02 <pikhq_> We are not not not dealing in uncomputable numbers here.
17:10:03 <ais523> pikhq_: that's why I had the disclaimer that they had to be expressible in Haskell
17:10:13 <elliott> <ais523> and if they are equal, the real must actually be an integer, and you know how to work with those too
17:10:22 <ais523> I was just feeling absurd
17:10:46 -!- ZOMGMODULES has quit (Ping timeout: 258 seconds).
17:10:51 <ais523> I'm just a bit annoyed in that I'm implementing an arbitrary-computable-reals library in hardware at the moment
17:10:51 <elliott> Man the ghc binary tarball is big.
17:10:53 <ais523> based on someone's paper
17:10:58 <ais523> more or less just to prove I can
17:11:13 <Vorpal> elliott, what are you doing in haskell atm?
17:11:46 <Vorpal> <ais523> I suppose you could write it as _:_:_ -> do { ... }; _ -> reflect <-- befunge?
17:12:23 <ais523> I guessed it was Befunge-related, but that was irrelevant to the question
17:12:41 <elliott> Deewiant: Hey, Vorpal wanted to know what's a nice regex library for Haskell, ISTR you using one once and telling me it was good
17:12:42 <pikhq_> *Wow*, freshmeat.net is still around.
17:12:54 <ais523> this channel is a great one for answering programming questions, because it tells you the answer before it asks you why you're trying to do what you're doing
17:12:56 <Vorpal> <elliott> [] -> reflect
17:12:56 <Vorpal> <elliott> [_] -> reflect
17:13:00 <Deewiant> Don't remember, maybe regex-tdfa
17:13:01 <ais523> rather than tell you you're trying something stupid
17:13:29 <ais523> elliott: isn't Parsec a nice regex library?
17:13:37 <ais523> regexes are special cases of parsers, after all
17:13:41 <olsner> well, doing normal stuff in stupid ways is normal here
17:13:44 <Vorpal> <ais523> this channel is a great one for answering programming questions, because it tells you the answer before it asks you why you're trying to do what you're doing <-- often that question follows though, but I guess that is fine
17:13:59 <ais523> indeed, but it's asked out of curiosity rather than alarm
17:13:59 <elliott> "How do I reassign the integer two in Python?" "Well, import ctypes, bind to the Python API, then use malloc to [...]" "OK, thanks" "Wait, why do you want to do this?" "BEST. IMPLEMENTATION. OF. FORTE. EVARRRRRRR"
17:14:04 <Vorpal> ais523, it has the downside however of sometimes telling you utterly complicated solutions
17:14:24 <ais523> Vorpal: that is, often, an upside
17:14:42 <Vorpal> ais523, at least if your goal is to have a goo laugh yes
17:14:51 <ais523> Vorpal: or just implement something in a suitably insane way
17:16:44 <ais523> hmm, now I'm wondering how tightly linked to Haskell Parsec is
17:17:13 <olsner> I think parsec exists for a bunch of languages other than haskell
17:17:23 <ais523> that's what I'd expect
17:17:48 <ais523> e.g. it's a monad but that really isn't a Haskell-exclusive concept, and it doesn't seem to require laziness
17:18:06 <ais523> so long as you have some other way to not call a function argument immediately (say, call-by-name, thunking by hand, etc)
17:18:25 <ais523> perhaps Unlambda would be a good lang to port it to
17:20:13 <elliott> theory: every meta-layer of a system must be as powerful as the system itself, or it will inevitably either grow to be as powerful in the most ugly way possible, or be useless
17:20:30 <elliott> compare: haskell's type system vs. epigram's, cpp vs. lisp macros
17:21:25 <elliott> what's the ubuntu package for opengl dev libraries again?
17:23:46 <Gregor> Thomas Reiser (born December 19, 1963) is an American former computer entrepreneur, owner of Namesys, the primary developer of the ReiserFS and Reiser4 computer filesystems, and convicted murderer. // best phrasing ever
17:23:48 <ais523> hmm, I can't find it with the typical searches
17:23:52 <ais523> even though I think I have it installed
17:24:24 <elliott> It's mesa or something I think
17:24:38 <ais523> elliott: mesa is the name of the impl, but I can't find the exact name of the package
17:25:35 <ais523> elliott: I think it might actually be that one
17:25:39 <ais523> despite the confusing description
17:26:00 <elliott> That seems to be a non-DRI thing though odfgjdofigjdfg
17:26:10 * elliott looks for an INSTALL in haskell platfomroermer
17:26:16 <elliott> http://www.vex.net/~trebla/haskell/haskell-platform.xhtml
17:26:20 <elliott> freeglut3-dev should grab it
17:26:51 <ais523> elliott: libgl1-mesa-swx11 appears to be for software rendering, -glx and -dri for hardware rendering, and -dev the dev libraries for both
17:26:54 <pikhq_> Perl's build system is positively amazing. Not in a *good* way, but still.
17:27:11 <ais523> pikhq_: have you seen gcc's?
17:27:22 <pikhq_> Perl's is much better.
17:27:32 <pikhq_> In that I know for a fact that humans still understand it.
17:27:45 <ais523> I still maintain C-INTERCAL's is the best autotools-based build system for any compiler
17:27:56 <ais523> mostly because hardly anyone understands autotools
17:27:58 <Vorpal> pikhq_, you mean it's crazy configure that can manually ask questions interactively?
17:28:04 <ais523> and I spent about a month learning
17:28:08 <elliott> ais523: btw, I had thoughts about implementing ai-make
17:28:10 <pikhq_> Vorpal: It's hand-written!
17:28:14 <ais523> elliott: ooh, go for it
17:28:16 <pikhq_> With a hand-written in-shell makefile generator!
17:28:19 <elliott> ais523: except that it'd actually generate an autoconf/Tup system, or similar
17:28:20 <ais523> also, where did the hyhon come from?
17:28:27 <elliott> ais523: but also save a file with all your answers and things it's inferred, so it could update them
17:28:38 <ais523> and it's OK for it to go via autoconf, if necessary
17:28:42 <elliott> ais523: (save things it's inferred so that it doesn't suddenly start thinking your program is a library without asking first)
17:29:12 <ais523> my hardware compiler currently doesn't distinguish between compiling programs and libraries
17:29:22 <elliott> ais523: I was thinking that for finding C libraries, it'd look at header files you include, figure out what Debian package they're in, and then find pkg-config or .so files that that package also has
17:29:26 <ais523> as you're going to have to write glue code anyway because hardware's kind-of useless if it doesn't have I/O
17:29:27 <elliott> And determine the relevant one
17:30:01 <ais523> I was planning to look for linker errors, then looking for libraries which exposed those symbols
17:30:24 <elliott> ais523: The idea is that it'd output autoconf checking code for those libraries, though
17:30:32 <elliott> So pkg-config is more "portable" in that sense
17:30:45 <ais523> you want ai-make to generate a build system that works on any computer
17:30:48 <ais523> not just the one you happen to be on?
17:30:52 <elliott> And looking for the Debian package which includes a header is probably a lot more efficient and less error-prone than scanning all your libraries
17:31:10 <ais523> well, you'd have a database of Debian packages by symbols the libraries they contain expose
17:31:11 <elliott> ais523: Then all we'd need is a build system generator generator.
17:31:19 <pikhq_> elliott: Minor issue: headers and .so files are in different packages.
17:31:19 <elliott> AKA, a compiled source generator generator generator.
17:31:33 <elliott> ais523: Still, symbols are more brittle than headers IMO
17:31:41 <ais523> I think they're less brittle
17:31:57 <elliott> Well, it could always do both :)
17:32:01 <ais523> as headers may cover multiple libraries, or vice versa
17:32:01 <Phantom_Hoover> http://a8.sphotos.ak.fbcdn.net/hphotos-ak-snc6/227721_10150189670889681_738479680_6991603_7524340_n.jpg
17:32:04 <ais523> both sounds like the best approach
17:32:34 <pikhq_> A word to anyone who dares to write an alternate configuration system: support the same damned variables as Autoconf. Believe it or not, the variables to let you override bits of the configuration logic are a *damned good idea*.
17:33:00 <elliott> ais523: incidentally, as pikhq_ found, autoconf and tup go really well together
17:33:13 <elliott> ais523: it's the most awesomest build system ever
17:33:16 <pikhq_> tup is a Make replacement that doesn't suck.
17:33:16 <elliott> the arrows go up, so it's fast
17:33:19 <ais523> and autoconf specifically, as opposed to autotools generally?
17:33:31 <elliott> automake is unnecessary, since tupfiles are fine to write by hand in the first place :)
17:33:33 <pikhq_> Well, autoheader could work with it as well.
17:33:35 <elliott> anyway, because tup has built-in support for configuration files with things like CFLAGS in
17:33:39 <elliott> and tracks dependencies on these variables
17:33:40 <ais523> I think automake is pretty incredible, but possibly unnecessary
17:33:45 <elliott> you can just have autoconf output one of those
17:33:46 <pikhq_> And libtool could as well if you're mad.
17:33:52 <elliott> rather than generate the actual build guts, which is hideous
17:33:58 <elliott> so it's literally just finding configuration variables
17:34:06 <ais523> incredible as in possibly not a good thing, but impressive nonetheless
17:34:10 <elliott> OK, the implementation details are still utterly broken and horrific in every way, but it's good
17:34:14 <elliott> in every other aspect, that is
17:34:24 <ais523> can tup handle things like yacc which output multiple files?
17:34:32 <pikhq_> ais523: Sure, just list 'em.
17:34:44 <pikhq_> : foo.y |> !yacc |> foo.c foo.h
17:34:47 <elliott> IIRC multiple-output is in an old experimental branch
17:34:49 <elliott> pikhq_: oh, does that actually work?
17:34:58 <elliott> Arguably, yacc doing that is a misfeature, anyway ;)
17:35:08 <pikhq_> elliott: The multiple-output experimental branch is for multiple *unmentioned* outputs.
17:35:11 <ais523> the other thing is that yacc actually outputs at fixed filenames
17:35:16 <pikhq_> elliott: For e.g. Java.
17:35:18 <ais523> which is also a misfeature
17:35:37 <ais523> but unless you include a reimplementation of yacc in your build system, one you have to work around
17:35:40 <pikhq_> (it generates a fuckton of .class files)
17:35:57 <ais523> (autotools has yl-wrapper, whose only purpose is to wrap yacc and lex in order to change their calling convention into something sane)
17:36:06 <elliott> ais523: anyway, the basic gist of tup is that it's log-time, rather than linear-time like make and everything else
17:36:23 <Phantom_Hoover> http://www.independent.co.uk/news/world/europe/british-woman-murdered-in-tenerife-2283687.html
17:36:29 <elliott> ais523: because it stores file -> things that depend on it in its graph, not output -> things it depends on
17:36:30 <pikhq_> ... Wait, wait, wait, yacc outputs at *fixed filenames*?
17:36:31 <ais523> hmm, I wonder if you could easily do what missing does, too
17:36:33 <Phantom_Hoover> "Everybody is shocked. It's a very safe area. You can usually go anywhere you want in the day or at night. This is really not normal."
17:36:43 <elliott> ais523: so it can go from things that changed, to things it needs to rebuild, directly
17:36:46 <elliott> whereas make has to traverse the whole graph
17:36:50 <ais523> I think bison probably has some way to override that
17:36:54 <pikhq_> That makes it just about impossible to handle parallel builds of two yacc sources.
17:36:57 <ais523> but yacc is really stupid
17:37:05 <ais523> only way is to do them in different directories
17:37:08 <elliott> ais523: also, it has a "rebuild every time any file changes with inotify" console thing, which is a killer feature :)
17:37:20 <pikhq_> Phantom_Hoover: Race condition!
17:37:24 <ais523> elliott: there has to be some way to combine that with flymake
17:37:29 <ais523> for an even more killer feature
17:38:03 <ais523> pikhq_: you can trivially avoid race conditions simply by replacing the scheduler
17:38:13 <elliott> ais523: well, it could probably work with flymake directly, with just some sort of wrapper to intercept the output
17:38:18 <ais523> come to think of it, I actually wanted to do that recently, just can't remember why
17:38:26 <ais523> possibly it's for the best
17:38:39 <ais523> it may have been in a hypothetical that wans't true, or even a dream
17:38:58 <pikhq_> elliott: BTW, I've found that it works a *bit* better to have autoconf generate a top-level Tuprules.tup.
17:40:02 <pikhq_> elliott: Slightly less of a pain than doing in Tuprules.tup "CFLAGS=@(CFLAGS)", so you can append to it for specific targets.
17:40:55 <pikhq_> Though, actually, it'd work better to just make the !cc rule support CFLAGS_%f.
17:42:38 <ais523> anyway, I had an idea for a language recently, where instead of defining types like you do in Haskell or OCaml, they get implicitly defined by switch or match statements
17:43:12 <ais523> e.g. you write match x with | A _ -> false | B _ -> true | C x -> x, and it's of type A 'a + B 'a + C bool
17:43:32 <ais523> I shouldn't really use two different variables of the same name in examples
17:46:23 <elliott> Mrrf, I wonder if MaybeT is really the best thing here
17:47:48 <elliott> Duplicate instance declarations:
17:47:48 <elliott> instance Monad m => Applicative (StateT s m)
17:47:48 <elliott> -- Defined at Shiro/Monad.hs:25:10-46
17:47:48 <elliott> instance (Functor m, Monad m) => Applicative (StateT s m)
17:47:48 <elliott> -- Defined in Control.Monad.Trans.State.Strict
17:49:12 <elliott> ais523: yes, but the common version is wrong
17:50:31 <ais523> is there an uncommon but correct version?
17:52:38 <ais523> now that makes me wonder why people don't use it
17:53:35 <Vorpal> <ais523> anyway, I had an idea for <ais523> anyway, I had an idea for a language recently, where instead of defining types like you do in Haskell or OCaml, they get implicitly defined by switch or match statementsa language recently, where instead of defining types like you do in Haskell or OCaml, they get implicitly defined by switch or match statements <-- nice
17:54:03 <ais523> mostly for compiler writing, where you want a parse-tree type with something like 100 slightly different variants
17:54:16 <ais523> which differ in the amount of extra info they carry along, what sort of nodes they have, etc
17:55:02 <elliott> <ais523> now that makes me wonder why people don't use it
17:55:05 <elliott> they do, when they need ListT
18:05:29 <Vorpal> elliott, btw for new computer: I need one serial port, or getting an usb converter that will work with TI Blacklink (which iirc is rather timing sensitive)
18:05:57 <ais523> elliott: I found myself rather wanting a Set monad in OCaml
18:06:01 <ais523> I just used List instead
18:06:09 <elliott> ais523: sets are only monads in haskell with an extended type class
18:06:25 <ais523> hmm, I don't know what that means
18:06:30 <Vorpal> elliott, well, is serial port hard to get hold of these days? I have no idea
18:08:54 <ais523> I like serial ports too, because they're simplest to interface to hardware you build yourself
18:09:10 <Vorpal> ais523, damn, do you think it will work with an usb converter, given the timing sensitivity?
18:09:22 <elliott> Motherboards will still have them I think :P
18:09:25 <Vorpal> ais523, anyway I meant on a desktop
18:09:35 <Vorpal> ais523, on a laptop I know it is near impossible
18:09:45 <ais523> Vorpal: I'm not sure, but it depends on what sort of clock rates you're talking about
18:09:46 <Vorpal> elliott, converter it is then, surely that is possible to get hold of?
18:09:57 <Vorpal> ais523, I don't know what baud rate it uses
18:09:59 <ais523> USB can manage really high clock rates, so the sensitivity might be small in comparison
18:10:08 <ais523> if you're measuring it in baud at all, though, you'll be fine
18:10:21 <ais523> baud rates go up to about 152000 bits/second, USB is much faster than that
18:11:09 <Vorpal> ais523, well since it goes over serial port it must be baud?
18:11:27 <Vorpal> ais523, besides baud is just number of symbols / second iirc
18:11:32 <ais523> Vorpal: it depends on if it's using the serial port as a serial port
18:11:37 <Vorpal> which works fine up to any value
18:11:40 <ais523> or whether it's just forcing it to act like a bunch of GPIOs
18:11:49 <Vorpal> ais523, hm, it could be the latter
18:11:56 <Vorpal> I wouldn't put it past it
18:12:03 <ais523> I've seen the latter quite a bit
18:12:24 <Vorpal> ais523, I seen that done to the parport too
18:12:39 <ais523> (in other news, I've heard you can actually get motherboards with GPIO ports, nowadays; I have no idea how people are meant to be able to get at them to actually use them as such, though
18:13:03 <Vorpal> ais523, presumably it isn't for the consumer market
18:13:30 <ais523> although, among the leet gamer market, I bet you could advertise them as a feature and they'd buy it just because it was a feature, not because it was relevant
18:14:24 <fizzie> The blacklink version uses the serial port as gpio pins to speak the TI link protocol directly to the calc.
18:14:40 <fizzie> But it's not really all that timing-sensitive.
18:15:05 <fizzie> At least it doesn't need to be; of course that might depend on the software.
18:16:07 <fizzie> The grey serial-cable variant includes electronics to translate so that it speaks the regular serial protocol to computer-side.
18:16:57 <ais523> bleh, way to go Wikipedia
18:17:09 <ais523> I was trying to check if humans had lymph nodes behind their ears
18:17:14 <ais523> and after reading the article, I still have no idea
18:18:12 <ais523> hmm, I think possibly they do, if I understand "sternocleidomastoid", and the sentence that contains it, correctly
18:19:40 <pikhq_> Good *God*. No-op build of Mozilla takes 20 minutes.
18:20:09 <Vorpal> <ais523> I was trying to check if humans had lymph nodes behind their ears <-- pretty sure they do
18:20:36 <Vorpal> ais523, but don't quote me on that
18:20:45 <ais523> there's some weird lump behind one of my ears, and I was looking for an explanation; I guessed it was most likely a lymph node, but didn't know if they were found there
18:20:57 <Vorpal> ais523, I get that when I have a cold sometimes
18:21:17 <ais523> pikhq_: is that the build system trying to prove to itself that nothing needs changing?
18:21:38 <pikhq_> As is necessary in almost all build systems.
18:22:00 <Vorpal> yes yes, we know you are a fan of tup
18:22:34 <Vorpal> pikhq_, how long does a full build of mozilla take?
18:23:04 <Vorpal> pikhq_, much longer I guess
18:23:22 <pikhq_> I seem to recall it being something like 40 minutes on Gentoo, though.
18:23:45 <Vorpal> pikhq_, so... half the time spent at checking if anything changed?
18:23:53 <Vorpal> something is seriously wrong
18:24:02 <Vorpal> pikhq_, make shouldn't be that bad if done correctly
18:24:19 <pikhq_> Vorpal: Recursive make fucks everything up.
18:24:49 <pikhq_> It's extensively common, actually.
18:24:53 <Vorpal> pikhq_, at least cmake generates non-recursive make :)
18:24:59 <pikhq_> Automake's documentation seems to still encourage it.
18:25:18 <Vorpal> pikhq_, cmake is better than automake in that aspect then
18:25:30 <elliott> Even non-recursive make fucks it up.
18:25:48 <pikhq_> elliott: Yeah, but recursive make fucks it up *more*.
18:25:58 <ais523> recursive make is a fundamentally broken concept
18:26:10 <ais523> and the hacks designed to make it slightly less broken still don't help much
18:26:52 <elliott> ais523: the tup paper has interesting things to say about recursive make ;D ;D ;D ;D
18:27:15 <ais523> elliott: you didn't even scarequote "interesting"
18:27:37 -!- SgeoN1 has quit (Read error: Connection reset by peer).
18:27:56 <elliott> ais523: They actually are interesting :)
18:28:00 <Vorpal> why would people ever use recursive make?
18:28:06 -!- SgeoN1 has joined.
18:28:16 <ais523> Vorpal: because it's easy at first
18:28:22 <elliott> Vorpal: because non-recursive make is difficult to write and maintain for very large projects
18:28:26 <elliott> this is because make is broken
18:28:38 <ais523> hmm, recursive make is the sort of thing that would easily fall into jwz quote territory
18:30:31 <pikhq_> Recursive make is even *worse* with parallel builds being common.
18:30:51 <pikhq_> The recursion has to be serialised.
18:31:25 <pikhq_> And it can still break.
18:31:35 <Vorpal> it is sad and quite shocking that last I looked make -j2 did not work on erlang runtime source
18:31:53 <Vorpal> it tried to compile erlang code before it built the erlang compiler iirc, or something like that
18:32:15 <pikhq_> There is one thing that make builds from a clean source necessary: incomplete knowledge of dependencies.
18:32:18 <Vorpal> okay, erlang was originally made to be distributed, not multi-core, but still
18:32:29 <pikhq_> And, surprise surprise, recursive make makes that inherent.
18:33:01 <elliott> pikhq_: make's failure to track dependencies on configuration variables also forces explicit clean builds
18:33:10 <pikhq_> elliott: Ah, right, true.
18:33:21 <Vorpal> <elliott> pikhq_: make's failure to track dependencies on configuration variables also forces explicit clean builds <-- does tup do that?
18:33:49 <pikhq_> Vorpal: It also tracks dependencies on build commands.
18:34:10 <Vorpal> pikhq_, I presume tup is out of source build by default. So I guess one could set up tup to auto-build with several different build targets?
18:34:31 <pikhq_> It doesn't really handle out-of-source build, actually.
18:34:41 <ais523> pikhq_: C-INTERCAL's build system manages a full circle, tracking dependencies on everything relevant, automatically
18:34:45 <Vorpal> pikhq_, tup is pretty useless to me until it does
18:34:47 <ais523> except, I think, the versions of autotools you have installed
18:35:03 <Vorpal> ais523, what about the linker?
18:35:03 <ais523> but, say, if you modify the build system, it rebuilds the build system
18:35:03 <pikhq_> It only tracks dependencies on files in the source tree.
18:35:16 -!- aloril has quit (Ping timeout: 250 seconds).
18:35:45 <Vorpal> pikhq_, well, to me tup would be useless as of now then, I often do multiple builds of stuff I develop, one for 32-bit, one for 64-bit, and various different config flags
18:35:50 <pikhq_> Otherwise, it'd actually have to check for changes over the *entire filesystem*.
18:35:55 <Vorpal> pikhq_, doing that in tree with multiple tress = terrible
18:36:09 <Vorpal> pikhq_, you would obviously specify a source tree and a destination tree
18:36:15 <Vorpal> so no that isn't required
18:36:26 <pikhq_> Though I think there is a branch of tup for supporting multiple build variants...
18:37:09 <Vorpal> tup while interesting doesn't really seem mature.
18:37:10 <ais523> `translate de en merkbefreit
18:37:17 -!- cheater666 has joined.
18:37:21 <Vorpal> ais523, translateto iirc
18:37:23 <ais523> I bet I've messed up the syntax there
18:37:26 <ais523> `translateto de en merkbefreit
18:37:34 <ais523> `translateto en de merkbefreit
18:37:42 <ais523> `translate merkbefreit
18:37:56 <elliott> <Vorpal> <elliott> pikhq_: make's failure to track dependencies on configuration variables also forces explicit clean builds <-- does tup do that?
18:37:58 <Vorpal> ais523, maybe try google translate web page, it is less confusing :D
18:38:11 <elliott> <Vorpal> pikhq_, I presume tup is out of source build by default. So I guess one could set up tup to auto-build with several different build targets?
18:38:12 <elliott> <Vorpal> pikhq_, well, to me tup would be useless as of now then, I often do multiple builds of stuff I develop, one for 32-bit, one for 64-bit, and various different config flags
18:38:21 <elliott> out of tree is the stupidest way to do it :)
18:38:22 <pikhq_> Vorpal: The other build systems, though mature, are *broken*.
18:38:23 <elliott> <Vorpal> tup while interesting doesn't really seem mature.
18:38:31 <elliott> it works fine for small-to-medium sized projects.
18:38:31 <ais523> that doesn't fit the context
18:38:44 <pikhq_> Literally fundamentally *broken*.
18:39:07 <ais523> I don't think make is fundamentally broken when used properly, although it's suboptimal
18:39:10 <Vorpal> <pikhq_> Vorpal: The other build systems, though mature, are *broken*. <-- sure, but I consider not doing multiple build variants, such as different compilers, from the same source a showstopper to myself
18:39:55 <Vorpal> elliott, so what do you suggest? A subdir builds/ with various named variants in it?
18:40:19 <ais523> Vorpal: the way C-INTERCAL does that is with multiple out of tree builds
18:40:34 <Vorpal> ais523, same as I do for cfunge.
18:40:35 <elliott> Vorpal: it's a directory per build in the variants system being worked on, IIRC
18:40:41 <elliott> I forget the exact details read the list :P
18:41:02 <Vorpal> ais523, ick doesn't use automake does it?
18:41:29 <cheater666> * Cannot join #esoteric-minecraft (You are banned).
18:41:29 <pikhq_> It's genuinely not *that* hard to make a Makefile that works with autoconf.
18:41:31 <cheater666> * Cannot join #esoteric-minecraft (You are banned).
18:41:33 <pikhq_> Just a lot of edgecases.
18:41:41 <ais523> Vorpal: it uses automake too
18:41:44 <ais523> but not the other parts of autotools
18:41:47 <Vorpal> ais523, ah, it didn't use to?
18:41:58 <pikhq_> ais523: Well, that is most of autotools.
18:42:09 <ais523> pikhq_: yep, it uses the two major parts but not any of the little ones
18:42:15 <ais523> other than aclocal, but that's needed for automake to work
18:42:35 <Vorpal> what are the small ones now again, libtool?
18:42:35 <pikhq_> autoheader is nothing but a nicety, libtool is revolting, I dunno about the others.
18:42:47 <Vorpal> pikhq_, what does autoheader do?
18:42:55 <pikhq_> It generates a config.h.in from configure.ac.
18:43:11 <Vorpal> oh, I thought autoconf did that
18:43:23 <ais523> but that's for generating the input to autoconf
18:43:29 <ais523> it's a build system generator generator
18:43:30 -!- mtve has quit (Ping timeout: 260 seconds).
18:43:32 <pikhq_> So, pretty much you don't use libtool.
18:43:39 <ais523> I used autoheader once, but no longer
18:43:40 <pikhq_> Which is simply right and proper.
18:43:44 <ais523> to work as a starting point
18:43:52 <Vorpal> pikhq_, what was the point of libtool
18:43:58 <Vorpal> or at least the intended point
18:43:59 <Phantom_Hoover> Gregor, how do you get the line-based links for glogbot?
18:44:06 <ais523> Vorpal: to build shared libraries in a vaguely portable way
18:44:11 <pikhq_> Vorpal: To abstract building libraries.
18:44:37 <Vorpal> pikhq_, so it deals with ELF .so vs. a.out .so vs. PE .dll?
18:44:40 <pikhq_> Doing that right would actually still be nice, but libtool is fundamentally the *wrong solution*.
18:44:54 -!- ais523_ has quit (Quit: Page closed).
18:45:04 <pikhq_> Vorpal: It does so by making a shell script wrapper for the compiler, linker, install, etc.
18:45:11 <Vorpal> pikhq_, exit windows then
18:45:20 <ais523> pikhq_: I haven't looked into how libtool works
18:45:27 <cheater666> elliott, PH hates me because you hate me, so no.
18:45:28 <pikhq_> ais523: It is a giant shell script.
18:45:40 <pikhq_> ais523: With some macros for automake and autoconf to run it.
18:45:51 <Vorpal> pikhq_, like configure then (giant shellscript)
18:45:59 <elliott> cheater666: He's the one that banned you and I have been unable to formulate a valid reason to reverse this ban, so your appeal channel is PH.
18:46:08 <Vorpal> pikhq_, what about autoconf itself
18:46:25 <pikhq_> autoconf is just a small shell script wrapper around M4.
18:46:26 <Vorpal> I mean as in /usr/bin/autoconf
18:46:40 <fizzie> The TI link protocol (to go back to that) is rather idiosyncratic, so I might mention it here. It's two-data-wire ("red" and "white") half-duplex bidirectional thing, both lines with pull-up resistors, so the line's high unless either end drives it down. To send a bit, one side drives one of the lines down (depending on the bit value) and waits for the other end to ack by driving the other line down; then the sender releases the first line, and finally the receiv
18:46:44 <cheater666> elliott: there's no appeal, just an anmerkung.
18:46:45 <ais523> pikhq_: not quite; autoconf is a shell script /generated by/ m4
18:46:50 <Vorpal> pikhq_, m4 seems horrible btw
18:46:53 <pikhq_> ais523: autoconf itself?
18:47:03 <elliott> cheater666: That's not my problem.
18:47:06 <Vorpal> $ wc -l /usr/bin/autoconf
18:47:19 <Vorpal> pikhq_, while not gigantic, I wouldn't call that small
18:47:23 <ais523> Vorpal: that probably doesn't count
18:47:31 <ais523> for me, /usr/bin/autoconf is a wrapper that picks a version of autoconf
18:47:42 <Vorpal> ais523, for me it doesn't seem to be
18:47:46 <cheater666> elliott: then, and in other moments too
18:47:46 <ais523> based on the version the file wants
18:47:59 <Vorpal> # Generated from autoconf.as by GNU Autoconf 2.65.
18:47:59 <Vorpal> # Generated from autoconf.in; do not edit by hand.
18:47:59 <ais523> $ wc -l /usr/bin/autoconf2.59
18:48:00 <ais523> 271 /usr/bin/autoconf2.59
18:48:10 <elliott> cheater666: Then I am not sure why you pasted that line twice.
18:48:26 -!- aloril has joined.
18:48:38 <Vorpal> ais523, I wonder which of those files it was really generated from
18:48:47 <Vorpal> ais523, maybe autoconf.as was generated from autoconf.in?
18:48:52 <ais523> Vorpal: it's obviously a two-stage generation
18:49:09 <ais523> anyway, for me, autoconf2.59 is a shell script with no "generated from" messages, but it /looks/ like it was autoconf-generated
18:49:15 <ais523> and all it does, apart from options, is run autom4te
18:49:23 <Vorpal> ais523, anyway I only have one autoconf here, not versioned variants
18:49:27 <ais523> which was "generated from autom4te.in"
18:49:36 <ais523> but is clearly written in Perl
18:49:37 <Vorpal> ais523, this is ubuntu 10.04
18:49:59 <elliott> we get what OS you use already
18:50:22 <ais523> so autoconf, for me, appears to be a shell script wrapper around a shell script wrapper around a Perl wrapper around m4
18:50:26 <ais523> two of which are autogenerated
18:50:35 <Vorpal> ais523, a perl wrapper? :D
18:50:53 <ais523> it's a bit more complex than a wrapper, actually
18:50:55 <Vorpal> ais523, be happy fork() is fast on linux!
18:51:04 <Vorpal> ais523, where did you find it?
18:51:06 <ais523> it's acting as a wrapper, but doing more than wrappers normally do
18:51:19 <ais523> where I normally look for executables
18:51:25 <Vorpal> ais523, my autoconf ends with: exec "$AUTOM4TE" "$@"
18:51:33 <ais523> Vorpal: indeed, so does mine
18:51:48 <Vorpal> /usr/bin/autom4te is indeed perl
18:52:25 <Vorpal> Phantom_Hoover, times out for me
18:52:44 <Vorpal> ais523, the perl thing seems to be the actual logic of the program
18:52:58 <Vorpal> ais523, it calls m4 on the .ac files and so on it seems
18:53:08 -!- KingOfKarlsruhe has joined.
18:53:17 <ais523> except the logic is mostly in the m4
18:53:19 <Vorpal> ais523, so I guess the perl one can be considerd the re-generating program proper
18:53:38 <Vorpal> handle_m4 ($req, keys %{$req->macro})
18:53:38 <Vorpal> if $force || ! $req->valid;
18:53:55 <Vorpal> and it's control flow weird
18:54:03 <ais523> that's just a reverse if
18:54:10 <Vorpal> ais523, but I don't like it
18:54:14 <ais523> is there any particular reason why the arguments to if shouldn't be the other way round?
18:54:15 <elliott> that's a terrible reverse if
18:54:19 <elliott> that's autoconf's fault, not perl's
18:54:29 <ais523> but yes, I agree that one would be clearer written the normal way round
18:54:55 <ais523> $force || !$req->valid and handle_m4 ($req, keys %{$req->macro})
18:55:07 <ais523> also, that second argument to handle_m4 is worrying
18:55:07 <Vorpal> ais523, that lacks the word "if"
18:55:17 <ais523> Vorpal: it uses "and", the forwards equivalent to if
18:55:20 <Vorpal> ais523, what does the second argument do
18:55:45 <ais523> it takes the property "macro" of $req, interprets it as a pointer to a hash, dereferences it, and takes the keys
18:55:53 <ais523> and I'm struggling to think that a well-defined system would find that operation useful
18:56:14 <Vorpal> my ($req, @macro) = @_;
18:56:23 <Vorpal> that I hate too with perl
18:56:31 <Vorpal> the mess it makes of parameters
18:57:01 <Vorpal> it complicates reading the source immensely to not force the parameter list to be in a specific place
18:57:17 <elliott> let's be honest, it's always on the first line of the function.
18:57:24 <Vorpal> elliott, most often yes
18:57:37 <fizzie> A sub with a prototype (the "($@)" bit), how modern.
18:57:39 <Vorpal> elliott, I seen it after an if case or such
18:57:47 <Vorpal> fizzie, yes that makes it worse
18:58:17 <Vorpal> elliott, I seen things like looking at the first argument to decide what to do with the next few arguments
18:58:33 <ais523> fizzie: prototypes in Perl are a bad idea for the same reason C++ operator overloading is a bad idea
18:58:34 <Vorpal> elliott, this wasn't in something like printf either
18:58:40 <ais523> they make it almost impossible to figure out what a given line of code does
18:58:46 <ais523> or in the case of Perl, in fact, how it parses
18:58:59 <Vorpal> ais523, shouldn't it help static analysis?
18:59:13 <fizzie> Yes, the fact that the prototypes affect parsing is quite horreeble.
18:59:18 <Vorpal> ais523, I must know how perl manages to fuck prototypes that badly
18:59:24 <fizzie> Parsing of all calls, that is.
18:59:27 <Vorpal> I dread the answer, but I need to know
18:59:35 <ais523> I think there's a pathological case somewhere where prototypes make the difference between a slash being interpreted as a division sign, or a regex delimeter
18:59:46 <Vorpal> ais523, ...................... wtf
19:00:03 <elliott> That's not surprising Vorpal
19:00:07 <ais523> at least without prototypes, calls are parsed consistently
19:00:15 <elliott> It is obvious given what prototypes are
19:00:21 <Vorpal> anyway here is the whole handle_m4 http://sprunge.us/RTES
19:00:24 <elliott> Honestly I wish people would pick on the actually perverse aspects of Perl
19:00:30 <elliott> I wish Vorpal would oh never mind
19:00:44 <ais523> but what prototypes are, are instructions to parse calls to the functions in a certain way
19:00:51 <Vorpal> ais523, can you tell me from that what it does to the second argument?
19:01:00 <Vorpal> elliott, anyway you could easily check it on your own system
19:01:32 <ais523> Vorpal: $@ tells it to keep the second argument as an array rather than decomposing the array into individual arguments
19:01:46 <Vorpal> ais523, that second argument was the one you found worrying above
19:01:53 <Vorpal> ais523, so can you explain why it does it now
19:02:01 <ais523> Vorpal: I already explained what it did
19:02:06 <ais523> I wasn't worried about its parsing
19:02:09 <Vorpal> ais523, yes but why I meant
19:02:18 <ais523> just that it expressed an operation that, although well-defined, I was scared was useful
19:02:30 <ais523> oh, you want me to read the entire source code just to explain one line?
19:02:47 <Vorpal> ais523, well that function is like 30 lines or so, probably less
19:02:52 <Vorpal> and most is a xsystem call
19:03:27 <ais523> Vorpal: it's not a built-in function
19:03:42 <ais523> my guess is it's a wrapper around system(), which is similar to C's system()
19:03:52 <Vorpal> ais523, it is called twice in that code, but not defined
19:04:07 <Vorpal> it seems to include stuff from /usr/share/autoconf
19:04:09 <ais523> it might be a library function
19:04:17 <ais523> from a library I don't have memorised
19:04:17 <Vorpal> use Autom4te::General;
19:04:22 <fizzie> An unbackslahed @ will just gobble all arguments and force list context; they still end up as separate elements in the @_ list, like they would in that call without prototypes.
19:05:10 <Vorpal> ais523, ah, xsystem is in /usr/share/autoconf/Autom4te/FileUtils.pm
19:05:37 <Vorpal> Same as C<system>, but fails on errors, and reports the C<@argv>
19:05:48 <Vorpal> or whatever it is called
19:06:52 <Vorpal> ais523, I'm scared, wc -l in /usr/share/autoconf/Autom4te/*.pm gives 3559 lines
19:07:09 <Vorpal> plus 1086 for /usr/bin/autom4te
19:07:19 <Vorpal> ais523, if most of the logic is in the m4 part... this is absurd
19:07:22 <ais523> it's typical for most programming languages of about that complexity, and programs of about that complexity
19:07:33 <ais523> Vorpal: it's mostly going to be stuff for dealing with files, directories, shells, etc
19:07:42 <ais523> as in, actually finding everything relevant and running it
19:07:44 <Vorpal> wc -l /usr/share/autoconf/autoconf/*.m4
19:07:49 <fizzie> Pod is the format/markup language; perldoc's the documentation-handling tool.
19:08:47 <ais523> to put it another way, perldoc is the program with which you process pod files
19:08:54 <ais523> which might contain interspersed Perl
19:09:05 <Vorpal> can I run it on the .pm file?
19:09:27 <Vorpal> # Some old m4's don't support m4exit. But they provide
19:09:27 <Vorpal> # equivalent functionality by core dumping because of the
19:09:27 <Vorpal> # long macros we define.
19:09:36 <Vorpal> that comment is so... absurd
19:10:50 <Vorpal> define([m4_undefine], defn([undefine]))
19:10:51 <Vorpal> m4_undefine([undefine])
19:10:57 <ais523> Vorpal: http://www.perlmonks.org/?node_id=663393
19:11:42 <ais523> oh, and that's just renaming the builtin undefine function
19:11:58 <Vorpal> ais523, I seen that proof btw
19:12:05 <Vorpal> ais523, it does the same for define and defn
19:12:07 <ais523> Vorpal: look at the bit about prototypes again
19:12:11 <Vorpal> I have no clue what defn is for
19:12:31 <ais523> obviously, defining m4_undefine in terms of undefine wouldn't work if you then redefined undefine
19:12:38 <ais523> instead, it's defined as the definition of undefine
19:12:43 <ais523> and yes, although I'm a bit rusty on the matter
19:12:48 <Vorpal> <ais523> instead, it's defined as the definition of undefine <-- augh
19:13:37 <ais523> Vorpal: what's so augh about htat?
19:14:18 <Vorpal> ais523, the logic of m4 I guess
19:14:45 <Vorpal> m4_define([m4_car], [[$1]])
19:14:45 <Vorpal> [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
19:14:45 <Vorpal> [m4_dquote(m4_shift($@))])])
19:14:50 <Vorpal> elliott, is that elegant too?
19:14:54 <ais523> also, the m4 definition of # is beautifully insane
19:15:00 <ais523> it doesn't actually introduce a comment, like you might think
19:15:08 <ais523> instead, it causes the entire line to be copied literally, including the #
19:15:15 <Vorpal> ais523, I know, it uses del or something for that iirc?
19:15:26 <ais523> it means "discard newline"
19:15:31 <ais523> but it also discards everything in between too
19:15:33 <Vorpal> ais523, what about # then
19:15:43 <ais523> # doesn't mean "discard newline"
19:15:46 <ais523> I said what it did earlier
19:16:08 <ais523> there are various other things that don't mean "discard newline", too
19:16:21 <ais523> in fact, quite a lot of things don't
19:16:50 <Vorpal> elliott, is this also perfectly readable? http://sprunge.us/OZgU
19:17:16 <ais523> Vorpal: that's not really very bad at all
19:17:29 <ais523> it's just fully parenthesized
19:17:42 <ais523> the really bad things are the bits which use multiple levels of quoting
19:18:29 <Vorpal> ais523, what paradigm is m4?
19:18:44 <ais523> Vorpal: it's like cpp taken to the extreme
19:18:47 <Vorpal> I see several functional functions defined by helper stuff to autoconf
19:18:55 <Vorpal> there is a map here for example
19:19:52 <Vorpal> m4_define([_m4_foreach],
19:19:53 <Vorpal> [m4_pushdef([_m4_f], _m4_for([4], [$#], [1],
19:19:53 <Vorpal> [$0_([1], [2],], [)])[_m4_popdef([_m4_f])])_m4_f($@)])])
19:19:53 <Vorpal> m4_define([_m4_foreach_],
19:19:58 <ais523> it's basically based on substitution, and it's easy to go functional from there
19:20:12 <ais523> yep, that's a better example of m4 insanity
19:20:19 <Vorpal> ais523, what does it do
19:20:26 <ais523> the amount of quoting shenanigans going on there is making my headhurt vaguely
19:20:38 <ais523> vaguely knowing m4 isn't enough to actually be able to /read/ it
19:20:39 <elliott> <Vorpal> elliott, is this also perfectly readable? http://sprunge.us/OZgU
19:20:47 <elliott> Are control structure implementations ever pretty
19:21:09 <Vorpal> elliott, see the short example I pasted inline
19:21:36 <ais523> the example pasted inline is much more insane than either of the other two things you pasted
19:21:50 <Vorpal> elliott, ais523 take m4_case then: http://sprunge.us/ddHj
19:22:11 <Vorpal> ais523, please rate insanity of it
19:22:20 -!- SgeoN1 has quit (Read error: Connection reset by peer).
19:22:30 <ais523> it's [[$$1[$$3]$$2[]]] that really got me going "wtf" internally
19:22:49 <Vorpal> ais523, any clue what that bit could possibly mean?
19:23:00 <ais523> it looks like it's a doubly-quoted or triply-quoted something
19:23:09 <ais523> designed to unquote at different stages
19:23:19 <ais523> sort-of like the stuff people get up to in ///
19:23:24 <Vorpal> ais523, what about the [] stuff there?
19:23:32 <ais523> [] is what autoconf redefines quotes to
19:23:46 <ais523> it's `' by default, but those are really bad quotes to have if you want to mess around with shellscript
19:23:50 <Vorpal> ais523, no I meant the specific empty [] in what I pasted
19:23:59 <ais523> it's part of the reason I'm so confused
19:24:12 <ais523> ah, perhaps it's to stop the text generated by unquoting twice merging with the next token
19:24:21 <Vorpal> ais523, [] interfers with if [ "$x" -eq 5 ] and so on though
19:24:41 <ais523> test is used rather than [] everywhere in autoconf just to avoid clashing with the quote marks
19:24:51 <ais523> I think [] were chosen as they match and aren't really necessary in shellscript
19:25:00 <Vorpal> m4_define([_m4_map_args_pair__],
19:25:00 <Vorpal> [[$$1([$$2], [$$3])[]]])
19:25:00 <Vorpal> m4_define([_m4_map_args_pair_end],
19:25:00 <Vorpal> [m4_if(m4_eval([$3 & 1]), [1], [[m4_default([$$2], [$$1])([$$3])[]]])])
19:25:03 <Vorpal> ais523, what about those?
19:25:22 <ais523> Vorpal: has this become a session of "paste random m4 and rate its insanity levels"?
19:25:28 <ais523> as that isn't a massively interesting game, really
19:25:46 <Vorpal> ais523, but yeah m4 seems quite insane indeed
19:26:22 <Vorpal> ais523, it gets more boring in the higher level layers of autoconf btw
19:26:39 <Vorpal> mostly it is the stuff I can read from .ac files
19:27:26 <Vorpal> ais523, the stuff you write in aclocal.ac/configure.ac isn't really m4, it is a language defined in m4 by prepending a crapload of definitions. Am I right?
19:27:39 <Vorpal> also... /usr/share/autoconf/autoconf/erlang.m4 this scares me
19:28:06 <Vorpal> why does autoconf have stuff to deal with c, fortran and erlang
19:28:11 <Vorpal> I guess c++ stuff is in the c one
19:28:17 <ais523> Vorpal: it is m4, but with good libraries
19:28:23 <ais523> sometimes you write more or less directly in m4, or in sh
19:28:33 <ais523> it's basically sh preprocessed by m4
19:28:37 <Vorpal> ais523, mostly sh + autoconf for what I done
19:29:50 <Vorpal> ais523, I think that they tried literate m4 (except with # at start of lines) in one file... It features a nicely numbered TOC
19:30:15 <ais523> someone go write a file in literate cpp
19:30:19 <Vorpal> ais523, though the effort ends about halfway, where it seems quite non-literate after that
19:31:02 <Vorpal> hm a number of files has TOCs, but only one seems to start off in literate style
19:31:47 <cheater666> i expect zzo to come up with literate phpini
19:31:50 <Vorpal> ouch this embedded sed script is horrible to read
19:31:57 <Vorpal> what with all the escaping
19:32:21 <Vorpal> ais523, btw you don't need ` in shell script, $() is much more readable anyway
19:32:38 <ais523> autoconf is written in /portable/ sh
19:32:43 <Vorpal> ais523, it is POSIX however
19:32:46 <ais523> to everything but csh/tcsh, as those two are completely irredemable
19:32:57 <ais523> Vorpal: if you insisted on POSIX, you wouldn't need autoconf in the first place
19:33:02 <ais523> insisting on POSIX is missing the point entirely
19:33:42 <Vorpal> ais523, actually, vxworks is certified posix, considering that, I think one might need autoconf :P
19:34:16 <Vorpal> I doubt they renewed that
19:34:31 <Vorpal> ais523, so one still needs autoconf then
19:40:53 -!- ais523 has quit (Remote host closed the connection).
19:41:56 -!- hiato has quit (Ping timeout: 252 seconds).
19:42:19 -!- hiato has joined.
19:42:41 -!- pikhq_ has quit (Ping timeout: 246 seconds).
19:42:46 -!- pikhq has joined.
20:12:48 <elliott> textify :: ByteString -> ByteString
20:12:48 <elliott> textify = B8.unlines . reverse . takeWhile (/= B.empty) . reverse . map (fst . B.spanEnd (== space)) . B8.lines
20:12:52 <elliott> The kind of composition dreams are made of.
20:15:13 -!- KingOfKarlsruhe has quit (Quit: ChatZilla 0.9.86.1 [Firefox 3.6.17/20110420140830]).
20:18:50 <Vorpal> :i Handle lists GHC.MVar.MVar GHC.IO.Handle.Types.Handle__
20:19:02 <Vorpal> :i GHC.MVar.MVar GHC.IO.Handle.Types.Handle__ is too wide for the screen to display
20:19:14 <Vorpal> (:t GHC.MVar.MVar GHC.IO.Handle.Types.Handle__ can be displayed however)
20:19:26 <Vorpal> wait, that was just an error
20:19:32 <Vorpal> but :i GHC.MVar.MVar GHC.IO.Handle.Types.Handle__
20:19:37 <Vorpal> goes outside my terminal width
20:19:52 <Vorpal> elliott, looking at types
20:20:34 <Vorpal> elliott, but come on this is silly: http://sprunge.us/iQZV
20:21:16 <Vorpal> elliott, don't you agree that side scrolling is absurd
20:21:34 <Vorpal> I can't even read that type
20:21:38 <Vorpal> elliott, what does ! in there mean
20:21:52 <Vorpal> as in !dev -> GHC.IO.Handle.Types.HandleType [...]
20:21:56 <cheater666> Vorpal, i find the indenting annoying in haskell
20:22:10 <elliott> You're not meant to understand that.
20:22:19 <elliott> I think a lot of type synonyms got together to produce that type.
20:22:42 <elliott> Yeah no that type is just insanely fucked, wow.
20:22:46 <Vorpal> elliott, what about the foreach thingy in it
20:23:05 <elliott> There's a forall, that's just universal quantification, usually implicit
20:23:13 <elliott> (a -> a) == (forall a. a -> a)
20:23:14 <Vorpal> elliott, yeah why isn't it implicit here
20:23:35 <Vorpal> isn't that an extension?
20:23:46 <elliott> They can do whatever they like.
20:23:52 <elliott> This is what you get for poking around. :p
20:24:08 <Vorpal> elliott, anyway how does the ! strictness annotation work?
20:24:19 <elliott> It simply means that the constructor argument is evaluated strictly.
20:24:27 <elliott> myCons x y z = y `seq` RealCons x y z
20:24:36 <elliott> data Foo = RealCons x [exclamation mark]y z
20:24:43 <elliott> except that you could just use RealCons directly
20:24:52 <elliott> and that's just that for GADTs
20:24:56 <Vorpal> elliott, ah, but will it have any effect if I put ! on a type signature of myself?
20:25:07 <elliott> Constructor signature, yes.
20:25:15 <elliott> Which you only find in GADTs.
20:25:23 <elliott> Normally you'd just put it before the field name in regular old ADT syntax.
20:25:53 <Vorpal> elliott, anyway that thing is badly fucked
20:26:10 <elliott> It just uses a lot of type synonyms.
20:26:20 <elliott> It's like decompiling the type.
20:26:27 <elliott> Or don't, because it won't make any more sense.
20:26:54 <Vorpal> don't* even know where the source is
20:26:59 <Vorpal> not on this system anyway
20:27:20 <elliott> Or apt-get source ghc[six]
20:27:22 <Vorpal> elliott, I meant... "presumably it is in some weird runtime internal part of it"
20:27:42 <elliott> No, that'll just be in the low-level library part thing.
20:27:48 <elliott> I mean, christ, IO is defined in Haskell.
20:27:57 <Vorpal> elliott, oh, I thought GHC.foo was runtime stuff?
20:28:03 <Vorpal> elliott, what parts *are* in C then
20:28:36 <elliott> It may actually be internal in GHC.
20:28:43 <elliott> It doesn't need to be if you have bang patterns, though.
20:29:03 <Vorpal> elliott, anyway, which stuff would be in pure C, certainly (+) for Int I guess?
20:29:42 <elliott> No, I'd expect that to be in the compiler backend...
20:30:02 <Vorpal> elliott, so which functions are in the ever-elusive RTS?
20:30:15 <elliott> I don't think you understand what the RTS is.
20:30:32 <Vorpal> the ffi I guess is in the compiler backend
20:30:49 <Vorpal> elliott, so the RTS is just the GC? Nothing else?
20:31:16 <Vorpal> elliott, you told me not to above!
20:31:25 <elliott> I said it wouldn't make any more sense.
20:31:35 <elliott> http://www.haskell.org/ghc/dist/7.0.3/ghc-7.0.3-src.tar.bz2
20:32:27 <elliott> The rts/ directory may be relevant. :p
20:32:35 <elliott> And not a line of Haskell in site.
20:33:13 <Vorpal> elliott, did you mean in sight?
20:33:35 <Vorpal> elliott, one last question tonight (excluding possible follow up questions): at which level does IO (as in getline and so on) leave the world of haskell and enter the realm of C? Does it use the ffi perhaps? Or does it use special compiler support?
20:33:50 <elliott> The question is incoherent.
20:34:13 <elliott> In that I simply do not understand it and suspect your understanding of things is wrong in a way that I can't describe.
20:34:53 <Vorpal> elliott, basically when getLine for example is evaluated in main, at some point it must translate into a call to for example the read() syscall
20:35:07 <Vorpal> after various buffering and so on
20:35:17 <Vorpal> elliott, are you with me so far?
20:35:31 <elliott> I really think source diving is the best idea here.
20:35:34 <elliott> I'm not the best explainer.
20:35:42 <Vorpal> elliott, but do you know the answer?
20:36:01 <elliott> I know basically how it works; not the low-level details, but I'm fairly sure I have a semi-decent grasp on that part.
20:36:11 <elliott> Note that the libraries folder contains "low-level" Haskell stuff too.
20:37:03 <Vorpal> elliott, anyway the question is really quite simple: how does a call to getLine leave the world of 100% haskell and call libc? Does it do it through the FFI stuff of haskell or is it done in some other way?
20:37:50 <Vorpal> elliott, was that RTS = RunTimeSystem? Or RTS = Read The Source?
20:38:38 <Vorpal> elliott, hm weird they don't simply use the FFI, that seems neater somehow
20:38:56 <elliott> Since the FFI has to leave magic-Haskell-land too.
20:39:06 <elliott> And why would GHC tie itself to C's API?
20:39:49 <Vorpal> elliott, well yes, but if this used the FFI that would mean a more unified way to do it, but I guess if you want to port it to platforms without a standard library it makes sense to put it in the RTS
20:40:28 <Vorpal> now I want to see ghc on bare metal :D
20:40:45 <elliott> http://programatica.cs.pdx.edu/House/
20:43:01 <elliott> newtype IO a = IO (State# RealWorld -> (# State# RealWorld, a #))
20:43:13 <elliott> (libraries/ghc-prim/GHC/Types.hs)
20:43:26 <elliott> Vorpal: It's this magic thing.
20:43:26 <Vorpal> and uh what is the lone # there
20:43:29 <elliott> It's used for both IO and ST.
20:43:44 <elliott> i.e. equivalent to just pushing two things on the stack.
20:43:57 <Vorpal> elliott, I'm a bit surprised haskell allows that
20:43:57 <elliott> It's basically a glorified messed up unboxed strictstate monad.
20:44:22 <Vorpal> elliott, so a language extension, presumably considered unsafe too?
20:44:34 <elliott> But yes, it's an extension.
20:44:48 <Vorpal> elliott, doesn't the compiler automatically try to unbox stuff iirc?
20:45:31 <Vorpal> easy to optimise some stuff that way
20:45:46 <elliott> But not zealously because that would be dumb.
20:45:54 <elliott> unsafePerformIO :: IO a -> a
20:45:54 <elliott> unsafePerformIO m = unsafeDupablePerformIO (noDuplicate >> m)
20:45:54 <elliott> {-# NOINLINE unsafeDupablePerformIO #-}
20:45:54 <elliott> unsafeDupablePerformIO :: IO a -> a
20:45:54 <elliott> unsafeDupablePerformIO (IO m) = lazy (case m realWorld# of (# _, r #) -> r)
20:46:02 <elliott> noDuplicate = IO $ \s -> case noDuplicate# s of s' -> (# s', () #)
20:46:40 <elliott> This version of 'unsafePerformIO' is slightly more efficient,
20:46:40 <elliott> because it omits the check that the IO is only being performed by a
20:46:40 <elliott> single thread. Hence, when you write 'unsafeDupablePerformIO',
20:46:40 <elliott> there is a possibility that the IO action may be performed multiple
20:46:40 <elliott> times (on a multiprocessor), and you should therefore ensure that
20:46:40 <elliott> it gives the same results each time.
20:46:56 <elliott> noDuplicate just does magic to prevent that.
20:47:15 <Vorpal> elliott, what is that lazy function?
20:47:50 <elliott> It's even IN THE DAMN MANUAL.
20:48:09 <Vorpal> elliott, I tried :i lazy in ghci, but I guess it is in a different package
20:48:44 <elliott> Well, it might be but it doesn't act like one.
20:48:57 <Vorpal> elliott, so where is it then, haskell.org times out for me atm...
20:49:10 <elliott> I'm finding it in the quagmire that is the manual.
20:50:07 <elliott> Vorpal: http://www.haskell.org/ghc/docs/7.0.3/html/libraries/base-4.3.1.0/GHC-Exts.html#g:7
20:50:30 -!- invariable has joined.
20:50:36 -!- variable has quit (Quit: /dev/io failed).
20:50:45 -!- invariable has changed nick to variable.
20:50:46 <Vorpal> I wonder why it is so slow today
20:51:19 <Vorpal> elliott, huh, "it is lazy in its first argument, even though its semantics is strict." what does that even mean
20:52:22 <elliott> (I# x) `plusInt` (I# y) = I# (x +# y)
20:52:24 <elliott> WELL THAT EXPLAINS IT THEN
20:52:40 <elliott> (+#) :: Int# -> Int# -> Int#
20:52:44 <elliott> I HAVE A FEELING THIS WAS ADDED JUST FOR HADDOCK
20:52:54 <elliott> This is a generated file (generated by genprimopcode).
20:52:54 <elliott> It is not code to actually be used. Its only purpose is to be
20:53:18 <Vorpal> elliott, elliott where is the plusInt stuff from?
20:53:48 -!- mtve has joined.
20:54:24 <elliott> plusInteger :: Integer -> Integer -> Integer
20:54:25 <elliott> plusInteger i1@(S# i) i2@(S# j) = case addIntC# i j of
20:54:25 <elliott> else plusInteger (toBig i1) (toBig i2)
20:54:27 <elliott> plusInteger i1@(J# _ _) i2@(S# _) = plusInteger i1 (toBig i2)
20:54:29 <elliott> plusInteger i1@(S# _) i2@(J# _ _) = plusInteger (toBig i1) i2
20:54:31 <elliott> plusInteger (J# s1 d1) (J# s2 d2) = case plusInteger# s1 d1 s2 d2 of
20:54:59 <Vorpal> elliott, I like +#, I wonder what that does
20:55:01 <elliott> Heh -- GHC.Integer.GMP.Internals uses the FFI.
20:55:07 <elliott> foreign import prim "integer_cmm_plusIntegerzh" plusInteger#
20:55:08 <elliott> :: Int# -> ByteArray# -> Int# -> ByteArray# -> (# Int#, ByteArray# #)
20:55:13 <elliott> Vorpal: Adds unboxed ints.
20:56:08 <elliott> Seems I lied; GHC doesn't default to utf-eight, it determines it based on the locale.
20:56:59 <Vorpal> oh yeah for the doc gen
20:57:23 <Vorpal> elliott, that is a weird placeholder
20:57:39 <elliott> It's just "fix id" without any dependencies :P
20:58:23 <Vorpal> elliott, couldn't they simply make it (+#) = x or some such?
20:59:25 <Vorpal> elliott, anyway, night
20:59:29 -!- Vorpal has quit (Quit: ZNC - http://znc.sourceforge.net).
21:03:53 -!- ajf|offline has changed nick to ajf.
21:13:20 <Sgeo> LispIDE fails in the same way as newLISP-GS
21:15:15 <elliott> if the issue all along has been taht you fail at emacs bindings
21:16:13 <Sgeo> Ctrl-J does nothing in newLISP-GS, and does newline but not indent in LispIDE
21:16:53 <Sgeo> (I have no problems with how emacs indents, although I didn't know about C-j
21:17:48 <monqy> have you tried not using newLISP-GS or LispIDE
21:17:59 <Sgeo> elliott, yes.. it tabs. Unintelligently
21:18:03 <Sgeo> I want intelligent tabbing
21:18:25 <Sgeo> monqy, but it's just so tempting to try something other than emacs... but everything sucks
21:18:34 <elliott> emacs is rad you should use emacs
21:18:41 <Sgeo> Phantom_Hoover, IDE that newLISP comes with
21:18:57 <monqy> emacs is probably cool too but I'm not good at the keybindings
21:18:57 <elliott> as is something that isn't either
21:19:06 <elliott> Phantom_Hoover: ill leave YOUR exams
21:19:23 <Sgeo> I should probably try to get Racket working in emacs
21:19:34 <Sgeo> But doing that would mean breaking my reliance on Lispboxen
21:19:48 <Sgeo> Racket or Chicken
21:20:18 <Sgeo> monqy, I played with ClojureBox a while ago, and am now playing with LispBox. It's a Lisp packaged together with emacs
21:20:56 <Sgeo> It itself isn't a Lisp. It comes with Clozure Common Lisp
21:21:11 <monqy> is that a good lisp
21:21:22 <Sgeo> monqy, I'm not CL-savvy enough to compare CLs
21:27:55 <Phantom_Hoover> (I was *going* to suggest using SBCL with manually-configured SLIME like normal people, but you clearly can't use SBCL and your Emacs setup is not something I want to think about right now.)
21:28:18 <Sgeo> There's a Windows port of SBCL
21:32:32 <monqy> try not using windows
21:48:37 <augur> any dutch people in here?
21:49:53 <augur> WHY ARE YOU ALWAYS JUDGING ME
22:09:59 -!- augur has quit (Remote host closed the connection).
22:12:24 -!- zzo38 has joined.
22:18:23 -!- hiato has quit (Ping timeout: 248 seconds).
22:20:34 <Phantom_Hoover> Since I stopped following Dresden Codak, the latest arc still hasn't pulled itself out of single digits.
22:23:45 <Phantom_Hoover> In the 3 months or so since I stopped reading, there have been a whole two comics.
22:25:31 <pikhq> Ever since making the comic full-time, his update schedule has *dropped*.
22:25:45 <pikhq> Yes, THIS IS HIS DAY JOB.
22:27:21 <pikhq> Phantom_Hoover: Dresden Codak *is his day job*.
22:28:16 <pikhq> Not really. You have to actually have something that appeals to them. Which isn't as easy at it seems.
22:28:24 <pikhq> However, with that accomplished, you're getting fucktons.
22:29:08 <pikhq> Be OCD about the art.
22:30:12 <Phantom_Hoover> Clearly, since the plots and characters are paper-thin.
22:30:26 -!- hiato has joined.
22:30:54 <pikhq> It *does* show that he is used to writing one-offs.
22:31:59 <pikhq> His plots and characters are perfectly fleshed out for that context. His longer plot(s?) seem to really push it, though.
22:33:42 <pikhq> They help, though. Only minimal development is needed on them, though.
22:35:36 <Phantom_Hoover> I would debate whether the caricatures developed by one-offs really count as characters.
22:37:00 <pikhq> *Anyways*, point is, he seems just straight-up not used to writing well-developed stories.
22:37:47 <pikhq> And his art has an obscene amount of attention to detail.
22:37:47 <Phantom_Hoover> I'm sure this extends to a more general point, but the only other strip I can think of off-hand that went from one-offs to plots is Casey & Andy, and it doesn't really fit.
22:41:11 -!- MigoMipo has quit (Read error: Connection reset by peer).
22:45:18 <Phantom_Hoover> Conclusion: Dresden Codak will be put in the Library of Crapness on Mars.
22:47:15 <Phantom_Hoover> Also, people who cannot draw men so draw women instead and claim that they're men will be exiled to Phobos, but that's an irrelevant aside.
22:54:40 -!- azaq23 has quit (Quit: Leaving.).
22:56:21 <zzo38> Apparently the Akagi manga has no women because the author cannot draw women very well
22:59:10 -!- aloril has quit (Ping timeout: 250 seconds).
23:05:04 -!- quintopia has quit (Ping timeout: 252 seconds).
23:10:54 -!- aloril has joined.
23:16:42 -!- quintopia has joined.
23:23:38 -!- elliott has quit (Ping timeout: 246 seconds).
23:26:06 -!- BeholdMyGlory has quit (Remote host closed the connection).
23:26:30 -!- BeholdMyGlory has joined.
23:33:09 <Sgeo> Did Valve deliberately include a non-paradox in a poster of paradoxes?
23:35:15 <Sgeo> "Does a set of all sets contain itself?" is not a paradox
23:36:44 -!- pikhq_ has joined.
23:37:05 -!- pikhq has quit (Ping timeout: 260 seconds).
23:40:05 <Sgeo> http://cloud.steampowered.com/ugc/594685399013523781/6ADB57123D73270F2957B9EE32B6DFF91A1C0AEE/
23:44:21 -!- FireFly has quit (Quit: swatted to death).
23:46:47 <ajf> Sgeo: it is a paradox
23:52:26 <ajf> !c printf("%d", sizeof(type));
23:52:56 <ajf> !c const size_t a = 7; printf("%d", sizeof(a));
23:53:12 <ajf> !c const size_t a = 12; printf("%d", sizeof(a));
23:55:02 <pikhq_> type is undefined, so sizeof(type) will fail.
23:58:29 <Lymia> !c int i;for(i=0;i<1000;i++){((unsigned char*)main)[i]=42;}
23:58:31 <EgoBot> ./interps/gcccomp/gcccomp: line 52: 32648 Segmentation fault /tmp/compiled.$$