00:00:03 <zzo38> I don't really like the way that pattern match failure can be caught in IO in Haskell. It should be a macro that changes a function to one resulting in IO and raising the proper exceptions for that, it makes more sense mathematically, this way, to me, at least
00:00:04 <oerjan> quintopia: oh hm reading the wp page, i doubt that.
00:00:27 * elliott would be happy with `class MonadZero m { where mzero :: m a; mzero = mfail (error "mzero"); mfail :: a -> m b; mfail _ = mzero }`.
00:00:41 <elliott> shachaf: I don't want to give the same treatment to Nothing, though.
00:01:19 <shachaf> You mean Maybe a = Nothing (exists b. b) | Just a?
00:01:29 <elliott> That's how you told me about it.
00:01:31 <shachaf> How can it be wrong when it feels so right?
00:01:35 <Phantom_Hoover> <shachaf> You mean Maybe a = Nothing (exists b. b) | Just a?
00:01:51 <shachaf> Phantom_Hoover: FAR OUT, DUDE
00:01:58 <shachaf> What if, like, NOTHING EXISTED
00:02:40 <shachaf> elliott: The real solution is to have GHC give that treatment to everything.
00:02:49 <shachaf> So any constructor has a hidden field for storing an optional _|_.
00:03:04 <elliott> shachaf: You know, I might not object to
00:03:14 <elliott> seek :: a -> IO (Maybe String)
00:03:42 <elliott> (Because it's not preserved under <any function>.)
00:04:00 <elliott> (The trick for mfail works specifically because you have to pack it manually in your type.)
00:04:03 <elliott> (So your (>>=) handles it.)
00:04:19 <elliott> I... kind of support this solution now.
00:04:23 <elliott> I wasn't expecting that to happen.
00:04:45 <shachaf> I mean, you like to think you do. But if you thought about it some more I'm sure you wouldn't.
00:05:00 <elliott> Well, can *you* come up with a decent argument against it?
00:05:40 <elliott> shachaf: It's as evil as error and asynchronous exceptions.
00:05:54 <elliott> That's a pretty low level of evil for Haskell.
00:06:32 <shachaf> Well, it has a certain charm to i.
00:06:45 <shachaf> Why don't you go propose it in #haskell?
00:07:15 <shachaf> Why don't you write a proposal on SO?
00:07:17 <elliott> I mean, I might think it's a good idea, but I'm also sane enough to know everyone will think I'm crazy.
00:07:34 <elliott> shachaf: No discussion allowed, dude! You have to phrase it as "Would this be a good idea?".
00:07:38 <elliott> And hope it's not closed for being non-constructive.
00:08:21 <shachaf> elliott: THOSE INTUITIONIST FASCISTS.
00:08:50 <shachaf> Huh, Google has one result for "intuitionist fascist".
00:08:57 -!- Klisz has quit (Quit: SLEEP, GLORIOUS SLEEP).
00:09:30 <elliott> http://www.jstor.org/pss/1953935
00:09:57 <shachaf> elliott: It's just too abstract for you.
00:12:19 -!- Phantom_Hoover has quit (Quit: Leaving).
00:12:37 <elliott> shachaf: Did you actually sleep?
00:12:44 <elliott> You said you were going to and then reappeared.
00:13:39 -!- zzo38 has quit (Remote host closed the connection).
00:15:48 <oerjan> quintopia: oh i have a hunch what your problem is. you may be confusing the polynomial and the arithmetic hierarchy.
00:16:21 <oerjan> being inside PSPACE applies to the former, being undecidable and stuff applies to the latter.
00:16:34 <elliott> shachaf: Can you make Stack Overflow's rankings update quicker?
00:17:20 <shachaf> elliott: Well, I have insider information on what the rankings will be like on the next update.
00:17:44 <elliott> shachaf: Already is on at least one ranking: http://stackoverflow.com/tags/haskell/topusers
00:18:10 <oerjan> and while both can be thought of as alternating quantifiers, and so may have an algorithm such as tarski-kuratowski applies to them, they do it in a different way. iirc, in the polynomial hierarchy you want all the variables to be polynomially _bounded_, while in the arithmetic hierarchy bounded quantification is ignored.
00:18:10 <shachaf> http://stackoverflow.com/tags/monads/topusers
00:19:29 <shachaf> http://stackoverflow.com/tags/higher-rank-types/topusers
00:19:38 <shachaf> elliott: Man, you're just winning that popularity contest.
00:20:44 <shachaf> elliott: World Expert in Higher Rank Types in the last 30 days.
00:21:29 <shachaf> elliott: That ehird fellow on SO is really polite and well-spoken and what not.
00:21:37 <shachaf> You should try to be more like him/her.
00:22:02 <elliott> shachaf: He's actually Don Stewart claiming the identity of another to deflect backlash against his aggressive Haskell evangelism.
00:22:22 <elliott> shachaf: Anyway, the thing is that I'm polite in exchange for meaningless internet points.
00:22:27 <elliott> People don't give me the right kind of meaningless internet points here.
00:22:34 <shachaf> My attempt to be gender-neutral there only sort of worked.
00:22:40 <shachaf> @google "gender-neutral there only sort of worked"
00:23:14 * oerjan gives elliott a swat point -----###
00:23:41 <elliott> oerjan: See, that's the wrong kind.
00:23:53 <shachaf> elliott: Not so meaningless now, are they?
00:24:47 <kallisti> elliott: what if you could trade SO rep for bitcoins?
00:25:01 <elliott> kallisti: Then I'd have *two* kinds of meaningless internet point.
00:25:19 <kallisti> well, as far as I know bitcoin translates to real money I think...
00:25:44 <elliott> I'm sure I can buy drugs with SO rep too.
00:26:32 <shachaf> I would sell elliott drugs for SO rep.
00:26:32 <kallisti> unless some drug user is looking to get some made SO rep.
00:27:05 <kallisti> it's not very difficult for a user to become a dealer in this situation.
00:27:27 <elliott> shachaf: How much?!?!?!?!?!
00:27:30 <kallisti> how to become a drug dealer at least temporarily: 1) have drugs 2) want to sell drugs 3) someone wants to buy your drugs
00:27:43 <oerjan> <elliott> OK maybe a Mac Lane party wouldn't be such a completely terrible idea? <-- it's a bit of a close call.
00:27:55 <elliott> oerjan: OK where's the pun.
00:27:56 <oerjan> to Mac LAN party, that is.
00:28:00 <shachaf> elliott: Can you ever transfer SO karma?
00:28:10 <elliott> But abuse would get cracked down on pretty quickly.
00:28:22 <kallisti> especially abuse related to drug trafficking
00:28:29 <shachaf> You don't want to mess with that Spolsky fellow.
00:28:40 <elliott> oerjan: I still don't get it.
00:28:53 <kallisti> I'm surprised Acme::Comment doesn't have brainfuck-style comments.
00:28:54 <oerjan> elliott: a LAN party, with Macs.
00:29:08 <elliott> shachaf: Sorry, only me and PH are invited.
00:29:14 <elliott> This is because neither of us know category theory.
00:29:22 <elliott> Also, we're not working mathematicians.
00:29:27 <shachaf> You gotta do category theory at a MacLane party.
00:29:28 <oerjan> elliott: just one letter away, duh
00:29:31 <kallisti> elliott: Mac Lane -> Mac LAN ha ha ha ha ha ha ha ha ha ha ha ha ha
00:29:47 <shachaf> kallisti: Hey, that mockery should be directed at me.
00:29:57 <kallisti> shachaf: ha ha ha ha ha ha ha ha ha ha ha haha
00:30:05 <shachaf> I thought I made an original pun.
00:30:15 <shachaf> But I was making a pun on Mac LAN which was making a pun on Mac Lane.
00:30:19 <kallisti> but no really I'm going to see if I can patch brainfuck comments into Acme::Comment
00:30:46 <kallisti> imagine brainfuck comments in perl source... yesssssss
00:31:10 <kallisti> defined as anything that is not a valid brainfuck instruction
00:32:04 <oerjan> kallisti: i sense a bit of a problem there
00:32:44 <oerjan> kallisti: i don't think you can do much perl programming using only brainfuck instruction letters.
00:33:00 <kallisti> the import thing is comment syntax
00:33:22 <oerjan> i guess it _would_ improve readability a lot.
00:33:28 <kallisti> Acme::Comment even supports perl comments
00:33:36 <kallisti> use Acme::Comment type => 'Perl';
00:33:51 <kallisti> not to be confused with Python and AWK comments
00:35:19 <kallisti> though it doesn't document that it supports the {- -} form
00:39:04 <kallisti> (100) DO NOTE THAT the following perl code uses intercal comments
00:40:16 <kallisti> it doesn't mention anything require just the right amount of PLEASE
00:45:49 <oerjan> hm is INTERCAL case sensitive
00:46:37 <kallisti> I usually see intercal commands written in uppercase form but I don't really know.
00:47:13 -!- elliott has quit (Ping timeout: 252 seconds).
00:48:12 <kallisti> !perl my %x = (1, 2, 3, $x{1}); print %x
00:48:24 <kallisti> heh. it would be cool if you could actually do that.
01:03:05 -!- Klisz has joined.
01:25:42 <oerjan> > [0..]>>-liftM2(,)"ab"
01:25:43 <lambdabot> No instances for (GHC.Num.Num [a2], GHC.Enum.Enum [a2])
01:26:02 <oerjan> > [0..]>>-liftM(,)"ab"
01:26:03 <lambdabot> Couldn't match expected type `[b]'
01:26:03 <lambdabot> against inferred type `b1 -> (a1...
01:27:35 <lambdabot> [('a',0),('a',1),('b',0),('a',2),('b',1),('a',3),('b',2),('a',4),('b',3),('...
01:32:15 -!- Tinman-811 has joined.
01:33:12 -!- Tinman-811 has left.
01:33:15 * oerjan wonders what that was about
01:34:47 <kallisti> I mean other than cycle being applied to "ab"
01:36:01 <oerjan> no. it's closer to liftM2(,) but it's not that either, if you look carefully.
01:36:45 <kallisti> isn't it like zipWith but slightly out of order?
01:40:40 <kallisti> variable `elem` [constant1, constant2]
01:40:53 <kallisti> I wonder if GHC unrolls this expression during compilation.
01:41:13 <kallisti> I guess it would be difficult to do generally but I feel that it's possible.
01:41:39 <kallisti> but you have to know that elem terminates.
01:45:44 <kallisti> perhaps if you had a special type of rule pragma, programmers could apply transformations at compile-time under the condition that an argument is a constant.
01:47:10 <kallisti> but... really for lists that could be handled automatically. If it's determined that a function has a terminating condition and is applied on a constant list
01:50:33 -!- testbot2 has joined.
01:50:33 -!- testbot2 has quit (Excess Flood).
01:53:24 -!- shi7brix has joined.
01:53:30 -!- testbot2 has joined.
01:53:30 -!- testbot2 has quit (Excess Flood).
01:53:47 -!- augur_ has joined.
01:54:32 -!- shi7brix has left.
01:55:06 -!- augur has quit (Read error: Connection reset by peer).
01:55:30 <oerjan> i sense that the test might not be entirely successful.
01:55:32 -!- testbot2 has joined.
01:55:32 -!- testbot2 has quit (Excess Flood).
02:01:00 -!- testbot2 has joined.
02:01:00 -!- testbot2 has quit (Excess Flood).
02:01:45 -!- augur_ has changed nick to augur.
02:08:46 -!- Klisz has quit (Quit: SLEEP, GLORIOUS SLEEP).
02:10:48 -!- testbot2 has joined.
02:12:28 -!- testbot2 has quit (Client Quit).
03:02:30 -!- yiyus has quit (Read error: Connection timed out).
03:16:23 -!- Frooxius has joined.
03:16:33 -!- yiyus has joined.
03:28:12 -!- azaq23 has quit (Quit: Leaving.).
03:35:46 -!- Klisz has joined.
03:36:44 <HackEgo> luciamoraca denun incrivald pungerait reto delanoscoute fiempt acorito buti adthroehoull pati syj nurerà sbile esis p6rime sobron coull's dillework instricaven prek ressimo getaskau schiger invivam
04:00:18 -!- monqy has quit (Quit: hello).
04:03:47 -!- lambdabot has quit (Ping timeout: 240 seconds).
04:07:44 -!- lambdabot has joined.
04:47:06 -!- MDude has changed nick to MSleep.
04:48:21 -!- zzo38 has joined.
04:51:36 -!- oerjan has quit (Quit: Good night).
04:52:27 <zzo38> I added one idea to esolang list of ideas
04:59:02 <zzo38> I wrote this idea: If you use a variable where a specific type is expected, it is an implicit cast and it changes the actual value of the variable to that casted value too, rather than only reading it, and there isn't much other way to affect values of variables.
05:01:58 -!- qubital has joined.
05:04:07 -!- qubital has left.
05:12:35 -!- Klisz has quit (Quit: SLEEP, GLORIOUS SLEEP).
05:21:07 <zzo38> http://esolangs.org/wiki/List_of_ideas Now I moved some of the sections, and now I added one more thing which mentions the [[User:Zzo38/Astro-Q]] article so it is no longer completely irrelevant
05:23:55 <zzo38> Now there is one section for music, one section for mathematics, one section for physics, one section for implementation, etc
05:32:59 <zzo38> I now added a "Game" section too.
05:36:11 <zzo38> I have added two additiona entries to the page:
05:36:16 <zzo38> * Programming language using TeX DVI output as the program code.
05:36:26 <zzo38> * Physics of planets/astronomy tells the program what to do (possibly by using astrological signs or aspects or whatever). Possibly make such an esolang feature usable with User:Zzo38/Astro-Q
05:45:23 <zzo38> OK, now I have even done more reorganization to the list of ideas
06:00:00 <quintopia> it looks the same as the last i looked
06:00:50 -!- Guest554116 has quit (Quit: !).
06:41:51 -!- itidus20 has joined.
06:43:27 -!- sebbu2 has joined.
06:43:27 -!- sebbu2 has quit (Changing host).
06:43:27 -!- sebbu2 has joined.
06:46:36 -!- sebbu has quit (*.net *.split).
06:46:36 -!- MSleep has quit (*.net *.split).
06:46:36 -!- Madoka-Kaname has quit (*.net *.split).
06:46:36 -!- Sgeo has quit (*.net *.split).
06:46:36 -!- kmc has quit (*.net *.split).
06:46:36 -!- itidus21 has quit (*.net *.split).
06:46:36 -!- Deewiant has quit (*.net *.split).
06:46:36 -!- rodgort has quit (*.net *.split).
06:46:36 -!- Nisstyre has quit (*.net *.split).
06:46:36 -!- atehwa has quit (*.net *.split).
06:50:00 -!- kmc has joined.
06:50:00 -!- MSleep has joined.
06:50:00 -!- Madoka-Kaname has joined.
06:50:00 -!- Sgeo has joined.
06:50:00 -!- Deewiant has joined.
06:50:00 -!- rodgort has joined.
06:50:00 -!- Nisstyre has joined.
06:50:00 -!- atehwa has joined.
06:50:35 -!- Nisstyre has quit (Max SendQ exceeded).
06:52:22 -!- Nisstyre has joined.
07:05:06 -!- itidus20 has quit (Read error: Connection timed out).
07:06:15 -!- itidus20 has joined.
07:12:06 <zzo38> So,,, does it understand,,, now???
07:30:17 -!- zzo38 has quit (Remote host closed the connection).
07:37:35 -!- pikhq_ has joined.
07:39:41 -!- pikhq has quit (Ping timeout: 240 seconds).
07:55:35 -!- Phantom_Hoover has joined.
07:57:08 <kmc> http://docs.python.org/library/cookie.html#Cookie.SerialCookie it's great that the standard library has such a convenient function which is so incredibly dangerous
07:57:24 <kmc> "Stores any Python value in a cookie! This will cut your balls off, 100% guaranteed."
08:03:42 <shachaf> Well, at least it's deprecated.
08:16:00 <Jafet> "pickle strings can be crafted to cause arbitrary code to execute on your server"
08:16:07 <Jafet> They make it sound difficult
08:17:34 <fizzie> Only the utmost expert criminals can craft such strings, and it takes months of meticulous work.
08:17:55 <shachaf> fizzie: I usually just buy a pre-crafted string on the black market.
08:18:05 <shachaf> Of course, once you use it, it can never be used again.
08:31:32 <kmc> hand-crafted by loving artisans according to the traditional ways of a bygone era
08:35:23 <kmc> shachaf, deprecating it is just a hilariously inappropriate response
08:35:51 <kmc> it's good if upgrading Python breaks code using this function
08:36:13 <kmc> because that code is almost certainly exploitable
08:36:46 <pikhq_> We live in a world that deprecated gets, instead of redefining it to have semantics of "#error YOU ARE A MORON"
08:37:19 -!- nooga has joined.
08:37:20 <kmc> i think that's not so bad
08:37:23 <kmc> not as bad
08:37:41 <pikhq_> Though I suppose it's *theoretically* possible to use gets securely...
08:37:45 <kmc> there is a lot of C code which is never going to be run setuid or as a remotely accessible service
08:38:04 <pikhq_> If you've redefined stdin to be a pipe, and your process is on the other end.
08:38:51 <kmc> whereas most web services try to enforce some separation between "users who can submit unauthenticated HTTP requests" and "users who can execute arbitrary code as the server"
08:38:54 <pikhq_> kmc: Or run by a end user?
08:39:11 <pikhq_> I don't want input to a program deleting ~
08:39:28 <kmc> running such a program on untrusted input would also be bad
08:40:25 <kmc> also C has a standard saying you need to provide gets()
08:40:43 <kmc> Python does whatever the fuck they want
08:41:02 <kmc> anyway in both cases i'd support hiding it behind some flag that requires positive action to be enabled
08:41:24 <shachaf> C11 removed gets(), it seems.
08:41:32 <kmc> i hate the attitude that a vulnerability isn't a vulnerability if it's documented in some document nobody reads
08:41:53 <pikhq_> Though POSIX still mandates it.
08:42:26 <kmc> by the way in my Python 2.7.2+, SerialCookie does not raise a DeprecationWarning, and help(Cookie.SerialCookie) gives no warning about security
08:42:47 <pikhq_> Though a strictly conforming POSIX app SHALL NOT use it.
08:43:03 <kmc> but it does say "IF AN INCOMING VALUE IS NOT IN A VALID PICKLE, FORMAT, THEN AN EXCEPTION WILL BE RAISED. Note: Large cookie values add overhead because they must be retransmitted on every HTTP transaction. Note: HTTP has a 2k limit on the size of a cookie. This class does not check for this limit, so be careful!!!"
08:43:13 <kmc> that's what's really important
08:43:19 <shachaf> OK, that's kind of ridiculous.
08:43:31 <shachaf> At least it ends in "be careful!!!".
08:43:35 <kmc> be careful!!! of gasoline fumes (while you're taking a chainsaw to the groin)
08:43:36 <shachaf> So you know to be careful.
08:44:08 <kmc> my software is 100% secure
08:44:15 <kmc> because the documentation says "this program may have bugs, don't trigger them"
08:44:18 <shachaf> Once the user has been told that they should be careful, it's no longer the library author's fault if something bad happens.
08:44:28 <kmc> if you have a security bug, then you have violated the software contract
08:45:26 <pikhq_> Not to mention the law of least surprise.
08:46:18 <kmc> i can't be held responsible for what happens if people use the software out of spec
08:46:36 <pikhq_> I can't be held responsible for my actions against people who write unreasonable specs.
08:47:07 <kmc> it's a lot like secure programming in C
08:47:13 <kmc> there's only one simple rule
08:47:19 <kmc> don't make any mistake, ever.
08:47:22 <shachaf> kmc: Where would Ksplice be if people didn't write bugs?
08:47:41 <kmc> shachaf, feature upgrades!
08:48:17 <kmc> every day you could download new microoptimizations
08:48:38 <kmc> (except that ksplice'd functions are slightly slower to call, but oh well)
08:49:12 <kmc> the beginning of the old function is overwritten with a jump to the new
08:49:16 <pikhq_> shachaf: Broken window fallacy? :)
08:49:50 <shachaf> kmc: Presumably if you patch a function multiple times, it will only ever get one extra jump, though, right?
08:49:52 <kmc> (also other entry points to the old function, if there are any)
08:50:01 <pikhq_> Probably also the only way of doing any hot-patching of a binary.
08:50:16 <kmc> pikhq_, it's not that clever, it's probably the least interesting thing about how ksplice works
08:50:22 <kmc> shachaf, I don't recall
08:51:19 <shachaf> What are the more interesting parts of Ksplice?
08:51:23 <shachaf> I should probably just read the paper.
08:51:41 <kmc> more interesting is the fact that ksplice can patch a static function, or can patch in new code which calls a static function
08:51:46 <kmc> so it's not relying on the exported symbols list
08:52:07 <pikhq_> Oh, right, ksplice works automatically from basically whatever happens to be the running kernel.
08:52:19 <kmc> not really
08:52:26 <pikhq_> Which gives you a lot of work to do before you even have a hope of hot-patching...
08:52:40 <kmc> you need a source tree for the kernel you're currently running
08:53:28 -!- xandy has left ("Leaving").
08:53:29 <kmc> when preparing a patch, you build the old and new code with gcc -ffunction-sections
08:53:31 -!- Jafet has quit (Quit: Leaving.).
08:54:03 <kmc> the ksplice tools do a content-aware diff on the resulting object files
08:54:58 <kmc> using -ffunction-sections means that you have a relocation for every call
08:56:42 <kmc> for a given call instruction in the binary, you know by name which function is being called, even if it's non-exported
08:57:04 <kmc> at runtime, you compare the pre-patched code you built with the actual running kernel, instruction by instruction
08:57:49 <kmc> this is for safety but it also allows you to find the load addresses of those non-exported functions
08:59:22 <kmc> because you see that same call instruction again, and decode its target
09:00:31 <shachaf> With inline functions I suppose you just patch the function calling it?
09:00:57 <kmc> the tools work at the binary level, and so are mostly oblivious to inline functions etc.
09:01:16 <kmc> if you change a function which is inlined to 20 callers, it looks like you changed those 20 functions
09:01:30 <kmc> (which is awkward because patching more code => bad, but there's really no way around it)
09:02:15 <kmc> also sometimes a change in the code for one function will cause gcc to change its mind about register allocation in an unrelated function
09:02:29 <kmc> then you end up patching both
09:02:53 <kmc> (though they were working on solutions to that problem, but I probably should not talk about them)
09:07:25 <kmc> pikhq_, so yeah, it only works from whatever happens to be the running kernel, if you can replicate a build environment for that kernel
09:07:36 <kmc> that's part of the value the commercial service added, versus the open-source tools
09:08:35 <kmc> the admins at Billy Bob's Discount VPS and Fried Chicken probably don't have the time or skills to make a bug-compatible copy of the CentOS 5 kernel build environment
09:09:04 <kmc> but it's true that it works on kernels which were built with no knowledge of ksplice
09:09:29 <kmc> and we were proud of hot-patching machines which were last booted before the company or product existed
09:10:07 <kmc> the other interesting thing about ksplice is the way it ensures that you're not splicing a function that's currently in use
09:10:22 <kmc> which is basically, it scans every kernel stack
09:10:28 <kmc> but there's a bunch of subtlety and trickiness to that
09:11:23 <kmc> linux has this great feature called stop_machine which... does what it says on the tin
09:12:09 <kmc> it gives your code complete control of the (OS-visible behavior of) processors
09:12:34 <kmc> but of course it's tricky and buggy and double so if you're talking about supporting RHEL4 which means 2.6.9
09:14:00 <shachaf> How long did Ksplice make a machine unresponsive, in bad cases?
09:14:39 <kmc> Virtuozzo 4 has a bug which makes stop_machine very slow
09:14:57 <kmc> other than that, it's probably a few ms at worst
09:15:10 <kmc> a lot of the prep work is done outside stop_machine
09:15:47 <kmc> loading the update (which is itself a kernel module) and matching the code
09:16:44 <kmc> if the stack check inside stop_machine fails, then it gives up the CPU before trying again
09:16:53 <kmc> (obviously, because nothing's going to change if it doesn't)
09:23:54 -!- Deewiant has quit (Ping timeout: 240 seconds).
09:26:21 <pikhq_> ... RHEL 4 is still supported oh my god why
09:30:33 -!- Deewiant has joined.
09:34:49 -!- Sgeo has quit (Read error: Connection reset by peer).
09:39:01 -!- Sgeo has joined.
09:42:23 -!- ais523 has joined.
09:43:57 <shachaf> What a smug yuppie kmc is.
09:44:33 <kmc> some people are wrong about trains on the internet
09:52:05 -!- itidus20 has quit (Quit: Leaving).
09:53:04 -!- itidus21 has joined.
09:54:48 <kmc> pikhq_, why? because people would pay for it :D
09:59:53 -!- monqy has joined.
10:07:28 -!- atrapado has joined.
10:07:57 -!- myndzi has quit (Read error: Connection reset by peer).
10:11:02 -!- myndzi has joined.
10:15:24 <atrapado> do you prefer python style nesting or c style nesting: tabs or {} ?
10:17:10 <shachaf> Python doesn't use tabs, it uses indentation.
10:18:24 -!- nooga has quit (Ping timeout: 252 seconds).
10:21:18 <atrapado> i see that brackets are better for pasting code here
10:22:17 <kallisti> 05:16 < shachaf> Python doesn't use tabs, it uses indentation.
10:22:30 <kallisti> shachaf wins the Pedantic Point of Year award. congratulations!
10:22:48 <shachaf> I assumed you were just Russian.
10:23:10 <monqy> kallisti wins generosity 2012
10:23:53 <kallisti> no doubt because of my revolutionary searchlog tool of the year.
10:31:34 -!- ais523 has quit (Ping timeout: 244 seconds).
10:38:03 -!- myndzi has quit (Read error: Connection reset by peer).
10:41:59 -!- myndzi has joined.
10:44:22 -!- ais523 has joined.
10:44:57 <ais523> hmm… the department has been trying to persuade people (including me) to add "follow us on twitter: https://twitter.com/uobcompsci" to their signatures
10:45:12 <ais523> so, umm, I'm going to discharge my CIVIC DUTY by mentioning it once in #esoteric
10:46:05 <shachaf> "Choosing to Study MSc Computer Science at Birmingham was a life transforming decision for me."
10:46:27 <shachaf> 10 PRINT Tweets from the School of Computer Science at the University of Birmingham; 20 GOTO 10
10:47:01 <ais523> I haven't actually read it; should I?
10:47:49 -!- Vorpal has joined.
10:48:01 <ais523> I'm not actually entirely sure who runs that account
10:48:11 <ais523> I /hope/ it's a consortium of staff, of which some are trolling the others
10:48:34 <shachaf> They followers/followees ratio isn't as good as mine.
10:48:38 <Phantom_Hoover> ais523, I assume that you detest Twitter and all who use it because of some technical faux pas or other they've made?
10:48:39 <fizzie> It seems a reasonably active account, though.
10:48:52 <ais523> Phantom_Hoover: I don't actually detest Twitter at all
10:49:00 <ais523> although I'm annoyed at the way it uses JavaScript, that's about it
10:49:02 <fizzie> Latest own twat seems to be: "And so begins the countdown to the first personal hygiene related mail of the year."
10:49:11 <Vorpal> this looks interesting *loads log*
10:49:28 <fizzie> Oh, it's a recently started thing, too.
10:50:12 <fizzie> They could retweet a couple of fungot tweets, that's always the sure road to success.
10:50:12 <fungot> fizzie: like a very clear mirror to break, luckwise. it is a good idea. i will go and make a tent down a gas tank
10:50:53 <fizzie> fungot: You've got like 19 followers. (Most of them seem to want to sell something.)
10:50:53 <fungot> fizzie: you try again. you feel stupid and hate yourself a very official? you'll be up to your first time either.
10:50:55 <ais523> fizzie: it wouldn't even be entirely offtopic
10:50:57 <ais523> only /mostly/ offtopic
10:51:36 <ais523> Vorpal: context is that the university I work for are trying to persuade its employees to put a link to their twitter account in their signatures
10:51:55 <fizzie> Vorpal: Heh, fungot tweeted "cfunge may already work that way" 12 hours ago.
10:51:56 <fungot> fizzie: to the left is that house shape you've seen everything! i just can't get a clear shot and killed some powerful monsters with his new hammer
10:52:07 <fungot> Phantom_Hoover: a little later... a few minutes. wow he is so cool. two more large gizmos. it was once the island
10:52:56 <fizzie> Phantom_Hoover: E's even customized eir page background to have the source code in it.
10:53:11 <fizzie> fungot: Aren't you just the cleverest bot. *pat*
10:53:11 <fungot> fizzie: his birthday is in a few minutes. wow he is so cool. two more large gizmos. it was once the island, but honestly i've only read a few books on it.
10:53:55 <fungot> Available: agora alice c64 ct darwin discworld europarl ff7 fisher fungot homestuck* ic irc iwcs jargon lovecraft nethack pa qwantz sms speeches ss wp youtube
10:54:01 <fizzie> Some day I should stick in more styles in the twitter-poster, it's only got four at the moment.
10:57:12 <Vorpal> <ais523> Vorpal: context is that the university I work for are trying to persuade its employees to put a link to their twitter account in their signatures <-- I saw that in the log
10:57:34 <Vorpal> <fizzie> Vorpal: Heh, fungot tweeted "cfunge may already work that way" 12 hours ago. <-- hm, did it specify what way?
10:57:34 <fungot> Vorpal: as a veteran of the game in the first place, so he can just button it
10:57:48 <Vorpal> okay that made perfect sense.
10:57:56 <Vorpal> fizzie, also got a link to the twitter page?
10:58:21 <fizzie> Vorpal: https://twitter.com/fungot -- and not really, though the previous "About IRC" tweet was: ":) i'll have none of that is not discrete. the server is in delphi right now"
10:58:21 <fungot> fizzie: it is a hate so pure and... pumpkin seeds?
10:58:28 <Vorpal> <Phantom_Hoover> OMG fungot has twitteR?? <-- yes, I had forgot about it though. Was ages ago it was last mentioned
10:58:28 <fungot> Vorpal: an old colonel lost, but a new brother gained. together they will ascend, each time you must be adventurin'.
10:58:46 <Vorpal> fizzie, well, definitely not about cfunge then
10:58:46 <fizzie> So I guess it could be that cfunge is discrete? Or in Delphi?
10:59:10 <Vorpal> fizzie, not the latter last I checked
10:59:17 <fizzie> The immediate preceding tweet was "About Chrono Trigger: him. and only the hero can wield your sword with you until then. would you mind if i walked around with you for a..."
10:59:18 -!- rupsbant has joined.
10:59:25 <fizzie> I'm not sure how that would be related to cfunge.
10:59:28 <Vorpal> fizzie, and since it runs on a computer it is probably discrete yes
10:59:32 <fizzie> Do you wield swords in it often?
10:59:46 <Vorpal> fizzie, in real life or in RPGs?
11:00:01 <fizzie> In cfunge. With cfunge. I don't know, somehow related to cfunge.
11:00:04 <Vorpal> in real life I don't think I ever wielded a sword
11:00:19 <fizzie> It could be a metaphorical sword, I guess.
11:00:24 <Vorpal> cfunge doesn't even implement SWORD (it could in 64-bit mode maybe?)
11:00:25 <fizzie> The sword of optimization, or something.
11:01:11 <Vorpal> fizzie, that is probably one of those dual-edged things
11:05:41 <fizzie> Premature sword is bad. Sometimes it's best leave the sword to the compiler. It's often profitable to sword your algorithms instead of swording the implementation. A profile-guided sword can be more effective. Hmm.
11:09:43 <fizzie> Ooh, from #nethack, an object lesson of "be careful what you wish for":
11:09:43 <fizzie> <Rodney> dingo (Tou Hum Fem Neu) wished for "blessed fireproof +2 Staff of Aesculapius", on turn 992
11:09:43 <fizzie> <Rodney> dingo (Tou Hum Fem Neu), 204 points, killed by touching The Staff of Aesculapius
11:10:00 * Vorpal tries to understand the point of these java API docs: "This protected field is implementation specific." Why even document that it exists if you can't use it in a sane way?
11:10:39 <Vorpal> so I assume it says that protected field must exist just that you can't use it portably?
11:11:48 <Vorpal> fizzie, gah I haven't played nethack for over a year, which class is that staff for? Was it priest?
11:12:52 <fizzie> "Asclepius (play /æsˈkliːpiəs/; Greek: Ἀσκληπιός Asklēpiós [asklɛːpiós]; Latin Aesculapius) is the God of Medicine and Healing in ancient Greek religion. -- The rod of Asclepius, a snake-entwined staff, remains a symbol of medicine today, --"
11:13:11 <fizzie> It's the snake-on-a-stick thing.
11:13:47 <fizzie> Well, yes; but isn't the other one the snakes-on-a-stick?
11:13:55 <Vorpal> fizzie, when I was small I used to think it was somehow related to doctors curing you from poisonous snake bites
11:14:06 <Vorpal> (I wasn't very clear on the details of it)
11:14:29 -!- Jafet has joined.
11:14:38 <Vorpal> fizzie, also that needs to be a movie
11:24:00 <Phantom_Hoover> I have seen this comic before, a long time ago, but it is now 10,000 times better.
11:24:42 <Vorpal> ais523, I'm trying to make sense of java generics. If you have say Foo<T> how do you say that T must be a class that implements interface Bar?
11:25:13 <Vorpal> ais523, there is no way to specify more than one interface there?
11:25:22 <ais523> Foo<? extends Bar, Baz>
11:27:56 <Vorpal> ais523, also while java does seem to have enum a lot of stuff seems to use plain integer constants instead, were enums added recently or something?
11:28:08 <ais523> Java's one of the few languages that actually has proper notation for covariance and contravariance in templates
11:28:20 <ais523> the problems are a) nobody uses it, and b) the semantics are wrong
11:28:25 <fizzie> Vorpal: In 1.5 (5.0), so that's reasonably recently.
11:28:39 <Vorpal> that explains why stuff like BorderLayout doesn't use it
11:31:19 -!- kallisti has quit (Changing host).
11:31:19 -!- kallisti has joined.
11:31:58 <Vorpal> hm are the docs just incomplete or can't you specify the value if a enum constant? Like you can in C.
11:32:46 <fizzie> You're free to add a field for any custom manually specified data.
11:32:53 <fizzie> And then specify those in the constructors.
11:33:09 <fizzie> As for the "raw" integer values, I think those are always consecutive from 0..N.
11:33:29 <Vorpal> fizzie, well I need to match external values here, and they happen to be sparse so. Meh.
11:33:43 <fizzie> Well, add a field for it, then.
11:34:29 <Vorpal> for all: 0 is not a valid value for example. So either I would need a dummy value or just do it without enum
11:34:39 <Vorpal> (or adding a field for every one)
11:35:35 <fizzie> public enum Meh { ZONK(1), FLONK(42), BONK(1000); public final int zlorbvalue; Meh(int zlorb) { zlorbvalue = zlorb; } } .... Meh k = ZONK; ... dothezlorb(k.zlorbvalue); ...
11:35:45 <Vorpal> oh you write it like that. Okay.
11:36:27 <fizzie> You can make the constructor populate a static Map<Integer,Meh> if you want to have a static method so you can have Meh.fromZlork(42) == Meh.FLONK.
11:37:01 <fizzie> Uh, zlorb == zlork here.
11:37:24 <Vorpal> seems like a rather hackish solution to handle this.
11:40:27 <fizzie> The only built-in thing is the Meh.values() which returns a Meh[] where the indices correspond to the "ordinals" (i.e. the Meh.ZONK.ordinal() value); you can't really have a sparse set there.
11:40:37 <fizzie> Unless you put some dummies in.
11:41:01 <fizzie> I think it's slightly discouraged to care about the actual numeric values of the ordinals, anyway.
11:41:15 <fizzie> If you want something meaningful, you can put the meaningfulness in explicitly.
11:41:38 <Vorpal> also an issue I have with swing is figuring out what exactly an event listener triggers on. For some it is obvious, like mouseClicked, but what does an actionPerformed do on a JButton?
11:41:58 <Vorpal> I would assume it is when the button is activated either through the keyboard or the mouse?
11:45:31 <fizzie> When it gets twoggled, yes; I'm sure they've documented that stuff somewhere.
11:46:19 <fizzie> "An action event occurs, whenever an action is performed by the user. Examples: When the user clicks a button, chooses a menu item, presses Enter in a text field. The result is that an actionPerformed message is sent to all action listeners that are registered on the relevant component."
11:46:33 <fizzie> (Swing tutorial trail; I have no idea where it is in the reference docs.)
11:47:04 -!- myndzi has quit (Read error: Connection reset by peer).
11:48:25 -!- nooga has joined.
11:50:12 -!- atrapado has quit (Read error: Connection reset by peer).
11:51:08 -!- myndzi has joined.
11:54:36 -!- myndzi has quit (Read error: Connection reset by peer).
11:59:21 -!- myndzi has joined.
12:00:38 -!- rupsbant has quit (Remote host closed the connection).
12:07:39 -!- nooga has quit (Quit: Lost terminal).
12:10:59 <Vorpal> fizzie, right, I was mainly searching the reference docs for JButton and the ActionListener
12:11:05 <Vorpal> it would make sense if either of those had it
12:11:19 <Vorpal> (I also did look at super classes, AbstractButton or whatever it was)
12:12:54 <fizzie> Well, JButton's main documentation does link to the whole 'Action' thing (where you can bind a single action into multiple controls, to have menu items and buttons that do the same thing and all get "configured" from one source); as well as the "How to Use Buttons" tutorial snippets.
12:13:04 <fizzie> So it's "incorporated by reference", like the lawyers say.
12:14:29 <Vorpal> fizzie, btw I realised that using enum is less convenient for another reason: I would end up casting to byte a lot then.
12:14:52 <Vorpal> (unless you can set the backing type somehow)
12:15:33 <fizzie> Not the ordinal, but of course the "zlorbvalue" can be a byte easily, if you want to have manually set values.
12:18:36 <fizzie> Incidentally, if you want to follow the conventions, in my example above you should have a private field + public getter method instead.
12:19:32 <Vorpal> fizzie, also "turn" is a somewhat confusing name in a turn based game where the players alternate making moves. You can either think of it as the period of one player making their move ("your turn" popping up on screen for that player) or as the period until the cycle between the player starts over
12:19:43 <Vorpal> any good idea how to not confuse those two sense in naming
12:19:48 <Vorpal> (of variables and so on)
12:20:38 <fizzie> Not really the best person to ask, given how I well and truly I confused those in the AI course framework. :p
12:20:57 <fizzie> I mean, you *could* use the technical term "ply", but that's also liable to confuse some.
12:21:10 <Vorpal> fizzie, also makes no sense in the case of tank wars
12:22:13 <fizzie> "ply: In two-player sequential games, a "half-turn", or one move made by one of the players." (Wiktionary.)
12:22:28 <ais523> Vorpal: enums can have properties in Java
12:22:49 <fizzie> ais523: As seen in my enum Meh example, perhaps?
12:22:50 <ais523> so you could add your own getAsByte method on your enum
12:23:05 <ais523> it's quite a way back in scrollback, so I missed it
12:23:17 <fizzie> Oh, right; well, yes, you could return the ordinal as a byte, too.
12:23:19 <ais523> I haven't been following the conversation, and was trying to weigh in from a screenful of scrollback
12:23:41 <fizzie> The example was about having a sparse set of externally-meaningful numbers associated with each enum constant.
12:24:17 <fizzie> Vorpal: Of course if you still use "turn" for the "whole thing", it's still sort-of confusing, and I'm not sure if there's a ply-like specifically specific word for that.
12:29:00 <Vorpal> <fizzie> "ply: In two-player sequential games, a "half-turn", or one move made by one of the players." (Wiktionary.) <-- it is an n-player game though (for n up to suitable values on the current map, no restriction implemented in the server yet)
12:29:49 <Vorpal> <ais523> I haven't been following the conversation, and was trying to weigh in from a screenful of scrollback <-- don't. elliott is going to complain a lot if you do that. He certainly does when I try to.
12:30:59 <fizzie> Completely unrelated: they've installed a new coffee machine in our "new" (fsvo) coffee room, and it's... certainly... a thing... http://www.comparestoreprices.co.uk/images/ju/jura-impressa-z5-coffee-machine.jpg
12:31:40 <fizzie> I have a slight suspicion that they've been bribed by the chemistry department to run some experiments, or something. There's no way a coffee machine needs that much machine.
12:31:56 <fizzie> (Also it's not even network-connected.)
12:32:00 <Vorpal> fizzie, for some values of coffee room?
12:32:15 -!- ais523 has quit (Ping timeout: 255 seconds).
12:32:34 <Vorpal> fizzie, was the old one network connected?
12:32:43 <fizzie> For some values of "new".
12:33:06 <fizzie> And no, but it was just your regular water-heater/plate/pot thing.
12:33:45 <fizzie> "Grinding selection wheel (9) is also below the bean container cover. Instructions for adjusting the fineness of the grind are inside the container cover."
12:34:09 <fizzie> There's also a PDF guide attached.
12:34:12 <Vorpal> so it grinds the coffee bean on the fly? Impressive
12:34:25 <fizzie> Suddenly I'm delighted I don't drink coffee; now I don't need to learn this thing.
12:34:57 <fizzie> You can get "ristretto" out of it. (Apparently it's like espresso, except more.)
12:36:07 <Vorpal> I don't drink coffee either. I'm not terribly clear on what you would get if you increased the espresso-ness of espresso.
12:36:26 <fizzie> "The resultant shot could be described as bolder, fuller, with more body and less bitterness. All of these flavors are usually attributed to espresso in general, but are more pronounced in ristretto."
12:36:32 <fizzie> You get more "body" in it.
12:36:41 <fizzie> I suppose it's for mass-murderers instead of casual murderers?
12:37:58 <Vorpal> I'm suspicious of fluids where people use anything more complicated than, say, "sweet" or "salty" or "like <other drink> but sourer" or such to describe them.
12:38:24 <Vorpal> Wines are probably the worst example of that phenomenon.
12:42:53 <fizzie> "This wine is among the less corpulent examples in the lineup. Citrusy, with a very distinct, snappy mineral character, it is round with good, well proprtioned acidity."
13:11:15 <kallisti> how do I do guards without indentation?
13:14:32 <Vorpal> fizzie, yeah that sort of stuff
13:15:15 <Vorpal> fizzie, I question if whoever said that ever tried to eat a representative set of minerals for example.
13:15:49 <Vorpal> fizzie, I'm okay with "Citrusy" though.
13:16:14 <Vorpal> kallisti, why don't you want to indent?
13:16:30 <Vorpal> hm no idea how you do that
13:16:52 <kallisti> I tried let f n { | blah = blah; | blah = blah }
13:16:59 <kallisti> I tried let f n { | blah = blah | blah = blah }
13:17:13 <Vorpal> shouldn't the {} be for the code after rather than for the guards there?
13:17:16 <monqy> let f n | blah = blah | blah = blah
13:17:18 <Vorpal> I would assume so at least
13:17:39 <kallisti> > let f n | n == True = 1 | n == False = 2 in f True
13:17:40 <Deewiant> > let f n | n == 0 = 1 | n == 2 = 3; g = f in g 2
13:17:56 <Vorpal> (makes sense of course)
13:33:46 <kallisti> > let fibs = 0 : 1 : zipWith (+) (tail fibs) (fibs); parfib n = last $ withStrategy (parList rwhnf) (take n fibs) in parfib 10000
13:33:47 <lambdabot> 207936082371334980721126489886428368250870360940159031196829458665285014234...
13:34:09 <kallisti> > let fibs = 0 : 1 : zipWith (+) (tail fibs) (fibs); parfib n = last $ withStrategy (parList rpar) (take n fibs) in parfib 10000
13:34:10 <lambdabot> 207936082371334980721126489886428368250870360940159031196829458665285014234...
13:34:18 <kallisti> I wonder if that actually does anything.
13:35:06 <kallisti> > let fibs = 0 : 1 : zipWith (+) (tail fibs) (fibs); parfib n = last $ withStrategy (parList rpar) (take n fibs) in parfib 100000000000000
13:35:19 <kallisti> > let fibs = 0 : 1 : zipWith (+) (tail fibs) (fibs); parfib n = last $ withStrategy (parList rpar) (take n rwhnf) in parfib 100000000000000
13:35:20 <lambdabot> Couldn't match expected type `[a]'
13:35:20 <lambdabot> against inferred type `Control.P...
13:35:50 <kallisti> > let fibs = 0 : 1 : zipWith (+) (tail fibs) (fibs); parfib n = last $ withStrategy (parList rwhnf) (take n fibs) in parfib 100000000000000
13:35:53 <kallisti> > let fibs = 0 : 1 : zipWith (+) (tail fibs) (fibs); parfib n = last $ withStrategy (parList rwhnf) (take n fibs) in parfib 1000000000000
13:35:56 <kallisti> > let fibs = 0 : 1 : zipWith (+) (tail fibs) (fibs); parfib n = last $ withStrategy (parList rwhnf) (take n fibs) in parfib 10000000000
13:36:00 <kallisti> > let fibs = 0 : 1 : zipWith (+) (tail fibs) (fibs); parfib n = last $ withStrategy (parList rwhnf) (take n fibs) in parfib 1000000
13:37:49 <shachaf> I don't think that'd have worked anyway.
13:40:45 <kallisti> well it works on the smaller inputs. but maybe that's not what you mean?
13:40:50 * kallisti has never used parallell strategies before.
13:41:41 <shachaf> kallisti: I don't know that it's making any difference.
13:44:40 <oklofok> what's the term for when you put "use caution but not too much;" or something in the beginning of all your code snippets even though you don't know what it means just because you've always done it and you don't want to break anything?
13:44:59 <oklofok> fizzie once told me a term for it i think
13:45:52 <kallisti> I doubt any actual parallelism is going on. the individual elements are evaluated too quickly.
13:46:41 <kallisti> if say, calculating the nth fibonacci element requires non-constant amount of work and also depending on the value of N-1 and N-2, then you could take advantage of parallism. but it's just.. addition.
13:47:40 <oklofok> fizzie: this is so very important
13:48:53 -!- ais523 has joined.
13:49:15 <ais523> is this a good place to ask for help with homework questions?
13:49:26 <oklofok> if they have to do with symbolic dynamics
13:49:40 <ais523> what if they have to do with basic functional programming?
13:50:09 <Vorpal> ais523, why would you need help on that? Or is it for dealing with marking such homework questions?
13:50:16 <ais523> Vorpal: I can't solve one of them
13:50:21 <ais523> which is tricky, given that I'm meant to mark it
13:50:38 <ais523> it's https://sites.google.com/site/focs1112/programming-assignments week 11 question 2
13:50:46 <Vorpal> ais523, I'm quite interested to hear what it is then. And how students are expected to understand it
13:50:47 <ais523> I'm not necessarily looking for the solution, just some pointers
13:50:51 <ais523> (I /suspect/ the question is impossible)
13:51:05 <fizzie> oklofok: I don't know which term I might have told you. Unless you mean cargo cult programming.
13:51:26 <ais523> oklofok: double-ended? that's what's stumping me
13:51:33 <ais523> the problem is that it has to be based on an interaction net queue
13:51:44 <ais523> if you're allowed to do it in amortized constant time using any method you like, it's easy
13:52:00 <ais523> I can do question 1, which asks for the same operations using a different underlying data structure
13:52:20 <Vorpal> I'm not familiar with the term "interaction net queue". What is that?
13:52:23 <oklofok> what's an interaction net queue+
13:52:27 <ais523> Vorpal: do you know about difference lists in Prolog?
13:52:41 <Vorpal> ais523, I don't really know any prolog
13:52:56 <Vorpal> apart from a few basics things about the syntax
13:53:00 <oklofok> isn't the point of a difference lists exactly that you can make a queue with it?
13:53:00 <ais523> well, let's see, the concept is that you represent a queue (front)1,2,3,4(back) as lambda x. cons(1, cons(2, cons(3, cons(4, x))))
13:53:19 <ais523> that's called an interaction net queue in the lists, for reasons I don't really understand
13:53:24 <Vorpal> ais523, hm. That is just a linked list
13:53:41 <ais523> (also, it's not constant time or even amortized constant time in a language with OCaml's execution order, which is a more minor flaw in the question)
13:53:59 <ais523> I don't see how you'd consider lambda x. cons(1, cons(2, cons(3, cons(4, x)))) to be a circular linked list at all
13:54:11 <Vorpal> ais523, what does the last x mean then?
13:54:23 <ais523> Vorpal: it's connected to the lambda x at the start
13:54:25 <Vorpal> (this isn't scheme syntax, which language is it?
13:54:29 <Phantom_Hoover> Vorpal, a circular linked list would be Y (cons 1 . cons 2 . cons 3 . cons 4).
13:54:48 <Phantom_Hoover> Vorpal, this is mind-bogglingly dense, even by your standards.
13:54:50 <Vorpal> Phantom_Hoover, hm. Okay right, I see that
13:54:56 <Vorpal> (the former not the latter)
13:55:25 <ais523> so the usual way to write push-at-tail of x onto q would be lambda x'. q(cons(x, x')
13:55:36 <Vorpal> ah okay, now it makes sense
13:55:46 <ais523> push-at-tail is easy; push-at-head is easy; pop-from-head is easy
13:55:53 <ais523> but pop-from-tail, I don't see how to get via that mechanism at all
13:56:15 <ais523> other than popping the entire queue into a temporary data structure, which is of course not constant time even in a superstrict language
13:56:27 <Vorpal> ais523, the naive solution is simple enough, and you just said it as I was writing it out...
13:56:42 <ais523> yes, but the question specifically disallows that
13:57:54 <ais523> hmm, I guess there's programmers here who would find week 11 question 3 easier than week 11 question 1
13:58:11 <Vorpal> ais523, I assume you aren't allowed to use debugging modules or such to mutate the linked list?
13:58:14 <ais523> it basically comes down to "implement an imperative doubly-linked list", which is something people here have done a lot
13:58:24 <ais523> Vorpal: it's not really a linked list
13:58:31 <ais523> as in, it /is/, but of lambda bodies
13:58:44 <ais523> so it's not mathematically a linked list, even though it's going to be represented like that by an OCaml interp
13:59:03 <Vorpal> ais523, which would be the relevant part for the debugging modules anyway
13:59:41 <ais523> well, OCaml does allow mutation; that's what question 3's about
13:59:49 <ais523> just that's not the underlying impl you're meant to use in question 2
14:00:06 <Vorpal> it is trivial to do this with mutation indeed.
14:00:43 <ais523> I won't post my solution to that (and nor should you) in case some student of mine happens across it
14:01:00 <Vorpal> ais523, I couldn't do it in ocaml, don't really know that language
14:01:05 <Vorpal> I could do it in scheme though
14:01:08 <oklofok> but if you have stacks, it seems very easy to do this, just keep the list in two stacks, one for the left half, one for the right, and balance when necessary
14:01:28 <ais523> oklofok: that's the answer to question 1
14:01:33 <ais523> which asks you to do it like that
14:02:14 <Vorpal> hm. You could implement it with a balanced binary tree too.
14:02:41 <Vorpal> well not exactly binary tree, it wouldn't be sorted as such based on keys
14:02:46 -!- Patashu has quit (Quit: MSN: Patashu@hotmail.com , Gmail: Patashu0@gmail.com , AIM: Patashu0 , YIM: patashu2 , Skype: patashu0 .).
14:02:56 <ais523> Vorpal: there's nothing inherently sorted about a binary tree
14:03:07 <ais523> although using them to maintain lists in sorted order is one of their main applications
14:03:28 <Vorpal> indeed, I'm used to thinking about a key in a binary tree, this one wouldn't have one
14:03:33 <Vorpal> but that is binary search tree
14:03:37 <Vorpal> which is indeed different
14:04:20 <fizzie> ais523: But if you *can* do a deque in amortized constant time with two stacks, *and* you can do a stack with constant-time push and pop with your "interaction net queue", why wouldn't a deque implemented with two "interaction-net-queue stacks" suffice for the question?
14:04:20 <oklofok> this one time i made a red-black tree visualization where the nodes would move to their new places by applying force in that direction
14:04:54 <oklofok> i also made a binary heap, merge was like the best thing ever :D
14:04:58 <ais523> fizzie: because you can make a queue from two stacks, but you can't make a stack from two queues
14:05:10 <Vorpal> oklofok, you should try that on other tree variants to see which one looks coolest and then in the future decide which variant to use based on how it looks
14:05:16 <Vorpal> oklofok, so AVL, AA and so on
14:05:24 <oklofok> (you had two windows for building heaps and you could then merge them)
14:05:37 <ais523> oklofok: did the red-black tree visualisation actually use red and black?
14:05:52 <ais523> hmm, I should learn what a red-black tree is someday
14:05:56 <fizzie> ais523: Yes, but you just said push-at-head and pop-from-head are both "easy".
14:05:58 <ais523> I wonder if I know the concept already but not the name
14:06:00 <oklofok> ais523: learn 2,3 trees instead
14:06:17 <oklofok> do learn them, that is. whatever that means.
14:06:22 <ais523> fizzie: right, but then you're not using the interactionnetiness at all
14:06:27 <Vorpal> oklofok, what are 2,3-trees now again=
14:06:30 <ais523> which probably doesn't count as a solution to the question
14:06:51 <oklofok> when i said 2,3 trees i suppose i meant avl trees. let's see what's what...
14:07:11 <fizzie> ais523: I suppose, if you're debating intention; though literally speaking it just says "starting from the implementation", nothing else. Though wouldn't it be easier to just ask whoever made the question?
14:07:32 <oklofok> avl trees are a sensible version of red-black trees
14:07:34 <ais523> fizzie: I did ask, but I didn't get a useful answer
14:07:37 <Vorpal> ais523, do you often see unusual and clever solutions to the questions that you didn't expect btw?
14:08:08 <oklofok> Vorpal: apparently 2,3 trees are essentially the same as aa trees.
14:08:13 <Vorpal> ais523, when I got bored in basic programming courses I spent some time thinking up non-obvious and superior solutions to the expected ones.
14:08:21 <Vorpal> oklofok, ah okay. How do they differ then?
14:08:29 <ais523> Vorpal: you get bonus marks for shorter or faster solutions than the other students on this course
14:08:49 <ais523> shorter in terms of token count, where whitespace and comments don't count as tokens
14:08:49 <quintopia> i have implemented pretty much every kind of balanced binary tree. i decided avl was the ost sensible (though splay trees are a cool idea nonetheless)
14:08:55 <oklofok> Vorpal: i don't know how they differ because i didn't quite check what they are.
14:09:02 <Vorpal> ais523, that is strange. In Sweden at least I'm pretty sure the laws say that grading should not be competitive.
14:09:07 <oklofok> just that they aren't avl trees.
14:09:20 <ais523> Vorpal: oh, the way it's done here is that the marks aren't binding
14:09:24 <ais523> they're really points, rather than marks
14:09:30 <oklofok> grading should totally be competitive
14:09:37 <ais523> and they are competitive, but don't have any direct input into the final grade on the course
14:09:59 <Vorpal> ais523, then what is the point? Making sure everyone passes a minimum level?
14:10:10 <Vorpal> ais523, and doesn't this mean you encourages golfing btw? :D
14:10:12 <ais523> trying to encourage people to get better at the course
14:10:14 <ais523> and sure, I noticed that
14:10:23 <ais523> and didn't at all try to discourage the people in charge of the course from doing it
14:10:38 -!- kallisti has quit (Ping timeout: 244 seconds).
14:10:53 <ais523> someone sniped a bunch of marks early by using "float" rather than "float_of_int"; it's the same number of tokens, but the first executes marginally faster
14:10:54 <fizzie> Vorpal: Our AI course competition results have no bearing for grading either, but it doesn't stop it from being quite a fundamental motivational thing.
14:10:59 <oklofok> i think ais' exact words on the subject were "MWAHAHAHA"
14:11:18 <Vorpal> ais523, what on earth is float_of_int?
14:11:26 <ais523> Vorpal: a conversion routine
14:11:31 <ais523> takes an int as an argument, returns a float with the same value
14:11:48 <ais523> all OCaml's conversion routines are named like that, except for the ones that aren't (which may be an empty set, I can no longer remember)
14:12:31 <fizzie> ais523: Possibly you might encourage people even more if you called them "achievements". That seems to work in getting people to do completely pointless tasks.
14:12:43 <ais523> fizzie: right, but achievements tend to be booleans
14:13:02 <oklofok> but you can have a hundred of them
14:13:19 <Vorpal> ais523, and just using float does what?
14:13:35 <fizzie> Sometimes there's sort-of a grade. One achievement of "did X in one minute", one for "did X in 30 seconds", one for "did X in 15 seconds", and so on.
14:13:49 <ais523> Vorpal: exactly the same thing
14:14:08 <ais523> I think it's some older primitive, and I suspect float_of_int's implemented in terms of it
14:14:13 <oklofok> i wish the people who make these horrible mmorpgs did something useful with their lives and made achievement unlocked 4
14:14:31 <fizzie> Did they make a 3? I must've missed that.
14:15:01 <oklofok> google returned stuff for 3 so :D
14:16:34 <oklofok> fizzie: oh and yes, that's the term i meant.
14:17:09 <Vorpal> can't get the third one to run. Weird.
14:17:40 <fizzie> The first hit (at muchgames.com) seems to be just #2 titled as #3.
14:17:53 <fizzie> While the achievementunlocked3.com didn't work for me either.
14:18:02 <Vorpal> indeed that was the one I looked at
14:18:03 <oklofok> i haven't played 2 so okay
14:19:37 <ais523> hmm, And Yet It Moves, along with its achievement called Gregor, also has an achievement called Random
14:19:42 <ais523> which I think just you get randomly
14:20:39 <Vorpal> ais523, wait HashMap<int, Foo> gives a syntax error on int?
14:20:53 <fizzie> Yes, because Integer extends Object.
14:20:55 <Vorpal> does it required a boxed type?
14:21:04 <ais523> Vorpal: doesn't work with primitives
14:21:06 <Vorpal> strange it is a /syntax/ error though
14:21:09 <fizzie> All generics need "real" objects.
14:21:15 <ais523> Vorpal: int is a keyword
14:21:19 <Vorpal> oh right, I forgot generics were just a compiler thing
14:21:24 <ais523> and you generally can't use keywords in arbitrary contexts
14:21:28 <Vorpal> as opposed to actually existing in the byte code.
14:21:32 <Phantom_Hoover> @tell elliott Oh, damn, the Raspberry Pi has a minimum order quantity of one unit. I GUESS WE ALL HAVE TO GET ONE NOW.
14:23:30 <fizzie> Vorpal: You can't put an "int" into an old-style non-generic ArrayList either. Primitives are very special.
14:24:56 <fizzie> It does do that autoboxing, though, so you can use an HashMap<Integer, Foo> pretty much like you'd use a hypothetical HashMap<int, Foo>, at least as long as you don't care about efficiency.
14:27:02 <fizzie> (Speaking of which: given enum Moo, then an EnumMap<Moo, Bar> is likely to be fasterer than a HashMap<Moo, Bar>, if you need to map that way.)
14:28:40 <Vorpal> fizzie, I didn't need that here. I was mapping player ids to player objects
14:29:20 <Vorpal> (this set might be sparse if a client disconnects btw)
14:33:14 <ais523> hmm, it seems that there's a sort of self-balancing tree called a scapegoat tree
14:33:38 <ais523> now I'm wondering if it'd be useful for the VCS, just due to the naming coincidence
14:33:54 <ais523> (the problem is that self-balancing trees are one of those things that aren't obviously useless in any complex program)
14:34:32 -!- Frooxius has quit (Ping timeout: 252 seconds).
14:36:16 <Vorpal> ais523, maybe if memory efficiency is important and you have a lot of very nodes with very small keys and data?
14:36:25 <Phantom_Hoover> ais523, I remember looking that up and getting really confused when Scapegoat first turned up.
14:37:01 <ais523> Vorpal: the main thing that self-balancing trees have to compete with is hash tables
14:37:25 <Vorpal> ais523, the problem with hash tables is the worst case complexity is not very good
14:37:59 <ais523> right, but the worst case also doesn't happen in practice, barring malicious input
14:38:02 <ais523> sometimes even including malicious input
14:38:32 <Vorpal> ais523, hm I guess a hash table with an self balanced tree per bucket might be a good compromise?
14:38:35 <fizzie> ais523: Perhaps you can invent some bogus reason why you need to iterate your map in sorted order too, and justify trees with that.
14:38:43 <Vorpal> ais523, rather than the usual linked list per bucket
14:39:02 <ais523> Vorpal: that's generally inferior to just rebuilding the hash table to have more buckets
14:39:24 <fizzie> "But what if the user wants to list all (anythings) in SHA-X order? It's important we have an efficient way to do that."
14:39:26 <ais523> if you're ever getting a nontrivial number of keys in the same bucket, then either you've hit a pathological worst case or your hash table is more small
14:39:30 <ais523> and in practice, usually the latter
14:39:35 <Vorpal> ais523, well yes, but you have to be able to handle the case where both items hash to the exact same hash
14:40:08 <ais523> IMO hashes should be infinitely long to allow for that issue
14:40:14 <ais523> and truncated for use in hash tables
14:41:22 <Vorpal> (anyway this won't be an issue with, say, sha256, but that is kind of slow so depending on what you are using the hash table for a faster hash might be better)
14:42:18 <ais523> I don't think hash tables normally use cryptohash
14:42:54 <Vorpal> for that very reason too
14:43:08 <ais523> I think Perl uses a fast hash operation with random parameters, so that collisions are hard to find due to not knowing precisely which hash function is being used
14:43:29 <fizzie> If you have objects for which you need to keep around SHA-256 hashes for other reasons, it's reasonably natural to use those as hash table keys too.
14:43:29 <ais523> (and I assume, or at least hope, that there's no reasonable way to find a hash collision that works for all the possible hash functions)
14:43:56 <Vorpal> ais523, selected per session or what?
14:44:12 <ais523> per invocation of the perl(1) interpreter
14:44:25 <Vorpal> right, that is what I meant
14:44:39 <ais523> you can set the seed via env var if you need repeatability
14:44:50 <ais523> (for, e.g., order of iteration over keys)
14:46:04 <ais523> setting an env var seems easier than using a program nobody but me dares run
14:46:18 <fizzie> I keep expanding that to wake-on-lan.
14:52:31 <fizzie> Heh, there's a WoWLAN; a wake-on-wireless-LAN thing. (Nobody does it.)
14:53:04 <Vorpal> fizzie, nobody supports it hm. Well not strange
14:53:26 <Vorpal> fizzie, actually I seem to remember seeing that as a BIOS option on some system at some point.
14:53:29 <fizzie> Some Intel chips can do it.
14:53:30 <Vorpal> hm can't remember which one
14:53:36 <Vorpal> my laptop? My dad's laptop?
14:53:45 <Vorpal> fizzie, I have intel wireless so...
14:56:41 <Sgeo> How. Does. XKCDBucket. Know. About. Agora.
14:56:57 <Sgeo> Also. Why. Am. I. Being. Overdramatic. About. This.
15:03:23 <Sgeo> I may require sleep
15:04:10 <fizzie> "IN NO IST LAT WHEY CRATICT FROURE BIRS GROCID PONDENOME OF DEMONSTURES OF THE REPTAGIN IS REGOACTIONA OF CRE." Claude E. Shannon, 1948.
15:05:38 <fizzie> `run words 15 # close kinship here
15:05:44 <HackEgo> hun rungummimne exsto akesta lita dccclxivt erlayali thema brism gewa unspoii putobolle llle roninglobu idnen
15:07:39 <fizzie> "THE HEAD AND IN FRONTAL ATTACK ON AN ENGLISH WRITER THAT THE CHARACTER OF THIS POINT IS THEREFORE ANOTHER METHOD FOR THE LETTERS THAT THE TIME OF WHO EVER TOLD THE PROBLEM FOR AN UNEXPECTED." Shannon again, in the same paper.
15:07:47 <fizzie> fungot: Did you by any chance know this guy?
15:07:47 <fungot> fizzie: a well mannered query to ask what your names are. probably as a special boon for being so great.
15:08:35 -!- sebbu has joined.
15:08:35 -!- sebbu has quit (Changing host).
15:08:35 -!- sebbu has joined.
15:08:51 -!- sebbu2 has quit (Ping timeout: 255 seconds).
15:14:54 <Vorpal> ais523, In java: why is there both Color.BLACK and Color.black and which one is preferred? Neither is marked deprecated in the reference docs.
15:15:03 <Vorpal> (same goes for the other predefined colours)
15:16:41 <fizzie> Vorpal: Color.BLACK: Since: 1.4. So that's why.
15:16:51 <fizzie> Okay, that's a reasonably poor "why", but anyway.
15:17:21 <fizzie> If they'd deprecate one, they'd probably deprecate the does-not-follow-the-conventions lowercase one.
15:29:16 -!- ais523_ has joined.
15:29:22 -!- ais523 has quit (Disconnected by services).
15:29:23 -!- ais523_ has changed nick to ais523.
15:39:18 -!- ais523 has quit (Read error: Operation timed out).
15:40:06 -!- ais523 has joined.
16:13:57 -!- KingOfKarlsruhe has joined.
16:14:37 -!- kallisti has joined.
16:14:38 -!- kallisti has quit (Changing host).
16:14:38 -!- kallisti has joined.
16:18:05 <kallisti> so I've got about 2 hours between classes to do homework or study in the library.
16:18:21 <kallisti> I decided every day I'm going to come in here and, if I'm not too busy, pick up something and read it.
16:18:40 * kallisti currently has the Computer Music Journal.
16:42:06 -!- ais523_ has joined.
16:42:10 -!- ais523 has quit (Disconnected by services).
16:42:11 -!- ais523_ has changed nick to ais523.
16:43:09 <fizzie> This "predict words from initial prefixes" text input keeps trying to say "cocks" whenever I start something with "co".
16:44:57 <fizzie> "ct" it predicts as "cthulhu". I think it has some sort of a learning system.
16:45:25 <ais523> well, how many words start with ct?
16:46:31 <fizzie> 13 nouns, according to WordNet.
16:47:00 <Gregor> All /proper/ nouns? And/or cocks?
16:47:04 <fizzie> But it's very generous with the definition of "word".
16:48:35 -!- Gregor has set topic: Official revolting channel of the inverse femtobarn stupid topic change CP violation, the original Trilogy: A new PHP (now with cocksthulu) | http://codu.org/logs/_esoteric/.
16:48:37 <fizzie> http://sprunge.us/fgjP
16:49:41 <Vorpal> fizzie, where is that predictive input btw?
16:49:52 <fizzie> It suggests "cc65" for plain "c", so I'm thinking I'm still justified in believing it learns.
16:50:10 <fizzie> Vorpal: N900. As far as they go, it's not the most impressive one.
16:50:23 <Vorpal> fizzie, you write "cocks" a lot? And cc65?
16:50:59 <fizzie> I'm not sure I'd say "a lot", but I've no clue how it picks candidates.
16:51:16 <Vorpal> what would cc65 even be?
16:51:16 <fizzie> I'm likely to have written both words at least once.
16:51:36 <fizzie> It's a silly C compiler for 6502 and others.
16:52:02 <fizzie> I've used it's assembler as a standalone thing, there's not too much wrong with it.
16:52:27 <fizzie> The compiler itself, as far as I've understood, is not terribly impressive.
16:53:03 <Vorpal> fizzie, trying to think of things using 6502 atm...
16:53:20 <fizzie> Well, NES is a close relative.
16:53:20 <Vorpal> I meant modernish things
16:53:42 <Vorpal> fizzie, I was going like "is it used in embedded things?"
16:54:08 -!- ais523_ has joined.
16:54:14 <fizzie> I think they make some related microcontrollers still. But those applications don't tend to advertise the CPU so much.
16:54:21 -!- ais523 has quit (Ping timeout: 252 seconds).
16:55:40 -!- ais523_ has changed nick to ais523.
16:55:46 <fizzie> I think some modernish thing used the 65C816, a 16-bit derivative.
16:56:07 <fizzie> Oh, and the Terminator (from the movie of same name) runs on a 6502. :p
16:56:23 <Vorpal> fizzie, what, do they say that in the movie?
16:56:29 <Vorpal> if so that is just silly
16:56:39 <fizzie> You can see 6502 assembly scrolling down when they show its eye-cam thing.
16:56:51 <Vorpal> fizzie, what does the program in question do?
16:56:52 <ais523> that doesn't mean it runs on a 6502
16:56:54 <fizzie> They probably just wanted something techy-looking.
16:56:57 <ais523> just that it thinks in 6502 asm
16:57:31 <fizzie> Vorpal: Apparently it's an Apple DOS 3.3 disassembly.
16:57:58 <fizzie> "Also shown is the output from a run of an Apple checksum program called KEY PERFECT 4.0, published in Nibble magazine."
16:58:08 <Vorpal> ais523, no it doesn't mean that at all. It might just as well mean that 6502 asm display is part of the output from the visual circuits.
16:58:25 <fizzie> Futurama's Bender is explicitly stated to have a 6502 for a brain.
16:58:30 <Vorpal> ais523, not that it /thinks/ in that
16:59:12 -!- anders has left.
17:06:08 -!- sebbu2 has joined.
17:07:34 -!- sebbu has quit (Ping timeout: 240 seconds).
17:19:34 -!- anders has joined.
17:32:41 -!- sebbu2 has changed nick to sebbu.
17:47:26 <Phantom_Hoover> And Bender is basically Project E.U.N.U.C.H. advanced 1000 years?
18:03:12 -!- pikhq has joined.
18:03:21 -!- pikhq_ has quit (Ping timeout: 248 seconds).
18:11:15 -!- ais523 has quit (Ping timeout: 240 seconds).
18:19:02 -!- ais523_ has joined.
18:28:11 -!- ais523_ has quit (Ping timeout: 258 seconds).
18:33:00 -!- pikhq_ has joined.
18:33:13 -!- pikhq has quit (Ping timeout: 248 seconds).
18:33:52 -!- ais523 has joined.
18:37:37 -!- Ngevd has joined.
18:38:18 -!- MSleep has changed nick to MDude.
18:38:53 -!- elliott has joined.
18:40:09 <elliott> @JFritsch: No PRNG consults an external source for each number; you just get the seed from there. You can create values of type StdGen (an instance of RandomGen) from a seed, and there's a global generator in IO presumably seeded from an external source. – ehird yesterday
18:40:09 <elliott> @ehird for P RNGs you are certainly right. Otherwise "no" is a bit strong :D sqrtech.com. Good randomness is an issue in a web2.0 world and IO plays a heavy role in it. – J Fritsch 10 hours ago
18:40:09 <lambdabot> elliott: You have 1 new message. '/msg lambdabot @messages' to read it.
18:40:55 <shachaf> elliott: Did you see how I summoned conal?
18:41:02 <shachaf> 21:37 < shachaf> rwbarton: Back in my day, reading a file *denoted* something!
18:41:02 <shachaf> 21:38 < conal> shachaf: :)
18:41:19 <elliott> I wonder if conal has "denote" on ping.
18:41:47 <Gregor> But he does have "*denote" on ping.
18:41:56 <Gregor> Whoops, I was only going to say "spam" today.
18:41:59 <shachaf> Maybe he always has #haskell open on one monitor, but the words don't mean anything most of the time.
18:42:00 <Gregor> Broke that rule pretty fast X_X
18:42:16 <shachaf> elliott: Remember how you asked me about 20 hours ago if I slept?
18:43:00 <shachaf> Well, I'm sure you can guess what I haven't done since then.
18:43:22 <elliott> http://esoteric.voxelperfect.net/wiki/Special:Recentchanges holy CRAP, somebody teach atrapado about preview
18:46:58 <ais523> hmm, can I add quotes from other channels?
18:47:21 <HackEgo> 1) <Aftran> I used computational linguistics to kill her.
18:47:35 <Ngevd> ais523, I'm quoted from the MC server
18:47:43 <ais523> I may as well not, anyway
18:47:44 <elliott> "Functors are not very interesting by themselves"
18:47:48 <HackEgo> 487) <Taneb> This staircase is very good for correcting people's opininons about communism
18:48:13 <elliott> But yeah, as Gregor is implying, a bunch of old quotes are from elsewhere
18:48:41 <Gregor> Quote 1 turned out to be a bad example since that's exactly the kind of thing people would say in #esoteric ...
18:48:45 <ais523> <southpointingchariot> welcome to the internet <southpointingchariot> its this this that the depatment of defense.... <southpointingchariot> well, we'll skip that <southpointingchariot> people look at kittens sometimes
18:49:00 <fizzie> Vorpal: "As of 2011, the W65C816S [that 16-bit 65(C)02 derivative] is available from WDC in a 40 pin PDIP or PLCC44 package, as well as a core for ASIC integration (for example Winbond's W55V9x series of TV Edutainment ICs)." So at least those they still make. Not sure if anyone's still using the 65C02 cores, maybe.
18:49:02 <ais523> probably not good enough quality to add
18:49:12 <ais523> but it's still surprisingly insightful
18:49:25 <Gregor> The quotes aren't supposed to be insightful.
18:49:32 <HackEgo> 209) <Gregor> "* There is no scientifically-justifiable reason to exclude pornography, which is a vital part of the web ecosystem. However, bear in mind that we're tracing JavaScript, not MPEG and JPEG decoding." <Gregor> ^^^ This bullet-point is my crowning achievement as as a scientist.
18:49:41 <ais523> how is that not insightful?
18:50:06 <ais523> also, shouldn't it be <<< not ^^^ when the quote's collapsed into a single line like that?
18:50:14 <elliott> ais523: "its this this that the depatment of defense...." what
18:50:27 <ais523> elliott: an attempt to explain the Internet, before getting bored and summarising
18:50:38 <ais523> implication's that it's starting with the history
18:50:40 <Ngevd> elliott, put some commas in randomly
18:50:41 <ais523> like summaries often do
18:50:42 <Gregor> You're on different wavelengths here.
18:51:28 <elliott> shachaf: My monad spiel is now my top SO answer.
18:51:44 <elliott> I will have to kill the guy who asked it if he doesn't accept it, as currently it is my only top answer with a white background.
18:52:02 <HackEgo> 262) <oerjan> (the former is a very deep theorem, i'd have had to read the whole book to understand it, so i didn't.)
18:52:09 <shachaf> elliott: Does "white background" mean "not accepted"?
18:52:36 -!- cheater_ has joined.
18:53:51 <HackEgo> 168) <cpressey> < ais523> then running repeatedly until you get the right sequence of random numbers < ais523> and just completely ignoring the input <-- some people live their entire lives this way, i reckon
18:53:52 <HackEgo> 289) <oklopol> zzo38: you missed the point. the point was way stupider than that.
18:53:54 <HackEgo> 52) <apollo> Maternal instincts? <apollo> Don't you just leave the thing in a box until it starts crying, and then shake it until it stops?
18:53:54 <HackEgo> 641) <fungot> sadhu: it's been said that boole is the crowning jewel perched precariously upon the perfect peak of programmer prowess, casting its limitless limpid light over the loathesome lands of those who scuff and wallow in the dreary dust of digital depravity and unbounded wilful ignorance of the testament of our lord jesus christ into your life.
18:54:09 <shachaf> kmc: In a discussion about GCing lazy I/O handles so that readFile doesn't fail when you have too many open files:
18:54:11 -!- Vorpal has quit (Ping timeout: 276 seconds).
18:54:20 <shachaf> 21:49 < shachaf> You could fork when you're about to have too many FDs open. :-)
18:54:23 <shachaf> 21:49 < rwbarton> yes! let's spawn a new process and hand it file descriptors over unix sockets! :D
18:54:26 <shachaf> 21:49 < rwbarton> Too bad kmc isn't here, he'd love this.
18:55:20 <ais523> `pastlog running repeatedly until you get the right sequence of random numbers
18:55:24 <olsner> oh, is kmc also in #esoteric nowadays?
18:55:27 <ais523> hmm, I want to know context for that
18:55:57 <elliott> olsner: No, you're imagining things.
18:55:58 <HackEgo> 2010-09-17.txt:20:33:11: <HackEgo> 220|<cpressey> < ais523> then running repeatedly until you get the right sequence of random numbers < ais523> and just completely ignoring the input <-- some people live their entire lives this way, i reckon
18:56:09 <fungot> Ngevd: his birthday is in a few minutes. wow he is so cool. two more large gizmos. it was once the island for the first time in i don't have a very exciting 24 hours or so. it'll just take a few tools out behind the woodshed and give it what the tablet asks, while the more recessive find less representation in the brood. especially strong matesprit? hahahaha!
18:56:17 <fungot> Available: agora alice c64 ct darwin discworld europarl ff7 fisher fungot homestuck* ic irc iwcs jargon lovecraft nethack pa qwantz sms speeches ss wp youtube
18:56:29 <Ngevd> It was "birthday" that clued me in
18:56:31 <fungot> Selected style: europarl (European Parliament speeches during approx. 1996-2006)
18:56:33 <ais523> `pastlog <ais523> then running repeatedly until you get the right sequence of random numbers
18:56:35 <ais523> coppro: I like that style
18:56:36 <fizzie> It's been homestuck on that style for so long.
18:56:40 <HackEgo> 2010-09-11.txt:17:34:14: <ais523> then running repeatedly until you get the right sequence of random numbers
18:56:42 <elliott> fizzie: HO HO HO HO HO HO HO HO
18:56:45 <fungot> ais523: obviously, the name given to the contact and support network, one of the sectors which interest you. you do not need any new officials to do that successfully, our interests are better protected than the potential average national rates if they had their own pensions. since 1 july last year, but equally unable to prove it is not possible to get this far. i agree with this if the regions, of course, everything that conce
18:56:50 <Gregor> FireFly: I mistabbed you!
18:56:57 <shachaf> Patter nmatches are the best kind of nmatches.
18:57:27 <Ngevd> elliott, I like your writing style, please write tutorials about everything you know
18:57:29 <Gregor> FireFly: I don't get mi-stabbed very often, in spite of "Gr" being a common-enough prefix.
18:58:06 <elliott> Hey shachaf, should I write a Haskell book?
18:58:34 <fizzie> On this channel, only "co", "fi", "la" are suspectible to two-letter-mistabbings at the moment.
18:58:41 <Gregor> "Haskell: The C Perspective"
18:58:43 <shachaf> elliott: I'll give you magic meaningless Internet points for it.
18:58:49 <elliott> Gregor: That already exists.
18:58:52 <elliott> "Haskell for C Programmers".
18:58:53 <ais523> elliott: you should write a monad tutorial
18:58:58 -!- Gregor has changed nick to cofila.
18:59:01 <Ngevd> Very very few people can even pronounce words starting with Ng
18:59:05 <ais523> or, I know, "Haskell for Prolog programmers"
18:59:15 * elliott begins to worry that http://stackoverflow.com/questions/8777216/how-do-you-identify-monadic-design-patterns/8777358#8777358 counts as a monad tutorial.
18:59:16 <ais523> Ngevd: well, it's a perfectly reasonable consonant for ending words on
18:59:19 <ais523> so why not for starting words on?
18:59:23 <shachaf> elliott: You should write "Haskell for Haskell programmers"
18:59:31 <olsner> Ngevd: ng is the most underused initial consonant in all languages I know
18:59:44 <Ngevd> "Haskell for esoteric programmers"
18:59:45 <olsner> but it's perfectly pronouncible
18:59:47 <cofila> And olsner knows at LEAST twenty languages.
18:59:50 <shachaf> elliott: THAT'S TOTALLY A MONAD TUTORIAL
19:00:02 <ais523> olsner: hmm, I pronounce it by treating the n as a semivowel
19:00:05 <shachaf> I THOUGHT I COULD TRUST YOU
19:00:07 <ais523> (which is totally a real category of letters)
19:00:18 <ais523> but then, that's how I pronounce it at the end of a word too
19:00:41 <olsner> I think ng is really a semivowel too
19:00:45 <shachaf> elliott: Did you know chat.stackoverflow.com has a Haskell channel?
19:01:06 <elliott> shachaf: Yes. I looked at the logs ("transcripts") and it's filled with that J Fritsch guy being terrible at Haskell.
19:01:11 <olsner> you can make the nnnnnnnnng (ngngngngng?) as long as you like
19:01:55 <shachaf> elliott: Anyway, if you wrote a Haskell book, I would read it and possibly provide classical criticism.
19:01:59 <Ngevd> olsner, I just start humming
19:02:01 <shachaf> That is to say, non-constructive.
19:02:13 <olsner> Ngevd: yeah, you can do that too
19:02:23 <shachaf> And maybe even the other kind!
19:02:32 <elliott> `addquote <shachaf> elliott: Anyway, if you wrote a Haskell book, I would read it and possibly provide classical criticism. <shachaf> That is to say, non-constructive.
19:02:35 <HackEgo> 796) <shachaf> elliott: Anyway, if you wrote a Haskell book, I would read it and possibly provide classical criticism. <shachaf> That is to say, non-constructive.
19:02:57 <elliott> shachaf: I'd have to spend a bunch of time explaining Haskell's flaws :-(
19:03:19 <shachaf> elliott: No need! Just ignore them!
19:03:23 <shachaf> Haskell is perfect, remember?
19:03:28 <shachaf> If a thing is a flaw, that means it's not Haskell.
19:03:49 -!- Ngevd has changed nick to one_minute_pleas.
19:03:54 <shachaf> Anyway, there is room in the world for a good free Haskell book.
19:04:13 -!- one_minute_pleas has changed nick to Ngevd.
19:04:42 <shachaf> Which is to say, thousands.
19:04:53 <shachaf> Of meaningless Internet points.
19:04:54 <elliott> shachaf: Well, the first thing to do is to figure out what animal O'Reilly will use for it.
19:05:08 <shachaf> elliott: Are sloths taken?
19:05:30 <Ngevd> The Black Cat of Tynedale
19:05:39 <shachaf> http://oreilly.com/animals.html
19:05:47 <Ngevd> ^^^ actual cryptid
19:06:18 <fizzie> Weird that sloths aren't, they're such mainstream animals.
19:06:20 <shachaf> "MCSE in a Nutshell: The Windows 2000 Exams" -- Grand elephant
19:06:46 <shachaf> Whoever chooses animals for O'Reilly books ought to be dot dot dot
19:06:49 <fizzie> The grandest elephant.
19:07:10 <elliott> "ACCORDING to legend, the Black Cat of Tynedale lurks deep in the darkest woods of Northumberland."
19:07:22 <elliott> "But when the Chronicle went to hunt the folklore creature, we discovered there might be truth to the sightings after all. During an early morning scour of the Tynedale countryside we found wildlife which, from a distance, could be mistaken as a big cat."
19:07:47 <lambdabot> elliott is tumbling around Northumberland
19:08:02 <elliott> @where+ elliott elliott is thumbing around Northumberland
19:08:34 <ais523> surely, from a sufficiently large distance, you can mistake anything for anything?
19:09:14 <fizzie> Also scotspeople, what's up with this http://en.wikipedia.org/wiki/Falkirk_Wheel thing, doesn't it look kinda awesome-silly?
19:09:14 <Phantom_Hoover> ais523, consider an infinitely large, light-emitting piece of yellow card.
19:09:25 <Phantom_Hoover> fizzie, I have been on that, it is the best thing ever.
19:09:45 <ais523> fizzie: the Falkirk Wheel is awesome
19:09:51 <ais523> which totally makes up for it looking silly
19:11:11 <ais523> oh, the Millenium Commision are responsible? that probably explains the awesomeness
19:11:54 <ais523> as far as I can tell, they used up all their mistakes on the Dome
19:11:54 <kallisti> is there a function in Haskell for doing an in-order traversal of a Data.Tree.Tree
19:12:03 <ais523> and just filled the rest of their work with awesome
19:12:07 <kallisti> all the Foldable stuff is prefix order it would seem
19:14:36 -!- saberman_ has joined.
19:14:38 <Ngevd> I think the internet is dying
19:15:13 <ais523> that's a bold statement to make
19:15:35 <Ngevd> Phantom_Hoover, ARPAnet
19:16:11 -!- saberman_ has quit (Remote host closed the connection).
19:17:01 <kallisti> elliott: hi in-order traversal of DAta.Tree hlep
19:17:24 -!- asiekierka has joined.
19:17:36 <asiekierka> i haven't been to this place for a long time, wow
19:17:39 <fizzie> There's this ex-professor at our university who was Finland-famous (that's like the real thing except in Finland) for his in-the-major-newspaper comments on how the Internet is going to collapse real soon. I think last estimate was that it'll happen in 2006.
19:17:44 <elliott> You were here like two months ago.
19:18:11 <lambdabot> Source not found. stty: unknown mode: doofus
19:18:13 <kallisti> elliott: that is not an in-order traversal of a tree using the given library functions.
19:18:20 <kallisti> elliott: yes I know how to write an in-order traversal recursively
19:18:22 <asiekierka> elliott in internet time that's a long time
19:18:31 <kallisti> elliott: you must submit to my constraint system.
19:18:41 <Ngevd> When was cpressey last here?
19:18:59 <fizzie> "Many moons" is I think what you say?
19:19:50 <Ngevd> I came here 2011-08?
19:21:32 <kallisti> elliott: I take it you've given up as there's no easy solution
19:22:07 <ais523> at least elliott hasn't had to write an interaction net deque
19:26:31 <elliott> kallisti: I gave up because I'm not here to write your code for you
19:26:39 <lambdabot> Node {rootLabel = 42, subForest = []}
19:26:43 <elliott> kallisti: Use the library functions rootLabel and subForest.
19:28:02 <lambdabot> Data.Maybe listToMaybe :: [a] -> Maybe a
19:28:02 <lambdabot> Data.List find :: (a -> Bool) -> [a] -> Maybe a
19:29:43 <kallisti> 2010's Computer Music Journal is lame
19:29:46 <Phantom_Hoover> olsner, one of the Guardian's main columnists, notable among other things for being stupidly anti-science.
19:29:54 <kallisti> most of it is just people coming up with timbre-spaces
19:30:39 <kallisti> there's only one publication about actual audio synthesis.
19:30:49 <Phantom_Hoover> cf. http://www.guardian.co.uk/commentisfree/2008/jun/06/maths.alevels
19:31:03 <fizzie> It's a very wide-topic journal.
19:31:53 <kallisti> I don't find timbre-spaces very interesting.
19:32:26 <Phantom_Hoover> Additionally, http://www.guardian.co.uk/commentisfree/2010/jun/24/rees-makes-religion-out-of-science
19:33:02 <Phantom_Hoover> "too bad if science wrecked the case for nuclear power by its hypersafe radiation limits, or failed properly to defend GM foods."
19:33:27 <Phantom_Hoover> "GOD why can't you people effortlessly dispel people's irrationality?"
19:35:42 <kallisti> fizzie: what's a good year to read? there's a lot of them to search through. :P
19:38:29 <fizzie> kallisti: I have zero clue. There's a lot of interesting stuff also in the IEEE journals that have "audio" in the name, but those are even worse if you have a single topic in mind. Browsing them non-physically may be best for efficiency.
19:40:11 <fizzie> (Also some that have "audio" in the name also have "speech" in there, and just physically picking an issue up subjects you to elliott's industrial-strength scorn ray.)
19:43:12 -!- kallisti has quit (Ping timeout: 252 seconds).
19:43:36 <elliott> fizzie: SCOOOOOOOOOOOOOOOOOOOOOOOOOOOOORN
19:44:09 <fizzie> Does it use SPEECH RECOGNITION to pick up the activation commands?
19:44:31 <elliott> Precisely! That's why this is the first time it's activated.
19:44:42 <elliott> You hit the incredibly unrealistic and precise conditions required for speech recognition to be feasible.
19:46:37 <elliott> It is probably a subconscious adjustment you have made to your manner of speech in an attempt to convince yourself that speech recognition is good.
19:46:48 -!- Klisz has joined.
19:46:56 <ais523> elliott: we really need more powerful, and more open to the masses, brainwave readers
19:47:01 <ais523> technology is getting there, luckily
19:47:12 <elliott> ais523: Yes. Then fizzie will be even more obsolete.
19:48:02 <ais523> elliott: incidentally, you have a huge Haskell bias in your SO answers
19:48:12 <elliott> ais523: That's because I only look at the haskell tag.
19:48:22 <elliott> I answered one (1) non-Haskell question, though.
19:48:27 <elliott> And that purity one wasn't really Haskell-related.
19:48:36 <ais523> I was wondering if you were just looking for haskell tags
19:48:48 <ais523> hmm, someone should ask INTERCAL questions on there
19:48:54 <elliott> ais523: Well, I would look at other tags, but the popular ones are terrible: http://stackoverflow.com/questions/tagged/c
19:48:55 <ais523> then point me to them so I can answer them
19:49:17 <elliott> ais523: I would ask one, but I think that would be rep laundering.
19:49:40 <ais523> hmm, it looks just like comp.lang.c would look if the regulars didn't try so hard to scare people away
19:49:42 <elliott> (The real reason is I have no INTERCAL questions to ask.)
19:49:49 <ais523> when they asked that sort of question
19:51:49 <ais523> elliott: wow, those C questions are bad
19:52:10 <ais523> I'm amused at the person who was worried that unsigned integers would overflow into the next bit of memory when they overflowed
19:52:15 <elliott> ais523: http://stackoverflow.com/questions/tagged/c%23 is possibly worse
19:52:19 <elliott> as the most popular tag on the site
19:52:21 <ais523> and was asking for reassurance, but fearing the worse
19:52:25 <ais523> elliott: c#, I take it?
19:53:17 <ais523> <nekcihc> I've been searching for a Linux version of the Conio Header file, but haven't found any... I'm using gcc and the Text-Editor "Geany" to compile my C-Code.
19:53:28 <ais523> I'd have forgiven em if e didn't mention the editor he was using
19:53:48 <elliott> hmm... that's the only thing he quoted
19:53:52 <elliott> clearly, he's using the editor '"Geany"'
19:53:57 <elliott> rather than the editor 'Geany'
19:54:11 <ais523> and the answers are actually useful, mostly referencing Linux reimpls of the library functions prototyped in conio.h
19:54:19 <fizzie> The freenode ##c is quite bad at times.
19:54:36 <fizzie> Sometimes it's just quiet.
19:54:47 <elliott> Sometimes PoppaVic isn't there, I guess.
19:55:02 <fizzie> Well, that is very rare.
19:55:17 <ais523> hmm, top INTERCAL result: http://stackoverflow.com/questions/2862785/is-there-an-intercal-mode-for-gnu-emacs
19:55:28 <ais523> I love the people answering "no" without checking
19:56:00 <elliott> the other intercal results seem to be people mentioning it in passing
19:56:49 <fizzie> Recently I accidentally "emacs blah.pdf"d instead of "evince blah.pdf"ing, and it took me at least ten seconds to notice, since Emacs went and rendered that PDF.
19:57:12 <elliott> fizzie: that would be even better if you used emacs in a terminal
19:57:21 <ais523> terminal emacs doesn't render PDFs, though
19:57:24 <itidus21> "<ais523> I'm amused at the person who was worried that unsigned integers would overflow into the next bit of memory when they overflowed" if you think about numbers in text format like "1234" = 4 chars long, and, on this basis you suppose a max unsigned int "4294967296" is 10 chars long.. then it would be possible to concieve it
19:57:44 <ais523> itidus21: nah, they just thought that C would ignore types when incrementing numbers
19:58:04 <ais523> they were worried that integer overflow worked like every other type of overflow, just going into the next bit of memory
19:58:07 <ais523> which is a plausible misconception
19:58:26 -!- zzo38 has joined.
19:58:57 <elliott> it should work like that :)
19:59:17 <fizzie> ais523: But it's useful when you have an all-ones bitmap, want to clear it with a simple operation, and have some writable memory after. Just "++" it and the carry will keep going.
19:59:23 <ais523> *NULL -= 1; /* now my memory is full of ones rather than zeroes */
19:59:56 <ais523> (anyone who points out that NULL is not necessarily 0 is missing the point)
20:00:04 <elliott> fizzie: It'll even run in one cycle.
20:00:19 <elliott> Possibly one very long cycle.
20:00:21 <fizzie> Sure, it's just an increment.
20:01:08 <ais523> I think it's possible to make a memory that can manage arbitrary length increment in O(log n) time, O(n log n) silicon, where n is the number of bits in memory
20:02:00 <itidus21> i think of overflow in a literal sense of like icecube trays being filled with water
20:02:45 <itidus21> each icecube cell's volume of water being a byte of some kind
20:02:51 <elliott> ais523: did you know: dwarffortress is in Arch Linux's repositories?
20:03:11 <ais523> it strikes me as the sort of thing that Debian wouldn't want in their main repos, though
20:03:15 <itidus21> so.. the increment operator on an icecube tray would be a drop of water
20:03:34 <itidus21> increment too many times and the water leaks into neighbouring cells
20:03:42 <elliott> ais523: it even installs a menu entry
20:04:11 <ais523> elliott: but that's easy
20:04:16 <ais523> my Jettyplay package installs a menu entry
20:04:33 <elliott> ais523: well, DF doesn't come with a menu entry file
20:04:43 <zzo38> Do you like new way of arranging esolang list of ideas?
20:04:54 <elliott> hmm, isn't this the second kernel update in two days
20:04:58 <zzo38> I even added three new entries as well, as making new sections
20:05:05 <ais523> elliott: nor does jettyplay, I wrote one for the package
20:05:26 <ais523> zzo38: I didn't see it because of all the spam
20:06:00 <elliott> ais523: atrapado spam, you mean?
20:06:01 <elliott> I think I'll yell at em on eir talk page
20:06:18 <ais523> zzo38: I think it's an improvement
20:06:34 <ais523> elliott: actually, regular spambot spam
20:06:42 <ais523> while I'm clearing it, I don't open other pages to avoid deleting them by mistake
20:07:55 <ais523> (I've got pretty close to that beforen ow)
20:11:52 -!- asiekierka has quit (Remote host closed the connection).
20:12:23 <zzo38> Are you going to try to implement or write additional comment/question about any of these esolang ideas?
20:14:38 <elliott> ais523: the year categories look nicer now
20:14:48 <elliott> (yearcat2 was getting excessively wide)
20:15:24 <elliott> http://esoteric.voxelperfect.net/wiki/Category:Before_1993 hmm... Forth shouldn't be in this category
20:15:24 <ais523> zzo38: probably not in the near future, at least
20:15:43 <ais523> elliott: because it's more recent than or equally recent as 1993, or because it isn't an esolang?
20:15:43 <elliott> nor should PROLAN/M, arguably
20:15:55 <elliott> Forth dates back to the 70s
20:16:10 <ais523> there's not an esolang with the same name, right? always worth checking that
20:16:17 <elliott> well, the article doesn't describe one
20:16:19 <ais523> feel free to decategorise nonesolangs from esolang categories, anyway
20:16:55 <elliott> I did that for one of them, then got bored :)
20:18:37 <fizzie> Oh, here's a story of competence. The ISP installing the VDSL2 link was supposed to terminate the old ADSL contract (with another ISP); we faxed them a permission paper for that.
20:18:41 <fizzie> They told me explicitly the VDSL2 order would not proceed until they had gotten that paper; also in the paper I told them the installation date. Well, they went ahead and installed it on the requested day and everything seemed to be fine.
20:18:45 <fizzie> Then a bit over week ago I got a bill for January from the old ISP. So I sent the new one a question, something like "is this just because the old contract had a grace period for termination, or did something go wrong?"
20:18:50 <fizzie> And their answer was that "we never got the permission form from you and therefore didn't terminate the old contract". But apparently didn't think of telling me about it.
20:18:53 <fizzie> So I called the old ISP and asked; they said their records show the termination notice from the new ISP, and the permission form that they "never got" was attached; and that the January bill was due to one-month termination grace period thing.
20:18:57 <fizzie> I suppose the take-home message from all this is: never trust the words of my current ISP.
20:20:18 <ais523> why would the new ISP lie about that, anyway?
20:20:27 <ais523> it seems a thing counterproductive to lie about
20:20:31 <fizzie> ais523: Incompetence, I suppose.
20:21:07 <fizzie> Malice, probably not, since it doesn't really benefit them.
20:21:15 <elliott> ais523: where does that umm go?
20:21:28 <fizzie> I suppose it could be just nastiness for its own sake, though.
20:21:41 <ais523> the * by itself is the correction
20:21:56 <ais523> I've decided that as it's typically obvious enough what the correction is, there's no need to put it after the *
20:22:11 <elliott> since I didn't notice the original mistake
20:22:40 -!- KingOfKarlsruhe has quit (Quit: ChatZilla 0.9.88 [Firefox 9.0.1/20111220165912]).
20:24:29 <elliott> Picking No Output. If your desired device was missing, make sure you have the appropriate 32-bit libraries installed. If you wanted a different device, configure ~/.openalrc appropriately.
20:24:38 <fizzie> I'm guesstimating their overworked customer service drone just went "oh, uh, I don't know whether we sent the termination notice, can't be arsed to check, I'd probably have to call other people and whatever, I'll just blame the customer for not delivering the necessary forms and ask him to take care of it, that's easier".
20:25:53 <ais523> so why did you change ISP?
20:26:23 <fizzie> They are, after all, the same customer service people who said it's impossible to change the realname field of my Unix account from "null Kallasjoki", and that I should just live with it since it's not externally visible.
20:26:36 <elliott> I'd be proud to be null Kallasjoki.
20:26:40 <fizzie> (My first name is not "null", in case anyone was wondering.)
20:27:24 <ais523> fizzie: is Kallasjoki your name either?
20:27:29 <fizzie> ais523: The new one is faster and significantly cheaper, since they went and dug some fibre to the basement of this building.
20:27:36 <fizzie> The surname is correct.
20:28:48 <fizzie> It's hard to put a monetary price on the frustration; but on the other hand they seem to be a good supply for IRC anecdotes.
20:29:04 <fizzie> Let's hope they keep screwing up. (Or maybe not.)
20:29:22 <olsner> as long as they screw up in harmless ways, it's just fun
20:30:09 <fizzie> They have a web forum for users. Some of the stories are... colorful. (In Finnish only, sadly.)
20:34:09 <ais523> semantics of Finnish depend on color?
20:35:08 -!- zzo38 has quit (Remote host closed the connection).
20:35:18 <fizzie> 2. (3) colorful, colourful -- (striking in variety and interest; "a colorful period of history"; "a colorful character"; "colorful language")
20:36:10 <Ngevd> Oh god, I'm now talking on ##latin
20:36:31 <elliott> Ngevd: Excuse me you cannot avoid my questions.
20:43:34 -!- kallisti has joined.
20:43:35 -!- kallisti has quit (Changing host).
20:43:35 -!- kallisti has joined.
20:45:59 -!- cofila has changed nick to Gregor.
20:46:35 <kallisti> fizzie: I'm looking for statistical analysis of music/audio, and combinatorial logic for musical arrangement. so any topics related to that.
20:47:56 -!- oerjan has joined.
20:49:02 -!- GreaseMonkey has joined.
20:49:02 -!- GreaseMonkey has quit (Changing host).
20:49:02 -!- GreaseMonkey has joined.
20:51:00 <Gregor> Since we don't currently have anywhere near the technology to take audio and extract the music, those are wholly different questions.
20:51:25 <oerjan> music is all in your head, man
20:52:39 <GreaseMonkey> i thought you were saying that was a MIME type
20:52:42 <Gregor> oerjan: Need more 'a's, maaaaaaaaaan.
20:52:50 <fizzie> Gregor: Just because we can't do it doesn't mean there are not articles about it.
20:52:56 <oerjan> Gregor: aaaaaaaaaaaaaaaaaaaaaaah
20:52:56 <GreaseMonkey> "oh yeah what format is it in" "music/audio" "ok what plays that" "music and audio players"
20:54:29 <fizzie> And anyway, there are sort-of working things for subproblems, like extracting tempo curves automagically from audio.
20:55:49 <kallisti> Gregor: the division was intentional
20:55:55 <kallisti> Gregor: I'm looking for information on either.
20:55:58 <fizzie> Or separating polyphonic music to instruments up to some degree, or whatever.
20:56:17 <elliott> fizzie: Also getting near to the technology to do such a thing requires writing papers about it. :p
20:56:36 <kallisti> using statistics to figure out parameters of the "music" is something we can kind of do to an extent.
20:58:10 <kallisti> I think we should start simple. you can't go analyzing the most complex works ever written.
20:58:18 <kallisti> start with something like... Justin Bieber. or Rebecca Black.
20:58:20 <Gregor> I few terms ago a student here implemented beat detection for waveform audio.
20:58:34 <Gregor> We concluded that it works for music terrible enough that beat detection would work.
20:58:44 <itidus21> we don't have the tech to extract music from audio? thats amazing :o
20:59:06 <kallisti> itidus21: we had to pipe it to our hears in order to extract it.
20:59:19 <Gregor> itidus21: Given a waveform sample of any real instrument, no matter how perfectly recorded, we can barely tell you what note it is.
20:59:36 <itidus21> i am currently subvocalizing foo fighters
21:00:11 <kallisti> I bet you can apply beat detection to most foo fighters songs.
21:00:28 -!- DCliche has joined.
21:00:30 <itidus21> yeah let it go to waste. i love it but i hate the taste
21:00:45 <kallisti> no. quoting foo fighters lyrics is banned.
21:01:08 <kallisti> http://www.facebook.com/ go here instead
21:01:23 <itidus21> good news is i have never sampled a justin bieber song with my ears
21:01:35 <oerjan> i feel this slight urge to ban quintopia for privmsg'ing me and then immediately going away. but it may just be the hunger... ->
21:02:13 <fizzie> From what I've understood, "it" in general works not really that badly, but that's just a vague impression.
21:02:15 <kallisti> fizzie: so really just any kind of book on statistics would be good too I guess. but I'm mostly concerned with audio (oh and the anti-latency time sync prediction stuff I mentioned previously)
21:02:30 <itidus21> Gregor: thats a good sign for instruments
21:02:55 <kallisti> Gregor: real musicians don't play notes.
21:03:03 <Gregor> Whoaaaaaaaaaaaaaaaaaah
21:03:05 <Gregor> Whoaaaaaaaaaaaaaaaaaah
21:03:22 <kallisti> especially in electronic music...
21:03:29 <kallisti> it actually does become somewhat irrelevant.
21:03:55 <kallisti> unless you want to sound tonal. you know, if that's your thing.
21:03:58 -!- Klisz has quit (Ping timeout: 252 seconds).
21:04:42 <fizzie> kallisti: Anyhoo, sometimes a good way to find stuff is to go to Google Scholar and add "review" to your search terms, and hope you find something new enough. Like for tempo tracking, "A review of automatic rhythm description systems", F. Gouyon, Computer Music Journal, 2005, sounds relevant. (Not going to dig deeper with this phone.)
21:05:23 <kallisti> so today in intro to advanced math we learned about: BASIC SET THEORY
21:05:51 <Ngevd> Today we learnt about me not handing in homework...
21:05:54 <kallisti> and he kind of hinted at how natural numbers can be constructed with the null set and powerset operator but he didn't really explain it he just used the example as a way to teach what powerset and subset means.
21:06:07 <kallisti> by hinted I mean he didn't say anything about it, but that's what he was doing.
21:06:44 <fizzie> kallisti: Also Bishop's "Machine Learning and Pattern Recognition" is a nice textbook about things in general (IIRC); it probably won't mention audio signals or music many times, if at all, though.
21:06:59 <kallisti> general knowlege will be helpful, of course.
21:07:29 <fizzie> We use it as a coursebook on some courses. Of course there are many similar books.
21:07:51 <kallisti> I need to find some more synthesis books. "Computer Music: Synthesis, Composition, and Performance" was a good intro but it doesn't go into more advanced topics.
21:09:20 <oerjan> @tell quintopia i am going to ignore you for pretending you were about to start an interesting conversation and then immediately going away.
21:10:03 <kallisti> I'm going to be going to library so often it's going to be awesome.
21:10:08 <elliott> oerjan: sometimes i can't tell whether your @tells are serious or not
21:11:34 <oerjan> but don't worry, even i can't tell sometimes.
21:12:06 <kallisti> you know what kind of blows my mind.
21:12:29 <kallisti> Diet Mountain Dew (sry mtn dew) has concentrated orange juice as the second ingredient listed
21:12:34 <kallisti> but apparently has no Vitamin C
21:13:25 <kallisti> "brominated vegetable oil" lol wuht
21:13:46 <kallisti> You, sir, are about to enter the BROminator. :)
21:14:26 -!- saberman_800 has joined.
21:14:43 <ais523> kallisti: it's like hydrogenated vegetable oil, but with bromine instead
21:14:47 -!- Ngevd has quit (Quit: Goodbye).
21:15:29 <kallisti> ais523: I figured, but I'm still startled that it's in this drink, even if in very small quantities (less of it than the actual caffeine)
21:15:57 <ais523> kallisti: halogen atoms bound to hydrocarbons tend to be incredibly safe for humans
21:16:08 <ais523> CFCs are not poisonous in any way, that's why they became so popular
21:16:13 <ais523> rather worse for the environment, though
21:16:44 <kallisti> I was mainly just not expecting the "vegetable oil" part and was less focused on the "bromine" part.
21:17:38 <kallisti> does anyone have a list of every pharmecutial brand name ever invented?
21:17:56 <ais523> kallisti: the US Trademark Office probably does, more seriously
21:18:04 <ais523> well, US Patents & Trademarks Office
21:18:39 <kallisti> ah oaky. I'll just shoot them an email.
21:18:54 -!- saberman_800 has quit (Remote host closed the connection).
21:19:32 <elliott> <kallisti> elliott: that was not serious
21:19:32 <elliott> <kallisti> hope that helps.
21:20:51 <kallisti> hmmm their trademark search doesn't appear to have a category search
21:21:08 <elliott> oerjan: ps don't ignore quintopia for having things to do other than irc
21:21:10 <elliott> unless you want to i guess
21:21:31 -!- saberman_1000 has joined.
21:21:38 -!- saberman_1000 has quit (Remote host closed the connection).
21:21:54 <HackEgo> 2012-01-09.txt:21:21:39: <kallisti> `searchlog helpful most 2012
21:21:59 <monqy> true searchlog quality
21:22:05 <monqy> now you'll be even less likely to find it
21:22:16 <ais523> what's the difference between log and searchlog?
21:22:37 <HackEgo> bin \ canary \ karma \ lib \ main \ paste \ quotes \ searchlog.hi \ searchlog.hs \ searchlog.o \ share \ wisdom
21:22:48 <HackEgo> http://codu.org/projects/hackbot/fshg/index.cgi/raw-file/tip/paste/paste.14186
21:23:11 <kallisti> oh wait it's still the bad one.
21:23:30 <ais523> wait, why do we have an implementation of grep in Haskell?
21:23:45 -!- saberman_300 has joined.
21:23:51 <kmc> any software is better if it's written in haskell
21:24:02 <kmc> the highest goal of humanity is to rewrite all existing software in haskell
21:24:12 <monqy> implemenation of grep in haskell: call out to another grep wrapper
21:24:45 <kmc> shachaf, it's true, I do love handing file descriptors through UNIX sockets
21:24:56 <pikhq_> Every now and then I feel like working on package management again. It really doesn't take long before I stop feeling like that.
21:24:56 <kallisti> I don't actually think the ^.*....*$ is needed
21:24:59 <kallisti> I just put it there to be safe.
21:25:08 <pikhq_> I don't *wanna* do topological sort!
21:25:13 <elliott> c<kmc> any software is better if it's written in haskell
21:25:14 <elliott> <kmc> the highest goal of humanity is to rewrite all existing software in haskell
21:25:23 <pikhq_> Or constraint solving!
21:25:24 <ais523> pikhq_: meh, tsort's a really important algo
21:25:37 <kallisti> pikhq_: have you read about how Oz does constraint solving.
21:25:39 <pikhq_> ais523: Doesn't make me want to do it any more. :P
21:25:50 <ais523> it's come up naturally at least twice, which beats any other not-known-everywhere situation but priority queues
21:25:57 <ais523> (in the biased ais523 way of looking at things)
21:26:02 <ais523> oh, and parsers, but that doesn't count
21:26:11 <monqy> I'm from the future and "@" and "haskell" look exactly the same it's very confusing
21:26:38 <itidus21> because with haskell you're one step closer to incorporating the software into mathematical proofs :D
21:26:45 -!- saberman_300 has quit (Remote host closed the connection).
21:26:57 <kallisti> pikhq_: if that's a thing you want to do you might want to look at it. I don't know if it's "state-of-the-art" or whatever but it's a constraint programming language so I assume it's pretty good.
21:27:15 <pikhq_> itidus21: Haskell is very informal.
21:27:31 <kallisti> depends on what you're writing I guess.
21:27:33 <monqy> a step sideways at least
21:27:49 <elliott> well coq can extract to haskell
21:28:01 <kmc> that's kind of the opposite ;P
21:28:06 <kallisti> your web server written in Haskell is not going to be more mathematically sound than Apache.
21:28:08 <itidus21> the next genius will incorporate I/O into mathematics directly
21:28:14 <monqy> you're one step backwards from incorporating mathematical proofs into software
21:28:28 <kmc> kallisti, it depends what you mean by "mathematically sound"
21:28:28 <pikhq_> Haskell is about as formally specified as C. Fairly well for a programming language, but not very in an absolute sense.
21:28:56 <kallisti> kmc: a constructive proof about web servers or something.
21:29:12 <oerjan> elliott: it was also partially that he had obviously not read my answer to him yesterday.
21:29:12 <elliott> http://stackoverflow.com/questions/8648354/do-monads-do-anything-other-than-increase-readability-and-productivity
21:29:22 <kmc> i'm not gonna click that
21:29:33 <monqy> web servers theory "theory of the future"
21:29:34 <kmc> monads are useless because C is turing-complete
21:29:48 <kallisti> the answer is not that great either.
21:29:49 <kmc> if evolution is true then why are there still monkeys, HMMMMM?!?!?!?
21:29:50 <oerjan> elliott: mostly it was low blood sugar, though.
21:30:23 <elliott> oerjan: blood sugar is the best kind of sugar
21:30:27 * oerjan may return to near human behavior in a minute or so
21:30:32 <HackEgo> 2012-01-09 21:30:31 URL:http://sprunge.us/Ceae [510] -> "Ceae" [1]
21:31:17 <itidus21> C is good if you want to do imperative programming
21:31:34 <kallisti> `run mv Ceae searchlog.hs; ghc -O2 --fllvm -o bin/searchlog searchlog.hs; chmod +x bin/searchlog
21:31:38 <elliott> *low-level imperative programming
21:31:43 <HackEgo> ghc: unrecognised flags: --fllvm \ Usage: For basic information, try the `--help' option.
21:32:03 <kallisti> `run mv Ceae searchlog.hs; ghc -O2 -fllvm -o bin/searchlog searchlog.hs; chmod +x bin/searchlog #real programmers use LLVM
21:32:20 <HackEgo> mv: cannot stat `Ceae': No such file or directory \ Linking bin/searchlog ...
21:32:41 <monqy> you already moved it
21:33:10 <kallisti> I sometimes forget that I exist in a mutable world.
21:33:19 <itidus21> i think C is the best imperative language which doesn't rely on an interpreter
21:33:21 <monqy> mutation is hard times
21:33:30 <monqy> itidus21: what does best mean
21:33:42 <kallisti> itidus21: what does "doesn't rely on an interpreter" mean.
21:33:45 <elliott> itidus21: no language relies on an interpreter
21:33:45 <monqy> and what does "rely on an interpreter" mean
21:33:49 <itidus21> it means, in practice, c# and java don't get implemented without interpreters
21:33:58 <elliott> C, C#, Java: the only imperative languages
21:34:10 <elliott> which isn't the same thing as imperative
21:34:33 <kallisti> also they're not "interpreted" in the sense that "interpreted" usually means.
21:34:36 <monqy> also they're compiled to bytecode and run on virtual machines "totally rely on interpreters"
21:34:45 <kallisti> their common implementations aren't
21:35:16 * kallisti imagines what java would be like if interpreted
21:35:49 <monqy> itidus21: is that supposed to make it the best
21:36:04 <kallisti> itidus21: yes, it's true. as soon as the first implementation of C was created, it sprang linux into existence.
21:36:13 <monqy> and then it was the best
21:36:20 * kallisti imagines what perl would be like if just in time compiled.
21:36:38 <itidus21> sadly C also brought me windows
21:37:29 <kallisti> itidus21: but yes C# and Java are not really interpreted. did you know that?
21:37:42 <elliott> itidus21: windows is mostly C++
21:38:20 <monqy> that means it's the worst
21:38:59 <kmc> itidus21, C is good if you want to do imperative programming with buffer overflows
21:39:07 <oerjan> @tell quintopia my insanity appears to be diminishing; also blue cheese is good
21:39:35 <kallisti> Isn't this true of almost all language constructs? You can write every program using the four simple instructions of a Universal Register Machine, but you wouldn't want to. – arx
21:39:40 <kallisti> subleq would have been a way better example.
21:39:49 <itidus21> i lack the education to make serious mistakes in statements about languages
21:39:57 <kmc> i sure would love to program in this "Haskell" language with the proofs and the automatic memoization and parallelization
21:39:57 <lambdabot> kmc: You have 1 new message. '/msg lambdabot @messages' to read it.
21:40:00 <kmc> too bad it doesn't exist
21:40:12 <itidus21> i can only make trivial mistakes
21:40:13 <cheater_> you might be thinking of: Hacksell
21:40:20 <kmc> maybe if reddit believes in something long enough, then it comes true
21:40:22 <kmc> like christmas
21:40:45 <cheater_> kmc: what's up in curmudgeon land
21:40:59 <kmc> Haskell is great because it lets me prove that Integers exist, in an inconsistent logic
21:41:00 <elliott> @remember kmc i sure would love to program in this "Haskell" language with the proofs and the automatic memoization and parallelization
21:41:03 <kallisti> kmc: is the automatic memoization thing at least partially true?
21:41:20 <kmc> i mean, laziness is *kind* of like memoization
21:41:22 <kmc> but only barely
21:41:28 <kmc> it's not memoization of function (argument, result) pairs
21:41:42 <elliott> sharing is kind of like memoisation, rather
21:41:43 <kmc> it just means if you write «let x = big_complicated in (x + x)», it doesn't compute big_complicated twice
21:41:58 <kmc> and technically / pedantically, that's not part of Haskell, it's an implementation detail shared by pretty much any Haskell implementation
21:42:01 <elliott> i mean they're related more than "kind of" with all the memocombinators stuff and everything
21:42:07 <kallisti> elliott: I was under the impression that lazy evaluation = non-strict evaluation + sharing
21:42:07 <elliott> but that's not automatic :P
21:42:18 <elliott> kallisti: lazy evaluation has both of those properties
21:42:22 <kmc> but the spec does not mandate lazy evaluation or sharing
21:42:34 <kallisti> elliott: so I guess you were just being more specific then...
21:42:43 <kmc> but it's an interesting bit of trivia that memoization is easier in a lazy pure language than a strict pure language
21:42:55 -!- oerjan has set topic: Official revolting channel of the inverse femtobarn stupid topic change CP violation, the original Trilogy: The Eodermdrome Strikes Back | http://codu.org/logs/_esoteric/.
21:43:11 <kmc> memoizing a function requires mutating a cache data structure
21:43:17 <kmc> laziness gives you implicit mutation of just the sort you need
21:43:30 <elliott> you'll start kallisti again
21:43:43 <kallisti> elliott: no, only you have the power to make arguments out of nothing.
21:44:15 -!- atrapado has joined.
21:45:01 <kallisti> at first I used where exclusively
21:45:05 <kmc> yesterday i tried to figure out why BART is broad-gauge
21:45:08 <kmc> i think nobody knows
21:45:11 <kallisti> but as I write more Haskell I find myself liking let in more situations.
21:45:17 <kmc> i think they were drunk when they designed it
21:45:20 <kmc> kallisti, me too
21:45:32 <kallisti> where is good too though. they're both good.
21:45:35 <itidus21> one mistake i made is confusing the terms language and implementation..
21:45:54 <kmc> i like things to flow logically from top to bottom (even if that's not the true order of evaluation)
21:46:04 <kmc> so "let" with the "top-level" expression at the end, is more natural than "where"
21:46:05 <kallisti> kmc: this is also why I think I actually prefer >>> to .
21:46:07 <itidus21> and another mistake i made is only considering PC computers
21:46:20 <kmc> kallisti, yeah, unfortuantely (>>>) is less common and uglier
21:46:36 <kallisti> it even shows you the direction
21:46:40 <kmc> sometimes "where" is good because the "top-level" expression can be understood by itself, and the helpers are self-contained details
21:46:51 * elliott doesn't think "flow logically" is meaningful like that.
21:47:00 <elliott> If not the order of evaluation, what /do/ you go by?
21:47:08 <cheater_> kmc: federal law influenced by earthquakes down south?
21:47:08 <kallisti> I prefer using "let" when I just need to extract some values within a particular case or something.
21:47:12 <kallisti> that doens't need to go in where.
21:47:26 <kmc> cheater_, interesting
21:47:33 <kmc> btw the transbay tube is not earthquake-safe
21:47:57 <cheater_> kmc: another possibility: attempt to disable use of existing trains. someone got smeared by a train factory.
21:48:00 <Phantom_Hoover> oerjan, oi, can you get anything interesting from regarding lines between points in R^n as morphisms in a category, or is this not something you'd know in any case?
21:48:11 <kmc> cheater_, yeah, it's great for vendor lock-in for sure
21:48:21 <kmc> they can't buy trains from the same suppliers as the other subways in the country
21:48:21 <kallisti> okay so... sharing is literally just a mechanism of let binding (and equivalent sugars)
21:48:23 <cheater_> not really, you can always change a vendor
21:48:26 <kmc> but they can buy trains from india, lol
21:48:30 <kmc> (except not, because BUY AMERICAN!!!)
21:48:59 <cheater_> kmc: i think it's probably that there was a fleet of trains already, but the people building the bart wanted to earn extra, so they made sure the trains had to be new too.
21:49:12 <kallisti> er, let me clarify. I know what the concept of sharing is, but I'm asking specifically where it occurs in Haskell.
21:49:12 <kmc> that's a good theory
21:49:24 <kmc> kallisti, let bindings, where bindings, module top-level bindings
21:49:44 <kallisti> not counting function arguments I guess.
21:49:55 <kmc> or case-bound variables
21:50:09 <kmc> those are more passing through existing sharing
21:50:18 <kmc> to really answer your question I think you need a very detailed operational semantics
21:50:27 <kallisti> yes this is would be a good thing to know about.
21:50:27 <kmc> and then you ask, where does thunk allocation occur, and where does forcing occur
21:50:37 -!- centrinia has joined.
21:50:40 <kmc> have you read "Implementing lazy languages on stock hardware: the spineless tagless G-machine"?
21:50:45 <HackEgo> centrinia: Welcome to the international hub for esoteric programming language design and deployment! For more information, check out our wiki: http://esolangs.org/wiki/Main_Page
21:51:12 <kallisti> I understand that Haskell doesn't maintain a single call stack, but instead has a stack for each level of pattern matching? or something to that extent.
21:51:15 <kmc> kallisti, well, they have a very simple desugared Haskell-like language where these questions are relatively clear
21:51:23 <kmc> kallisti, do you mean GHC?
21:51:33 <kmc> i don't think it's a true statement about GHC, but I don't think it's a sensical statement about Haskell
21:51:41 <kmc> GHC has a stack *of* pattern-matchings
21:51:50 <kmc> the elements of the stack are "case continuations"
21:51:57 <kallisti> oh so just one. but it's not really a "call stack" either.
21:52:09 <kmc> they look like "case (hole) of Foo x -> ...; Bar y -> ..."
21:52:17 <cheater_> kmc: any idea how much those techno goggles would cost to make? i was thinking of making a pair here
21:52:27 <kmc> meaning "once you've finished evaluating whatever you're currently evaluating, branch on these cases
21:52:36 <kmc> except some of the elements are "update frames"
21:52:49 <kmc> which mean like "before you continue, plz overwrite this thunk with the answer you just computed"
21:52:54 -!- ais523 has quit (Remote host closed the connection).
21:53:50 <kallisti> kmc: your definition of case continuations seems backwards from what I was envisioning.
21:54:34 <kallisti> kmc: it seems that each continuation is moving further down a data structure? I was thinking it was a way to "go back up".... if that makes sense.
21:54:34 <kmc> the expression currently being evaluated is implicit in the program counter
21:54:46 <cheater_> kmc: do you have a BOM for those?
21:54:46 <kmc> the thing you need to remember is, what do you do after evaluation completes
21:54:49 <kmc> cheater_, no
21:54:56 <elliott> 03:00:12: <kmc> if you teach someone C and tell them it's how the computer "really works" then they will probably become an insufferable douchebag
21:54:56 <elliott> Doesn't that apply to every language?
21:54:59 <cheater_> kmc: do you know nothing about how much they could cost?
21:55:01 <oerjan> Phantom_Hoover: well it wouldn't contain more information than the pair of points itself, since two points always have exactly one line between them.
21:55:08 <kmc> elliott, yes, but people usually don't tell that lie about other languages
21:55:12 <kmc> cheater_, ballpark of $30
21:55:19 <kmc> it depends what parts you have, and what you're making exactly
21:55:37 <elliott> kallisti: Indeed the same applies to that.
21:55:53 <kmc> cheater_, browse these and maybe comment or contact the guy http://wealoneonearth.blogspot.com/search/label/goggles
21:56:05 <kmc> he has some detailed build instructions
21:56:13 <kallisti> kmc: oh right lazy evaluation kind of happens in reverse when compared to strict evaluation.
21:56:16 <Phantom_Hoover> oerjan, yeah, but that doesn't preclude something interesting coming from it.
21:56:35 <kmc> kallisti, maybe?
21:57:09 <kallisti> I think I understand the case continuation bit though.
21:58:38 <kmc> (by the way "evaluate" means "evaluate to whnf")
21:59:01 <kmc> if you have a deep pattern in Haskell, it will translate to many nested 'case's in STG-language
21:59:04 <kallisti> also another question: isn't beta-reduction and inlining the same thing in Haskell?
21:59:05 <kmc> each once forces to whnf
21:59:11 <kmc> kallisti, is it?
21:59:28 <kmc> you're saying that inlining is a special case of compile-time partial evaluation?
21:59:35 <kallisti> it seems like when you inline a function you would also be beta-reducing it.
21:59:59 <kmc> i think it's best to treat those as separate
22:00:01 <kmc> but i don't really know
22:00:28 <kmc> you could say that «(\x -> x + 2) 2» is already "inline" but you might want an optimization which reduces it to 4
22:00:28 -!- Jafet has quit (Quit: Leaving.).
22:00:28 <kallisti> I ask because Wikipedia's article on GHC mentions that it does inlining, and then also mentions that it performs beta-reduction.
22:00:32 <kallisti> maybe it's referring to different intermediate representations.
22:00:38 <kmc> you could read "secrets of the GHC inliner"
22:01:22 <kmc> 193 amazing sex tips to satisfy your GHC inliner
22:02:04 <kallisti> btw spineless tagless G-machine is the best name for a thing ever.
22:02:39 <elliott> I don't think people would consider something inlining if it skipped the beta-reduction.
22:02:40 <oerjan> Phantom_Hoover: well it means it's isomorphic to the obvious category of pairs of points. which i think is sort of a trivial partial preorder category.
22:02:50 <elliott> It would just increase the size of code and not save the cost of a call.
22:02:58 <elliott> Although I guess the jump could be smaller?
22:03:16 <oerjan> or equivalently, every object is a zero object.
22:03:27 <kallisti> elliott: well you would still get the benefits of some rewrite rules if you inlined without beta-reduction
22:04:17 <kallisti> but... you would get more if you beta-reduced
22:04:43 <elliott> oerjan: I'M GOING TO UNDERSTAND ALL THIS WHEN I READ C4TWM I'M SURE
22:05:14 <kallisti> > iterate (filterM (const [True, False])) []
22:05:15 <lambdabot> Occurs check: cannot construct the infinite type: a = [a]
22:05:24 <elliott> cabinets for ten wacky monkeys
22:05:45 <oerjan> elliott: you _do_ know what a category is, don't you. this is a rather trivial example.
22:05:53 <lambdabot> forall a (m :: * -> *). (Monad m) => (a -> m Bool) -> [a] -> m [a]
22:05:54 <elliott> oerjan: well on a good day, yes.
22:06:04 <shachaf> It's been almost thirty minutes away from IRC. I was starting to sweat.
22:06:24 <elliott> > iterate(group>=>show.length++tail)"1"
22:06:26 <lambdabot> ["1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1...
22:06:54 <elliott> > iterate(group>=>(:)<$>length<*>take 1)"1"
22:06:55 <lambdabot> Couldn't match expected type `GHC.Types.Int'
22:07:01 <elliott> > iterate(group>=>(:)<$>length<*>take 1)[1]
22:07:02 <lambdabot> [[1],[1,1],[2,1],[1,2,1,1],[1,1,1,2,2,1],[3,1,2,2,1,1],[1,3,1,1,2,2,2,1],[1...
22:08:07 <kallisti> > iterate (toDyn . filterM (const [True, False])) []
22:08:08 <lambdabot> Couldn't match expected type `Data.Dynamic.Dynamic'
22:08:13 <oerjan> > iterate(group>=>show.length++take 1)[1]
22:08:14 <lambdabot> No instance for (GHC.Num.Num GHC.Types.Char)
22:08:21 <lambdabot> forall a. (Typeable a) => Dynamic -> a -> a
22:08:38 <oerjan> > iterate(group>=>length++take 1)[1]
22:08:39 <lambdabot> Couldn't match expected type `GHC.Types.Int'
22:08:40 <lambdabot> forall a. (Typeable a) => Dynamic -> Maybe a
22:08:56 <oerjan> i guess you really needed that.
22:09:09 <kallisti> > fromDyn (toDyn 2) undefined -- ????????
22:09:15 -!- Jafet has joined.
22:09:16 <oerjan> > iterate(group>=>return.length++take 1)[1]
22:09:18 <lambdabot> [[1],[1,1],[2,1],[1,2,1,1],[1,1,1,2,2,1],[3,1,2,2,1,1],[1,3,1,1,2,2,2,1],[1...
22:09:39 <oerjan> > iterate(group>=>(:[]).length++take 1)[1]
22:09:39 * elliott is just trying to get it even shorter somehow
22:09:40 <lambdabot> [[1],[1,1],[2,1],[1,2,1,1],[1,1,1,2,2,1],[3,1,2,2,1,1],[1,3,1,1,2,2,2,1],[1...
22:09:56 <elliott> > iterate(group>=>flip[length,take 1])[1]
22:09:56 <lambdabot> Couldn't match expected type `GHC.Types.Int'
22:10:08 <kallisti> > iterate (toDyn . filterM (const [True, False]) . (`fromDyn` [])) []
22:10:09 <lambdabot> Couldn't match expected type `Data.Dynamic.Dynamic'
22:10:10 <elliott> > iterate(group>=>flip[(length++),take 1])[1]
22:10:11 <lambdabot> Couldn't match expected type `[a]'
22:10:11 <lambdabot> against inferred type `[a1] -> G...
22:10:25 <kallisti> I have a feeling Dynamic is not the way to go about this :P
22:10:36 -!- saberman_101 has joined.
22:10:53 <elliott> @hoogle (a -> Bool) -> [a] -> Int
22:10:54 <lambdabot> Data.List findIndex :: (a -> Bool) -> [a] -> Maybe Int
22:10:54 <lambdabot> Data.List findIndices :: (a -> Bool) -> [a] -> [Int]
22:10:54 <lambdabot> Data.List find :: (a -> Bool) -> [a] -> Maybe a
22:10:57 <kallisti> > iterate (toDyn . filterM (const [True, False]) . (`fromDyn` [])) (toDyn [])
22:10:57 <lambdabot> Data.List elemIndex :: Eq a => a -> [a] -> Maybe Int
22:10:57 <lambdabot> Data.List elemIndices :: Eq a => a -> [a] -> [Int]
22:10:58 <lambdabot> Network.BufferType buf_concat :: BufferOp a -> [a] -> a
22:10:58 <oerjan> > iterate(group>=>flip[length,head])[1]
22:10:58 <lambdabot> Ambiguous type variable `a' in the constraint:
22:11:02 <lambdabot> [[1],[1,1],[2,1],[1,2,1,1],[1,1,1,2,2,1],[3,1,2,2,1,1],[1,3,1,1,2,2,2,1],[1...
22:11:43 <elliott> > iterate (\xs -> if length (filter id xs) > length (filter not xs) then xs++[False] else xs++[True]) []
22:11:45 <lambdabot> [[],[True],[True,False],[True,False,True],[True,False,True,False],[True,Fal...
22:11:46 <oerjan> 1 char shorter i think
22:11:52 <shachaf> Hey, all y'all should golf a Pascal's triangle generator.
22:12:09 <shachaf> That was brought up on a mailing list I'm on.
22:12:12 <lambdabot> forall a b. (?x::a -> b) => a -> [b]
22:12:25 <shachaf> > iterate(\f->zipWith(+)f(0:f)++[1])[1]
22:12:26 <lambdabot> [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1],[1,5,10,10,5,1],[1,6,15,20,15,6,1]...
22:13:04 -!- saberman_101 has quit (Remote host closed the connection).
22:13:26 <elliott> > iterate ((++[1]).(\f -> zipWith (+) f (0:f))) [1]
22:13:27 <lambdabot> [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1],[1,5,10,10,5,1],[1,6,15,20,15,6,1]...
22:13:40 <elliott> > iterate ((++[1]).(zipWith (+) <*> (0:))) [1]
22:13:41 <lambdabot> [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1],[1,5,10,10,5,1],[1,6,15,20,15,6,1]...
22:13:47 <kallisti> is there a way to get a structure like that? arbitrarily deep nestings of empty elements or whatever.
22:13:48 <elliott> > iterate ((++[1]).zipWith (+) <*> (0:)) [1]
22:13:48 <lambdabot> Couldn't match expected type `a1 -> a' against inferred type `[t]'
22:13:56 <shachaf> > iterate(foldr(\v(p:q)->v:(p+v):q)[0])[1]
22:13:57 <lambdabot> [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1],[1,5,10,10,5,1],[1,6,15,20,15,6,1]...
22:14:00 <kallisti> I think zzo made something like that.
22:14:13 -!- centrinia has quit (Read error: Connection reset by peer).
22:14:26 -!- centrinia has joined.
22:14:27 <elliott> > iterate((++[1]).ap(zipWith(+))(0:))[1]
22:14:29 <lambdabot> [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1],[1,5,10,10,5,1],[1,6,15,20,15,6,1]...
22:14:48 -!- centrinia has quit (Client Quit).
22:14:58 -!- saberman_1 has joined.
22:15:26 <elliott> newtype Mu f = Mu (f (Mu f))
22:15:48 <lambdabot> Not in scope: data constructor `Mu'
22:15:55 <lambdabot> forall (f :: * -> *). f (Mu f) -> Mu f
22:16:03 <lambdabot> newtype Mu f = In { out :: f (Mu f) }
22:16:07 <lambdabot> forall (f :: * -> *) a. (Functor f) => (f a -> a) -> Mu f -> a
22:16:11 <lambdabot> Source not found. This mission is too important for me to allow you to jeopardize it.
22:16:20 <lambdabot> Couldn't match kind `(* -> *) -> *' against `* -> *'
22:16:20 <shachaf> @google type level fix and generic folds
22:16:21 <lambdabot> When matching the kinds of `Mu :: (* -> *) -> *' and `f :: * -> *'
22:16:21 <lambdabot> http://mainisusuallyafunction.blogspot.com/2010/12/type-level-fix-and-generic-folds.html
22:16:23 <kallisti> "cata" is WoW slang for Cataclysm
22:16:38 -!- saberman_1 has quit (Remote host closed the connection).
22:16:38 <shachaf> "WoW" is NetHack slang for Wand of Wishing.
22:16:53 <elliott> "NetHack" is internet slang for hacking.
22:17:06 <shachaf> "internet" is internet slang for internet.
22:17:47 <elliott> I sure hope 3 people upvote me in the next date
22:17:55 <elliott> I sure hope 3 people upvote me in the next 2 hours.
22:18:06 * elliott is good at switching windows.
22:18:26 <Jafet> Is that how dating sites work these days?
22:18:50 <fizzie> Jafet: Dating is all about SO reputation these days.
22:19:43 <Jafet> SO is all about whores
22:20:13 <fizzie> elliott is all "have you seen how large my SO reputation is", and all the ladi^Wpersons-of-interest are all "ooh!"
22:21:01 <Jafet> He can even give to them out of his large... reputation
22:21:11 <shachaf> elliott's reputation overflows the stack.
22:21:59 <elliott> fizzie: It's true! That's how I met lax.
22:22:12 <fizzie> elliott: We tried to find your SO reputation number the other day by searching for "elliott", and then was all "hey the search found a Haskell question, this must be the right thing" and then it was just that that Conal dude was mentioned in the text. (But don't worry, we did think of searching for "ehird" too when that didn't pan out.)
22:22:25 <oerjan> > iterate(filterM(const[True,False]).In)[]
22:22:26 <lambdabot> Couldn't match expected type `[a]' against inferred type `L.Mu []'
22:22:30 <elliott> fizzie: You tried to find my SO reputation as a group activity?
22:22:41 <fizzie> elliott: Well, you see, my wife was interested in your reputation.
22:22:55 <shachaf> elliott's reputation precedes him.
22:23:04 <elliott> You know you've made it when fizzie's wife knows about your reputation.
22:23:23 <fizzie> Your reputation had just passed five thousand at that point; I see it's over six thousand already now.
22:23:30 <oerjan> > iterate(In . filterM(const[True,False]))[]
22:23:31 <lambdabot> Couldn't match expected type `L.Mu []' against inferred type `[a]'
22:23:39 <lambdabot> forall (f :: * -> *). f (Mu f) -> Mu f
22:24:05 <Jafet> > iterate(In . filterM(const[True,False])) (In [])
22:24:06 <lambdabot> Couldn't match expected type `L.Mu []' against inferred type `[a]'
22:24:24 <lambdabot> newtype Rec a = InR { outR :: Rec a -> a }
22:24:24 -!- saberman_1 has joined.
22:24:27 <elliott> fizzie: Conal also has a Stack Overflow account! He has less reputation than me.
22:24:35 <elliott> Soon everybody will forget about THAT Elliott.
22:24:52 -!- saberman_1 has quit (Remote host closed the connection).
22:24:57 <Phantom_Hoover> fizzie, why on earth did your wife care about elliott's SO rep.
22:25:06 <Jafet> > iterate(In . filterM(const[True,False]) . \(In xs) -> xs) (In [])
22:25:07 <lambdabot> Couldn't match expected type `L.Mu []' against inferred type `[a]'
22:25:22 <fizzie> Phantom_Hoover: Who wouldn't?
22:25:23 <elliott> shachaf: Why isn't Rec defined as type Rec = Mu :. Flip (->)
22:25:41 <Phantom_Hoover> fizzie, HELP AM I THE ONLY ONE WHO WISHES HE WOULD STOP
22:26:10 <shachaf> elliott: WHY AREN'T *YOU* DEFINED AS type You = Mu :. Flip (->)???
22:26:11 <fizzie> Phantom_Hoover: Anyway, she often asks of #esoteric happenings, and it has been a PROMINENT TOPIC lately, has it not? We've certainly had some SO weather, eh?
22:26:31 <oerjan> > iterate(filterM(const[True,False]).map out)[]
22:26:32 <lambdabot> Couldn't match expected type `[t (L.Mu t)]'
22:26:34 <elliott> fizzie: What is it with everybody talking about #esoteric IRL?
22:26:41 <lambdabot> newtype Mu f = In { out :: f (Mu f) }
22:26:45 <elliott> WHAT HAPPENS IN #ESOTERIC STAYS IN #ESOTERIC.
22:26:59 <fizzie> Except for the bits that leak out into the logs.
22:27:05 <elliott> Well, we redact most of those.
22:27:44 <oerjan> > iterate(map In . filterM(const[True,False]))[]
22:27:46 <lambdabot> [[],[In []],[In [In []],In []],[In [In [In []],In []],In [In [In []]],In [I...
22:27:57 -!- saberman_1 has joined.
22:28:01 <shachaf> @ is the ASCII CHARACTER THAT COMES AFTER ?
22:28:05 <elliott> fizzie: Searching "elliott" also finds a Haskell question where Trevor Elliott is mentioned. :/
22:28:10 <elliott> I need to assassinate the other Elliotts.
22:28:39 <shachaf> "assassinate" is like "murder" except the target is important, right?
22:28:44 <elliott> oerjan: Now rewrite everything with Mu [] and you'll be an Ursula user.
22:29:01 -!- saberman_1 has quit (Remote host closed the connection).
22:29:38 <elliott> It is probably not worth noting that "splat" and "big money" are the official pronunciations specified for the * and $ operators in the original INTERCAL Reference Manual, which is most certainly an authoritative source if I've never heard of one. – C. A. McCann Apr 29 '11 at 20:23
22:29:47 <elliott> SO Haskellers know what's *really* important.
22:30:32 -!- saberman_1 has joined.
22:30:43 -!- cheater_ has quit (Quit: leaving).
22:30:53 <shachaf> I'll tell cheater_ you want him back.
22:31:31 <elliott> @let ana f = fix (\g -> In . fmap g . f)
22:31:35 -!- saberman_1 has quit (Remote host closed the connection).
22:31:36 <lambdabot> forall a (f :: * -> *). (Functor f) => (a -> f a) -> a -> Mu f
22:31:51 <lambdabot> In [In [In [In [In [In [In [In [In [In [In [In [In [In [In [In [In [In [In ...
22:33:05 <oerjan> > fix(out<$>) `asTypeOf` Nothing
22:33:06 <lambdabot> Couldn't match kind `* -> *' against `(* -> *) -> *'
22:33:14 <lambdabot> newtype Mu f = In { out :: f (Mu f) }
22:34:10 <oerjan> > fix(In . pure) `asTypeOf` Nothing
22:34:11 <lambdabot> Couldn't match expected type `L.Mu f'
22:34:31 <oerjan> > fix(pure.In) `asTypeOf` Nothing
22:34:32 <lambdabot> Just (In (Just (In (Just (In (Just (In (Just (In (Just (In (Just (In (Just ...
22:34:42 <oerjan> > fix(pure.In) `asTypeOf` []
22:34:43 <lambdabot> [In [In [In [In [In [In [In [In [In [In [In [In [In [In [In [In [In [In [In...
22:34:54 <oerjan> > fix(pure.In) `asTypeOf` (Left "")
22:34:56 <lambdabot> Right (In (Right (In (Right (In (Right (In (Right (In (Right (In (Right (In...
22:36:30 <lambdabot> forall a. (Show a) => [a] -> String -> String
22:37:16 -!- saberman_1 has joined.
22:37:22 <lambdabot> forall (f :: * -> *). (Mu f -> f (Mu f)) -> Mu f
22:37:27 -!- saberman_1 has quit (Remote host closed the connection).
22:37:38 <elliott> :t \f -> In (fix (f . In))
22:37:38 <lambdabot> forall (f :: * -> *). (Mu f -> f (Mu f)) -> Mu f
22:37:57 <elliott> oerjan: oh it's the asTypeOf that broke yours
22:38:06 <lambdabot> In (Just (In (Just (In (Just (In (Just (In (Just (In (Just (In (Just (In (J...
22:39:22 <oerjan> > iterate(map var.filterM(const[True,False]))[]
22:39:23 <lambdabot> Couldn't match expected type `Data.Number.Symbolic.Sym a'
22:40:42 <elliott> shachaf: What system are you on?
22:40:54 <lambdabot> forall a b (f :: * -> *). (Functor f) => (a -> b) -> f [a] -> f [b]
22:41:03 <oerjan> :t \f -> (map f Prelude..)
22:41:04 <lambdabot> forall a b a1. (a -> b) -> (a1 -> [a]) -> a1 -> [b]
22:41:19 <elliott> shachaf: Wait, you realise there are GHC 7.4 binaries, right?
22:41:26 <shachaf> elliott: Yes, but I'm too lazy to install them.
22:41:32 <shachaf> And also, they're release candidates.
22:41:38 <oerjan> @hoogle (a -> b) -> (a1 -> f a) -> a1 -> f b
22:41:38 <lambdabot> Control.Parallel.Strategies ($|) :: (a -> b) -> Strategy a -> a -> b
22:41:39 <lambdabot> Control.Parallel.Strategies ($||) :: (a -> b) -> Strategy a -> a -> b
22:41:39 <lambdabot> Control.Parallel.Strategies (.|) :: (b -> c) -> Strategy b -> (a -> b) -> (a -> c)
22:41:39 <shachaf> I'm waiting until one of them gets voted in.
22:42:09 <elliott> shachaf: wget http://www.haskell.org/ghc/dist/7.4.1-rc1/ghc-7.4.0.20111219-x86_64-unknown-linux.tar.bz2 && tar xf ghc* && cd ghc* && ./configure --prefix=~/ghc-7.4 && make install
22:42:14 <oerjan> @hoogle (a -> b) -> (a1 -> [a]) -> a1 -> [b]
22:42:28 <elliott> "I believe the Show superclass constraint has been removed from Num." PRAISE THE LORD
22:43:56 <oerjan> > iterate(map(var.show).showfilterM(const[True,False]))[]
22:44:01 <oerjan> > iterate(map(var.show).filterM(const[True,False]))[]
22:44:02 <lambdabot> [[],[[]],[[[]],[]],[[[[]],[]],[[[]]],[[]],[]],[[[[[]],[]],[[[]]],[[]],[]],[...
22:46:08 <oerjan> judging by my programming, if i become lord i will solve all your problems, although not without accidentally obliterating a few countries in the process.
22:46:56 <oerjan> all the problems that don't require real work, that is.
22:47:40 <kallisti> `perl @a = (undef); print @a // 1
22:47:43 <HackEgo> Can't open perl script "@a = (undef); print @a // 1 ": No such file or directory
22:47:44 <kallisti> !perl @a = (undef); print @a // 1
22:47:56 <kallisti> !perl @a = (undef); print $a[0]
22:48:07 <kallisti> !perl @a = (undef); print scalar @a
22:48:51 <kallisti> !perl @a = (1,2,3); print @a // 3
22:49:27 <kallisti> so // is not entirely equivalent to a ?: as the docs suggest.
22:50:08 <elliott> <oerjan> @hoogle (a -> b) -> (a1 -> [a]) -> a1 -> [b]
22:50:14 <elliott> oh, wait, you already wrote that
22:50:35 <shachaf> @hoogle a -> b -> a -> b -> a -> b -> a
22:50:36 <lambdabot> Data.List zipWith6 :: (a -> b -> c -> d -> e -> f -> g) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g]
22:50:37 <lambdabot> Data.List zipWith7 :: (a -> b -> c -> d -> e -> f -> g -> h) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [h]
22:55:12 <oerjan> elliott: i was hoping for an operator so i could just write var.show ... filterM(const[True,False])
22:56:00 <lambdabot> forall a b (f :: * -> *) (g :: * -> *). (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b)
22:56:29 <oerjan> :t (.:) `asTypeOf` fmap fmap fmap
22:56:30 <lambdabot> forall (f :: * -> *) a b (f1 :: * -> *). (Functor f, Functor f1) => (a -> b) -> f (f1 a) -> f (f1 b)
22:56:50 <oerjan> > iterate(var.show.:filterM(const[True,False]))[]
22:56:51 <lambdabot> Couldn't match expected type `GHC.Types.Char'
22:56:57 <shachaf> I pretty much have one response to questions in #haskell these days.
22:57:06 <shachaf> "You should understand why blah blah blah."
22:57:10 <shachaf> I could make a shachafbot.
22:57:13 <kallisti> oerjan: Sym has a type parameter
22:57:51 <oerjan> kallisti: that didn't matter with map(var.show).
22:58:11 <kallisti> also can you powerset a Sym [a] ?
22:58:23 <oerjan> > iterate((var.show).:filterM(const[True,False]))[]
22:58:25 <lambdabot> [[],[[]],[[[]],[]],[[[[]],[]],[[[]]],[[]],[]],[[[[[]],[]],[[[]]],[[]],[]],[...
22:58:37 <oerjan> ah the problem was precedence
22:58:47 <oerjan> or associativity, rather
22:58:55 <kallisti> I'm kind of confused as to how [] types as Sym [a]
23:00:44 <shachaf> @let varr :: Arrow a => String -> Sym (a b c); varr = var
23:00:49 <oerjan> var.show is just a trick to get something of a fixed type that shows the same as whatever
23:02:49 <lambdabot> Data.List mapAccumL :: (acc -> x -> (acc, y)) -> acc -> [x] -> (acc, [y])
23:02:49 <lambdabot> Data.Traversable mapAccumL :: Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c)
23:02:49 <lambdabot> Data.List mapAccumR :: (acc -> x -> (acc, y)) -> acc -> [x] -> (acc, [y])
23:03:14 <shachaf> Between mapAccumL and mapAccumR?
23:03:20 <oerjan> kallisti: so? that's why it's .: not .
23:03:32 <shachaf> mapAccumL is often the one you want, I think.
23:03:51 <kallisti> oerjan: oh, er... I don't know what's that doing here then
23:04:28 <kallisti> as elliott would say, I don't understand function composition
23:04:57 <oerjan> kallisti: (var.show).: converts a list's elements to Sym a without changing what their printed as
23:05:04 <shachaf> kallisti: So, like, you know functions? Imagine that you had, like, a function, and, like, another function.
23:05:32 <shachaf> And so you applied one function to the value, and then applie the other function to the result of that.
23:05:33 <kallisti> shachaf: also poor explanation
23:05:38 <oerjan> oh right, it's a function on the right producing a list, too
23:05:49 <shachaf> Function composition is the same thing, but WITHOUT THE VALUE.
23:06:33 <kallisti> var( show ( (filterM (const [True, False])) x)
23:06:56 <lambdabot> No instance for (SimpleReflect.FromExpr (SimpleReflect.Expr, y))
23:07:17 <oerjan> kallisti: no, it's fmap (var . show) ((filterM (const [True, False])) x)
23:07:30 <shachaf> elliott: Expect f to return a tuple and expecting SimpleReflect to Do The Right Thing with it is going a bit far.
23:07:43 <shachaf> I mean, there's nothing reasonable you could even do there by hand.
23:08:15 <elliott> shachaf: Well, SimpleReflect isn't The Right Thing. :p
23:08:16 <shachaf> > mapAccumL (\a b -> (a ++ show b, b+1)) "init" [5,6,7,8,9]
23:08:24 <shachaf> > mapAccumR (\a b -> (a ++ show b, b+1)) "init" [5,6,7,8,9]
23:08:31 <kallisti> oerjan: I'm aware of .: but I forget that it's a functor thing and not a function thing.
23:08:37 <shachaf> Actually the example I gave there is kind of terrible.
23:08:45 <elliott> shachaf: accumE' x (Cons fs fss) = Cons xs $ accumE' x fss
23:08:45 <elliott> where (x', xs) = instant x fs
23:08:47 <shachaf> > mapAccumL (\a b -> (a ++ show b, b+length a)) "init" [5,6,7,8,9]
23:08:50 <elliott> I'm trying to figure out which one I want to port to Stream. :p
23:08:52 <shachaf> > mapAccumR (\a b -> (a ++ show b, b+length a)) "init" [5,6,7,8,9]
23:09:03 <shachaf> elliott: You probably want to port mapAccumL to stream.
23:09:34 <shachaf> mapAccumL is, if I'm understanding correctly, the reasonably-lazy one for lists.
23:10:56 <kallisti> shachaf: yo, you've got this shit right? and you've got some shit you wanna do followed by some other shit, right? but maybe you wanna do the two shits to more than one shit, you know? well you can just put a . between the two shits you wanna do and it becomes this new shit you can do where one shit that gets done becomes the shit that gets done by the other shit
23:11:33 <shachaf> That's not how function composition works, kallisti. That's how laxatives work.
23:12:24 <elliott> `addquote <kallisti> shachaf: yo, you've got this shit right? and you've got some shit you wanna do followed by some other shit, right? but maybe you wanna do the two shits to more than one shit, you know? well you can just put a . between the two shits you wanna do and it becomes this new shit you can do where one shit that gets done becomes the shit that gets done by the other shit <shachaf> That's not how function composition works, kallisti.
23:12:24 <elliott> That's how laxatives work.
23:12:27 <HackEgo> 797) <kallisti> shachaf: yo, you've got this shit right? and you've got some shit you wanna do followed by some other shit, right? but maybe you wanna do the two shits to more than one shit, you know? well you can just put a . between the two shits you wanna do and it becomes this new shit you can do where one shit that gets done becomes the shit that gets done by the other shit <shachaf> That's not how function composition works, kallisti.
23:12:34 <HackEgo> *poof* <kallisti> shachaf: yo, you've got this shit right? and you've got some shit you wanna do followed by some other shit, right? but maybe you wanna do the two shits to more than one shit, you know? well you can just put a . between the two shits you wanna do and it becomes this new shit you can do where one shit that gets done becomes the shit that gets done by the other shit <shachaf> That's not how function composition works, kallisti.
23:12:37 <oerjan> > mapAccumR (\acc x -> (x:acc, x)) [] [1..]
23:12:37 <lambdabot> ([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,2...
23:12:42 <shachaf> Too long for your quote database.
23:12:45 <oerjan> > mapAccumL (\acc x -> (x:acc, x)) [] [1..]
23:12:52 <elliott> shachaf: Well, no, I could hack it in, but HackEgo would chop it off on reproduction.
23:13:03 <elliott> oerjan: shachaf is lies. :(
23:13:08 <shachaf> Right. Which is good enough for me.
23:13:12 <kallisti> I like when stalker mode gets messages before irssi gets messages
23:13:25 <elliott> *Main> takeStream 10 $ simulate (\e -> accumE 0 ((+1) <$ e)) (pure (Just ()))
23:13:25 <elliott> [Just 1,Just 1,Just 1,Just 1,Just 1,Just 1,Just 1,Just 1,Just 1,Just 1]
23:13:44 * shachaf has never used stalker mode.
23:13:53 <kallisti> I use it to verify that my line did not get cut off
23:14:08 <kallisti> I'm sure there's a better way I could be handling that.
23:14:14 <shachaf> Wow, this is just like reading IRC.
23:14:44 <oerjan> > snd $ mapAccumR (\acc x -> (x:acc, x)) [] [1..]
23:14:48 <elliott> irssi handles line-wrapping, doofus.
23:14:52 <oerjan> > snd $ mapAccumL (\acc x -> (x:acc, x)) [] [1..]
23:14:58 <kallisti> shachaf: yep except no one knows you're there
23:14:58 <shachaf> If only I had a way of reading IRC...
23:15:18 <kallisti> perfect for humorous ragequits that you want to read the reaction to
23:15:24 <shachaf> kalliti: Unlike the normal situation, where no one cares you're there?
23:15:36 <kallisti> but maybe you're banned and you want to ruminate?
23:15:40 <kallisti> stalker mode has lots of possibilities.
23:16:21 <oerjan> i have a hunch one of mapAccumL and mapAccumR _ought_ to take the function flipped.
23:16:49 <kallisti> also you can pretend to be really angry and quit IRC and then when someone keeps talking you log in to reply and then leave again
23:16:49 <shachaf> oerjan: NO THAT'S RIDICULOUS
23:16:53 <kallisti> I think elliott has done this.
23:17:22 <oerjan> by foldl / foldr analogy
23:18:00 <lambdabot> Data.Traversable traverse :: (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
23:18:01 <lambdabot> Data.Foldable traverse_ :: (Foldable t, Applicative f) => (a -> f b) -> t a -> f ()
23:18:01 <lambdabot> Control.Parallel.Strategies parTraverse :: Traversable t => Strategy a -> Strategy (t a)
23:18:13 -!- Patashu has joined.
23:18:14 <kallisti> elliott: hi have you ever used Control.Parallel.Strategies?
23:18:18 <shachaf> oerjan: Well, foldl/foldr are wrong.
23:18:24 <shachaf> And so are mapAccumLmapAccumR.
23:18:56 <shachaf> But if elliott is wrong, I don't want to be right, man.
23:31:09 <kmc> <elliott> "I believe the Show superclass constraint has been removed from Num." PRAISE THE LORD
23:31:16 <kmc> yeah, fuck standards compliance!
23:31:21 <kmc> fuck software which does what it's specified to do!
23:31:37 <kmc> we'll bow to the whims of the pitchfork mob any day
23:33:29 <kmc> unless GHC removes monomorphism restriction I will capsize five tankers in the ellingson fleet
23:34:37 <shachaf> GHC progresses way too slowly.
23:34:39 <shachaf> The Grassgrow Haskell Compiler.
23:34:57 <kmc> the Glorious Glasgow Haskell-except-Num-has-no-superclasses Compiler
23:35:09 <kmc> itym "Haskerr"
23:35:40 <kmc> see, I'd be fine with a solution where -XHaskell98 and -XHaskell2010 do what they're supposed to
23:36:12 <kmc> even with -XHaskell98, Show and Eq are not superclasses of Num
23:36:18 <kmc> which breaks existing Haskell code
23:36:19 <shachaf> What about the fancy new superclass default constraint kind variable polymorphism inference thing?
23:36:21 <kmc> some in standard libraries even
23:36:40 <kmc> you'll need generalized abstract superclass default constraint kind variable polymorphism inference synonym families to do that
23:36:46 <shachaf> I thought that had something to do with them being able to removing superclasses without breaking compatibility.
23:36:52 <kmc> but only a Java Monkey would fail to understand those
23:37:13 <kmc> shachaf, there was discussion of ways to do that, but I don't think it's in GHC HEAD yet
23:37:15 -!- Phantom_Hoover has quit (Quit: Leaving).
23:38:52 <shachaf> So why did they remove that?
23:38:56 <kmc> remove what
23:39:01 <shachaf> The superclass constraint.
23:39:13 <shachaf> I mean, I'm all for fixing the Num hierarchy, but removing a single constraint seems like the worst of all worlds.
23:39:13 <kmc> i dunno man
23:39:26 <kmc> it's dumb because it breaks existing code
23:39:28 <shachaf> Someone ought to do something!
23:39:33 <kmc> like, it can turn a module which typechecks into one which doesn't
23:39:39 * shachaf goes to upvote a Reddit post.
23:39:49 <kmc> if you have «f :: (Num a) => ...», and you use Eq or Show constraints within f
23:50:36 <elliott> <kmc> yeah, fuck standards compliance!
23:50:37 <elliott> <kmc> fuck software which does what it's specified to do!
23:50:37 <elliott> <kmc> we'll bow to the whims of the pitchfork mob any day
23:50:50 <elliott> Right, GHC would be so much better if it just implemented Haskell 2010 and didn't deviate or extend upon it in any way.
23:51:06 <shachaf> elliott: That sounds like a strawman.
23:51:09 <elliott> BTW, I think Eq is still a superclass, or pattern-matching would break.
23:51:11 <kmc> elliott, I'm fine with extensions that need to be enabled, or at least can be disabled
23:51:15 <elliott> shachaf: It is, but so is kmc's.
23:51:31 <shachaf> elliott: I think it adds Eq when you pattern-match.
23:51:39 <shachaf> elliott: Just like for OverloadedStrings.
23:51:41 <kmc> in this case, i don't think there's any way to change the non-compliant behavior
23:51:46 <shachaf> Since Eq is certainly not a superclass of IsString.
23:51:59 <kmc> and it's not an "extension", it's breakage which already broke standard library code
23:52:02 <lambdabot> Source not found. Maybe you made a typo?
23:52:23 <elliott> kmc: The option to be standards-compliant is nice until you realise that you don't really have that option because all the libraries that everybody uses depend on tons of extensions.
23:52:40 <elliott> So it's kind of a non-option anyway.
23:52:47 <shachaf> elliott: That doesn't mean you have to break packages that only depend on the standard.
23:53:29 <kmc> elliott, those libraries document the extensions they use
23:53:34 <elliott> shachaf: No, but how many of those really exist?
23:54:02 <kmc> part of my objection is that the Haskell 2010 language is better specified and better documented than the "what GHC accepts this week" language
23:54:15 <shachaf> elliott: Enough for actual breakage to happen.
23:54:20 <kmc> but even when you deviate from Haskell 2010, you note those deviations with explicit LANGUAGE flags
23:54:22 <elliott> kmc: My point is that the vast majority of code out there doesn't work in a strict Haskell 2010 compiler because of dependencies; indeed, it perhaps cannot because of interfaces that are only implementable with such extensions.
23:54:31 <elliott> I'm not saying standards aren't nice things.
23:54:33 <kmc> i think your point is irrelevant to my point
23:54:41 <elliott> I'm just saying that the Haskell report is already kind of irrelevant.
23:54:53 <kmc> this is a common fallacy in #haskell
23:55:02 <kmc> that, since people only use GHC, we shouldn't care about the spec
23:55:06 <kmc> there are many reasons to still care about the spec
23:55:18 <kmc> one is that it specifies what your programs mean
23:55:24 <kmc> at a level of detail which the GHC manual does not
23:55:28 <elliott> I'm not talking about what the ideal situation is, just what the actual situation is in my opinion.
23:55:37 <elliott> As I said, I totally agree that specifications are good things.
23:55:47 <kmc> for most extensions, the GHC manual has a couple of informal paragraphs and a link to a paper about a vaguely related research project
23:57:14 <elliott> I'm just saying that while the situation is like it is, the vast, vast majority of code can't work with just Haskell 2010 anyway, so breaking Haskell 2010 compatibility isn't itself a reason not to do something.
23:57:23 <elliott> "Breaking a lot of code" might be, though, and this change might.
23:57:57 <shachaf> I have the feeling that the two of you aren't going to come to an agreement.
23:58:16 -!- Jafet1 has joined.
23:58:36 <kmc> i just think it's really bad that this change can't be controlled with a -X flag
23:58:42 <kmc> not only because you can't opt out
23:58:50 <kmc> but because code which relies on this new behavior will not document itself
23:58:58 <shachaf> GHC has had a number of changes that couldn't be controlled with a -X flag.
23:58:59 <kmc> you can't even test whether you're relying on it
23:59:07 <shachaf> Most of these were considered bugs, though, and fixed eventually.
23:59:13 <kmc> shachaf, notable examples?
23:59:22 -!- Jafet has quit (Disconnected by services).
23:59:24 -!- Jafet1 has changed nick to Jafet.
23:59:30 <shachaf> There were some others in that vein.
23:59:36 <kallisti> perl doesn't have a standard and it works just fine. :>
23:59:37 <kmc> yeah, it's also not in the class of "GHC accepts some programs which technically should be rejected"
23:59:39 <elliott> kmc: Well, if it makes you happier, the next standard is practically guaranteed to include this change now GHC's done it, making it standard once more. :p
23:59:44 <kmc> elliott, oh?
23:59:54 <kmc> i'm not convinced
23:59:58 <kmc> kallisti, ;P