00:00:50 <oerjan> CakeProphet: it is my fundamental human right to believe in joke detectors, just as it is your right not to have a working joke detector detector
00:24:32 <zzo38> Does the prime vertical circle have anything to do with solar noon?
00:27:12 <zzo38> I found this: http://kirstenmichel.com/ss2.html
00:48:49 <pikhq_> Japanese drinking culture frightens me.
00:48:56 <pikhq_> 飲み放題. That means "all you can drink".
00:53:16 <oerjan> you know, american "all you can eat" isn't _that_ much less frightening :P
00:53:43 <oerjan> (ok, so "all you can eat" exists in norway too)
00:54:06 <pikhq_> Except "all you can eat" is not the center of an evening's activities.
00:57:31 -!- monqy has quit (Ping timeout: 248 seconds).
01:08:21 -!- oerjan has quit (Quit: Good night).
01:13:23 -!- pikhq has joined.
01:13:38 -!- pikhq_ has quit (Ping timeout: 255 seconds).
01:16:05 -!- Timwi has joined.
01:16:43 -!- Timwi has quit (Client Quit).
01:19:37 -!- Patashu has quit (Quit: MSN: Patashu@hotmail.com , Gmail: Patashu0@gmail.com , AIM: Patashu0 , YIM: patashu2 , Skype: patashu0 .).
01:20:29 -!- Timwi has joined.
01:21:25 <Gregor> I finally have X-Chat on Mac
01:42:53 <Gregor> "* Channel #esoteric created on Sun Nov 26 01:42:50 2006" // we're nearing the five-year anniversary of a rather-arbitrary date that Freenode thinks #esoteric was created on for some reason.
01:44:13 -!- pikhq_ has joined.
01:44:46 -!- pikhq has quit (Ping timeout: 260 seconds).
01:45:30 -!- Timwi has quit.
01:48:43 -!- CakeProphet has quit (Ping timeout: 248 seconds).
01:53:27 -!- TeruFSX has joined.
02:05:34 -!- Jafet has joined.
02:14:20 -!- CakeProphet has joined.
02:14:20 -!- CakeProphet has quit (Changing host).
02:14:20 -!- CakeProphet has joined.
02:17:05 -!- MDude has changed nick to MSleep.
02:31:11 <zzo38> Is that not the date this channel was created on?
02:32:07 <zzo38> It was registered before then, though.
02:32:51 <CakeProphet> > let letters = ['a'..'z']; t = zip letters ((drop 13 letters) ++ (take 13 letters)); rot13 c = fromMaybe c (lookup c t) in map rot13 "Grego is actually Roger G."
02:33:40 <lambdabot> Prelude lookup :: Eq a => a -> [(a, b)] -> Maybe b
02:33:40 <lambdabot> Data.HashTable lookup :: HashTable key val -> key -> IO (Maybe val)
02:33:40 <lambdabot> Data.IntMap lookup :: Key -> IntMap a -> Maybe a
02:33:58 <lambdabot> Data.Graph.Inductive.Query.SP spLength :: (Graph gr, Real b) => Node -> Node -> gr a b -> b
02:33:58 <lambdabot> Data.Array.MArray writeArray :: (MArray a e m, Ix i) => a i e -> i -> e -> m ()
02:33:58 <lambdabot> Data.Graph.Inductive.Query.MaxFlow maxFlow :: (DynGraph gr, Num b, Ord b) => gr a b -> Node -> Node -> b
02:34:01 <lambdabot> Data.Graph.Inductive.Query.SP spLength :: (Graph gr, Real b) => Node -> Node -> gr a b -> b
02:34:02 <lambdabot> Data.Graph.Inductive.Query.BFS lesp :: Graph gr => Node -> Node -> gr a b -> LPath b
02:34:02 <lambdabot> Data.Graph.Inductive.Query.BFS esp :: Graph gr => Node -> Node -> gr a b -> Path
02:34:15 <lambdabot> Data.Graph.Inductive.Query.SP spLength :: (Graph gr, Real b) => Node -> Node -> gr a b -> b
02:34:15 <lambdabot> Data.Graph.Inductive.Query.BFS lesp :: Graph gr => Node -> Node -> gr a b -> LPath b
02:34:15 <lambdabot> Data.Graph.Inductive.Query.BFS esp :: Graph gr => Node -> Node -> gr a b -> Path
02:34:49 <lambdabot> Data.Map findWithDefault :: Ord k => a -> k -> Map k a -> a
02:34:49 <lambdabot> Data.Graph.Inductive.Query.SP spLength :: (Graph gr, Real b) => Node -> Node -> gr a b -> b
02:34:49 <lambdabot> Data.Graph.Inductive.Query.BFS lesp :: Graph gr => Node -> Node -> gr a b -> LPath b
02:35:31 <pikhq_> > let lower = ['a'..'z'];upper = ['A'..'Z'];f x = zip x ((drop 13 x) ++ (take 13 x));t = f lower ++ f upper;rot13 c = fromMaybe c (lookup c t) in map rot13 "Lawlz."
02:41:01 <CakeProphet> > let lower = ['a'..'z']; upper = ['A'..'Z']; f x = zip x ((drop 13 x) ++ (take 13 x)); t = M.fromList (f lower ++ f upper); rot13 c = M.findWithDefault c c t in map rot13 "Gregor is actually Roger G."
02:42:38 <CakeProphet> so at compile time does GHC compute the result of all constants?
02:43:01 <CakeProphet> so that t is just a predefined Map at runtime?
02:44:20 <Jafet> (repeat 1) is a constant
02:47:46 <CakeProphet> I think in some cases you could analyze that the function terminates.
02:48:44 <CakeProphet> but if you immediately exclude all recursion then you've eliminated a large amount of constant optimization.
02:49:13 <CakeProphet> ++ on finite constant lists wouldn't allow optimization.
02:53:19 -!- Jafet has quit (Quit: Leaving.).
02:59:37 <CakeProphet> perhaps if strictness analysis determines that a constant expression can be strictly evaluated
02:59:50 <CakeProphet> then it would be safe to go ahead and precompute the result.
03:03:28 -!- copumpkin has quit (Ping timeout: 256 seconds).
03:03:50 -!- copumpkin has joined.
03:27:48 -!- Nisstyre has changed nick to \EXPERT_PROGRAMM.
03:27:58 -!- \EXPERT_PROGRAMM has changed nick to Nisstyre.
03:29:20 -!- CakeProphet has quit (Quit: Lost terminal).
03:57:11 -!- augur has changed nick to schopenhauer.
03:57:24 -!- schopenhauer has changed nick to augur.
04:04:25 -!- CakeProphet has joined.
04:04:26 -!- CakeProphet has quit (Changing host).
04:04:26 -!- CakeProphet has joined.
04:16:42 <hagb4rd> hi cakeprophet; all knows the problem: you need to format an os partition but want to be sure not to loose any data still hanging around somewhere in tons of garbage. can anyone recommend a tool to (pre)analyse the structure of the contente (especially user documents, pics, etc)
04:32:52 <CakeProphet> I know Ubuntu has something called "disk usage analyzer" the creates a chart of disk usage per directory/file.
04:34:16 <CakeProphet> otherwise, if you're searching for important shit. find is a good command line tool for doing such.
04:35:09 <pikhq_> http://www.youtube.com/watch?v=8gpQ6nfMi80 This is meant to be funny. It is both funny and reminds me of the pain that has been inflicted upon my soul.
05:03:00 <zzo38> If you have an object X in a category then what is it called when no morphisms exist from X to any other object? And what is it called if the only morphism from X to X is the identity morphism? What is it called if both conditions apply?
05:13:08 -!- zzo38 has quit (Quit: zzo38).
05:32:15 -!- hagb4rd has quit (Quit: Nettalk6 - www.ntalk.de).
05:45:51 <CakeProphet> it seems to me that C++11 fixes a lot of problems with C++
05:45:56 <CakeProphet> by making the language really terrible and ugly.
05:59:23 -!- ive has quit (Ping timeout: 248 seconds).
06:08:01 -!- hagb4rd has joined.
06:30:40 <CakeProphet> fizzie: do you know if the \p{...} regex properties require the utf8 flag to be?
06:31:40 <CakeProphet> apparently when I decode ASCII to UTF-8 the UTF-8 flag stays off for backwards compatability. If \p{...} requires utf8 on then that may be why my code isn't working.
06:31:59 <fizzie> No, they should just treat it as UTF-8 regardless of the flag.
06:32:05 <fizzie> Of course that doesn't matter for ASCII.
06:32:55 <fizzie> "-- if the "locale" or "encoding" pragmas are not used and the string is not "utf8", then "[[:xxxxx:]]" (and "\w", etc.) will not match characters 0x80-0xff; whereas "\p{IsXxxxx}" will force the string to "utf8" and can match these characters (as Unicode)."
06:33:06 <fizzie> But if you convert from ASCII, there will be no bytes 0x80-0xff in there.
06:33:54 <CakeProphet> I have no clue why the /usr/share/dict datasets are empty after I run my script.
06:34:26 <lifthrasiir> I definitely have to implement Sclipting...
06:34:57 <CakeProphet> fizzie: maybe file is giving me the incorrect encodings for them?
06:35:48 <fizzie> I don't: know. Incorrect encodings doesn't sound like something that'd lead to empty outputs, though.
06:36:12 <CakeProphet> fizzie: the reason the output is empty is because my regex is always succeeding on these datasets
06:36:29 <CakeProphet> /[^\p{Alphabetic}\p{Letter}\p{Dash_Punctuation}\p{Connector_Punctuation}']/;
06:36:36 <CakeProphet> it's supposed to skip anything that passes this.
06:38:48 <CakeProphet> I read the files in as :raw, then use decode($encoding, $input)
06:39:26 <fizzie> Have you looked at the files? I don't really know about the other languages, but my /usr/share/dict/finnish has "$\" at the end of 88% of the words. (Though there's still a couple of words that should not match that.)
06:41:58 <fizzie> I don't really know. It may be an affix marker thing; though the ispell man page doesn't really suggest so. I don't even know which program those files are for.
06:43:07 -!- Ngevd has joined.
06:43:44 <Ngevd> I like how a minor change to a page can be over 32000 characters
06:45:00 <fizzie> CakeProphet: Well, I don't know. Are you doing something else differently for the dict stuff? Could you be leaving the newline in there or something? I'm just grasping at straws here, really. Hexdump the strings that match that regex and check what's wrong with them? I'unno.
06:49:16 <CakeProphet> Wide character in print at ./construct_grams.pl line 22, <$f> line 5828977.
06:49:21 <CakeProphet> also I got a lot of these in the french dataset
06:50:11 <fizzie> It certainly shouldn't be related to the lack of the utf8 flag, though:
06:50:13 <fizzie> $ perl -e '$x = "foobar"; print "is not utf8\n" unless utf8::is_utf8($x); print "no match\n" unless $x =~ /[^\p{Alphabetic}\p{Letter}\p{Dash_Punctuation}\p{Connector_Punctuation}'\'']/;'
06:52:31 <CakeProphet> as far as the $\ I guess I'll just make a copy of the files and strip those characters out.
06:55:27 <fizzie> "hexdump -C" and "od -tx1z" are reasonable.
06:55:49 <fizzie> But you can just print join(" ", map { sprintf "%02x", $_ } unpack("C*", $string)), "\n" from the Perl script.
06:56:14 <CakeProphet> I think hexdump is actually simpler in this case.
06:57:41 <fizzie> Up to you; it's just that it'll all get smooshed into one dump. Anyway, it sounds very weird that the regex just wouldn't work; you are certain that it's because that thing is matching all the words?
06:57:56 <CakeProphet> yep I put a print after it and nothing happens
06:58:17 <fizzie> Did you put a print in front of it to see if you're getting there either?-)
06:58:52 <CakeProphet> I also tested the eng-1M set and many words pass.
06:59:08 <CakeProphet> haven't tested the other google sets. I assume all the utf-8 ones are fine.
07:03:05 <CakeProphet> ....I guess I could have used a smaller dataset.
07:04:34 -!- Ngevd has quit (Ping timeout: 258 seconds).
07:04:36 <fizzie> I also think you might get some shell-related munging to your string if you dump them like that.
07:04:50 -!- MDude has joined.
07:05:11 -!- MSleep has quit (Read error: Connection reset by peer).
07:05:53 <fizzie> Well, possibly not. At least it'll barf for any words containing a '.
07:07:21 <CakeProphet> ah yes the perl processes are stuck on pipe_wait
07:07:34 <fizzie> If it is in fact refusing each word, that's two new processes for each word.
07:07:56 <fizzie> A shell and the hexdump; the echo is probably a builtin.
07:09:36 <fizzie> Well, I ran it locally with | head.
07:09:47 <fizzie> 00000000 61 2d 6b 6c 69 6e 69 6b 6b 61 0a 0a |a-klinikka..|
07:10:08 <fizzie> I'd like to point out what I said 25 minutes ago: "<fizzie> CakeProphet: Well, I don't know. Are you doing something else differently for the dict stuff? Could you be leaving the newline in there or something? --"
07:10:25 <fizzie> The first 0a is the newline you have in your string, and that's what matching the regex.
07:10:32 <fizzie> (The second 0a is added by echo.)
07:10:58 <fizzie> It doesn't have a \t in it, so it gets the full line.
07:11:05 <CakeProphet> yeah I don't have that problem with googledata because -- yes
07:12:04 <fizzie> I tend to use it because of the name.
07:12:49 -!- nooga has joined.
07:15:38 <CakeProphet> well the scripts appear to be using memory.
07:17:40 -!- ive has joined.
07:18:31 <fizzie> Yes, that'll teach those RAM chips who's the boss here.
07:34:28 <CakeProphet> fizzie: okay so if I use a require to import the modules via string
07:34:37 <CakeProphet> how do I access variables in their namespace?
07:35:59 <CakeProphet> if do just drops variables into the current scope then I might use it instead.
07:37:39 <CakeProphet> hmmm I could use a symbolic reference maybe.
07:39:08 <CakeProphet> `run perl -e '%t = (1,2); print %{"%::t"};'
07:39:46 <CakeProphet> `run perl -e '$t = {1,2}; print ${"$::t"};'
07:43:56 -!- CakeProp1et has joined.
07:45:33 -!- CakeProphet has quit (Read error: Operation timed out).
08:03:09 <CakeProp1et> `run perl -e 'use Data::Dumper; Data::Dumper::Terse = 1; print Data::Dumper::Dumper($a, $b)'
08:03:11 <HackEgo> Can't modify non-lvalue subroutine call in scalar assignment at -e line 1, near "1;" \ Execution of -e aborted due to compilation errors.
08:03:28 <CakeProp1et> `run perl -e 'use Data::Dumper; $Data::Dumper::Terse = 1; print Data::Dumper::Dumper($a, $b)'
08:04:54 <CakeProp1et> `run perl -e 'use Data::Dumper; $d = Data::Dumper->new([$a,$b]); $d->Terse(1); print $d->Dump;
08:04:57 <HackEgo> sh: Syntax error: Unterminated quoted string
08:04:59 <CakeProp1et> `run perl -e 'use Data::Dumper; $d = Data::Dumper->new([$a,$b]); $d->Terse(1); print $d->Dump;'
08:07:00 <fizzie> 'require' won't ever touch your namespace; you need to use a fully-qualified Package::foo name to reach into it.
08:07:39 <CakeProp1et> `run perl -e 'use Data::Dumper; $d = Data::Dumper->new([[$a,$b]], [qw(x*)]; $d->Terse(1); print $d->Dump;'
08:07:41 <HackEgo> syntax error at -e line 1, near "];" \ Execution of -e aborted due to compilation errors.
08:07:47 <CakeProp1et> `run perl -e 'use Data::Dumper; $d = Data::Dumper->new([[$a,$b]], [qw(x*)]); $d->Terse(1); print $d->Dump;'
08:08:07 <CakeProp1et> `run perl -e 'use Data::Dumper; $d = Data::Dumper->new([$a,$b], [qw(x*)]); $d->Terse(1); print $d->Dump;'
08:10:04 <CakeProp1et> `run perl -e 'use Data::Dumper; $d = Data::Dumper->new([[$a,$b]], [qw(*x)]); $d->Terse(1); print $d->Dump;'
08:10:56 <CakeProp1et> `run perl -e 'use Data::Dumper; $d = Data::Dumper->new([[$a,$b]], [qw(*_)]); $d->Terse(1); print $d->Dump;'
08:22:47 -!- augur has quit (Remote host closed the connection).
08:22:59 -!- augur has joined.
08:27:05 -!- Phantom_Hoover has joined.
08:27:51 <CakeProp1et> `run perl -e '$_='this-is-a-test'; s/-./-\u/g;print'
08:28:04 <CakeProp1et> `run perl -e '$_="this-is-a-test"; s/-./-\u/g; print'
08:28:29 <CakeProp1et> `run perl -e '$_="this-is-a-test"; s/-(.)/-\u$1/g; print'
08:28:42 <CakeProp1et> `run perl -e '$_="this-is-a-test"; s/(^|-)(.)/\u$1/g; print'
08:28:46 <CakeProp1et> `run perl -e '$_="this-is-a-test"; s/(^|-)(.)/\u$2/g; print'
08:29:48 <fizzie> `run perl -e '$_="this--is-a-test"; s/(^|-)(.)/\u$2/g; print'
08:30:45 -!- sebbu2 has joined.
08:31:13 <CakeProp1et> `run perl -e '$_="test"; s/(^|-)(.)/\u$2/g; print'
08:33:58 -!- sebbu has quit (Ping timeout: 255 seconds).
08:35:20 <CakeProp1et> fizzie: instead of manually typing option hash tables I decided to do these shenanigans. :)
08:35:51 <CakeProp1et> map { my $opt=$_; s/(^|-)(.)/\u$2/g; $opt, handle_opt $_;} @datasets
08:36:51 <CakeProp1et> there is no end to my overcomplicated hackery.
08:41:22 -!- ais523 has joined.
08:49:14 <CakeProp1et> this /should/ work... as far as I can tell.
08:50:10 <CakeProp1et> here's the generation script: http://sprunge.us/dZVH
08:50:32 <CakeProp1et> if you want to like, watch it break on first try as it most likely will.
08:53:20 -!- ais523 has quit (Remote host closed the connection).
08:56:20 -!- ais523 has joined.
08:56:30 <CakeProp1et> slightly revised words.pl : http://sprunge.us/HMXX
09:10:44 -!- nooga has quit (Ping timeout: 244 seconds).
09:23:21 <CakeProp1et> `run perl -e 'if (my $x = 2) { print $x } print $x'
09:23:45 <CakeProp1et> `run perl -e 'if (my $x = 2) { print $x } else { print $x} print $x'
09:38:01 -!- CakeProp1et has changed nick to CakeProphet.
09:49:15 -!- ais523 has quit (Read error: Operation timed out).
09:49:53 -!- ais523 has joined.
10:26:29 <fungot> CakeProphet:. i'm so kind, even to assholes! anmaster no not markov anmaster no not markov
10:26:49 <lambdabot> Phantom_Hoover: You have 1 new message. '/msg lambdabot @messages' to read it.
10:26:49 <fungot> Phantom_Hoover:, so i'd make stuff up to. why, this is for you guys are a lot of the design, prisoners and slaves that have sucked. rephrase: " i tried todo a _" is 0 ( and both variables hold the same
10:27:42 * ais523 tries to figure out where fungot got "design, prisoners and slaves" from
10:27:42 <fungot> ais523: is. absorb it on my door, which was just perceptibly fnord and this yields nothing itself; it keeps being removed, the queen. i see no sense
10:29:14 <fizzie> ais523: "ymor's ravens were notoriously loyal to their design, prisoners and slaves that have sucked blood from larger animals."
10:29:38 <Phantom_Hoover> @tell oerjan You got two minutes; what are you complaining about.
10:29:38 <ais523> the original sentence doesn't make all that much more sense than the fungot version
10:29:38 <fungot> ais523: agora alice c64 ct darwin discworld europarl ff7 fisher ic irc* jargon lovecraft nethack pa speeches ss wp youtube ( some youtube comments) http://news.com.com/ fnord/ fnord and it is eta. f) the associate director of personnel may declare an interested proposal, not only to goods and service sectors. if we take a very close relationship, but the parliament has possessed him, yet he talkes well," he said, taking it out
10:29:50 <ais523> haha, is that a fungot self-quote?
10:29:50 <fungot> ais523: to, uhhh....... uncool it online. it was an unmanned flight--thanks for doing your homework. seriously, read description :) ( maybe i suck at english as u suck at english as u suck at english as u suck at english as u suck at english as u suck at english as u suck at english as u suck at english as u suck at english as u suck at english as u suck at english as u suck at english as u suck at english as u suck at english
10:29:57 <fungot> Available: agora alice c64 ct darwin discworld europarl ff7 fisher fungot* homestuck ic irc jargon lovecraft nethack pa sms speeches ss wp youtube
10:30:13 <fizzie> It's built of everything it has said.
10:30:30 <ais523> ah right, you used fungot as a source for itself
10:30:30 <fungot> ais523: just to help an fnord archive)
10:30:41 <ais523> that'd explain why the source material doesn't make much more sense than the output
10:30:59 <fizzie> The "ymor's ravens" comment was from the 'nethack' style, obvs.
10:36:19 <fizzie> Phantom_Hoover: The "anmaster no not markov" loop comes from elliott using ^echo to talk to an ignoring Vorpal, also unsurprisingly.
10:37:31 <fizzie> Just once, but with the sort of short context, it's enough. Because you know about ^echo.
10:37:37 <fizzie> ^echo Do I hear an echo?
10:37:37 <fungot> Do I hear an echo? Do I hear an echo?
10:47:40 <fungot> CakeProphet: something like scheme48 ( upon the general position is a part of these amendments, i can only thank the president-in-office, you did hear me say that we have had in getting information with regard to monetary policy, a factor is
10:48:01 <CakeProphet> fungot: suck my dick eh heh heh heh heh huhu huhuhuhuhhuhhuhhuh
10:48:01 <fungot> CakeProphet: i know i didn't know that you've already asked, but then i need to enter " qemu" to edit is the ordinary ( for call/ cc))) hangs
10:48:45 <CakeProphet> I wish there was a dataset based on everything it sees
10:49:09 <fizzie> It doesn't log everything it sees, sadly.
10:49:18 <CakeProphet> so then I could flood it with vulgar insults.
10:59:10 <HackEgo> 607) <zzo38> I think Perl is a programming language too. [...]
10:59:22 <HackEgo> 253) <Sgeo> Is there a name for something where I'm more attracted to someone if I know they've had a rough past? <variable> Sgeo, "Little Shop of Horrors"
10:59:32 <HackEgo> 100) <virtuhird> Sgeo_: Gregorr: and someone could, by mistake, rewrite psox to be a weak erection if it is... A filename.
10:59:43 <HackEgo> 472) <ais523> Phantom_Hoover: nope, I removed . from the current directory
10:59:53 <ais523> wait, how did I do that?
10:59:57 <ais523> now I'm interested in context
11:00:14 <ais523> `log removed \. from the current directory
11:00:24 <ais523> `logs removed \. from the current directory
11:00:27 <HackEgo> /home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: logs: not found
11:00:33 <fizzie> 2011-07, surprisingly recent.
11:00:38 <HackEgo> 2011-07-06.txt:11:51:46: <HackEgo> 482) <ais523> Phantom_Hoover: nope, I removed . from the current directory
11:01:38 <fizzie> It's immediately followed by "umm, from the path".
11:01:43 <fizzie> Which makes it less interesting.
11:02:14 <ais523> <elliott> Gregor: can you get a tie that's a transparent plastic thing filled with multicoloured glow in the dark liquid
11:02:29 <ais523> oh right, just a thinko
11:05:29 -!- nooga has joined.
11:07:02 -!- GreaseMonkey has quit (Quit: The Other Game).
11:15:51 <ais523> I should logread more often
11:20:28 -!- ive has quit (Quit: leaving).
11:26:38 -!- oerjan has joined.
11:27:58 <lambdabot> oerjan: You have 1 new message. '/msg lambdabot @messages' to read it.
11:36:26 -!- nooga has quit (Ping timeout: 244 seconds).
11:37:26 -!- nooga has joined.
11:38:12 -!- copumpkin has quit (Ping timeout: 260 seconds).
11:38:38 -!- copumpkin has joined.
11:39:02 <fizzie> lambdabot: What is this? You keep answering every "> foo" even when it's just paste from a quoted email or something, but not when someone directly addresses you?
11:39:25 <fizzie> fungot: Teach some sense to your fellow bot, would you?
11:39:25 <fungot> fizzie: i know i didn't know that you've already asked, but then i need to enter and it closes. :( i can pay, and those that the c-intercal, except that the thing about genocide is
11:43:27 <fungot> Phantom_Hoover: is. absorb it on my door, which was just perceptibly fnord and this yields nothing itself; it keeps being removed, the queen is a vain. yes is ticked). we'll know that's our memory...... calling...... that thing's not human...
11:47:20 <fungot> Phantom_Hoover: no, it's not. it's more complex than that. read the code.) good stuff ( and burning, and no clear account. in that second one is horizontally displaced by 1 pixel is sacred. just me, or i: yet, you rogue!
11:47:39 <Phantom_Hoover> fungot, all hail horizontal displacement by one pixel!
11:47:40 <fungot> Phantom_Hoover: agora alice c64 ct darwin discworld europarl ff7 fisher ic irc* jargon lovecraft nethack pa speeches ss wp youtube comments).
11:48:18 <fizzie> `runperl use Scalar::Util qw/dualvar/; my $dv = dualvar 42, 'sneaky'; printf "%d, %s\n", $dv, $dv;
11:49:59 <fizzie> (Contextual::Return takes it rather further still.)
11:50:50 -!- azaq23 has joined.
11:59:03 <ais523> anyone here know a CSS hack that's specific to Windows, as opposed to a particular browser?
11:59:10 <ais523> failing that, Chrome and IE on Windows, specifically
12:02:56 <fizzie> Sounds more like something people would do with scripts.
12:04:16 <ais523> so, my problem is that Windows Chrome isn't rendering Unicode correctly, because it's picking an inappropriate font
12:04:43 <ais523> and I don't want to just arbitrarily override a list of fonts for those browsers that do Unicode properly
12:05:03 <ais523> and I'm just serving a single (computer-generated) HTML file, and don't particularly want to put scripts on it for no good reason
12:07:21 <ais523> the WP logo is copyrighted
12:07:24 <ais523> it's OK if you crop out the logo
12:07:40 <fizzie> IE-specific CSS hacks are (probably) dime a dozen, but detecting between Windows Chrome and Somethingelse Chrome with pure CSS might be a bit much to ask. A five-line script to detect the situation and splunk a "fontfix" class onto the body + references to that in the CSS could be easier. But I'm no web developer.
12:12:24 <ais523> actually, IE-specific CSS hacks have pretty much disappeared since IE8
12:12:31 <ais523> earlier versions are pretty easy to hack for
12:12:52 <ais523> although IE deliberately misparses certain specifically-structured comments, which works on any version as it's an intended feature
12:16:15 <ais523> ridiculous idea: Chrome probably recognises embedded CSS fonts
12:16:30 <ais523> so I could just dump a Unicode font into the page source, probably via reference
12:16:41 -!- nooga has quit (Ping timeout: 260 seconds).
12:18:33 -!- hagb4rd has quit (Quit: Nettalk6 - www.ntalk.de).
12:21:00 <fizzie> But then you would (presumably) need to explicitly use that embedded font, and you didn't want to override fonts.
12:21:01 -!- azaq23 has quit (Quit: Leaving.).
12:22:44 <ais523> on a related but unrelated subject: is there a sensible algorithm to, given a list of examples, produces a wildmat pattern that matches all those examples (and preferably excludes as much else as possible)
12:25:16 <fizzie> As a related but unrelated answer: Emacs comes with a "regexp-opt" function which takes a list of strings and triest to generate a small regular expression which matches that list and nothing else. It is very simplistic, though.
12:26:06 <fizzie> It is clever enough, apparently, to produce (?:optim(?:al|i(?:[sz]e))), given the list {optimal, optimise, optimize}.
12:26:32 <fizzie> That last group doesn't seem so useful in there.
12:34:09 -!- pikhq has joined.
12:34:17 -!- pikhq_ has quit (Ping timeout: 255 seconds).
12:34:33 <ais523> also, ?: isn't even Emacs regex syntax
12:34:34 <ais523> so it's busy optimizing a syntax other than its own
12:35:19 <fizzie> Supposedly it is in Emacs23.
12:35:36 <fizzie> I'm going by http://www.emacswiki.org/emacs/RegexpOpt here, not an expert again.
12:35:45 <ais523> Emacs finally modernised its regexen? good to hear it
12:35:46 <fizzie> " (regexp-opt '("alex" "albert" "alois" "bummer"))
12:35:46 <fizzie> "al\\(bert\\|ex\\|ois\\)\\|bummer"
12:35:46 <fizzie> "\\(?:al\\(?:bert\\|ex\\|ois\\)\\|bummer\\)"
12:36:05 <fizzie> I dropped the \\s from the example for legibility reasons.
12:37:26 <ais523> wow, \(?: is horrendous syntax
12:37:50 <ais523> I think it's easier to quote parens that are meant to match parens, then parens that are part of regex syntax
12:38:06 <ais523> people call Perl unreadable, but it's really doing better than its competitors on that (that didn't just outright copy it)
12:39:24 <fizzie> Hysterical raisins there, probably. POSIX BREs also require \( ... \| ... \) for grouping.
12:40:05 -!- hagb4rd has joined.
12:56:09 -!- ais523_ has joined.
12:57:10 -!- boily has joined.
13:00:37 <ais523_> hmm, weirdest reason for a student to leave my course ever (well, so far at least): "I'm actually a second year"
13:00:40 <ais523_> (it's a first year course)
13:01:18 -!- zzo38 has joined.
13:01:26 <fizzie> Around here, those things are just very vague recommendations. Even prerequisites are rarely checked very strictly.
13:02:14 <ais523_> it's more important around here because it matters for mark calculation
13:03:09 <fizzie> Ah. Well, our courses are usually part of a particular "module", but you can generally build those up in arbitrary order.
13:09:52 -!- nooga has joined.
13:18:39 <fizzie> "Earth's tidal oscillations introduce dissipation at an average rate of about 3.75 terawatt." These energy-conscious days, shouldn't we be trying to cut that down a bit?
13:22:03 <zzo38> What would happen if you reverse the direction of the Earth spinning?
13:22:57 <fizzie> I don't know, but I strongly suspect time would not start to run backwards.
13:23:08 -!- MDude has quit (Ping timeout: 258 seconds).
13:23:45 <zzo38> I agree with that.
13:23:53 <oerjan> yeah the superman movie shows clear evidence of that
13:25:27 <fizzie> oerjan: Right, he spins the globe and then nothing happens. Quite an anticlimactic moment.
13:25:46 -!- MDude has joined.
13:26:16 <fizzie> Actually, didn't he just fly around backwards or something?
13:26:21 * oerjan missed a "not" up there
13:26:44 <fizzie> Well, maybe it's still admissible as evidence.
13:27:06 <oerjan> well yes, but it looked like it made the earth turn backwards
13:27:21 <oerjan> clearly some badass frame dragging involved
13:29:47 <fizzie> Speaking of which, the JET fusion reactor... sorry, "fusion device", has two 775-ton flywheels spinning at 225 rpm. That's quite a lot of spinning.
13:36:59 <oerjan> http://en.wikipedia.org/wiki/List_of_moments_of_inertia
13:38:48 <fizzie> Each flywheel has a radius of 4.5 metres.
13:39:40 <oerjan> this assumes uniform thickness, i think
13:40:09 <fizzie> Oh, but the next sentence gives the moment of inertia. :)
13:40:14 <fizzie> "-- weighs 775 tons (!), much of which is concentrated on the rim to form a large flywheel. For experts – the total moment of inertia is 13.5 million kg.m2 per flywheel!"
13:43:19 <fizzie> Giving the value to W|A works in the sense that it is interpreted as moment of inertia, but it doesn't give all those funny "comparisons" values, like it does for angular velocity and such things.
13:43:53 <oerjan> `frink 1/2 * 13500000 kg m^2 * (225 / min)^2 -> Joule
13:44:04 <HackEgo> Unknown symbol "Joule" \ Warning: undefined symbol "Joule". \ Unconvertable expression: \ 94921875 m^2 s^-2 kg (energy) -> Joule (undefined symbol)
13:44:12 <fizzie> For example, the angular velocity of the JET flywheel is 0.75 times the angular velocity of a 3.5-inch floppy disk.
13:44:14 <oerjan> `frink 1/2 * 13500000 kg m^2 * (225 / min)^2 -> J
13:44:43 <oerjan> `frink 1/2 * 13500000 kg m^2 * (225 / min)^2 -> kWh
13:44:51 <HackEgo> 3375/128 (exactly 26.3671875)
13:47:24 <oerjan> `frink 1/2 * 13500000 kg m^2 * (225 / min)^2 -> joule
13:47:42 <oerjan> was just a capitalization error
13:49:17 <fizzie> oerjan: Today's trivia: the "Subaru equivalent" of LHC beam at top energy is 1712 km/h. (I.e. same amount of kinetic energy in a 3200 kg of mass moving at that speed.)
13:49:34 <oerjan> Phantom_Hoover: itym 95
13:50:42 <Phantom_Hoover> fizzie, so wait, if you crashed a Subaru that fast it would turn into Higgs bosons?
13:51:01 <oerjan> only if you crashed it into a very tiny area
13:53:08 <fizzie> 16 microns across at the collision point.
13:53:13 <fizzie> It needs to be a very small car.
13:55:25 -!- oerjan has quit (Quit: Later).
13:55:33 <fizzie> A barn is the best unit of area.
13:58:49 <Phantom_Hoover> And the barn-megaparsec is the best unit of volume, mainly because the stupefying scales involved cancel out to be slightly smaller than a teaspoon.
13:59:49 -!- copumpkin has quit (Quit: Computer has gone to sleep.).
14:12:32 <ais523_> wouldn't barn-gigaparsec be a nicer size?
14:21:10 -!- copumpkin has joined.
14:24:51 <Slereah> The barn-gigaparsec describes the longuest spaghetti
14:42:27 <Phantom_Hoover> ais523_, a gigaparsec is a nearly-useless unit, considering that the observable universe is about ten of them across.
14:45:14 -!- sllide has joined.
14:45:19 <fizzie> One barn-gigaparsec is 0.6 times the volume of blood in a typical human. (Thanks, W|A.)
14:50:41 -!- elliott has joined.
14:52:08 -!- elliott has quit (Client Quit).
14:52:13 -!- elliott has joined.
15:03:42 <ais523_> I suppose you could write it as kilobarn-megaparsec instead
15:03:47 <ais523_> but why be redundant on prefixes?
15:04:02 <lambdabot> elliott: You have 5 new messages. '/msg lambdabot @messages' to read them.
15:17:04 <elliott> 22:58:48: <Rugxulo> I also guess it's pointless to mention that FBBI was updated too? ;-)
15:17:04 <elliott> 22:59:48: <Deewiant> Somebody announced that here when it happened
15:17:19 <Deewiant> I guessed that but couldn't be bothered to check
15:19:27 <elliott> 00:27:12: <zzo38> I found this: http://kirstenmichel.com/ss2.html
15:19:27 <elliott> "HOW HIGH AM I?" did not have the expected answer.
15:19:51 <elliott> 01:21:25: <Gregor> I finally have X-Chat on Mac
15:19:52 -!- MDude has quit (Ping timeout: 276 seconds).
15:20:04 <elliott> Gregor: You had that before, but all X-Chat ports suck massively
15:20:16 <elliott> Gregor: Or are you using it through X11 or something ridiculous like that
15:20:33 <elliott> 02:42:38: <CakeProphet> so at compile time does GHC compute the result of all constants?
15:20:34 <elliott> 02:43:01: <CakeProphet> so that t is just a predefined Map at runtime?
15:20:40 <elliott> CakeProphet: Yes, GHC has solved the halting problem.
15:21:07 <Deewiant> I don't see how that involves the halting problem
15:21:58 <elliott> Presumably computing all constants involves computing every definition that halts, because that's the only reasonable definition of "constant" in context
15:22:02 <Deewiant> Constants being numerical and string literals and pure functions that work on them
15:22:15 <elliott> 02:43:01: <CakeProphet> so that t is just a predefined Map at runtime?
15:22:17 <ais523_> does FBBI pass Mycology yet?
15:22:18 <Deewiant> And character literals and whatnot
15:22:32 <ais523_> elliott: did you see my Prolog map, btw? it feels so wrong writing that in Prolog
15:22:47 <ais523_> Prolog doesn't even have first-class functions!
15:22:51 <Deewiant> elliott: Compile time <<loop>>
15:23:04 <elliott> Deewiant: Okay, so CakeProphet wants GHC to be an interpreter?
15:23:06 <Deewiant> elliott: Or infinite compile time, whatever
15:23:28 <Deewiant> elliott: Interpret the stuff that looks like it's constant, at compile time
15:23:54 <elliott> Deewiant: Nobody seriously wants that
15:23:56 <Deewiant> If you encounter unsafePerformIO# then abort, and such
15:23:57 -!- ais523_ has quit (Quit: going back to the non-underscore version).
15:24:13 <Deewiant> I've sometimes wanted it at least for certain definitions
15:24:21 <elliott> Deewiant: So, sure, what you're saying is possible but I don't see why you think CakeProphet meant that at all :P
15:24:42 <Deewiant> That's just what it sounded like :-P
15:24:53 <Deewiant> First thing that came to mind from "compute the result of all constants"
15:26:17 <Deewiant> ais523: New version appears to hit many BADs but gets through
15:26:58 <ais523> hmm, I mentioned my map in Prolog to a Prolog teacher who happened to be passing by
15:27:04 <ais523> and he suggested I try to do lambda calculus in it
15:27:58 <elliott> ais523: you'll just invent Lambda Prolog or Mercury or whatever but worse :P
15:29:00 <ais523> yep, but it'll be programming for fun
15:29:04 <ais523> rather than for practical use
15:29:11 <ais523> so it doesn't matter if it's worse than existing impls
15:35:13 <elliott> 11:02:14: <ais523> <elliott> Gregor: can you get a tie that's a transparent plastic thing filled with multicoloured glow in the dark liquid
15:35:33 <ais523> I agree, it would be great
15:35:55 <ais523> glow in the dark liquid already exists, but using multiple colours without it mixing would be hard
15:36:49 <elliott> 11:59:03: <ais523> anyone here know a CSS hack that's specific to Windows, as opposed to a particular browser?
15:36:50 <elliott> 11:59:10: <ais523> failing that, Chrome and IE on Windows, specifically
15:36:50 <elliott> 12:02:56: <fizzie> Sounds more like something people would do with scripts.
15:36:50 <elliott> 12:04:16: <ais523> so, my problem is that Windows Chrome isn't rendering Unicode correctly, because it's picking an inappropriate font
15:36:50 <elliott> 12:04:43: <ais523> and I don't want to just arbitrarily override a list of fonts for those browsers that do Unicode properly
15:36:53 <elliott> 12:05:03: <ais523> and I'm just serving a single (computer-generated) HTML file, and don't particularly want to put scripts on it for no good reason
15:36:58 <elliott> ais523: you really Shouldn't Do That :P
15:37:07 <elliott> OS sniffing is even worse than browser sniffing, probably
15:37:17 <elliott> ais523: Arial Unicode MS is what most people specify for full Unicode support on Windows, IIRC
15:37:20 <ais523> but the page is correct, and the browsers are wrong
15:37:22 <elliott> I think it comes with the OS
15:37:26 <elliott> ais523: yes, so you're already doing hacks
15:37:28 <ais523> and my boss is complaining about it
15:37:31 <elliott> ais523: so you might as well override the fonts
15:37:35 <elliott> which is a lesser hack than OS sniffing
15:37:55 <ais523> but this computer doesn't even have Arial Unicode MS installed, so it wouldn't be able to display the font suggested!
15:37:58 <elliott> 12:16:15: <ais523> ridiculous idea: Chrome probably recognises embedded CSS fonts
15:37:59 <elliott> 12:16:30: <ais523> so I could just dump a Unicode font into the page source, probably via reference
15:38:03 <elliott> ais523: umm, you could just use @font-face
15:38:16 <ais523> elliott: that would require the font to exist on the target computer
15:38:27 <elliott> ais523: yes, if your irc font has no @ character
15:38:35 <ais523> in that case, that's what I was suggesting
15:38:40 <elliott> "To use web fonts, each form of the font family must be declared using the @font-face rule; for example, to use both regular and italic forms of Jos Buivenga’s Delicious font, you would put the following in your stylesheet:
15:38:41 <elliott> @font-face { font-family: Delicious; src: url('Delicious-Roman.otf'); } @font-face { font-family: Delicious; font-weight: bold; src: url('Delicious-Bold.otf'); }
15:38:41 <elliott> Then call it using font-family:
15:38:41 <elliott> h3 { font-family: Delicious, sans-serif; }"
15:40:35 <elliott> 13:50:42: <Phantom_Hoover> fizzie, so wait, if you crashed a Subaru that fast it would turn into Higgs bosons?
15:40:38 <elliott> Phantom_Hoover: Yes. But only a Subaru.
15:40:41 <Vorpal> <Phantom_Hoover> fungot, what's anmaster going to do with markov? <-- yeah, what style was that?
15:40:41 <fungot> Vorpal: that is just a value of type " airbus is a big fan of avril....but this song " there
15:40:53 <fungot> Available: agora alice c64 ct darwin discworld europarl ff7 fisher fungot* homestuck ic irc jargon lovecraft nethack pa sms speeches ss wp youtube
15:41:04 <fungot> Vorpal: ( c) a player who makes further play impossible by eir actions or lack thereof, or typically good morning, or typically good morning, or typically good morning, or typically good morning, or typically good morning, or typically good morning, or typically good morning, or typically good morning, or typically good morning, or typically good morning, or typically good morning, or typically good morning, or typically good m
15:41:15 <ais523> Vorpal: it was fungot style
15:41:15 <fungot> ais523: to, uhhh.... w.t.f lol ...out of time!
15:41:20 <fungot> Selected style: fungot (What I've said myself)
15:41:28 <elliott> 14:42:27: <Phantom_Hoover> ais523_, a gigaparsec is a nearly-useless unit, considering that the observable universe is about ten of them across.
15:41:31 <elliott> Phantom_Hoover: Sounds good to me.
15:42:08 <fizzie> The rfk86 page has an Embedded OpenType version of the font in addition to the raw TTF (it was written pre-WOFF, I think), so in theory it should work also on IE 4+ (whereas only IE 9+ does TTF/WOFF); sadly, I don't think anyone has ever tested it with IE, so it might not work.
15:42:17 <Vorpal> elliott: attoparsec is also a nice unit btw
15:42:32 <elliott> http://hackage.haskell.org/package/attoparsec
15:42:38 <Deewiant> W|A says approximately 29 across
15:42:48 <Vorpal> elliott: oh for a package name, okay.
15:43:08 <Vorpal> elliott: no I extrapolated from the context of the link
15:43:19 <Vorpal> elliott: anyway iirc an attoparsec is slightly more than 3 cm
15:43:33 <elliott> Deewiant: Or small values of 29
15:44:31 <elliott> Deewiant: Or middling values of both
15:46:33 <elliott> Deewiant: Well, they could meet in the middle
15:46:39 <elliott> Say if ten was twenty and twenty-nine was twenty too
15:47:07 <Deewiant> Those are still a large value of ten and a small value of 29 respectively
15:47:40 <elliott> Deewiant: It seems weird to call that "both", since the changes to both numbers are much less drastic than would be required otherwise
15:47:50 <elliott> "Both" seems to imply strictly more effort to me
15:48:32 <elliott> <Deewiant> Those are still a large value of ten and a small value of 29 respectively
16:13:57 -!- Ngevd has joined.
16:17:45 <Ngevd> The wind's getting pretty nasty
16:17:50 <Ngevd> Going to close a window
16:19:30 <Ngevd> ais523, if you're here, wiki spam
16:28:11 -!- Phantom_Hoover has quit (Ping timeout: 248 seconds).
16:34:02 <Ngevd> You know what would be tricky?
16:34:07 <Ngevd> Writing a quine in Piet
16:36:18 <elliott> http://mamememo.blogspot.com/2009/10/piet-quine.html
16:40:49 -!- Phantom_Hoover has joined.
16:40:57 <Ngevd> It's dismal outside
16:41:08 <elliott> Ngevd: Nice weather we're having
16:44:17 <Gregor> Ngevd wasn't complaining about the weather.
16:44:21 <Gregor> He was just pointing out that it's England.
16:44:41 <elliott> Gregor "Literally lives in America" Gregor
16:44:58 <Gregor> I like how my fore and surname are both "Gregor"
16:45:24 <elliott> elliott "That's my gimmick" elliott
16:45:41 <Ngevd> My surname is to awesome to be a duplicate of my first name
16:45:47 <Ngevd> I want a doctorate to go with it
16:48:27 -!- derdon has joined.
16:49:05 -!- Ngevd has quit (Quit: Leaving).
16:52:07 <zzo38> You quoted me before; what do you know of prime vertical?
16:59:13 -!- nooga has quit (Read error: Connection reset by peer).
16:59:30 -!- nooga has joined.
17:06:31 -!- Ngevd has joined.
17:09:49 -!- augur has quit (Remote host closed the connection).
17:10:02 -!- CakeProphet has quit (Ping timeout: 252 seconds).
17:12:27 -!- MDude has joined.
17:20:27 -!- Phantom_Hoover has quit (Ping timeout: 248 seconds).
17:20:36 -!- Ngevd has quit (Ping timeout: 258 seconds).
17:24:28 -!- Ngevd has joined.
17:25:33 <ais523> wow, you know how the tzdata guy was sued?
17:25:39 <ais523> ICANN decided to continue maintaining the project
17:25:47 <ais523> I wouldn't have been surprised if it was Red Hat or someone
17:26:59 -!- Slereah has quit (Ping timeout: 260 seconds).
17:29:14 -!- Slereah_ has joined.
17:31:59 <zzo38> Sued for timezones?
17:32:17 <ais523> zzo38: yes, the authors of an atlas claimed copyright infringement IIRC
17:32:33 <ais523> most people think the suit doesn't make much sense, but the tzdata person can't afford to defend against it
17:32:51 -!- Phantom_Hoover has joined.
17:33:03 <elliott> ais523: just the copyright trolls that bought out the previous publisher
17:33:04 <ais523> oh right, some people who claim to own copyright on the atlas for no obvious reaosn
17:33:17 <elliott> ais523: they bought the company that owned the rights
17:33:18 <elliott> that seems to be a fairly good reason
17:33:24 <elliott> well, as far as the current law goes
17:34:05 <ais523> elliott: apparently the copyright's actually registered to someone else
17:34:10 <ais523> or at least, not obviously the same person
17:34:24 <ais523> based on comments I've read, which might be incorrect
17:34:29 <zzo38> Someone told me that the definition of planet has changed again, or something like that, to make Pluto is now considered a planet, again. Is that correct?
17:34:31 * ais523 vaguely remembers that the UK has stupidly strict libel laws
17:35:03 <zzo38> Apparently they heard it on the radio.
17:35:36 <elliott> zzo38: they probably heard that thing about i-forget-the-name actually probably being as big as pluto
17:36:17 <zzo38> Well, as far as I know the definition of a planet depends on the orbit.
17:36:42 <Ngevd> And whether it's cleared it's orbit path or something
17:37:42 <Gregor> WTF, OpenIndiana has files in .zlib format. I don't think Debian even has a decompressor for raw zlib data.
17:38:08 <elliott> Gregor: are you sure it's not just gz or something?
17:38:11 <Vorpal> Gregor: what is OpenIndiana?
17:38:31 <Gregor> elliott: Nope. It's named .zlib, and file reports "data". I think it's reasonable to assume it's raw zlib.
17:38:37 <Gregor> Vorpal: Fork of OpenSolaris.
17:38:46 <elliott> Gregor: Better question, why are you...
17:38:58 <elliott> Gregor: If you're into that, I guess.
17:39:26 <Vorpal> only ever used it once
17:39:34 <Vorpal> hm should try it out in an vm maybe
17:39:48 <Deewiant> Gregor: qpdf should provide zlib-flate
17:40:15 <Vorpal> Deewiant: strange package to do that
17:40:20 <Gregor> Am I installing a PDF viewer (or something thereabout) to get a zlib extractor?
17:40:23 <Deewiant> The zlib-flate program is part of the qpdf package.
17:40:27 <Deewiant> The zlib-flate program standard from input and writes to standard out‐
17:40:30 <Deewiant> put either compressing or compressing its input using raw zlib compres‐
17:40:34 <Deewiant> sion. This program is provided primarily as a debugging tool. It can
17:40:36 <Deewiant> be used to uncompress or compress raw PDF streams.
17:40:40 <Vorpal> " The zlib-flate program standard from input"
17:40:48 <Vorpal> that is not even proper English
17:41:22 <ais523> hmm, a quick search shows that TAA sold something to Astrolabe, but it's unclear as to whether it was the copyright to some timezones or not
17:41:23 <Gregor> That fragment alone could be proper English if not for the remainder of the sentence.
17:41:31 -!- augur has joined.
17:41:53 <elliott> ais523: you can't copyright timezones
17:41:58 <elliott> you can copyright books, though
17:41:59 <Vorpal> ais523: copyright to time zones?
17:42:07 <elliott> but you can only copyright the formatting of them, if they present time zone data
17:42:09 <ais523> no wonder the whole thing's so confusing
17:42:13 <ais523> Vorpal: someone was sued over it
17:42:20 <ais523> and stopped maintaining the time zones as a result
17:42:33 <ais523> and ICANN declared themselves in charge of it and started maintaining it themselves
17:42:56 <elliott> Vorpal: it's why the tz database died
17:43:09 <Vorpal> you mean the tzdata package?
17:43:16 <Vorpal> Quite nice of ICANN. They won't be put down easily.
17:43:22 <Gregor> flate: inflate: data: incorrect header check >_<
17:43:29 <Gregor> So this .zlib file isn't even zlib. Or something.
17:43:37 <Vorpal> Gregor: could be zlib with the header stripped
17:43:48 <Vorpal> or with a custom header
17:43:50 <ais523> ".zlib" is a pretty descriptive extension
17:44:04 <Vorpal> it could be a dynamically loadable format
17:44:09 <Vorpal> what about zfs library?
17:44:24 <Vorpal> but well if they have z-file system why not have z-libraries
17:45:00 * Gregor proceeds to actually install OpenIndiana in VirtualBox because it's easier than trying to extract this nonsense.
17:45:43 <elliott> Gregor: What are you actually doing.
17:46:23 <Vorpal> Gregor: you use a fork of an oracle product inside a virtual machine that is an oracle product?
17:46:43 <elliott> Vorpal: A fork of a dead project :P
17:46:50 <Gregor> elliott: I'm using Solaris+gelfload as a target to build up a shims library which I will hopefully be able to contribute to maloader. I'm using Solaris for laffs.
17:46:52 <Vorpal> elliott: but there is some irony in this.
17:47:41 <Gregor> https://github.com/shinh/maloader
17:48:40 <Vorpal> but Mach-O loader won't actually let you run OS X executables, because of libraries.
17:49:07 <HackEgo> 432) <ais523> I think I managed something like a one-expression increment that was only a few hundred characters long
17:49:15 <ais523> yes, that sounds like me
17:49:17 <elliott> Vorpal: <Gregor> elliott: I'm using Solaris+gelfload as a target to build up a shims library which I will hopefully be able to contribute to maloader. I'm using Solaris for laffs.
17:49:32 <HackEgo> 51) <Octalnet> oklofok: I'm a tad over-apologetic. I apologize.
17:49:34 <HackEgo> 697) <fungot> Ngevd:. i'm so kind, even to assholes! anmaster no not markov anmaster no not markov anmaster no not markov anmaster no not markov anmaster no not markov
17:49:35 <ais523> I agree with 432's addition, anyway
17:49:36 <Gregor> Vorpal: Hence "shims". And incidentally, it does load a non-insignificant number of console binaries, including GCC and friends.
17:49:49 <HackEgo> 322) <zzo38> However is probably better to have both queen/king and government in case one does bad thing, the other side can argue to them
17:49:50 <HackEgo> 436) <oklopol> half the time the time travel model is one where a consistent universe essentially seems impossible if it supports any nontrivial agent-like behavior (because certainly one agent will want to destroy it using a retarded paradox), the other half seems to actually assume an implicit extra time axis and moving in
17:49:50 <HackEgo> 342) <ais523> elliott: hey, thinking's easier than using the Internet
17:49:58 <Gregor> Vorpal: (Simply by redirecting all the standard C functions to the host's libc verbatim)
17:50:13 <elliott> ais523: hmm, which of those do you think is the worst?
17:50:19 <Gregor> Vorpal: (Which is how gelfload works too)
17:50:39 <elliott> ais523: fungot quotes are not eligible for deletion
17:50:40 <fungot> elliott:, so i'd make stuff up to. why, this is for you guys are a lot, but played so bad and missed that: ( :::ass. in case you missed that: ( :::ass. in case you missed that: ( :::ass. in case you missed that: ( :::ass. in case you missed that: ( :::ass. in case you missed that: ( :::ass. in case you missed that: ( :::ass. in case you missed that: ( :::ass. in case you missed that: ( :::ass. in case you missed that: ( :::ass.
17:50:44 <ais523> also, 436 is truncated, although potentially interesting
17:50:53 <ais523> 322's probably the worst non-fungot one there
17:50:53 <fungot> ais523: i, myself, will bring an end to all. ghosts lurk in the ruins were in truth, and everything in readiness for fnord. under these to tristan d'acunha, a volcanic origin, a high, and was fnord him with his umbrella. " who can have patience to acquire it. just fnord" brutha. " do you know much about gods, i am no fighter:
17:50:56 <HackEgo> http://codu.org/projects/hackbot/fshg/index.cgi/raw-file/tip/paste/paste.23600
17:51:08 <ais523> it's typical of zzo38, but nothing massively special
17:51:14 <elliott> hmm, 436 is boring and cut off
17:51:21 <Vorpal> Gregor: the value of #defines and so on will differ between systems
17:51:28 <elliott> I'll do another one since that was a missed opportunity to delete something crap
17:51:37 <ais523> gah, my browser doesn't know how to open 23600 files
17:51:43 <HackEgo> 578) <elliott> I MIGHT BECOME GHOST
17:51:44 <HackEgo> 267) <oklopol> oerjan: also actually A(4, 4) is larger than any other integer, i learned this the other day when i was reading about this algo, it had complexity O(n a^-1(n)) = O(n a^-1(4))
17:51:45 <elliott> ais523: it's not the extension, it's Gregor's server
17:51:57 <HackEgo> 152) <CakeProphet> how does a "DNA computer" work. <CakeProphet> von neumann machines? <Phantom_Hoover> CakeProphet, that's boring in the context of DNA. <Phantom_Hoover> It's just stealing the universe's work and passing it off as our own.
17:51:57 <HackEgo> 319) <zzo38> Why do you want to have sex in everything? I don't want.
17:51:57 <HackEgo> 94) <Warrigal> I cannot eat meat that isn't flat.
17:52:08 <ais523> elliott: it's both; it doesn't know the type because the server didn't tell it, so it tried to guess from the extension
17:52:17 <HackEgo> 95) Note that quote number 124 is not actually true.
17:52:25 <ais523> 94 doesn't look all that interesting
17:52:26 <HackEgo> 124) <Warrigal> Darn, now I can't acknowledge the reference you were making.
17:52:34 <ais523> also, 95 is massively out of context by now
17:52:35 <elliott> haha, same person by coincidence
17:52:38 <Gregor> elliott, ais523: And I don't know why the server didn't tell it, so for right now you just have to live with it :P
17:52:39 <ais523> does that make it better or worse?
17:53:05 <ais523> yep, the now-deleted 436 doesn't seem particularly quotable
17:53:15 <ais523> it's like xkcd; it's vaguely thought-provoking and sometimes worth reading, but not funny
17:53:24 <HackEgo> 124) <soupdragon> if you claim that the universe is more than 3D the burden of proof is on you to produce a klien bottle that doesn't self intersect <soupdragon> ^ I learned that trick from atheists
17:53:27 <elliott> xkcd was better when it /was/ funny :P
17:54:08 <ais523> I found the one about the doorbell funny, actually
17:54:23 <ais523> but mostly only because it claimed to be a true story and I can believe that
17:54:33 <Ngevd> xkcd is hit and miss
17:54:38 <elliott> oh well, let's do another round, we don't exactly have a shortage of quotes:
17:54:52 <HackEgo> 12) <GKennethR-L> :d <(I can lick my nose!)
17:55:01 <Ngevd> I personally enjoyed the one with the arrow and the boomerang
17:55:10 <HackEgo> 279) <locks> who's walter bright and why is he so bright <nddrylliog> locks: he's to D what I'm to ooc <nddrylliog> locks: guilty
17:55:10 <HackEgo> 662) <Gregor> But whereas the Zune UI makes one think "I want to kill myself", the Windows CE UI makes one think "I want to kill myself, but first kill my parents as punishment for bringing into this world someone who would one day own a Windows CE device."
17:55:10 <HackEgo> 466) <Phantom_Hoover> I go to clean up the shrapnel from a teabag and you're discussing the definition of god out of nowhere.
17:55:11 <HackEgo> 555) <Phantom_Hoover> You realise the micromanagement it took to make quintopia encrust my silver throne with emeralds rather than a jug?
17:55:27 -!- boily has quit (Ping timeout: 260 seconds).
17:55:33 <elliott> I'm going to end up deleting every single Sine quote, aren't I :P
17:55:37 <HackEgo> http://codu.org/projects/hackbot/fshg/index.cgi/raw-file/tip/paste/paste.14273
17:56:03 <elliott> Aww, we'll dip below seven hundred soon.
17:56:32 <ais523> the Sine quotes mostly aren't all that good
17:56:37 <elliott> Gregor: My joke simpler HackEgo transaction system actually seems just as good as the original one, and about ten thousand times simpler to implement...
17:57:02 <elliott> Gregor: DO YOU EVEN REMEMBER WHAT THAT ONE WAS
17:57:14 <tswett> If you believe the universe is 3D, the burden of proof is on you to build an embedding of every finite graph out of chewing gum and string.
17:57:39 <tswett> I don't know what the problem you're facing is, but since you said "transaction", the best solution is probably SQL.
17:58:00 <elliott> FSVO "best solution" equal to "SQL servers are the worst place to look to for ACID guarantees"
17:58:12 <elliott> What are the relational guarantess anyway
17:58:26 <elliott> They're ACID + some shit, and I think it's the rest of them SQL servers fail at, but happily don't recall
17:58:44 <Gregor> elliott: FUSE filesystem over SQL. Doit.
17:58:46 <tswett> I just realized that for ACIDness, I've never even thought to look at something that isn't a SQL server.
17:59:03 -!- ais523 has quit (Remote host closed the connection).
17:59:07 <elliott> Gregor: Commits are only done when there are no active commands running. Whenever a command writes to the filesystem in any way, every pending command (command running or not yet committed) is cancelled and added to the redo queue /in chronological order/ (i.e. in the order HackEgo saw them).
17:59:15 <elliott> Gregor: After a successful round of commits, the redo queue is executed.
17:59:27 <tswett> For small applications, SQLite. For large applications, the mean-looking elephant.
17:59:50 <tswett> (For really huge applications, the cute-looking elephant. But I have no idea how to use the cute-looking elephant. I bet it's really expensive.)
18:00:02 <elliott> Gregor: So basically, all commands after a write only execute after that write (except they're executed preemptively because most of the time there won't be a write).
18:00:09 <elliott> Gregor: It's easier to implement than explain, really :P
18:00:17 <elliott> tswett: Which elephant is htat
18:00:18 <Vorpal> <tswett> I just realized that for ACIDness, I've never even thought to look at something that isn't a SQL server. <-- hm, same
18:00:21 <Gregor> elliott: Sounds feasible to me *shrugs*
18:00:26 <Vorpal> where else do you find ACID?
18:00:38 <tswett> elliott: you know. The yellow one that pushes things with its trunk.
18:00:50 <tswett> Doug Cutting's son's toy elephant.
18:00:55 <Vorpal> elliott: well, STM is not to persistent storage
18:01:05 <Vorpal> which is kind of key for ACID
18:01:14 <elliott> tswett: Hadoop is open-source :P
18:01:15 <Vorpal> at least not in the STM stuff I have seen
18:01:40 <elliott> OK, durability is arguable.
18:01:50 <elliott> But certainly transactions can't be undone in STM.
18:01:52 <Vorpal> elliott: the D in ACID implies it yeah
18:01:52 <tswett> There are ACID things that are not persistent? That sounds... not exactly pointful.
18:02:01 <Gregor> elliott, Vorpal: Incidentally, gelfload can run a fair selection of Solaris binaries.
18:02:08 <elliott> tswett: Sure, if you think ACI and most of D are pointless.
18:02:13 <elliott> tswett: Ever programmed with locks?
18:02:14 <Gregor> elliott, Vorpal: Kinda makes you wish microcosm meaningfully existed, donnit :P
18:02:26 <tswett> Oh yeah, locks. I guess it is useful after all.
18:02:36 -!- hagb4rd has quit (Ping timeout: 248 seconds).
18:02:45 <elliott> tswett: Locks are not ACID.
18:02:46 <Vorpal> Gregor: well it was over my head in that I couldn't understand what you actually wanted
18:02:52 <elliott> tswett: Locks are proof that ACID is great.
18:03:23 <Vorpal> locks are I, possibly A too, but not really
18:03:56 <tswett> So instead of using locks, you just kind of take all the stuff that you'd put into a lock thingy, and put it in a transaction instead, or something?
18:04:14 <elliott> I direct you to the documentation of http://hackage.haskell.org/package/stm :P
18:04:31 <elliott> I suppose only http://hackage.haskell.org/packages/archive/stm/2.2.0.1/doc/html/Control-Monad-STM.html and http://hackage.haskell.org/packages/archive/stm/2.2.0.1/doc/html/Control-Concurrent-STM-TVar.html actually matter since everything else is implemented on top of them.
18:05:01 <tswett> I thought everything was implemented on top of, like, Verilog.
18:05:35 <tswett> Yep. It really, really sucks.
18:05:47 <Vorpal> yeah VHDL is way better.
18:06:09 <tswett> I have to reboot the computer every time I want to load or unload any code or data.
18:06:41 <tswett> I mean, I can load and unload data at any time, but I have to state how much of it I want beforehand, and which pieces of code are allowed to access it.
18:06:52 <tswett> Come to think of it, all this sounds kind of sexy.
18:07:12 <elliott> They need to hype orElse more in the stm package documentation; it's not obvious to me that you can do (Process <$> readTChan somequeue) `orElse` (Quit <$ readTVar quitVar) by that description (which you can).
18:07:37 -!- augur has quit (Remote host closed the connection).
18:07:48 <Gregor> Observation: OpenIndiana kinda sucks.
18:08:30 <Gregor> It's shocking, I know.
18:08:45 <tswett> I have no idea what alwaysSucceeds is supposed to do.
18:09:01 <Gregor> Vorpal: And all I want is a VFS :P
18:09:48 <Vorpal> Gregor: yeah I have no idea how to do a file system. Whatever I would invent would likely be awkward. Because I have no idea how to do one correctly.
18:09:53 <elliott> tswett: Adds an invariant.
18:09:55 <tswett> Gregor: say. Would you like an application virtual machine that is designed to allow multiple users to allow untrusted code simultaneously, while all their bits of code are allowed to share objects between each other?
18:10:07 <elliott> tswett: http://en.wikipedia.org/wiki/Software_transactional_memory :-P
18:10:33 <elliott> tswett: Have I mentioned that @ can do that?
18:11:00 <elliott> tswett: I believe I explained that last time you talked here.
18:11:03 <tswett> Is it your nonexistent programming project that's like my nonexistent programming projects?
18:11:12 <Vorpal> tswett: @ is elliott's dream about making his own OS one day
18:11:32 <Vorpal> not saying some of the ideas in it aren't good. Just saying that waiting for it is like waiting forever.
18:11:45 <elliott> Vorpal: Oh please, the "@ is vapourware" tack isn't even amusing when I've been refining the design with others in public on IRC.
18:11:47 <tswett> (Gee, how many abandoned projects do I have? There's Jath, PhunchLua, AcidLua... and maybe some others.)
18:12:03 <tswett> elliott: do you have any sort of persistent documentation of @?
18:12:08 <elliott> Vorpal: If I'd actually claimed I was coding it now, then you'd have a point.
18:12:11 <tswett> Don't say "the #esoteric logs".
18:12:12 <elliott> tswett: http://codu.org/logs/_esoteric/
18:12:20 <Ngevd> My projects have a tendency to not get far enough to count as projects, abandoned or not
18:12:43 <Vorpal> elliott: I'm not claiming you are coding. But I'm claiming that the design is taking forever. Design, coding. Two stages of development.
18:13:09 <elliott> Vorpal: So, the rate of progress doesn't matter, only time to total completion?
18:13:20 <elliott> By that measure, /any/ difficult project is vapourware by definition.
18:13:26 <tswett> elliott: what development methodology are you using?
18:13:30 <Vorpal> elliott: where did I claim that?
18:13:32 <tswett> Don't say "winging it" and don't say "waterfall".
18:13:57 <elliott> tswett: Do I really have to name a fad? If I was winging it, I would be coding it.
18:14:00 <elliott> Vorpal: <Vorpal> elliott: I'm not claiming you are coding. But I'm claiming that the design is taking forever. Design, coding. Two stages of development.
18:14:11 <elliott> Vorpal: The design is progressing at a steady rate, so you're just complaining about the absolute amount of time it's taken.
18:14:16 <tswett> elliott: certainly. You must choose a fad.
18:14:19 <Vorpal> elliott: where does that say "only time to total completion matters"
18:14:22 <elliott> Therefore any difficult project is vapourware because it can't be produced in a short amount of time.
18:14:33 <Vorpal> elliott: I'm complaining about the scope of the project I guess
18:15:07 <elliott> Vorpal: Damn, why didn't I try and clone Unix?
18:15:14 <elliott> If only I knew it'd make Vorpal happy...
18:15:17 <tswett> "If a transaction cannot be committed due to conflicting changes, it is typically aborted and re-executed from the beginning until it succeeds." That sounds pretty awesome.
18:15:31 <Vorpal> elliott: clone plan9 instead
18:15:34 <elliott> tswett: It's implemented more efficiently than that, at least in GHC STM :P
18:15:41 -!- sebbu2 has changed nick to sebbu.
18:16:20 <elliott> For instance (Process <$> readTChan somequeue) `orElse` (Quit <$ readTVar quitVar) as a transaction only "executes" whenever anyone writes to the channel or the variable.
18:19:15 <tswett> I suddenly wonder how efficiently one could implement the next-Fibonacci-number function. Given a Fibonacci number, return the next one.
18:19:58 <tswett> I guess it's easy to do with a simple hash table as long as the size of the number has a small bound, like 64 bits.
18:20:15 <elliott> tswett: next(n) = n + prev(n) :-P
18:21:21 <tswett> Of course, it would be much easier to do if it were "given two consecutive Fibonacci numbers, return the next one".
18:21:32 <elliott> Obviously prev(n) can = fib(fibno(n) - 1).
18:21:36 <elliott> But that just offloads the problem to fibno.
18:21:37 <tswett> It's the easiest possible non-trivial problem.
18:21:42 <elliott> tswett: You can probably do it with one of the closed form solutions.
18:21:48 <tswett> fibno seems pretty easy to do. Just take the log base phi or something.
18:22:19 <elliott> next(n) = n + fib(fibno(n) - 1), where fib and fibno are closed-form.
18:22:36 <tswett> Here's a closed form solution of fib:
18:22:46 <Vorpal> isn't there a non-recursive form of fib?
18:23:01 <elliott> Vorpal really does operate about ten lines behind everyone else.
18:23:08 <tswett> fib(n) = (a^n - b^n)/(a - b)
18:23:11 <tswett> Where a and b are constants.
18:23:12 <Vorpal> oh yes, the closed form
18:23:14 <tswett> So... invert that, elliott.
18:23:24 <Vorpal> elliott: that is becuase I jump between channels
18:23:36 <elliott> Vorpal: Huh, is (a-b) = sqrt(five) actually?
18:24:08 <elliott> http://www.wolframalpha.com/input/?i=inverse+of+%28a^n+-+b^n%29%2F%28a+-+b%29 THAT'S NOT A PONY
18:24:58 <tswett> elliott: and how's it supposed to know which variable to take the inverse with respect to?
18:25:04 * elliott plugs in the values of a and b.
18:25:21 <tswett> How do you know what a and b are? I don't think I told you.
18:25:40 <elliott> http://www.wolframalpha.com/input/?i=inverse+of+%28phi^n+-+%28-1%2Fphi%29^n%29%2Fsqrt%28five%29 Well that didn't help.
18:25:56 <elliott> http://www4c.wolframalpha.com/Calculate/MSP/MSP212719heh519ig49ig8300006a4he3dhfchf7h85?MSPStoreType=image/gif&s=33&w=240&h=190&cdf=Rotation
18:26:13 <elliott> tswett: I wonder if Mathematica could handle it.
18:26:44 <tswett> There's also a closed form that involves the floor function. So... use the inverse floor function.
18:26:51 <Vorpal> it is more advanced than W|A in general. Reminds me... Isn't Mathematica 8 out?
18:27:00 <elliott> tswett: Ah yes, a common function.
18:27:10 <elliott> tswett: Hmm, it actually looks doable there.
18:27:25 <tswett> elliott: oh, and Wolfie by default assumes phi is a variable.
18:27:31 <tswett> You have to say "where phi = the golden ratio" or something.
18:27:41 <tswett> (And it will say "blah blah blah where phi = phi" in the result.)
18:27:58 <elliott> http://www.wolframalpha.com/input/?i=inverse+of+%28phi^n+-+%28-1%2Fphi%29^n%29%2Fsqrt%28five%29+where+phi+%3D+golden+ratio
18:28:07 <elliott> tswett: See, you just take the reciprocal of the fibonacci number. :
18:28:16 <elliott> Phantom_Hoover: Inverting fib.
18:28:26 -!- augur has joined.
18:28:45 <elliott> tswett: Hmm, next(n) = n + fib(fibno(n) - 1) is rather overcomplicated, since it's next(n) = fib(fibno(n) + 1).
18:28:48 <tswett> Lemme see. Isn't every function Z -> Z extensible to an analytic function?
18:29:56 <elliott> Phantom_Hoover: Oi, help us.
18:30:03 <elliott> tswett: http://bigintegers.blogspot.com/2011/08/inverse-fibonacci-invfibfibnn.html
18:30:07 <elliott> tswett: Here's something awful.
18:30:27 <elliott> tswett: http://stackoverflow.com/questions/5162780/the-inverse-fibonacci-problem
18:30:29 <tswett> Just use the inverse loop function.
18:30:33 <elliott> tswett: Looks like there's an O(log n) algorithm for it.
18:30:52 <tswett> elliott: yeah, it's called "enumerate the Fibonacci numbers intil you find it".
18:31:11 <elliott> tswett: Theirs looks fancier. :(
18:31:47 <tswett> Then again, I think that's actually... quadratic or cubic or something in the length of the number. So, O(log n). :P
18:31:48 <Phantom_Hoover> The function just looks like a normal exponential one, but I'm sure you tried that.
18:32:02 <elliott> next(n) = floor(log(sqrt(5) * (fibno(n) + 1))/log(phi) + 1/2)
18:32:08 <elliott> Phantom_Hoover: Tried what?
18:32:21 <elliott> "Measuring memory usage by counting unbounded words is sort of silly, but as long as that's the model, there's an O(log n) time, O(1) word solution similar to Nikita Rybak's that in essence computes n via its Zeckendorf representation, which is based on the Fibonacci numbers (YO DAWG)."
18:32:37 <elliott> tswett: But yeah, that matrix thing looks like the best idea.
18:32:39 <elliott> And also the least simple idea.
18:32:47 <tswett> Ooh, wait. The problem was "Given F(n) for n > 2, what is n?". So enumerating the Fibonacci numbers would be O(n).
18:32:53 <elliott> http://stackoverflow.com/questions/5162780/the-inverse-fibonacci-problem/5254783#5254783
18:32:56 <elliott> Ah yes, calculation = approximation.
18:33:03 <elliott> tswett: Yesyesyes but that doesn't help us.
18:33:13 <tswett> Oh, the matrix thing is pretty simplpy.
18:33:27 <elliott> tswett: Yes, but it's not /stupidly/ simple.
18:33:44 <tswett> I dunno, it seems like the obvious-ish way to do it.
18:33:53 <elliott> tswett: By the way, what are you actually doing?
18:34:25 <tswett> Looking for the 56th Fibonacci number? Calculate the 1st, then the 2nd, then the 4th, then the 8th, then the 16, then the 32nd, then the 64th, then the 48th, then the 56th, and hey, your'e there.
18:34:31 <elliott> http://stackoverflow.com/questions/5162780/the-inverse-fibonacci-problem/5266829#5266829
18:34:39 <elliott> tswett: Hmm, what if we used the full-precision reals involved there?
18:34:48 <Ngevd> 40585 is the sum of the factorial of its digits
18:35:45 <tswett> > let fac n = product [1..n] in fac 4 + fac 0 + fac 5 + fac 8 + fac 5
18:36:17 <Ngevd> 115,132,219,018,763,992,565,095,597,973,971,522,401 is the sum of the 39th power of its digits
18:36:36 <Phantom_Hoover> So is Ngevd some kind of calculating prodigy all of a sudden.
18:36:42 <tswett> Ngevd: what number is the sum of the squares of its digits?
18:36:52 <Ngevd> A website reading prodigy, I'm afraid
18:38:10 <elliott> > let digits 0 = []; digits n = uncurry (:) $ digits <$> swap (n `divMod` 10); swap (x,y) = (y,x) in digits 9909
18:38:34 <elliott> > let digits 0 = []; digits n = uncurry (:) $ digits <$> swap (n `divMod` 10); swap (x,y) = (y,x); fac n = product [1..n] in 40585 == sum (map factorial (digits 40585))
18:38:39 <elliott> > let digits 0 = []; digits n = uncurry (:) $ digits <$> swap (n `divMod` 10); swap (x,y) = (y,x); fac n = product [1..n] in 40585 == sum (map fac (digits 40585))
18:38:49 <elliott> > let digits 0 = []; digits n = uncurry (:) $ digits <$> swap (n `divMod` 10); swap (x,y) = (y,x); fac n = product [1..n] in filter (\n -> n == sum (map fac (digits n))) [0..]
18:38:55 <Deewiant> > let n = read $ filter isDigit "115,132,219,018,763,992,565,095,597,973,971,522,401" :: Integer in (==n) . sum . map ((^39) . toInteger . digitToInt) . show $ n
18:39:12 <elliott> Prelude Control.Applicative> let digits 0 = []; digits n = uncurry (:) $ digits <$> swap (n `divMod` 10); swap (x,y) = (y,x); fac n = product [1..n] in filter (\n -> n == sum (map fac (digits n))) [0..]
18:39:19 <elliott> I don't think I'll get another answer for a while.
18:39:31 <lambdabot> Factorions: equal to the sum of the factorials of their digits in base 10.
18:39:43 <tswett> All of the numbers that are the sums of the cubes of their digits: 1, 153, 370, 371, 407
18:39:46 <elliott> There's a sequence for everything.
18:39:52 <lambdabot> Fixed points for operation of repeatedly replacing a number by the sum of th...
18:39:59 <elliott> @oeis 115132219018763992565095597973971522401
18:40:00 <lambdabot> Armstrong (or Plus Perfect, or narcissistic) numbers: n-digit numbers equal ...
18:40:00 <lambdabot> [1,2,3,4,5,6,7,8,9,153,370,371,407,1634,8208,9474,54748,92727,93084,548834,1...
18:40:11 <elliott> Ngevd: Are you reading the OEIS.
18:40:23 <tswett> @oeis 1,1634,8208,9474
18:40:24 <lambdabot> Fixed points for operation of repeatedly replacing a number by the sum of th...
18:40:36 <Ngevd> A website that was the first on my long road to esoteric programming I am reading, though
18:40:47 <tswett> There's an entire seqeunce of sequences there.
18:40:59 <lambdabot> Badly sieved numbers: as in the Sieve of Eratosthenes multiples of unmarked ...
18:40:59 <lambdabot> [2,3,5,7,8,11,12,13,17,18,19,23,27,29,30,31,37,41,43,45,47,50,53,59,61,63,67...
18:41:06 <tswett> Do you guys mind if I just sort of correct all my typos by stating the correct word afterward, instead of jactually correcting them in place?
18:42:20 <tswett> I like that typo, I must say. It seems... jactual.
18:44:13 <elliott> You win seven, you lose even.
18:44:23 <tswett> What's that supposed to mean?
18:44:36 * elliott cracks knuckles and prepares to respond to this crazy reddit guy.
18:44:45 * elliott doesn't actually crack knuckles, but does prepare.
18:44:55 <elliott> Except only the second even.
18:45:13 <tswett> elliott: okay, now I know what STM is.
18:45:20 <tswett> So what the heck does alwaysSuccesds do?
18:45:41 <tswett> Did I just answer my own question, correctly?
18:46:11 <elliott> tswett: It adds an invariant.
18:46:19 -!- Ngevd has quit (Ping timeout: 244 seconds).
18:46:24 <tswett> Okay. Which invariant does it add, and what is the effect of that invariant?
18:46:43 <elliott> alwaysSucceeds adds a new invariant that must be true when passed to alwaysSucceeds, at the end of the current transaction, and at the end of every subsequent transaction. If it fails at any of those points then the transaction violating it is aborted and the exception raised by the invariant is propagated.
18:47:06 <tswett> Can you give an example?
18:47:07 <elliott> So once you do (alwaysSucceeds action), that action must result in true upon execution when passed to alwaysSucceeds,
18:47:11 <elliott> at the end of the current transaction,
18:47:14 <elliott> and at the end of every subsequent transaction;
18:47:22 <elliott> if this is ever not the case, then the transaction in which it is violated is aborted.
18:47:27 -!- ais523 has joined.
18:47:38 <elliott> tswett: Oh, the invariant seems to be represented as a computation which throws an exception if the invariant is violated.
18:47:46 <elliott> So e.g. alwaysSucceeds (readTVar mustAlwaysBeTrue >>= guard).
18:48:19 <tswett> So I can do something like alwaysSucceeds (hey make sure this one variable is equal to five), and then any transaction that sets it to not five will fail?
18:48:51 -!- Ngevd has joined.
18:49:15 <tswett> What does check do? Nothing if it's true, and failure if it's false?
18:49:23 <elliott> check b = if b then return undefined else retry
18:49:30 <elliott> Seems to be redundant with the standard "guard" function.
18:49:38 * elliott has used guard for that in the past.
18:50:15 <zzo38> I did not know of those Haskell programs but it seem it can be used for sure, it might be useful in some cases, probably.
18:50:59 <elliott> Not much of a "Haskell program", it's implemented in GHC internal s:P
18:51:06 <elliott> s/internal s:/internals :/
18:51:10 <elliott> I suppose GHC is a Haskell program, though :-)
18:51:26 <Deewiant> elliott: STM doesn't have a custom definition of "fail", I don't think
18:51:41 <lambdabot> forall (m :: * -> *). (MonadPlus m) => Bool -> m ()
18:51:52 <elliott> Deewiant: (It annoys me that STM doesn't have a custom definition of fail.)
18:51:54 <elliott> I want to be able to write
18:52:05 <zzo38> Yes, I suppose GHC is a Haskell program.
18:52:11 <Deewiant> It annoys me that Monad still has fail
18:52:12 <elliott> It makes perfect sense, declaratively :P
18:52:20 <elliott> Deewiant: That's probably never going to change ever.
18:52:22 <Deewiant> But true, that could be useful
18:52:28 <elliott> There's no way to fix that in a backwards-compatible manner.
18:52:33 <zzo38> Deewiant: Obviously the reason is for use with do-notation.
18:52:42 <elliott> zzo38: It didn't use to be the case
18:52:50 <elliott> It was added because newbies got confused at MonadFail constraints appearing
18:52:51 <Deewiant> zzo38: Just make do blocks have MonadFail m => m a type
18:52:58 <elliott> Relatedly: Newbies ruined Haskell 98
18:53:04 <elliott> I think they were even imagined newbies.
18:53:09 <zzo38> Deewiant: Yes that is one way.
18:53:31 <elliott> Deewiant: Did you know that seq was in a type class previously??? And there was a Void type????
18:53:35 <Deewiant> Hey, monad comprehensions are on the way back (right?)
18:53:40 <Deewiant> So maybe we'll get there again
18:53:43 <elliott> Yes, they're in latest GHC release.
18:53:48 <elliott> Deewiant: Oh, and ... what else was in...
18:53:51 <elliott> Deewiant: IIRC (++) was Monoid
18:53:58 <elliott> Or at least some common now-monomorphic function was
18:54:13 <Deewiant> http://www.cs.auckland.ac.nz/references/haskell/haskell-report-1.4-html/
18:54:18 <zzo38> Another way is to make up a class for DoNotation which includes the stuff for dealing with do-notation directly. And then have default instances, that you can use that.
18:54:23 <elliott> Deewiant: Basically we should just roll back to that release, add hierarchical modules, update base and call it a day.
18:54:32 <Deewiant> elliott: And yes, map was Functor
18:54:38 <elliott> Deewiant: Right. So much better.
18:54:49 <elliott> Deewiant: I wonder if [a, b, c] was :: (MonadPlus m) => m a
18:55:21 <elliott> Deewiant: My favourite thing about 1.4 was all the standard monadic combinators were implemented with monad comprehensions
18:55:40 <elliott> Deewiant: That's dollar sign exclamation mark.
18:56:07 <elliott> data a -> b -- No constructor for functions is exported.
18:56:07 <elliott> data a -> b = Function (Ptr Instruction)
18:56:31 <Deewiant> -- right-associating infix application operator (useful in continuation-
18:56:38 <elliott> ( ) (Function ptrInstruction) x = [asm| push x; jmp $(ptrInstruction) |]
18:56:40 <Deewiant> Yes, continuation-passing style indeed.
18:56:42 -!- nooga has quit (Ping timeout: 260 seconds).
18:57:11 <elliott> Did Cont not exist back then? I guess not
18:57:16 <elliott> data Int = minBound ... -1 | 0 | 1 ... maxBound
18:57:30 <elliott> Aww, they should have tried to pseudo-enumerate it.
18:57:44 <elliott> -- of enumFrom and enumFromThen allow floats to be used in arithmetic
18:57:44 <elliott> -- series: [0,0.1 .. 1.0]. However, roundoff errors make these somewhat
18:58:10 <elliott> > (length foo, length (map (/10) foo))
18:58:22 * elliott thinks he already showed Deewiant that one.
18:58:38 <Deewiant> I don't think you did, but I'm quite aware of the issue.
18:58:48 <elliott> Deewiant: Conal did that one.
18:59:00 <elliott> Deewiant: (He actually didn't know of the issue until a few weeks ago when people he was teaching Haskell to ran into it)
18:59:17 <elliott> Deewiant: The lack of MR is to blame for that one, though.
18:59:24 <elliott> As well as defaulting but that goes without saying
18:59:30 <Deewiant> I've known of the issue for quite some time. :-P
18:59:38 <elliott> We should get rid of defaulting.
18:59:53 <elliott> Deewiant: OK, for interactive use.
19:00:06 <elliott> Deewiant: But I use -Wall -Werror so I don't get to use defaulting, and I literally never have problems with that.
19:00:07 <Deewiant> For interactive use and for short one-off programs
19:00:19 <elliott> Short one-off programs shouldn't rule the language :P
19:00:48 <elliott> Deewiant: "default" with no types could be standardised to turn defaulting on :-P
19:01:20 <elliott> <Deewiant> (Also, -Werror?)
19:01:32 <elliott> Deewiant: I turned it on to clean up Shiro and haven't broken the habit since
19:02:19 <elliott> Deewiant: It's better than it is in C :P
19:02:53 <Deewiant> It slows down debugging cycles :-P
19:03:30 <elliott> Deewiant: It shortens them by letting me fix bugs without running anything
19:03:46 <Deewiant> No, that's -Wall, -Werror doesn't help you there
19:04:24 <elliott> Deewiant: Except for all the warnings you decide don't need fixing because they're not applicable in this case, thus making you start automatically ignore warnings
19:04:32 <tswett> Okay, suppose you run x <- newTVarIO 'a'.
19:04:40 <tswett> (Yeah, that's one hundred percent a Haskell statement.)
19:04:55 <Deewiant> I never "automatically ignore warnings" and I find it strange that people do
19:05:10 <tswett> And then you run atomically (do writeTVar x 'b'; writeTVar x 'a'), and meanwhile, you run readTVarIO x.
19:05:15 <elliott> Deewiant: Because you either ignore warnings, or get bothered by the irrelevant ones every single time.
19:05:20 <tswett> Is it possible that the second of those things will return 'b' instead of 'a'?
19:05:59 <Deewiant> Warnings don't survive very long so it's not like there's many an "every single time"
19:06:23 <elliott> tswett: Is that a question about STM semantics or about readTVarIO semantics
19:06:33 <elliott> readTVarIO == atomically . readTVar
19:06:38 <Ngevd> > (length foo, length (map (/10) foo), length (map (/10) (map (/10) foo)))
19:06:45 <elliott> tswett: So no, there is no chance.
19:06:51 <elliott> tswett: STM provides no backdoors.
19:08:24 <tswett> So I guess the second thread reads x, and then checks to make sure nobody has written to x "concurrently", and, if so, tries again?
19:08:32 <Ngevd> Working on Uniquode
19:08:46 <elliott> tswett: Like I said, the "retry" is just a model.
19:08:55 <tswett> Yes, but I'm asking about that model.
19:09:14 <elliott> tswett: You can reason about STM as if it was sequential execution.
19:09:25 <elliott> tswett: Oh, the (readTVarIO x) could return 'a', yes.
19:09:27 -!- nooga has joined.
19:09:33 <elliott> tswett: If the variable started with 'x'
19:09:36 <elliott> Then it could return 'x' too.
19:09:54 <tswett> I guess sequential execution is a really obvious way to think about this.
19:10:07 <elliott> You can also think about it as "atomically" grabbing an exclusive lock over the entire system.
19:10:13 <Gregor> elliott: Solaris ls uses threads.
19:10:15 <elliott> Which is the same thing :P
19:10:31 <elliott> Gregor: Does it, like, sort with parallel mergesort?
19:10:45 <Gregor> I just know it depends on pthreads :P
19:10:54 <elliott> Gregor: I find it plausible that Solaris libc depends on pthreads
19:11:04 <tswett> So if I do atomically (do readTVar x; hey make sure x is equal to 5; writeTVar x 6), will that transaction just kinda hang around until x becomes 5, and then replace it with 6?
19:11:08 <elliott> Unless pthreads depends on libc I guess :P
19:11:26 <elliott> tswett: It'll block until x becomes 5, yeah.
19:11:35 <tswett> Will atomically return before then?
19:11:36 <elliott> tswett: Or, if we're enforcing PURE STRICT MODEL THINKING: It busyloops until x becomes 5 :P
19:11:46 <elliott> tswett: No; that's why it's called "atomically".
19:12:04 <elliott> tswett: You can of course spawn it off in a thread.
19:12:09 <elliott> That's just (forkIO . atomically).
19:12:19 <elliott> (In GHC, that's a lightweight thread.)
19:12:30 <elliott> (GHC runs lightweight threads in a few OS threads.)
19:12:38 <elliott> (You may already know this.)
19:12:58 <tswett> And is there, by chance, any way to save all the relevant state to disk at regular intervals?
19:13:11 <Ngevd> What should * do in Uniquode?
19:13:37 <tswett> Ngevd: it should extend the private use areas.
19:14:36 <elliott> tswett: Well, you could fork off a thread that does "atomically { x <- readTVar blah; y <- readTVar bluh; ... return MyStateRecord { foo=x, bar=y, ... } }" periodically and writes that to disk. That isn't very nice, though. (You could define a wrapper library that looks like "newTVar :: (Serialise a) => a -> STM (TVar a)" and adds it to an internal list, and uses existentials etc. to avoid actually listing out every variable there.)
19:14:56 <elliott> That doesn't quite give you the D in ACID, because of course the program could crash before that serialisation happens, but it's not bad, and the wrapper library would make it seamless.
19:15:17 <elliott> tswett: http://hackage.haskell.org/package/acid-state offers full ACID transactional storage of standard Haskell values, with on-disk persistence.
19:15:26 <elliott> tswett: But it has some limitations, like you have to define transactions upfront.
19:15:36 <elliott> And they can't take any parameters that aren't serialisable, for obvious reasons (it's based on log storage).
19:15:41 <elliott> But literally storing a log :P
19:16:13 <elliott> Just like trees are made out of paper.
19:16:20 <tswett> Do they have wood over there?
19:16:34 <ais523> tswett: you can buy it at petrol stations
19:16:40 <ais523> also, from lumber merchants
19:16:45 <ais523> depending on whether you want to burn it or make furniture out of it
19:16:47 <tswett> So all of the wood there is imported.
19:16:47 <Ngevd> We import it from the middle east
19:17:04 <ais523> tswett: there are some areas called "forest" that aren't actually forests
19:17:10 <ais523> there are also some actual forests, though, too
19:17:21 <ais523> although mostly just little ones nowadays
19:17:28 <tswett> ais523: what are they? Just sort of regions that contain a bunch of places marked "tree"?
19:17:36 <tswett> And are all of the actual forests imported, too?
19:17:36 <ais523> most of the trees in the UK are planted deliberately
19:18:04 <tswett> So do you have to manufacture paper there, or is the natural forest paper enough for all your needs?
19:18:10 <tswett> And does it grow to size, or do you have to cut it?
19:18:21 <ais523> paper's nearly always done from "managed forests"
19:18:22 <elliott> tswett: It doesn't grow on trees, you know.
19:18:28 <ais523> which are just bunches of pine trees being farmed
19:18:44 <ais523> there's a little logo saying Forest Stewardry Council on it
19:18:54 <ais523> to reassure people that it wasn't made from rainforests or something stupid like that
19:19:10 <ais523> (incidentally, throughout this conversation, I've been serious and elliott's been joking)
19:19:22 <elliott> Really???????????????????????????
19:19:26 * tswett writes this down: British trees all say "Forest Stewardry Council" on them, except the ones imported from rainforests.
19:19:33 <ais523> tswett: as for the areas called "forest" which aren't, they're places which were forests once but aren't any more
19:19:39 <Gregor> Also, OpenIndiana's echo command appears to output by a series of wputchars.
19:19:51 <Ngevd> And I was talking about oil
19:20:15 <tswett> elliott: now, that's too many question marks. The limit is nine.
19:20:22 <ais523> Gregor: does it convert what it echos between Unicode normalization forms? that'd be hilarious
19:20:45 <Gregor> ais523: I choose not to find the answer to that question :P
19:21:16 -!- tiffany has joined.
19:22:23 <elliott> Gregor: You gotta be joking.
19:22:51 <elliott> #defineexit(a)flushb(); return (a)
19:24:16 <zzo38> I don't like that definition can you write this instead: return (flushb(),(a)) would this even work, and would that one work too
19:24:20 <Gregor> elliott: Best part of this completely pointless project is discovering just how retarded Solaris is :P
19:25:25 <elliott> http://www.google.co.uk/url?sa=t&source=web&cd=2&sqi=2&ved=0CCkQFjAB&url=http%3A%2F%2Fcs.wmich.edu%2F~trthomps%2FClasses%2FCS%25202240%2Fsh_src%2Fheirloom-sh-050706%2Fecho.c&ei=EYGcTo7wNdSzhAeBkaGLBA&usg=AFQjCNHHVhYMfSdbCg2o1lwZmN_MOdAt4Q&sig2=ARvlnfObEYkTXCFs5ciiew
19:25:39 <elliott> it has a comment involving opensolaris but might not be opensolaris
19:25:41 <Deewiant> http://cs.wmich.edu/~trthomps/Classes/CS%202240/sh_src/heirloom-sh-050706/echo.c
19:25:43 <elliott> aha, wait, http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/sh/echo.c
19:25:49 <elliott> Deewiant: http://cvs.opensolaris.org/source/raw/onnv/onnv-gate/usr/src/cmd/sh/echo.c
19:26:21 <ais523> what does prc_buff do anyway?
19:26:41 <ais523> there is an mbtowc call in there, anyway
19:27:35 <Deewiant> ais523: http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/sh/print.c#208
19:28:04 <elliott> So where's the ncurses part :P
19:28:32 <Deewiant> http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libcurses/ ?
19:28:43 <Gregor> Solaris and Mac OS X are collectively a great reminder of why the UNIX brand name is not something to be proud of :P
19:30:49 <elliott> Deewiant: <Gregor> Also, OpenIndiana's echo command appears to output by a series of wputchars.
19:32:11 <Deewiant> I thought wputchar was like a wide putchar
19:33:00 <elliott> they just /look/ like curses names
19:33:48 <elliott> Gregor: Curses echo: the best?
19:34:31 <ais523> hmm, did people here see the Proggit post about how Outlook can be made to try to open a URL, without permission, on the UI thread?
19:35:23 <ais523> that worries me, especially the bit where MS don't consider it a security bug
19:35:29 <ais523> but just a regular bug
19:36:00 <elliott> Gregor: How come jslinux is so much faster than jsmips
19:36:56 -!- GreaseMonkey has joined.
19:41:49 -!- oerjan has joined.
19:46:39 <elliott> ais523: OK, Python has the most ridiculous thing ever
19:48:06 <oerjan> the module of silly walks
19:49:23 <Gregor> elliott: Uhh, it isn't.
19:49:43 <elliott> (I suspect the answer is "Bellard" :P)
19:49:50 <oerjan> a linked list of garbage is a nice way to do refcounting
19:50:26 <oerjan> except python wants everything to be freed immediately, doesn't it
19:50:48 <Gregor> elliott: I think the perceived difference in time is because my fork is slow.
19:51:05 <Gregor> elliott: Actual process execution is faster.
19:51:09 <elliott> A list of objects which the collector found to be unreachable but could not be freed (uncollectable objects). By default, this list contains only objects with __del__() methods. [1] Objects that have __del__() methods and are part of a reference cycle cause the entire reference cycle to be uncollectable, including objects not necessarily in the cycle but reachable only from it. Python doesn’t collect such cycles automatically because, in genera
19:51:09 <elliott> l, it isn’t possible for Python to guess a safe order in which to run the __del__() methods. If you know a safe order, you can force the issue by examining the garbage list, and explicitly breaking cycles due to your objects within the list. Note that these objects are kept alive even so by virtue of being in the garbage list, so they should be removed from garbage too. For example, after breaking cycles, do del gc.garbage[:] to empty the list.
19:51:11 <elliott> It’s generally better to avoid the issue by not creating cycles containing objects with __del__() methods, and garbage can be examined in that case to verify that no such cycles are being created.
19:55:00 <ais523> heh, I can't figure out if that's an argument for or against refcounting
19:55:15 <ais523> (Java decided that finalizers were a bad idea, incidentally, in its solution to the same problem)
19:55:56 <Gregor> Finalizers are a bad idea for so many other reasons too.
19:56:00 <ais523> this is, of course, not a problem in Feather
19:56:10 <ais523> for oh so many reasons
19:56:30 <ais523> well, unless you allow retroactive self-modification inside a destructor
19:56:35 <ais523> and why would you do that?
19:57:31 <elliott> Gregor: Weeell, finalisers are nice for resource management
19:57:56 <Gregor> Yeahyeah, I'm gettin' around to merging GGGGC's finalizers into the Fythe branch :P
19:58:25 <oerjan> how in the world does feather ever call destructors...
19:59:13 <elliott> Gregor: Good, then maybe I can start working on bigints again :P
20:05:11 -!- Ngevd has quit (Quit: Leaving).
20:05:49 -!- Ngevd has joined.
20:06:18 <ais523> Deewiant: err, because I don't want to think about the implications
20:06:59 <elliott> ais523: of course you might want to do that
20:07:05 <elliott> ais523: to enforce invariants
20:07:29 <ais523> hmm, am I being trolled?
20:07:32 <elliott> ais523: say, if bad_thing then canary_ref := () else nop
20:07:45 <elliott> canary_ref contains the sole reference to an object whose destructor goes back in time and fixes things
20:07:50 <elliott> say, changes the result of a call to the "amb" operator
20:08:03 <ais523> then why use destructors rather than just method calls? this isn't Reaper
20:08:21 <ais523> also, you can't set canary_ref
20:08:42 <elliott> I don't see why it would cause problems to allow retroactive self-modification in destructors
20:08:43 <ais523> you can only modify it so that it had the value () all along
20:08:47 <elliott> it would merely cancel the destruction
20:08:56 <ais523> elliott: it wouldn't; the problem then is to determine whether the destructor should be run or not
20:09:04 <ais523> which is the problem the original discussion was about
20:09:10 <ais523> if you make destructors pure, it's not a problem
20:09:20 <ais523> (note: pure destructors are useless, right?)
20:09:21 <elliott> ais523: you rewind the state, modify it, and run the program
20:09:28 <elliott> if it runs the destructor, then it runs
20:09:32 -!- nooga has quit (Ping timeout: 248 seconds).
20:09:32 <elliott> if not, it doesn't, and it's a paradox
20:09:53 -!- quintopia has joined.
20:10:05 <elliott> ais523: (obviously, this is fixed-pointed, so the destructor has to end up doing nothing)
20:10:17 <ais523> no, you have Feather's time-travel model wrong there
20:10:32 <ais523> things always have effects, but are allowed to not have causes from the same timeline
20:10:33 <elliott> ais523: I wasn't saying that's what actually happened
20:10:35 <ais523> there's a sort of meta-time thing
20:10:43 <elliott> ais523: I was saying that's how you determine whether it runs or not
20:10:45 <ais523> where each timeline can affect the timeline after it
20:10:54 <quintopia> it's been such a long time, hasn't it
20:11:00 <ais523> <Rodney> raii (Wiz Elf Mal Cha), 10794 points, killed by a raven, while fainted from lack of food
20:11:10 <ais523> quintopia: why were you k-lined?
20:11:24 <quintopia> since i was k-lined. too busy to solve that problem until now.
20:11:54 <elliott> quintopia: why did it happen
20:12:10 <ais523> I should introduce you to kerio some time
20:12:16 <ais523> actually, probably I shouldn't
20:12:19 <elliott> I think they were in the quotes you linked
20:12:48 <elliott> ais523: yep, in an attempt to prove that our qdb was awful
20:12:58 <elliott> theirs is worse; the top quote quality is better, but the average quote quality is lower
20:13:14 <quintopia> elliott: operating a tor exit node on the IP address i was connecting from. just had to change my hostname to get back on.
20:13:42 <elliott> I thought freenode allowed Tor
20:14:01 <elliott> I guess maybe you can connect with Tor, but not be an exit note yourself?
20:14:10 <elliott> since they list a hidden service
20:14:49 <ais523> oh, right, something irrelevant that happened in RL just reminded me of a /really really bad/ antipattern I saw in student code today
20:15:07 <elliott> ais523: anyway, why introduce me to kerio
20:15:32 <ais523> approximately, it was for(int i=0;i<n;n++) {if(n==3) f(); else if (n==4) f(); else if (n==5) f(); else if (n==6) f(); else if (n==7) f(); else if (n==8) f();}
20:15:40 <ais523> where the loop is meant to work generally for all n >= 3
20:15:46 <ais523> and will never be called with n < 3
20:15:59 <ais523> also, f() wasn't a function, but a block statement (not a massively long one, but still)
20:16:05 <elliott> ais523: that's not an antipattern, that's just... a bug
20:16:10 <ais523> at first I thought it was a for-case, then I realised it was even worse
20:16:29 <oerjan> Ngevd: like a design pattern, except it causes huge explosions on contact with software
20:16:34 <elliott> ais523: yes it does; it just doesn't do anything past 8
20:16:35 <ais523> it does nothing for n>8
20:16:39 <elliott> ais523: oh, that's not intentional?
20:16:52 <ais523> they just got bored writing cases, I think
20:17:21 <ais523> oh, it wasn't copy-pasted either, I could tell as all the cases were indented differently
20:17:24 <Deewiant> So what's actually supposed to happen there
20:17:33 <Deewiant> Start i from 3 and call f() every time?
20:18:17 <ais523> Deewiant: it's equivalent to if (n >= 3 && n <= 8) for (int i = 0;i<n;i++) f();
20:18:25 <ais523> the n++ was a typo, it should have been i++
20:18:33 <ais523> typo I made, that is, not typo in the original code
20:18:38 <Deewiant> But I mean, what is it meant to do
20:18:48 <ais523> it's meant to do for (int i = 0;i<n;i++) f();
20:18:48 <Deewiant> Or should the correct code not involve such a loop at all
20:18:51 <elliott> <ais523> Deewiant: it's equivalent to if (n >= 3 && n <= 8) for (int i = 0;i<n;i++) f();
20:19:07 <elliott> ais523: so what code even is this
20:19:14 <ais523> elliott: homework, it's not particularly useful code
20:19:26 <elliott> I was thinking it was something you were maintaining
20:19:27 <ais523> it was meant to exit on n < 3, and otherwise do f n times
20:19:37 <ais523> elliott: haha, that would be really bad
20:19:52 <ais523> and I'd have refactored it by now
20:20:16 <ais523> it seems rather worse than for-case, where at least I can see how it happens even though it's stupid
20:21:10 <ais523> Ngevd: an antipattern is a method of writing code that's been seen often enough in the wild to have a name, but makes no sense
20:21:20 <ais523> and makes the code less maintainable
20:22:05 <ais523> <Wikipedia> In software engineering, an anti-pattern (or antipattern) is a pattern that may be commonly used but is ineffective and/or counterproductive in practice.
20:22:19 <ais523> the page has a list of common antipatterns
20:22:39 <ais523> some of which I don't know of
20:33:48 -!- tiffany has quit (Quit: Leaving).
20:43:33 -!- tiffany has joined.
20:49:45 <tswett> Is it just me, or is TMVar a semantically equivalent to TVar (Maybe a)?
20:51:06 <elliott> tswett: Yes. That is how it is implemented.
20:51:14 <elliott> tswett: Click the "source" link at the top-right of the page.
20:51:19 <elliott> Everything is implemented on top of TVars.
20:51:24 <elliott> tswett: BTW, you probably want to read http://research.microsoft.com/en-us/um/people/simonpj/papers/stm/stm.pdf.
20:51:36 <elliott> It covers GHC's entire STM model and implementation.
20:51:46 <elliott> (Well, not the details of the implementation.)
20:52:35 -!- nooga has joined.
21:03:04 <Gregor> Heylook, I'm running Linux binaries on Mac.
21:04:32 <Gregor> gelfload: The bestest.
21:11:04 <olsner> Gregor, loader of gelfs
21:11:24 <Ngevd> Gregor "gelfloader" Gregor
21:11:34 <zzo38> If you need to run the programs I wrote, you might be able to compile them yourself (that is, if it is a C program, Haskell program, etc) and run on any computer. The other one it is more difficult but it can probably be made.
21:15:21 <elliott> You are an entity that can only make false statements. How can you convince an entity that believes everything you say that you can only make false statements?
21:16:13 <ais523> elliott: are you capable of making /every/ false statement?
21:16:30 <elliott> (finite number of statements only)
21:16:37 <elliott> (but arbitrary (finitely-sized) statements)
21:16:39 <ais523> if so, who cares about convincing people, just use your ability to solve major unsolved problems via binary search
21:16:43 <ais523> by seeing which statements you can make
21:16:58 -!- Ngevd has quit (Quit: Leaving).
21:17:00 <zzo38> Yes, that is how you answer that question.
21:17:18 <ais523> elliott: well, you see, once you've gone and solved a bunch of problems like that
21:17:27 <ais523> it'll become obvious that you have some magic ability to sense truth values
21:17:36 <elliott> hey quintopia, Phantom_Hoover, YOU DO IT INSTEAD
21:17:38 <ais523> and then it'd become an issue of only-true versus only-false, which should be obvious
21:17:58 <elliott> ais523: Dude, the other entity doesn't apply intuition.
21:18:04 <elliott> I said "entity" not "person" :P
21:19:24 <elliott> Phantom_Hoover: SOLV RIDLE
21:20:26 <elliott> <elliott> You are an entity that can only make false statements. How can you convince an entity that believes everything you say that you can only make false statements?
21:20:29 <elliott> Phantom_Hoover: OSOSOEVLE,VE,
21:21:04 <Phantom_Hoover> It's half ten; you have passed the threshold beyond which answers other than 'candle' will be provided.
21:22:37 <elliott> Phantom_Hoover: You're even worse than ais523.
21:22:52 <olsner> elliott: (just guessing) the answer is three, right?
21:23:04 <elliott> Phantom_Hoover: Then it dies.
21:23:10 <elliott> Phantom_Hoover: And you lose.
21:23:23 <ais523> Phantom_Hoover: what do gnomes often own in AceHack that they don't in vanilla?
21:24:29 <elliott> Phantom_Hoover: What's an obsolete method of producing light?
21:25:20 <elliott> Phantom_Hoover: wrong, torches
21:25:35 <ais523> elliott: what's an odd number?
21:26:35 <ais523> elliott: the only acceptable answers are from 3 to 8 inclusive
21:26:43 <oerjan> Phantom_Hoover: Astronomers use supernovas of type 1a as standard what?
21:27:42 <elliott> Phantom_Hoover: What did Mr. McCandless have none of?
21:28:17 <elliott> The correct answer was candles.
21:29:55 <elliott> And thus we get a glimpse into the true mind of a Scot like Phantom_Hoover: Candles, whisky, and nothing else.
21:29:56 <ais523> provisional list of things that are not questions to which "Candles" is the correct answer: INTERCAL, the US national debt, manhole covers, this sentence
21:30:19 <ais523> this list is incomplete; you can help by expanding it
21:31:21 <oerjan> elliott: i can just imagine Phantom_Hoover going down the stairs of his huge castle in a nightgown carrying whisky and a candle.
21:31:34 <elliott> ais523: you just made me realise that I have somehow internalised Wikipedia stock phrases
21:32:00 <ais523> elliott: so has everyone else; that's why the {{citation needed}} meme works
21:32:12 <elliott> ais523: that's a rather more obvious one than the one you used
21:32:15 <oerjan> he probably also has chains; he's a phantom, after all
21:33:22 <oerjan> ais523: everyone else {{who}} ?
21:33:57 <oerjan> i guess if it really is everyone, it's not technically a weasel word
21:35:06 <ais523> "everyone"'s the opposite of a weasel word
21:35:11 <elliott> ais523: huh, has {{citation needed}} always been that?
21:35:14 <elliott> I thought that was a redirect to {{fact}}
21:35:17 <ais523> it's only weaselish due to not being believable
21:35:22 <elliott> but it seems to be the other wway around
21:35:35 <ais523> elliott: that name's existed pretty much forever, but {{fact}} was the official name for ages
21:35:46 <ais523> it was probably changed as part of the campaign to have long readable English official names for templates
21:35:56 <ais523> on the basis that it doesn't matter which name's official anyway
21:36:03 <elliott> actually, I'm inclined to agree
21:36:08 <elliott> it serves as documentation
21:36:25 <elliott> ais523: This template was considered for deletion on 2006 July 1. The result of the discussion was nomination withdrawn on procedural technicality (and discussion was overwhelmingly in favor of keep).
21:36:32 <elliott> --[[Template talk:Citation needed]]
21:36:37 <elliott> ais523: "overwhelmingly" italicised in original
21:36:46 <elliott> Delete This template is the equivalent of an editor's markup on a rough draft. It litters many otherwise good articles on Wikipedia with ugly, unprofessional looking clutter that only serves to highlight the articles' defects to non-editors. No real encyclopedia would go to press with marks like this left in its articles. This is the type of thing that belongs on an article's talk page, not in the article itself. Template:fact should be deleted a
21:36:47 <elliott> nd instances of its use should be replaced with appropriate discussions on the talk pages of the articles where it is used. dryguy 17:57, 1 July 2006 (UTC)
21:36:52 <elliott> I'm sure /that/ went down well
21:37:02 <ais523> elliott: a general rule of Wikipedia is that any sufficiently well-known non-article page will have been nominated for deletion
21:37:04 <elliott> only five thousand million billion trillion occurrences to fix
21:37:31 <ais523> as a corollary, in the case of a /really/ well known-page like the main page or AfD, it will actually have been deleted
21:37:48 <elliott> ais523: I saw an AfD once for [[Adolf Hitler]], where the submitter argued that since Hitler was a bad man (they didn't say evil or anything, literally "bad") there shouldn't be an article on him
21:37:49 <ais523> (the developers made the sandbox undeletable at one point, because someone deleting it crashed the servers)
21:38:18 <elliott> ais523: hmm, why would that crash the servers?
21:38:28 <elliott> ais523: because of people trying to edit a page that doesn't exist and that codepath not being optimised?
21:38:40 <ais523> elliott: no, because it was trying to move all the edits to the sandbox ever from one db table to another
21:38:44 <ais523> and /that/ codepath wasn't optimised
21:38:59 <elliott> ais523: I wonder how much space the history for the sandbox takes up
21:39:45 <oerjan> by the year 3000, the history for the sandbox will occupy most of the main landmass on planet Xygiton 5
21:40:03 <ais523> I think the sandbox history was actually perma-deleted after that incident
21:40:07 <ais523> rather than just moved to the archive table
21:42:03 <ais523> oh right, after that happened they added a limit where pages with more than 5000 revisions couldn't be deleted
21:42:25 <ais523> and someone tried to edit the main page 5000 times in order to make it undeletable (Wikipedians have a tendency to come up with "ingenious" workarounds like that)
21:42:33 <ais523> and then the main page actually was deleted because they'd miscounted
21:42:39 <ais523> and the devs got really really angry
21:43:14 <ais523> pointing out how much server load it would be to spam 5000 edits into the main page of every Wikimedia wiki in every language
21:44:12 <Deewiant> elliott: So have you stopped using partial functions
21:44:32 <elliott> I usually avoid partial functions, and always have
21:44:41 <oerjan> Deewiant: yeah he's concentrating on beating his girlfriend now
21:45:04 <elliott> Deewiant: Why would I do that
21:45:47 <Deewiant> fromMaybe (error "b is zero") (a `tryDiv` b)
21:45:58 <Deewiant> Just musing based on that article in /r/haskell
21:46:13 <elliott> Deewiant: Right, I don't think anyone doesn't use partial functions, and I don't know why you think I would :P
21:46:20 <elliott> Things like head are pretty egregious; div isn't
21:46:25 <Deewiant> I just saw your comments so I figured I'd ask
21:46:32 <Deewiant> What about things like head, then?
21:46:51 <elliott> Well, head's dubious enough that any use of it should probably have an explanatory error message
21:47:02 <elliott> Something like div is benign
21:47:20 <elliott> Although if we got a Nat1 where (0 :: Nat1) was a compile time failure, I'd be all for div :: (Integral a) => a -> Nat1 -> a
21:47:26 <ais523> head /etc/passwd -n 1 || echo "there are no users help"
21:47:29 <elliott> Deewiant: When do you use head
21:47:33 <Deewiant> readOct' = fst . head . readOct
21:47:34 <ais523> actually, I've got the args backwards there, right?
21:47:41 <ais523> head -n 1 /etc/passwd || echo "there are no users help2
21:47:47 <elliott> Deewiant: Here's what I normally do for read:
21:48:12 <elliott> Deewiant: case reads str of [(n,"")] -> n; _ -> failSomehow
21:48:16 <elliott> Deewiant: I take it this is in your UI
21:48:26 <elliott> In which case you should probably do the general "print error, display usage" thing
21:48:29 <elliott> It doesn't matter for quick hacks obviously
21:48:36 <Deewiant> It's used after parsing octal digits with trifecta
21:48:48 <elliott> Deewiant: Then why do you need to turn it into a string
21:48:52 <elliott> You can construct a parser that reads octal
21:48:59 <Deewiant> I need to turn it into a number
21:49:20 <elliott> Deewiant: To parse octal: Read octal digit, read octal number, combine the two appropriately.
21:49:34 <Deewiant> And "combine the two appropriately" is implemented in Numeric.readOct
21:49:52 <elliott> Deewiant: No, combining the two is as simple as
21:50:37 <elliott> Unless your octal is backwards
21:50:52 <elliott> Right, you have to do it backwards
21:51:07 <elliott> Deewiant: But anyway, just write your own as a Parser :P
21:51:10 <elliott> Or don't, but that's what I'd do
21:51:21 <Deewiant> It is a Parser, it just uses readOct
21:51:29 <oerjan> that is a rather silly thing to roll your own though...
21:51:29 <Deewiant> Instead of a hand-written foldl
21:51:36 <elliott> Deewiant: It wouldn't be a foldl
21:51:48 <elliott> Deewiant: Don't read many octal digits and then combine them
21:52:12 <lambdabot> Text.Parsec.Combinator chainl :: Stream s m t => ParsecT s u m a -> ParsecT s u m (a -> a -> a) -> a -> ParsecT s u m a
21:52:12 <lambdabot> Text.ParserCombinators.ReadP chainl :: ReadP a -> ReadP (a -> a -> a) -> a -> ReadP a
21:52:12 <lambdabot> Text.ParserCombinators.Parsec.Combinator chainl :: Stream s m t => ParsecT s u m a -> ParsecT s u m (a -> a -> a) -> a -> ParsecT s u m a
21:52:44 <lambdabot> Text.Parsec.Combinator chainl1 :: Stream s m t => ParsecT s u m a -> ParsecT s u m (a -> a -> a) -> ParsecT s u m a
21:52:44 <lambdabot> Text.ParserCombinators.ReadP chainl1 :: ReadP a -> ReadP (a -> a -> a) -> ReadP a
21:52:44 <lambdabot> Text.ParserCombinators.Parsec.Combinator chainl1 :: Stream s m t => ParsecT s u m a -> ParsecT s u m (a -> a -> a) -> ParsecT s u m a
21:52:47 <Deewiant> How is that different from a foldl :-P
21:53:24 <elliott> Deewiant: Because you avoid the partiality?
21:53:26 <Deewiant> Anyway it's not appropriate in this particular case as I know exactly how many characters I've got
21:53:38 <elliott> Deewiant: And it also uses less memory, presumably
21:53:43 <elliott> Because many has to keep them all in memory
21:54:24 <Deewiant> At this point I was comparing foldl to chainl, not readOct
21:54:31 <Deewiant> With a foldl it wouldn't be partial
21:55:46 <ais523> Phantom_Hoover: there was a time when I wasn't?
21:55:59 <ais523> perhaps there was, but I don't really remember it well
21:56:20 <Phantom_Hoover> ais523, well, I mean, did you never sing Happy Birthday at parties?
21:56:58 <ais523> Phantom_Hoover: it was a while before I discovered that that was illegal, and I'm still not sure on the matter
21:57:20 <ais523> actually, we used to sing it to the tune of "good morning to you", because that's what was in the book of piano tunes we bought
21:57:24 <ais523> (it differs by one note)
21:57:30 <Deewiant> elliott: So it doesn't seem like chainl could help me here, and writing the foldl probably wouldn't simplify this any
21:57:45 <elliott> Deewiant: Oh well, sucks to be you then
21:58:31 <Deewiant> I can see you're interested :-)
21:59:21 <ais523> Phantom_Hoover: it does, because IIRC Happy Birthday To You was a modification of Good Morning To You in the first place
21:59:44 <elliott> oerjan: How does (forever $ a `catch` b) parse
21:59:50 <elliott> Deewiant: I am, but you haven't given sufficient details
22:00:25 <lambdabot> The operator `System.IO.Error.catch' [infixl 9] of a section
22:00:45 <oerjan> as forever (catch a b), i'd assume
22:01:10 <Deewiant> elliott: a <- octDigit; b <- optional octDigit; c <- optional octDigit; return (plzCombine a b c)
22:01:25 <elliott> Deewiant: Dude, just unroll it
22:01:42 <elliott> Deewiant: (a*16 + b*8 + c)
22:02:05 <Deewiant> I don't like magic numbers :-P
22:02:11 <oerjan> elliott: technically, it has to be that or be a parse error (if there were an infixl? 0 `catch`)
22:03:45 <elliott> forever $ B.hGetLine h >>= writeChan lineChan `catch` ignoreEOFError
22:04:15 <oerjan> forever (B.hGetLine h >>= (writeChan lineChan `catch` ignoreEOFError))
22:04:20 <elliott> oerjan: darn, you're right :(
22:04:59 <oerjan> `catch` presumably has no fixity defined, so defaults to infixl 9
22:05:01 <HackEgo> /home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: catch`: not found
22:05:35 <oerjan> it is not _that_ common to define fixities of alphanumerics
22:05:45 <elliott> oerjan: well sure, but `catch` is common :P
22:05:54 <elliott> Ooh, I can avoid it if I do forever . handle ignoreEOFError.
22:06:00 <elliott> I don't even want to ignore it
22:06:04 <oerjan> the division operators excepted
22:06:20 -!- Timwi has joined.
22:06:31 <elliott> hmm, is there really no simpler way of doing myThreadId >>= killThread...
22:07:09 <shachaf> elliott: Call the continuation!
22:07:23 <elliott> shachaf: THX SUPER HELPFUL :P
22:07:31 <shachaf> Wait, can't you just throw an exception?
22:07:40 <oerjan> elliott: what about simply not using catch at all? :P
22:08:06 <oerjan> doesn't that kill the thread
22:08:18 <elliott> shachaf: Well yes but that's awful too.
22:08:22 <elliott> oerjan: Yeah, but it prints an ugly error message.
22:08:26 <elliott> I guess I'll just define my own loop structure.
22:08:34 <elliott> (forever $ (B.hGetLine h >>= writeChan lineChan)) `catch` ignoreEOFError
22:08:44 * shachaf isn't even sure what elliott was trying to do.
22:09:03 <elliott> shachaf: Quit the thread silently on EOF.
22:09:11 <elliott> handle ignoreEOFError . forever $ B.hGetLine h >>= writeChan lineChan
22:11:16 <elliott> shachaf: oerjan: OK, you have to admire this GHC error for me.
22:11:19 <lambdabot> forall (m :: * -> *) a b. (Monad m) => m a -> m b
22:11:25 <elliott> forever $ readChan lineChan >>= B8.putStrLn
22:11:29 <elliott> /home/elliott/Code/mergeln/mergeln.hs:19:3:
22:11:29 <elliott> Warning: A do-notation statement discarded a result of type GHC.Prim.Any.
22:11:29 <elliott> Suppress this warning by saying "_ <- ($)
22:11:29 <elliott> forever (>>=) readChan lineChan B8.putStrLn",
22:11:29 <elliott> or by using the flag -fno-warn-unused-do-bind
22:11:34 <elliott> oerjan: shachaf: I just...
22:11:38 <elliott> I am literally speechless.
22:11:44 <shachaf> elliott: Ooh, give it to #haskell
22:11:53 <shachaf> They were just talking about it.
22:12:28 <coppro> elliott: is this even in a do block?
22:13:07 <shachaf> elliott: Well, it might not've been "just"
22:13:21 <oerjan> elliott: hm it's because the forever result defaults to Any rather than (), presumably
22:15:03 <oerjan> but logically, Any should be just as discardable
22:15:21 <elliott> oerjan: apparently it's probably a bug
22:15:50 <oerjan> no it's how it works when you default a type variable with no class restriction
22:16:00 <elliott> oerjan: no, I mean the warning
22:17:04 <oerjan> well it would make sense to do something else, naturally.
22:17:54 -!- augur has quit (Remote host closed the connection).
22:21:34 <oerjan> i vaguely recall forever used to have a stricter type, then we noticed it didn't need one
22:22:46 <oerjan> although i guess if you are warning against discarding non-()'s in do, then it would make sense to restrict forever to have m () argument
22:23:06 <elliott> oerjan: I want forever :: IO () -> IO ()
22:23:38 <Deewiant> Some people want when :: Bool -> IO a -> IO ()
22:23:53 <lambdabot> forall (m :: * -> *). (Monad m) => Bool -> m () -> m ()
22:24:00 <elliott> Deewiant: Some people are wrong
22:24:17 -!- Patashu has joined.
22:26:00 <Deewiant> Some kind of whenFoo :: Bool -> IO a -> IO (Maybe a) might be nice
22:27:34 <elliott> Timwi: You writing half my program drove me to actually bother writing mine, so thanks I guess :P
22:28:48 <elliott> Timwi: You wrote half that line-merging program in C#
22:29:15 <Timwi> Well, no need to thank since you didn’t use any of it :-p
22:29:46 <elliott> I don't know what the Haskell<->C# bridges are like.
22:29:48 -!- PatashuXantheres has joined.
22:33:08 -!- Patashu has quit (Ping timeout: 260 seconds).
22:38:18 -!- nooga has quit (Ping timeout: 244 seconds).
22:38:30 -!- ive has joined.
22:44:41 <elliott> ?pl if isEOFError e then return () else throwIO e
22:44:42 <lambdabot> expecting variable, "(", operator or "else"
22:44:52 <elliott> ?pl unless (isEOFError e) (throwIO e)
22:44:59 <elliott> ?pl \e -> unless (isEOFError e) (throwIO e)
22:45:05 <elliott> Deewiant: Should I should I should I
22:45:13 <elliott> As opposed to using guards :-P
22:47:16 <Deewiant> liftM2 unless reads a bit strangely IMO :-P
22:47:43 <elliott> Deewiant: I would use the Applicative operators
22:47:58 <elliott> unless <$> isEOFError <*> throwIO
22:49:03 <Deewiant> Yeah, I thought about that but honestly I might also just leave it pointed
22:49:17 <elliott> Deewiant: Yeah, this is just distracting me from my Weird Bug :P
22:49:30 <elliott> Deewiant: A conditional + return () just made me think.
22:49:40 <Deewiant> Also, in general I don't like "unless" but that seems like an appropriate case
22:52:17 -!- ais523 has quit (Remote host closed the connection).
22:53:39 -!- pikhq_ has joined.
22:53:57 -!- pikhq has quit (Ping timeout: 255 seconds).
22:55:30 <zzo38> The <*> operation in Haskell does not seem to me entirely useful for most purposes, as far as I can tell.
22:56:21 <zzo38> But it can be used defining other things in terms of that, I suppose, including <* and *> are automatically figured out from that, I think
22:56:39 <oerjan> zzo38: it is most useful when chained as f <$> m1 <*> m2 <*> ...
22:57:13 <zzo38> OK. I have never used it like that.
22:57:20 <oerjan> it then replaces all the liftA* functions, including for sizes not predefined
22:57:22 <elliott> zzo38: it lets you lift a function of arbitrary arity into the monad
22:57:45 <elliott> MyData <$> subpart <*> anothersubpart <*> anothersubpart
22:57:54 <zzo38> And any monad forms an applicative, so that it can work; OK
22:58:21 <zzo38> elliott: O, that is its use. I have just used liftM2 a lot
22:58:36 <elliott> zzo38: Yeah, I prefer the applicative operators, since you need fewer parens, and you don't have to specify the arity upfront
22:58:39 <Deewiant> liftM2 = liftA2; liftA2 f x y = f <$> x <*> y
22:59:46 <zzo38> OK, I suppose you are correct and that is a use. I didn't know that before.
23:00:33 <zzo38> But I have written parsers in Haskell, using Parsec, and I have just used liftM2, sometimes liftM3, and often using *> and <* and <|> and <$>
23:04:40 <zzo38> And <$ is also useful
23:05:13 -!- sllide has quit (Ping timeout: 260 seconds).
23:11:23 <oerjan> zzo38: oh, <*> can also be useful directly if you have a prefix operator which you want to parse as a constructor applied to its argument. and we once found a use for <**> for parsing a similar postfix operator for an esolang
23:11:48 <elliott> oerjan: hmm, I don't understand what you mean there
23:12:47 <oerjan> well say you have a Negate constructor, then you can parse as (char '-' *> Negate) <*> expr
23:12:48 <zzo38> oerjan: Can you give the specific example of that use of the <*> operator?
23:13:43 <zzo38> oerjan: O, like that. Do you mean: (Negate <$ char '-') <*> expr since the arguments to *> must be the same applicatives
23:15:24 <oerjan> and the <**> example we had was something like ... <**> ((negate <$ char '-') <|> id)
23:15:46 <oerjan> where - was postfix and the result of the calculation was evaluated
23:17:38 <lambdabot> Text.Parsec.Combinator option :: Stream s m t => a -> ParsecT s u m a -> ParsecT s u m a
23:17:39 <lambdabot> Text.ParserCombinators.ReadP option :: a -> ReadP a -> ReadP a
23:18:26 <oerjan> perhaps option id (negate <$ char '-') would have been better
23:20:38 <zzo38> oerjan: Yes that might be it
23:28:37 <Phantom_Hoover> Have I ever mentioned how confusing it is that the Bank of Scotland and the Royal Bank of Scotland are completely separate entities?
23:36:52 -!- derdon has quit (Remote host closed the connection).
23:42:08 <elliott> oerjan: You should debug my code.
23:43:51 <oerjan> there's that word, "should".
23:44:22 <oerjan> enslaving civilizations.
23:45:43 <Phantom_Hoover> elliott, I would debug your code if I didn't have this disability preventing me from doing any kind of useful work.
23:46:01 <elliott> Phantom_Hoover: It's called being a teenager HAHAHAHAHAHAHA
23:47:42 <oerjan> darn, i'm still a teenager?
23:49:22 <oerjan> going on thirtytwoteen...
23:49:52 <elliott> oerjan: You're really old, man.
23:50:33 <oerjan> ykgomlbihywmcaidttacrt
23:51:07 <Phantom_Hoover> I'll translate, I know a little more of the ways of the old than you.
23:51:11 <oerjan> you kids get off my lawn before i hit you with my cane and i don't think that anyone can read this.
23:51:48 <oerjan> ...i suppose i should have given you a chance.
23:52:09 <oerjan> but there's that word again.