←2011-10-16 2011-10-17 2011-10-18→ ↑2011 ↑all
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:55 <zzo38> Why?
00:48:56 <pikhq_> 飲み放題. That means "all you can drink".
00:49:00 <pikhq_> This is a thing.
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:54:15 <oerjan> hm
00:54:20 <oerjan> food ->
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:27:53 <CakeProphet> > letters
02:27:54 <lambdabot> Not in scope: `letters'
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:32:52 <lambdabot> "Gertb vf npghnyyl Rbtre G."
02:32:59 <CakeProphet> oh...
02:33:00 <CakeProphet> right
02:33:05 <CakeProphet> not capital letters.
02:33:34 <CakeProphet> :t lookupWithDefault
02:33:35 <lambdabot> Not in scope: `lookupWithDefault'
02:33:39 <CakeProphet> @hoogle lookup
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:57 <CakeProphet> @hoogle a -> b -> [(a,b)] -> Maybe b
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 <CakeProphet> @hoogle a -> b -> [(a,b)] -> 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:06 <CakeProphet> er, no.
02:34:14 <CakeProphet> @hoogle b -> a -> [(a,b)] -> b
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:24 <CakeProphet> there's no lookup with default??
02:34:48 <CakeProphet> @hoogle b -> a -> Map a b -> b
02:34:49 <CakeProphet> lambdabot hates me.
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:34:54 <CakeProphet> ah okay.
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:35:32 <lambdabot> "Ynjym."
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:41:03 <lambdabot> "Tertbe vf npghnyyl Ebtre T."
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:20 <CakeProphet> ah
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:06:04 <CakeProphet> HI GAIZ
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:17:09 <hagb4rd> ..of the partition
04:32:17 <CakeProphet> analyze in what way?
04:32:52 <CakeProphet> I know Ubuntu has something called "disk usage analyzer" the creates a chart of disk usage per directory/file.
04:32:55 <CakeProphet> but they may not be useful for what you
04:32:59 <CakeProphet> 're wanting to do.
04:33:25 <CakeProphet> hagb4rd: ^^^
04:34:16 <CakeProphet> otherwise, if you're searching for important shit. find is a good command line tool for doing such.
04:34:19 <hagb4rd> yes exactly thank you
04:34:56 <CakeProphet> https://help.ubuntu.com/community/Baobab
04:34:58 <hagb4rd> i will give it a try
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:26 <CakeProphet> +on
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:56 <CakeProphet> oh wait nevermind.
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:15 <CakeProphet> hmmmm
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:03 <CakeProphet> or...... I have no idea.
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:22 <fizzie> Which regex is that?
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:38:53 <CakeProphet> where $encoding is a command line option.
06:38:58 <CakeProphet> that defaults to utf8
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:39:45 <CakeProphet> why $\
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:42:31 <CakeProphet> well manx for example doesn't have those
06:42:34 <CakeProphet> but still shows up as empty
06:43:07 -!- Ngevd has joined.
06:43:28 <Ngevd> Hello!
06:43:32 <CakeProphet> hey
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:45:58 <CakeProphet> I can't actually read hexdumps very well.
06:46:05 <CakeProphet> maybe I should figure them out
06:46:09 <CakeProphet> or maybe you just use weird formats
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:50:13 <fizzie> is not utf8
06:50:13 <fizzie> no match
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:06 <CakeProphet> uh what's some good hexdump options
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:25 <CakeProphet> yes I did that before.
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:01:33 <CakeProphet> fizzie: I'll sprunge an output file soon.
07:01:47 <CakeProphet> and code would probably help.
07:02:40 <CakeProphet> http://sprunge.us/DHBZ
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:02 <CakeProphet> fizzie: with echo?
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:06:29 <CakeProphet> ah... yes.
07:06:56 <CakeProphet> it's taking much longer than usual
07:06:59 <CakeProphet> perhaps the hexdumps?
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:37 <fizzie> No, three.
07:07:39 <fizzie> No, two.
07:07:47 <CakeProphet> lol
07:07:56 <fizzie> A shell and the hexdump; the echo is probably a builtin.
07:08:12 <CakeProphet> yes it is
07:08:25 * CakeProphet is master of efficient perl coding.
07:09:36 <fizzie> Well, I ran it locally with | head.
07:09:45 <fizzie> On 'finnish'.
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:11 <CakeProphet> ...I'll do it your way.
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:44 <CakeProphet> ......................
07:10:45 <CakeProphet> of course.
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:11:16 <CakeProphet> fffwoiejriowehriuhweiufhw4ituhwiuethwef
07:11:46 <CakeProphet> I could split /[\n\t]/ or something
07:11:53 <fizzie> That, or chomp it.
07:11:58 <CakeProphet> ah yes chomp
07:12:04 <fizzie> I tend to use it because of the name.
07:12:09 <CakeProphet> yes very satisfying
07:12:49 -!- nooga has joined.
07:14:04 <CakeProphet> okay let's try this again.
07:15:38 <CakeProphet> well the scripts appear to be using memory.
07:15:40 <CakeProphet> so that's good.
07:17:40 -!- ive has joined.
07:18:31 <fizzie> Yes, that'll teach those RAM chips who's the boss here.
07:25:13 <CakeProphet> sweet that worked.
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:38:56 <CakeProphet> !perl -e '%t = (1,2); print %{"%::t"};'
07:39:08 <CakeProphet> `run perl -e '%t = (1,2); print %{"%::t"};'
07:39:19 <HackEgo> No output.
07:39:46 <CakeProphet> `run perl -e '$t = {1,2}; print ${"$::t"};'
07:39:51 <HackEgo> No output.
07:39:53 <CakeProphet> hmmm
07:39:56 <CakeProphet> `run perl -e '$t = {1,2}; print ${"$t"};'
07:39:59 <HackEgo> No output.
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:03:30 <HackEgo> undef \ undef
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:05:01 <HackEgo> undef \ undef
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:07:50 <HackEgo> ​[ \ undef, \ undef \ ]
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:08:10 <HackEgo> undef \ undef
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:07 <HackEgo> ​( \ undef, \ undef \ )
08:10:11 <CakeProp1et> there we go.
08:10:56 <CakeProp1et> `run perl -e 'use Data::Dumper; $d = Data::Dumper->new([[$a,$b]], [qw(*_)]); $d->Terse(1); print $d->Dump;'
08:11:01 <HackEgo> ​( \ undef, \ undef \ )
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:27:53 <HackEgo> 0
08:28:04 <CakeProp1et> `run perl -e '$_="this-is-a-test"; s/-./-\u/g; print'
08:28:06 <HackEgo> this-s--est
08:28:29 <CakeProp1et> `run perl -e '$_="this-is-a-test"; s/-(.)/-\u$1/g; print'
08:28:31 <HackEgo> this-Is-A-Test
08:28:42 <CakeProp1et> `run perl -e '$_="this-is-a-test"; s/(^|-)(.)/\u$1/g; print'
08:28:45 <HackEgo> his-s--est
08:28:46 <CakeProp1et> `run perl -e '$_="this-is-a-test"; s/(^|-)(.)/\u$2/g; print'
08:28:49 <HackEgo> ThisIsATest
08:29:02 <CakeProp1et> beautiful.
08:29:48 <fizzie> `run perl -e '$_="this--is-a-test"; s/(^|-)(.)/\u$2/g; print'
08:29:50 <HackEgo> This-isATest
08:30:11 <CakeProp1et> fizzie: that's perfectly fine
08:30:45 -!- sebbu2 has joined.
08:31:13 <CakeProp1et> `run perl -e '$_="test"; s/(^|-)(.)/\u$2/g; print'
08:31:15 <HackEgo> Test
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:07 <CakeProp1et> fizzie: http://sprunge.us/bGCK
08:49:14 <CakeProp1et> this /should/ work... as far as I can tell.
08:49:34 <CakeProp1et> can't test it yet (need my external)
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:03:22 <CakeProp1et> still need to do some error handling..
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:24 <HackEgo> 2
09:23:45 <CakeProp1et> `run perl -e 'if (my $x = 2) { print $x } else { print $x} print $x'
09:23:48 <HackEgo> 2
09:38:01 -!- CakeProp1et has changed nick to CakeProphet.
09:48:20 <CakeProphet> http://sprunge.us/GThA
09:49:15 -!- ais523 has quit (Read error: Operation timed out).
09:49:53 -!- ais523 has joined.
10:26:29 <CakeProphet> fungot: make me a sammich
10:26:29 <fungot> CakeProphet:. i'm so kind, even to assholes! anmaster no not markov anmaster no not markov
10:26:48 <Phantom_Hoover> fungot, what's anmaster going to do with 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:29 <ais523> good to know
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 <lambdabot> Consider it noted.
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 <fizzie> ^style
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:13 <Phantom_Hoover> There are a lot of cycles in this mode.
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:31:09 <ais523> that's not surprising
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:36:40 <Phantom_Hoover> :D
10:37:03 <Phantom_Hoover> How many times did he say that?
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:37:47 <Phantom_Hoover> Oh, of course.
10:38:06 <fizzie> ^echo, the loopmaker.
10:47:40 <CakeProphet> fungot: oisosossgoisstoirtrreriteieoiey
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:48:48 <CakeProphet> including PMs
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:49:26 <CakeProphet> ...wow, flood? that's a weird word.
10:49:32 <CakeProphet> why have I noticed that.
10:49:34 <CakeProphet> flood.
10:49:43 <CakeProphet> *not noticed
10:52:24 <fizzie> BLOOD.
10:59:07 <ais523> `quote
10:59:10 <HackEgo> 607) <zzo38> I think Perl is a programming language too. [...]
10:59:20 <ais523> `quote
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:30 <ais523> `quote
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:41 <ais523> `quote
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:32 <ais523> ah, hmm
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:00:41 <ais523> ah, -06
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:48 <oerjan> lambdabot: boo!
11:27:58 <oerjan> huh
11:27:58 <lambdabot> oerjan: You have 1 new message. '/msg lambdabot @messages' to read it.
11:28:43 <oerjan> lambdabot: > 2 + 2
11:28:54 <oerjan> lambdabot: @run 2 + 2
11:28:55 <lambdabot> 4
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:26 <Phantom_Hoover> fungot, genocide!
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:19 <Phantom_Hoover> fungot, I wonder if that sword alone can stop.
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:48:21 <HackEgo> 42, sneaky
11:48:21 <fizzie> Perl <3
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:06:09 <Phantom_Hoover> Screenshots of WP pages can't be put on Commons.
12:07:06 <ais523> indeed
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:14 <ais523> yes, I think so
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:21:26 <ais523> yep
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:32 <ais523> indeed
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> results in
12:35:46 <fizzie> "al\\(bert\\|ex\\|ois\\)\\|bummer"
12:35:46 <fizzie> (or
12:35:46 <fizzie> "\\(?:al\\(?:bert\\|ex\\|ois\\)\\|bummer\\)"
12:35:47 <fizzie> in Emacs 23)."
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:24:00 <oerjan> *the first
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:14 <oerjan> wait what
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:33:48 <Phantom_Hoover> Alpha doesn't do moments of inertia.
13:33:50 <Phantom_Hoover> What is this crap.
13:36:59 <oerjan> http://en.wikipedia.org/wiki/List_of_moments_of_inertia
13:38:20 <oerjan> probably m*r^2/2
13:38:48 <fizzie> Each flywheel has a radius of 4.5 metres.
13:39:40 <oerjan> this assumes uniform thickness, i think
13:39:53 <fizzie> Sadly, it is not.
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:23 <HackEgo> 94921875
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:19 <oerjan> oh hm
13:47:24 <oerjan> `frink 1/2 * 13500000 kg m^2 * (225 / min)^2 -> joule
13:47:32 <HackEgo> 94921875
13:47:42 <oerjan> was just a capitalization error
13:49:11 <Phantom_Hoover> So it's 9.5 MJ of spinning.
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:49:43 <Phantom_Hoover> SHUT UP OERJAN
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:01 <elliott> ais523_: oh dear
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:05 <elliott> Deewiant: Me
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:30 <elliott> Deewiant: "All constants"
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:33 <elliott> Deewiant: f x = f x
15:22:34 <elliott> Pure function
15:22:36 <elliott> ais523_: Yes
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:44 <Deewiant> To whatever degree possible
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:29 <Deewiant> Well, 9 of them
15:26:32 <Deewiant> Er, 8
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:16 <elliott> ais523: I STILL WANT THIS
15:35:23 <elliott> even if that sentence uh
15:35:25 <elliott> doesn't make much sense
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:14 <ais523> indeed
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:31 <ais523> ah, right
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:38:41 <lambdabot> Unknown command, try @list
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 <Vorpal> ^style
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 <Vorpal> fungot?
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:06 <Vorpal> what?
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 <Vorpal> ^style fungot
15:41:20 <fungot> Selected style: fungot (What I've said myself)
15:41:23 <Vorpal> aha
15:41:24 <elliott> "...out of time!" :D
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:42:53 <elliott> Deewiant: 10 ~ 29
15:42:55 <elliott> Vorpal: I said that?
15:43:06 <Deewiant> For large values of 10
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:43:38 <Deewiant> Forsooth
15:44:31 <elliott> Deewiant: Or middling values of both
15:44:44 <Deewiant> Nah, middling won't cut it
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:07 <Deewiant> I never said "both"
15:48:32 <elliott> <Deewiant> Those are still a large value of ten and a small value of 29 respectively
15:48:33 <elliott> But fine :P
16:13:57 -!- Ngevd has joined.
16:16:33 <Ngevd> Hello!
16:17:40 <elliott> helo
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:37:03 <Ngevd> Crazy
16:38:13 <Deewiant> Should be linked on the wiki
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:41:10 <elliott> Snap
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:46:15 <Gregor> Ngevd "Ngevd" Ngevd
16:46:28 <Ngevd> Dr Ngevd
16:48:27 -!- derdon has joined.
16:49:00 <Ngevd> Lasagne time!
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:06:36 <Ngevd> Hello!
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:07 <ais523> hi everyone
17:25:15 <elliott> hi
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:45 <elliott> yes
17:25:47 <ais523> I wouldn't have been surprised if it was Red Hat or someone
17:25:49 <ais523> but ICANN?
17:25:51 <elliott> neat
17:26:04 <elliott> They're, like, names.
17:26:08 <elliott> For timezones.
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:32:52 <elliott> ais523: not the authors
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:34:36 <elliott> no
17:34:43 <elliott> (to zzo38)
17:35:00 <Ngevd> ais523, yes
17:35:03 <zzo38> Apparently they heard it on the radio.
17:35:05 <Ngevd> Exceedingly
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:36:59 <zzo38> Yes, like that.
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:02 <elliott> yes it does, zlib :-)
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:40 <Vorpal> heh
17:38:46 <elliott> Gregor: Better question, why are you...
17:38:50 <Gregor> elliott: Giggles?
17:38:58 <elliott> Gregor: If you're into that, I guess.
17:39:09 <Vorpal> solaris is so weird
17:39:12 <Vorpal> like really weird
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:39:56 <Gregor> Deewiant: lolwut
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:39 <Gregor> lulz.
17:40:40 <Vorpal> " The zlib-flate program standard from input"
17:40:41 <Vorpal> what
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:03 <ais523> elliott: well, yes
17:42:03 <Vorpal> that makes zero sense
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:19 <Vorpal> ais523: huh
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:04 <Vorpal> it did? Didn't notice
17:43:09 <Vorpal> you mean the tzdata package?
17:43:15 <elliott> Vorpal: yes
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:43:55 <ais523> if a nonstandard one
17:43:57 <Vorpal> actually no
17:44:04 <Vorpal> it could be a dynamically loadable format
17:44:09 <Vorpal> what about zfs library?
17:44:14 <Vorpal> (not a lot of sense)
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:45:48 <Gregor> elliott: STUPID STUFF
17:45:57 <elliott> Gregor: Suspicious eye.
17:45:59 <elliott> s.
17:46:00 <elliott> ing.
17:46:23 <Vorpal> Gregor: you use a fork of an oracle product inside a virtual machine that is an oracle product?
17:46:36 <Gregor> Vorpal: Apparently.
17:46:43 <elliott> Vorpal: A fork of a dead project :P
17:46:46 <Vorpal> elliott: well yes
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:08 <Vorpal> Gregor: shims?
17:47:13 <Vorpal> maloader?
17:47:26 <elliott> Gregor: maloader?
17:47:41 <Gregor> https://github.com/shinh/maloader
17:47:54 <elliott> Gregor: Yaaay shinh
17:47:56 <Vorpal> nice
17:48:19 <elliott> EVERYONE LOVES SHINH
17:48:40 <Vorpal> but Mach-O loader won't actually let you run OS X executables, because of libraries.
17:49:05 <ais523> `quote
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:18 <ais523> also, like INTERCAL
17:49:19 <elliott> `quote
17:49:19 <elliott> `quote
17:49:20 <elliott> `quote
17:49:20 <elliott> `quote
17:49:21 <elliott> `quote
17:49:25 <elliott> Massacre time.
17:49:26 <ais523> quotestripe!
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:47 <elliott> That was two, HackEgo.
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:27 <ais523> elliott: 697
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:43 <Vorpal> Gregor: well yeah
17:50:44 <ais523> also, 436 is truncated, although potentially interesting
17:50:53 <elliott> `run quote 436 | paste
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:15 <elliott> `delquote 436
17:51:17 <HackEgo> ​*poof*
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:29 <elliott> `quote
17:51:29 <elliott> `quote
17:51:30 <elliott> `quote
17:51:30 <elliott> `quote
17:51:30 <elliott> `quote
17:51:37 <ais523> gah, my browser doesn't know how to open 23600 files
17:51:41 <Gregor> Vorpal: Hence "shims"
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:44 <Vorpal> Gregor: yeah
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:15 <elliott> `quote 95
17:52:17 <HackEgo> 95) Note that quote number 124 is not actually true.
17:52:24 <elliott> `quote 124
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:52:41 <elliott> ais523: it referred to 94
17:52:45 <elliott> i'll leave 95
17:52:50 <elliott> `delquote 94
17:52:52 <HackEgo> ​*poof*
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:22 <Ngevd> `quote 124
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:53:46 <ais523> it was funny once?
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:40 <elliott> `quote
17:54:41 <elliott> `quote
17:54:41 <elliott> `quote
17:54:41 <elliott> `quote
17:54:42 <elliott> `quote
17:54:42 <Ngevd> Mostly miss
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:22 <elliott> `delquote 12
17:55:24 <HackEgo> ​*poof*
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:34 <elliott> `pastequotes
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:56:54 <Gregor> elliott: THEN DO IT
17:57:02 <elliott> Gregor: DO YOU EVEN REMEMBER WHAT THAT ONE WAS
17:57:10 <Gregor> Nope
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:25 <tswett> elliott: SQL.
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:04 <elliott> Well.
17:58:09 <elliott> Hmm
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:29 <elliott> ANYWAY
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:19 <elliott> s/ht/th/
18:00:21 <Gregor> elliott: Sounds feasible to me *shrugs*
18:00:26 <Vorpal> where else do you find ACID?
18:00:34 <elliott> Vorpal: STM
18:00:38 <tswett> elliott: you know. The yellow one that pushes things with its trunk.
18:00:43 <elliott> Anything transactional :P
18:00:50 <tswett> Doug Cutting's son's toy elephant.
18:00:52 <tswett> Hadoop.
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:25 <elliott> Vorpal: It's not ACIDP.
18:01:30 <elliott> Acid pee sounds awful.
18:01:32 <elliott> It's ACID.
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:01:56 <elliott> Vorpal: Not really.
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:09 <Vorpal> Gregor: nice
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:30 <Vorpal> Gregor: :P
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:02:55 <elliott> Because locks are awful.
18:03:09 <tswett> Oh.
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:03 * tswett coughs.
18:05:26 <elliott> You use a Verilog CPU?
18:05:35 <tswett> Yep. It really, really sucks.
18:05:47 <Vorpal> yeah VHDL is way better.
18:05:51 <Vorpal> (not really)
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:00 <elliott> Wow. Really???
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:10:34 <tswett> Ah... right.
18:10:47 <tswett> elliott: what is @?
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:24 <tswett> Thank you.
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:31 <elliott> tswett: Pet rocks.
18:14:33 <Vorpal> elliott: I'm complaining about the scope of the project I guess
18:14:38 <tswett> elliott: good.
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:20:32 <elliott> prev(n) sounds harder.
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:21:52 <elliott> Right.
18:22:19 <elliott> next(n) = n + fib(fibno(n) - 1), where fib and fibno are closed-form.
18:22:25 <elliott> That sounds pretty fast.
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:23:43 <elliott> erm
18:23:43 <elliott> tswett::
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:24 <tswett> elliott: I think so.
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:36 <elliott> Magic.
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:49 <Ngevd> a = phi
18:25:52 <Ngevd> b = -1/phi
18:25:56 <elliott> http://www4c.wolframalpha.com/Calculate/MSP/MSP212719heh519ig49ig8300006a4he3dhfchf7h85?MSPStoreType=image/gif&s=33&w=240&h=190&cdf=Rotation
18:25:57 <elliott> Funky.
18:26:08 <Vorpal> nice
18:26:13 <elliott> tswett: I wonder if Mathematica could handle it.
18:26:33 <Vorpal> probably
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:16 <elliott> Maybe.
18:27:19 <elliott> Hmm, no.
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:46 <elliott> Sigh.
18:27:49 <Phantom_Hoover> Wolfie!
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:08 <elliott> :p
18:28:09 <Phantom_Hoover> What are you idiots doing this time.
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:14 <elliott> Oh, wait.
18:30:15 <elliott> Has loops.
18:30:18 <elliott> Wow that's ugly.
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:01 <tswett> ...until.
18:31:08 <elliott> tswett: Oh, right.
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:09 <Phantom_Hoover> Oh, wait, no it's not.
18:32:14 <Phantom_Hoover> elliott, plotting fib.
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:23 <Phantom_Hoover> With n continuous, of course.
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:18 <tswett> Simple.
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:30 <tswett> You're.
18:34:30 <tswett> elliott: nothing.
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:47 <elliott> That seems simplest.
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:35:46 <lambdabot> 40585
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:37:05 <Ngevd> 1?
18:37:11 <tswett> Bravo.
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:11 <lambdabot> [9,0,9,9]
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:35 <lambdabot> Not in scope: `factorial'
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:39 <lambdabot> True
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:53 <lambdabot> mueval-core: Time limit exceeded
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:38:56 <elliott> Bah.
18:38:56 <lambdabot> True
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:12 <elliott> [0,1,2,145,40585
18:39:19 <elliott> I don't think I'll get another answer for a while.
18:39:31 <Deewiant> @oeis 1,2,145,40585
18:39:31 <lambdabot> Factorions: equal to the sum of the factorials of their digits in base 10.
18:39:32 <lambdabot> [1,2,145,40585]
18:39:41 <elliott> Heh.
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 <Deewiant> @oeis 1,153,370,371,407
18:39:52 <lambdabot> Fixed points for operation of repeatedly replacing a number by the sum of th...
18:39:53 <lambdabot> [0,1,153,370,371,407]
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:14 <Ngevd> No
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:24 <lambdabot> [0,1,1634,8208,9474]
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:49 <tswett> Sequence.
18:40:58 <elliott> @oeis bad numbers
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:03 <elliott> rip
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:41:10 <tswett> Actually.
18:42:01 <Ngevd> brb
18:42:04 <elliott> Jactually.
18:42:20 <tswett> I like that typo, I must say. It seems... jactual.
18:42:57 <coppro> '/win 7
18:43:19 <tswett> /win 7
18:44:13 <elliott> You win seven, you lose even.
18:44:23 <tswett> What's that supposed to mean?
18:44:30 <elliott> Who knows?
18:44:36 * elliott cracks knuckles and prepares to respond to this crazy reddit guy.
18:44:38 <tswett> I see.
18:44:45 * elliott doesn't actually crack knuckles, but does prepare.
18:44:51 <elliott> s/even/seven/
18:44:52 <elliott> tswett: Does that help?
18:44:55 <elliott> Except only the second even.
18:44:57 <tswett> Certainly.
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:23 <tswett> alwaysSucceeds.
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:31 <elliott> Yes.
18:48:39 <tswett> Sounds simple enough.
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:21 <Ngevd> Back
18:49:23 <elliott> check :: Bool -> STM a
18:49:23 <elliott> check b = if b then return undefined else retry
18:49:24 <elliott> #endif
18:49:30 <elliott> Seems to be redundant with the standard "guard" function.
18:49:30 <tswett> Awesome.
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:39 <Deewiant> Or hang on
18:51:40 <Deewiant> ?ty guard
18:51:41 <lambdabot> forall (m :: * -> *). (MonadPlus m) => Bool -> m ()
18:51:43 <Deewiant> Right, never mind
18:51:45 <elliott> Right.
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:51:55 <elliott> do {
18:52:00 <elliott> Just x <- readTVar foo;
18:52:01 <elliott> ...
18:52:01 <elliott> }
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:30 <tswett> Just switch to Coq.
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:53 <Deewiant> If they use fail
18:52:58 <elliott> Relatedly: Newbies ruined Haskell 98
18:53:00 <Deewiant> Yeah, damn newbies.
18:53:02 <Deewiant> Agreed
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:01 <elliott> Maybe it was map
18:54:05 <Deewiant> Maybe both :-)
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:22 <Deewiant> elliott: (++) was MonadPlus
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:54:54 <elliott> It would only make sense
18:55:18 <Deewiant> ?hoogle strict
18:55:18 <lambdabot> module Control.Monad.RWS.Strict
18:55:19 <lambdabot> module Control.Monad.ST.Strict
18:55:19 <lambdabot> module Control.Monad.State.Strict
18:55:21 <elliott> Deewiant: My favourite thing about 1.4 was all the standard monadic combinators were implemented with monad comprehensions
18:55:23 <Deewiant> ?ty strict
18:55:23 <lambdabot> Not in scope: `strict'
18:55:25 <elliott> strict?
18:55:29 <Deewiant> class Eval a where
18:55:29 <Deewiant> seq :: a -> b -> b
18:55:29 <Deewiant> strict :: (a -> b) -> a -> b
18:55:30 <Deewiant> strict f x = x `seq` f x
18:55:35 <elliott> Ah, yes.
18:55:40 <elliott> Deewiant: That's dollar sign exclamation mark.
18:55:56 <Deewiant> Ah, yes.
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:09 <Deewiant> ?index ($!)
18:56:09 <lambdabot> Prelude
18:56:31 <Deewiant> -- right-associating infix application operator (useful in continuation-
18:56:31 <Deewiant> -- passing style)
18:56:32 <Deewiant> ($) :: (a -> b) -> a -> b
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:56:53 <elliott> Deewiant: heh
18:56:59 <elliott> Deewiant: Well, it is :-P
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> data Double
18:57:30 <elliott> Aww, they should have tried to pseudo-enumerate it.
18:57:43 <elliott> The definitions
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:57:44 <elliott> -- dubious.
18:57:46 <elliott> Somewhat dubious indeed
18:58:00 <elliott> @let foo = [1,3..10]
18:58:01 <lambdabot> Defined.
18:58:10 <elliott> > (length foo, length (map (/10) foo))
18:58:12 <lambdabot> (5,6)
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:40 <Deewiant> And yeah, it sucks.
18:59:44 <Deewiant> Umm, probably not.
18:59:50 <elliott> Deewiant: Why not?
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:00:52 <Deewiant> (Also, -Werror?)
19:01:02 <Deewiant> That could work :-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:36 <Deewiant> Well, that's your problem :-P
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:39 <lambdabot> (5,6,6)
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:26 <elliott> Erm
19:09:27 <elliott> Right
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:39 <elliott> But that's obvious.
19:09:43 <tswett> Right.
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:20 <elliott> Gregor: SO FAST
19:10:31 <elliott> Gregor: Does it, like, sort with parallel mergesort?
19:10:40 <Gregor> HellifIno
19:10:45 <Gregor> I just know it depends on pthreads :P
19:10:48 <elliott> Gregor: It was a joke :P
19:10:54 <elliott> Gregor: I find it plausible that Solaris libc depends on pthreads
19:10:56 <Gregor> SO IS YOUR FACE
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:11:53 * tswett nods.
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:06 * tswett nods.
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:39 <elliott> Erm, not log-storage.
19:15:41 <elliott> But literally storing a log :P
19:15:54 <tswett> An *actual log*.
19:15:59 <elliott> Yes. Made out of wod.
19:15:59 <elliott> wood.
19:16:04 <tswett> Got it.
19:16:13 <elliott> Just like trees are made out of paper.
19:16:20 <tswett> Do they have wood over there?
19:16:28 <elliott> In England? No.
19:16:31 * tswett nods.
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:03 <Ngevd> And Russia
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:17:43 <elliott> tswett: Piles of paper.
19:17:49 <tswett> elliott: ah.
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:22:53 <elliott> Gregor: Holy shit...
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:24:47 <Deewiant> elliott: Where's that
19:25:08 <elliott> Deewiant: echo.c
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:29 <elliott> GOOOGLEEEE
19:25:31 <elliott> oh hmm
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:46 <elliott> it is
19:25:49 <elliott> Deewiant: http://cvs.opensolaris.org/source/raw/onnv/onnv-gate/usr/src/cmd/sh/echo.c
19:26:01 <Deewiant> Heh, nice
19:26:21 <ais523> what does prc_buff do anyway?
19:26:38 <elliott> I don't want to know
19:26:41 <ais523> there is an mbtowc call in there, anyway
19:26:44 <ais523> which is fun
19:27:18 <Gregor> I wurve Solaris :P
19:27:35 <Deewiant> ais523: http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/sh/print.c#208
19:27:51 <Deewiant> Writes to a buffer, evidently
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:32:47 <Deewiant> curses would have waddch
19:32:51 <elliott> oh, darn :(
19:33:00 <elliott> they just /look/ like curses names
19:33:01 <elliott> flushb too
19:33:10 <Deewiant> wrefresh
19:33:48 <elliott> Gregor: Curses echo: the best?
19:34:03 <Deewiant> echochar(3X)
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:34:40 <Deewiant> Yes
19:34:53 <elliott> yes
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:48:15 <elliott> oerjan: No: gc.garbage
19:48:19 <elliott> A list.
19:49:23 <Gregor> elliott: Uhh, it isn't.
19:49:31 <elliott> Gregor: It totally is.
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:50:55 <elliott> Gregor: Fair enough.
19:51:05 <Gregor> elliott: Actual process execution is faster.
19:51:09 <elliott> oerjan: gc.garbage¶
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:58:50 <Deewiant> ais523: Why not?
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:43 <Deewiant> That's a bit of a cop-out
20:06:47 <Deewiant> Let the users figure it out!
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:21 <elliott> ais523: why not?
20:08:28 <elliott> to the first one
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:11 <elliott> ais523: that's easy
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:12 <elliott> ais523: (in the limit)
20:10:14 <elliott> I think
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:48 <ais523> elliott: oh, ouch
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:02 <ais523> relevant, I guess?
20:11:06 <elliott> quintopia: eh?
20:11:10 <ais523> quintopia: why were you k-lined?
20:11:11 <elliott> ais523: rip raii
20:11:24 <quintopia> since i was k-lined. too busy to solve that problem until now.
20:11:53 <ais523> ah, no explanation?
20:11:54 <elliott> quintopia: why did it happen
20:11:58 <elliott> ais523: enjoy your spam
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:35 <ais523> I linked quotes?
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:13:52 <elliott> yep
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:12 <Ngevd> Antipattern?
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:15 <elliott> it doesn't handle n>8
20:16:18 <ais523> elliott: indeed
20:16:20 <elliott> oh, wait
20:16:24 <elliott> ouch, it does
20:16:29 <ais523> no it doesn't
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:39 <elliott> heh
20:16:43 <ais523> yep, 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:34 <Deewiant> Yeah, I know what that does
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:18:55 <Deewiant> Okay
20:18:57 <elliott> wait, nm
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:21 <elliott> ais523: oh
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:18 <Ngevd> Oh, okay
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:10 <oerjan> *gasp*
21:04:32 <Gregor> gelfload: The bestest.
21:04:50 <quintopia> :/
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:15:48 <elliott> (this is easy)
21:16:13 <ais523> elliott: are you capable of making /every/ false statement?
21:16:27 <elliott> yes, but not all of them
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:56 <elliott> ais523: IT'S A RIDDLE :P
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:18:11 <Phantom_Hoover> Yes.
21:18:16 <elliott> Phantom_Hoover: waht
21:19:24 <elliott> Phantom_Hoover: SOLV RIDLE
21:19:30 <elliott> It's trivial :P
21:19:31 <Phantom_Hoover> Candle.
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:27 <elliott> <elliott> (this is easy)
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:22:53 <Phantom_Hoover> elliott, what if I tell it two contradictory lies?
21:22:58 <elliott> olsner: no.
21:23:03 <olsner> damn.
21:23:04 <elliott> Phantom_Hoover: Then it dies.
21:23:10 <elliott> Phantom_Hoover: And you lose.
21:23:13 <elliott> As does humanity.
21:23:23 <ais523> Phantom_Hoover: what do gnomes often own in AceHack that they don't in vanilla?
21:23:49 <Phantom_Hoover> Candles.
21:24:06 <ais523> how did you guess?
21:24:29 <elliott> Phantom_Hoover: What's an obsolete method of producing light?
21:24:35 <Phantom_Hoover> Candles.
21:25:20 <elliott> Phantom_Hoover: wrong, torches
21:25:35 <ais523> elliott: what's an odd number?
21:25:44 <elliott> ais523: Candles.
21:25:50 <ais523> elliott: wrong, 5
21:26:11 <elliott> ais523: Wrong, 523>.
21:26:13 <elliott> Argh.
21:26:17 <elliott> ais523: Wrong, 523.
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:26:50 <Phantom_Hoover> Candle!
21:27:29 <elliott> no, candle_s_
21:27:42 <elliott> Phantom_Hoover: What did Mr. McCandless have none of?
21:28:01 <Phantom_Hoover> Whisky.
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:11 <elliott> ais523: candles
21:30:13 <Phantom_Hoover> elliott, what more does one need?
21:30:19 <ais523> this list is incomplete; you can help by expanding it
21:30:37 <elliott> :D
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:31:50 <Phantom_Hoover> oerjan, I have the best castle.
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 <ais523> yep
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:43 <elliott> right
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:35:58 <elliott> heh
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:31 <ais523> haha
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:37:51 <elliott> as punishment, I guess?
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:46 <elliott> ais523: haha
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:40:28 <oerjan> evil revisionists!
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:42:49 <oerjan> huffin' and puffin'
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:24 <elliott> Deewiant: When
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:44:53 <Deewiant> elliott: I mean completely
21:45:04 <elliott> Deewiant: Why would I do that
21:45:06 <elliott> "div" is pretty useful
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:45:58 <elliott> Deewiant: Do you do that
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:23 <Deewiant> D'oh, I'm a bad person then
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:44 <ais523> s/2/"/
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 <Deewiant> So it "shouldn't fail ever"
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:08 <elliott> Deewiant: And?d
21:49:10 <elliott> s/d//
21:49:20 <elliott> Deewiant: To parse octal: Read octal digit, read octal number, combine the two appropriately.
21:49:27 <elliott> :: Parser Integer
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:02 <elliott> d*8 + r
21:50:22 <Deewiant> d*8 + digitToInt r
21:50:29 <elliott> Um
21:50:30 <elliott> d is the digit here
21:50:37 <elliott> Unless your octal is backwards
21:50:45 <elliott> Oh err
21:50:52 <elliott> Right, you have to do it backwards
21:51:01 <elliott> That's left-recursive :(
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:32 <elliott> Deewiant: Gah
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:51:53 <elliott> Do it step-by-step
21:52:11 <oerjan> @hoogle chainl
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:18 <elliott> See
21:52:19 <elliott> Tada
21:52:43 <oerjan> @hoogle chainl1
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:31 <Deewiant> How is foldl partial?
21:53:37 <elliott> Deewiant: readOct is
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:32 <Phantom_Hoover> ais523, when did you start being slavishly legal?
21:55:46 <ais523> Phantom_Hoover: there was a time when I wasn't?
21:55:58 <elliott> Deewiant: Right
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:58:58 <Phantom_Hoover> ais523, I don't think that makes it legal?
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:24 <oerjan> > (0$0 `catch`)
22:00:25 <lambdabot> The operator `System.IO.Error.catch' [infixl 9] of a section
22:00:25 <lambdabot> must have...
22:00:45 <oerjan> as forever (catch a b), i'd assume
22:01:02 <elliott> oerjan: thanks
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:03 <elliott> Deewiant: Oh come on
22:03:10 <elliott> oerjan: Right
22:03:37 <elliott> oerjan: What about
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:22 * elliott parenthesises more
22:04:28 <elliott> :P
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:05:58 <elliott> oh, wait
22:06:00 <elliott> I don't even want to ignore it
22:06:01 <elliott> I want to kill the thread
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:07:51 <shachaf> throw ThreadKilled
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:29 <shachaf> kill -9 $$
22:08:30 <elliott> oh wait
22:08:34 <elliott> (forever $ (B.hGetLine h >>= writeChan lineChan)) `catch` ignoreEOFError
22:08:35 <elliott> that was easy
22:08:40 <elliott> and I can reduce parens
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:09:12 <elliott> Tada.
22:10:09 <oerjan> bewdiful
22:10:28 <elliott> oerjan: I SENSE SARCASM
22:11:16 <elliott> shachaf: oerjan: OK, you have to admire this GHC error for me.
22:11:18 <elliott> :t forever
22:11:19 <lambdabot> forall (m :: * -> *) a b. (Monad m) => m a -> m b
22:11:23 <coppro> wom 8
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:02 <oerjan> elliott: D:
22:12:28 <coppro> elliott: is this even in a do block?
22:12:41 <elliott> coppro: yes
22:12:49 <elliott> shachaf: They were?
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:14:34 <elliott> oerjan: yeah
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 <elliott> :t when
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:22 <Timwi> ?
22:28:24 <Timwi> I what?
22:28:48 <elliott> Timwi: You wrote half that line-merging program in C#
22:29:00 <Timwi> Oooh
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> (line 1, column 31):
22:44:42 <lambdabot> unexpected " "
22:44:42 <lambdabot> expecting variable, "(", operator or "else"
22:44:47 <elliott> >_<
22:44:52 <elliott> ?pl unless (isEOFError e) (throwIO e)
22:44:53 <lambdabot> unless (isEOFError e) (throwIO e)
22:44:59 <elliott> ?pl \e -> unless (isEOFError e) (throwIO e)
22:44:59 <lambdabot> liftM2 unless isEOFError throwIO
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:27 <elliott> well, the applicative :-)
22:57:29 <elliott> e.g.
22:57:33 <elliott> really useful in parsers:
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:06 <shachaf> Elliott'sData
22:58:20 <elliott> Yes, my data.
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:10 <oerjan> or similar
23:13:43 <zzo38> oerjan: O, like that. Do you mean: (Negate <$ char '-') <*> expr since the arguments to *> must be the same applicatives
23:13:55 <oerjan> oh, right
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:16:10 <elliott> pure id
23:16:22 <oerjan> ok
23:17:34 <oerjan> hm
23:17:38 <oerjan> @hoogle option
23:17:38 <lambdabot> Text.Html option :: Html -> Html
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:18:41 <elliott> yeah
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:29:01 <elliott> They are?
23:29:05 <Phantom_Hoover> Yep.
23:29:16 <elliott> Any common ancestry?
23:29:25 <Phantom_Hoover> Not AFAIK.
23:31:31 <Phantom_Hoover> Yeah, they're unrelated.
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:13 <elliott> oerjan: :D
23:45:15 <Phantom_Hoover> Enslivilisations.
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:48:37 <elliott> oerjan: Yep
23:49:22 <oerjan> going on thirtytwoteen...
23:49:35 <Phantom_Hoover> oerjan, no, you're a mathematician.
23:49:52 <elliott> oerjan: You're really old, man.
23:50:33 <oerjan> ykgomlbihywmcaidttacrt
23:50:40 <elliott> oerjan: wat
23:50:56 <Phantom_Hoover> It's oldspeak.
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:31 <Phantom_Hoover> Dammit oerjan.
23:51:48 <oerjan> ...i suppose i should have given you a chance.
23:52:09 <oerjan> but there's that word again.
23:52:59 <elliott> :D
←2011-10-16 2011-10-17 2011-10-18→ ↑2011 ↑all