←2011-09-01 2011-09-02 2011-09-03→ ↑2011 ↑all
00:04:52 -!- copumpkin has quit (Quit: Computer has gone to sleep.).
00:10:31 <Sgeo> Grrrr wget
00:10:38 * Sgeo wants wget to ignore robots.txt >.>
00:11:20 <oerjan> you wicked spammer
00:11:46 <zzo38> wget has a lot of options look to see if it has the one you want
00:12:12 * Sgeo found something online about it
00:12:21 <Sgeo> I don't see this version of wget's --wait thingy
00:19:25 <kmc> patch wget problem solved
00:19:54 <Sgeo> There is no problem
00:20:04 <Sgeo> I think --wait just wasn't listed in --help, or I didn't see it
00:20:31 <Sgeo> And there is an option to disable checking robots.txt
00:21:54 <mauke> -e robots=off
00:23:40 <Sgeo> Yes
00:23:54 * Sgeo is using it to great effect >.>
00:26:29 <zzo38> Is there an option to change the name of the file to check (other than robots.txt), or to change which entry it searches for in robots.txt?
00:26:59 -!- copumpkin has joined.
00:29:22 <Sgeo> I'm not sure what the use of that would be
00:29:39 <Sgeo> Or, um, the first option anyway
00:30:19 <Sgeo> It's pretty much a standard, if not an official one. About as useless to make an option to change as making a browser that sends RETRIEVE/SEND instead of GET/POST
00:31:16 <oerjan> more of that mustafar/dwarf fortress discussion http://www.irregularwebcomic.net/draakslair/viewtopic.php?t=6110
00:33:29 -!- Patashu has joined.
02:39:10 -!- myndzi\ has quit (Ping timeout: 240 seconds).
03:05:02 -!- nys has quit (Quit: f00f).
03:10:58 <CakeProphet> hello friends.
03:11:37 <zzo38> I looked in the haskell-src-exts files. The ParseSyntax.hs file (as well as many of the other files) do something, stuff added needs to be added in multiple places manually. For example, PExp needs to also define ann, amap, fmap, etc. But most of that is just the same way. It might seem (to me, at least) a better way using TH-splices generating more-declarations.
03:13:17 <zzo38> I don't know what it seems to you.
03:34:50 <zzo38> The code accumulation in Strathclyde Haskell Enhancement is a very crude idea with code accumulation feature, but it seems insufficient tome (it is also designed for layout mode). That one does not do ordering, removal of duplicates, cooperating with Template Haskell, and a bunch of other stuff.
03:35:40 <CakeProphet> anyone familiar with xpath?
03:35:53 <CakeProphet> I'm wondering if the | can be used to search for elements by multiple criteria
03:36:29 -!- CakeProphet has quit (Quit: Reconnecting).
03:36:46 -!- CakeProphet has joined.
03:36:47 -!- CakeProphet has quit (Changing host).
03:36:47 -!- CakeProphet has joined.
03:38:00 <CakeProphet> //a[@class=...|@href=...|@name=...|@id=...]
03:39:46 <zzo38> Why doesn't "hint" have a function for loading a module from a string instead of from a file?
03:41:06 -!- MDude has changed nick to MSleep.
03:41:25 <CakeProphet> zzo38: because it is really crappy.
03:41:48 <CakeProphet> for my IRC bot I worked around this by just writing the string to file and adding the module bits.
03:41:48 <zzo38> Then how to do it better?
03:41:55 <CakeProphet> mueval has that capability but mueval is also bad.
03:42:42 <zzo38> And you must also send expressions to be evaluated as strings, there is no command to interpret a Q Exp instead?
03:43:01 <zzo38> What program has that one?
03:43:37 <zzo38> Which are better programs?
03:47:45 <CakeProphet> I have no idea.
03:47:52 <CakeProphet> lambdabots code is not bad.
03:47:53 -!- augur has quit (Remote host closed the connection).
04:18:06 <zzo38> What kind of data can be compressed well with run length encoding multiple times? What kind of data should you run length encode and then use Huffman coding on the result?
04:19:11 -!- Patashu has quit (Ping timeout: 258 seconds).
04:31:50 <oerjan> multiple time run length encoding sounds unlikely to improve things
04:32:43 <oerjan> that's essentially look-and-say transformation, which quickly starts growing exponentially
04:33:35 <zzo38> Yes I know that is what it is. Doing it a lot will likely grow large.
04:34:20 <zzo38> But maybe some data works better doing RLE twice instead of once, or something like that. Maybe you want to combine multiple units into one unit or split units in some cases.
04:37:20 <oerjan> well in order for the second step to give any further compression, you'd want to collect character c in blocks of length c
04:38:42 <oerjan> or for the first block in a series, perhaps of length equal to the previous character
04:38:42 <zzo38> Yes, it is true; but, what if it is variant RLE where the character is implied? For example, you always alternate black and white so you do not need to indicate that
04:39:14 <oerjan> ah yes. but then the second step would be of a different kind.
04:39:29 <zzo38> Yes it would be different kind
04:39:53 <oerjan> since the RLE coding itself does not preserve that property
04:40:43 <oerjan> but yes, if you had frequently blocks of black and white that had the same length, then that would work
04:42:16 <zzo38> Maybe you have "001001001001001001001001" and you should do the encoding to (2,1) and 8(2,1) if such patterns are common in whatever data you are dealing with.
04:42:40 * CakeProphet is the best programmer in the world.
04:42:42 <CakeProphet> I know all of the codes.
04:42:58 <oerjan> hm
04:43:09 <zzo38> CakeProphet: Are you sure? I think nobody knows *all* of the codes
04:43:28 <oerjan> oh he does. he just cannot remember which is which.
04:43:29 <zzo38> And even if you did I am unsure if that would make you the best programmer in the world
04:43:35 <oerjan> famous babel library problem.
04:44:17 <CakeProphet> oerjan: yes I often get minute details of different languages confused.
04:44:37 <CakeProphet> for example: I have accidentaly wrote "using Control.Monad" in Haskell.
04:44:45 <CakeProphet> after some C# programming.
04:46:33 <CakeProphet> and after some intense Perl scripting, I find myself wanting to type $ in front of everything.
04:47:07 <CakeProphet> for example: in Python I will accidentally type $ instead of % in a string when sprintf'ing it. (sprintf'ing something sounds pretty dirty)
04:47:41 <oerjan> > sin $2
04:47:42 <lambdabot> 0.9092974268256817
04:47:50 <CakeProphet> heh.
04:47:53 <zzo38> I have Sokoban encoding, that is first RLE of wall/nonwall alternating, next RLE of target/nontarget skipping all walls, next is a more complicated encoding for the crates. (Characters are implied) Some numbers occur much more often than others, usually low numbers occur more than high numbers.
04:48:14 <CakeProphet> oerjan: I will now code Haskell in that style from now on.
04:48:23 <oerjan> CakeProphet: O KAY
04:48:41 <zzo38> I composed a Huffman tree by hand but I made a mistake.
04:48:44 <CakeProphet> > let x = 2 in sin $x
04:48:45 <lambdabot> 0.9092974268256817
04:48:57 <CakeProphet> bashkell
04:49:13 <zzo38> CakeProphet: Template Haskell it would do different $ immediately followed by words
04:49:28 <zzo38> Can you make polyglot program now?
04:49:39 <CakeProphet> not with that "feature" no
04:49:52 <CakeProphet> polyglots are essentially done by taking advantage of strings and comments.
04:49:58 <CakeProphet> Perl is particularly well-suited for this.
04:50:12 <CakeProphet> you can include Perl in almost any polyglot with ease.
04:50:18 <oerjan> it's a little awkward since you cannot do $x = 2 in haskell
04:50:19 <zzo38> Or, make a Haskell program that does different things, all valid, but still somewhat useful, depending on which language extensions are enabled.
04:50:56 <CakeProphet> oerjan: right and you can't do let or in in Perl unless you define subroutines with some kind of hacked meaning.
04:51:39 <CakeProphet> zzo38: most common extensions wouldn't do that since they usually inroduce some kind of construct or syntax that didn't exist before. overloaded strings could be used for that purpose though.
04:52:03 <oerjan> zzo38: heh the extensions which add keywords or syntax, perhaps
04:52:39 <oerjan> rec and ? perhaps
04:53:14 <oerjan> > let f ?x = 2 in f ?3
04:53:16 <lambdabot> <no location info>: Parse error in pattern
04:53:17 <CakeProphet> the easiest way to polyglot Haskell is to use literate Haskell.
04:53:18 <oerjan> > let f ?x = 2 in f ? 3
04:53:19 <lambdabot> <no location info>: Parse error in pattern
04:53:40 <CakeProphet> zzo38: also I am slightly drunk so, no, probably can't write a polyglot right now.
04:53:42 -!- Patashu has joined.
04:53:43 <oerjan> CakeProphet: i meant for zzo38's distinguishing by haskell extension idea
04:53:56 <CakeProphet> oerjan: right
04:54:07 <zzo38> You can define # as an operator and then do stuff with the magic hash mode and CPP stuff, and it does differently when these are enabled or disabled.
04:54:13 <CakeProphet> not sure how ? could be used though
04:54:21 <oerjan> zzo38: ah right
04:54:23 <CakeProphet> doesn't it require an explicit type signature or...?
04:54:35 <oerjan> no
04:54:40 <oerjan> > let ?x = 2 in ?x
04:54:41 <lambdabot> 2
04:54:42 <CakeProphet> ah okay
04:55:13 <CakeProphet> what DOES require an explicit type signature other than record fields?
04:55:26 <oerjan> but it's not quite clear how to get something which parses both with ? as operator and as implicit parameter prefix
04:55:29 <CakeProphet> type defintions, and the like
04:55:45 <zzo38> Do classes require an explicit type signature?
04:55:47 <oerjan> CakeProphet: polymorphic recursion
04:55:59 <oerjan> higher rank types
04:56:09 * CakeProphet has really figured out higher rank types yet.
04:56:14 <oerjan> zzo38: not to _use_ them in functions, no
04:56:22 <CakeProphet> basically it means there is a forall in the type, right?
04:56:31 <CakeProphet> very basically...
04:56:34 <oerjan> in the type, and not at the front
04:56:35 <zzo38> What I meant is, in definition of classes
04:56:39 <CakeProphet> oerjan: right
04:56:55 <oerjan> zzo38: for the methods, yes
04:56:59 <CakeProphet> oerjan: so for example, a type with an embedded existential is a rank-2 type, yes?
04:57:31 <oerjan> but class A a is legal by itself i think, a class with no methods
04:57:50 <CakeProphet> ah, that's interesting. Basically a set of types.
04:58:22 <oerjan> CakeProphet: i think they are different extensions but you can sometimes convert between using existentials and using higher rank
04:58:54 <CakeProphet> yes they're different extensions but they both permit the forall syntax.
04:59:10 <oerjan> in different places yes
04:59:56 <oerjan> basically the syntax for existential types are based on the fact that its _constructors_ has a higher rank type
05:00:11 <oerjan> er, or at least polymorphic
05:00:29 <CakeProphet> I actually understand how the Perl community has taken influence from Haskell. I believe I've heard people (not on this channel) that it's strange.
05:00:38 <oerjan> data SomeShow = forall a. Show a => SomeShow a
05:00:42 <CakeProphet> +mention
05:01:01 <oerjan> then SomeShow :: forall a. Show a => SomeShow
05:01:04 <CakeProphet> oerjan: ah, okay.
05:01:32 <CakeProphet> so does RankNTypes permit existentials?
05:01:33 <oerjan> er
05:01:40 <oerjan> *then SomeShow :: forall a. Show a => a -> SomeShow
05:02:10 <oerjan> i don't _think_ there's any automatic implication anyway, look it up in the user guide :P
05:02:16 <oerjan> *any way
05:02:32 <oerjan> *either way
05:02:45 <CakeProphet> also how do language extensions work with importing?
05:03:04 <CakeProphet> modules can ignore the language extensions that other modules use. They do not need to explicitly support them, right?
05:03:38 <oerjan> i don't think they need to. it might depend on what is imported.
05:03:53 <CakeProphet> right if the API requires a syntax extension to be used properl
05:04:01 <CakeProphet> y. like fclabels uses TH.
05:05:05 <CakeProphet> of course, if a dependency uses a language extension then the compiler must support that language extension as well.
05:12:39 -!- zzo38 has quit (Remote host closed the connection).
05:14:14 <CakeProphet> 01:14 < bob2> oh wait, takewhile
05:14:14 <CakeProphet> 01:14 < bob2> I finally understand what it is for
05:14:17 <CakeProphet> #python
05:15:14 <oerjan> apropos taking influence from haskell :P
05:16:51 <CakeProphet> itertools, functools, and a very limited list comprehension syntax is probably the only influence Python has from Haskell.
05:19:28 -!- augur has joined.
05:19:50 -!- augur has quit (Read error: Connection reset by peer).
05:20:23 -!- augur has joined.
05:21:45 <Sgeo> Not sure if what I did was a good idea or just really really stupid
05:24:09 <oerjan> well there's only one way to find out. make that into a fry meme picture and post to reddit.
05:25:43 <CakeProphet> < jtannenbaum> and put a dang comment at the end so people know what you're doing, it's tough to read either way
05:26:03 <CakeProphet> in regards to: list(itertools.product(*[range(x) for x in (2,3,4)]))
05:26:08 <CakeProphet> -- #python
05:26:50 <oerjan> what's the * for
05:27:04 <CakeProphet> "flattens" a list into function arguments
05:27:21 <CakeProphet> f(*[a,b,c]) = f(a,b,c)
05:27:35 <CakeProphet> also works with tuples and other iterators.
05:27:51 <oerjan> mhm
05:28:00 <CakeProphet> ** is used to translate dictionaries to named arguments.
05:28:07 <Sgeo> It's not possible to go to an eye doctor to preemptively ask if you just infected your eye, is it?
05:28:25 <CakeProphet> it is possible to do that, yes.
05:28:29 <CakeProphet> not sure if it'll help though.
05:29:04 <CakeProphet> ask a doctor. :P
05:54:27 -!- oerjan has quit (Quit: Good night).
06:10:25 <olsner> Sgeo: what did you do? (the thing that was either good or really really stupid?)
06:11:00 <Sgeo> Poking around my eye to try to deal with an eyelash
06:11:04 <Sgeo> After my dad told me not to
06:11:18 <Sgeo> I did wash my hands and air-dried them, but not entirely sure if I was vigilant enough about that
06:11:27 <Sgeo> I may have done a bit of poking around before washing
06:11:36 <Sgeo> I did successfully deal with the eyelash
06:11:54 <olsner> oh, that should be fine, just blink furiously for a while so you re-lubricate your eye
06:12:57 <Sgeo> My finger, while I don't think it touched eyeball, did touch skin that probably did touch eyeball
06:14:25 <olsner> oh no, you touched skin that touches your eyeball? it'd be fine if it was the eyeball directly, but now you're definitely going to die
06:14:45 <mauke> what's so bad about touching eyeballs?
06:14:56 <olsner> it scares Sgeo? :)
06:15:26 <Sgeo> My dad thought that my eye could get infected like that
06:15:50 <Sgeo> (By touching the eyeball if my hands weren't really really really clean)
06:16:07 <mauke> oh, then my eyes must be really sick by now
06:20:48 -!- augur has quit (Remote host closed the connection).
07:10:01 -!- azaq23 has joined.
07:25:32 <CakeProphet> > (`replicateM` "abc") =<< [0..]
07:25:33 <lambdabot> ["","a","b","c","aa","ab","ac","ba","bb","bc","ca","cb","cc","aaa","aab","a...
07:33:58 <CakeProphet> so if I wrote a language that compiles to Core
07:34:09 <CakeProphet> would that give me access to Haskell bindings?
07:34:13 <Sgeo> Core?
07:35:12 <CakeProphet> one of GHC's intermediate languages.
07:38:25 -!- nooga has joined.
08:15:28 -!- copumpkin has quit (Ping timeout: 240 seconds).
08:15:52 -!- copumpkin has joined.
08:16:03 -!- myndzi has joined.
08:43:49 -!- FireFly has joined.
08:43:57 -!- FireFly has quit (Changing host).
08:43:57 -!- FireFly has joined.
08:46:12 -!- Tritonio has joined.
09:09:28 <itidus20> Sgeo: i recommend you stir your emotions with a moving song or video causing you to cry
09:09:41 <itidus20> haha.
09:14:24 <itidus20> (to greensleeves) There once was a cat who had come to my home, and it's life had only just begun.
09:14:49 <itidus20> It played on the carpet with balls of string, while a small family watched it do it's thing.
09:16:20 <itidus20> It jumped on the fridge and slept there all day, or climbed along fences all carefree and gay.
09:22:49 <monqy> im moved
09:27:17 <CakeProphet> I moved.
09:39:19 <itidus20> the point was to move sgeo :P
09:39:25 <itidus20> heheh
09:48:18 <CakeProphet> > nub . permutations $ "sgeo"
09:48:20 <lambdabot> ["sgeo","gseo","egso","geso","esgo","sego","oegs","eogs","egos","oges","goe...
09:48:37 <monqy> nub? why would there be any duplicates?
09:48:53 <CakeProphet> I'm a cautious guy.
09:49:46 <Sgeo> > let permuts = permutations "sgeo" in length $ nub $ permuts == length permuts
09:49:47 <lambdabot> Couldn't match expected type `[[GHC.Types.Char]]'
09:49:47 <lambdabot> against inferred ...
09:49:51 <CakeProphet> you would want nub there if it were any string with duplicate characters... so I kind of just use it out of habit.
09:49:57 <CakeProphet> yes I understand it's the same in this case.
09:50:11 <Sgeo> > let permuts = permutations "sgeo" in length . nub $ permuts == length permuts
09:50:12 <lambdabot> Couldn't match expected type `[[GHC.Types.Char]]'
09:50:12 <lambdabot> against inferred ...
09:50:22 <Sgeo> Grah
09:50:23 <monqy> Sgeo: what are you trying to do?
09:50:38 <monqy> oh, I see
09:50:42 <CakeProphet> Sgeo: problem is most likely related to precedence of $ and ==
09:50:42 <Sgeo> Have lambdabot tell me if length with and without nub is the same
09:50:50 <monqy> right
09:51:03 <Sgeo> > let permuts = permutations "sgeo" in (length $ nub $ permuts) == (length permuts)
09:51:04 <lambdabot> True
09:51:23 <Sgeo> > let permuts = permutations "sgeo" in (length . nub $ permuts) == (length permuts)
09:51:25 <lambdabot> True
09:51:37 <Sgeo> Hmm, makes sense
09:52:02 <CakeProphet> > let permuts = permutations "lambdabot" in (length . nub $ permuts) == (length permuts)
09:52:06 <lambdabot> mueval-core: Time limit exceeded
09:52:12 <Patashu> > let permuts = permutations "aa" in (length . nub $ permuts) == (length permuts)
09:52:41 <CakeProphet> > let permuts = permutations "baby" in (length . nub $ permuts) == (length permuts)
09:52:42 <lambdabot> False
09:52:57 <CakeProphet> #esoteric: conducting groundbreaking research in combinatorics.
09:55:18 <Sgeo> > permutations "zzz"
09:55:19 <lambdabot> ["zzz","zzz","zzz","zzz","zzz","zzz"]
09:55:34 * Sgeo goes to publish a paper
09:55:43 <CakeProphet> > join . permutations . "zzz"
09:55:44 <lambdabot> Couldn't match expected type `[a]'
09:55:44 <lambdabot> against inferred type `GHC.Types...
09:55:46 <CakeProphet> > join . permutations $ "zzz"
09:55:48 <lambdabot> "zzzzzzzzzzzzzzzzzz"
09:55:49 <monqy> > ((==) <*> nub) (permutations "sgeo")
09:55:50 <lambdabot> True
09:55:53 <monqy> > ((==) <*> nub) (permutations "baby")
09:55:54 <lambdabot> False
09:56:01 <Sgeo> What's <*>
09:56:07 <monqy> :t (<*>)
09:56:07 <CakeProphet> S
09:56:08 <lambdabot> forall (f :: * -> *) a b. (Applicative f) => f (a -> b) -> f a -> f b
09:56:11 <Sgeo> Oh it's that thing isn't it?
09:56:26 <Sgeo> I have no idea what it''s doing there
09:56:28 <monqy> and yeah for the ((->) a) instance it's S
09:56:29 <CakeProphet> for functions <*> is ap is the S combinator.
09:56:32 * Sgeo needs sleep
09:57:04 <Sgeo> And knowledge of what the S combinator does
09:57:14 <monqy> \fgx.fx(gx)
09:57:18 <CakeProphet> f <*> g x = f x (g x)
09:57:19 <CakeProphet> yes
09:57:20 <CakeProphet> that
09:58:20 <monqy> oh right I forgot to do length on them
09:58:21 <monqy> oops
09:58:39 <CakeProphet> probably more efficient to do it this way though.
09:58:39 <monqy> anyway I checked if they were identical rather than merely of the same length
09:58:50 <monqy> CakeProphet: nope
09:59:11 <monqy> more efficient to do the lengths, I'd imagine, since you don't have to do comparisons on all the elements
09:59:42 <CakeProphet> are comparisons more expensive that accumulated addition? also, the false case would be short-circuiting on the shorter list.
09:59:52 <CakeProphet> whereas with length you traverse the entire list.
10:00:15 <CakeProphet> er, not on the shorter list
10:00:19 <CakeProphet> just short circuiting on the false case.
10:00:57 <CakeProphet> so that gives better average time. :P
10:01:04 <monqy> I guess if the'd be different really early on and the lists are really long it'd be best to do straight comparison yeah
10:01:19 <monqy> the thing about comparisons is it depends on the Eq instance
10:01:26 <CakeProphet> right
10:01:29 <CakeProphet> could be a 2-d list for example
10:01:32 <CakeProphet> but not in this case.
10:01:36 <CakeProphet> er... wait
10:01:37 <CakeProphet> lol
10:01:41 <CakeProphet> yes in this case
10:01:42 <monqy> yep
10:02:13 <CakeProphet> so yeah length is faster on the true case.
10:02:43 <CakeProphet> just comparison is maybe faster on the false case.
10:02:45 <CakeProphet> >_>
10:03:34 <CakeProphet> > [1..] == []
10:03:36 <lambdabot> False
10:03:38 <CakeProphet> > [1..] == [1..]
10:03:42 <lambdabot> mueval-core: Time limit exceeded
10:03:52 <monqy> > (((==) `on` length) <*> nub) (permutations "sgeo")
10:03:53 <lambdabot> True
10:03:55 <monqy> > (((==) `on` length) <*> nub) (permutations "baby")
10:03:56 <lambdabot> False
10:03:58 <monqy> oh wait no
10:04:01 <monqy> mesed that one up
10:04:03 <monqy> confused myself
10:04:12 <monqy> wait no
10:04:16 <monqy> did not mess
10:04:21 <monqy> double confused ;_;
10:04:25 <CakeProphet> you want the ap to be on length I would think.
10:04:36 <CakeProphet> ??
10:04:37 <CakeProphet> :t on
10:04:38 <lambdabot> forall b c a. (b -> b -> c) -> (a -> b) -> a -> a -> c
10:04:54 <CakeProphet> oh nevermind
10:05:03 <CakeProphet> no that's correct.
10:05:51 <CakeProphet> I want a whole suite of preposition functions.
10:06:14 <monqy> like what
10:06:15 <CakeProphet> on, in, around, about, for, with, without
10:06:33 <monqy> but what would they do
10:06:43 <CakeProphet> what they say duh.
10:07:00 <monqy> ok
10:07:25 -!- azaq23 has quit (Ping timeout: 260 seconds).
10:07:27 <CakeProphet> obviously [] `around` [1,2,3] is [[1,2,3]]
10:07:31 <CakeProphet> >_>
10:10:54 -!- Wamanuz has quit (Remote host closed the connection).
10:11:23 -!- Wamanuz has joined.
10:11:24 <CakeProphet> typeclass Match a b where { (===) :: a -> b -> Bool }
10:11:27 <CakeProphet> *class
10:11:47 <CakeProphet> now you can have the clusterfuck that is Perl's ~~ (aka "smart match") operator
10:11:57 <CakeProphet> in the form of like 10 instance declarations.
10:12:44 <CakeProphet> also can you do things like this in an instance declaration
10:13:03 <CakeProphet> instance (Eq a) => Match a a where (===) = (==)
10:13:30 <CakeProphet> with one of those typeclass extensions?
10:14:54 <monqy> I'd find it more elegant to have an isomorphism (or something more general in a good way not a stupid way) typeclass and define (===) in terms of its operations and (==)
10:14:59 <monqy> elegant and useful
10:15:26 <CakeProphet> that is not how Perl's smart matching works. :P
10:15:38 <CakeProphet> it's DWIS equality. :P
10:15:47 <CakeProphet> er DWIM
10:16:08 <monqy> perl the most elegant language
10:16:09 <CakeProphet> so there's not really a generalization.
10:16:30 <monqy> nor a haskell implementation
10:16:41 <Deewiant> CakeProphet: MultiParamTypeClasses for Match, FlexibleInstances for that instance (because it uses 'a' twice)
10:16:44 <CakeProphet> I just showed you how it could be done.
10:18:01 <monqy> I guess yours accounts for cases wherein an isomorphism doesn't exist but you still want thinks to be considered equal, but this is operation is dumb and nobody should want it ever
10:18:24 <CakeProphet> I mostly use it because it provides a quick way to test list membership in Perl
10:18:34 <CakeProphet> (1,2,3,4) ~~ 2 is true
10:18:54 <monqy> ew
10:18:55 <CakeProphet> so
10:19:05 <CakeProphet> instance Match [a] a where ...
10:19:12 <CakeProphet> instance Match a [a] where ...
10:19:35 <monqy> `elem` sure is a lot of typing
10:19:39 <HackEgo> ​/home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: elem`: not found
10:19:47 <monqy> also you'd need an Eq a => in there
10:19:51 <CakeProphet> monqy: yeah because I totally think this is a viable thing in Haskell
10:19:58 <monqy> or equivalent
10:20:00 <CakeProphet> and not just a thought experiment on how I would implement such a thing.
10:20:32 <monqy> if I were you I'd probably go about implementing it in something along the lines of syb, such as not to have to define instances for every pair of types
10:21:16 <CakeProphet> also regexes do regex matching stuff
10:21:53 <CakeProphet> I think list ~~ list is intersection for some reason
10:23:58 <CakeProphet> so that means it couldn't return Bool
10:24:20 <CakeProphet> it would need to return some kind of special data type or Either if there's only two kinds of result
10:24:36 <CakeProphet> or Dynamic. :P
10:25:10 <monqy> intersection? not set equality? sure isnt doing what id mean......
10:25:30 -!- Phantom_Hoover has joined.
10:25:49 <CakeProphet> or you could include the result type as a third typeclass param.
10:25:55 <CakeProphet> for great fun.
10:26:11 <CakeProphet> should just name it TripleArgumentFunction instead of Match
10:26:23 <monqy> where by set equality I mean something like ((==) `on` Data.Set.fromList) or ((==) `on` Data.List.Ordered.nub . sort) or something like that
10:26:23 <CakeProphet> er TwoArgumentFunction rather
10:26:47 <monqy> at least I think there's a package that provides Data.List.Ordered
10:27:28 <Deewiant> Data.List.Ordered.nub = map head . group
10:28:11 <CakeProphet> her is the Grand Smart Matching table: http://perldoc.perl.org/perlsyn.html#Smart-matching-in-detail
10:29:49 <CakeProphet> so list ~~ list is true if all elements ~~ to true with the element of the same index in the other list.
10:30:13 <monqy> that works too I guess
10:31:05 <CakeProphet> obviously it's a very straightforward operator.
10:32:25 <CakeProphet> array ~~ function is like all in Haskell
10:34:41 <Phantom_Hoover> CakeProphet, ~~ is the terrifying, ill-defined operator in Perl, right?
10:36:20 <CakeProphet> well, it has a definition, but yes it's somewhat terrifying.
10:36:35 <CakeProphet> it is defined by a huge table of which pairs of types results in what.
10:36:46 <CakeProphet> most of it makes some kind of intuitive sense.
10:38:09 <monqy> it has a definition, but it's not a good one
10:38:11 <monqy> hence ill-defined
10:38:58 <monqy> where by good I mean "not just a bunch of stupid special cases"
10:41:44 <CakeProphet> also none of them are technically special
10:41:46 <CakeProphet> just... cases. :P
10:42:16 <monqy> they are all special like snowflakes they are special snowflakes
10:42:44 <Sgeo> Ruby's === isn't particularly like ~~, is it?
10:43:11 <CakeProphet> === is the switch-case operator
10:43:19 <CakeProphet> similar but I don't think it's identical
10:43:42 <CakeProphet> well, ~~ is also the switch-case operator in Perl so...
10:43:48 <CakeProphet> yeah it's derived from that.
10:44:12 <CakeProphet> but I do not know how it works exactly.
10:45:14 <CakeProphet> most of what ~~ does is already pretty short code so it's kind of pointless other than it provides a somewhat nice switch-case mechanism.
10:47:37 <CakeProphet> hash ~~ array intersects the hash keys with the array elements
10:47:51 <CakeProphet> I guess that's kind of useful.
11:13:18 <CakeProphet> http://www.garshol.priv.no/download/text/perl.html
11:13:36 <CakeProphet> a very lengthy article about why Perl is bad, written by someone who obviously has very little experience with Perl.
11:14:41 <CakeProphet> and then starts talking about why Python is awesome
11:16:12 <monqy> i like how he uses a paul graham quote in introducing python
11:16:56 <CakeProphet> I don't think you get to complain about manipulating complex data structures in Perl if you can't even do it properly.
11:17:11 <CakeProphet> though perhaps that's part of his argument. that stupid people can't figure it out.
11:20:07 -!- monqy has quit (Quit: hello).
11:41:49 -!- azaq23 has joined.
11:46:04 -!- Lymee has quit (Read error: Operation timed out).
11:57:55 <Phantom_Hoover> Anyone know what the contact legs on chips are made from?
12:05:38 -!- Tritonio has quit (Read error: Connection reset by peer).
12:09:53 <quintopia> all i can find is that the contacts on RAM are gold-plated. possibly aluminum or tin.
12:10:38 <quintopia> something that either doesnt corrode or coated with same
12:12:58 <Phantom_Hoover> Argh, I went for steel.
12:56:14 -!- Necrosporus has joined.
12:58:26 -!- Necrosporus has quit (Quit: Leaving).
13:02:16 -!- Necrosporus has joined.
13:03:43 <Necrosporus> http://paste.org.ru/?lu3vtb
13:03:57 <Necrosporus> Do you like it? What' sthat at your opinion?
13:04:33 -!- loje has joined.
13:10:09 -!- loje has quit (Ping timeout: 240 seconds).
14:20:16 -!- Patashu has quit (Ping timeout: 240 seconds).
14:20:22 <Phantom_Hoover> :t (.)(.)
14:20:22 <lambdabot> forall a b (f :: * -> *) (f1 :: * -> *). (Functor f, Functor f1) => f1 (a -> b) -> f1 (f a -> f b)
14:20:40 <Phantom_Hoover> :t (.)
14:20:41 <lambdabot> forall a b (f :: * -> *). (Functor f) => (a -> b) -> f a -> f b
14:20:51 <Phantom_Hoover> That... what.
14:20:57 <Phantom_Hoover> @type (.)
14:20:58 <lambdabot> forall a b (f :: * -> *). (Functor f) => (a -> b) -> f a -> f b
14:21:13 <Phantom_Hoover> That's fmap...
14:21:31 -!- copumpkin has quit (Quit: Computer has gone to sleep.).
14:23:11 <Deewiant> fmap is a generalization of (Prelude..) and Cale decided that lambdabot should have (.) be generalized as well
14:23:35 <Deewiant> For this, and other reasons, lambdabot's Haskell dialect is generally known as Caleskell.
14:23:44 <Deewiant> ?ty (++) -- Another example
14:23:45 <lambdabot> forall m. (Monoid m) => m -> m -> m
14:24:49 <Phantom_Hoover> fmap is a generalisation of .?
14:25:37 <Deewiant> (Prelude..) is fmap but limited to the (a->) functor
14:25:47 <Phantom_Hoover> Yeah, I was coming to that conclusion.
14:25:54 <Deewiant> > fmap (+1) (*2) 3
14:25:55 <lambdabot> 7
14:26:08 <Deewiant> > (Prelude..) (+1) (*2) 3
14:26:09 <lambdabot> Not in scope: `Prelude..'
14:26:15 <Deewiant> Bah.
14:26:18 <Deewiant> ?ty (Prelude..)
14:26:20 <lambdabot> forall b c a. (b -> c) -> (a -> b) -> a -> c
14:26:26 <Phantom_Hoover> > (Prelude.(.)) (+1) (*2) 3
14:26:33 <Phantom_Hoover> > (Prelude.(.)) (+1) (*2) 3
14:26:33 <lambdabot> Not in scope: data constructor `Prelude'
14:26:34 <Deewiant> The syntax is (Prelude..)
14:26:58 <Deewiant> I guess it's just missing a qualified import of Prelude
14:27:05 <Deewiant> Or then it's using a modified Prelude.
14:46:30 -!- copumpkin has joined.
14:58:39 -!- MSleep has changed nick to MDude.
15:33:26 -!- Phantom_Hoover has quit (Ping timeout: 245 seconds).
15:54:23 -!- nooga has quit (Ping timeout: 264 seconds).
16:14:06 -!- pumpkin has joined.
16:14:33 -!- copumpkin has quit (Ping timeout: 240 seconds).
16:22:59 -!- Phantom_Hoover has joined.
16:30:31 -!- pumpkin has changed nick to copumpkin.
17:34:52 -!- Wamanuz has quit (Read error: Operation timed out).
17:35:26 -!- Wamanuz has joined.
17:47:05 -!- elliott has joined.
17:49:29 <elliott> hi
17:49:29 <lambdabot> elliott: You have 11 new messages. '/msg lambdabot @messages' to read them.
17:49:35 <elliott> help
17:51:11 <elliott> thank you...everyone... i think ...
17:55:02 <Phantom_Hoover> elliott, says the one who has, on multiple occasions, left 20+ messages in my lambdabot inbox.
17:55:22 <Gregor> @tell Phantom_Hoover spamo
17:55:23 <lambdabot> Consider it noted.
17:55:24 <Gregor> @tell Phantom_Hoover spamo
17:55:24 <lambdabot> Consider it noted.
17:55:27 <Gregor> >_>
17:56:33 -!- augur has joined.
17:58:55 -!- pumpkin has joined.
17:58:56 <Gregor> So, who wants to continue my dramatic effort at a tweetable interpreter for a TC language in C?
17:59:01 -!- pumpkin has quit (Changing host).
17:59:01 -!- pumpkin has joined.
17:59:11 <Gregor> I have a tweetable interpreter for a TC-flavored language with restricted addressing >_>
17:59:19 -!- pumpkin has changed nick to copumpkin_.
17:59:20 <elliott> Nice FSM
17:59:36 <Gregor> Yeah, exactly :P
17:59:44 <elliott> Here's my FSM in a tweet
17:59:48 <elliott> main(){return 0;}
18:00:05 <Gregor> char*a,b[9999];main(){gets(a=b);while(*a)a+=(a[*a]-=a[a[1]])?3:a[2];puts(b);}
18:00:06 <lambdabot> Gregor: You have 7 new messages. '/msg lambdabot @messages' to read them.
18:00:07 <elliott> OK, OK, you say, but how do I get it to loop??
18:00:16 <elliott> main(){if(getchar())for(;;);return 0;}
18:00:27 <elliott> Gregor: What
18:00:34 <elliott> Who spammed Gregor X-D
18:00:43 -!- copumpkin has quit (Disconnected by services).
18:00:46 -!- copumpkin_ has changed nick to copumpkin.
18:00:52 <Gregor> elliott: Phantom_Hoover sez "By the way, two messages does not a spam make."
18:01:01 <Gregor> Of course, replace those " "s with \n/msg lambdabot @tell Gregor
18:02:51 <Gregor> But anyway, my subtract-and-branch-if-zero is pretty sweet, and plenty tweetable at 77 characters, but can only address 256 bytes :P
18:02:58 <elliott> 00:10:38: * Sgeo wants wget to ignore robots.txt >.>
18:03:04 <elliott> Obviously it is impossible to make wget do this.
18:03:23 <elliott> Gregor: I would be OK with it if it could address, like, at LEAST a gigabyte :P
18:03:31 <Phantom_Hoover> And if there was a way to do so, it would be far too secret to include in the man page.
18:03:32 <lambdabot> Phantom_Hoover: You have 2 new messages. '/msg lambdabot @messages' to read them.
18:03:33 <Gregor> elliott: Pffffffffffffff
18:04:02 <kmc> void main(int c,char **v){((void(*)(void))v[1])();}
18:04:16 <elliott> kmc: UB
18:04:21 <kmc> i know
18:04:22 <Gregor> kmc: omg u so klevr
18:04:32 <elliott> kmc: Come back when you have a C program :P
18:05:06 <Sgeo> elliott, I figured out how to do it
18:05:19 <kmc> void main(){system("gcc /dev/stdin&&./a.out");}
18:05:32 <Gregor> kmc: omg u so klevr
18:06:24 <elliott> kmc: Implementation-defined behaviour :P
18:07:38 <Gregor> Incidentally, mine has /relative/ addressing of 256 bytes, so it can, in fact, access more, but only a 256 byte area around the pc.
18:08:02 <elliott> Gregor: Hmm, I wonder if that's TC (modulo C's limited addressing)?
18:08:08 <elliott> You just have to move around a lot.
18:08:31 <Gregor> elliott: I'm fairly certain it's not, since the area you're moving around in is also where the program is, so you'll very quickly run out of space for both your program logic and your actual data.
18:08:49 <Gregor> (Maybe, that's not a real argument of course)
18:09:15 <elliott> Gregor: I kind of feel like you could implement a simple TC language by having a really small program that can self-modify quinelike and move around the actual data...
18:09:28 <elliott> That's the fancy-L problem, though
18:09:34 <Gregor> elliott: But the program and data aren't separate.
18:09:41 <elliott> (http://esolangs.org/wiki/%E2%84%92)
18:09:44 <elliott> Gregor: Indeed
18:11:45 * Gregor starts vaguely wondering if a subleqalike can make any sense at all if the program and data are separate. Conclusion: lolno.
18:19:15 <Gregor> I also made input and output a requirement in my original design of this :P
18:20:09 <elliott> Do you even have a twatter.
18:21:59 <Gregor> Probably? :P
18:28:18 <Gregor> Is EOF equal to a value other than -1 on any system anywhere? >_>
18:28:27 <Gregor> (It's totally lame to assume it's -1, but it would help me SO MUCH)
18:29:07 <elliott> <Gregor> Is EOF equal to a value other than -1 on any system anywhere? >_>
18:29:12 <elliott> Yes, C-compliant DS9ks
18:29:15 <elliott> It's <0, though
18:29:26 <Gregor> Friggin' DS9k! :P
18:29:42 <elliott> Phantom_Hoover: oh my god DS9's computers run DS9k
18:29:42 <Gregor> That still leaves me with (...)>=0 :(
18:29:49 <Gregor> Which is a lot more characters than +1
18:29:54 <elliott> Gregor: try using a bit-and?
18:29:59 <elliott> somehow???
18:30:00 <Deewiant> Has anybody written a C DS9K yet?
18:30:09 <elliott> Deewiant: They're too busy being real systems
18:30:28 <Gregor> elliott: In less characters than ()>=0? :P
18:30:29 <Deewiant> I'll take that as a no
18:30:52 <Deewiant> Gregor: Why do you need the () there but not in the +1
18:31:16 <elliott> Deewiant: I have some plans for such a system but it's too large an undertaking for me to bother
18:31:17 <Gregor> Deewiant: The bit here is while (*++a=getchar()+1) if EOF == -1
18:31:26 <Gregor> Deewiant: a is an int * here
18:31:28 <elliott> Deewiant: You basically need to keep all the types and the like around to be fully pedantic about it
18:31:31 <Gregor> (I'm trying to give it a bigger range)
18:31:40 <elliott> And you want pointers' representations as integers to be completely fucked up so that nothing works on them
18:31:55 <elliott> (Perhaps have a pointer-integer type so you can yell whenever the program tries to arithmetic on them then cast it back)
18:32:01 <Gregor> elliott: Doesn't matter, everything is int *, nothing is ever accessed char-wise.
18:32:05 <Deewiant> elliott: Absolutely
18:32:09 <elliott> Gregor: ?
18:32:12 <elliott> I'm talking about ds9ks
18:32:15 <Gregor> Oh, sorry, I thought you --- yeah :P
18:32:22 <elliott> Deewiant: The great thing is, it would actually make a useful debugging system :P
18:32:26 <Deewiant> elliott: I figure it'd be... yeah
18:32:29 <elliott> Because you could provide _really_ helpful error messages at runtime.
18:32:44 <elliott> Downside: Really slow, but probably not slower than, like, Ruby, so whatever.
18:32:53 <Deewiant> elliott: So it can just say things like "Undefined behaviour #1234: casting a function pointer to a pointer" or whatever
18:32:57 <elliott> Also you couldn't provide any libraries that make incorrect assumptions i.e. most of them.
18:33:00 <Deewiant> Preferably it would still work
18:33:11 <Gregor> int*a,b[9<<20];main(){a=b;while(scanf("%d",++a)>0);while(*a)a+=(a[*a]-=a[a[1]])?3:a[2];while(a>b)putchar(*--a);} <-- sexy :P
18:33:12 <Deewiant> So that it could just keep going and outputting more errors
18:33:23 <elliott> Deewiant: If it still works, then it has to use a less rich internal representation, which leads to fewer errors being caught
18:33:28 <Deewiant> But it might be that you have to break everything to.. yeah
18:33:40 <elliott> It could work for some things but probably not for function pointers → pointers
18:33:44 <Deewiant> It feels like there should be... yeah
18:33:46 <elliott> Because function pointers should contain arity and type information
18:33:48 <elliott> Deewiant: ...yeah
18:33:54 <Deewiant> Dammit, stop preëmpting what I say
18:33:58 <elliott> Deewiant: Although you could have a function-pointer-pointer type that acts like a pointer but still carries that information :-)
18:34:03 <elliott> Then you need a function-pointer-pointer-integer
18:34:25 <elliott> Deewiant: What about that project that's doing an abstract interpreter of C
18:34:28 <elliott> K90 or something?
18:34:31 <Deewiant> Klee?
18:34:37 <elliott> It was something involving K
18:34:53 <elliott> IIRC they don't have several important valid things
18:34:55 <Deewiant> Klee is the symbolic VM for LLVM
18:35:06 <elliott> http://klee.llvm.org/Tutorial-1.html ;; This is cool, but no.
18:35:32 <elliott> Deewiant: It was literally translating the abstract semantics of C to something machine-readable, IIRC
18:35:34 <Deewiant> Well, for C, but I suppose you can theoretically use it with anything LLVM
18:35:42 <elliott> Deewiant: And had this massive test suite or something
18:36:20 <elliott> I can't seem to find it :/
18:37:23 <elliott> Deewiant: I have a feeling it's impossible to detect all such bugs, though
18:37:39 -!- Lymee has joined.
18:37:52 <Deewiant> elliott: http://www.softlab.ntua.gr/~nickie/Thesis/ related?
18:37:56 <elliott> Like, either you reject valid programs (does complicated sizeof-related tricks but it turns out that it's provably OK for every valid sizeof) or they slip through the cracks
18:38:12 <elliott> Deewiant: I don't think so, it was much more recent than that, but maybe I'm wrong
18:38:15 <elliott> It was something you could actually run
18:39:05 <Deewiant> Oh wellz, can't find it either
18:39:23 <Deewiant> And yeah, you can't detect all bugs
18:39:30 <Deewiant> Halting problem should be enough to prove it :-P
18:39:57 <Deewiant> But you can probably reject just about every nontrivial C program and that's enough for me
18:40:54 <elliott> Deewiant: Hey, I try very hard to stay within semantic limits
18:41:37 <elliott> Deewiant: When I was working on mcmap's Guile branch I left a long comment when I assumed a SCM could be casted to a (void *), despite the fact that any non-pointer representation would be insane, and that (void *) was incredibly tied into the current Guile implementation
18:41:44 <elliott> Because, hey, it COULD be an integer index into a heap :-P
18:41:51 <elliott> That's... bigger than a pointer?
18:42:02 <elliott> Hell, could be a function pointer
18:42:41 <Deewiant> Do you typically take into account that INT_MAX might be 32767 and that increasing an int past that is UB?
18:43:13 <elliott> Deewiant: BTW, how does mushspace do the caching of the "currently relevant" array? Just stores a global masked x/y and checks the masked x/y of the "lookup cell" function is the same before hashtable lookups?
18:43:26 <Deewiant> There's a separate cursor structure
18:43:33 <elliott> Deewiant: And I'd consider making an increment past 32767 a user error
18:43:34 <Deewiant> Which you use if you want to cache where you are
18:43:38 -!- ralc has joined.
18:43:43 <elliott> (That's one thing you can't catch generically, incidentally)
18:44:06 <elliott> Deewiant: So much for your minimal API :P
18:44:16 <Deewiant> It's a separate thing
18:44:46 <Deewiant> It's more like iterating over the structure than doing individual accesses
18:44:49 <elliott> That is not implementable ideally without using the internal structure details
18:44:58 <elliott> Unless you expose a way to get an array out?
18:45:06 <Deewiant> No, cursor is complicated
18:45:24 <elliott> Eh?
18:45:46 <elliott> I'm saying that I couldn't implement my own cursor with the same efficiency using your public API sans cursor, so it is part of the core :P
18:46:03 <Deewiant> Yes, agreed
18:46:27 <Deewiant> But my point was that it's a (fairly) minimal API for what it does
18:46:33 <elliott> Deewiant: But that would be resolved if you provided a way to go from (x,y) -> array, I think?
18:46:44 <elliott> Unless I totally misunderstand how your fungespace works
18:46:56 <Deewiant> I don't think that'd suffice
18:47:02 -!- fizzie has joined.
18:47:12 <Deewiant> You also need at least the bounds in that array that you're allowed to access
18:47:32 <Deewiant> Both (x,y) and (start_idx,end_idx)
18:48:01 <Deewiant> And then for multidimensional cases you need the full AABB data, i.e. width/area so you can stride properly between start_idx/end_idx
18:48:21 <Deewiant> And then you might run into the hash table
18:48:28 <Deewiant> No, it's too complicated :-)
18:48:46 <Deewiant> It's the next thing I need to C-ify
18:49:04 <elliott> Back
18:49:18 -!- boily has quit (Quit: WeeChat 0.3.5).
18:49:28 <Gregor> lololol @ "BUGS" section in malloc(3).
18:49:31 <elliott> Deewiant: Maybe you should expose an internal AABB API that the public API is based on :P
18:49:35 <Gregor> Somebody doesn't like Linux's overcommit behavior :P
18:49:46 <elliott> Gregor: Overcommit is utterly stupid
18:49:57 <Gregor> "In case Linux is employed under circumstances where it would be less desirable to suddenly lose some randomly picked processes, ..."
18:50:05 <elliott> Unfortunately it's the easiest way to achieve a heap with nice properties
18:50:10 <elliott> So I can't really turn it off
18:50:17 <elliott> (SBCL uses it f.e.)
18:51:29 <Deewiant> elliott: I'd rather make the whole thing as opaque as possible
18:51:31 <Sgeo> Isn't there a a /proc/ thing that can turn it off?
18:51:53 <Deewiant> Yes, /proc/sys/vm/overcommit_*
18:52:28 <Gregor> Anyway, int*a,b[9<<20];main(){a=b;while(scanf("%d",++a)>0);while(*a)a+=(a[*a]-=a[a[1]])?3:a[2];while(a>b)putchar(*--a);}
18:52:56 <Sgeo> Do you think sysadmins remember to do that?
18:53:33 <elliott> Deewiant: That's why it'd be an internal thing :P
18:53:47 <elliott> Deewiant: i.e. subject to change whenever the internal representation does
18:53:56 <elliott> (But more stable than poking members directly)
18:54:15 <Deewiant> elliott: I'll add it when somebody needs it :-P
18:54:21 <elliott> Deewiant: You do, see cursor.c :P
18:54:40 <Deewiant> I can poke members directly?
18:55:34 <elliott> Deewiant: Well, I don't know how cursor.c works, but we've established it isn't implemented with the API
18:55:38 <elliott> So there is surely some . or -> in it
18:55:49 -!- zzo38 has joined.
18:55:52 <Deewiant> Yes, exactly
18:55:54 <Deewiant> And I can do that
18:55:59 <Deewiant> So I don't need an "AABB API"
18:56:04 <Deewiant> Because I can just do aabb->foo
18:56:13 <Deewiant> And not worry about breakage
18:56:26 <elliott> Deewiant: Yes, but you need the AABB API, you're just working around it by doing fragile things
18:56:37 <elliott> And taking advantage of your enviable maintainer position to ensure it doesn't break
18:56:38 <Deewiant> This is the kind of thing that is supposed to be fragile
18:56:45 <Phantom_Hoover> My character set has a left-facing swatstika but not a right-facing one.
18:56:47 -!- azaq23 has quit (Quit: Leaving.).
18:56:51 <Phantom_Hoover> *sigh*
18:56:54 <Deewiant> If I mess with the internal representation of mush_aabb I really do need to rethink everything :-P
18:57:23 <elliott> Phantom_Hoover: Heh.
18:57:29 <elliott> Which one is the one the Nazis used?
18:57:41 <zzo38> The Nazis used the 45-degrees rotated one
18:57:54 <elliott> thanks
18:58:13 <Phantom_Hoover> Right-facing.
18:59:48 <Phantom_Hoover> http://en.wikipedia.org/wiki/Strafgesetzbuch_%C2%A7_86a
18:59:53 <Phantom_Hoover> Way to free speech, Germany.
18:59:59 <elliott> Phantom_Hoover: BTW, s/character set/font/
19:00:06 <Phantom_Hoover> elliott, erm, yes.
19:00:09 <elliott> Also, you don't know about that?
19:00:19 <Phantom_Hoover> I did.
19:00:30 <Phantom_Hoover> Although I didn't know the precise nature of the law.
19:00:51 <elliott> "In late 2005 police raided the offices of the punk rock label and mail order store "Nix Gut Records" and confiscated merchandise depicting crossed-out swastikas and fists smashing swastikas."
19:00:52 <elliott> Pro.
19:01:35 <elliott> http://en.wikipedia.org/wiki/File:98-animate.gif Surely there are easier ways to accomplish this.
19:02:02 <Phantom_Hoover> I really want to punch these people, which distresses me because I don't really like people who want to punch people.
19:03:08 <elliott> I don't think you can blame them for wanting to de-nazificate in the forties, but it's long-obsolete by now of course.
19:03:18 <elliott> And obviously hasn't stopped neo-Nazis.
19:04:00 <elliott> Hmm, I don't know if I like zenburn.
19:05:14 <elliott> Has anyone here used Scion with Emacs? I suppose that's vanishingly unlikely.
19:14:08 <zzo38> Neo-Nazis should use symbolism common German alphabetic in order to show problems with these laws
19:15:14 <zzo38> And the Swastika does not even necessarily have to do with Nazi, even though the Wikipedia article says the law applies to all forms.
19:22:31 <zzo38> I have read that Supero makes a Haskell code as fast as C, but it is still experimental
19:23:37 <elliott> Some stuff from Supero is now in GHC IIRC
19:23:47 <elliott> I may be wrong
19:23:48 <elliott> But similar things
19:24:13 <itidus20> The swastika has been stigmatized by the nazis. But the history of it is probably complicated full of many twists and turns through various cultures.
19:24:45 <cheater> i was in a discount shop here in germany today
19:24:57 <cheater> and they had those clothes racks in shape of a swastika
19:25:08 <itidus20> Then again I guess it's not a debate of historical accuracy.
19:26:35 <itidus20> i should just stay out of this one
19:27:00 <zzo38> Maybe there should be a compiler option to tell it to also make small system small executable file omitting a lot of things not required for operation of the program.
19:27:39 <zzo38> I don't know how Supero compares in memory and file size; they only show that the speed is as fast as C.
19:32:26 -!- oerjan has joined.
19:34:50 <elliott> Deewiant: Re: my circular dependencies, I asked Haskell and apparently the only decent solution is to put everything in Types/Internal.hs; for each type, have Types/Internal/T.hs that imports Types.Internal and just re-exports T(..) with all constructors, and ensure these are the only modules that import Types.Internal; have Types that imports Types.Internal and just re-exports the external API; and have each individual T module import Types.Inte
19:34:50 <elliott> rnal.T.
19:35:09 <elliott> A solution almost as elegant as the reciprocal of how many files it produces.
19:35:47 <Deewiant> :-D
19:36:22 <elliott> Having said that, I'd only have two Types.Internal.Foo modules to start with... but it's a slippery slope.
19:37:00 <elliott> Deewiant: The other solution was to not use a global Types thing, but just turn anything circular into a type parameter, meaning I need newtype wrappers for the actual usage. :-|
19:38:32 <Deewiant> Hmm, how does that work?
19:39:05 <elliott> Deewiant: module A where {import B; data A = A B;}; module B where {import A; data B = B A;}
19:39:07 <elliott> -->
19:39:37 <elliott> module A where {data A b = A b;}; module B where {import A; data B = B (A B);}
19:39:56 <elliott> It's not quite a newtype-wrapper, but eurgh, that's even worse than exposing constructors I shouldn't; it's exposing the structure itself.
19:40:15 <Deewiant> But doesn't A need to use the API of B
19:40:43 <elliott> Put that in the structure? :-)
19:41:16 <oerjan> 22:33:09 <Sgeo> My dad thought that my eye could get infected like that
19:41:16 <oerjan> 22:33:32 <Sgeo> (By touching the eyeball if my hands weren't really really really clean)
19:41:17 <elliott> Deewiant: You could still split them up into Types modules but just have one Types.Internal.X for each type, and then you don't need a Types.Internal, just a Types that re-exports the public interface and I guess defines the instantiations of the type variables
19:41:18 <elliott> But ugh
19:41:30 <elliott> oerjan: thank you, I was going to logread but now I won't
19:41:34 <Deewiant> I mean, you have something like module A where f :: A -> Int; f (A b) = g b
19:41:53 <Deewiant> And now you have f :: A b -> Int; f (A _) = error "derp"
19:41:54 <oerjan> _could_ may be the operative word here. i've done that thousands of times.
19:41:57 <elliott> Deewiant: I meant put "g" in the structure but that was facetious.
19:42:01 <elliott> Like I said,
19:42:02 <elliott> <elliott> Deewiant: You could still split them up into Types modules but just have one Types.Internal.X for each type, and then you don't need a Types.Internal, just a Types that re-exports the public interface and I guess defines the instantiations of the type variables
19:42:43 <Deewiant> Right, but if you do that you might as well go with the earlier solution
19:42:52 <oerjan> although come to think of it, my eye _does_ tend to get irritated if i don't wash my hands first.
19:42:53 <elliott> Yeah (this one's less files though)
19:43:49 <oerjan> (also if the speck or eyelash is damn hard to get hold of)
19:44:32 <oerjan> also i sometimes pluck nosehairs, which i hear risks me getting an infection in my nose spreading to my brain or something.
19:46:03 <Deewiant> Only if you pluck them all or something, I think
19:46:30 <Deewiant> Point being that they're there for a purpose but ±1 hair obviously shouldn't make a difference
19:46:41 * elliott systematically starts plucking all his nose hairs.
19:46:46 <elliott> Pretty much the best way to commit suicide I can think of.
19:48:07 <Deewiant> Wikipedia says there's no evidence for it being dangerous, d'oh
19:48:13 <oerjan> elliott: i minimize it somewhat by using my electric razor instead.
19:48:38 <oerjan> also you are far too young to have significant nose hair.
19:49:08 <elliott> Sorry but your lawn is comfortable.
19:49:18 <oerjan> wat
19:49:23 <elliott> I am not getting off it,
19:49:39 <oerjan> ok, but then you better start mowing.
19:50:17 <elliott> I'll use an electric razor
19:51:46 <oerjan> reminds me of my "russ" year, where we had silly assigned tasks, one of which was to cleanse the town square pavillion with a toothbrush.
19:52:44 <elliott> Deewiant: FWIW, the main interdependency is due to fingerprints
19:53:18 <oerjan> elliott: also why are you not taking my `addquote bait.
19:53:20 <elliott> Deewiant: IPs have to hold loaded FP instructions (which obviously include Shiro monadic actions), and Shiro is StateT FungeState IO, and FungeState has to contain IPs
19:53:29 <elliott> oerjan: Which line
19:53:53 <oerjan> at least a couple of them, i think
19:54:16 <elliott> oerjan: sorry im, not smart
19:54:35 <oerjan> `addquote ALL THE LINES
19:54:38 <HackEgo> 637) ALL THE LINES
19:54:46 * oerjan whistles innocently
19:54:51 <elliott> `delquote 637
19:54:52 * elliott cries
19:54:53 <HackEgo> ​*poof*
19:54:55 <oerjan> :(
19:55:05 <elliott> what do you want me to addquote :(
19:55:28 <oerjan> ...if you cannot see it yourself then it probably isn't good enough anyhow.
19:57:00 <elliott> you think too highly of my opinions,
19:57:10 <elliott> is it the mowing one...
19:57:15 <elliott> is it the far too young one...help
19:57:35 <oerjan> neither of those, but if you think they fit...
19:58:03 <elliott> is it toothbrush anecdote,
19:58:10 <oerjan> the "also i sometimes pluck nosehairs" is the one where i started wondering if someone would addquote it
19:58:12 <elliott> is it <oerjan> although come to think of it, my eye _does_ tend to get irritated if i don't wash my hands first.
19:58:12 <elliott> help
19:58:21 <elliott> oerjan: o
19:58:25 <elliott> i thought about, that one,
19:58:26 <oerjan> and the toothbrush one too
19:58:31 <elliott> but i thought it was too much like usual you...
19:58:35 <oerjan> heh :P
19:58:51 -!- Slereah has joined.
19:59:49 -!- GuestIceKovu has quit (Ping timeout: 276 seconds).
20:04:10 <oerjan> is CakeProphet still idle
20:04:28 <oerjan> <CakeProphet> > let permuts = permutations "baby" in (length . nub $ permuts) == (length permuts)
20:04:55 <oerjan> because i could tell him that is True for a finite list iff it has no duplicate elements
20:05:55 <oerjan> and also that compiling to ghc core may be awkward because there is no easy way to compile _from_ it
20:06:01 <elliott> that is probably his intention, no?
20:06:12 <oerjan> what is
20:06:15 <elliott> <oerjan> because i could tell him that is True for a finite list iff it has no duplicate elements
20:06:32 <elliott> and whatever he's doing, if he's planning on compiling to ghc core: ha ha ha ha ha ha ha
20:06:52 <elliott> 03:41:25: <CakeProphet> zzo38: because it is really crappy.
20:06:54 <elliott> hint is not really crappy.
20:07:13 <oerjan> elliott: i have for a few months now since i discovered the reflection package thought that it _really_ needs to be written in core.
20:07:33 <oerjan> with the new ghc plugins, maybe it would even be plausible to achieve
20:07:59 <elliott> oerjan: hmm, what would it do as core?
20:08:59 <oerjan> ...create a typeclass dictionary _directly_ rather than via ridiculously convoluted whatchamacallit in the type system
20:09:16 <elliott> CakeProphet: I am 99 percent sure the limiation of hint there is a limitation in _GHC_, not in hint.
20:09:30 <oerjan> (whatchamacallit represents a simple word which my brain refuses to remember)
20:09:33 <elliott> You could make a symlink to an FD and try and load that.
20:09:48 <elliott> oerjan: coercion? casting?
20:10:00 <oerjan> no, much worse
20:10:05 <elliott> oerjan: unsafeness?
20:10:22 <elliott> oerjan: but I didn't know Core could create typeclass dictionaries. Hey, I wonder if reflection's implementation solves the problem I had with my hack?
20:10:36 <oerjan> those are not _inefficient_ per se. what it does is ridiculously roundabout.
20:10:54 <elliott> oerjan: (did you see that hack?)
20:11:01 <elliott> (I'm convinced I could make it work reliably somehow...)
20:11:05 <oerjan> elliott: well i'm _assuming_ core must be able to, since haskell sometimes requires generating them on the fly
20:11:20 <oerjan> e.g. with polymorphic recursion
20:11:23 <elliott> um it does? surely not report Haskell, iirc with report Haskell typeclasses can be eliminated at runtime entirely
20:11:38 <elliott> I know they can't with GHC, but I'd be surprised if they needed to be _created_ at runtime
20:11:40 <oerjan> no they cannot, not when there is polymorphic recursion
20:11:41 <elliott> rather than just passed around
20:11:48 <elliott> oerjan: can you do polymorphic recursion in report haskell?
20:12:03 <oerjan> yes. you just need an explicit type declaration
20:12:09 <elliott> ok then
20:12:14 <elliott> oerjan: (http://hpaste.org/50760 is the hack I am referring to)
20:12:17 <elliott> the main function works if you do
20:12:20 <elliott> main = a >> b
20:12:23 <elliott> where a and b are the two statements there
20:12:49 <elliott> the idea, if that worked, was to define some TH stuff to define the GADT for an arbitrary specified class, and the functions
20:13:15 <elliott> oerjan: I think it could also let you create dictionaries at runtime, actually
20:13:26 <elliott> if a class contains (a :: T) and (b :: S), then you need
20:13:33 <elliott> erm, and has type parameter t
20:13:35 <elliott> then you need
20:13:45 <elliott> newtype Runtime = Runtime { value :: t, _a :: T, _b :: S }
20:14:00 <elliott> instance Runtime where a = _a; b = _b
20:14:03 <elliott> hmm with some things to unwrap the value
20:14:13 <elliott> I guess it might not be doable exactly like that but I think you can achieve it in general
20:14:19 <elliott> anyway, it's a cool hack :P
20:14:39 <oerjan> elliott: well reflection is stronger since it generates a dictionary containing an actual _value_ in it
20:14:58 <elliott> stronger than unsafeCoerce? :P
20:15:09 <oerjan> yes.
20:15:17 <oerjan> well, possibly.
20:15:30 <elliott> oerjan: I think I could achieve the same thing, really, with a combination of that runtime method plus unsafeCastD, but maybe I'm wrong
20:15:38 <elliott> ShowD a is basically a reification of the show dictionary there, after all
20:16:00 <elliott> and I believe you can define
20:16:08 <elliott> ExplicitShow -> ShowD, ShowD -> ExplicitShow
20:16:11 <elliott> where ExplicitShow is
20:16:22 <elliott> erm, add type parameters there
20:16:26 <elliott> data ExplicitShow a = ExplicitShow { explicit_show :: a -> String }
20:16:39 <elliott> which is all you need to do generate an instance at runtime.
20:16:50 <elliott> so the only problem is that mine breaks if you don't separate out each relevant statement :D
20:16:53 <elliott> I think I need to twiddle with the inliner
20:17:04 <elliott> I wish core wasn't so damn hard to read
20:17:16 <elliott> huh, it is actually doing some inlining here
20:17:33 <oerjan> litD :: ShowD String
20:17:33 <oerjan> litD = unsafeCastD (ShowD :: ShowD Lit)
20:17:39 <oerjan> does that actually _work_?
20:17:53 <elliott> oerjan: yes. read the comment: it works in GHCi
20:17:55 <elliott> and if you change main to
20:17:58 <elliott> main :: IO ()
20:17:59 <elliott> main = a >> b
20:17:59 <elliott> a = print "Hello, world!"
20:17:59 <elliott> b = withInstance litD $ print "Hello, world!"
20:18:00 <elliott> that works too
20:18:11 <elliott> (it isn't really a GHCi problem, more a global-vs-subexpression problem, I think)
20:18:22 <elliott> because the do statement that is main has the incorrect behaviour in ghci too.
20:18:37 <elliott> oerjan: but yes, it works, proving that ShowD is a bona-fide dictionary at runtime
20:18:54 <elliott> and ofc newtypes have identical representation, so the Lit instance is "another" Show instance for String
20:20:22 <oerjan> elliott: i vaguely recall implicit parameters supposedly have similar problems in some uses
20:20:30 -!- ralc has quit (Ping timeout: 260 seconds).
20:21:23 <elliott> oerjan: you mean implementation difficulties or actual runtime bugs?
20:21:26 <oerjan> and they are of course the closest thing ghc has to a _supported_ runtime value-wrapping dictionary
20:21:59 <oerjan> elliott: i think i mean unintuitive differences between expressions that _should_ behave the same
20:22:37 <elliott> right
20:22:45 <elliott> I read in the manual about how adding a type signature can change the result
20:22:48 <elliott> which is gross
20:23:39 <oerjan> elliott: anyway your ShowD still doesn't allow you to wrap a runtime-constructed value into a dictionary, i think. you can replace a dictionary with a different one, but it still must be compile-time defined.
20:24:04 <oerjan> reflection gets around that by essentially defining _all_ necessary dictionaries at compile-time
20:24:32 <oerjan> and using type system calculations to choose the right one
20:24:43 <Sgeo> Reflection?
20:24:47 <Sgeo> As in Data.Reflection?
20:24:49 <elliott> oerjan: um no, I _told_ you you can explicitly do it at runtime
20:24:55 <oerjan> Sgeo: a hackage package
20:24:56 <elliott> <elliott> and I believe you can define
20:24:56 <elliott> <elliott> ExplicitShow -> ShowD, ShowD -> ExplicitShow
20:24:56 <elliott> <elliott> where ExplicitShow is
20:24:56 <elliott> <elliott> erm, add type parameters there
20:24:56 <elliott> <elliott> data ExplicitShow a = ExplicitShow { explicit_show :: a -> String }
20:26:09 <elliott> oerjan: it probably requires lots of unsafeCoerce to do, but I believe it's perfectly possible
20:26:25 <oerjan> elliott: you figure that out then >:)
20:26:52 <oerjan> maybe one could do a more efficient implementation of reflection that way, then
20:27:20 <elliott> hmm, it's certainly rather tricky :) but I _think_ it's possible
20:27:28 <elliott> it might have to be
20:27:34 <elliott> ExplicitShow a -> ShowD (Wrapper a)
20:27:41 <elliott> oerjan: would that still lead to an efficient reflection?
20:27:49 -!- sllide has joined.
20:28:15 <elliott> hm I suppose not, that's a rather obvious instance after all
20:28:16 <elliott> but maybe
20:28:29 <elliott> I suppose I should ask what the runtime representation of dictionaries is like?
20:31:03 <oerjan> i suppose it would be obvious from the core, i haven't tried testing it
20:31:29 <elliott> nothing is obvious from Core :)
20:32:03 <oerjan> also a polymorphic recursion case to show how values or at least subdictionaries are put into them
20:32:11 <CakeProphet> oerjan see he core. he has the power.
20:32:44 <oerjan> data Tree a = Leaf a | Tree (a,a) deriving Show would be a good example, i think
20:32:51 <zzo38> I found in some foot-shooting list they added how to shoot your foot with Haskell: Make a copy of the entire universe except your foot has a hole.
20:33:34 <oerjan> zzo38: heh
20:34:16 <oerjan> that might be FullBinaryTree, technically
20:35:15 <oerjan> elliott: ^ that should be an example of a Show instance that requires generating new Show instances internally
20:35:28 <elliott> oerjan: I believe you typo'd
20:35:32 <elliott> what you have there is not a tree.
20:35:48 <oerjan> elliott: <oerjan> that might be FullBinaryTree, technically
20:36:00 <elliott> um no, I believe you've made a _big_ mistake.
20:36:04 <elliott> what you have is Either a (a,a).
20:36:12 <oerjan> ...ah.
20:36:31 <oerjan> *data Tree a = Leaf a | Tree (Tree (a,a))
20:36:35 <elliott> that makes more sense :)
20:36:46 <elliott> I might look at the show instance for that, but anything with constructors is really hideous in core
20:38:06 <oerjan> elliott: maybe the function showLeaf (Leaf a) = show a; showLeaf (Tree t) = showLeaf t might be cleaner?
20:38:21 <elliott> oerjan: hmm, yes, probably
20:38:29 <elliott> I'll try that
20:39:42 <elliott> oerjan: heh, either the dictionary gets inlined somehow, or ghc-core is hiding it from me >_<
20:39:52 <oerjan> ouch
20:40:29 <oerjan> maybe i'm wrong about the construction-on-the-fly then, although how could that be...
20:40:34 <elliott> oerjan: http://hpaste.org/50901
20:40:51 <elliott> it's obviously taking in a show instance
20:40:52 <elliott> ($dShow_aiO)
20:40:58 <elliott> but it just passes it onto show
20:41:01 <elliott> it doesn't need to construct anything
20:41:13 <elliott> it does a worker/wrapper transform by the looks of it so that $dShow_aiO is only passed in once rather than on recursion
20:41:18 <elliott> lvl_sjs being the worker
20:41:19 -!- monqy has joined.
20:42:56 <oerjan> elliott: no, a_sjx is a constructed Show instance
20:43:16 <elliott> oh
20:43:24 <elliott> $fShow(,) is ShowD a -> ShowD b -> ShowD (a,b)?
20:43:27 <elliott> approximately
20:43:40 <oerjan> probably
20:43:43 <elliott> oerjan: sounds like I need to define my own tuple type to see what $fShow(,) looks like
20:44:01 <oerjan> hm, right
20:44:41 <elliott> oerjan: aha
20:45:20 <oerjan> hm?
20:45:45 <elliott> oerjan: http://hpaste.org/50902
20:45:54 <elliott> oerjan: I suspect this more be readable without the -O2 I gave it
20:47:06 <CakeProphet> yeah I have no idea what that is saying.
20:47:19 <elliott> oerjan: oh hm
20:47:25 <elliott> oerjan: I should define my own that uses show rather than showsPrec
20:48:07 <CakeProphet> are these instances of show?
20:48:07 <oerjan> that might be easier to read yeah
20:48:13 <oerjan> CakeProphet: yes
20:48:32 <elliott> M.$fShowTuple [InlPrag=[ALWAYS] CONLIKE]
20:48:32 <elliott> :: forall a_abQ b_abR.
20:48:32 <elliott> (Show a_abQ, Show b_abR) =>
20:48:32 <elliott> Show (M.Tuple a_abQ b_abR)
20:48:32 <elliott> [GblId[DFunId],
20:48:34 <elliott> Arity=2,
20:48:35 <CakeProphet> M. = method?
20:48:36 <elliott> Unf=DFun(arity=4) D:Show [{M.$fShowTuple_$cshowsPrec},
20:48:38 <elliott> {M.$fShowTuple_$cshow}, {M.$fShowTuple_$cshowList}]]
20:48:40 <elliott> M.$fShowTuple =
20:48:42 <elliott> \ (@ a_abQ)
20:48:44 <oerjan> CakeProphet: btw this is somewhat vaguely descended from your question about compiling to core
20:48:44 <elliott> (@ b_abR)
20:48:45 <CakeProphet> $ = perl? :P
20:48:46 <elliott> ($dShow_afR :: Show a_abQ)
20:48:48 <elliott> ($dShow1_afS :: Show b_abR) ->
20:48:50 <elliott> D:Show
20:48:51 <CakeProphet> oerjan: ah I see.
20:48:52 <elliott> @ (M.Tuple a_abQ b_abR)
20:48:54 <elliott> (M.$fShowTuple_$cshowsPrec @ a_abQ @ b_abR $dShow_afR $dShow1_afS)
20:48:56 -!- elliott has left ("Leaving").
20:49:00 -!- elliott has joined.
20:49:03 <CakeProphet> yes I was wondering if I could utilize Haskell bindings if I had a language that compiled to Core.
20:49:04 <elliott> (M.$fShowTuple_$cshowList @ a_abQ @ b_abR $dShow_afR $dShow1_afS)
20:49:06 <elliott> flood but w/e
20:49:08 <elliott> CakeProphet: M is my module obviously
20:49:09 <oerjan> CakeProphet: my comment to which is that ghc makes it very awkward if at all possible to compile _from_ core
20:49:10 <elliott> oerjan: there you go, that's what they look like in Core
20:49:12 <elliott> ok let's try that again
20:49:14 <elliott> CakeProphet: core cannot be compiled
20:49:20 <elliott> it's not possible
20:49:22 <elliott> there is no parser
20:49:45 <elliott> oerjan: http://hpaste.org/raw/50903
20:49:45 <CakeProphet> none of the other ILs too I imagine?
20:49:54 <elliott> oerjan: that's what the instance constructor looks like
20:50:04 <elliott> CakeProphet: Cmm has a parser; in fact part of the RTS is written in Cmm
20:50:22 <elliott> CakeProphet: Agda compiles to Haskell with a lot of unsafeCoerces
20:50:29 <elliott> (for "performance")
20:50:32 <elliott> (it's still slow)
20:50:57 <CakeProphet> so then I would use Cmm as my target and hope that at that level there's still interfacable bindings.
20:51:17 <elliott> oerjan: anyway, I suppose this just begs the question of what D:Show looks like
20:51:41 <elliott> CakeProphet: it won't work well.
20:51:59 <CakeProphet> Haskell.NET
20:52:46 <CakeProphet> it would be nice if they redesigned the ILs to support other languages using Haskells awesome libraries for awesome things.
20:52:46 <oerjan> CakeProphet: there is however last (well, the only time) i checked in the ghc API a _very_ rudimentary function for compiling a single module from the _internal_ core representation
20:53:10 <oerjan> but it has a comment to the effect it has only been tested for that case
20:53:20 <CakeProphet> oh good.
20:53:33 <oerjan> (well had, there's a new ghc version out so things might have improved for all i know)
20:53:39 <oerjan> *may
20:53:39 <CakeProphet> sounds like a good basis to build a compiler on.
20:56:44 <oerjan> elliott: i suppose D:Show is the constructor for a Show dictionary, which is just passed the methods? also i assume you have the code for M.$fShowTuple_$cshowsPrec etc. in your full output.
20:57:06 <CakeProphet> essentially any kind of language I build on top of Haskell's environment would be more or less a set of extensions.
20:57:17 <CakeProphet> but enough to warrant a new language/dialect
20:57:26 <CakeProphet> oh hey, I could always compile to Haskell.
20:57:45 <elliott> oerjan: I do have the code but it's boring. Yes, D:Show is the dictionary constructor, which I bet isn't given any real "definition" in Core, but I can define my own class to check.
20:58:38 <oerjan> elliott: why wouldn't it have a definition, i assume Show is a completely ordinary class if you ignore derivations...
20:59:01 <oerjan> it probably is in whatever module defines Show
20:59:27 <elliott> oerjan: yes, but D: _is_ the class
20:59:39 <elliott> but OK, I'll define my own class to see
21:00:08 <elliott> oerjan: yep, at least with ghc-core, D:Aah isn't created
21:00:09 <elliott> just
21:00:13 <elliott> M.ooh [InlPrag=[NEVER]] :: forall a_abI. M.Ooh a_abI => a_abI
21:00:13 <elliott> [GblId[ClassOp],
21:00:13 <elliott> Arity=1,
21:00:13 <elliott> Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=1, Value=True,
21:00:13 <elliott> ConLike=True, Cheap=True, Expandable=True,
21:00:13 <elliott> Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True)},
21:00:15 <elliott> RULES: Built in rule for M.ooh: "Class op ooh"]
21:00:17 <elliott> M.ooh =
21:00:19 <elliott> \ (@ a_abI) (tpl_B1 [Occ=Once!] :: M.Ooh a_abI) ->
21:00:21 <elliott> case tpl_B1 of _ { M.D:Ooh tpl_B2 [Occ=Once] _ -> tpl_B2 }
21:00:23 <elliott> and the same for my other method aah
21:00:28 <elliott> I suspect D:Ooh is "defined" at some other level
21:01:15 <CakeProphet> a magical land deep below Core
21:01:20 <oerjan> CakeProphet: there is also the new ghc plugin system in the latest version, which i assume does core to core transformations
21:01:30 <elliott> oerjan: just checked with -ddump-simpl
21:01:36 <elliott> if D:Ooh is defined in core, it's sure not printed by GHC
21:01:46 <elliott> oerjan: I suspect, instead, the typeclass info goes into the .hi
21:01:56 <oerjan> ah
21:02:01 <elliott> and then the actual Cmm or whatever for the class constructor is constructed on the fly
21:02:21 <elliott> oerjan: otoh, from the way pattern-matching and the like is used in it, I have this _wonderful_ feeling that it might look like a regular data type
21:02:21 <elliott> i.e.
21:02:28 <elliott> class Ooh a where { ooh :: a; aah :: a -> () }
21:02:30 <elliott> might look like
21:02:36 <elliott> data Ooh a = Ooh { ooh :: a, aah :: a -> () }
21:02:37 <elliott> at runtime
21:02:54 <elliott> ...otherwise "case" has special behaviour when you use something prefixed with D:
21:02:55 <elliott> which is gross
21:03:06 <oerjan> elliott: well afaiu core's System F has no concept of classes and instances, so it should be that way
21:03:10 <CakeProphet> elliott: ewwwww
21:03:24 <elliott> CakeProphet: What?
21:03:27 <elliott> oerjan: indeed
21:03:29 <CakeProphet> gross.
21:03:31 <elliott> oerjan: but I mean, it could be unboxed ors omething
21:03:39 <elliott> CakeProphet: what is?
21:03:52 <CakeProphet> special cases of case.
21:04:01 <oerjan> elliott: the one thing istr reading is that dictionaries are always unboxed as a whole
21:04:06 <elliott> CakeProphet: it was just a hypothesis
21:04:31 <elliott> oerjan: hm well I wish I knew how Core parameter lists worked, because normal parameters seem to be prefixed with @ like (@ a) but the typeclasses aren't
21:04:45 <elliott> I guess it might mean unboxed
21:05:02 <oerjan> elliott: um @ signifies a _type_ parameter, not a value, iiuc
21:05:06 <elliott> oh
21:05:11 <elliott> that makes more sense :)
21:05:16 <elliott> oerjan: but modulo unboxing, I suspect you can simply define the equivalent (existential) data type for a class and have it be coercable directly to the dictionary type
21:05:27 <oerjan> system F works that way with explicit type arguments
21:05:37 <elliott> oerjan: ooh, if ShowD looks like (ShowD UnboxedDictionary), then it's boxed
21:05:51 <elliott> oerjan: and so an explicitly-defined record should have the same runtime representation as ShowD
21:05:53 <elliott> and be coercable directly
21:06:23 <oerjan> elliott: maybe. but that still leaves the question of getting any runtime value _into_ a dictionary
21:06:24 <CakeProphet> it is defined by a huge table of which pairs of types results in what.
21:06:29 <CakeProphet> er what
21:06:36 <CakeProphet> wrong paste :P
21:06:43 <CakeProphet> http://hackage.haskell.org/trac/ghc/browser/compiler/supercompile/Supercompile/Core/Syntax.hs?rev=5a142af2955f7cda76c2e63104e7672044cffaa2
21:06:54 <CakeProphet> is this helpful? I'm guessing it's Core syntax stuff
21:07:02 <oerjan> (which in my understanding is the sticking point which makes all of reflection's hoops necessary)
21:07:05 <elliott> CakeProphet: not... really
21:07:20 <elliott> oerjan: I'm still not sure what you _mean_ by that
21:07:21 <elliott> if you have
21:07:39 <elliott> data ExplicitShow a = ExplicitShow { show :: a -> String, shows :: blah blah, showsPrec :: blah blah, showList :: blah blah }
21:07:51 <elliott> and ExplicitShow a -> ShowD a (and assuming ShowD and withInstance work properly)
21:08:05 <elliott> then how does that not let you put any runtime value in you want?
21:08:07 <CakeProphet> http://research.microsoft.com/en-us/um/people/simonpj/papers/ext-f/fc-tldi.pdf
21:09:14 <CakeProphet> doesn't seem to mention the @ so I guess it's not an exact replica of what GHC uses.
21:11:05 <oerjan> elliott: oh you are assuming dictionaries have the exact same representation as an ordinary record. yeah i guess if you could do that...
21:11:24 <oerjan> (you probably want to at least use seq on that record first)
21:11:26 <elliott> oerjan: well they are eliminated with "case" in core in the _exact same way_ data-types are.
21:12:11 <elliott> oerjan: so either case changes behaviour based on something totally gross like whether the name is a class dictionary, or it's equivalent to a data-type, modulo strictness and unboxing
21:12:26 <oerjan> elliott: the CONLIKE pragma, does it mean that the function result is always a strict constructor?
21:12:35 <elliott> strictness can be controlled, and since my ShowD introduces an additional layer, if dictionaries are unboxed than ExplicitShow should have the exact same representation as ShowD
21:12:43 <elliott> oerjan: no, that's an inlining thing
21:12:50 <elliott> CONLIKE means it's safe to duplicate a call at very low cost
21:12:53 <oerjan> istr seeing it before but have forgotten
21:12:55 <elliott> (this is in the manual)
21:12:57 <oerjan> ok
21:12:59 <elliott> it's useful for rules
21:13:14 <CakeProphet> @a is apparently a "type argument"
21:13:15 <lambdabot> Maybe you meant: activity activity-full admin all-dicts arr ask . ? @ v
21:13:37 <elliott> CakeProphet: yes, that's what oerjan told me right after I asked :P
21:14:41 <CakeProphet> >_>
21:14:53 <oerjan> elliott: well since core is supposed to be extremely simple they probably haven't made a distinction unless it's absolutely necessary
21:15:08 <elliott> oerjan: indeed. so they should, in fact, have the exact same representation
21:15:10 <oerjan> (between data and dictionary)
21:15:14 <elliott> ?src Show
21:15:15 <lambdabot> class Show a where
21:15:15 <lambdabot> showsPrec :: Int -> a -> ShowS
21:15:15 <lambdabot> show :: a -> String
21:15:15 <lambdabot> showList :: [a] -> ShowS
21:15:24 <elliott> hmm, I hope that ordering is authoritative
21:15:35 <elliott> seems to be the same in ghci so that's good
21:15:54 <monqy> why would ordering matter are you doing something icky :(
21:16:08 <elliott> monqy: yes
21:16:13 <monqy> :(
21:16:25 <oerjan> elliott: it's the same as in the core you pasted
21:16:30 <elliott> oerjan: heh, thanks :P
21:16:43 -!- augur has quit (Remote host closed the connection).
21:17:31 <oerjan> monqy: he is going to use unsafeCoerce to convert a record into a class instance :P
21:17:55 <elliott> oerjan: hm I suspect the fields are _not_ strict
21:17:57 <elliott> oerjan: you can do
21:18:02 <elliott> instance Show Blah where show = error "x"
21:18:07 <elliott> and it works fine until you call show
21:18:11 <oerjan> elliott: indeed
21:18:18 <elliott> so it's just the record itself that's strict
21:18:48 <oerjan> and the report afair says that undefined methods are treated as, well, undefined
21:19:15 <oerjan> (i think i recently saw that ghc has a specific exception for those though)
21:19:18 <elliott> oerjan: it works
21:19:21 <elliott> dear god, it works
21:19:45 <elliott> *Main> b
21:19:45 <elliott> *** Exception: help
21:19:49 <elliott> explicit_lit :: ExplicitShow String
21:19:49 <elliott> explicit_lit = ExplicitShow
21:19:50 <elliott> { explicit_showsPrec = error "help"
21:19:50 <elliott> , explicit_show = \s -> s
21:19:50 <elliott> , explicit_showList = error "helpList" }
21:19:51 <oerjan> > "*MW" ++ cycle "AH"
21:19:53 <lambdabot> "*MWAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA...
21:20:07 <elliott> er, hm.
21:20:11 <elliott> but why is it using the showList case?
21:20:26 <elliott> I guess I should try something that isn't a list type first
21:20:32 <oerjan> you mean showsPrec?
21:20:46 <elliott> oh
21:20:47 <elliott> duh :)
21:20:57 <elliott> ?src show
21:20:57 <lambdabot> show x = shows x ""
21:20:58 <elliott> ?src showList
21:20:59 <lambdabot> Source not found. It can only be attributed to human error.
21:21:02 <elliott> >:|
21:21:36 <elliott> *Main> b
21:21:36 <elliott> <interactive>: internal error: PAP object entered!
21:21:36 <elliott> (GHC version 7.0.4 for x86_64_unknown_linux)
21:21:36 <elliott> Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
21:21:36 <elliott> Process haskell aborted
21:21:38 <elliott> oerjan: it could be worse
21:21:42 <elliott> ok, so function members don't work.
21:21:47 <elliott> "enter" is unsafeCoerce jargon I know.
21:21:48 <CakeProphet> ::::D
21:21:55 <elliott> oerjan: maybe function fields do have to be strict, or something...
21:22:14 <elliott> indeed, error "x" works but \_ -> error "x" doesn't
21:22:23 <CakeProphet> clearly this is a question for #haskell-in-depth
21:22:37 <oerjan> elliott: insane idea: you might want to convert a Show dictionary _to_ your type so you can use the usual showsPrec and showList from it
21:23:00 <CakeProphet> that is indeed insane.
21:23:18 <elliott> CakeProphet: I'm asking #ghc
21:23:31 <oerjan> see elliott get banned from #ghc for life
21:23:31 <CakeProphet> probably a better place to ask.
21:23:35 <elliott> oerjan: that would be useful, yes
21:23:43 <elliott> and might help me find out what the difference in representation is
21:23:49 * CakeProphet is currently waiting for the banhammer
21:24:01 <monqy> is the excitement in #ghc now
21:24:06 <CakeProphet> no
21:24:14 <elliott> *Main> explicit_show (implicit (ShowD :: ShowD String)) "abc"
21:24:14 <elliott> "
21:24:14 <elliott> Process haskell segmentation fault
21:24:15 <elliott> ah.
21:24:19 <CakeProphet> #esoteric is always the root of the party.
21:24:30 <elliott> oerjan: ok I should probably try a class that contains some innocuous value rather than a function.
21:24:31 <Vorpal> elliott, idea for elliottcraft: http://www.youtube.com/watch?v=ZXxDnx_UE6I (yogscast)
21:25:39 <Vorpal> elliott, watch it!
21:25:41 <elliott> looks nice
21:25:49 <Vorpal> yep
21:25:55 <elliott> not sure it fits in stylistically
21:26:31 <Vorpal> elliott, no, but you could do a game like it that was high def in other places too. I think it could work fairly well, and would also avoid "yet another minecraft clone" feel
21:26:44 <elliott> I don't want it to look like the real world, at least
21:26:49 <elliott> that boat sure is hd
21:27:25 <elliott> go underwater dammit
21:27:46 <Vorpal> elliott, he doesn't in the video sadly
21:28:06 <Vorpal> elliott, I will probably try out that mod tomorrow
21:28:23 <Vorpal> should run fine on my high end gpu
21:28:30 <oerjan> <elliott> indeed, error "x" works but \_ -> error "x" doesn't <-- so this is the same as that difference between data and function for unsafeCoerce, right?
21:28:35 <elliott> do the squisd like it
21:28:45 <Vorpal> no idea
21:28:53 <elliott> oerjan: I suspect so; I wonder if unsafeCoerce (error "x" :: Int) :: function type works the same way?
21:28:54 <elliott> I suspect it might
21:28:57 <elliott> except the ohter way around
21:29:02 <Vorpal> elliott, also I think that mod needs a HD texture pack to not be too jarring
21:29:10 * elliott tries strictifying for the hell of it
21:29:45 <Vorpal> elliott, I'd also like to see waterfalls
21:29:47 <elliott> oerjan: wat, now it uses show instead of showsPrec
21:29:54 <elliott> oh, I think that's correct
21:29:56 <elliott> print should invoke show, after all
21:30:02 <elliott> *Main> explicit_show (implicit (ShowD :: ShowD String)) "abc"
21:30:02 <elliott> "
21:30:02 <elliott> Process haskell segmentation fault
21:30:06 <elliott> haksel :(
21:30:18 <elliott> oerjan: what, then changing show to
21:30:20 <elliott> \_ -> error "help show"
21:30:22 <elliott> causes showList to be called
21:30:26 <Vorpal> <elliott> Process haskell segmentation fault <-- how?
21:30:26 <elliott> oh duh
21:30:27 <oerjan> elliott: um shouldn't you have an argument for the actual value _printed_?
21:30:29 <elliott> because
21:30:33 <elliott> strict fields
21:30:34 <elliott> duh
21:30:38 <elliott> Vorpal: it's not hard
21:30:43 <elliott> *Main> b
21:30:43 <elliott> <interactive>: internal error: PAP object entered!
21:30:43 <elliott> (GHC version 7.0.4 for x86_64_unknown_linux)
21:30:43 <elliott> Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
21:30:43 <elliott> Process haskell aborted
21:30:46 <elliott> ok that is definitely not better.
21:30:49 <Vorpal> elliott, using some language extension?
21:30:55 <elliott> Vorpal: unsafecoerce
21:30:57 <Vorpal> ah
21:31:06 <Vorpal> well okay, no wonder it crashes
21:31:06 <oerjan> elliott: it looks to me like your explicit_show has one argument missing
21:31:14 <elliott> Warning: Ignoring unusable UNPACK pragma on the
21:31:14 <elliott> third argument of `ExplicitShow'
21:31:21 <elliott> guess you can't unpack functions
21:31:25 <elliott> , explicit_show :: {-# UNPACK #-} !(a -> String)
21:31:25 <elliott> oerjan: no?
21:31:29 <elliott> the implementation did
21:31:31 <elliott> but that's before i strictified
21:31:37 <elliott> oerjan: if you mean i missed out the argument, duh
21:31:38 <elliott> you can say
21:31:40 <elliott> show = error "foo"
21:31:41 <elliott> too
21:31:51 <oerjan> well yes
21:31:52 <elliott> but hmm
21:32:09 <elliott> oerjan: ok i suspect the function representation is different, then.
21:32:10 <oerjan> but if it doesn't error, it needs to be a function?
21:32:14 <elliott> i am not sure _how_.
21:32:47 <oerjan> elliott: what does that M.$fShowTuple_$cshow you didn't paste before look like?
21:33:14 <elliott> oerjan: um, like you'd expect it to? do you want me to run it again
21:33:46 <oerjan> it's just that it's what's put in the dictionary
21:33:48 <elliott> M.$w$cshow
21:33:48 <elliott> :: forall a_abJ b_abK.
21:33:48 <elliott> (Show a_abJ, Show b_abK) =>
21:33:48 <elliott> a_abJ -> b_abK -> [Char]
21:33:48 <elliott> [GblId,
21:33:48 <elliott> Arity=4,
21:33:50 <elliott> Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=4, Value=True,
21:33:52 <elliott> ConLike=True, Cheap=True, Expandable=True,
21:33:54 <elliott> Guidance=IF_ARGS [3 3 0 0] 14 3}]
21:33:56 <elliott> M.$w$cshow =
21:33:58 <elliott> \ (@ a_abJ)
21:34:00 <elliott> (@ b_abK)
21:34:04 <elliott> (w_sio :: Show a_abJ)
21:34:06 <elliott> (w1_sip :: Show b_abK)
21:34:08 <elliott> (ww_sis :: a_abJ)
21:34:10 <elliott> (ww1_sit :: b_abK) ->
21:34:12 <elliott> :
21:34:13 <Vorpal> how long is this?
21:34:14 <elliott> @ Char
21:34:16 <elliott> M.$fShowTuple4
21:34:18 <elliott> (++
21:34:20 <elliott> @ Char
21:34:22 <elliott> [boring stuff]
21:34:24 <elliott> that's for
21:34:26 <elliott> instance (Show a, Show b) => Show (Tuple a b) where
21:34:27 <Vorpal> pastebin might have taken less time to paste
21:34:28 <elliott> show (Tuple a b) = "X" ++ show a ++ "Y" ++ show b ++ "Z"
21:34:30 <elliott> oh hm
21:34:34 <elliott> that's not M.$fShowTuple_$cshow
21:34:36 <elliott> oerjan: http://sprunge.us/fLTc
21:37:13 <elliott> oerjan: found the discrepancy yet? :-P
21:37:30 <oerjan> erm no
21:37:37 * CakeProphet got into a debate on the difference between setting attributes to None vs. using getattr and setattr to check for undefined attributes in objects that may or may not have a large number of attributes defined.
21:37:42 <CakeProphet> in #python
21:38:02 <CakeProphet> my stance was that it made no difference. and there's what that checking for attribute existence is /bad style.
21:38:07 <elliott> the former is obviously the correct solution.
21:38:11 <elliott> the other one is horrible.
21:38:13 <CakeProphet> ...
21:38:22 <elliott> if you disagree, you are wrong. (this is true independent of language.)
21:38:44 <CakeProphet> I say it makes no difference and amounts to almost the same code.
21:39:19 <elliott> yes, you have repeatedly shown a lack of understanding of possible vs. a good idea
21:39:52 <CakeProphet> no difference. same amount of code.
21:40:17 <CakeProphet> actually more in the case of None because you have to set all of the attributes to None.
21:40:36 <elliott> lines of code is not the only way to measure code.
21:40:41 <CakeProphet> correct you are.
21:40:49 <elliott> but it _is_ revealing that you are using it that way.
21:41:24 <CakeProphet> is hasattr(self, "attr") or getattr(self, "attr", default) objectively worse than self.attr is None and self.attr if self.attr is None else default?
21:41:40 <CakeProphet> or is it just a stylistic preference?
21:41:41 <elliott> yep
21:41:44 <elliott> objectively worse
21:41:54 -!- Nisstyre has quit (Quit: Leaving).
21:42:27 <oerjan> elliott: my hunch is that if that error happens when functions and data types are confused, then something _must_ be applied to the wrong number of arguments somewhere
21:42:51 <elliott> oerjan: I have a feeling that classes contain multiple argument functions
21:42:53 <monqy> im agre with elliott
21:42:54 <CakeProphet> same code. in the same place. to the same effect. I don't see the difference other "oh no this one uses strings literals".
21:42:58 <elliott> oerjan: or something
21:43:01 <elliott> hmm ,ayme bt not
21:43:03 <CakeProphet> *other than
21:43:18 <elliott> CakeProphet: sorry, I doubt I could explain it to you because of your incorrect perspective.
21:43:27 <oerjan> elliott: but a method can be any haskell value can it not
21:43:46 <elliott> oerjan: doesn't stop ghc treating them specially
21:43:50 <elliott> ok did you actually look at that core? i fnot i will
21:44:01 <oerjan> say if you put trace on one like trace "mumble" $ \x -> ... wouldn't that trace have to be applied only once
21:44:21 <oerjan> and even if you just seq the method
21:44:24 <elliott> i don't think there's any guarantees about thta
21:44:29 <elliott> trace is unsafe
21:44:37 <oerjan> ok not guarantee but most likely
21:44:47 <elliott> <elliott> ok did you actually look at that core? i fnot i will
21:44:54 <oerjan> i guess my seq comment is what i really mean
21:45:13 <oerjan> elliott: i don't know what i'm comparing _to_ :P
21:45:21 <elliott> oerjan: um what i pasted above
21:45:27 <elliott> is the actual M.$w$cshow implementation
21:45:53 <oerjan> which is put in a record?
21:46:06 <elliott> um, no, this is the old testcase you asked about.
21:46:17 <elliott> do you want me to define an equivalent function at top level and show that?
21:46:23 <CakeProphet> elliott: I agree it makes sense when there's only a small number of attributes to set to None. but the context was for a game in which the object could easily have large numbers of attributes undefined.
21:46:30 <oerjan> yes. but now i don't know what the things in the records look like :P
21:46:33 <elliott> CakeProphet: sorry, uninterested.
21:46:41 <elliott> oerjan: gimme a minute
21:47:49 <zzo38> http://sprunge.us/cDPR
21:47:59 <elliott> ah.
21:50:19 <oerjan> elliott: btw are you making sure to evaluate your record before unsafeCoerce'ing it?
21:50:27 <elliott> oerjan: with seq, yes.
21:50:48 <zzo38> Is this program the Obfuscated Haskell Contest program? Not quite.
21:50:56 <oerjan> hm might strictness analysis mess that up somehow?
21:51:19 <CakeProphet> turning off -O removes strictness analysis right?
21:51:42 <itidus20> some tasks require more performance than others. if the data set is large such as hex editing a 1gb file or doing batch processing then performance will matter more and more. or some programs such as "some" video games or emulators will seek to maximize performance.
21:51:48 <oerjan> i mean, if ghc doesn't think that unsafeCoerce can change whether something is strict, that might mess things up
21:52:16 <itidus20> And with multitasking apps will want each other to be polite guests
21:52:41 <elliott> oerjan: hm
21:52:45 <elliott> oerjan: what do you mean?
21:52:52 <elliott> oerjan: oh i think i might need pseq instead of seq to be sure
21:53:03 <oerjan> elliott: ah right that might work
21:54:12 <oerjan> elliott: i mean, it might detect that the seq is redundant in something like x `seq` unsafeCoerce x, but be wrong because x is put into a dictionary on the converted side
21:54:18 <oerjan> er
21:54:48 <elliott> oerjan: well pseq did not help.
21:54:49 <oerjan> * x `seq` unsafeCoerce (YourStrictRecord x)
21:55:03 <elliott> explicit :: ExplicitShow a -> ShowD a
21:55:03 <elliott> explicit a = a `pseq` unsafeCoerce a
21:55:13 <elliott> no seqing of the fields is done; that's surely incorrect to do
21:55:38 <oerjan> elliott: seq one of the fields you don't use, for good measure :P
21:55:39 <zzo38> Does the program I posted work?
21:55:49 <zzo38> Improve it if you like to do so
21:55:53 <oerjan> in fact if possible _print_ it IO
21:56:06 <oerjan> then ghc cannot possibly get around evaluating it first
21:56:12 <oerjan> *in IO
21:56:15 <elliott> oerjan: um I have no idea what you are talking about, do you mean for the conversion the other way around?
21:56:31 <elliott> explicit_lit :: ExplicitShow String
21:56:31 <elliott> explicit_lit = ExplicitShow
21:56:31 <elliott> { explicit_showsPrec = \_ -> error "help" -- \_ s t -> s ++ t
21:56:31 <elliott> , explicit_show = \_ -> error "help show"
21:56:31 <elliott> , explicit_showList = \_ -> error "help showList" }
21:56:34 <elliott> how will printing any of these help at all?
21:57:09 <oerjan> elliott: er they are _all_ error? i guess that's not useful to print. you might apply and catch.
21:57:54 <oerjan> elliott: i'm just suggesting making as absolutely sure as you can that ghc doesn't convince itself that it can avoid evaluating the record before converting it
21:58:06 <elliott> oerjan: I could just look at the core rather than relying on voodoo.
21:58:11 <oerjan> or that :P
21:58:43 <oerjan> elliott: it's just that the one thing i _do_ recall about ghc's class dictionaries is that ghc assumes they are strict
21:59:04 <oerjan> so a value containing them will not have them evaluated before use
21:59:19 <elliott> oerjan: the fact that I get the errors properly if I do (error "foo") rather than (\_ -> error "foo") seems to prove I'm doing it right.
21:59:22 <elliott> or it'd just segfault or whatever.
21:59:25 <elliott> if it was lazy
21:59:28 <oerjan> elliott: ok
21:59:34 <elliott> main3 =
21:59:34 <elliott> lazy
21:59:34 <elliott> @ (ShowD String)
21:59:34 <elliott> (main4
21:59:34 <elliott> `cast` (CoUnsafe
21:59:34 <elliott> (ExplicitShow String) (ShowD String)
21:59:36 <elliott> :: ExplicitShow String ~ ShowD String))
21:59:38 <elliott> i have no idea what's going on :D
21:59:54 <elliott> WHAT
22:00:10 <CakeProphet> main3 lazy ShowD is my rapper name.
22:00:11 <oerjan> elliott: hm maybe a class method really _must_ not be a function in that unsafeCoerce sense, then.
22:00:20 <Deewiant> CoUnsafe sounds good
22:00:39 <elliott> oerjan: just a second, something's insane
22:00:53 <oerjan> we all are
22:01:05 <elliott> _wtf._
22:01:20 <elliott> oerjan: it briefly worked (producing "help show")
22:01:23 <elliott> but on GHCi restart, it doesn't.
22:01:55 <elliott> oerjan: unfortunately nobody is replying in the ghc chanenl :(
22:02:08 <elliott> hmm
22:02:34 <elliott> oerjan: ok i'm going to try the thing i was going to try
22:03:26 -!- Necrosporus has quit (Ping timeout: 245 seconds).
22:03:30 <oerjan> elliott: they've gone into hiding. btw what happens if you have a method whose type is _not_ a function?
22:03:42 <oerjan> i.e. an actual data type
22:03:54 <elliott> oerjan: I was going to try that next, but I'm going to figure this out first
22:04:03 <oerjan> food ->
22:04:12 <elliott> M.ooh' = plusInt
22:04:12 <elliott> M.$fOohInt =
22:04:12 <elliott> plusInt
22:04:12 <elliott> `cast` (sym (M.NTCo:T:Ooh Int)
22:04:12 <elliott> :: (Int -> Int -> Int)
22:04:13 <elliott> ~
22:04:15 <elliott> M.T:Ooh Int)
22:04:24 <elliott> oerjan: ok so the core definition is identical apart from a cast
22:04:42 <elliott> and I think casts are just unsafeCoerce casts plus a proof
22:08:37 <CakeProphet> this looks pretty helpful: http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/Coercions
22:09:52 <elliott> "The nd binding extracts the Num superclass dictionary from the C dictionary; the case expression is called a superclass selector."
22:10:01 <elliott> hmm
22:10:10 <elliott> oerjan: Show has no superclasses but maybe it has a free field for them?
22:10:20 <oerjan> huh
22:10:35 <elliott> hmm
22:11:01 <oerjan> elliott: btw when you had just error ..., the correct error was raised according to which method you were trying to call?
22:11:18 <elliott> oerjan: yes, except when i wanted to unbox
22:11:26 <elliott> which just failed horribly
22:12:28 <elliott> 05:28:07: <Sgeo> It's not possible to go to an eye doctor to preemptively ask if you just infected your eye, is it?
22:12:32 <elliott> oerjan: i'm blaming you for my suffering
22:12:44 <oerjan> O KAY
22:12:48 <elliott> tempted to touch my eye to feel smug but i'd have a hard time making myself do that
22:12:49 <Lymee> :t Some
22:12:49 <lambdabot> Not in scope: data constructor `Some'
22:12:53 <Lymee> :t \x -> Some x
22:12:54 <lambdabot> Not in scope: data constructor `Some'
22:12:56 * Lymee ?
22:13:00 <elliott> Lymee: ?
22:13:10 <elliott> it helps to ask a question in english rather than just babbling invalid haskell
22:13:20 <elliott> what do you think Some is?
22:13:24 <Lymee> Experiments. >:c
22:13:28 <elliott> what do you think Some is?
22:13:38 <Lymee> a -> Maybe a?
22:13:39 <Sgeo> Isn't Some the ML equiv of Just?
22:13:42 <elliott> Lymee: Just
22:13:46 <Lymee> Uh opps
22:13:48 <Lymee> Wrong language
22:14:41 <CakeProphet> I am the right language.
22:14:49 <CakeProphet> I will guide your communication.
22:15:00 <monqy> ok
22:15:22 <elliott> 10:16:41: <Deewiant> CakeProphet: MultiParamTypeClasses for Match, FlexibleInstances for that instance (because it uses 'a' twice)
22:15:26 <elliott> Deewiant: Undecidable
22:15:28 <elliott> instances, that is
22:15:33 <Deewiant> Not needed for that alone
22:15:43 <elliott> um are you sure? maybe Overlapping then?
22:15:44 <elliott> I know that
22:15:47 <elliott> instance (C a) => D a
22:15:48 <elliott> is not ok
22:15:54 <elliott> i would be surprised if the additional thing made it work
22:15:56 <Deewiant> I am sure, I checked it
22:15:58 <CakeProphet> overlapping sounds like the right qualifier.
22:16:01 <Deewiant> MPTCs + Flexible
22:16:01 <elliott> ok
22:16:27 <CakeProphet> maybe flexible in overlapping in the case that the instances... overlap
22:16:31 <CakeProphet> s/in/and/
22:16:43 <monqy> overlappinginstances implies flexibleinstances
22:16:52 <CakeProphet> ah okay
22:17:14 * CakeProphet has never need the .*?instances extensions
22:17:59 <monqy> I've needed flexible once but other than that I've just read the manual pages
22:18:05 <elliott> 13:02:16: -!- Necrosporus has joined #esoteric.
22:18:05 <elliott> 13:03:43: <Necrosporus> http://paste.org.ru/?lu3vtb
22:18:06 <elliott> 13:03:57: <Necrosporus> Do you like it? What' sthat at your opinion?
22:18:06 <elliott> hi
22:18:19 <elliott> monqy: I need flexible constantly
22:18:23 <CakeProphet> but obviously if you want to overlap you probably want to be flexible.
22:18:29 <elliott> 14:21:13: <Phantom_Hoover> That's fmap...
22:18:36 <elliott> Phantom_Hoover: it's the _wrong_ generalisation.
22:18:39 <elliott> (.) should be (Control.Category..)
22:18:45 <elliott> map should be fmap though.
22:18:52 <Deewiant> Control.Category didn't exist at the time IIRC
22:18:56 <elliott> and (++) being Monoid is right
22:19:05 <elliott> > (P..)
22:19:06 <lambdabot> Overlapping instances for GHC.Show.Show
22:19:07 <lambdabot> ((b ->...
22:19:10 <elliott> Phantom_Hoover:
22:19:12 <elliott> Prelude is P
22:19:23 <Deewiant> Darn
22:19:24 <Deewiant> Why
22:19:47 <elliott> Concision? It's IRC
22:19:48 <elliott> BRB
22:19:56 <Deewiant> Why not both
22:20:39 <CakeProphet> is there anything ($) could be generalized to?
22:20:59 <monqy> yes
22:21:06 <Deewiant> id
22:21:30 <Deewiant> ($) :: (a -> b) -> a -> b; ($) = id
22:21:31 <oerjan> <elliott> tempted to touch my eye to feel smug but i'd have a hard time making myself do that <-- NORTHUMBRIAN TOUCHES EYE TO FEEL SMUG, EYE FALLS OUT
22:22:43 <CakeProphet> @hoogle m a b -> a -> b
22:22:44 <lambdabot> Control.Monad.Reader runReader :: Reader r a -> r -> a
22:22:44 <lambdabot> Control.Monad.State.Lazy evalState :: State s a -> s -> a
22:22:44 <lambdabot> Control.Monad.State.Strict evalState :: State s a -> s -> a
22:23:05 <monqy> what
22:23:20 <CakeProphet> that is a generalization of )$_
22:23:21 <CakeProphet> ($)
22:25:02 -!- Patashu has joined.
22:26:23 <monqy> class Whatever (~>) where ($) :: (a ~> b) -> a -> b ?
22:26:57 <CakeProphet> yes.
22:27:19 <monqy> yes that's the gnera;lization of which iw as thinking too
22:27:31 <CakeProphet> I would say Applicative but that is already taken.
22:27:48 <Deewiant> ?ty app
22:27:49 <lambdabot> forall (a :: * -> * -> *) b c. (ArrowApply a) => a (a b c, b) c
22:27:54 <Deewiant> I think that's what you guys want
22:28:16 <CakeProphet> but what if I dislike arrows?
22:28:27 <monqy> ?src ArrowApply
22:28:27 <lambdabot> Source not found. :(
22:28:29 <monqy> :(
22:28:41 <CakeProphet> that doesn't look like the correct type.
22:28:42 <Deewiant> class Arrow a => ArrowApply a where that function
22:28:43 <CakeProphet> too many tuples. :P
22:29:05 <CakeProphet> specifically one too many.
22:29:43 <oerjan> !haskell take 20 $ Unsafe.Coerce.unsafeCoerce [1..] :: [()]
22:29:49 <EgoBot> ​[(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),()]
22:29:52 <monqy> that looks a little bit different than ours, anyway
22:30:14 <CakeProphet> also filter could be generalized.
22:30:14 <oerjan> !haskell take 20 $ Unsafe.Coerce.unsafeCoerce [Left 1, Right 2] :: [()]
22:30:16 <CakeProphet> :t filter
22:30:17 <EgoBot> ​[(),()]
22:30:17 <lambdabot> forall a. (a -> Bool) -> [a] -> [a]
22:30:31 <CakeProphet> (a -> Bool) -> t a -> t a
22:30:42 <Deewiant> ?ty app .: (,)
22:30:43 <lambdabot> forall b b1. (b -> b1) -> b -> b1
22:31:22 <oerjan> @hoogle filter
22:31:23 <lambdabot> Prelude filter :: (a -> Bool) -> [a] -> [a]
22:31:23 <lambdabot> Data.ByteString filter :: (Word8 -> Bool) -> ByteString -> ByteString
22:31:23 <lambdabot> Data.IntMap filter :: (a -> Bool) -> IntMap a -> IntMap a
22:31:39 <monqy> :t (.:)
22:31:40 <lambdabot> forall a b (f :: * -> *) (g :: * -> *). (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b)
22:31:42 <oerjan> :t Data.Traversable.filter
22:31:43 <lambdabot> Not in scope: `Data.Traversable.filter'
22:31:55 <oerjan> hm i guess it cannot remove elements
22:32:10 <CakeProphet> oerjan: is ByteString a synonym for Something Word8?
22:32:44 <oerjan> it's an unpacked array of Word8, yes
22:32:58 <oerjan> well more or less
22:33:26 <oerjan> *unboxed
22:33:57 <oerjan> @hoogle fromList
22:33:57 <lambdabot> Data.HashTable fromList :: Eq key => (key -> Int32) -> [(key, val)] -> IO (HashTable key val)
22:33:58 <lambdabot> Data.IntMap fromList :: [(Key, a)] -> IntMap a
22:33:58 <lambdabot> Data.IntSet fromList :: [Int] -> IntSet
22:34:20 <oerjan> @hoogle Foldable f => [a] -> f a
22:34:21 <lambdabot> Test.QuickCheck elements :: [a] -> Gen a
22:34:21 <lambdabot> Data.Maybe listToMaybe :: [a] -> Maybe a
22:34:21 <lambdabot> Data.Sequence fromList :: [a] -> Seq a
22:34:28 <oerjan> bah
22:35:20 <CakeProphet> class FromListable a r where fromList :: [a] -> r
22:35:32 <CakeProphet> maybe with a fundep
22:35:52 <oerjan> CakeProphet: that's just Monoid really
22:36:02 <oerjan> well, nearly
22:36:41 <oerjan> @hoogle (a -> Bool) -> f a -> f a
22:36:41 <lambdabot> Data.IntMap filter :: (a -> Bool) -> IntMap a -> IntMap a
22:36:42 <lambdabot> Prelude dropWhile :: (a -> Bool) -> [a] -> [a]
22:36:42 <lambdabot> Prelude filter :: (a -> Bool) -> [a] -> [a]
22:37:04 <oerjan> @hoogle NotABloodyList f => (a -> Bool) -> f a -> f a
22:37:05 <lambdabot> Warning: Unknown class NotABloodyList
22:37:05 <lambdabot> Data.IntMap filter :: (a -> Bool) -> IntMap a -> IntMap a
22:37:05 <lambdabot> Prelude dropWhile :: (a -> Bool) -> [a] -> [a]
22:37:51 <CakeProphet> they could extend the query syntax that way
22:37:57 <CakeProphet> having constrains placed before a =>
22:38:14 <oerjan> i thought they did
22:38:45 <oerjan> it's just always fuzzy when there's no perfect match
22:39:22 <oerjan> @hoogle Monad m => [m a] -> m [a]
22:39:22 <lambdabot> Prelude sequence :: Monad m => [m a] -> m [a]
22:39:23 <lambdabot> Control.Monad sequence :: Monad m => [m a] -> m [a]
22:39:23 <lambdabot> Data.Traversable sequence :: (Traversable t, Monad m) => t (m a) -> m (t a)
22:39:35 <oerjan> @hoogle Applicative m => [m a] -> m [a]
22:39:35 <lambdabot> Data.Traversable sequenceA :: (Traversable t, Applicative f) => t (f a) -> f (t a)
22:39:36 <lambdabot> Prelude sequence :: Monad m => [m a] -> m [a]
22:39:36 <lambdabot> Control.Monad sequence :: Monad m => [m a] -> m [a]
22:39:44 <oerjan> yeah it does
22:40:18 <CakeProphet> no I mean constrains like "t is not a list"
22:40:28 <CakeProphet> not class constraints.
22:40:44 <elliott> back
22:41:05 <elliott> monqy: ive seen
22:41:16 <monqy> hi>?
22:41:20 <elliott> class (Arrow (~>)) =. ArrowApply (~>) where (($) :: (a ~> b) -> a -> b
22:41:23 <elliott> as opposed to the existing arrowapply
22:41:59 <CakeProphet> since arrows are lame and nobody likes to use them.
22:42:15 <monqy> what's the need for the Arrow (~>) context there....
22:42:31 <elliott> monqy: because it was in terms of arrow?
22:42:45 <monqy> why must it??
22:42:45 <elliott> anything that can be applied should be an arrow anyhow, whether you like arrows or not
22:42:54 <monqy> mmh
22:43:01 <elliott> you should be able to write the arrow functions
22:43:04 <elliott> whether you like the Arrow class or not
22:43:14 <elliott> otherwise your application has no laws and is hence useless
22:43:31 <CakeProphet> >_>
22:43:45 <oerjan> :t \p m = m >>= \x -> if p x then return x else mzero
22:43:46 <lambdabot> parse error on input `='
22:43:48 <elliott> thankfully I will never use CakeProphet's code.
22:43:48 <CakeProphet> laws -> practical use. The elliott law.
22:43:52 <oerjan> :t \p m -> m >>= \x -> if p x then return x else mzero
22:43:53 <lambdabot> forall (m :: * -> *) a. (MonadPlus m) => (a -> Bool) -> m a -> m a
22:43:58 <zzo38> What does "Irrefutable pattern failed" mean in Haskell?
22:44:00 <elliott> CakeProphet: sorry, you do not undrestand programming.
22:44:02 <elliott> understand
22:44:03 <monqy> is there any good alternative to arows is Category&Applicative useful for that I've also heard of a Generalized Arrows thing but maybe that is not a real thing maybe I should make my own alteratnive to do the things I want to do
22:44:14 <elliott> zzo38: depends what your code is
22:44:27 <oerjan> > let Left x = Right "like this" in x
22:44:28 <lambdabot> *Exception: <interactive>:3:4-29: Irrefutable pattern failed for pattern Da...
22:44:29 <elliott> monqy: you cannot use applicative in the arrowapply head because it must be universally quantified.
22:44:30 <CakeProphet> elliott: if you want me to see it they way you do then you'll have to use words for that.
22:45:02 <elliott> CakeProphet: i'm not interested in doing so, because I've tried before and it was fruitless; I suspect either time and experience will make you clear up your confusion, or nothing will
22:45:24 <zzo38> oerjan: How does that do?
22:45:24 <oerjan> zzo38: it's for when a failing match is lazy so it is not checked until another expression is evaluated
22:45:52 <oerjan> matches are by default lazy in let and where, but strict in case and function arguments
22:46:21 <oerjan> but you can turn strict matches into lazy with ~ or lazy into strict with ! (the latter is an extension)
22:46:21 <zzo38> But what does let Left x = Right "like this" in x even supposed to do?
22:46:31 <elliott> zzo38: fail, badly
22:46:39 <elliott> hth
22:46:47 <CakeProphet> elliott: though I do find it a bit insulting that I apparently don't _understand_ programming because I do not see it in this way.
22:47:06 <CakeProphet> as if the way I have been viewing it is totally invalid and does not correspond to actual programming.
22:47:14 <zzo38> What is that syntax supposed to mean?
22:47:26 <monqy> > let (x, y) = (5, 3) in (y, x)
22:47:26 <oerjan> zzo38: it defines Left x lazily to be the result of the expression Right "like this". if it was Left x = Left "like this", then it would simply make x = "like this"
22:47:26 <lambdabot> (3,5)
22:47:27 <elliott> CakeProphet: I predict that any further responses I make will only offend you more, so I'm not going to
22:47:50 <elliott> oerjan: ok i'm going to adjust my code for the exciting class: class Ooh a where ooh :: a
22:48:06 <monqy> ooh
22:48:07 <Gregor> (06:48:02 PM) CDGregorR: int*a,b[9<<20];main(){a=b;while(scanf("%d",++a)>0);while(*a)a+=(a[*a]-=a[a[1]])?3:a[2];while(a>b)putchar(*--a);}
22:48:08 <Gregor> (06:48:30 PM) -: I see a :( in there
22:48:08 <Gregor> (06:48:35 PM) -: That's how I'd feel about it, too
22:48:14 <oerjan> zzo38: it makes more sense if Right "like this" is replaced by an expression which is not known whether it is Left or Right, though
22:48:40 <elliott> oerjan: or rather one you know to be Left or Right.
22:48:42 <CakeProphet> elliott: then nothing has been learned by either of us from this conversation. congratulations.
22:48:45 <elliott> (it is not good practice to assume :P)
22:48:53 * CakeProphet moves on to other things.
22:48:58 <elliott> CakeProphet: you are the one who was sarcastic and pinged me after I made a statement.
22:49:03 <elliott> did you _expect_ to get anything from it?
22:49:08 <oerjan> zzo38: and supposedly you should only _use_ such an expression Left x = y if you are sure that y evaluates to a Left value, but if you do a mistake you get that "irrefutable pattern" error
22:49:22 <oerjan> *such a definition
22:49:28 <CakeProphet> elliott: I would like to.
22:49:37 <elliott> CakeProphet: then maybe start it in a better way next time
22:49:43 <zzo38> Now it says "No instance for (Show GHC.Prim.Any)" if I type x or Left x or Right x
22:49:44 <elliott> oerjan: I suspect the source of my unreliability is withInstance, btw
22:50:11 <elliott> oerjan: it should really be some core that takes the dictionary out of the ShowD and applies k to it
22:50:25 <elliott> I might be able to coerce that into working if I can figure out how to unbox it properly
22:50:27 <oerjan> zzo38: that's a different error because x defaults to type Any
22:50:43 <oerjan> (when there are no other restrictions on it)
22:51:18 <oerjan> zzo38: however that's a bit weird that there is no Show instance
22:51:20 <oerjan> > []
22:51:21 <lambdabot> []
22:51:57 <elliott> oerjan: um of course there is no Show Any instance.
22:52:01 <elliott> [] only works because of defaulting.
22:52:04 <oerjan> oh wait ghc defaults it to ()
22:52:14 <CakeProphet> elliott: I was basically saying I don't understand how a set of laws corresponds directly to usefulness.
22:52:25 <CakeProphet> not that I don't understand the importance of laws.
22:52:28 <oerjan> elliott: oh hm. the default to Any is only if there are _no_ type classes involved.
22:52:44 <elliott> oerjan: incidentally Any won't show up like that in error messages soon
22:52:47 <Sgeo> instance Eq (->) where
22:52:48 <elliott> it was fixed recently iirc
22:52:53 <CakeProphet> elliott: as I could make something completely useless that also has laws.
22:52:54 <oerjan> @let x = []
22:52:55 <lambdabot> Defined.
22:52:58 <oerjan> > x
22:52:59 <lambdabot> Ambiguous occurrence `x'
22:52:59 <lambdabot> It could refer to either `L.x', defined at <local...
22:53:01 <oerjan> oops
22:53:03 <oerjan> @undefine
22:53:11 <oerjan> now what
22:53:19 <oerjan> > "hm"
22:53:20 <lambdabot> "hm"
22:53:32 <oerjan> @list let
22:53:32 <lambdabot> eval provides: run let undefine
22:53:35 <oerjan> @undefine
22:53:40 <oerjan> > x
22:53:42 <lambdabot> x
22:53:51 <oerjan> huh it gives no message
22:53:57 <oerjan> @let x' = []
22:53:58 <lambdabot> Defined.
22:54:00 <oerjan> > x'
22:54:02 <lambdabot> []
22:54:07 <oerjan> :t x'
22:54:08 <lambdabot> forall a. [a]
22:54:11 <oerjan> bah
22:54:17 <elliott> CakeProphet: (~a -> ~b) =/= (a -> b)
22:54:23 <oerjan> no monomorphism restriction for @let
22:54:33 <oerjan> or wait
22:54:49 <oerjan> > (x' :: String, x' :: [Bool])
22:54:51 <lambdabot> ("",[])
22:54:55 <oerjan> indeed not
22:54:58 <CakeProphet> elliott: is ~ laziness in this case? I've never seen ~ used like that.
22:55:04 <CakeProphet> or is it not?
22:55:22 <CakeProphet> aka complement.
22:55:42 <zzo38> How is a definition such as Left x = Right "like this" can be used afterward?
22:56:06 <elliott> CakeProphet: what I said was not code.
22:56:17 <elliott> *Main> withInstance explicitTestD (ooh :: Int)
22:56:17 <elliott> 99
22:56:20 <elliott> oerjan: ok so data values work.
22:56:30 <CakeProphet> elliott: ah, well then it is not very enlightening to me.
22:56:34 <elliott> *Main> ooh :: Int
22:56:34 <elliott> 9
22:56:37 <elliott> CakeProphet: maybe so.
22:56:48 <elliott> oerjan: so there _is_ something different about functions in dictionaries
22:57:17 <monqy> has #ghc answered yet
22:57:29 <elliott> monqy: no
22:57:34 <monqy> :(
22:57:52 <CakeProphet> elliott: it is not very difficult nor time consuming to explain what you mean.
22:58:10 <elliott> CakeProphet: that is where you are wrong
22:58:28 <CakeProphet> elliott: oh wait I understand. :P
22:58:41 <CakeProphet> logic, not types.
22:59:12 <elliott> oerjan: I've asked #ghc about how functions are represented in typeclass dictionaries, anyway
22:59:13 <oerjan> <elliott> oerjan: I suspect the source of my unreliability is withInstance, btw <-- would the higher rank method used in reflection be good enough for you?
22:59:24 <elliott> oerjan: what type signature?
22:59:29 <elliott> reify :: a -> (forall s. Reifies s a => Proxy s -> w) -> w
22:59:38 <elliott> oerjan: that's... close to what i have
22:59:39 <elliott> withInstance :: OohD a -> ((Ooh a) => r) -> r
22:59:41 <elliott> I suppose I could do
22:59:44 <elliott> withInstance :: OohD a -> (forall b. (Ooh b) => r) -> r
22:59:49 <elliott> but that would rather reduce usefulness, I think
22:59:53 <elliott> although, hmm
22:59:56 <elliott> withInstance print "foo" would work
23:00:19 <CakeProphet> elliott: okay so then practical use -> laws would be the logical equivalent of your statement.
23:00:24 <CakeProphet> which I still do not see as being true.
23:00:49 <elliott> CakeProphet: I was replying to your statement with a demonstration of its fallacy.
23:01:07 <CakeProphet> right, and I just revised it.
23:01:18 <CakeProphet> meta-conversation is cool though.
23:01:49 <elliott> I'm afraid you have no idea what I'm talking about.
23:01:51 <elliott> anyway
23:02:03 <elliott> oerjan: I guess quantification might fix it by forcing explicit dictionary passing but I'm mostly sceptical of the implementation
23:02:10 <oerjan> zzo38: it cannot, that's an error which i just made to demonstrate how the Irrefutable pattern error message happens. Left x = Left "like this" would be useable, though.
23:03:19 <oerjan> zzo38: if you get an Irrefutable pattern error in your own code, though, it might because you are making something similar to Left x = y where you _think_ y is a Left value but it actually sometimes is a Right value.
23:03:28 <oerjan> *might be because
23:03:48 <oerjan> but it could be with other data type constructors, of course.
23:04:09 <CakeProphet> elliott: you said, in effect, no laws -> useless. I made the wrong implication from that, you showed that it was incorrect. So I revised to use -> laws, which I still do not agree with. Is that not what we just talked about?
23:05:00 <oerjan> zzo38: because of laziness, it is allowed to define Left x = y even if y is a Right value, as long you don't actually _use_ y in that case. but it may be easy to do a mistake then.
23:05:54 <Gregor> Argh, my TinyTC was wrong :(
23:06:29 -!- copumpkin has quit (Quit: Computer has gone to sleep.).
23:06:52 <CakeProphet> Gregor: I thought I had just realized that your name is Roger G. but whois says otherwise. :(
23:07:09 <CakeProphet> for some reason I like reverse names.
23:07:16 <Gregor> Ohhhhhhhhhhhhhhhhhhhhhhhhhkidoke.
23:07:23 <CakeProphet> >_>
23:07:33 <Sgeo> CakeProphet, take a guess what Gregor's name is
23:07:40 <CakeProphet> Gregor.
23:07:46 <Gregor> *clap clap clap*
23:07:50 <CakeProphet> that's what whois says.
23:08:01 <CakeProphet> BUT IT COULD EASILY BE ROGER G.
23:08:04 <Gregor> I'm not much of a mystery :P
23:08:08 <Gregor> I exist ... ON THE INTERNET!
23:08:43 <CakeProphet> assholes.
23:08:51 <monqy> :'(
23:09:00 <Sgeo> I think most people have only one...
23:09:02 <Gregor> All of this is distracting from the tragedy of my TinyTC being wrong.
23:09:12 <Gregor> int*a,b[9<<20];main(){a=b;while(scanf("%d",a++)>0);a=b;while(*a)a+=(a[*a]-=a[a[1]])?3:a[2];while(a>b)putchar(*--a);} // this is corrected, but 117 characters :(
23:09:15 <CakeProphet> Gregor: perhaps this is not a bad thing perhaps.
23:09:45 <Sgeo> Gregor, clearly, you have to change your other name to conform to CakeProphet's specs... in ... weirdly
23:10:41 <CakeProphet> not at all.
23:10:56 <oerjan> elliott: well you need _some_ way to prevent ghc from lifting print "hello world" entirely out of your carefully constructed context :P
23:11:29 <CakeProphet> I was merely sharing an amusing and false connection I made.
23:11:39 <CakeProphet> because Roger G. is a funny name.
23:12:11 <oerjan> that Tehpor Pekac guy has some wild ideas
23:12:12 <elliott> oerjan: doing it at the top-level seems to make it work for some reason
23:12:19 <elliott> Gregor: how was it wrong?
23:12:47 <Gregor> elliott: I ++a'd even when it didn't read in an int, so *a was always 0 by the time the loop started.
23:12:54 <Gregor> So, it never went into the loop at all >_>
23:13:04 <elliott> heh
23:13:08 <oerjan> elliott: yeah but obviously it will be brittle since ghc is by haskell semantics _allowed_ to do that lifting.
23:13:43 <elliott> oerjan: yeah. I think the quantified type might avoid that?
23:13:56 <elliott> hmm maybe:
23:13:58 <elliott> withInstance :: OohD a -> (forall b. (Ooh b, a ~ b) => r) -> r
23:14:01 <elliott> to get the full power
23:14:04 <oerjan> maybe
23:14:20 <CakeProphet> Gregor: is it okay if I call you Roger from now on?
23:14:24 <elliott> (it'd be nice to call random monomorphic methods but fuck up the instances they use, but GHC _definitely_ erases too much for that)
23:14:28 <Gregor> Nope ;P
23:14:38 <elliott> (and I guess I should avoid allowing you to see that by sticking to the plain universal rank-two type)
23:15:00 * Sgeo decides to ignore Roger's wishes wrt whether Roger wants to be called Roger
23:15:24 <CakeProphet> I think this is an excelelnt idea Oeg S.
23:15:38 <oerjan> hey no oegs
23:15:47 <elliott> yeah Sgeo is the reversed name
23:15:56 <elliott> so he's actually S. Geo
23:16:05 <oerjan> that's intruding on my alphabet territory
23:16:17 <monqy> my real name is yqno m.
23:16:27 -!- Sgeo has changed nick to Sgelo.
23:16:39 <elliott> shut up, Monq Y.
23:17:04 <oerjan> and someone is trying _very_ hard to hide that his real name is L. Toilet
23:17:39 * oerjan go too far
23:17:41 * Sgelo fails to get people to infer that he's pretending to be Oleg :(
23:17:51 <CakeProphet> I caught it..
23:17:56 <monqy> me too..........
23:17:58 <oerjan> substitute oleg
23:18:03 <CakeProphet> I AM A MASTER OF MYSTERIES
23:18:05 <monqy> but which oleg are you
23:18:05 <CakeProphet> I REVERSE ALL NAMES.
23:18:06 <monqy> which
23:18:07 <monqy> oleg
23:18:27 <CakeProphet> I SEE ALL OF THE SECRET CODES.
23:18:43 <elliott> oerjan: ellio turd, toilet l., i am poop in every way :(
23:18:51 * elliott cries
23:19:04 <CakeProphet> I keep my window covered by a bedsheet so that the government cannot spy on me with their spy crafts.
23:19:08 <oerjan> your life is so shitty
23:19:31 <elliott> :'(
23:19:54 <CakeProphet> -_;; my soul is black like the night.
23:20:08 <monqy> me too
23:20:39 <CakeProphet> I do not know how to make a crying emo face. ;_;;?
23:21:18 <CakeProphet> I also do not know what contractions are help.
23:21:23 <Phantom_Hoover> Sometimes I like to touch sharp things and feel their sharpness.
23:21:44 * Sgelo #s Phantom_Hoover
23:21:51 <zzo38> I made a Haskell program to know the extensions: http://sprunge.us/CBKY
23:21:54 <monqy> yesterday i cut myself
23:21:54 <elliott> Sgelo: gros
23:21:55 <elliott> s
23:22:00 <monqy> trying to open a bottle of cranbery juice
23:22:12 * Sgelo belatedly recognized the gross interpretation of that
23:22:12 <Phantom_Hoover> monqy, ah, you're getting into the spirit.
23:22:25 <elliott> Sgelo: there's a gross interpretation?
23:22:27 <Phantom_Hoover> Do you work at Starbucks?
23:23:18 <CakeProphet> Sgelo: he is too young do not explain it it is too gross.
23:23:51 <elliott> "I think if we are going to allow ourselves the luxury of semantic breakage, it should at least be worth the cost" --Malcom Wallace on seq
23:24:08 <CakeProphet> it's not worth the cost?
23:24:41 <elliott> not as the report specifies it IHO
23:26:08 <CakeProphet> seq is both luxurious and not worth the cost? Sounds expensive.
23:26:30 <zzo38> I have discussed making a Haskell program that is programmed to tell what extensions it uses, now I have done so. Other ideas are, extend it with the capability to tell if it is Literate Haskell or not, as well as be valid programs in other programming languages such as C, C++, INTERCAL, TeX, Brainfuck, Malbolge, AWK, ...
23:26:30 <elliott> it's a quibble about the Report, nothing much to do with usage.
23:27:07 <CakeProphet> zzo38: isBrainfuck = True
23:27:16 <oerjan> zzo38: :D
23:28:11 <zzo38> CakeProphet: I mean that it will do something proper, too. Of course any file with balanced [] is a valid Brainfuck program
23:28:32 <elliott> "After all the Report doesn't actually say
23:28:32 <elliott> that monomorphic pattern-bound variables are shared, either." huh
23:28:49 <CakeProphet> proper? like sipping tea and maintaining upright posture?
23:29:17 <zzo38> I don't know how a computer program can do that, but if you can figure it out then do so
23:29:29 <zzo38> It can also make output.
23:29:34 <Sgelo> Attention spammers: Asthma is not a vaginal infection
23:29:47 <zzo38> I have seen a polyglot program that makes output to tell you what programming language it is.
23:30:06 -!- copumpkin has joined.
23:30:13 <Deewiant> print "Just another", ((0 and " Ruby ") or ("Pyt" + "hon" or " Perl ")), "hacker.\n",
23:30:15 <oerjan> Sgelo: that would be hysterical
23:30:30 <elliott> oerjan: annoyingly I can't cast (forall b. (C b) => r) to (CD b -> r), because that's an additional layer of boxing
23:30:49 <Sgelo> How does the ("Pyt" + "hon" or " Perl ") part work in Perl?
23:30:54 <zzo38> Deewiant: Yes, something like that
23:31:10 <elliott> Sgelo: . is concat in perl
23:31:12 <elliott> + is numeric
23:31:13 <Deewiant> Sgelo: Both get coerced to integers
23:31:20 <Sgelo> Ah, ok
23:31:23 <CakeProphet> so it becomes 0 which is false
23:32:44 <CakeProphet> but 0 is apparently not false in Ruby?
23:33:24 <Deewiant> Right, only false and nil are
23:33:24 <Deewiant> IIRC
23:33:27 <elliott> yeah
23:33:34 <elliott> which is far more correct than the hideous Python/Perl behaviour.
23:33:36 <oerjan> :t (print "Just another", ((0 and " Ruby ") or ("Pyt" + "hon" or " Perl ")), "hacker.\n")
23:33:37 <lambdabot> Couldn't match expected type `t -> t1 -> [Char]'
23:33:37 <lambdabot> against inferred type `[Char]'
23:33:37 <lambdabot> In the second argument of `(+)', namely `"hon" or " Perl "'
23:33:41 -!- itidus20 has quit (Ping timeout: 257 seconds).
23:33:59 <oerjan> SHOCKING
23:35:12 <Sgelo> elliott, well, objects in Python can define what happens when they're tested by if
23:35:35 <elliott> Sgelo: so? 0 is not false
23:35:38 <elliott> neither is []
23:36:03 <Deewiant> C begs to differ
23:36:22 <elliott> Deewiant: char a[] = {}; // a isn't false after this, is it?
23:36:27 <CakeProphet> it's convenient that they are false though.
23:36:27 <elliott> But anyway, C is wrong about most things.
23:36:33 <Deewiant> No, but int a = 0 is
23:36:39 <zzo38> Although the one I have seen, if I remember correctly, includes Plain TeX, C, C++, LaTeX, Perl, and a few more, but not Haskell.
23:36:42 <elliott> CakeProphet: when have you ever exploited the "==0 being false" behaviour in Python?
23:36:55 <elliott> I can see the argument for [], but unless your language has no boolean type, 0 being false is pure insanity.
23:37:03 <CakeProphet> elliott: I have used if list: to test if it is empty
23:37:07 <CakeProphet> or None
23:37:30 <Sgelo> I used LSL's similar behavior.... but I really shouldn't have
23:37:32 <elliott> that's not an answer to the question I asked you
23:37:33 <zzo38> But there are other TeX formats as well, such as AMS-TeX, and there is primitive TeX which I sometimes find a use for.
23:37:36 <elliott> None is ~ nil, so Ruby has that too
23:37:57 <CakeProphet> elliott: I don't really understand the question ==0 is not valid Python. :P
23:38:14 <CakeProphet> oh nevermind.
23:38:20 <Sgelo> Some function returns -1 if it can't find the item in the list.... I did if(llWhatever(...)+1)
23:38:28 <elliott> CakeProphet: x == 0 is perfectly valid Python.
23:38:34 <CakeProphet> well, I've used it in a while loop I believe. I'm sure it would be useful as an if.
23:38:58 <elliott> ok, so "I believe" with no example and "I'm sure".
23:39:01 <Sgelo> Note: I recognize now how "clever" (bad) that sort of thing is
23:39:29 <CakeProphet> uh, I think it's perfectly valid but I'm not going to get involved in yet another one of these debates.
23:39:57 <CakeProphet> because it is preference and not objective.
23:40:14 <elliott> that is how you resolve all debates about languages
23:40:16 <oerjan> 10:20:18 <elliott> 00:10:38: * Sgeo wants wget to ignore robots.txt >.>
23:40:16 <oerjan> 10:20:24 <elliott> Obviously it is impossible to make wget do this.
23:40:29 <oerjan> well _i_ thought so, but Sgeo managed to.
23:40:38 <CakeProphet> elliott: over tiny trivial things, yes.
23:40:43 <elliott> oerjan: whoosh.
23:40:48 <elliott> CakeProphet: haha
23:40:54 <oerjan> elliott: not really
23:41:16 <oerjan> elliott: i'm pointing out that if you are insulting sgeo for believing that, you are really insulting me :P
23:41:32 <CakeProphet> I'm sure I could go through VB and find things that are objectively bad.
23:41:37 <elliott> oerjan: I insult for more than pure factual content
23:42:16 <oerjan> elliott: i _do_ recall i could not manage to find it in the manpage, so they are not exactly advertising how to do it.
23:42:29 <oerjan> (which is somewhat reasonable i guess)
23:42:36 <Sgelo> It's a config file option
23:42:41 <elliott> -e is documented
23:42:50 <elliott> and the man page points you to GNU info for documentation on .wgetrc/-e
23:42:50 <Sgelo> And -e lets you set config file options on the command-line
23:43:03 <Sgelo> And googling pretty much gives you the answer
23:44:46 <oerjan> well it's not in the _obvious_ place
23:44:52 * oerjan sulks in the corner
23:45:05 <elliott> oerjan: /pats
23:49:16 <CakeProphet> I am a spider.
23:52:14 -!- FireFly has quit (Quit: FireFly).
23:53:41 -!- kmc_ has joined.
23:54:52 <quintopia> elliott: that's where i keep my Porn And Trailers
23:55:42 <elliott> pugs and togs
23:56:22 -!- kmc has quit (Ping timeout: 245 seconds).
←2011-09-01 2011-09-02 2011-09-03→ ↑2011 ↑all