00:00:36 itidus21: it might be best to understand lambda calculus in general first 00:00:48 -!- Vorpal has quit (Ping timeout: 276 seconds). 00:00:49 not for me 00:00:53 for most people maybe 00:01:22 anyway, i like this presented idea of SK as gardening 00:01:31 then you can see how SK(I) can be used to rewrite any lambda expression without variables 00:01:45 ive decided to pretend I doesn't exist 00:02:04 it complicates things too much 00:02:08 well I = SKK, for example 00:02:30 >:-) 00:02:45 so it's redundant. but it's logically necessary to use some form of it for the rewriting. 00:03:21 to handle \x . x 00:03:21 hmm.. bah.. i don't need lambda calculus 00:04:39 What good has lambda calculus ever done, huh? 00:06:19 a lot, but probably not enough to parody an entire monty python sketch. 00:06:26 What's Lambda Calculus ever done for me, eh? 00:06:29 Aw. 00:06:34 I'm going back to the warm, waiting arms of the Combinatrix. 00:07:28 yeah do the combinator bird shop sketch instead 00:07:30 oerjan: Are you sure lambda calculus wasn't involved when the aqueduct and sanitation were invented? 00:07:42 fizzie: well not _entirely_ sure 00:07:52 oerjan, this mockingbird is mocking me all the time! 00:07:53 -!- zzo38 has quit (Read error: Connection reset by peer). 00:08:24 it's not mocking, it's just diagonalizing 00:08:48 oerjan: Ooh, I just realized you must like the bird shop sketch because it involves fjords. 00:09:01 We call them firths here. 00:09:10 Makes sense. You want to lazily instantiate your integes. Those things take up a lot of cycles. I think because PHP has to start with a float, then use the cpu fan to mill off the decimal point. 00:09:13 As exemplified by the Firth of Forth, the best-named thing ever. 00:09:46 Phantom_Hoover: that is a surprisingly good name, indeed 00:09:56 oerjan, look, my lad, I know mockery when I hear it and I am being mocked right now. 00:09:59 fizzie: actually i was thinking more of the cheese shop sketch here. do you have any owls? 00:11:18 Goodnigt 00:11:19 h 00:11:21 -!- Ngevd has quit (Quit: Goodbye). 00:13:54 * oerjan fjords for the pines 00:17:46 Fjording the river. 00:18:03 . o O ( Sadc = ac(dc); Sa(dc) = Sa(dc); Sa(dc)b = ab((dc)b); ) 00:18:23 * olsner fnords for the pies 00:18:37 yay i can compute anything O.O 00:19:46 . o O ( Kab = a; K(ab) = K(ab); K(ab)c = (ab); ) 00:22:00 but i am pretty dumb so i couldn't do much more than what i just typed at this stage 00:28:45 . o O ( (((Sa)d)c) = ((ac)(dc)); ((aK)(dK))b = ((aK)(dK))b; ) 00:30:30 . o O ( ((KK)(dK))b = (Kb); ) 00:36:25 -!- azaq23 has quit (Quit: Leaving.). 00:37:13 -!- nooga has quit (Ping timeout: 240 seconds). 01:10:16 -!- Phantom_Hoover has quit (Quit: Leaving). 01:21:59 -!- MDude has quit (Quit: later chat). 01:24:26 -!- oerjan has set topic: Official revolting channel of the inverse femtobarn stupid topic change plurality, the Prequel: The Revenge of the Monad | http://codu.org/logs/_esoteric/. 01:33:21 shachaf, if I pick a random day of #haskell logs and search for your name, I can see you dealing with pretty much every kind of annoying question / behavior in that channel 01:33:27 it's uncanny 01:33:37 either you will burn out soon like me 01:33:43 or you are simply stronger 01:34:52 also i don't understand how #haskell got so big anyway 01:36:15 argh it's up to 815 people 01:42:43 It seems like, unlike most language channels, #haskell contains a very high proportion of the active Haskell community. 01:43:35 how are you defining "Haskell community" in such a way that this isn't definitionally true 01:43:47 Vague handwavey nonsense. 01:44:08 i think the people who write core libraries and production software in Haskell are under-represented on IRC 01:44:33 Hmm. Yeah, you don't see a lot of GHC devs in there I don't think... 01:44:56 Or some of the more significant libraries. 01:45:14 And, actually, who in #haskell does notable production software in Haskell? :P 01:45:22 it's more fun to learn a little Haskell and talk about it all day 01:46:03 "Programming sucks. Knowledge about programming is awesome." or some such? 01:46:13 yeah there's some of that 01:46:40 it's worse with Haskell because there is so much to learn before it's actually a better tool for getting shit done 01:47:22 most people are stuck at a stage where they only use Haskell on personal projects where "write this in Haskell" is an explicit goal 01:47:35 > iterate(show.length&&&take 1<= Couldn't match expected type (GHC.Base.String, [a])' 01:47:36 against infer... 01:48:00 > iterate((show.length&&&take 1)<= Couldn't match expected type (GHC.Base.String, [a])' 01:48:01 against infer... 01:49:15 and so the code written by #haskellers is "about Haskell" whereas the code written by #pythonistas is about solving some real problem 01:50:47 when you first take LSD, the trip is about the drug 01:51:04 it takes experience to understand that it's a tool which changes how your mind works 01:51:11 which can be applied to anything you can think about 01:51:49 > iterate((<**>[show.length,take 1]).group)"1" 01:51:50 Couldn't match expected type GHC.Types.Char' 01:51:50 against inferred type... 01:53:11 :t (<**>[show.length,take 1]).group 01:53:11 [Char] -> [String] 01:54:27 > iterate(sequence[show.length,take 1]<= Couldn't match expected type GHC.Types.Char' 01:54:28 against inferred type... 01:55:02 :t sequence[show.length,take 1]<= [Char] -> [String] 01:56:01 -!- Lymee has joined. 01:56:01 -!- Lymee has quit (Changing host). 01:56:01 -!- Lymee has joined. 01:56:08 -!- Madoka-Kaname has quit (Disconnected by services). 01:56:12 -!- Lymee has changed nick to Madoka-Kaname. 01:56:18 :t (<**>[show.length,take 1]) 01:56:19 [[Char]] -> [String] 01:56:50 :t sequence[show.length,take 1] 01:56:51 [Char] -> [String] 02:00:41 :t flip 02:00:42 forall (f :: * -> *) a b. (Functor f) => f (a -> b) -> a -> f b 02:01:16 :t flip[show.length,take 1] 02:01:17 [Char] -> [String] 02:01:49 -!- Jafet has joined. 02:01:56 -!- zzo38 has joined. 02:03:04 @hoogle f (a -> f b) -> a -> f b 02:03:05 Prelude (=<<) :: Monad m => (a -> m b) -> m a -> m b 02:03:05 Control.Monad (=<<) :: Monad m => (a -> m b) -> m a -> m b 02:03:05 Prelude (>>=) :: Monad m => m a -> (a -> m b) -> m b 02:05:08 @hoogle f (a -> f b) -> f a -> f b 02:05:08 Prelude (=<<) :: Monad m => (a -> m b) -> m a -> m b 02:05:08 Control.Monad (=<<) :: Monad m => (a -> m b) -> m a -> m b 02:05:09 Prelude (>>=) :: Monad m => m a -> (a -> m b) -> m b 02:08:49 > iterate(join.flip[show.length,take 1]<= ["1","11","21","1211","111221","312211","13112221","1113213211","3113121113... 02:09:23 :t join.:flip 02:09:23 forall (m :: * -> *) a a1. (Monad m, Functor m) => m (a1 -> m a) -> a1 -> m a 02:09:47 heh 02:23:40 -!- Jafet1 has joined. 02:26:09 kmc: Yes, I'm kind of in the process of burning out. 02:26:24 -!- Jafet has quit (Ping timeout: 276 seconds). 02:26:59 I wonder what it would be like if we still had dons's statistics on #haskell. 02:32:34 Maybe life would be good if I did like ddarius and ignored any questions that annoyed me. Even ddarius failed at that today. 02:33:16 What's really amazing is how Cale is still at it. Cale might be the most patient person on IRC. 02:37:46 kmc: So you still take LSD? It's not just a phase? 02:37:55 Or maybe it is a phase, in the ordinary meaning of "phase". 02:40:15 shachaf, I haven't tripped in a while, but I'm planning to do so next month 02:40:32 i think most people who take psychedelics only do it a few times ever 02:40:44 so it's hard to say whether that's a "phase" 02:43:52 possibly it's best to take it regularly but infrequently 02:43:57 like once a year or once every few years 02:45:48 -!- MDude has joined. 02:47:32 kmc: If I did it, would I be like you? :-) 02:47:42 you're already like me 02:47:50 Oh. 02:47:51 at least, the things you say in #haskell are eerily like things I would say 02:48:01 Maybe it rubbed off. 02:48:19 The worst thing about IRC is IRC logs. 02:48:24 OK, the second-worst thing. 02:49:23 i mean what's "best" depends on what you're trying to get out of it in the first place 02:49:47 The worst thing about IRC is that it's all a complete waste of time. 02:50:05 #haskell has not been a waste of time, overall 02:50:13 I think the main reason I use IRC as much as I do is this aversion-to-publishing-things that I've mentioned before. 02:50:18 i've learned quite a lot 02:50:24 but perhaps it would be a waste of time to continue 02:50:34 No, IRC log is good thng 02:51:50 kmc: By the way, I considered Haskell as a teaching language a while ago when I was considering teaching someone about comput{ers,ing}, and decided against it because it seemed like it would be way more complicated. 02:51:51 it may also be that the channel has grown / changed since i started, and so would be a waste to start now 02:52:07 yeah 02:52:11 I wondeer whether the same things apply to Scheme or not. 02:52:24 which things? 02:52:35 Well, I was trying to figure out which things they were. :-) 02:52:39 heh 02:52:42 Scheme is far simpler than Haskell 02:52:49 For example, does the type system make Haskell harder or easier to learn? 02:53:04 Reading Haskell code without type signatures is much more difficult in general. 02:53:36 But maybe types have a higher up-front cost which can discourage students. 02:53:41 harder, for a total beginner to programming, compared to a hypothetical similar-but-dynamically-typed language 02:53:56 one thing to keep in mind is that beginners are writing very small programs with very simple types 02:54:03 so they benefit less from static typing 02:54:15 I suppose that's true. 02:54:35 I still have the vague feeling that imperative languages are easier to learn. 02:54:40 Imperative programming, anyway. 02:54:46 Scheme is a fine imperative language 02:54:49 SICP gets into it pretty quickly 02:54:52 IP i mean 02:55:22 a language with very simple static types might be good for teaching 02:55:33 but haskell's has too many bells and whistles in this area 02:55:54 That's true. 02:55:59 Helium doesn't have type classes, I think. 02:56:00 type classes and overloaded literals and monomorphism restriction 02:56:01 right 02:56:19 a simplified teaching version of Haskell would be great, except that nobody will maintain tool support that's comparable to GHC 02:56:34 also GHC is pretty bad at explaining type errors 02:57:03 it just tells you the two mismatched types... what you really want is a whole tree of the inferences leading to those types 02:57:10 * shachaf wonders how edwardk's type checker is going. 02:57:45 anyway if you want to teach intro programming, teach python or javascript 02:57:56 if you want to teach intro CS, use Scheme 02:59:42 To teach about computer, learn a lower level programming language, such as C, or Forth, to learn how the computer is working. Possibly even assembly languages for specific computer you learn such as x86 or NES/Famicom. To learn a program, Haskell is as good as any; but even better to learn mathematical and programming together. 03:00:12 if you teach someone C and tell them it's how the computer "really works" then they will probably become an insufferable douchebag 03:00:28 kmc: Yes; that is why you need to learn assembly programming too. 03:00:40 You're best off teaching them physics. 03:00:57 But you can learn in C what correspond for example, the pointer to the address in the computer, pointer address array, and instructions set. 03:01:08 zzo38, uh, assembly is not how the machine "really works" either 03:01:10 There is also LLVM which is much better designed than C in my opinion 03:01:20 it's another abstraction 03:01:33 the implementation of this abstraction is incredibly complex 03:01:42 but it's hard to observe or modify unless you work at Intel 03:01:47 so people mostly ignore it 03:02:00 Pointers and addresses and memory are also a big abstraction. 03:02:15 Yes everything mostly does. 03:02:43 it's funny when people boast about how C is "close to the machine" and then turn out to be ignorant of caching or branch prediction or memory ordering issues or ... 03:02:47 It is why, to design computer that includes the book of full schematic diagrams and program codes printout 03:03:00 because C (and assembly) largely hide those things, 03:03:04 but then they come back to bite you 03:03:06 C is close to the abstract machine! 03:03:28 shachaf, it's not that either 03:03:34 C doesn't really hide caching. Any more than anything above the CPU level does. 03:03:45 kmc: Yes, but the different computer, they might do caching and branch prediction and that stuff differently. You can learn for one individual computer, LLVM has some more control but is still for many computer. Assembly prorgamming and possibly if you have an emulator, can learn thing better 03:04:19 shachaf, you saw the Linux bug I was talking about earlier? 03:04:31 kmc: This is because their idea of "machine" is the abstract machine that once upon a time was non-abstract. 03:04:36 Which one? The one with the undefined behavior? 03:04:49 yeah 03:05:34 By "abstract machine" I mean the C abstract machine, of course, not x86. 03:05:45 -!- oerjan has quit (Quit: Good night). 03:05:49 here's one example http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=3c8a9c63d5fd738c261bd0ceece04d9c8357ca13 03:06:46 the bug is that 'tun' can be NULL 03:06:48 kmc: That bug was neat, by the way. You should tell me when you put the slides for your talk up. 03:07:28 if a user maps a page at NULL they can control the value the kernel reads 03:07:38 it looks like this is not exploitable, because 'sk' is unused before the NULL check 03:07:55 but NULL dereference is Undefined Behavior and so the compiler is free to omit that check 03:08:03 which gcc did, hence the bug was exploitable for privilege escalation 03:08:27 anyway, if your model of C is "close to the machine" then you will make the mistake of thinking this code is safe (though it's still clearly wrong) 03:09:02 shachaf, I will! 03:09:19 shachaf: Of course, their intuitions map to pre-ISO C, so the C abstract machine is irrelevant. :P 03:09:33 shachaf: Unfortunately for them, x86 is also an abstract machine. 03:10:04 It's abstract machines all the way down. 03:10:58 kmc: When is the talk? 03:11:11 Oh, Jan 27. 03:13:17 Oh, and Veinor is doing a Haskell class. 03:18:15 'Haskell is the world's most *reasonable* programming language -- a language ideally suited for reasoning about code by machines, by humans, and by machines aiding humans.' 03:18:18 that one? 03:19:36 That would seem to be the one. 03:20:00 that claim seems kinda completely false 03:20:03 Haskell is best they do programming and mathematical reasoning in dealing with computer program 03:20:24 For other thing, other programming language might be best, it is one reason why, they have many programming languages 03:20:56 Haskell is far from the best language if you want to prove things about your programs 03:21:15 kmc: Yes, you are probably correct about that. 03:21:30 what examples are there of 'reasoning about code by machines' in Haskell 03:21:45 I imagine that's referring to type checking or something. 03:21:55 Haskell is a very compromisey language if you take e.g. Agda into account. 03:21:55 weak 03:22:03 What I mean, for example, the functions can be like a mathematical functions, and typeclass that is supposed to have certain laws, that follow certain kind of mathematical structures, and sometimes a few things can be implied just by the type signatures 03:22:25 kmc: Equational reasoning that the optimizer can do? 03:22:33 I don't know, I didn't write it. 03:22:44 it seems like a vastly overblown claim that will leave people disappointed 03:22:52 i mean it's an approach i see a lot 03:23:25 "Haskell is great, because Curry-Howard! Proving things in the type system. We can prove that, uh, Ints exist, unless they're ⊥." 03:23:48 Is that a _|_ character? 03:23:51 yes 03:24:00 Yes, there is Curry-Howard as well, and I have been able to make a typeclass for law of excluded middle, too 03:24:02 -!- atrapado has joined. 03:24:36 A lot of claims about Haskell are overstated. 03:24:37 Haskell is great but "wealth of static analysis tools" is not its strong point 03:24:55 certain things fit very naturally into the type system 03:25:00 but for anything else it's an uphill battle 03:25:07 To be honest, I don't understand why a lot of people like Haskell so much. 03:25:14 shachaf, it's better than Java! 03:25:26 You see a fair number of people saying "Haskell is great!" but then they write atrocious code in it that disregards pretty much all its strength. 03:25:28 the strongest praise a programming language could get 03:25:38 If you have type for bijective functions then you could even use types as numbers, such as (,) meaning both and and multiplication, Either meaning or and addition, -> meaning implication and exponents, Maybe meaning successors 03:26:09 shachaf, well, I think you know why I like Haskell, because I gave a talk about it :) 03:26:13 it's a bit different from the party line 03:26:46 kmc: My statement was ambiguous. 03:27:08 "There exists a large set of people such that I don't why any of its members like Haskell so much." 03:27:16 right 03:27:37 There similarly exists a large set of people who dislike C++ for completely bogus reasons. 03:27:38 which set is that 03:27:41 hehe 03:28:03 Although admittedly that one's easier to justify, because "I don't understand it after investing a fair amount of effort" is a valid reason to dislike something. 03:28:18 i think Haskell is a pragmatic language with a lot of well-chosen tradeoffs, and a good implementation 03:29:18 which is a bit different from "Haskell is best because it enforces total ideological purity" 03:29:22 or "Haskell is best because it has the most math" 03:29:51 both of which are factually untrue, anyway 03:30:01 but they are standard reasons given by beginners 03:31:48 Most people have misconceptions about most things 03:31:51 -!- Jafet1 has changed nick to Jafet. 03:32:13 * Jafet premature generalization 03:33:35 premature optimization 03:33:51 and my opinion that Haskell is "practical" is conditional on the fact that I already know it well 03:34:49 i think you could probably get 80% of the benefit in a language that's 20% as hard to learn 03:37:34 misconceptions are more like premature optimizations, rather than premature generalizations 03:37:49 maybe that language is OCaml, or F#, or Clojure 03:37:52 maybe it doesn't exist yet 03:38:20 -!- iamcal has quit (Remote host closed the connection). 03:42:20 we start with something general and then optimize it 03:43:28 or misoptimize it 03:44:14 . 03:47:08 I need to go to one of NYC/Washington D.C./Los Angeles in the next few months. 03:47:33 why? 03:47:41 Finnish passport. 03:47:50 cool 03:47:54 It would be best to get it before my birthday in July. 03:47:56 well, LA is probably the cheapest for you to get to 03:48:03 but NYC and DC are vastly superior cities 03:48:55 -!- pikhq has quit (Read error: Operation timed out). 03:49:03 That's true. But just think of how much cheaper the cost of going to Hac Boston would be if I go to NYC anyway! 03:49:05 -!- pikhq has joined. 03:49:12 it's true! 03:49:15 Also I have relatives there. 03:49:22 I guess I have relatives in San Diego too. 03:50:02 San Diego is pretty far from LA 03:50:07 but you know that 03:50:17 Boston is pretty far from NYC. 03:50:31 oh, you have relatives in boston? 03:50:52 Yes. Although I was referring to my relatives in NYC. 03:51:01 But I could visit both! 03:52:29 Anyway, I could drive to Los Angeles. 03:52:35 Do you feel less like me suddenly, kmc? 03:52:40 haha 03:56:33 -!- zzo38 has quit (Ping timeout: 252 seconds). 04:20:09 -!- atrapado has quit (Quit: Bye). 04:34:07 -!- zzo38 has joined. 04:35:12 -!- PiRSquared17 has changed nick to PiRSquaredAway. 04:36:31 Can you do so? 04:38:51 -!- PiRSquaredAway has quit (Quit: I found a *real* proof, it's just too long to fit in the quit message). 05:10:12 -!- Jafet1 has joined. 05:12:53 -!- Jafet has quit (Ping timeout: 240 seconds). 05:24:54 -!- elliott has joined. 05:33:21 16:30:25: what are the benefits of levenshtein coding over regular binary coding? 05:33:21 elliott: You have 1 new message. '/msg lambdabot @messages' to read it. 05:33:27 itidus21: What is "regular binary coding"? 05:33:52 kallisti_ said 11h 1m 21s ago: do you think using Ix and switching elemFromEnum to an array implementation would be faster or slower than using Map? or does an Ix instance basically require the same 05:33:52 kind of lookup code? 05:33:56 kallisti_: Ix depends on Enum, you moron. 05:41:24 16:58:00: itidus21: do you have a university degree yet? 05:41:24 16:58:10: no 05:41:24 16:58:25: have you considered getting a university degree0 05:41:24 16:58:27: ? 05:41:24 16:58:51: i am living in a weird kind of dire strait... 05:41:24 16:59:11: the world has defeated me from every angle 05:41:26 16:59:32: well i'm aware of that, i felt the question was orthogonal enough 05:41:28 16:59:57: success is mostly an illusion 05:41:30 oklopol: i just want to say you're great 06:01:14 elliott: Do you have a university degree yet? 06:03:31 shachaf: Nope. 06:05:41 Have you considered getting a university degree0 06:05:45 ? 06:18:09 :P 06:22:09 Token expansion in TeX is not entirely comonadic because the \csname command has the possibility to modify the table of equivalents during expansion. 06:22:37 So expansion can have side effects, but that is the only one, other than error messages 06:24:33 -!- myndzi has quit (Read error: Connection reset by peer). 06:27:03 Specifically, I mean the coKleisli morphisms for the (,) comonad (a.k.a. the Env comonad). 06:27:30 -!- myndzi has joined. 06:29:06 -!- MDude has changed nick to MSleep. 06:29:08 Have you considered getting a something else other than a university degree? 06:51:56 ais523: thanks for deleting that page of spa, 06:52:13 I typo when I type "spam" so much 06:52:26 I was thinking about automating it, but that'd involve learning GreaseMonkey because Esolang doesn't have working user scripts 06:52:34 ais523: can you protect the main page, pls? 06:52:41 there was a complaint on the talk page, and it seems a new wave are targetting it specifically 06:52:45 *wave of spambots 06:52:47 I will if it continues 06:52:58 OK, but this is the second or third day 06:53:06 wouldn't semi-protection work? 06:53:13 one of them hit NetHackWiki's main page a while ago, which is the only spam it's had in ages 06:53:47 theory: Timwi is controlling the spambots 06:54:01 as revenge 07:00:44 -!- Jafet has joined. 07:01:39 -!- Jafet1 has quit (Ping timeout: 252 seconds). 07:07:14 -!- Jafet has quit (Ping timeout: 252 seconds). 07:18:35 -!- Jafet has joined. 07:21:40 -!- myndzi has quit. 07:21:48 -!- myndzi has joined. 07:23:44 Make the HTTP-PUT-based wiki using HTTP-based authentication mode, could be another way that makes it harder for current spambots to find and there are many other ways too 07:24:33 ok done now what 07:24:35 Another possibility, is prevent Google from indexing it. 07:25:22 -!- Jafet1 has joined. 07:26:53 The current wiki are form-based rather than PUT-method-based 07:27:30 -!- Jafet has quit (Ping timeout: 252 seconds). 07:32:45 -!- Jafet1 has quit (Read error: Connection reset by peer). 07:33:06 -!- Jafet has joined. 07:37:53 -!- Jafet has quit (Client Quit). 07:39:14 ais523: Speaking of NetHackWiki, I haven't paid much attention to it or anything, but is the situation with Wikia as bad as it seems? 07:40:08 I.e., #nethack wanted a wiki, made a thing on Wikia, Wikia added advertisements, #nethack decided to move their wiki, Wikia refused to redirect or let them add "this wiki has now moved" markers to pages or remove the advertisements? 07:42:16 shachaf: They had a marker up, but I don't think Wikia was happy about it. 07:42:20 IIRC it was just on the main page. 07:42:27 Wikia said they'd remove it after a while. 07:42:44 shachaf: s/added advertisements/progressively redesigned the theme to be more and more terrible while adding more advertisements each time/ 07:42:54 It's a common experience for Wikia users. 07:43:00 The same happened to the most popular WoW wiki, to my understanding. 07:43:18 elliott: Right, I was abbreviating. 07:43:38 My favourite thing about Wikia's theme is the part where every external link has an interstitial ad added to it. 07:43:43 And of course the Wikia pages are way higher ins earch results. 07:43:48 elliott: Oh, yes, now I remember. 07:43:52 I'd suppressed it. :-( 07:44:01 They should add it to internal links too. 07:44:03 MORE PROFIT 07:44:12 Creatures Wiki still has the sane theme 07:44:50 Uh 07:45:00 elliott: What if, as part of the procedure for taking you to an interstitial ad, IT TOOK YOU TO ANOTHER INTERSTITIAL AD??? 07:45:03 INFINITE PROFIT 07:46:28 shachaf: The "Skip this Ad" button should have an interstitial ad. 07:46:35 elliott: GENIUS 07:46:50 I would never be able to sit through the full 30 seconds without clicking that button. 07:46:56 http://ideone.com/AJZRX is there a way to do this without wrapping in a type? 07:47:04 http://images4.wikia.nocookie.net/__spotlights/images/6d7325c4c94e26518f560e075330aab2.jpg Apparently Bation was overlooked? 07:47:06 *Bastion 07:47:51 Sgeo: 07:48:02 http://stackoverflow.com/questions/8739741/higher-ranked-and-impredicative-types 07:48:16 Sgeo: Why do you use that paste site, by the way? 07:48:18 It's horrible 07:48:25 Sgeo: Thankfully, you want to do that approximately 1 time in 10000000000000000, and never for Show, so it doesn't matter at all. 07:48:43 shachaf: We need mauke's paste-copier bot in here. 07:48:45 Maybe I'll write one. 07:48:52 Maybe I'll write a bot that just dumps every URL to sprunge. 07:50:11 elliott: So does UHC support inferring existential types? 07:50:19 That would be a great trick. 07:50:23 x = ... 07:50:27 x :: exists a. a 07:50:35 I've written a universal type inferencer! 07:51:05 What's wrong with IdeOne? 07:51:24 shachaf: I somewhat doubt it. 07:51:43 Sgeo: For one, it's a pastebin with *ads*. 07:51:56 And a Tweet button. 07:52:01 And a "Login with Facebook" button. 07:52:17 For two, curl -F 'sprunge=<-' http://sprunge.us 07:52:25 Actually I count 8 social networking devices on that page. 07:52:26 And it takes a long time to load. 07:52:32 Did I mention how my Internet connection is very slow? 07:52:41 Also 07:52:41 language:Haskell (ghc-6.8.2) 07:52:46 Pretty much all web pages on the Internet today load "sequentially" in some weird way. 07:52:50 which came out in 2007. 07:53:01 And this weird way causes the content to wait on the ads. 07:53:14 Also the syntax highlighting is hideous, especially for strings. 07:53:34 http://codepad.org/taphdoQk 07:53:37 Not the most informative 07:53:42 Ooh, it gets better. 07:53:43 "All Rights Reserved." 07:53:45 --footer 07:53:52 ++footer; 07:53:56 I guess claim rights to your pastes. 07:54:15 Sgeo: Seriously though, it doesn't get better than sprunge. 07:54:20 who we are 07:54:20 We are highly qualified academics with Ph.D. 07:54:21 We specialize in research and development. 07:54:21 We direct your business towards innovation. 07:54:34 --http://sphere-research.com/en/ as linked from footer of ideone 07:54:46 They have a Ph.D. between them, collectively. 07:54:52 I think sprunge is better, so I wrote a sprunge.cmd file to do that too 07:55:06 Wow, they're the people behind that http://www.spoj.pl/ thing. 07:55:12 zzo38: I am incredibly unsurprised you think sprunge is better. 07:55:18 elliott: I think they mean they have an actual Doctor of Philosophy, not a certificate specifying that one of them is one. 07:55:33 It seems very zzo-esque, except it's also very anyone-who-does-command-lines friendly. 07:55:35 shachaf: Finally someone to nurse philosophy back to health. 07:55:49 pikhq, can't run code in sprunge 07:55:51 Ph.N. 07:56:10 Sgeo: We don't need to see GHC 6.8.2's error message to know why your code doesn't work on GHC 7.0.3. 07:56:13 elliott: Does your Ph.D. institution also give out Ph.N.s? 07:56:15 Esp. since it's obvious. 07:56:18 Sgeo: No, but ghci <(curl http://sprunge.us/foo) does that just fine. 07:56:43 i just get that way at odd hours of the night 07:56:46 * Sgeo is sometimes too lazy to make a file on his system and use his ghc 07:57:17 delusions of the night 07:57:23 Sgeo: GHC 7.4 has top-level declarations in GHCi. 07:57:52 * Sgeo doesn't have GHC 7.4 07:57:54 Sgeo: Use a better shell. 07:58:06 Sgeo: Alternatively, that's why you use Emacs. 07:58:19 MORE LIKE EWWWMACS 07:58:21 GET IT 07:58:26 Can GHCi parse a module declaration? 07:58:26 I should switch back to Emacs for Haskell stuff 07:58:29 C-x C-f foo.hs data Foo = Foo C-x C-s C-c C-l :t undefined :: Foo 07:58:37 Oh, you need C-x C-o before that :t. 07:58:40 jEdit thinks that ' always means the rest of the token is a string 07:58:51 Who the heck uses jEdit? 07:59:14 I think even Slava doesn't use it anymore. 07:59:34 He also doesn't use Factor anymore, I believe. 08:00:17 shachaf: Oh, doesn't he? 08:00:23 He seemed pretty into it a year or two ago. 08:00:29 noobs, i have GHC 7.5 08:00:38 http://factor-language.blogspot.com/ has been dead for a while, though. 08:00:43 kmc: I have GHC 7.0. :-( 08:00:47 me too 08:00:54 You're 7% more modern than I am. 08:00:58 I have 7.0.*3*! 08:01:02 wow 08:01:09 It's .0.3 better. 08:01:11 I may have been wrong. 08:01:12 The Glorious Glasgow Haskell Compilation System, version 7.0.3 08:01:22 elliott, it must be hard to turn the crank on the side 08:01:32 elliott: That's what I heard. 08:01:37 I think Arch are waiting for 7.4 to update for, uh, stability. 08:01:45 no really, I have a GHC that reports its version as 7.5.blah 08:01:46 Arch "/usr/bin/python is python3" Linux. 08:01:58 i think it has minimal libraries installed tho 08:02:28 * elliott really wants 7.4 to come out so he can enter a new age of type system horror. 08:02:38 build it from git 08:02:40 you know you want to 08:02:43 That's so much work. 08:02:47 not really 08:02:52 Well, it takes ages. 08:02:55 right 08:02:56 I used to build GHC from darcs. 08:03:01 I had dozens of versions installed. 08:03:02 it's a lot of work for your computer; not so much for you 08:03:12 GHC needs a build bot. 08:03:14 kmc: Remember the deal with the crank on the side? 08:03:16 I want to use GHC nightlies. 08:03:18 it's more work for you if you already have a ghc tree and want to update it and expect incremental builds to work 08:03:22 cause they won't 08:03:29 elliott, GHC has a buildbot, but I don't know if the binaries are posted anywhere 08:03:46 kmc: Remember when GHC moved from a hideous Makefile system to a slightly better hideous autotools+Makefile system? 08:03:51 no 08:03:56 Wait, didn't that happen? 08:04:02 I distinctly recall that it not being autotools a year back or so. 08:04:04 maybe, but why would I remember it 08:04:08 kmc is amnesiac 08:04:14 elliott is elephantine 08:04:15 Because GHC building folklore, man! 08:04:18 make may be "hideous" but it supports -j 08:04:36 The Makefiles themselves were the hideous part. Although make is too. 08:04:56 -j isn't exactly hard. 08:05:07 cabal doesn't have it yet 08:05:47 * elliott has a plan for a cabal wrapper that builds in parallel. 08:05:51 it's been done 08:06:06 (for building different packages in parallel; not for the modules in a single package) 08:06:08 Yeah, but I've never seen one on Hackage, and I don't know anybody who uses one :P 08:06:11 kmc: The latter is what I meant. 08:06:14 ok 08:06:17 The former is an orthogonal issue that I don't care about much. 08:06:24 kmc: Just because cabal sucks doesn't make -j hard. *If* you're doing dependencies in even a vaguely sane way. 08:06:33 make -j is theoretically uninteresting, therefore Haskell already supports it 08:06:38 and it's your fault for not writing it 08:06:42 * shachaf orthogonizes over the issue. 08:06:47 Well GHC is kinda build system antagonistic 08:06:52 Multiple output files, no full separate compilation 08:07:18 (I mean, heck, redo does it, and the build logic there is in shell scripts.) 08:07:38 Isn't it Python 08:07:45 pikhq, I don't understand what point you're trying to make. are you speaking to a developer of a make-replacement, or to a user of a build system, or? 08:07:50 elliott: Yes, but you tell it what to do with shell scripts. 08:07:55 kmc: Developer. 08:08:01 ok 08:08:03 i don't disagree 08:08:05 why did you bring it up? 08:08:24 "make may be 'hideous' but it supports -j" 08:08:34 right 08:08:47 meaning that GHC doing things differently from other haskell packages has at least one major advantage 08:08:51 that's all i meant by it 08:08:54 Okay. 08:09:07 * elliott didn't realise kmc thought I was comparing it to using Cabal. 08:09:16 i didn't really 08:09:20 I doubt Cabal could even build GHC. Maybe with a massive custom Setup.hs thing. 08:09:54 does Cabal have support for Make-based builds? 08:09:58 Ish. 08:10:09 http://hackage.haskell.org/packages/archive/Cabal/1.10.2.0/doc/html/Distribution-Make.html 08:10:18 That's cheating :P 08:10:20 "Perhaps at some point we should stop pretending that it works." 08:10:31 Cabal-1.10.2.0: A framework for packaging Haskell software 08:10:37 "Cabal isn't a package manager, it's a build system!" 08:10:39 "But it's terrible at that too." 08:10:41 haha 08:10:44 "It's a framework for packaging!" 08:10:57 elliott, the Haskell tools are perfect and you're just some kind of idiot Java Monkey if you can't get by with them 08:11:06 next you'll be asking for regexes and stack backtraces 08:11:09 fucking java monkeys 08:11:12 elliott: Still better than what C's got. 08:11:13 (barely) 08:11:19 kmc: Java monkeys like regexps/ 08:11:20 ? 08:11:47 elliott: Only if you can represent them with an object hierarchy. 08:12:03 * elliott thinks regexps probably *are* moderately worthless in Haskell, since writing little parsers is so easy, but it would be nice to have a more concise syntax for common things. 08:12:12 scsh's sexp regexp stuff would be interesting to mimic. 08:12:31 A quasiquoter that turns a regexp into a parser would probably be the most useful thing, if TH wasn't terrible. 08:13:00 i'd settle for just a regex library with a simple concrete API 08:13:05 in fact there are several on hackage 08:13:21 The worst thing about the Haskell regexp libs is the hideous typeclass hack most of them are based on. 08:13:25 but i can't find them amongst all the other regex-compat-posix-new-lite-pcre 08:13:28 It should be illegal. 08:13:38 regex-compat-posix-new-lite-pcre-0.1: NO REALLY USE THIS ONE THE OTHERS SUCK 08:13:59 if someone uploaded a good regex lib and used that as the cabal synopsis I would hug them 08:15:01 I assign not-elliott to do it. 08:15:25 i think translating regexps into first-class parsers is probably bad for performance 08:15:37 kmc: Monadic parsers, sure 08:15:48 What if you turned regexp syntax into http://hackage.haskell.org/package/regex-applicative parsers? 08:15:48 even applicative CFG parsers 08:16:08 elliott, of course, would come back with @ in 100 years. 08:16:33 elliott, might be nice 08:16:42 kmc: I think the better complaint there is "it's difficult to optimise Haskell EDSLs" 08:16:46 it's... yeah 08:16:55 which sucks, but is probably inherent 08:17:07 arrows seem to have the best opportunities there but you have to use arrows 08:17:16 arrows suck because you can't optimize 'arr' 08:17:33 that too 08:17:38 thus generalised arrows 08:17:45 an EVEN LARGER TYPECLASS! 08:17:55 i'll be interested to see what iPwn have come up with, if their shit ever sees the light of day 08:18:21 "we solved several major open problems in theoretical computer science in order to make an iPhone game where you hit orcs with a sword" 08:18:32 * elliott has great difficulty taking iPwn seriously because of the name. 08:18:50 What have they done apart from their own arrow stuff? I heard about that in passing but nothing else. Well, and the GHC port thing I think was them. 08:19:07 they're using a custom preprocessor and some bleeding-edge GHC features to do better arrowized FRP 08:19:12 i don't know much about it 08:19:37 Waitwaitwait, they're working on FRP so they can do an iPhone game? 08:19:43 yes 08:19:52 Hasn't game development driven FRP for like half a decade by now? 08:19:54 I heard that they got some sucker to port GHC to Android. 08:19:55 research in arrowized FRP with a custom preprocessor 08:19:57 Are they mad or awesome? I dunno. 08:20:03 ask Cale about it 08:20:19 their game is like 2 years late 08:20:37 so i'm gonna go with "not awesome" 08:20:45 even if it's great research i can't possibly imagine how it makes business sense 08:20:51 Do people put two years of work into an iPhone game ever? 08:20:54 kmc: Business sense? You're talking about Haskellers. 08:21:04 elliott, yeah... 08:21:19 elliott: Hey, some Haskellers have business sense! Those are the people who don't use Haskell for their business. 08:21:41 Or presumably the ones using it for finance. 08:22:10 I would prefer the Arrow to be changed to something else such as: class (Category c1, Category c2) => CatFunctor c1 c2 where { funct :: c1 x y -> c2 x y; }; class Category c => CatArrow c (p :: * -> * -> *) where { ... }; It should be able to still represent the ordinary Arrow stuff with this, I think 08:22:15 Certainly when you're working on open problems for the purpose of mundane, mundane programs, you've got no business sense. :) 08:22:25 i think using Haskell for an iPhone game is not completely crazy, but they seem to be doing it wrong 08:22:48 kmc: It's the "working on major open problems in theoretical computer science" bit that is completely nuts. 08:22:52 right 08:23:00 zzo38: What about Barrier Arrows? You mustn't forget those. 08:23:03 of course this distinction will be lost on most 08:23:05 * elliott thinks that working for 2 years on FRP stuff for an iPhone game is cool but would probably work better as a hobby :p 08:23:12 elliott: Yup. 08:23:21 pikhq: I don't think FRP is considered a /major/ open problem :P 08:23:25 the developers of the platform games N and N+ are a bit nuts also 08:23:27 shachaf: I don't know what those are 08:23:32 elliott, yeah, who knows. it might be one of those startups where it's essentially a hobby, and everyone has a "side job" 08:23:49 * elliott also isn't sure FRP counts as /that/ theoretical, although the linear temporal logic stuff... 08:24:21 Mm, LTL. 08:24:30 i have fond memories of LTL and SPIN 08:24:31 hmm 08:24:47 elliott: I'm only quoting kmc on that one. 08:24:47 I went to this one talk about model checking once. 08:24:51 :) 08:24:52 Actually I went to it twice. 08:24:58 Actually I went to it once and it went to me once. 08:25:03 kmc: I can't criticise too loudly because I'm on step 2 of the "Hey, I want to make a game with Haskell!" -> "Guess I'd better figure out how to do it with FRP." -> game path. 08:25:12 heh 08:25:23 elliott: Does @ have games? 08:25:24 * elliott can't remember what the game was going to be any more. 08:25:27 right, some things do not make business sense but are justified by broader concerns 08:25:31 like "this is what i want to do" 08:25:32 shachaf: Who needs games when @ is as fun as it is?! 08:25:44 my impression was that the ipwn guys thought they were making business sense 08:25:55 @ peace and @ war... 08:25:58 kmc: It's the Paul Graham stuff, isn't it? 08:26:02 What is FRP? 08:26:12 elliott, ? 08:26:15 "If you program in my Blub, you'll have such a competitive advantage that you'll be, like, exponentially better than C++ programmers." 08:26:16 functional reactive programming 08:26:29 zzo38: Functional Reactive Programming; an alternate paradigm for IO in a purely-functional-ish language. 08:26:32 (such as Haskell) 08:26:36 FRP isn't really about IO. 08:26:52 elliott, maybe. PG also says there are nontechnical competitive advantages of using weird languages 08:26:57 which I think is a more solid claim 08:27:02 kmc: I think that's what I was saying. 08:27:10 Can you show me the mathematical structures for reactives? 08:27:28 zzo38: type Behavior a = Time -> a; type Event a = [(Time,a)] 08:27:43 zzo38: Those are lies. Now you can start on the open problem of FRP: finding out definitions that aren't lies. 08:27:52 elliott: Step 1: "Behaviour" 08:28:00 Correct! 08:28:19 elliott: What I gathered from him was that by using Blub you'll get better programmers, not that you'll turn people into better programmers. 08:28:20 Step 2: "Eveunt" 08:28:33 Which is at least not complete incoherent nonsense. :) 08:28:35 you're mixing several PG metaphors 08:28:48 kmc: Not true, I didn't mention painting. 08:29:16 penalty, disproving a universal statement with an existence proof. five yards. 08:29:20 * elliott doesn't tend to be too careful with PG mockquotes, admittedly, although I do agree that such languages can give competitive advantages. 08:29:48 The problem is that most relevant languages that don't have the infrastructure you need because they're still obscure competitive advantages. 08:29:55 he thinks Lisp gave ViaWeb a competitive advantage on technical grounds 08:30:09 -!- kmc has left ("Leaving"). 08:30:12 -!- kmc has joined. 08:30:20 I also don't think that using Haskell for a game is a competitive advantage unless you /do/ go for something like FRP. 08:30:32 Because you'll just spend all your time in IO writing callbacks. 08:30:37 dunno, Haskell is still a pretty good language 08:30:38 kmc: I wonder why that keeps happening. Do you try to delete a word with ^W? 08:30:45 i forgot why 08:30:56 and you get a nontechnical advantage from hiring haskellers 08:30:57 kmc: It is, but it's not significantly better at imperative programming than most other languages. 08:31:03 The lack of pointers is nice, of course. 08:31:17 I guess for the iPhone you pretty much have to write games in C++ unless you go for something "weird" like Haskell. 08:31:28 Objective C, not C++. 08:31:29 i think it is very common to write rendering in C or C++ and game logic in Lua 08:31:30 (I gather people write the games in C++ and glue it with Objective-C++.) 08:31:32 pikhq: ^ 08:31:35 Objective-C is way too slow. 08:31:36 Oh, okay. 08:31:45 which is kind of like writing rendering in C and writing game logic in Haskell 08:31:46 It's all the safety of C with all the speed of unoptimised Smalltalk. 08:31:52 which is what they were doing 08:32:06 getting Lua working is a lot less of a pain 08:32:08 Objective-C is a strict superset of C, so you can write a plain C program in Objective-C, too. 08:32:20 kmc: Rendering in C seems an odd choice. Isn't the iPhone all shadery these days? 08:32:21 hiring Lua programmers is not much of a competitive advantage; it's pretty standard in the game industry 08:32:28 i'm sure there were shaders too 08:32:36 ISTR that the OpenGL they use doesn't have the fixed-function stuff, so there's not all /that/ much C code you'd end up writing. 08:32:39 zzo38: Yeah, but Objective-C++ is supported trivially on the platform, and industry tends to prefer C++ over C. 08:32:40 I guess GLSL counts as C. 08:32:44 what i mean is that you make OpenGL calls from a thread which doesn't need garbage collection 08:32:44 Sort of. 08:32:46 TRIVIAL 08:32:48 kmc: right 08:33:02 Wasn't GHC getting a parallel collector? 08:33:05 Or am I thinking concurrent. 08:33:07 Non-pausing. 08:33:11 it's in a branch 08:33:11 pikhq: Then you can program plain C++ in Objective-C++ if you want to do so 08:33:47 i think PG may be right about Lisp and ViaWeb, but note that there were many fewer options back then 08:34:00 Really, the supported compiler is GCC, so... Yeah. Nice and simple to do any GCC-supported language, maybe modulo a few outright oddballs. 08:34:03 (gcj?) 08:34:04 his competitors were writing webapps in C++ or pre-modern Perl 08:34:13 nothing resembling a "web framework" would exist for another decade 08:34:15 pikhq: Er, isn't the iPhone clang these days? 08:34:25 elliott: Oh, right, so it probably is. 08:34:27 I mean, OS X is, so I can't imagine the iPhone isn't too. 08:34:42 Which leaves you with C, Objective-C, C++, Objective-C++. 08:34:43 so I'll bet they got a lot of benefit from being able to grow a kind of web framework in Lisp organically 08:34:58 Which is also the set of languages most anyone would actually *give a shit about* in GCC. 08:35:02 but also they had good timing and won the lottery etc 08:35:19 (seriously, who uses Fortran? GCJ? D?) 08:35:30 kmc: didn't pg say viaweb took off because of their crazy programming interface thing 08:35:34 most of the advice PG has about doing a startup is not technical 08:35:39 which is probably correct 08:35:44 though his advice is biased and self-serving 08:35:53 I think PG extrapolates way too much for his sample size. 08:36:07 "You should do startups! Here, we've got a totally awesome service that is the BEST EVER for it!" 08:36:11 But yeah, "How to Win the Lottery" wouldn't be a very popular article. 08:36:26 today there are many reasonable, popular languages and frameworks for web programming 08:36:43 it's harder for me to believe that using Haskell over Rails will be a huge advantage, even if using Lisp over C++ was 08:36:49 (in the technical sense) 08:37:20 it might be a security advantage though :) 08:37:26 sure 08:37:29 startups don't care about security 08:37:33 Yeah... Web dev has had at least enough sensibility to stop with C/C++. 08:37:36 yep :p 08:37:41 Though they're still on PHP and Ruby. :P 08:37:47 pikhq: http://www.webtoolkit.eu/wt 08:38:24 WHY GOD WHY 08:39:10 ksplice cared about security because we had the ability to automatically root hundreds of thousands of Linux machines 08:39:19 even then, I suspect others in a similar situation would not care 08:39:27 pikhq: To be fair, he wrote "you should do startups" way before he started investing in them. 08:39:45 shachaf, you should play the lottery! one time i played the lottery and won the jackpot! 08:40:01 there may be some correlation between the people who understand and care about security, and the people who can write something like ksplice 08:40:12 shachaf: True, that's only really a criticism of his *later* stuff. Where he talks a lot about how his startup incubator thing is awesome. 08:40:21 Not where he talks about how startups in general are awesome. 08:40:37 it's all self-serving, even when he's not directly talking about YC 08:40:42 kmc: Sure, I was only responding to pikhq's specific statement. 08:40:51 he wants to sell you on the idea that you need to do a startup by age 18 or else you are a failure in life 08:41:08 that way you'll be willing to give away equity for minimum wage 08:41:25 if people graduate college and work a couple jobs before doing a startup, they don't need YC as much 08:41:33 they have savings and they have industry connections 08:42:12 And will probably need less of the advice YC could give (they do give advice, right?) 08:42:27 yeah 08:42:51 advice: make lots of money 08:43:17 Advice: steal from Gates 08:43:31 hence disparaging the corporate work environment 08:43:38 "I'm not sure why Mr. Graham felt the need to draw this incredibly condescending parallel with company employees and caged animals in the zoo." http://www.codinghorror.com/blog/2008/03/paul-grahams-participatory-narcissism.html 08:43:51 Oh man, Jeff Atwood writing about Paul Graham! 08:43:55 i know right 08:43:56 I can't think of anything more enjoyable. 08:44:26 here, Spolsky is PG's partner in crime 08:44:31 dunno about Atwood 08:44:39 haha, and referencing slamming spolsky in the second paragraph 08:44:50 Spolsky wants you to think that every company besides Fog Creek is a soul-sucking cubicle mill 08:44:55 I wonder if Spolsky tried to get SO written in that custom language 08:45:00 because that's the core of their corporate identity 08:45:34 "we're going to make a software company which is unlike 1994 Microsoft" 08:46:03 as far as I can tell Fog Creek's main money-making scheme must be getting people to like them, rather than anybody actually using their products 08:46:40 Does Fog Creek make anything? 08:46:58 a bug tracker, IIRC 08:47:41 -!- Vorpal has joined. 08:47:48 -!- Vorpal has quit (Changing host). 08:47:48 -!- Vorpal has joined. 08:48:20 also https://trello.com/, an organization / collaboration tool 08:48:31 and a few other things 08:49:00 if you want to spend 80 minutes cringing, watch http://www.projectaardvark.com/movie/ 08:49:11 which is about some interns developing one of their other products 08:49:45 80 minutes of cringing? I can't think of anything I want more. 08:52:52 who thought that would be a good idea 08:53:21 elliott: have I ever mentioned that you're a jerk? 08:53:49 I always figured it went without saying 08:54:18 kallisti_: Often 08:58:58 Is the main reason that http://en.wikipedia.org/wiki/File:Rope_example.jpg is rotated to make it seem more impressive? 09:01:16 it is more pleasant on the eyes rotated 09:01:17 good graphic 09:01:45 None of the other pictures on that page are rotated. 09:02:06 shachaf: I've wondered about that thing too. 09:02:16 "The topic of this article may not meet Wikipedia's general notability guideline. Please help to establish notability by adding reliable, secondary sources about the topic. If notability cannot be established, the article is likely to be merged, redirected, or deleted. (September 2011)" 09:02:22 Oh yeah, ropes are so non-notable. 09:03:06 why is it rotated? why is it jpeg? why what's up with everything being off center and angled wrong? 09:03:14 so many questions. the most mysterious image. 09:03:33 I just realised that I'm a JPG snob. 09:03:37 When did that happen? 09:03:39 monqy: ok the investigatin begins 09:04:54 shachaf: I don't even like the idea of using JPEGs for photos. 09:05:04 * elliott biggest jpeg snob 09:05:05 Meng Yao introduced the rotated rope on 03:25, 25 April 2011 09:05:31 his edit increased the document from about 3kb to 9kb 09:06:41 his only wiki contribution has been on the rope article and he altered it on wiki for approximately 90 minutes before dissapearing forever 09:06:44 Rotated rope. Rope. 09:08:01 class Category c => CatArrow c p where { arr1 :: c x y -> c (p x z) (p y z); arr2 :: c x y -> c (p z x) (p z y); mirror :: c (p x y) (p y x); (*+*) :: c x y -> c x' y' -> c (p x x') (p y y'); (&|&) :: c x y -> c x y' -> c x (p y y'); arr2 f = mirror . arr1 f . mirror; f *+* g = arr1 f >>> arr2 g; }; Is it possible to define mirror in terms of the other class methods? 09:08:12 Should there even be a mirror? 09:09:21 shachaf: Take a look at this amazing question: http://stackoverflow.com/questions/8767849/importing-modules-as-a-function-with-string-as-input 09:09:25 The edit is the best part. 09:09:29 meng yao included his rope diagram 8 times in his wiki edit :-D 09:09:47 itidus21: there are multiple diagrams 09:09:58 -!- Ngevd has joined. 09:10:01 Hello! 09:10:05 ok ok its not exactly the same 09:10:47 as to why he rotated it... i think that is a real mystery 09:11:22 and why it's jpeg and why it's generally wonky 09:11:25 many real mysteries 09:11:53 elliott: lol. one bad idea to another. 09:12:08 perhaps he is boycotting SVG 09:13:39 elliott: So I read every word in that sentence once and didn't manage to piece it together. 09:13:53 elliott: I'm going to treat this as one of those games where you only get one try and then it's instadeath. 09:14:57 I read it a few times and still don't get it 09:15:43 shaWhich sentence? 09:15:47 shachaf: 09:15:55 ​/home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: shaWhich: not found 09:16:04 @src foldl 09:16:04 foldl f z [] = z 09:16:04 foldl f z (x:xs) = foldl f (f z x) xs 09:16:11 Right. 09:16:20 elliott: The edit. 09:16:52 shachaf: It's technically multiple sentences. :p 09:18:09 shachaf: Am I a bad person if I don't really like RWH? 09:18:15 * elliott feels guilty. 09:18:57 elliott: I haven't read RWH. 09:19:18 * elliott hasn't read all of it. 09:19:35 kmc says that the chapters on FFI and STM are good. 09:19:43 But all the code snippets are ugly imperative blobs. 09:19:45 I haven't even read those. 09:19:51 Also it's really outdated but I can't really blame them for that. 09:19:54 elliott: That's Real-World for you! 09:20:05 elliott: I'm sure you could find room in your heart to blame them for being outdated. 09:20:20 I heard they advocated putting text in ByteStrings, which is unacceptable even if one of the authors later goes on to create a Unicode text type. :p 09:20:28 I HEARD THEY'RE COMMIES. 09:21:04 OUR PRECIOUS UNICODE FLUIDS 09:21:20 * elliott would like to see a LYAH2: Electric Boogaloo that picks up where LYAH left off. 09:22:03 the problem is that it would still have to be written in a quirky style. 09:22:43 LYAH isn't really. 09:22:51 lyah2: the real world no jokes allowed 09:22:59 Although w(p)gtr kind of desensitised me to that sort of stuff permanently. 09:23:09 "see, monads are just monoids in the category of endofunctors. Pretty simple, huh? " 09:23:09 elliott: I don't like LYAH much either. 09:23:12 Not that I've read it. 09:23:33 I like it because 09:23:37 it's how I learned Haskell. 09:23:40 initially. 09:23:43 But people occasionally come into #haskell, misled by wrong sentences in it. 09:23:57 shachaf: Hmm, like what? 09:24:03 shachaf: It's not bad, it's just very, very simplistic. 09:24:21 It ends with monads. 09:24:25 pikhq: *zippers 09:24:30 elliott: Bah 09:24:40 if only we could teach newbies every excrutiatingly technically correct detail of everything without scaring them away. 09:24:45 elliott: I don't remember. 09:24:46 Monads-as-containers or something. 09:24:54 * elliott would write a Haskell tutorial, but nobody would read it. 09:25:00 I'd read it! 09:25:04 Well. 09:25:10 I'd read it to the same degree I've read LYAH and RWH. 09:25:11 elliott: you would just spam equations at the reader and be like "okay this makes perfect sense now" 09:25:17 That's a pretty good honour, isn't it? 09:25:32 "When we first talked about functors, we saw that they were a useful concept for values that can be mapped over. Then, we took that concept one step further by introducing applicative functors, which allow us to view values of certain data types as values with contexts and use normal functions on those values while preserving the meaning of those contexts. 09:25:33 In this chapter, we'll learn about monads, which are just beefed up applicative functors, much like applicative functors are only beefed up functors. 09:25:33 [...] 09:25:34 Monads are a natural extension of applicative functors and with them we're concerned with this: if you have a value with a context, m a, how do you apply to it a function that takes a normal a and returns a value with a context? That is, how do you apply a function of type a -> m b to a value of type m a? So essentially, we will want this function: 09:25:38 (>>=) :: (Monad m) => m a -> (a -> m b) -> m b 09:25:40 If we have a fancy value and a function that takes a normal value but returns a fancy value, how do we feed that fancy value into the function? This is the main question that we will concern ourselves when dealing with monads. We write m a instead of f a because the m stands for Monad, but monads are just applicative functors that support >>=. The >>= function is pronounced as bind." 09:25:45 shachaf: Looks pretty far away from monads-as-containers to me. 09:25:58 monads-as-fancy-values 09:26:22 shachaf: "Well, there should, but when Haskell was made, it hadn't occured to people that applicative functors are a good fit for Haskell so they weren't in there." This is misleading though, EVERYBODY knows Haskell predates applicative functors. 09:26:24 EVERYBODY 09:27:05 elliott: I don't remember. 09:27:17 -!- kallisti_ has changed nick to kallisti. 09:27:24 Haskell is a natural predator of applicative functors. 09:30:59 -!- Taneb has joined. 09:31:06 -!- Ngevd has quit (Read error: Connection reset by peer). 09:36:19 -!- Taneb has quit (Ping timeout: 268 seconds). 09:36:46 THere is also join, and that doesn't mention join 09:37:42 sure it does. 09:37:46 it mentions >>= 09:37:53 zzo38: join is not in the Monad typeclass 09:37:56 :> 09:38:03 I'm sure it's mentioned id at some point 09:38:05 elliott: I know it is not in the Monad typeclass but it should be 09:38:12 elliott: If we're arguing *that* way, it didn't mention fail. 09:38:14 ANYONE WITH A BRAIN would know that join is (>>= id) :> 09:38:21 fail is one of the essential nutrients for any Haskell monad. 09:39:26 shachaf: It does show fail and implement it in its examples, actually. 09:39:33 Though it probably: shouldn't. 09:39:43 zzo38: Well, LYAH is a Haskell tutorial, not a Haskell-as-it-should-be tutorial. 09:40:54 But you can't learn monads properly unless you know about fmap and join as well, and their mathematical relation to >>= 09:41:13 zzo38: It does teach functors and applicative functors before monads. 09:41:19 "learn monads" should never be your goal. 09:41:28 zzo38: that's what monad tutorials are for 09:41:55 (>>=) = (8===D) 09:42:00 shachaf: Not necessarily. What if you're learning category theory? :) 09:42:30 _ === _ = (>>=) 09:42:50 monqy: ah yes good old const (const (>>=)) 09:43:05 my favourite 09:43:05 the best of all functions 09:43:16 no wait, not as good as the totem pole. 09:43:43 the best of all functions is the McCarthy 91 function 09:44:11 kmc: What about the man or boy not-a-function? 09:44:26 @let best n | n > 100 = n-10 | otherwise = best (best (n+11)) 09:44:27 Defined. 09:44:30 > best 50 09:44:32 91 09:44:38 > best 91 09:44:39 91 09:44:40 > fix best 09:44:43 mueval-core: Time limit exceeded 09:44:45 fail 09:44:48 > fail 09:44:49 Overlapping instances for GHC.Show.Show (GHC.Base.String -> m a) 09:44:50 arising... 09:44:59 I think monad are generally understand better as a endofunctor having return and join, at least to me it is. But >>= is useful too, and so is <*> and that stuff. 09:45:05 > fix (>>=) 09:45:06 Occurs check: cannot construct the infinite type: 09:45:06 m = (->) (a -> m b) 09:45:11 > fix bеst 09:45:13 91 09:45:16 :t fij oin 09:45:16 kmc: It was just a bit slow, that's all. 09:45:16 Not in scope: fij' 09:45:17 Not in scope: oin' 09:45:19 :t fix join 09:45:20 Occurs check: cannot construct the infinite type: a = m a 09:45:20 Expected type: m (m a) 09:45:20 Inferred type: m a 09:45:56 Check in the appropriate box for boy or girl 09:45:58 wondering will it ever stop and who invented this world 09:46:10 Hi, welcome to big burger can i take your order? 09:46:25 hi 09:46:29 Someone broke kmc! 09:46:40 hi 09:46:47 For example, the list monad, join means put all list together, and for IO monad, join means if result if IO is another IO series of actions, then do the resulting one afterward. 09:47:15 hi 09:47:16 sequencing 09:47:23 sequencing 09:52:23 And with (,) monad, join will make the monoid composition 09:59:29 -!- ais523 has quit (Remote host closed the connection). 09:59:33 Speaking of (,) 09:59:40 @let best n = tell [n] >> if (n > 100) then return (n-10) else best (n+11) >>= best 09:59:41 :13:0: 09:59:41 Multiple declarations of L.best' 09:59:41 Declared at: @let bestest n = tell [n] >> if (n > 100) then return (n-10) else bestest (n+11) >>= bestest 09:59:54 Defined. 09:59:59 > runWriter (bestest 91) 10:00:01 (91,[91,102,92,103,93,104,94,105,95,106,96,107,97,108,98,109,99,110,100,111... 10:00:11 > runWriter (bestest 89) 10:00:13 (91,[89,100,111,101,91,102,92,103,93,104,94,105,95,106,96,107,97,108,98,109... 10:00:20 Thanks, lambdabot. 10:02:38 Thambdabot. 10:02:41 -!- sebbu2 has joined. 10:02:47 -!- sebbu2 has quit (Changing host). 10:02:47 -!- sebbu2 has joined. 10:02:52 Thanks, Hanks. Thanks. 10:03:12 "Here is how John McCarthy may have written this function in Lisp, the language he invented:" 10:03:32 Right, because he'd've written it in Common Lisp. 10:04:21 -!- zzo38 has quit (Remote host closed the connection). 10:04:34 -!- sebbu has quit (Ping timeout: 255 seconds). 10:08:56 -!- Phantom_Hoover has joined. 10:10:51 shachaf: There's a reason it's called Common Lisp! 10:10:57 I... completely forget why. 10:14:32 elliott: It's derived from "Come On". 10:14:46 -!- Phantom_Hoover has quit (Ping timeout: 240 seconds). 10:15:02 -!- Phantom_Hoover has joined. 10:18:03 shachaf, "Lisp" doesn't mean "Common Lisp" 10:18:16 shachaf, it means "whatever vaguely Lisp-like language most supports the point I'm currently trying to make" 10:19:11 kmc: Using "defun" and "t"? 10:19:18 for example "Lisp is a statically-typed language with pattern matching" 10:19:53 That sounds like a fun game. 10:20:02 Sadly I must go to sleep. 10:20:09 in this case "Lisp" means "Lisp extended with macros for pattern-matching and a static type system, which should be trivial for the most casual observer" 10:20:16 sadly but truly 10:20:28 Pattern matching? 10:20:29 kmc: Wait, I thought Haskell had a monopoly on that technique? 10:20:29 Lisp? 10:21:03 Phantom_Hoover: Tons of Lisps have pattern matching. 10:21:06 Heck, destructuring-bind is in CL. 10:21:37 Huh. 10:21:47 Pattern matching is just a special case of unification, man. 10:22:18 "Lisp is a simple, elegant language based on the lambda calculus" => R5RS Scheme with mutation and anything you don't learn in SICP removed 10:22:40 "Lisp is a mature language with sophisticated implementations" => Common Lisp 10:22:42 kmc: _The Little Schemer_ is simpler than SICP for this purpose. 10:22:52 "Lisp is webscale, in the cloud" => Clojure 10:23:42 * shachaf wonders what kmc will say about Arc 10:24:21 mumble mumble hackers and painters 10:25:37 Did you know there are people who still care about Arc? 10:25:46 Astonishing. 10:25:50 kmc: R5RS really shouldn't have mutation, though. 10:25:54 At least not set-car!/cdr!. 10:26:00 set! I can bear. 10:26:24 sigh 10:26:27 been fighting with this recently 10:26:34 to get some Scheme code to work in Racket 10:26:43 kmc: #lang r5rs? 10:26:46 Or whatever the syntax is. 10:26:49 doesn't do everything I want 10:26:51 but, we have it working now 10:27:13 * elliott thinks it was a deliberately breaking change to make Racket more distinct as its own language 10:27:24 so, it seems weird to use pairs also as reference cells 10:27:25 although it was still PLT Scheme then 10:27:43 but there's probably some benefit in having reference cells, distinct from mutable environments 10:27:48 but i'll have to think about what that might be 10:27:48 yes, true 10:27:59 kmc: it's a legacy from lisp implementations of ye olden days, I think 10:28:03 sure 10:28:05 where even implementation structures were made out of cons cells 10:28:13 I know picolisp still does everything like that 10:28:21 also I have no actual evidence old implementations were like that 10:28:24 "what, you don't do everything inside a metacircular evaluator" 10:28:34 "how do you write language extensions?!?" 10:29:19 kmc: Is this for your educational thing? 10:29:35 i don't know what you mean 10:29:44 Zombie 6.001 is http://web.mit.edu/alexmv/6.S184/ 10:29:46 You were talking about something earlier. 10:29:46 i'm helping teach it 10:29:50 Ah. Yes, that. 10:30:23 That looks like a fun class thing. 10:30:28 yep 10:30:32 you should follow along 10:30:50 How does one do that? 10:30:58 Do I have to move to Boston? 10:31:06 * elliott closes some tabs so he can see the favicons again. 10:31:10 i expect lecture slides and assignments will be posted 10:32:26 elliott: I'm just at the brink. Interesting tabs are a zero-sum game now. 10:32:42 * kmc thinks project 3 might be kind of a challenge, even as an instructor 10:33:04 (but it's not posted yet) 10:33:09 What's project 3? 10:33:23 a bunch of extensions to the metacircular evaluator 10:33:27 including an interactive debugger 10:33:45 Ah, a debugger. 10:35:08 I haven't actually read SICP. I probably should. 10:35:29 i've not read it cover to cover 10:35:36 but i think i've read most parts of it at some point or another 10:36:39 OK, you've convinced me. I'll follow along. 10:36:57 You should send me a reminder when it starts, if you remember. :-) 10:37:00 sure 10:37:02 it starts on Monday 10:37:05 er, Tuesday 10:37:12 I suddenly realise I've never written a debugger. 10:37:14 * kmc keeps forgetting that Tuesday isn't Monday 10:37:17 (Probably because I don't like debuggers.) 10:37:20 Oh. 10:37:36 elliott: Write a C debugger in Haskell for me. 10:37:51 And make it like gdb except satisfying whatever mysterious criteria a debugger must satisfy for me to like it. 10:39:02 Where are the slides etc. going to be posted? 10:39:03 shachaf: I don't think it's possible to like anything that exclusively exists to make you focus in depth on the exact control flow of an imperative prorgam. 10:39:14 Prorgam! 10:39:18 shachaf, for zombie 6.001? at the URL i just linked, I think 10:39:41 * kmc is new to this 10:39:54 OK. I'll keep a tab open. 10:40:09 will try to remind you 10:40:16 Hopefully I remember to reload it on Tuesday. 10:40:25 first project will be posted Tuesday night 10:40:34 * shachaf cleverly executes a rebalancing algorithm by moving a pair of tabs from one window to another. 10:40:38 shachaf: The best way to GC tabs is to turn your computer off every day. 10:40:53 * elliott just holds down the power button so he doesn't get a chance to think about saving them. 10:41:03 elliott: That would be a tragedy. 10:41:09 the best way is to run a browser which crashes a lot 10:41:12 This collection of tabs has been building up for about a year. 10:41:17 My browser crashes but recovers. 10:41:27 :t fromRational 10:41:28 forall a. (Fractional a) => Rational -> a 10:41:40 @hoogle Floating a => a -> Float 10:41:40 Prelude acos :: Floating a => a -> a 10:41:41 Prelude acosh :: Floating a => a -> a 10:41:41 Prelude asin :: Floating a => a -> a 10:41:43 Oh, right. 10:41:47 @hoogle Double -> Float 10:41:48 Unsafe.Coerce unsafeCoerce :: a -> b 10:41:48 Control.OldException throwDyn :: Typeable exception => exception -> b 10:41:48 Control.DeepSeq ($!!) :: NFData a => (a -> b) -> a -> b 10:41:51 lmao 10:41:59 haha 10:42:01 what the fuck 10:42:13 @hoogle (RealFloat a) => a -> b 10:42:13 Unsafe.Coerce unsafeCoerce :: a -> b 10:42:13 Prelude isDenormalized :: RealFloat a => a -> Bool 10:42:13 Prelude isIEEE :: RealFloat a => a -> Bool 10:42:16 I forget if RealFloat is a thing. 10:42:17 Yes, it is. 10:42:18 @hoogle (RealFloat a) => a -> Float 10:42:18 Prelude significand :: RealFloat a => a -> a 10:42:19 Prelude id :: a -> a 10:42:19 Data.Function id :: a -> a 10:42:22 @hoogle (RealFrac a) => a -> Float 10:42:22 Prelude id :: a -> a 10:42:22 Data.Function id :: a -> a 10:42:23 GHC.Exts breakpoint :: a -> a 10:42:26 Oh, come on! 10:42:29 @hoogle /msg 10:42:29 Parse error: 10:42:29 :t Control.OldException.throwDyn :: Double -> Float 10:42:30 /msg 10:42:30 ^ 10:42:30 Double -> Float 10:42:37 > Control.OldException.throwDyn 3.0 10:42:38 Not in scope: Control.OldException.throwDyn' 10:43:10 That's a fun type. 10:43:20 how do you even do Float -> Double or w/e 10:43:24 * elliott hasn't used floating-point much in Haskell 10:43:30 :t realToFrac 10:43:30 forall a b. (Real a, Fractional b) => a -> b 10:43:32 oh right 10:43:34 :t realToFrac :: Float -> Double 10:43:35 Float -> Double 10:43:37 I knew that existed, I just forgot its name 10:43:38 and type 10:44:22 This is the best typeclass: 10:44:25 @src Real 10:44:25 class (Num a, Ord a) => Real a where 10:44:25 toRational :: a -> Rational 10:44:41 class F a where { f :: a } 10:45:57 kmc: Haskell should get rid of value declarations. 10:45:57 Maybe I should move to Boston for a month. 10:46:05 You could just use a newtype record and an instance. 10:46:18 mhm 10:46:22 shachaf, which month? 10:46:34 -!- Ngevd has joined. 10:46:52 I don't know. I guess the bad months are just around now. 10:51:00 -!- Taneb has joined. 10:51:02 -!- Ngevd has quit (Read error: Connection reset by peer). 10:53:09 Anyway, I was going to sleep. 11:00:07 -!- nooga has joined. 11:00:32 shachaf: Hi. 11:00:41 elliott: Thanks. 11:01:53 shachaf: Did I wake you up? 11:02:03 thelliott 11:02:47 Thanks, kmc. 11:03:38 Stumped you there, didn't I. 11:03:48 no 11:04:37 Oh. 11:04:49 Anyway, I'm going to sleep. 11:04:57 good night, shachaf 11:05:03 gochaf 11:19:56 -!- azaq23 has joined. 11:26:09 Hello 11:39:29 class Comonoid a where { ytpme :: a -> (); dneppa :: a -> (a,a) } 11:39:44 no.... 11:40:03 what laws does it follow 11:42:16 The inverse of the monoid laws, duh. 11:42:40 help 11:43:51 Come on, monqy, it's just comonads extended from endofunctors. 11:44:50 !perl use v5.10; say scalar caller; say eval "scalar caller"; 11:44:53 ​\ main 11:45:20 hi perl 11:45:22 Evil scalar caller. 11:46:10 run echo 'scalar caller' > blah.pl; perl -e 'print do "blah.pl"'; rm blah.pl 11:46:13 main 11:46:34 run echo 'scalar caller' > blah.pl; perl -e 'package Foo; print do "blah.pl"'; rm blah.pl 11:46:38 Foo 11:47:12 hm 11:48:13 I /think/ I can use this... 11:48:24 to write code that can reload itself. 11:48:51 I can just check caller and if it's the name of the package, run any kind of necessary hot-swap code. 11:53:26 no.... 11:53:27 what laws does it follow 11:54:07 monqy: i er 11:54:18 monqy: i don't know 11:54:22 :( 11:54:32 Come on, monqy, it's just comonads extended from endofunctors. 11:54:43 Phantom_Hoover: Not really, you'd need a 11:54:56 class SortaCategory (~>) one (*) 11:54:58 or whatever. 11:55:03 *id 11:55:19 ytpme :: id ~> one; dneppa :: id ~> id*id 11:55:33 oh hmmmm that won't always work I think.... 11:56:07 if I write new code that removes a method, the reload won't hide that method. 11:56:17 but it can redefine and add methods no problem. 11:57:14 run echo '$x' > blah.pl; perl -e 'local $x = 5; print do "blah.pl"'; rm blah.pl 11:57:17 5 11:57:30 run echo '$x' > blah.pl; perl -e 'my $x = 5; print do "blah.pl"'; rm blah.pl 11:57:33 No output. 11:57:43 awwww yeah. 11:57:56 I can do so many evil things with that trick. 11:58:00 Phantom_Hoover: (What is a comonoid really?) 11:58:08 Oh, it's a monoid in the opposite category. 11:58:17 Yes. 11:58:21 And the opposite category is just flipping all the arrows. 11:58:32 So, um... what's the comonoid equivalent of Monoid? 11:59:25 Comonoid. 11:59:28 :) 12:00:33 Well, um, if you take the definition with a category with one object A, and take the underlying set to be Hom(A,A) and the multiplication operator to be ., you get... 12:00:39 The exact same monoid? 12:01:06 Q.E.D. 12:02:52 run echo 'package X; our$x = 3' > blah.pl; perl -e 'package X; our $x = 2; do "blah.pl"; print$x;' rm blah.pl 12:02:56 3 12:03:18 oh that's so good... 12:03:46 why kallisti why................ 12:03:57 monqy: to have an IRC bot that never needs to be shutdown ever. 12:05:42 cat blah.pl 12:05:45 package X; our $x = 3 12:05:57 oh 12:06:19 run rm blah.pl 12:06:22 No output. 12:06:50 it's not without flaws though. I can't redefine lexical variables at the top-level this way. 12:07:03 perhaps that is for the best 12:07:03 because... well, they're lexical. 12:07:43 but most top-level variables are going to be package scope or dynamic scope anyway. 12:08:37 now for something fun... 12:12:04 run echo 'package X; my$caller = caller; eval "require $caller";' > X.pm; echo 'package Y; if (my$caller = caller) { eval "require $caller" } else { require X }' > Y.pm; perl Y.pm 12:12:08 No output. 12:12:12 hm 12:12:18 oh right 12:12:28 I can't recursively require things like that. 12:12:41 run echo 'package X; my$caller = caller; eval "require $caller";' > X.pm; echo 'package Y; if (my$caller = caller) { eval "require $caller" } else { print %INC; require X }' > Y.pm; perl Y.pm 12:12:44 No output. 12:13:05 run echo 'package X; print %INC; my$caller = caller; eval "require $caller";' > X.pm; echo 'package Y; if (my$caller = caller) { eval "require $caller" } else { require X }' > Y.pm; perl Y.pm 12:13:09 X.pmX.pm 12:15:32 run echo 'package X; do caller.".pm";' > X.pm; echo 'package Y; if (my$caller = caller) { do "$caller.pm" } else { require X }' > Y.pm; perl Y.pm 12:15:35 Warning: Use of "caller" without parentheses is ambiguous at X.pm line 1. \ Warning: Use of "caller" without parentheses is ambiguous at X.pm line 1. \ Warning: Use of "caller" without parentheses is ambiguous at X.pm line 1. \ Warning: Use of "caller" without parentheses is ambiguous at X.pm line 1. \ Warning: Use of "caller" without parentheses is ambiguous at X.pm line 1. \ Warning: Use of "caller" without parentheses 12:15:44 lol 12:16:10 -!- Zuu has quit (Ping timeout: 252 seconds). 12:16:20 apparently not very ambiguous because it did exactly what I wanted. :P 12:16:51 run echo "main = print \"test\"" 12:16:54 main = print "test" 12:17:03 Hmm 12:17:10 I can't remember what I was doing with that 12:17:15 me neither. 12:18:05 run echo "main = print \"test\"" > test.hs; runhaskell test.hs 12:18:13 ​"test" 12:18:25 rm test.hs 12:18:29 No output. 12:19:34 http://search.cpan.org/~sprout/Sub-Delete-1.00002/lib/Sub/Delete.pm 12:19:41 I could maybe use this if I need to delete subs. 12:20:08 undef ⊂ works kinda 12:20:39 or, hmmm... 12:20:52 I could completely destroy the symbol table before I reload. lol. 12:22:02 gah does java not have a built in rounding function that rounds away from zero in case of .5 12:22:37 lolMath.round? 12:22:42 kallisti, from the docs of Math.round it seems to always round up? So -0.5 would end up as 0? 12:22:44 oops lol virus 12:22:57 oh that's... weird. maybe they're wrong. 12:23:09 maybe they mean "rounds up" in terms of absolute value. 12:23:12 hm perhaps 12:23:23 no REPR for java so a bit annoying to test such 12:23:52 read eval print read 12:23:57 it just exits after the second read 12:24:03 useful(tm) 12:25:04 nonsense. it's just as simple as public class Test { public static void main(String[] argv) { ... } 12:25:05 at least it pays attention 12:25:19 not like those dirty EEPLs 12:25:59 and then System.out.println(Math.round(-0.5)) assuming you imported Math 12:26:04 so. easy. 12:26:20 elliott, typo :P 12:26:29 elliott, but I guess I could justify it as read eval print repeat 12:26:35 or something 12:26:39 wait no deleting the symbol is probably a bad idea oh wait nevermind that's a great idea. 12:28:28 run echo 'package X; our$x = 3;' > X.pm; perl -e 'package X; our $x = 2; sub test() { print "WOAH" }; undef %X::; do "X.pm"; test'; 12:28:31 WOAH 12:28:39 oh, no. 12:28:41 not a good idea. :P 12:28:53 run echo 'package X; our$x = 3;' > X.pm; perl -e 'package X; our $x = 2; sub test() { print "WOAH" }; %X:: = (); do "X.pm"; test'; 12:28:56 WOAH 12:29:08 subroutines get some kind of magic namespace 12:29:10 ????? 12:29:14 no. 12:30:03 run echo 'package X; our$x = 3;' > X.pm; perl -e 'package X; our $y = 2; sub test() { print "WOAH" }; %X:: = (); do "X.pm"; print$x, $y;' 12:30:06 2 12:30:17 uh 12:35:16 run echo 'package X; our$x = 3;' > X.pm; perl -e 'package X; use strict; our $y = 2; sub test() { print "WOAH" }; %X:: = (); do "X.pm"; print$x, $y;' 12:35:19 Global symbol "$x" requires explicit package name at -e line 1. \ Execution of -e aborted due to compilation errors. 12:35:37 run echo 'package X; our $x = 3;' > X.pm; perl -e 'package X; use strict; our ($y,$x) = (2,5); sub test() { print "WOAH" }; %X:: = (); do "X.pm"; print$x, $y;' 12:35:40 52 12:36:35 hmmm I spoke too soon. 12:37:16 run echo 'package X; our$x = 3;' > X.pm; perl -e 'package X; use strict; our ($y,$x) = (2,5); sub test() { print "WOAH" }; do "X.pm"; print $x,$y;' 12:37:20 32 12:37:33 okay so. for future reference: don't try to delete symbol tables 12:37:38 weird things will happen. 12:40:03 run echo 'package X; our $x = 3;' > X.pm; perl -e 'package X; use strict; our ($y,$x) = (2,5); sub test() { print "WOAH" }; %X:: = (); do "X.pm"; print "directly, x=$x, y=$y\n"; eval "print \"evally, x=\$x, y=\$y\\n\"";' 12:40:06 directly, x=5, y=2 \ evally, x=3, y= 12:40:16 fizzie: ah because of compilation 12:41:04 http://stackoverflow.com/questions/4623556/symbol-table-deleting-entries-question 12:41:06 according to this 12:41:51 It's a reasonable theory. 12:42:49 (Though you should of course give equal time to the "intelligent variable" theory, too.) 12:43:02 I haven't studied that one. 12:43:06 are variables sentient in perl? 12:43:15 It's something like that, yes. 12:43:54 so unless all the code I execute afterwards is part of an eval, my symbol table deletions take no effect. 12:45:29 http://cpansearch.perl.org/src/SPROUT/Sub-Delete-1.00002/lib/Sub/Delete.pm 12:45:39 I wonder what that magical looking subroutine at the top does. 12:46:17 magic 12:47:35 my$glob = *$globname; # autovivify the glob in case future perl 12:47:39 you never know when future perl might happen. 12:49:02 keys %imported_slots == 1 and exists$imported_slots{SCALAR} and !$imported_slots{SCALAR} and Internals'SvREFCNT $$glob =>== 1 and !defined *glob{IO} and !defined *glob{FORMAT} and return; # empty glob 12:49:06 oh god what is this. 12:49:29 =>== 1 ??????? 12:49:49 REALLY greater than or equal to. 12:51:59 run perl -e '1 =>== 2' 12:52:02 syntax error at -e line 1, near "=>==" \ Execution of -e aborted due to compilation errors. 12:52:09 It must be some kind of real magic. 12:52:19 oh wait... 12:52:22 it could be either... 12:52:24 = >= = 12:52:27 => == 12:52:29 or ... 12:52:30 what 12:52:35 what does that even mean 12:53:11 I like the use of ' there too 12:53:20 !perl my x = 3; print Intervals'SvREFCNT \x 12:53:21 No output. 12:53:36 oh this code doesn't use strict; 12:53:40 Internals, not Intervals. 12:53:47 !perl my x = 3; print Internals'SvREFCNT \x 12:53:48 Type of arg 1 to Internals::SvREFCNT must be one of [%@] (not single ref constructor) at /tmp/input.7682 line 1, at EOF \ Execution of /tmp/input.7682 aborted due to compilation errors. 12:53:56 !perl my x = 3; print Internals'SvREFCNT x 12:53:57 1 12:54:06 not very surprising. 12:55:07 !perl my x = 3; print Internals'SvREFCNT x =>== 1 12:55:07 1 12:55:18 !perl my x = 3; print Internals'SvREFCNT x => == 1 12:55:19 1 12:55:22 !perl my x = 3; print Internals'SvREFCNT x = >== 1 12:55:23 syntax error at /tmp/input.7967 line 1, near "= >=" \ Execution of /tmp/input.7967 aborted due to compilation errors. 12:55:33 oh hmmm 12:55:37 I wonder what the comma does. 12:55:42 !perl my x = 3; print Internals'SvREFCNT x , == 1 12:55:43 1 12:56:02 nothing? 12:56:08 maybe it's to disambiguate something? 12:56:21 !perl my x = 3; print Internals'SvREFCNT x, 1 12:56:21 1Attempt to free unreferenced scalar: SV 0x7f56d20d4a30, Perl interpreter: 0x7f56d20b3010. 12:56:24 The bestest. 12:56:28 !perl my x = 3; print Internals'SvREFCNT x == 1 12:56:29 Type of arg 1 to Internals::SvREFCNT must be one of [%@] (not numeric eq (==)) at /tmp/input.8217 line 1, at EOF \ Execution of /tmp/input.8217 aborted due to compilation errors. 12:56:32 ah 12:56:48 it's to prevent that 12:57:05 instead of, you know, using parentheses. 12:57:12 =>== lololololol 12:58:46 a regular comma would have been much clearer 12:58:53 !perl print abs -4 =>== 42 12:58:54 4 12:59:10 maybe it's some weird idiom I've never seen? 12:59:51 ....wat 12:59:56 oh 12:59:57 yes 13:00:28 =>== is to == as and is to && 13:01:07 :t randoms 13:01:08 forall g a. (Random a, RandomGen g) => g -> [a] 13:01:22 but yeally I'd use ,== or , == or (most likely) parentheses 13:01:57 The half-orphan comma looks pretty silly too. 13:03:29 * kallisti is tempted to use this module with use strict turned on and see how many warnings/errors he gets. 13:05:04 anyway this will work in many of the cases I'm concerned with, where I have plugins redefining methods. I think.. 13:06:16 -!- oerjan has joined. 13:07:39 run echo 'package X; our x = 3;' > X.pm; perl -e 'package X; use strict; our (y,x) = (2,5); sub test() { print "WOAH" }; %X:: = (); do "X.pm"; X::test' 13:07:43 WOAH 13:08:08 run echo 'package X; our x = 3;' > X.pm; perl -e 'package X; use strict; our (y,x) = (2,5); sub test() { print "WOAH" }; %X:: = (); do "X.pm"; package Blah; X::test' 13:08:11 WOAH 13:08:15 hm, well, nevermind 13:08:23 I'll just... not try to delete symbol tables. 13:09:14 run echo 'package X; our x = 3; sub test { print "SHADOOSH" }' > X.pm; perl -e 'package X; use strict; our (y,x) = (2,5); sub test() { print "WOAH" }; %X:: = (); do "X.pm"; package Blah; X::test' 13:09:17 WOAH 13:09:30 run echo 'package X; our x = 3; sub test { print "SHADOOSH" }' > X.pm; perl -e 'package X; use strict; our (y,x) = (2,5); sub test { print "WOAH" }; %X:: = (); do "X.pm"; package Blah; X::test' 13:09:32 WOAH 13:09:35 :( 13:10:30 I'm not sure why it suddenly doesn't work because I add that symbol table line 13:10:40 run echo 'package X; our x = 3; sub test { print "SHADOOSH" }' > X.pm; perl -e 'package X; use strict; our (y,x) = (2,5); sub test { print "WOAH" }; do "X.pm"; package Blah; X::test' 13:10:44 SHADOOSH 13:11:24 fizzie: just how sentient are variables in Perl exactly. 13:12:19 run perl -e 'package X; our x = 3; %X:: = (); our x = 4; print x' 13:12:22 4 13:13:17 -!- oerjan has set topic: Official revolting channel of the inverse femtobarn stupid topic change plurality, the original Trilogy: A new PHP | http://codu.org/logs/_esoteric/. 13:14:17 run echo 'package X; %X:: = (); our x = 3;' > X.pm; perl -e 'package X; use strict; our (y,x) = (2,5); sub test() { print "WOAH" }; do "X.pm"; package Blah; X::test' 13:14:20 WOAH 13:15:02 HackEgo: you sound so impressed 13:15:14 I don't understand at all... 13:16:07 run echo 'package X; %X:: = (); our x = 3;' > X.pm; perl -e 'package X; use strict; our (y,x) = (2,5); sub test() { print "WOAH" }; do "X.pm"; sub foo { test}; foo ' 13:16:11 WOAH 13:16:25 * Sgeo should write a hello Template Haskell program or something 13:16:35 Hello, Template World! 13:17:00 Don't like the notion of needing a separate module though 13:17:03 fizzie: can you make sense of this. 13:19:32 I'm not entirely sure I want to. 13:19:53 kallisti: perhaps you should add -w ? 13:19:59 Sgeo: I think it complicates type-checking if you don't enforce that. 13:20:08 * oerjan doesn't really know what kallisti is trying 13:20:13 TH is a pain because it messes up the compiler control flow. 13:20:19 Thus the restrictions. 13:20:43 Anyway, I suspect compilation again. I mean, do "X.pm" equals eval cat X.pm, on compilation-time the 'test' in sub foo presumably gets turned into a reference of the sub test. 13:20:43 oerjan: I'm trying to write code that can reload itself. 13:21:16 the reloading part is easy, however... all the old symbols that weren't overwritten get left behind unless you do something to delete them beforehand. 13:21:26 and now I'm encountering weirdness with Perl and its symbol table. 13:21:50 specifically %X:: = (); doesn't appear to do what you would expect. 13:22:10 Then you must simply expect something else. 13:22:17 "The subroutine is completely obliterated from the symbol table (though there may be references to it elsewhere, including in compiled code)", like Sub::Delete says. 13:22:47 -!- Zuu has joined. 13:22:47 -!- Zuu has quit (Changing host). 13:22:47 -!- Zuu has joined. 13:23:00 it would seem if that were the case then completely redefining the symbol table via a do "X.pm" shouldn't do anything to the outer code. 13:23:24 in fact, if I write %X:: = (); before the do, then that's exactly what happens. 13:23:32 but if I remove that line, then the do redefines symbols as expected. 13:24:51 run echo 'package X; %X:: = (); our x = 3;' > X.pm; perl -e 'package X; use strict; our (y,x) = (2,5); sub test() { print "WOAH" }; local %X:: = (); do "X.pm"; test ' 13:24:54 WOAH 13:26:07 run echo 'package X; %X:: = (); our x = 3; sub test { print "hi" }' > X.pm; perl -e 'package X; use strict; our (y,x) = (2,5); sub test() { print "WOAH" }; local %X:: = (); do "X.pm"; test ' 13:26:10 WOAH 13:26:26 run echo 'package X; our x = 3; sub test { print "hi" }' > X.pm; perl -e 'package X; use strict; our (y,x) = (2,5); sub test() { print "WOAH" }; local %X:: = (); do "X.pm"; test ' 13:26:29 WOAH 13:26:33 okay, I give up. :P 13:27:01 You could just forget about the symbol tables and use coderefs you manage manually. 13:28:02 I was thinking that I could probably just manually delete subroutines when I hotswap if leaving them present would break the system. 13:28:57 but that might have the same problem. 13:29:10 * oerjan notes a subtle edit to the intro blurb in today's darths & droids 13:29:30 well, "subtle" 13:30:12 Whee! 13:30:13 makeDef text = [d|helloDefinition = (litE . stringL text)|] 13:30:38 * Sgeo thinks it's somewhat confusing as to when something puts stuff in the Q monad and when it doesn't 13:31:02 what parts are confusing 13:31:30 run echo 'package X; our x = 3; sub test { print "hi" }' > X.pm; perl -e 'package X; use strict; our (y,x) = (2,5); sub test() { print "WOAH" }; undef &test; do "X.pm"; test ' 13:31:34 hi 13:31:51 if I undefine subroutines that way it works fine, so... yes that's an option. 13:31:52 I forget what does what and what does what except that the constructors don't and the lowercasey functioney things do 13:32:15 run echo 'package X; sub test { print "new!" }' > X.pm; perl -e 'package X; use strict; sub test { print "old!" }; do "X.pm"; test; package Blah; X::test' 13:32:18 new!new! 13:32:24 run echo 'package X; sub test { print "new!" }' > X.pm; perl -e 'package X; use strict; sub test { print "old!" }; %X:: = (); do "X.pm"; test; package Blah; X::test' 13:32:28 old!old! 13:32:32 monqy, yeah, I'm starting to think that's the rule of thumb 13:32:33 kallisti: I'm thinking the %X:: = () symbol table deletion there wipes out the symbol table entry, so the "sub test" in X.pm gets bound to a new entry and therefore doesn't get called; while when you don't wipe it out, the "sub test" in X.pm just overwrites the CODE slot of that glob, and therefore does get called. 13:32:49 Also didn't realize that [d|..] did a list of the things, and not a single one 13:33:00 I initially tried to sequence the thing 13:33:04 run echo 'package X; our x = 3; sub test { print "hi" }' > X.pm; perl -e 'package X; use strict; our (y,x) = (2,5); sub test() { print "WOAH" }; undef &test; do "X.pm"; test ' 13:33:07 hi 13:33:09 Sgeo: You're always meant to use the functions. 13:33:15 As opposed to the constructors directly. 13:33:24 TH sucks, by the way. 13:33:26 Except when pattern matching? 13:33:28 No shit. 13:33:31 fizzie: so I could loop through the symbol table and undef all the variables maybe? 13:33:45 How does TH suck? 13:33:58 Sgeo: it will quickly become apparent 13:34:11 Sgeo: unless you're really bad at noticing bad things 13:34:13 I have 3 choices here: Use TH, write a program to output Haskell code, or go insane. 13:34:15 monqy: No it won't, he likes Active Worlds. 13:34:24 elliott: I was thinking more station v3 but that works too 13:34:28 Sgeo: Pick (d) Don't do whatever bad thing you're trying to do. 13:34:39 Sgeo: code generation is cool. write a perl script. 13:34:43 there aren't any th alternatives are there :( 13:34:48 cpp doesnt count 13:34:51 Sgeo: I write all of my Haskell in perl. 13:34:53 Sgeo: Anyway: http://www.reddit.com/r/haskell/comments/nny43/readargs_for_quick_argument_parsing/c3apz9x?context=1 13:35:02 Sgeo: Most people avoid TH for basically those reasons./ 13:35:04 *no / 13:35:18 Deriving lenses is the main TH usecase these days :P 13:36:00 Sgeo: (The "BTW, I despise anything using TH. Including my own code." quote is from augustss, if Big Names convince you of things.) 13:37:01 Sgeo: what bad thing are you trying to do , anyway 13:37:28 kallisti: I don't really know about Perl internals, I don't know what the compilation stores in the code. If it's a typeglob-like reference, I suppose you could just zero the CODE slots of all the entries; that I think should stop old compiled code calling them, if that's what you want. (Well, except if some place actually stored a coderef to the old sub, I'm not sure if that's even possible to break.) 13:37:42 monqy: don't don't say that he'll tell us 13:37:49 monqy, automate the creation of functions and data structures based on specifications that I.. err, specify, largely copy-pasted from the AW wiki 13:37:59 fizzie: no that can't break. 13:39:25 but that's not really an issue 13:39:36 all the old coderefs get redefined anyway. 13:39:38 Sgeo: automate? 13:39:53 monqy, as opposed to writing out countless definitions by hand. 13:39:58 (the coderefs in my program are in the bot command table, which will get redefined during the hotswap) 13:41:37 basically I'll just add a line so that, if the caller is the package itself, it will autorun a special hotswap routine that basically reinitializes everything. 13:49:41 I'll zero basically everything. I don't want old package-scope variables to be visible either. 13:50:20 Would it be better for me to write a program to write the Haskell code instead? 13:50:35 Sgeo: it would be pretty easy I'd thin. if it's sufficiently boring. 13:51:08 why are you doing what you are doing in the way you are doing it 13:51:16 and why are you doing what you are doing 13:51:19 Sgeo: If you can't avoid whatever you're doing, then yes. 13:51:29 Sgeo: If your needs are simple enough, use {-# LANGUAGE CPP #-} instead. 13:52:15 run perl -e 'package X; our (x, y, z) = 1..3; print %X::' 13:52:18 y*X::yx*X::xz*X::z 13:54:14 run perl -e 'package X; our (x, y, z) = 1..3; X::{x}{SCALAR} = undef; print x' 13:54:17 1 13:54:17 kallisti, this sounds like an awfully complex way to do hotswapping of code above. And what if the old code is still executing in another thread? 13:54:21 it sounds like he's doing some hard core code generation 13:54:38 run perl -e 'package X; use strict; our (x, y, z) = 1..3; X::{x}{SCALAR} = undef; print x' 13:54:42 1 13:54:49 Vorpal: can you think of any better alternatives? 13:54:56 kallisti, using erlang? ;P 13:55:00 nope. 13:55:05 unless you have a good perl-to-erlang translator. 13:55:49 I remember a MUD codebase I used to maintain used... execl? or something? 13:56:15 it somehow magically transferred sockets. I didn't really understand it. 13:56:40 kallisti, erlang basically does it by allowing you to have multiple versions of a module at the same time in memory and then when you are ready you tell threads to jump over to the new one (how: module:foo refers to the last version, but inside module a plain foo would refer to the current version, so you just call module:foo from inside the module itself if that is where the main loop is) 13:56:53 (gen_server and such abstracts that away) 13:57:15 kallisti, eh when you exec existing file descriptors aren't closed. 13:57:35 unless you specifically set some flag on the fd using fcntl iirc 13:57:52 kallisti, so that is why they hang around 13:57:54 are sockets... file descriptors? 13:58:04 kallisti, obviously, what did you think they were? 13:58:18 I'm thinking of bash file descriptors I think. is that the same thing? 13:58:48 like fds as in open() or such 13:58:56 not sure what you mean with bash fds 13:59:02 the numbered ones. 13:59:17 that is what everything uses on *nix? 13:59:23 so why bash specifically 13:59:24 I see. 13:59:34 FILE* is just a wrapper around fds 13:59:43 because I don't fully understand file descriptors. 13:59:48 how are the numbers assigned? 13:59:58 by the programmer or the OS? 14:00:04 right 14:00:06 I meant 14:00:13 what algorithm is followed by the OS. 14:00:14 if any. 14:00:28 kallisti, probably "next unused" I would guess 14:00:35 you can of course move a fd and such 14:00:36 fds get reused immediately 14:00:39 did that in cfunge 14:00:49 so I guess they use a free-list or w/e 14:00:55 in other words could I do something 3>&1 and have some file in my program assigned to STDOUT? 14:01:01 elliott, does POSIX say that or is it just how it works on Linux? 14:01:03 unless you specifically set some flag on the fd using fcntl iirc 14:01:08 At open() time too; O_CLOEXEC. 14:01:13 oh right 14:01:14 Vorpal: POSIX says nothing about it afaik. 14:01:20 right 14:02:01 kallisti, not entirely sure what bash does there in terms of which syscalls 14:02:16 kallisti, I would guess it calls dup(3)? 14:02:24 or rather dup2(3) 14:02:26 * kallisti had previously thought it was the case that file descriptor referred to any open files, but I think through some conversation in this channel I was convinced that it was a bash-related concept. 14:03:13 POSIX-2008: dup(3) equivalent to fcntl(fildes, F_DUPFD, 0); fcntl F_DUPFD "Return a new file descriptor which shall be the lowest numbered available (that is, not already open) file descriptor greater than or equal to the third argument, arg, taken as an integer of type int." 14:03:14 kallisti: If it was a bash-only concept, I'm not sure what you'd call the return value of open(2). 14:03:16 kallisti, if you inspect a struct FILE it will, amongst other things, contain a field for the fd 14:03:22 So when dup'ing it's always the "smallest free". 14:03:24 there will be various flags and buffer things and so on too 14:03:25 At least on POSIX. 14:03:37 elliott: this may come as a shock but I don't know much about syscalls. 14:03:43 or C. 14:03:45 Does POSIX actually specify that stdio must be implemented as a wrapper around fd stuff? 14:03:46 "The open() function shall return a file descriptor for the named file that is the lowest file descriptor not currently open for that process." 14:03:48 fizzie, I used dup2() in cfunge iirc to move some fd about for PERL 14:03:49 Same for 'open'. 14:03:53 Obviously a conforming C can implement fopen() without file descriptors. 14:04:04 s/about/around/ 14:04:12 so uh... is 3>&1 a bad idea? 14:04:30 kallisti: Not if you want to redirect fd 3 to stdout. 14:04:31 So the "lowest number that's not in use" is in fact in POSIX. 14:04:34 elliott, indeed 14:04:42 elliott: I'm guessing there's a way to specify that fd 3 is, then. 14:04:42 elliott, I just meant how it is done on *nix 14:04:52 elliott: otherwise you're at the mercy of the OS. 14:04:54 kallisti: What? 14:05:01 Is what? 14:05:03 Oh. 14:05:04 elliott: POSIX includes fileno(), so there sort-of has to be some correspondence between FILE*s and file descriptors. 14:05:15 kallisti: The program can just 14:05:18 write(3, ..., ...); 14:05:25 fizzie, indeed, I assumed he meant for non-*nix 14:05:27 kallisti: The shell opens fd 3. 14:05:29 *creates 14:05:31 By duping 1 onto it. 14:05:55 Vorpal: Yes; this was an answer to the "Does POSIX actually specify that stdio must be implemented as a wrapper around fd stuff" thing, not the "conforming C" thing. 14:05:56 fizzie: Yes, but is the fd specified to refer to the same file? :p 14:06:08 "The fileno() function shall return the integer file descriptor associated with the stream pointed to by stream." 14:06:11 elliott: it always does that? or is that a result of the 3>&1 bit? 14:06:20 kallisti: That's because you told it you want an fd 3 going somewhere. 14:06:24 The standard fds are just 0, 1, 2. 14:06:25 or C. <-- oh, I assumed you were familiar with C when I tried to describe the concept above. 14:06:31 kallisti: You can't allocate fd 3 without pointing it somewhere. 14:06:37 fizzie, ah 14:06:38 i.e. another fd or a file or a socket or whatever. 14:06:53 elliott: so a regular open call can't assign fd 3 to something? 14:07:22 Not if it's already open. 14:07:35 kallisti: open(2) chooses which FD to give you. 14:07:46 kallisti: If you want it somewhere else, you need to dup2(2) it. 14:07:47 kallisti, I don't think you can specify which fd you want open to use, but you could open and then move it with dup2 and then close the original one opened 14:07:57 *dup2(3), apparently. 14:07:59 elliott, I believe that is dup2(3) 14:08:01 snap 14:08:02 Wait, no. 14:08:04 dup2(2). 14:08:13 At least "man 2 dup2" produces my glibc man page. 14:08:19 elliott, man 3p dup2 too 14:08:20 man 3 dup2 produces the POSIX manpage. 14:08:23 Right. 14:08:23 In 3P. 14:08:44 elliott, I often wondered what the point of the 2/3 separation was 14:09:11 right I'm asking... if you don't specifically assign 3, and the OS assigned a random file to fd 3, then.... 3>&1 would then do possibly weird unpredictable things, right? 14:09:14 2 is system calls, 3 is libc functions? 14:09:32 kallisti: If you do 3>&1, 3 is open by the time your program starts. 14:09:40 kallisti: Therefore it won't be used by any files you open in the program. 14:09:46 olsner, yes but there are some system calls that are also specified by either POSIX or C as libc functions. Shouldn't there be a man page in each then 14:09:49 ah right it's dup'd from fd 1 14:09:59 olsner: Yes, although the system call man pages come from glibc, and document the glibc wrappers around them too. 14:10:01 or fd 0 possibly? 14:10:09 elliott, indeed 14:10:23 Vorpal: Presumably the point is taht you can look in section 2 to find all the system primitives. 14:10:25 If you say 3>&1, it's fd 1 which it dups into 3. That's what the "&1" part means. 14:10:25 *that 14:10:30 Back when people actually cared about sections. 14:10:35 Vorpal: for dup3 I do have two manpages 14:10:38 |dup2 14:10:42 *dup2 14:10:44 Vorpal: I know the basics of C programming but that's the extent of it. I'm not too familiar with all the details. 14:10:48 Nowadays sections are just to disambiguate program/libc/system-doc. :p 14:10:50 olsner, well one is the 3p copied-from-POSIX one 14:10:52 at least for me 14:11:23 fizzie: aaaah I see. 14:11:38 Vorpal: You can "specify" that open(2) uses fd n by doing "close(n); for (i = 0; i < n; i++) dup2(someotherfd, i); open(...);" (assuming here that someotherfd != n, and none of the calls fail). 14:11:56 elliott, so we could basically drop everything except 1,3,3p,5 and 7? 14:12:00 for some reason I thought things like 2>&1 reassigned fd 1 to 2, not the other way around. 14:12:08 elliott, it isn't like section 8 for example is very well defined 14:12:33 hm I guess section 4 is useful too but I can't ever remember using that 14:12:36 Vorpal: Were I designing man today, I would drop the numeric sections. 14:12:41 (I'm looking at man man atm) 14:12:44 "man coreutils/ls", "man libc/wtf". 14:12:52 "man foo" would just do */foo and prompt if it's ambiguous. 14:12:52 well yes 14:13:02 * kallisti knows nothing about sections 14:13:04 that is indeed a lot more sensible 14:13:09 kallisti, try man man 14:13:10 in fact sections seems like a terrible way to organize namespaces of things. 14:13:15 Perl and Tcl documentation coming up when I use man is really annoying, so proper segregation is needed rather than silly numeric sections. 14:13:26 kallisti: Well, it does that if that's the way you want to think of it. I mean, it makes fd 2 point to the same thing fd 1 points to. 14:13:27 Vorpal: I've seen them, but haven't taken the time to commit numbers to sections in memory. 14:13:27 kallisti: It originates because man pages were originally a printed manual. 14:13:32 Then they invented On-Line help. 14:13:32 elliott, you can edit /etc/man.conf to set search order 14:13:40 elliott, or /etc/mandb.conf on some systems 14:13:42 Vorpal: It doesn't bother me that much. :p 14:13:53 or even manpath.config on ubuntu 14:13:53 Vorpal: But I'd call 7 "linux". 14:13:57 And 2 "syscall". 14:14:09 Probably syscall/foo would just symlink to libc/foo. 14:14:13 elliott, I'd call 2 "glibc-mostly" 14:14:24 Are there 2 manpages not from glibc? 14:14:28 I think I've seen some bare-bones ones. 14:14:53 elliott, I seen a few from glibc saying that glibc doesn't provide a wrapper for it 14:15:01 or maybe not from glibc hm 14:15:10 ioctl_list(2) is probably not from glibc. 14:15:12 elliott, man futex for example 14:15:46 btw my manpath.config contains SECTION1 n l 8 3 2 3posix 3pm 3perl 5 4 9 6 7 14:16:02 I believe I moved some stuff around. Might have been on a different system 14:16:06 Vorpal: Well 14:16:08 COLOPHON 14:16:08 This page is part of release 3.35 of the Linux man-pages project. A 14:16:08 description of the project, and information about reporting bugs, can be 14:16:08 found at http://man7.org/linux/man-pages/. 14:16:15 elliott, so not glibc indeed 14:16:22 Vorpal: That's the case for all glibc manpages, though. 14:16:30 It's just that they describe glibc functions. 14:16:38 So they're glibc man pages. 14:16:41 hm 14:16:50 indeed 14:16:55 Vorpal: The funny thing is that a third party writes the documentation for glibc... 14:16:56 -!- Patashu has quit (Quit: MSN: Patashu@hotmail.com , Gmail: Patashu0@gmail.com , AIM: Patashu0 , YIM: patashu2 , Skype: patashu0 .). 14:17:01 Must be great fun keeping it in sync. 14:17:06 heh 14:17:06 At least libc's API doesn't change much. 14:17:20 The Linux man-pages project 14:17:20 The Linux man-pages project documents the Linux kernel and C library interfaces that are employed by user programs. It provides manual pages in the following sections: 14:17:20 2: System calls, documenting the system calls provided by the Linux kernel. 14:17:20 3: Library functions, documenting the functions provided by the standard C library (with particular focus on glibc, the GNU C library). 14:17:20 4: Devices, which documents details of various devices, most of which reside in /dev. 14:17:22 5: Files, which describes various file formats, and includes proc(5), which documents the /proc file system. 14:17:25 7: Overviews, conventions, and miscellaneous. 14:17:27 (Note that many of the man pages on a Linux system, especially those in sections other than 2 and 3, come from other packages.) 14:17:43 hm 14:18:14 elliott, it must be annoying when a new C or POSIX version is released and gets supported in glibc 14:18:29 Ubuntu has "manpages-dev" which includes sections 2 and 3 from that project, but also "glibc-doc" which installs at least some missing pthreads manpages, presumably generated from some glibc documentation. 14:18:54 Vorpal: That's like 3 functions at the rate those two pieces of crap move. 14:18:56 POSIX is updated more frequently than C too and it is larger. 14:19:01 Does glibc even bother to track POSIX these days? 14:19:13 elliott, or the other way around you mean? ;P 14:19:17 What did POSIX 2008 even add, anyway? 14:19:21 I think it's unlikely that a new standard gets surprise-dropped and then surprise-implemented in one single chunk by libc 14:19:43 elliott, mostly stuff from glibc iirc. Some stuff from other libcs too 14:19:46 olsner: They should stop publishing drafts and annoucning things and whatnot. 14:19:48 Would be much more fun. 14:19:57 "The GNU C library implements all of the functions specified in ISO/IEC 9945-1:1996, the POSIX System Application Program Interface, commonly referred to as POSIX.1." <- current glibc manual. 14:19:58 elliott, I believe it was like 20-30 new functions though 14:20:02 C99 -> twelve years pass -> "Surprise, motherfuckers! Here's C11!" 14:20:10 :D 14:20:33 elliott, and MSVC is still on C89 14:20:39 "Also while we were at it, we made a NetHack 4 too." 14:20:41 MSVC is also still in C89. 14:20:44 that is like over 20 years old 14:20:46 Er. 14:20:48 *89 14:20:52 KINDA RUINED MY JOKE THERE, C. 14:21:03 hah 14:21:07 Vorpal: In fact, it's over 22.9 years old. 14:21:11 MSVC doesn't do any of the added stuff in C90? 14:21:16 elliott, right 14:21:20 Well, if it was published in January. 14:21:23 Which it probably wasn't. 14:21:24 iirc, commas at the end of enums was added in C90 14:21:32 olsner, err maybe 14:21:36 olsner: But... but gcc says they're the same! 14:21:44 GUYS DO YOU REMEMBER THAT TIME WE FOUND A PRINTED COPY OF C94 14:21:51 olsner, I'm surprised they differ though 14:21:56 elliott, we did? 14:22:03 C94, wth did that contain 14:22:04 http://en.wikipedia.org/wiki/C_(programming_language) doesn't even mention C94. 14:22:04 C94? 14:22:06 I know it existed 14:22:12 but I don't know what was new 14:22:14 Vorpal: I think it was never officially standardised, or something? 14:22:22 ah 14:22:24 But it was a printed copy or PDF for like 30 quid. 14:22:29 heh 14:22:30 I totally regret not buying it. 14:22:32 Souvenir. 14:22:40 http://clc-wiki.net/wiki/C89 "Purchase Amendment 1 (upgrades the Standard to C94 aka C95) as an ISO publication from SAI Global or --" 14:22:57 hmm, so C90 vs C89 has only the changes that ISO did while giving the ANSI standard an ISO number 14:23:09 fizzie: I'm disappointed C99 didn't get sometimes referred to as C100. 14:23:33 C00 the mysterious 14:23:43 elliott: ANSI could've released a C100 that was essentially ISO C99 except with a different name. For symmetry. 14:23:50 elliott, if C keeps going they are going to have to time it to unused years in future centuries 14:24:02 and that only works for 100 versions 14:24:08 after that they are screwed 14:24:16 Vorpal: This is why you use Befunge numbering(tm). 14:24:24 well yes 14:24:26 AKA 19100 numbering. 14:25:00 will C have died off by then 14:25:12 monqy, hopefully yes, probably not 14:25:26 elliott, I still think that timing releases is a far funnier solution :P 14:25:27 Vorpal: It's already a bit confusing at the point when the chronological order goes C90 C99 C11 C34 C82 C97 C05 C22 C76 after the 2176 version is out. 14:25:47 fizzie, well yes 14:26:35 fizzie, I would think there will be a C25 or so rather than C34 14:26:50 maybe 14:26:52 heh, looks like C has/had a limit of 15 nested levels of compound statements 14:27:06 olsner, heh? 14:27:10 olsner: Noooooooooooooooooooooooooooooo 14:27:11 probably it's just saying that compiler must support at least 15 levels, but anyway 14:27:24 All of the limits are just "at least this" guarantees. 14:27:25 maybe future C will use fruits instead of numbers 14:27:32 Also they've written in a really weird way. 14:27:39 fizzie, are they? 14:27:44 monqy: yes, then you'll need to support at least banana nested levels 14:28:06 http://stackoverflow.com/questions/8520673/installing-postgresql-on-qnx-neutrino 14:28:09 Best. Question. Ever. 14:28:29 * elliott realises that some people actually use QNX. 14:28:41 * elliott prefers to pretend they're just fucking around. 14:28:41 Vorpal: "The implementation shall be able to translate and execute at least one program that contains at least one instance of every one of the following limits: [list of limits, like 127 nesting levels of blocks, 63 nesting levels of conditional inclusion, and so on]" 14:28:52 I've never quite "gotten" that "at least one program" rule. 14:28:59 elliott, is it better or worse than people using vxworks? 14:29:14 fizzie, heh 14:29:45 fizzie, so that means that in that one program you can possibly only use up to 15 nesting levels in one place in the program? 14:29:47 or what 14:30:04 -!- Taneb has quit (Quit: Goodbye). 14:30:43 Vorpal: If I read it right, it's enough if the compiler translates, say "int ************a; [instances of all other limits];" but not "int ************b; [instances of all other limits];". 14:30:57 I mean, it did translate at least one program that contained at least one instance of every one of the limits. 14:31:05 fizzie, well there is that too 14:31:12 (12 pointer declarators is one of the limits.) 14:31:23 fizzie, but it doesn't even have to support int ************a; int ************b; in the same program 14:31:27 which is just silly 14:31:31 Vorpal: "The implementation shall be able to translate and execute at least one program that contains at least one instance of every one of the following limits: [list of limits, like 127 nesting levels of blocks, 63 nesting levels of conditional inclusion, and so on]" 14:31:37 At *least* one? 14:31:46 Is there only one such conforming C program? 14:31:48 I don't know if it's any sillier than just not supporting int ************b at all. 14:31:56 elliott, that is what we are discussing 14:32:05 fizzie, is that from C99 or C11? 14:32:06 elliott: It's also implementation-dependant which one it is. 14:32:14 Vorpal: C99, but IIRC it's unchanged in C11. 14:32:15 It seems like the standard already obligates the implementation to translate all conforming programs. 14:32:23 So the limits are arguably null. 14:32:59 what was the thing in perl you can use to run commands with options, but without opening up a whle shell? 14:33:11 elliott, ah but afaik the definition of a conforming program is one that can be handled by such a conforming implementation 14:33:20 was it the piped open? 14:33:21 (given the limit description) 14:34:09 kallisti: IIRC, system and the piped open have the same behaviour; if you give them a list, it's executed directly without a shell; if you give them a string with spaces in it, a shell is involved. 14:34:16 kallisti, is that like pipe(), fork(), dup2() and exec() in C? If so, then yes 14:34:32 (Just that 'system' of course doesn't capture any output, while a pipe-open does.) 14:34:37 fizzie: ah okay good. 14:34:38 (well execl or whatever) 14:34:39 Vorpal: I... somewhat doubt it. 14:34:49 That means "conforming implementation" is circular. 14:35:31 elliott, no I mean that conforming implementation is defined by those limits (and various other things, like the grammar), and a conforming program is simply one that can be run by such an implementation 14:35:32 "If there is only one scalar argument, the argument is checked for shell metacharacters, and if there are any, the entire argument is passed to the system's command shell for parsing (this is "/bin/sh -c" on Unix platforms, but varies on other platforms). If there are no shell metacharacters in the argument, it is split into words and passed directly to "execvp", which is more efficient." 14:35:54 Oh, so it was about metacharacters, not spaces, and it does space-splitting by itself. Well, anyway. 14:36:16 Providing a list will never execute a shell. 14:36:33 so wait the list form can still create a shell? 14:36:41 No. 14:36:43 "If there is more than one argument in LIST, or if LIST is an array with more than one value, starts the program given by the first element of the list with arguments given by the rest of the list." 14:36:44 Vorpal: I... don't think that makes much sense. 14:36:44 Providing a list will never execute a shell. 14:36:44 so wait the list form can still create a shell? 14:36:45 lol 14:36:55 oh 14:36:59 :) 14:37:10 elliott, of course not 14:37:18 elliott, but then, nor does gets()! 14:37:22 Vorpal: That's gone now. 14:37:26 They replaced it with a safe version. 14:37:31 elliott, yes but only in C11 14:37:36 I think it's hideously unfair; gets was awesome. 14:37:36 which is absurdly long 14:37:47 I mean, can we have one easy-to-use, ridiculous function in C? 14:37:49 Just one? 14:37:56 One function to remind you the language you're using is utterly terrible. 14:38:39 "A conforming program is one that is acceptable to a conforming implementation. A conforming -- implementation shall accept any strictly conforming program. A strictly conforming program shall use only those features of the language and library specified in this International Standard -- and shall not exceed any minimum implementation limit." 14:38:51 fizzie: oh but system doesn't give me the stdout 14:39:01 I have to use open for that. 14:39:02 I think. 14:39:28 fizzie, wow 14:39:35 kallisti: Well, right, but the '|-' and '-|' opens have the same behaviour. If I recall correctly. 14:39:40 fizzie: That's amazing. 14:39:47 fizzie: What... what does that even end up meaning. 14:40:08 fizzie: Hmm. 14:40:15 fizzie: That means that you can write a C compiler that accepts any string of bytse. 14:40:16 bytes 14:40:23 elliott, it means it is a C standard 14:40:30 fizzie: As long as it correctly compiles every strictly conforming program, every string of bytes becomes a conforming C program. 14:40:39 Someone get on that? 14:41:05 elliott, there is the minimum implementation limit thing too 14:41:22 elliott, which is defined elsewhere by the spec (the "at least one" bit) 14:41:38 That's just limiting the strictly conforming programs set further. 14:41:44 What fizzie said. 14:41:46 well yes 14:42:02 You could troll comp.lang.c with this. 14:42:02 I would think you can, as an extension, accept any string and do whatever you want with the ones that are not strictly conforming. 14:42:10 elliott, is that still alive? 14:42:10 "I have a conforming C program that isn't working: int main(;;)qw;4{};/;{" 14:42:26 Comp.lang.c people quite often remember to put that "strictly" in, from what I've seen. 14:42:32 Vorpal: Do Usenet groups ever "die"? 14:43:07 elliott, well I haven't seen any message on alt.lang.intercal for almost a year by now 14:43:13 or at least half a year 14:43:20 Vorpal: Dude... 14:43:24 That's INTERCAL. 14:43:29 Oh, I see. 14:43:34 Vorpal: alt.lang.intercal always goes that slowly. 14:43:44 elliott, fair enough 14:43:49 Vorpal: It at least gets a post every April. 14:43:51 what a sad group 14:43:56 well okay 14:46:08 fizzie: is there a way to get stderr with the list form of piped open? 14:46:37 kallisti: IPC::Open3 might help. 14:49:20 fizzie, what if you want to deal with more than 3 fds 14:49:42 (what if you want to redirect any fd the program opens to go through your own program?) 14:49:45 oh crap, capital c's all over the screen 14:50:00 Vorpal: I think there's a module for more general piping, but most programs don't expect to have more than 0, 1 and 2 open at start. 14:50:11 Vorpal: For "opens during the execution", I don't see how you can redirect those at all. 14:50:28 fizzie, it is obviously easy to do so. Just use ptrace 14:50:36 Obviously nonportable, too. 14:50:41 fizzie, or LD_PRELOAD probably 14:50:48 Won't catch syscalls. 14:50:50 I didn't say portable 14:51:00 fizzie, well indeed, most programs don't use them directly 14:51:06 unless they are statically linked 14:51:10 but ptrace would work 14:51:18 itidus21: FSVO all, screen. 14:51:35 fizzie, it is obviously easy to do so. Just use ptrace 14:51:47 I don't think that works. 14:51:55 You still can't force the program to dup2 without fucking about with its memory. 14:51:58 i get scared when theres a language i could almost get away with coding in being discussed here 14:52:02 elliott, that is easy as in "conceptually easy" not "easy to implement" 14:52:19 elliott, anyway gdb manages to insert calls into a process if you write call foo 14:52:22 Vorpal: Well, you could also write a kernel module or whatever. 14:52:26 elliott, indeed 14:52:28 Yes, so does weboflies. 14:52:33 Someone on clc has also pointed out, that the particular "one program" containing "at least one instance of every one of" all the limits doesn't need to be "strictly conforming", and can in fact include any kind of syntax or constraint violations that the implementation allows as an extension, which makes the started translation limits slightly meaningless. You could limit block nesting to 1 for all strictly conforming programs, and when someone complai 14:52:33 ned, just be all "well so sad, your program wasn't the one program". 14:52:34 Your suggestions are pretty stupid though. 14:52:39 elliott, indeed 14:52:45 fizzie: :D 14:52:57 fizzie: Excellent use of bold. 14:53:24 fizzie, :D 14:54:17 fizzie: Actually... 14:54:24 fizzie: "A conforming -- implementation shall accept any strictly conforming program. A strictly conforming program shall use only those features of the language and library specified in this International Standard -- and shall not exceed any minimum implementation limit." 14:54:48 fizzie: So since implementations are required to accept any strictly conforming program, and a strictly conforming program can go up to the limits... 14:55:22 I suppose it's arguable whether "shall not exceed any minimum implementation limit" means any of the separately stated limits, or whether the "one program" clause is in fact the "limit" that could be exceeded. 14:55:27 elliott, no it says they shouldn't exceed said limits. It doesn't say they aren't allowed to use less? 14:56:05 Vorpal: What? 14:56:13 oh hm, nvm 14:56:32 The intent is anyhow reasonably clear, I've just wondered more than once about the strange-sounding "at least one program" clause. I'm sure there's some sort of a logic they've had when first drafting it. 14:56:34 C sure is confusingly worded 14:57:15 fizzie: They might have just wanted to avoid a scary universal quantification. :p 14:57:45 -!- oerjan has quit (Quit: Later). 14:57:46 fizzie: They might have worded it weirdly to allow the implementation to apply stricter limits to conforming-but-not-strictly programs for whatever reasons? 14:57:48 *reason? 14:58:27 Who *are* the C committee, anyway? Do they even have any writers of compilers that people actually use on there? 14:58:38 -!- atrapado has joined. 14:58:56 words --canadian 9001 14:59:04 HackEgo: hi 14:59:06 moniz ber bhoodcuting ceric ker rhization defore cunactyl cari underfee soutwaisec upgia trentation teneopeir nonper ramosometting comper nailty unblaco hydrati acci searabilic contment pyosing dric boarding lured reade bebloo rechny canic virasephosto subselte phenchar jacque simpresom comently posively noda wan tate cyan trian shagboard friskilli terimescoe posard spaapelblar camsie trallycephoto unfrable ophalpathone 14:59:09 elliott, this was probably worded like that back in 1989 or so 14:59:34 elliott, and no one bothered to change it 14:59:51 so hm probably of compilers used back then? 15:00:26 Vorpal: I was asking in general. 15:00:40 good question 15:02:45 It's the JTC1/SC22/WG14 working group; I'm not sure if their member list is anywhere; the wiki and the "WG internal information" are all password-protected and only for members. 15:02:53 comp.std.c has some overlap, though. 15:03:06 well that explains a lot 15:03:18 fizzie: I don't like the idea of a public international standards committee nobody knows the membership of. 15:03:40 Oh, I'm sure it's somewhere, just can't find it right now. 15:03:45 -!- Zuu has quit (Ping timeout: 252 seconds). 15:04:03 There have been programmers on it at some point, at least. 15:04:05 * elliott has never looked at comp.std.c. Is it like comp.lang.c but /exclusively/ for pedantry? 15:05:04 It's for speaking about the standard itself; "yes, yes, but I think the what the standard should do instead is *this*" sort of comments from comp.lang.c are sometimes referred to there. 15:05:09 !perl , = ' '; print "hi"; print "hello"; 15:05:10 hihello 15:05:14 !perl , = ' '; print "hi",; print "hello"; 15:05:14 hihello 15:05:16 L( 15:05:17 I guess theoretically speaking you could speak there if you want to influence the standard. 15:05:26 It probably won't do anything, but that's what it's for. 15:05:46 fizzie: http://groups.google.com/group/comp.std.c/browse_thread/thread/d0fd9bfc89647b4a 15:05:53 fizzie: Standard lawyers! THESE ARE MY PEOPLE. 15:09:01 "It was established in the comp.lang.c discussion (which was too long to reproduce here) that int and long are not the same type." 15:09:10 fetch http://sprunge.us/SERK 15:09:13 2012-01-08 15:09:12 URL:http://sprunge.us/SERK [4539] -> "SERK" [1] 15:09:27 reminds me of the ents determining after a few days that the hobbits are probably not orcs 15:09:29 run mv SERK bin/words.pl; chmod +x bin/words.pl 15:09:32 No output. 15:09:39 words --help 15:09:43 Usage: words [-dhNo] [DATASETS...] [NUMBER_OF_WORDS] \ \ valid datasets: --eng-1M --eng-all --eng-fiction --eng-gb --eng-us --french --german --hebrew --russian --spanish --irish --german-medical --bulgarian --catalan --swedish --brazilian --canadian-english-insane --manx --italian --ogerman --portuguese --polish --gaelic --finnish --norwegian \ default: --eng-1M \ \ options: \ -h, --help this help text 15:09:50 no bad 15:09:50 ls 15:09:53 Mineso \ X.pm \ Y.pm \ bin \ canary \ karma \ lib \ main \ min.sh \ paste \ quotes \ share \ typetest.hs \ wisdom 15:10:04 run rm X.pm Y.pm 15:10:06 No output. 15:10:19 oh 15:10:25 run mv bin/words.pl bin/words 15:10:28 No output. 15:10:33 words 50 15:10:36 Optional module Math::Random::MT::Perl not found. \ can't open Data/Eng1M: No such file or directory at /hackenv/bin/words line 104 15:10:44 run rm Mineso typetest.sh main.sh 15:10:47 rm: cannot remove Mineso': Is a directory \ rm: cannot remove typetest.sh': No such file or directory \ rm: cannot remove main.sh': No such file or directory 15:11:02 run rm -r Mineso min.sh typetest.sh 15:11:05 run rm -r Mineso min.sh typetest.hs 15:11:05 rm: cannot remove typetest.sh': No such file or directory 15:11:06 FUCK!!! 15:11:08 No output. 15:11:12 ls 15:11:16 bin \ canary \ karma \ lib \ main \ paste \ quotes \ share \ wisdom 15:12:04 run perl -pi -e 's#Data#share/WordData#' bin/words 15:12:07 No output. 15:12:10 words 15:12:14 Optional module Math::Random::MT::Perl not found. \ can't open share/WordData/Eng1M: No such file or directory at /hackenv/bin/words line 104 15:12:37 ls share 15:12:40 WordData \ awesome \ units.dat 15:12:56 ls share/WordData 15:12:59 Brazilian \ Bulgarian \ CanadianEnglishInsane \ Catalan \ Eng1M \ EngAll \ EngFiction \ EngGb \ EngUs \ Finnish \ French \ Gaelic \ German \ GermanMedical \ Hebrew \ Irish \ Italian \ Manx \ Norwegian \ Ogerman \ Polish \ Portuguese \ Russian \ Spanish \ Swedish 15:13:05 >_> 15:13:08 hackgeo shoiuld totally coloured output 15:13:28 yes 15:13:41 Is hackgeo Sgeo's cousin? 15:13:43 ls --colour=yes 15:13:44 I am great confused 15:13:46 ls: unrecognized option '--colour=yes' \ Try ls --help' for more information. 15:13:51 eh 15:13:57 words 15:14:00 Optional module Math::Random::MT::Perl not found. \ can't open share/WordData/Eng1M: No such file or directory at /hackenv/bin/words line 104 15:14:04 ls --color=yes 15:14:07 ​.[0m.[01;34mbin.[0m \ canary \ karma \ .[01;34mlib.[0m \ .[01;32mmain.[0m \ .[01;34mpaste.[0m \ quotes \ .[01;34mshare.[0m \ .[01;34mwisdom.[0m 15:14:09 aww 15:14:12 Gregor: I'm noticing a distinct lack of Math::Random::MT::Perl 15:14:28 Gregor: Don't install it. 15:14:49 oh.. 15:15:01 Is hackgeo Sgeo's cousin? 15:15:01 wat 15:15:09 hackgeo shoiuld totally coloured output 15:15:09 elliott, typo 15:15:43 run perl -pi -e 's#^.*chdir.*##' bin/words 15:15:46 No output. 15:15:53 I whshhould typo more ofrten maybe this will happen agaion 15:16:01 [[ 15:16:02 [...] 15:16:02 > As far as I know, variables of type "size_t" are guaranteed to be of 15:16:02 > sufficient precision to represent the size of any object. 15:16:02 [...] 15:16:02 The standard doesn't state that explicitly, and I argue that it 15:16:02 : parse error on input ,' 15:16:03 can't find file: L.hs 15:16:04 doesn't imply it. 15:16:06 It says that the sizeof operator yields a result of type size_t. 15:16:08 It also says that the "*" operator applied to two operands of type 15:16:10 int yields a result of type int; that doesn't imply that the result 15:16:12 will always fit in an int. I suggest that the sizeof operator can 15:16:14 overflow, and if it does, the behavior is undefined. 15:16:16 ]] 15:16:18 fizzie: This is beautiful. 15:16:20 monqy: hi 15:16:25 elliott: hi 15:16:29 run perl -pi -e 's#^.*\bwarn\b##' bin/words 15:16:32 No output. 15:16:33 words 15:16:37 Optional module Math::Random::MT::Perl not found. \ wiektripuur 15:16:56 run perl -pi -e 's#^.*\bwarn\b.*##' bin/words 15:17:00 No output. 15:17:01 words 15:17:06 sulf 15:17:09 words --help 15:17:13 Usage: words [-dhNo] [DATASETS...] [NUMBER_OF_WORDS] \ \ options: \ -l, --list list valid datasets \ -d, --debug debugging output \ -N, --dont-normalize don't normalize frequencies when combining \ multiple Markov models; this has the effect \ of making larger datasets more influential \ -o, --target-offset change the target length 15:17:33 words --list 15:17:37 valid datasets: --eng-1M --eng-all --eng-fiction --eng-gb --eng-us --french --german --hebrew --russian --spanish --irish --german-medical --bulgarian --catalan --swedish --brazilian --canadian-english-insane --manx --italian --ogerman --portuguese --polish --gaelic --finnish --norwegian \ default: --eng-1M 15:18:21 words 900 -o 289347898974892734238947923742389423 15:18:27 Argument "900 -o 289347898974892734238947923742389423" isn't numeric in int at /hackenv/bin/words line 146. \ cog maki ashed flam deming hun guaj cili ponste alledit shapetick titum adiompl colonia hymanstastre occifield rib kuk ivell cogn wadhyal sine chillul nonidi mplaim 15:18:35 oh I forgot the thing. 15:18:56 ...what was the thing again. 15:19:01 ah yes 15:20:06 sizeof overflow sounds 15:20:09 beautiefulye 15:21:49 elliott: interesting 15:21:52 monqy: you're overdoing the typos a little :P 15:22:03 run perl -pi -e 's#GetOptions#@ARGV = split /\s+/, \ARGV[0] if \@ARGV == 1;&#' bin/words 15:22:07 No output. 15:22:07 i have trouble helping it 15:22:10 fizzie: Could I convince you to op a single-purpose bot? 15:22:13 words --eng-all 9001 15:22:17 syntax error at /hackenv/bin/words line 111, near "=" \ Execution of /hackenv/bin/words aborted due to compilation errors. 15:22:21 uh oh 15:22:35 turns out perl is not a valid substitute for a text editor. 15:23:15 kallisti, just edit it locally and fetch a new one? 15:23:33 too easy. 15:24:02 kallisti: You're just inferior. 15:24:02 fetch http://sprunge.us/KHIN 15:24:05 2012-01-08 15:24:05 URL:http://sprunge.us/KHIN [4599] -> "KHIN" [1] 15:24:05 I fixed scripts with sed all the time. 15:24:30 run chmod +x KHIN; mv KHIN bin/words 15:24:34 No output. 15:24:35 words --eng-all 5000000 15:24:38 can't open share/WordData/EngAll: No such file or directory at /hackenv/bin/words line 104 15:24:50 elliott, wow, sizeof overflowing 15:24:57 elliott, that is so absurd 15:25:02 fetch http://sprunge.us/VHhP 15:25:04 2012-01-08 15:25:03 URL:http://sprunge.us/VHhP [4600] -> "VHhP" [1] 15:25:17 run chmod +x VHhP; mv VHhP bin/words 15:25:20 No output. 15:25:22 words --eng-all 5000000 15:25:26 more like they forgot to put in the standard the bit about size_t always being big enough 15:25:29 cartzwick refd cons quenfeasodcr lighlymb signing prol busina ccote oscoplai phistorialpa hegle out presen golo chowski oand gresset sageopak dpoudle metnbruku remati nei tist shropsych 15:25:37 fizzie: HMPH 15:25:44 (and/or all objects and types being small enough) 15:26:06 shropsych 15:26:12 elliott, hm does sizeof overflowing allow infinite memory? And does that make C TC then? 15:26:28 Vorpal: I doubt it; \infty doesn't "overflow" to anything. 15:26:47 anyone wants to implement an interpreter for my language? 15:26:55 is it a good language 15:26:57 hmm, if size_t doesn't have to be unsigned, I think it could be arbitrary-precision 15:27:09 atrapado: Wait, aren't you one of those people who were in here years ago? 15:27:16 elliott, hm true 15:27:18 or if sizeof(x) = 1 for all x 15:27:29 yes, i was 15:27:31 olsner: no, CHAR_BIT is required of freestanding implementations 15:27:45 atrapado, which language? 15:27:49 atrapado: Naww, pastelogs says 2007, I meant the REAL old days. But hi :P 15:28:01 * elliott remembers your name for some reason. 15:28:11 i define a minimal turing complete language 15:28:13 elliott: hmm, but didn't we conclude that this only affected unsigned types? 15:28:14 atrapado: Naww, pastelogs says 2007, I meant the REAL old days. But hi :P <-- what? 2005? 15:28:24 i think tc 15:28:28 Vorpal: 2002-2004. 15:28:32 elliott, ah 15:28:32 minimal? 15:28:52 only 3 or 4 elements 15:29:02 olsner: I don't think so, I think we just didn't realise at the time. unsigned was another thing; sizeof still has to return the size. Although, hmm. 15:29:09 I'm bad at making my programs simultaneously have data files and also being current-directory agnostic. 15:29:15 olsner: I think we waxed philosophical about what sizeof's value actually meant. 15:29:25 I don't recall. 15:29:37 kallisti, huh? 15:30:05 kallisti, if you don't mind portability look at /proc/self/exe 15:30:29 well, in Perl I use 0 15:30:31 kallisti, if you mind portability I suggest you have a configure script or such that hardcode the target paths into the program 15:30:33 Vorpal: Have you heard of argv[0]. 15:30:42 I think unsigned types need to wrap at 2^n, where n is possible related to sizeof and CHAR_BIT 15:30:43 elliott, argv[0] has the issue that it might be anything 15:30:47 elliott, at least in C 15:30:50 but that signed types had no lower limit except that the max. *positive* value must be smaller than the max value of the corresponding unsigned type 15:30:51 elliott, not sure about perl 15:30:58 Vorpal: /proc/self/exe will also point to which perl, duh. 15:31:02 elliott, hm true 15:31:13 but... negative sizeof, hmm 15:31:22 olsner: Right, but by having sizeof return something you're still declaring that it fits into that many chars. 15:31:38 olsner: i.e. you can put it in a char array of that size and convert it back. 15:31:55 olsner: And by defining CHAR_BIT you're declaring that that many bools can uniquely identify a character. 15:32:05 So there's no real way around it, AFAICT. 15:32:35 The only argument there is what CHAR_BIT really means, IMO. 15:33:50 and sizeof still has a (constant) maximum value, because everything else has, so that's no solution to sizeof overflow anyway 15:34:21 is it possible to allow structs and arrays to have sizeof 1? 15:34:46 char n[2] can't fit into a char unless char is countably infinite. 15:34:53 Which it can't be, as we've established. 15:34:59 So, no. 15:35:08 elliott, I always found it amusing that even though the C standard allows lots of weird deathstation 9000 style systems it doesn't allow a ternary one 15:35:39 -!- sebbu2 has changed nick to sebbu. 15:36:03 Vorpal: Well, that's just perverse. 15:36:07 elliott: because of CHAR_BIT? 15:36:09 Who the hell uses ternary? 15:36:11 olsner: Yse. 15:36:12 Yes. 15:36:19 elliott, a few systems have used that 15:36:24 fizzie: What's the actual definition of CHAR_BIT? 15:36:25 Vorpal: It was a joke. 15:36:30 elliott, oh 15:37:30 Hey, the musl guy is on SO. 15:37:33 fizzie: What's the actual definition of CHAR_BIT? <-- are you using fizzie as a search engine of the C standard? 15:38:22 Vorpal: Yes. 15:38:28 well, i will explain the language definion later, well 2 languages really 15:38:57 elliott, he tends to be very good at such things 15:39:08 atrapado, is it on the wiki? 15:39:13 no 15:39:19 why not? 15:39:37 it is very simple 15:39:44 i can explain here 15:40:00 well that won't be as each to find for people in the future 15:40:03 Lots of languages on the wiki are very simple 15:40:11 ok 15:40:32 i will consider the wiki 15:40:44 atrapado, as long as it isn't yet another bf-clone (or bf-clone with minor variations) you should probably put it on the wiki 15:41:06 no it is not a clone 15:41:34 atrapado, did you manage to break SHA256, then? 15:41:41 hehe 15:41:52 not even md5 15:42:00 but i developed a model 15:42:29 A model of what? 15:42:42 MD5 was broken ages ago. 15:43:11 of md5 or other algorithm with logical and add operarions 15:44:10 A 2009 attack by Tao Xie and Dengguo Feng breaks MD5 collision resistance in 220.96 time. This attack runs in a few seconds on a regular computer.[2] 15:44:10 yikes, I didn't know it was that bad 15:44:22 -!- atrapado has quit (Read error: Connection reset by peer). 15:46:45 Is that 2^20.96 time? 15:47:54 -!- atrapado has joined. 15:48:16 elliott: "number of bits for smallest object that is not a bit-field". 15:48:38 sorry, batery was low 15:50:20 fizzie: What does "number of bits" even mean? :/ 15:50:21 olsner: Yes. 15:52:00 if we're lucky, we only need to care about "number of bits" as far as making the unsigned ints looking like n-bit numbers 16:03:43 elliott: All values (discounting bitfields) "consist of n x CHAR_BIT bits, where n is the size of an object of that type, in bytes. The value may be copied into an object of type unsigned char [n]; the resulting set of bytes is called the /object representation/ of the value." 16:05:16 And "objects of type unsigned char shall be represented using a pure binary notation.49) ... 49) A positional representation for integers that uses the binary digits 0 and 1, in which the values represented by successive bits are additive, begin with 1, and are multiplied by successive itnegral powers of 2, except perhaps the bit with the highest position." 16:05:32 (Typos mine.) 16:06:27 The 'n' for unsigned types is not related to sizeof, though, since (non-char) arithmetic types can have padding bits. 16:07:02 damn, and objects need to be representable as a series of *unsigned* chars 16:07:23 (Where the "n" was the [0 ... 2^n-1] value range for unsigned types.) 16:09:07 hmm, *except perhaps the bit with the highest position.* - so the highest bit is allowed to be anything? 16:09:49 That's just a footnote, and they are non-normative, IIRC. 16:09:58 It's just defining "pure binary" there. 16:10:35 pff, "pure binary" could mean anything! 16:10:37 There's another place which explicitly defines what the value bits mean in unsigned integer types. 16:11:21 "If there are N value bits, each bit shall represent a different power of 2 between 1 and 2^(N-1), so that objects of that type shall be capable of representing values from 0 to 2^N - 1 using a pure binary representation." 16:12:37 which log 16:12:40 ​/hackenv/bin/log 16:12:41 Signed integers are otherwise identical, except there is (in addition to padding and value bits) a single sign bit, which will either have the value -(2^M), the value -(2^M-1), or the meaning that the corresponding value with sign bit 0 is negated. 16:13:00 (In other words, two's-complement, one's-complement, or sign-magnitude.) 16:13:01 pff, "pure binary" could mean anything! <-- it basically means that on a ternary machine the it could only encode one bit per... um... trit? 16:13:21 "Tit". 16:13:31 I believe it is actually trit 16:13:45 "Trit" is more common, sure. 16:14:08 fizzie: argh, so C mandates binary representations? :( 16:14:34 is that new from C99 though? maybe C90 is better 16:14:39 olsner, I complained about that earlier today 16:14:47 (the exclusion of ternary) 16:14:55 C90 isn't (IIRC) any better when it comes to unsigned integers. 16:15:02 Signed integers are allowed more latitude. 16:15:30 fizzie, anyway all modern systems uses two-complement for signed integers afaik 16:17:24 Anyway, it's all under the "as if" rule, so "physically" I'm sure you could run things on a ternary machine with, say, three bits packed into two trits -- or 9-bit quantities into 6-trit ones if that's natural for the machine -- and just make the bitwise operators work right. All objects have to be composed out of unsigned chars, though. 16:17:49 9 is a perfectly suitable value for CHAR_BIT, after all. 16:18:14 Well, unless you want to be all POSIXy. 16:21:13 check SumaMoito in the wiki for the languages i mentioned 16:21:57 fizzie: but it does limit the range of signed integers to some fixed number of bits, which is the boring part 16:21:58 The 'n' for unsigned types is not related to sizeof, though, since (non-char) arithmetic types can have padding bits. 16:22:00 fizzie: Ah. 16:22:09 fizzie: Didn't we conclude that nothing stopped you packing data into those padding bits? 16:22:51 fizzie: Incidentally, I had to cite the as-if rule a day or two ago! 16:22:59 I didn't realise people ever actually had to do that. 16:23:06 I feel like a real standards lawyer. 16:23:18 elliott: I suppose, though the data is not guaranteed to survive through operations, or get copied by assignment, and "bad" padding bit values are allowed to generate trap representations. 16:23:51 (E.g. one of the padding bits can be a hardware-mandated parity bit.) 16:24:25 fizzie: Well, we don't care about portability guarantees. 16:24:52 fizzie: We just care that it is possible to write a strictly conforming C program that can implement infinite-tape BF on a hypothetical conforming C implementation. 16:26:27 "Aside from that, garbage collection is just plain slow. You can find hundreds of academics who like to claim otherwise, but that won't change the reality. The performance issues of GC can be broken down into 3 main categories: 16:26:28 Unpredictability 16:26:28 Cache pollution 16:26:28 Time spent walking all memory" 16:26:32 pikhq: I don't like musl any more. :( 16:26:46 "Reference counting is clean and elegant" I double don't like it! 16:27:23 if only it were @ 16:27:26 elliott: well if you just keep calling malloc(n) :D 16:27:41 itidus21: No. 16:27:44 Pointers have a defined size. 16:27:48 That size must be finite. 16:27:54 oh i see 16:29:00 well ain't that a bitch 16:29:33 fizzie: So, theoretically you could have an unsigned integer whose value is in the padding bits? 16:29:58 Erm, signed. 16:29:59 Argh. 16:30:07 fizzie: I've lost track of the argument. 16:30:13 or in a single arbitrary-precision padding bit 16:31:00 olsner: The padding bits are still bits that show up in the unsigned char[n] object representation. 16:31:26 (What does an "arbitrary-precision bit" even mean?) 16:31:45 something that's called a "bit" but has infinite data 16:31:56 fizzie: Well, you can be really sure of the precision of your 0s and 1s. 16:31:59 They're... crisp. 16:32:01 High-fidelity. 16:32:03 All thanks to Monster Cable. 16:32:15 lol 16:32:22 thanks monster cable 16:33:52 olsner: In any case, no matter whether it's legal for the padding bits to be not quite "bits" (which I doubt), it's still explicit that the value (as seen by arithmetic operations and such, I mean) of the object is strictly defined by the value bits. 16:34:51 the best way to store bits is as pebbles 16:37:01 elliott, take a look at the wiki: SumaMoito 16:37:16 "Based on the powerful editing component Scintilla, Notepad++ is written in C++ and uses pure Win32 API and STL which ensures a higher execution speed and smaller program size. By optimizing as many routines as possible without losing user friendliness, Notepad++ is trying to reduce the world carbon dioxide emissions. When using less CPU power, the PC can throttle down and reduce power consumption, resulting in a greener environment." 16:37:20 Worst. Marketing. Ever. 16:38:01 atrapado: The only difference between Z1 and Z2 is the wraparound value? 16:38:20 It just looks like brainfuck with variables instead of a tape and no IO to me. :p 16:38:31 is the value that you get when decrement 0 16:38:32 I don't think it's TC. 16:38:57 Because you always condition on the same variable in a loop. 16:38:59 i am sure they are tc, mostly 16:39:06 Brainfuck with only balanced loops is not TC. 16:39:07 So... 16:39:17 atrapado: You can be as sure as you like, that doesn't change the theory. 16:39:26 you can have many variables and loops 16:39:48 i saw a proof some day 16:39:51 atrapado: You can have many variables and loops in lots of sub-TC languages. 16:39:57 for z2 16:40:13 Okay. Show the proof? 16:40:17 It might be erroneous, after all... 16:40:24 is the true value of TC that TC means compatible with LC? 16:40:25 in computer science grade 16:40:50 atrapado: Err, you aren't the author of these languages? 16:40:56 well show me a computation that can not be done 16:41:04 and that LC means you can derive mathematical proofs by the code 16:41:06 atrapado: Burden of proof... 16:41:22 i am the author of 2 of these lsnguages 16:41:41 atrapado: Here's a thing that can't be done: a BF->SumaMoito-Z1 compiler. 16:41:56 As I said, the loop structure is too weak. 16:42:00 no 16:42:01 If you want to show it TC, show the compiler. 16:42:09 and that esoteric programmers primary goal is to make programming useful for mathematical proofs 16:42:34 atrapado: No what? 16:42:45 i implemented a compiler for one of these languages 16:42:57 A compiler from what to what? 16:42:57 atrapado, you invented that crap? 16:43:01 you can add sub div... 16:43:11 rude... 16:43:18 atrapado: The arithmetic isn't the problem. 16:43:20 The control flow is. 16:43:27 compiler from the language to c++ 16:43:33 no 16:43:37 nest them 16:43:42 Well, that doesn't prove anything; you can compile sub-TC languages to C++. 16:43:47 atrapado: OK, let me put it this way. 16:43:51 yes elliott 16:43:57 Brainfuck with only balanced loops is *proven* sub-Turing-complete. 16:44:10 In brainfuck, you *have* to be able to vary the cell you condition on for it to be TC. 16:44:17 Your language is essentially BF with variables instead of cells. 16:44:20 >:-) 16:44:23 But your loop structure is over a constant variable. 16:44:29 You cannot change what you loop over in the loop itself. 16:44:35 yes 16:44:35 Therefore, it is most likely sub-TC. 16:44:46 it is hard but is possible 16:44:46 By analogy with the fact that balanced brainfuck is sub-TC. 16:44:47 elliott, you can swap two variables, can't you? 16:44:59 Phantom_Hoover: Weell... 16:45:00 -!- Ngevd has joined. 16:45:08 Phantom_Hoover: I suppose so, with a third variable. 16:45:22 Hello 16:45:22 Phantom_Hoover: But a loop can only swap two fixed variables. 16:45:55 atrapado: Oh well, if you're just going to continue asserting it's TC based on no evidence at all in the face of fair sketch arguments it's not, then reasoning with you about it is pointless 16:46:09 Hmm, it /seems/ like an MRM would be a worthwhile avenue. 16:46:26 i am not mathematician 16:46:29 SumaMoito-Z1 and -Z2 are, I think, Turing Complete 16:46:32 Phantom_Hoover: MRM? 16:46:38 atrapado: Nor am I, what's your point? 16:46:40 Minsky register machine? 16:46:41 Isomorphic to a Minsky Machine 16:46:43 Phantom_Hoover: Ah. 16:46:48 Ngevd: I don't think so. 16:46:52 to show the proof 16:46:53 It's the loop structure still. 16:46:57 Well, not isomorphic, but 16:47:00 atrapado: Proving it TC is trivial; you just have to write a compiler from a TC language to it. 16:47:03 I'm not really sure how MRMs work, so I can't say. 16:47:10 atrapado: For instance something very simple like boolfuck or as Phantom_Hoover said a Minsky machine. 16:47:58 I think I could translate any Minsky Machine with n registers to a SumaMoito program with n+1 variables 16:48:09 i did not see a computation that can not be done with the languages 16:48:32 atrapado: Proof by lack of imagination is a common but invalid method :) 16:48:41 yes i see 16:49:07 How are Minsky Machines numerally notated? 16:49:57 what happens in z2 if you decrement a zero variable 16:50:08 Hmm, OK, Minsky machines might work. 16:50:09 elliott: it is fascinating that something which is sub-TC becomes impossible to implement a compiler for in something which is TC 16:50:14 stays the same 16:50:15 monqy, it stays 0 16:50:19 But I dunno. 16:50:23 Ngevd: unimaginitive 16:50:23 BCT looks implementable too. 16:50:24 You need an "if". 16:50:30 I'm not convinced the "while" there can do an "if". 16:50:45 yes it can do 16:50:54 atrapado: Not necessarily in the way required. 16:50:56 itidus21: what 16:50:59 elliott, have a 3rd variable stuck at 0? 16:51:12 i mean, is sumamoito not a form of computation? :D 16:51:17 Wait, hang on 16:51:17 what 16:51:19 You can do 16:51:20 temp = foo 16:51:23 is it not? 16:51:26 while (foo) { ...; foo = 0 } 16:51:27 foo = temp 16:51:34 But that means the whole thing _cannot_ change foo at all in any way 16:51:36 hehehe 16:51:38 Hmm 16:51:39 temp = foo 16:51:48 while (foo) { ...; /* sets add */; foo = 0 } 16:51:48 foo = temp 16:51:50 -!- variable has changed nick to consrt. 16:51:51 -!- consrt has changed nick to const. 16:51:59 /* foo += add */ 16:52:00 while (a) { a-; b+; code }; while (b) { code } seems like it'd work as an if-else. 16:52:02 That could work if you can do addition. 16:52:07 why can't a TC do sumamoito i wonder.. perhaps due to some limitation of the power of a TC 16:52:10 well strictly speaking there is no = 16:52:16 You can even restore a int the else loop. 16:52:17 itidus21: what 16:52:18 atrapado: It was pseudocode 16:52:21 ok 16:52:35 yeah.. TC is overhyped 16:52:36 Phantom_Hoover: Erm, that only works if a is either 0 or 1. 16:52:42 Which is not the case with an MRM. 16:52:52 itidus21: I think you misinterpreted something 16:52:56 elliott, erm, right. 16:53:20 monqy: probably 16:53:23 yeah.. 16:53:33 -!- Zuu has joined. 16:53:41 If you replace code with while (c) {code; c-} and then put c+ outside the loop? 16:53:52 And set c to 1 beforehand. 16:53:54 itidus21: it's not that you can't write a SumaMoito compiler in a TC language; it's that you can't compile from a TC language to SumaMoito, or so the claim goes 16:53:58 itidus21: if that clears anything up 16:54:07 ohhh 16:54:11 yes that helps 16:54:19 :( 16:54:36 my misinterpretation was more exciting 16:54:49 Phantom_Hoover: b+; while (a) { whentrue; while (a) { a- }; b- } while (b) { whenfalse } 16:54:51 itidus21, you want something like Gravity 16:54:54 don't worry there's still plenty of fun stuff you can't do 16:54:56 Phantom_Hoover: The problem is that, with an MRM, you have to test whether it's zero /without clobbering it/. 16:55:05 Which is impossible, because you only have a while loop on a fixed variable. 16:55:08 So you have to copy it elsewhere. 16:55:13 no 16:55:16 Yes; where's the problem with that/ 16:55:23 Phantom_Hoover: Because the operation is to decrement it. 16:55:35 while a a- b+ c+ ??? 16:56:01 copy 16:56:06 Ngevd: i do not quite enjoy not being educated in maths... it takes a lot of the fun out of esolangs 16:56:15 itidus21, :P 16:56:21 Phantom_Hoover: Okay, b+; while (a) { dec+; tmp+; while (a) { a- }; b- }; while (tmp) { a+; tmp- }; while (dec) { a-; dec- } while (b) { ... } 16:56:30 That's "if a>0, decrement a, else ...". 16:57:07 it also means not very fun to browse wiki pages about math(s) 16:57:27 -!- augur has quit (Ping timeout: 240 seconds). 16:57:30 every time i hit a mathematical notation it is like a toll gate 16:57:39 tmp = 0, c=1; while (a) { a-; tmp+; while(c) {code; c-}}; while(c){c-}; c+; while (tmp) {tmp-; a+; while(c){code; c-}}; while(c){c-}; c+? 16:57:40 itidus21: Ignorance is bliss, they say. 16:57:44 Phantom_Hoover: There's no =. 16:57:52 they do. and in my experience.. it has proven true 16:57:56 Anyway, I'm not sure what that is meant to do. 16:57:58 elliott, that's shorthand for initialisation, duh. 16:58:04 itidus21: It generally rings true for the ignorant, yes. 16:58:11 can be emulated, the = 16:58:12 Phantom_Hoover: What's your thing meant to do that mine doesn't? 16:58:19 That's meant to be a straight if-then-else. 16:58:23 Ah. 16:59:40 Phantom_Hoover: isfalse+; while (cond) { istrue+; tmp+; while (cond) { cond- }; isfalse- }; while (tmp) { cond+; tmp- }; while (istrue) { WHENTRUE; istrue- }; while (isfalse) { WHENFALSE; isfalse- } 16:59:44 There's my if/then/else. 16:59:59 Phantom_Hoover: Now the main problem is: you need a set of declarations for each variable you condition on. 17:00:04 But I think it /might/ be enough to do an MRM. 17:00:26 elliott, there are no limits for variable declaration though, so that's OK, isn't it? 17:00:36 Phantom_Hoover: Well... this thing can't nest. 17:00:39 no limits 17:00:39 if you guys saw my initial budding efforts at language design in the past it might be vomit inducing 17:00:47 If you put an if/then/else inside an if/then/else, the outer loop's state gets fucked up. 17:00:51 hehehehe 17:00:58 Phantom_Hoover: That's problematic, because there's no other way to do control flow other than nesting in this thing. 17:01:05 So you need to find a way to "unroll" everything at the top level. 17:01:10 I don't think that's possible. 17:01:23 can nest 17:01:29 atrapado: I know they can nest. 17:01:36 Can't you just assign a unique set of variables to each if construct? 17:01:39 I understand the language. 17:01:45 ok 17:01:46 Phantom_Hoover: Well, yes. 17:02:14 I know how to implement unsafeCoerce# in pure Haskell! let x = x in x 17:02:17 ^^joke 17:02:20 ^^joke 17:02:23 aplause 17:02:35 cheers echo far and wide 17:02:38 for sgeos 17:02:38 joke 17:02:42 Phantom_Hoover: a++; b++; if (a>0) { a--; } else { ... }; if (b>0) { b--; } else { ... } is a TC MRM, right? 17:02:42 If I didn't say joke, some of you would think I was being serious 17:02:48 Phantom_Hoover: Where ... is part of the instruction. 17:02:50 Er, let me rephrase that. 17:02:52 atrapado, what happens if you do something like "a; a+; a;"? 17:02:56 INC_A = a++ 17:02:59 INC_B = b++ 17:03:01 elliott, you expect me to know a thing like that?? 17:03:07 A{...} = if (a>) { a-- } else { ... } 17:03:09 argh 17:03:10 *>) 17:03:11 *>0 17:03:14 well it should not compile, ngevd 17:03:16 B{...} = if (b>0) { b-- } else { ... } 17:03:27 Phantom_Hoover: Well, just confirm whether my understanding of what http://esoteric.voxelperfect.net/wiki/Minsky_machine says is correct. :p 17:03:28 I think we have enough for all the normal arithmetic tools, though, so BCT looks achievable. 17:03:44 Phantom_Hoover: I'm just not convinced that a structural nested thing like that is enough to accomplish a "state transition". 17:04:16 Phantom_Hoover: Structured programming languages require powerful enough control structures to not be sub-TC, after all. 17:04:22 goto is significantly more flexible. 17:04:45 I suspect the standard presentation of an MRM program involves labelled statements where the decrement jump location is taken as a goto. 17:04:48 elliott, 'state transition' meaning 'switching to a different set of code', essentially? 17:04:56 Phantom_Hoover: Wait, obviously what I said wasn't enough. 17:05:00 Because there's no looping. 17:05:06 So yeah, Phantom_Hoover: Okay, b+; while (a) { dec+; tmp+; while (a) { a- }; b- }; while (tmp) { a+; tmp- }; while (dec) { a-; dec- } while (b) { ... } 17:05:13 just isn't enough on its own to accomplish the control. 17:05:32 is there anything preventing a real easy reduction to balanced-loops bf 17:05:54 -!- augur has joined. 17:06:10 monqy, balanced loops infinite cell size, no 17:06:17 Didn't this whole thing start because balanced-loops is sub-TC? 17:06:28 hence the mention 17:06:31 Only if the cells are finite in size 17:11:15 if (a) {code}; -> while (a) { code; while (a) a-; } 17:11:35 We passed that point a long, long time ago. 17:11:50 ok just remembering 17:12:21 That's not sufficient in itself, because you can't do an else. 17:12:34 else is if not a 17:13:11 but you zeroed a at the end??? 17:13:13 How do you implement not? 17:13:19 that too 17:13:20 And what monqy said. 17:13:21 copy it 17:13:36 Copy what? 17:13:42 a to b 17:13:42 Oh, right. 17:13:52 This is kind of moot, because we've demonstrated that if-then-else is possible; see above. 17:14:09 another formulation 17:14:20 monqy: I think it's easy, yes, because you always know how far away you are from another variable. 17:14:28 But I'm not *quite* sure. 17:14:47 I'm erring on the side of the control flow being too weak. 17:16:21 a=1 while (b) { a = 0 ; B- } this is not 17:17:28 I'm erring on the side of it being strong enough: you're able to have normal nested while and if statements, AFAICT. 17:18:15 Phantom_Hoover: I'm not sure that's enough. 17:18:24 Balanced BF has that. 17:18:44 I think you need some "dynamicity" in the control flow, like you get with goto, or being able to change the conditioned variable (unbalanced BF). 17:19:46 You can keep a variable called "check" in the while and just swap the value of check around 17:19:46 you can do logical and of two variables, and other connectives 17:19:49 I'm really not sure of that. 17:19:54 Never mind 17:20:00 Phantom_Hoover: Sure of what? 17:20:36 OK, so wait, can we assume that it's possible to implement the appropriate arithmetic functions to manipulate (appropriately-framed) bitstreams? 17:22:34 So I can write a=take(s) to remove the first bit in a stream and put it in a, and put(b,s) to stick a bit onto the end of a stream without needing to specify the exact implementation of all the relevant arithmetic? 17:23:31 with add sub mult and div and loops maybe? 17:23:56 Yes; I'm confident that what we have is enough for those. 17:24:00 OK, so wait, can we assume that it's possible to implement the appropriate arithmetic functions to manipulate (appropriately-framed) bitstreams? 17:24:03 Phantom_Hoover: I'm sceptical. 17:24:21 Phantom_Hoover: Well, *2 is easy enough. 17:24:30 %2 as well. 17:24:37 I guess +1 is too. 17:24:47 /2? 17:24:55 Well, let's try it? 17:25:03 Phantom_Hoover: Can it be put(s,b) btw. 17:25:12 Yes, OK. 17:25:31 put(s,0) = { s'; while (s) { s'+; s'+; s- }; while (s') { s+; s'- } } 17:25:39 put(s,1) = { put(s,0); s+ } 17:25:57 Phantom_Hoover: Also take(s,b) to put it in b. 17:26:10 OK. 17:26:14 http://esolangs.org/wiki/Brainfuck_algorithms#x_.3D_x_.2F_y 17:26:21 while(b != zero) {b-;} while(a != zero){a-; a-; b+;} 17:26:21 Shhh. 17:26:45 Are we still talking about SumaMoito? 17:26:45 Phantom_Hoover: OK, divmod is quite tricky. 17:26:49 Ngevd: Yes. 17:26:52 -Z1. 17:27:01 Phantom_Hoover: It relies on overflow behaviour. 17:27:06 Phantom_Hoover: Actually, we could just do div and mod separately. 17:27:20 Phantom_Hoover: /2 is tricky. 17:27:27 while (s) { s-; s-; d+ } doesn't work. 17:27:33 Actually, it works in -Z2. 17:27:43 But isn't -Z1 the one we're considering? 17:27:45 The code I wrote there is the turns b into the ceiling of a/2 17:27:46 It's the simplest. 17:27:59 -Z2 17:28:06 -n 17:28:17 Proving one of them TC would be good enough for now, surely? 17:28:31 Could we do %2 in -z1? 17:28:39 Phantom_Hoover: Well, OK. 17:28:56 while (s) { s-; s-; d+ } 17:28:58 That's /2. 17:29:06 %2 is harder. 17:29:13 Well, we don't need d, actually. 17:29:17 while (s) { s-; s- } # obvious 17:29:19 Wait. 17:29:23 No, we do need d. 17:29:37 while (s) { s'+; s-; s- }; while (s') { s+; s'- } 17:29:45 The problem now is getting the remainder. 17:29:49 Ah, wait! 17:29:58 while (s) {s -; if(d){d-}{d+}} 17:30:05 while (s) { s'+; s-; if (s) { r+ } else { s- } }; while (s') { s+; s'- } 17:30:10 Ngevd: Ah, yes. 17:30:19 while (s) { s'+; s-; if (s) { s'-; r+ } else { s- } }; while (s') { s+; s'- } 17:30:31 Phantom_Hoover: OK, rewrite that with your if-then-else. 17:31:30 Ngevd, elliott, Phantom_Hoover, the Turing-Completeness people. 17:31:53 elliott, do I have to? 17:32:02 Can't we just say it's possible and leave it at that? 17:32:07 Wait, no, it's... 17:32:17 take(s,b) = { while (s) { s'+; s-; if (s) { s'- } else { b+; s- } }; while (s') { s+; s'- } } 17:32:18 Right? 17:32:24 As in, the remainder is on the other branch. 17:32:58 Phantom_Hoover: OK, let's assume it's possible. 17:33:02 Continue, sir. 17:35:07 So, we have +1, *2, /2, %2 17:35:36 :t break 17:35:37 forall a. (a -> Bool) -> [a] -> ([a], [a]) 17:35:43 > break (== '=') "a=b=c" 17:35:44 ("a","=b=c") 17:36:13 one difficult but possible thing is abs(A-B) in 3 langs 17:36:33 > braek (== '=') "a" 17:36:34 Not in scope: braek' 17:36:37 > break (== '=') "a" 17:36:38 ("a","") 17:38:16 :t lookup 17:38:17 forall a b. (Eq a) => a -> [(a, b)] -> Maybe b 17:39:49 Right then. p = ; d = ; while (1) { b; take(p,b); put(p,b); if(b) { take(p,b'); put(p,b'); d' = d; take(d,r); if(r) { put(d,b') } else { d = d' } } else { take(d,b') } 17:42:40 Phantom_Hoover: Does that handle the "cyclic" part? 17:43:11 You mean the "program string cycles" part? 17:43:20 He does 17:43:52 If so, take(p,b); put(p,b); reappends instructions. 17:44:00 -!- Ngevd has quit (Quit: Goodbye). 17:44:59 Right. 17:45:09 OK, I guess it's TC then. 17:45:31 :) 17:47:26 another language? today is a good day 17:47:34 Phantom_Hoover: Better question: What's the minimum number of variables for it to be TC? 17:47:54 Phantom_Hoover: I can't tell from yours because you don't define most of your damn variables. 17:48:12 "Generic is a WIP language made by Tailcalled in a way that makes many concepts from Category Theory easy to define." 17:48:31 6? 17:48:37 Oh dear. 17:49:22 Although your algorithms might have some extra implicit ones, and the ifs have their variables. 17:53:05 * Sgeo almost forgot about scanl 17:53:07 :( 17:53:32 Never forget about scanl, it's always waiting to jump on you when you least expect it. 17:53:32 Phantom_Hoover: So should I read Mac Lane. 17:53:57 :t replicateM 17:53:58 forall (m :: * -> *) a. (Monad m) => Int -> m a -> m [a] 17:54:10 :t scanl 17:54:11 forall a b. (a -> b -> a) -> a -> [b] -> [a] 17:54:16 > replicateM 3 "abc" 17:54:17 ["aaa","aab","aac","aba","abb","abc","aca","acb","acc","baa","bab","bac","b... 17:54:46 > replicateM_ 3 "abc" 17:54:47 [(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),()... 17:55:00 @src replicateM 17:55:00 replicateM n x = sequence (replicate n x) 17:55:27 @replicateM_ 17:55:27 Unknown command, try @list 17:55:34 @src replicateM_ 17:55:34 replicateM_ n x = sequence_ (replicate n x) 17:58:34 @src sequence 17:58:34 sequence [] = return [] 17:58:35 sequence (x:xs) = do v <- x; vs <- sequence xs; return (v:vs) 17:58:35 -- OR: sequence = foldr (liftM2 (:)) (return []) 18:00:54 Phantom_Hoover: So should I read Mac Lane. 18:01:20 Well, if you don't get put off by the examples being pretty obscure. 18:01:25 Obscure howso? 18:01:45 Maths. 18:02:16 They're generally either topological, set-theoretical or group-theoretical. 18:02:29 Phantom_Hoover: They should use practical examples instead, like counting change. 18:03:20 Well no, it's just that I get annoyed when I have to skip bits because I don't understand the category in question. 18:05:32 * elliott knows ~0 topology and group theory, and very basic set theory, so he's clearly in the target market. 18:05:44 Well, OK, more than ~0 group theory. 18:06:21 Like, he defines and explains natural transformations in half a page, and then gives examples for the next two. 18:07:17 Phantom_Hoover: How far in did you get? 18:07:40 We should READ MAC LANE TOGETHER (N.B. this would be the most harrowing experience of your entire life). 18:07:40 Right now, '5. Monics, Epis and Zeros'. 18:08:28 Phantom_Hoover: Those are monomorphisms and epimorphisms! I know this because Wikipedia says so. 18:08:30 *Epics, presumably. 18:08:38 What chapter is that in? 18:08:40 Nope, it says Epis here. 18:08:45 It's not one of the chapters on http://en.wikipedia.org/wiki/Categories_for_the_Working_Mathematician, at least. 18:08:52 Phantom_Hoover: Heh, a typo I guess. 18:09:04 1. 18:09:06 -!- Ngevd has joined. 18:09:24 ('Mon' is obviously a popular syllable in category theory.) 18:09:36 Phantom_Hoover: EXCELLENT THERE IS STILL TIME TO READ MAC LANE TOGETHER (N.B. you would not only lose the will to live but lose everyone else's will to live too somehow.) 18:09:47 Hello 18:09:58 Where are we up to? 18:10:10 Ngevd: Oh god. 18:10:14 Chapter 1, section 5. 18:10:25 Phantom_Hoover: *Chapter 0 section 0 18:10:34 we can have a mac lane party 18:10:39 elliott, you didn't even read the Amazon preview?? 18:10:44 monqy, friendship mac lane 18:10:49 Phantom_Hoover: I read the first few pages? Wait, did you actually BUY it? 18:10:54 hahahaha 18:10:54 no 18:10:55 Oh, pyrated. 18:11:03 I resent the implication. 18:11:11 im not cool enough for pyracy 18:11:17 OK maybe a Mac Lane party wouldn't be such a completely terrible idea? 18:11:19 Wait, no, that's a pyrite. 18:11:31 * elliott says this because he has absolutely no chance of getting anything out of it solo. :p 18:11:45 BUT only cool people are invited (cool people are Phantom_Hoover and elliott). 18:11:46 We can all be objects and when we talk to each other they'll be morphisms 18:11:50 i need peer pressure for the mac lanes to sink in 18:11:52 (monqy is instead coole) 18:11:58 corollary: we're all insane 18:12:15 Or Sgeo, I suppose. 18:12:29 Sgeo what. 18:12:35 What is the wolrd coming to? 18:12:39 we're all sgeo 18:12:52 ALSO: overly fond of Chinese whispers. 18:13:00 Phantom_Hoover: I have no idea what you are saying. 18:13:33 elliott, obviously we all talk to ourselves, thus we're all really lonely and pathetic, thus Sgeo (sorry Sgeo). 18:13:39 Phantom_Hoover: Ah. 18:13:48 Where does Chinese whispers come into it. 18:14:12 Also, if I talk to you and you talk to monqy, I must talk to monqy, so obviously we talk to each other with Chinese whispers. 18:14:31 It doesn't make sense otherwise. 18:16:23 I still don't know what's going on 18:16:40 Ngevd: death. 18:16:55 Death, the concept, the event, or the personification? 18:17:04 Every. 18:17:15 Ngevd, death, the category. 18:17:33 terribly sorrey but i've lost your will to live 18:17:37 (You're an object, if you kill someone it's an arrow.) 18:17:46 (Suicide is rife.) 18:17:48 I'm just going to stare into my working ( :-] ) Haskell program 18:18:06 whats a :-] 18:18:12 Robot smile. 18:18:20 also: stare into?? 18:18:24 Yes 18:18:30 does it stare back into you 18:18:33 No 18:18:38 I'm not that good a programmer 18:18:58 put an eye or two in the comments 18:19:01 you can be stare friends 18:19:32 There's a function called "isElementHaha" 18:20:14 put a mouth or two in the comments 18:20:19 you can be laugh friends 18:21:13 Dammit, monqy, now I'm thinking about AI 18:21:17 Also, dinnertime 18:21:18 Bye 18:21:19 -!- Ngevd has quit (Quit: Goodbye). 18:32:54 logs (?:test) 18:32:57 ​/home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: logs: not found 18:32:58 log (?:test) 18:33:06 is this PCRE or....? 18:33:20 2010-12-13.txt:22:15:12: Anyone fancy thrashing this guy at his own programming contest? http://skybuck.org/BoxifyMe 18:33:39 ah yes 18:37:52 no 18:37:54 grep -P 18:43:43 weidest smiley ever 18:43:47 -!- Ngevd has joined. 18:43:50 Hello! 18:43:59 http://hpaste.org/56263 18:45:03 "both :: (a->b) -> (a,a) -> (b,b) 18:45:03 " 18:45:19 Phantom_Hoover: What of it? 18:45:21 Wait, the whitespace there is fine. 18:45:33 Well, there should be a space around the (->). 18:45:43 I think I have that thing where my sense of scale goes mad 18:45:48 Compiles fine 18:47:15 Phantom_Hoover: wat 18:47:22 I'm joking. 18:47:39 I thought there were two spaces somewhere. 18:50:06 "kallisti: Sounds RSIish." <-- here is something sitting in my input buffer. I have no idea what it means. 18:51:26 Sounds rsish. 18:51:35 Gregor: Probably kallisti complaining about his fatigue? 18:51:39 Is fatigue the word. 18:52:14 http://skybuck.org/BoxifyMe/ why aren't books written like this 18:53:25 good writing 18:53:38 Hey, I recall the BoxifyMe thing from comp.lang.c. 18:54:17 elliott: no complaining about muscle cramps in hands. 18:54:22 WebSplat time! 18:54:26 Gregor: you suggested that it may be repetitive strain injury 18:54:33 Oh yeah 18:54:40 kallisti: That's what I meant. 18:54:52 I already told kallisti it's probably either the beginnings of RSI and carpal tunnel and to consult a doctor :P 18:59:36 elliott: indeed 18:59:45 elliott: what's a good example of a comparison on CReals that doesn't terminate? 19:00:23 x == x 19:00:33 The loss of Havenworks is one of the great tragedies of our time. 19:00:50 What're CReals? 19:00:58 > 2 == 2 :: CReal 19:00:58 Couldn't match expected type Data.Number.CReal.CReal' 19:00:59 against infe... 19:01:03 > 2 == (2 :: CReal) 19:01:03 True 19:01:05 Phantom_Hoover: Computable reals. 19:01:13 kallisti: That CReal just compares the first 200 digits or so. 19:01:20 It's evil. 19:01:25 gross 19:01:30 > pi :: CReal 19:01:31 3.1415926535897932384626433832795028841972 19:01:32 Same as show. 19:01:48 > (pi :: CReal) == (pi :: CReal) + (1/100000000000000) 19:01:49 False 19:01:52 > (pi :: CReal) == (pi :: CReal) + (1/10000000000000000) 19:01:53 False 19:01:55 > (pi :: CReal) == (pi :: CReal) + (1/10000000000000000000000000000000) 19:01:55 False 19:02:00 Okay, maybe it's doing something fancier. 19:02:02 But I don't know what. 19:02:07 @src pi 19:02:07 Source not found. Just try something else. 19:02:07 Phantom_Hoover: I think someone saved Havenworks. 19:02:19 Phantom_Hoover: Class method. 19:02:20 @src Floating 19:02:20 class (Fractional a) => Floating a where 19:02:21 pi :: a 19:02:21 exp, log, sqrt, sin, cos, tan :: a -> a 19:02:21 asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh :: a -> a 19:02:21 (**), logBase :: a -> a -> a 19:02:26 -!- oklofok has joined. 19:02:34 elliott, I know, but I couldn't think of a better place to look. 19:02:56 Phantom_Hoover: Ugh; the Wayback Machine won't show Havenworks because the robots.txt request times out. 19:02:56 > (pi :: CReal) == (pi :: CReal) + ((1 :: CReal)/(10**400)) 19:02:57 True 19:03:07 ...despite the fact that http://havenworks.com/robots.txt loads... 19:03:30 instance Eq CReal where 19:03:30 x == y = s' (digitsToBits digits) == 0 where (CR s') = x-y 19:03:41 digitsToBits :: Int -> Int 19:03:41 digitsToBits d = ceiling (fromIntegral d * (logBase 2.0 10.0 :: Double)) + 4 19:03:54 digits :: Int 19:03:54 digits = 40 19:03:55 Havenworks... is that the site with Computer Stupidities? 19:04:08 No, it's not. 19:04:13 That's Rinkworks. 19:05:02 -!- oklopol has quit (Ping timeout: 255 seconds). 19:05:41 Disturbed that fizzie knows this. 19:06:23 How is that disturbing? 19:06:35 @hoogle var 19:06:35 Language.Haskell.TH.Syntax VarE :: Name -> Exp 19:06:36 Language.Haskell.TH VarE :: Name -> Exp 19:06:36 Language.Haskell.TH.Lib varE :: Name -> ExpQ 19:07:39 It's an old(ish) site, I think. 19:07:50 I've used their Fantasy Name Generator for my Diablo II characters. :p 19:16:35 why does Complex a require a to be a RealFloat in order for it to be considered a Num. 19:16:55 -!- anders has joined. 19:18:54 welcome anders 19:18:59 anders: Welcome to the international hub for esoteric programming language design and deployment! For more information, check out our wiki: http://esolangs.org/wiki/Main_Page 19:20:29 > sqrt 50 19:20:30 7.0710678118654755 19:20:32 ah I see 19:20:36 I forgot num includes abs 19:21:01 which requires sqrt for complex numbers. 19:22:04 > signum (2 :+ 2) 19:22:05 0.7071067811865475 :+ 0.7071067811865475 19:22:07 Hokay. 19:22:19 fizzie: It's sort of positive! 19:23:12 elliott: It's sqrt(2) positive and sqrt(2) ordered; see, there's the positive/negative line of signitude, and the order/chaos line too. 19:23:38 oh wait everything requires real number stuff 19:24:03 multiplication and division uses cosine. 19:24:15 and sine 19:25:22 Huh? (a+bi)*(c+di) = (ac-bd) + (bc+ad)i. 19:34:21 fizzie: kallisti is a polar bear so obvious he won't use that representation. 19:35:56 -!- Zwaarddijk has changed nick to Systemzwang. 19:36:17 oklofok: While I, being such a square, obvious do. 19:38:26 i guess you could say these are complex issues XDXDXD 19:40:32 fizzie: polar form is just cartesian stuff with more trig. 19:40:36 * kallisti mathematician 19:40:55 it's an abstraction over sine and cosine. 19:40:57 so.. 19:41:00 yeah 19:41:17 okay you win 19:41:31 fizzie: are you in turku, wanna have a beer? 19:42:21 I don't beer :( :/ :\ and I don't Turku either. :( :/ :\ 19:43:10 The first is a big social problem; we had a "let's have everyone bring here a poster" event the other day, and it was merged with a beer tastery thing. 19:43:17 I don't touch that Turku stuff. 19:43:19 Not being in Turku hasn't been a big problem so far. 19:43:37 fetch http://sprunge.us/iKNC 19:43:40 2012-01-08 19:43:40 URL:http://sprunge.us/iKNC [395] -> "iKNC" [1] 19:43:57 fizzie, but what about all the friends you could have in Turku? 19:44:01 run ghc -O2 -o bin/searchlog iKNC 19:44:08 target iKNC' is not a module name or a source file 19:44:29 run mv iKNC searchlog.hs; ghc -O2 -o bin/searchlog searchlog.hs; chmod +x bin/searchlog 19:44:45 >_> 19:44:46 kallisti: that thing is useless 19:44:49 ​[1 of 1] Compiling Main ( searchlog.hs, searchlog.o ) \ Linking bin/searchlog ... 19:44:55 elliott: it is? 19:45:08 well, it could be. I haven't tested it yet. 19:45:21 Also, it's broken. 19:45:39 > permutations ["some", "words"] 19:45:43 [["some","words"],["words","some"]] 19:45:55 elliott: it is? 19:46:00 Yes. 19:46:03 oh indeed. 19:46:06 one sec 19:47:51 fetch http://sprunge.us/REKU 19:47:53 2012-01-08 19:47:53 URL:http://sprunge.us/REKU [441] -> "REKU" [1] 19:48:07 run mv REKU searchlog.hs; ghc -O2 -o bin/searchlog searchlog.hs; chmod +x bin/searchlog 19:48:12 No output. 19:48:32 searchlog elliott dicks 19:48:40 :0 19:48:53 elliott: how is it broken? I doubt we saw the same brokenness 19:49:05 No output. 19:49:21 oh I see... 19:49:39 it also doesn't pipe stdout correctly 19:49:43 :t join . map words 19:49:43 [String] -> [String] 19:49:51 :t concatMap words 19:49:52 [String] -> [String] 19:50:07 Does looking fondly upon m4 make me a deviant? 19:50:18 Phantom_Hoover: Only slightly. 19:50:18 kallisti: 19:50:22 I don't know enough about m4 to answer 19:50:22 createProcess (proc "/hackenv/bin/log" [r]) 19:50:26 Phantom_Hoover: I love m4. 19:50:34 It's the best! 19:50:40 elliott: yeah this is my first time using System.Process. 19:50:40 monqy: Autotools has M4 as one of the major implementation languages. 19:51:01 I now know enough about m4 to answer 19:51:08 :) 19:51:11 ah wait proc uses Inherit 19:51:29 so that should be fine. 19:51:37 monqy, listen not to pikhq, he knows not the awesome of m4. 19:51:53 I guess I'll 19:51:53 learn 19:51:54 m4 19:52:07 or 19:52:11 stare at it a bit and get bored 19:52:16 which log 19:52:20 ​/hackenv/bin/log 19:52:46 elliott: I can't spot the wrongness. 19:52:48 Phantom_Hoover: The best part about m4 is that it has a command to redefine the core lexical syntax. 19:52:55 kallisti: You spawn a process and immediately terminate. 19:53:06 I remember a lot of that kind of thing. 19:53:08 ah 19:53:33 Phantom_Hoover: http://www.gnu.org/software/m4/manual/m4.html#Changeword 19:53:34 ah wait I should be using... rawSystem I think? 19:53:43 kallisti: No. 19:53:45 You should be waiting for the process 19:53:55 does rawSystem not do that? I guess not. 19:54:00 I think it's deprecated. 19:54:02 elliott, sure that's not just a GNU extension? 19:54:17 Phantom_Hoover: I think it is, but who cares? 19:54:43 elliott: sorry perl 19:54:54 changequote is there by default, I think. 19:55:35 kallisti: What? 19:56:17 a perl which is sorry 19:56:23 a sorry perl 19:56:41 elliott: well I guess perl would do the same thing if I specified that I want a process in the equivalent way... 19:56:51 since they're... equivalent 19:57:17 but that's not really meant. I meat that from programming in perl I expect things I shouldn't when doing things in other languages. basically. 19:57:21 +what I 19:57:28 Just think of it like subprocess. 19:57:33 yes 19:57:43 there's no confusion on what it means. now. 19:58:03 monqy will enjoy this: 19:58:07 fetch http://sprunge.us/WBad 19:58:09 2012-01-08 19:58:09 URL:http://sprunge.us/WBad [510] -> "WBad" [1] 19:58:23 hi 19:58:26 wbad 19:58:32 run mv WBad searchlog.hs; ghc -O2 -o bin/searchlog searchlog.hs; chmod +x bin/searchlog 19:58:47 Linking bin/searchlog ... 19:58:48 is it an omen 19:58:54 searchlog elliott penis #hurr hurr 19:59:11 searchlog poop fart 19:59:20 searchlog searchlog 19:59:22 elliott: but is the regex building logic accurate? 19:59:27 I think it is but I'm not sure. 19:59:27 No output. 19:59:31 oopse 19:59:37 "congrates" 19:59:41 2012-01-08.txt:19:59:20: searchlog searchlog 19:59:41 2012-01-08.txt:19:59:11: searchlog poop fart 19:59:42 "wbad" 19:59:47 oh no,,, 19:59:51 kallisti: maybe try not search for comment 19:59:54 searchlog poop fart butt 19:59:55 indeed 20:00:00 searchlog poop 20:00:03 it got the order scrombled 20:00:14 anyway you can use (...|...|...) for or, and then spaces provides and 20:00:15 2012-01-08.txt:19:59:54: searchlog poop fart butt 20:00:15 2011-05-01.txt:20:58:53: poop CH 20:00:19 assuming it works. 20:00:56 searchlog kallisti moron 20:01:03 2011-12-17.txt:01:58:51: kallisti: concatMap is recursive, you moron 20:01:16 elliott: see? totally useful. 20:01:22 Yes. 20:01:30 searchlog kallisti moron 20:01:37 2012-01-08.txt:20:00:56: searchlog kallisti moron 20:01:39 I guess if you want actual spaces you can use \s instead 20:01:39 this is exciting 20:01:43 searchlog CakeProphet moron 20:01:50 2012-01-08.txt:20:01:43: searchlog CakeProphet moron 20:01:59 tool of the year 20:01:59 monqy: yes so exciting 20:02:13 searchlog kallisti nominated tool of the year 20:02:17 but uh, does it actually work correctly? 20:02:21 this is the thing that I want to know. 20:02:43 searchlog moron kallisti 20:02:46 No output. 20:02:51 2012-01-08.txt:20:00:56: searchlog kallisti moron 20:02:55 appears to. 20:03:58 -!- Ngevd has quit (Ping timeout: 276 seconds). 20:04:08 searchlog a b c d e f g h i j k l m combinatiorial explosion? 20:04:14 fizzie: nooooooooo 20:04:17 searchlog hi 20:04:34 fizzie: so many permutations... 20:04:45 No output. 20:04:47 searchlog ) 20:04:53 grep: unmatched parentheses 20:04:54 No output. 20:04:55 monqy: noooooooo 20:05:07 continue thinking of the terms as regexes. 20:05:13 searchlog ( 20:05:14 because they are. 20:05:16 grep: missing ) 20:05:27 grep excitement 20:05:33 I gotteded a "killed" when I tried the explosion in private, I was hoping for that now too. :/ 20:05:45 fizzie: *a b c d e f g h i j k l m n big-O notation 20:06:00 > permutations . words "a b c d e f g h i j k l m combinatorial explosion?" 20:06:01 [["a","b","c","d","e","f","g","h","i","j","k","l","m","combinatorial","expl... 20:06:12 well that part was reasonably fast actually. 20:06:22 ... 20:06:26 because you only evaluated the first element 20:06:31 oh, yes. 20:06:43 yes, Haskell. right. 20:06:44 searchlog thanks kallisti 20:07:03 2011-12-15.txt:18:36:22: thanks to emacs. 20:07:10 elliott: is this another +1 towards "kallisti's bad algorithms" 20:07:13 tool of the yesteryear 20:07:36 you could write a book 20:07:42 searchlogs thallisti 20:07:46 ​/home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: searchlogs: not found 20:08:02 > length . permutations . words "a b c d e f g h i j k l m combinatorial explosion?" 20:08:06 mueval-core: Time limit exceeded 20:08:10 Bah, it's just 1307674368000 permutations. 20:08:19 That's one big quitter-bot. 20:08:37 searchlogs core mueval exceeded limit time 20:08:40 ​/home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: searchlogs: not found 20:09:15 hmmm I wonder if it would be faster if I switched out the "|" and ".*" 20:10:08 who will write the wrapper over searchlog 20:10:15 and what will it do 20:10:19 2012 mysteries 20:10:34 monqy: ...I guess I could just use grep directly... 20:10:54 but why do that? 20:10:56 nih grep 20:10:58 when there's already logs 20:12:00 guys I bet this is the same algorithm Google uses. 20:12:26 they should hire me so I can make the big$$$ 20:12:39 fetch http://sprunge.us/EEVG 20:12:39 grep (a.*b.*c)|(a.*c.*b)|(b.*a.*c)|(b.*c.*a)|(c.*a.*b)|(c.*b.*a) \approx grep a | grep b | grep c. 20:12:42 2012-01-08 20:12:41 URL:http://sprunge.us/EEVG [510] -> "EEVG" [1] 20:13:19 run mv EEVG searchlog.hs; ghc -O2 -o bin/searchlog searchlog.hs; chmod +x bin/searchlog 20:13:27 No output. 20:13:30 kallisti: By the way, searchlog always gets exactly one (1) log. 20:13:37 Oh, you map words it. 20:13:40 Why not concatMap words? 20:13:46 elliott: lazy 20:13:49 I already wrote it 20:13:52 didn't consider using that 20:14:00 now it's SET IN STONE 20:15:05 searchlog mueval time limit 20:15:18 2011-02-03.txt:08:07:29: mueval-core: Time limit exceeded 20:15:26 elliott: what do you mean. 20:15:50 What? 20:15:53 run paste which log 20:15:57 http://codu.org/projects/hackbot/fshg/index.cgi/raw-file/tip/paste/paste.2434 20:16:12 elliott: why does it always get exactly one log. 20:16:13 -!- oerjan has joined. 20:16:58 Uh? 20:17:01 ​/home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: Uh?: not found 20:17:02 Because that's how it works. 20:17:12 I don't know what you mean. 20:17:16 ? Uh? 20:17:19 oh, you mean like that. why is that important? that's obvious. 20:17:20 Uh?? ¯\(°_o)/¯ 20:17:55 kallisti: I don't understand what you mean. 20:18:15 oh you neverminded that. 20:18:21 I promise I actually read this channel 20:18:28 (with psychic powers) 20:18:34 maybe my psychic is a little rusty. 20:18:45 ? ¯\(o_°)/¯ 20:18:48 ​¯\(o_°)/¯? ¯\(°_o)/¯ 20:18:50 psychic grammar is all weird with quantum 20:20:12 elliott: at first I thought you meant what you actually meant. Then I thought you meant the obvious statement that searchlog grabs one log entry, just as log was. Then I read the nevermind and it all made sense. 20:20:25 you cannot observe the subject and object simultaneously 20:20:53 Oh. 20:20:55 kallisti: By the way, searchlog always gets exactly one (1) log. 20:20:57 s/log/search term/ 20:21:08 ah okay. 20:21:11 yes. 20:21:22 (but no, as past elliott discovers) 20:21:48 ls bin/searchlog 20:21:52 bin/searchlog 20:21:58 searchlog should parallel for the future. 20:22:01 cat bin/searchlog 20:22:03 also it should make goofy words. 20:22:04 ​ELF... 20:22:06 eek 20:22:11 monqy: oh, parallel, that's a good idea actually. 20:22:16 I think? 20:22:22 maybe that's slower than doing one traversal? 20:22:22 Not at HackEgo speeds. 20:22:29 Also, not for IO-bound tasks, duh. 20:22:36 oh, right. 20:22:37 cat bin/log 20:22:39 oerjan: cat searchlog.hs 20:22:40 ​#!/bin/sh \ cd /var/irclogs/_esoteric \ if [ "$1" ]; then \ grep -P -i -- "$1" ????-??-??.txt | shuf -n 1 \ else \ file=$(shuf -en 1 ????-??-??.txt) \ echo "$file:$(shuf -n 1$file)" \ fi \ 20:22:45 parallel io 20:22:49 cat searchlog.hs 20:22:52 "double the fun" 20:22:53 import System.Environment \ import System.Process \ import System.Exit \ import Control.Monad \ import Control.Applicative \ import Data.List \ \ main = do \ r <- buildRegex . permuteArgs <$> getArgs \ (_, _, _, h) <- createProcess (proc "/hackenv/bin/log" [r]) \ exitWith <$> waitForProcess h \ where \ permuteArgs = permutations . join . map words \ buildRegex = oBrackets . intercalate ".*" 20:24:02 wait searchlog calls log? 20:24:08 yes 20:24:23 it builds a regex from the permutations of the search terms, and then passes that to log because I'm lazy. 20:24:24 but who calls searchlog 20:24:28 who watches... 20:24:29 the searcmen 20:24:32 searchmen 20:24:47 elliott: shouldn't that be "who searches the searchmen"? 20:25:36 searchlog efficiency of the year 20:25:42 searchlog (elliott|Gregor) :P 20:25:54 2011-08-16.txt:12:52:57: (Though not many. :p) 20:26:05 kallisti: dude it's 20:26:05 dude 20:26:13 if only I had the creativity to think of search terms, then I could do all the searches 20:26:15 yes dude is dude. 20:26:18 if you think it should be that then you are totally not getting this whole 20:26:18 thing 20:26:29 elliott: woah man. maybe you're right 20:26:32 maybe I don't get the thing. 20:26:33 what is the thing? 20:26:34 searchlog beeswax endomorphism excursion 20:26:44 2012-01-08.txt:20:26:34: searchlog beeswax endomorphism excursion 20:26:48 searchlog poop poop poop poop poop poop poop ... poop 20:26:58 monqy: what would be a more efficient way to do that... aside from "manually" 20:27:06 Killed 20:27:28 slaves 20:28:02 slaves with grep 20:28:19 I'm pretty swapping the | and .* made it faster but I really have no way to know that without understanding how regex is compiled. 20:28:23 *pretty sure 20:29:03 (a|b|c).*(b|c|a).* ... seems... simpler to execute 20:29:17 it would probably be faster if log didn't use -P 20:29:18 uuh waht 20:29:37 elliott: but then I wouldn't have perl regex 20:29:40 :( 20:30:50 what's the point of building (a|b|c).*(b|c|a).* ... 20:31:27 as opposed to? 20:32:02 that would seem to give also results like a.*a.* ... ? 20:32:18 ((a|b|c).*)+, or even better (a|b|c).*, or even better, (a|b|c) 20:32:53 maybe I'm not getting the magical perl regex magic 20:32:54 i.e. no guarantee there is any b or c in it... 20:32:59 what are those funky things 20:33:17 yeah there's no guarantee and all of the permuatations are identical 20:33:19 oerjan: oh right. 20:33:29 etc etc 20:34:15 monqy: the purpose is to do an and search instead of or search 20:34:29 yes but it doesn't 20:34:32 well you did it wrong :( 20:34:33 yes 20:34:52 yes with the swapped version 20:34:55 the other one works correctly 20:35:31 fetch http://sprunge.us/ZLCT 20:35:35 2012-01-08 20:35:35 URL:http://sprunge.us/ZLCT [510] -> "ZLCT" [1] 20:35:41 not as cool as wbad 20:35:51 run mv ZLCT searchlog.hs; ghc -O2 -o bin/searchlog searchlog.hs; chmod +x bin/searchlog 20:36:00 No output. 20:36:12 I forgot the case where it could be a.*a.*a and such 20:37:26 searchlog useful again 20:37:49 2008-03-29.txt:20:06:49: W ('television antenna') pops a vector off the stack, then a value. If the cell at that vector (plus the storage offset) in Funge-Space (a la g) is equal to that value, nothing happens. If the cell in space is less than the value, it pushes the value and the vector (inverted) back onto the stack, and backs up the IP (subtracts the IP's delta from it's position, sort of a 'wait to 20:38:03 success 20:38:09 does it say 20:38:09 useful 20:38:30 its a mystery 20:38:57 -!- oerjan has set topic: Official revolting channel of the inverse femtobarn stupid topic change CP violation, the original Trilogy: A new PHP | http://codu.org/logs/_esoteric/. 20:39:17 I don't see a useful 20:39:26 perhaps it gets cut off? 20:39:48 searchlog mueval limit core 20:40:00 2011-08-07.txt:06:40:12: mueval-core: Time limit exceeded 20:40:02 i don't see an again either so i'll look and see what the rest was 20:40:17 oerjan: good topic 20:40:34 try again' condition, useful mainly in Concurrent Funge.) If the cell in s 20:40:40 has both again and useful!!! success!!! 20:40:52 * elliott is currently 192.322581 times better than kallisti. 20:40:58 elliott: thx 20:43:40 elliott: what's the name for that style of C variable naming where you append file names and data structure names to things? 20:44:11 what 20:44:20 like.... 20:44:27 CPython_PyObject_blah_blah 20:44:40 basically making up for a lack of namespaces by hardcoded them into variable names. 20:45:09 it has a name. 20:45:40 Hungarian notation 20:45:45 That's not it. 20:46:10 kallisti: that's not appending. 20:48:31 Hungarian notation is responsible for the hInstance lpClassName dwStyle -like Windows API parameter/structure-member names. 20:49:11 oh 20:49:14 nevermind 20:50:33 fizzie: Systems Hungarian, rather. :p 20:50:44 Not that Apps is any better. 20:52:34 Forcing myself to use a fold on a tricky thing makes me understand it better, I think 20:52:37 Sgeo: Have you considered using a fold... ON FOLDS THEMSELVES? 20:53:36 shachaf: Can you implement foldr as a foldr??? 20:54:01 foldr f z = foldr (\a r -> f a (r ())) (\() -> z) 20:54:13 elliott: Whoa, man. That is, like, so meta. 20:54:17 Using a fold ON FOLDS THEMSELVES => http://www.mspaintadventures.com/?s=4&p=000944 20:55:06 fizzie: I don't get it. 20:55:16 Probably because it's that awful comic. 20:55:50 It's not that awful comic, actually. 20:55:59 It's the other awful comic. 20:56:14 * elliott helpful. 20:56:21 the other awful comic that isn't either of those other two awful comics 20:56:22 Oh. 20:56:29 That's that awful comic, then? 20:56:29 keep it straight 20:56:44 shachaf: No! It's the other awful comic. 20:56:50 monqy: Dude, don't be, like, so intolerant, man. 20:56:54 elliott: s/That's/What's/ 20:57:15 shachaf: The comic you're thinking of is the one at mspaintadventures.com, but the one fizzie linked is the one at mspaintadventures.com. 20:57:17 how can i tolerate awful comics being other awful comics 20:57:22 how is that tolerable 20:57:22 how 20:57:46 monqy: keep it straight 20:57:53 nothing is tolerable, really 20:58:11 elliott: did i oops a word 20:58:14 :( 20:58:21 everyone oopsedes a word 20:58:21 sometimes 20:58:29 sorry to any awful webcomics i may have offended 20:58:30 oerjan: not true i'm sitting right here tolerating 20:58:31 oerjan: 0 is well within the tolerances. 20:58:33 its ok 20:58:33 monqy: station v3 20:58:38 is it really 20:58:38 ok 20:58:39 for station v3 20:58:42 is anything really 20:58:43 ok 20:58:44 for station v3 20:59:09 elliott: aum 21:00:52 a special shame set aside for station v3 21:01:10 station v3 shame 21:01:48 shame station v3 21:06:43 > fix$('0':).tail.(<**>[id,chr.xor 1.ord]) 21:06:45 "01101001100101101001011001101001100101100110100101101001100101101001011001... 21:08:09 I don't like how you can't tell what the Applicative combinators do from their types. 21:08:43 @ty (<*>) 21:08:44 forall (f :: * -> *) a b. (Applicative f) => f (a -> b) -> f a -> f b 21:08:45 @ty (<**>) 21:08:46 "Programmers are limited by the hardware. Computers work by repeating certain steps over and over again. They can only follow certain instructions. With the sheer randomness of crumpled paper, there really is no way to come up with an algorithm that accounts for every crease, nook, and cranny. You could painstakingly program something that would evaluate a single unique piece of paper, but there's no way to make a general method." 21:08:46 forall (f :: * -> *) a b. (Applicative f) => f a -> f (a -> b) -> f b 21:08:48 ...most of them do their actions left to right, no? 21:08:56 But is (<**>) = flip (<*>)? No! 21:09:00 oerjan: *all 21:09:08 Right, but so what? 21:09:17 elliott, is this for OCR or something? 21:09:23 shachaf: Consistent rule and the rest is left up to types? Gosh, how awful. 21:09:25 elliott, and it doesn't make any sense 21:09:26 Anyway, left-to-right is racist. 21:09:30 Vorpal: no, it's about crumpled paper, and that's why i quoted it 21:09:44 elliott, what does crumpled paper have to do with computers? 21:10:03 Vorpal: They (computers) can't get over it (crumpled paper). 21:10:12 Vorpal: Or so I read it. 21:10:14 fizzie, ah okay. Right 21:10:29 shachaf: no, racist is the pun i briefly considered responding to that with 21:10:30 It's just that they can't. Want to break a computer? Crumpled paper. 21:11:08 also, is there a shorter way to write chr.xor 1.ord 21:11:20 erm... 21:11:23 instance Num Char 21:11:23 what are you doing :P 21:11:25 xor 1 21:11:28 @ty xor 21:11:29 forall a. (Bits a) => a -> a -> a 21:11:30 I made a list (good = unsafeCoerce good : good) then regretted it 21:11:33 s/Num/Bits/ 21:11:38 monqy: that's 21:11:40 what is that 21:11:44 good 21:11:48 :t xor.chr 21:11:49 No instance for (Bits Char) 21:11:49 arising from a use of xor' at :1:0-2 21:11:49 Possible fix: add an instance declaration for (Bits Char) 21:12:06 Prelude Unsafe.Coerce> let good = unsafeCoerce good : good :: [[[[()]]]] 21:12:06 Prelude Unsafe.Coerce> take 10 good 21:12:06 [[[[(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),() 21:12:06 ,(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),() 21:12:10 ,(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),() 21:12:11 No, there's no such instance. 21:12:15 ,(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),() 21:12:20 ,(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(), 21:12:23 monqy: good 21:12:25 oerjan: are you playing anagolf :P 21:12:26 elliott: Maybe in another couple of lines we'll understand. 21:12:31 Why did you stop pasting?! 21:12:38 shachaf: Because I don't want you to understand. 21:13:10 :-( 21:13:25 elliott: just golfing some frequent one-liners a bit differently 21:13:41 shachaf: I wrote over 10 paragraphs about monads without a single analogy! 21:13:44 Do I get a medal? 21:14:27 elliott: I think you get kicked out of #haskell for life. 21:14:42 Which is even better than a medal, as far as quality-of-life goes. 21:14:53 What were you writing about monads? 21:15:23 > show<=[id,(1-)]) 21:15:25 "01101001100101101001011001101001100101100110100101101001100101101001011001... 21:15:27 shachaf: http://stackoverflow.com/questions/8777216/how-do-you-identify-monadic-design-patterns 21:15:34 shachaf: The worst-titled question ever. 21:15:38 oerjan: (range ((minBound :: Char),(maxBound :: Char)) !!) . xor 1 . index ((minBound :: Char),(maxBound :: Char)) OH WAIT you said *shorter*. 21:15:58 You don't need those ::Chars. 21:16:02 * oerjan swats fizzie -----### 21:16:04 elliott: That URL doesn't make me want to click on it. 21:16:07 @src Ix 21:16:08 class (Ord a) => Ix a where 21:16:08 range :: (a,a) -> [a] 21:16:08 index :: (a,a) -> a -> Int 21:16:08 inRange :: (a,a) -> a -> Bool 21:16:08 rangeSize :: (a,a) -> Int 21:16:19 fizzie: How does (range x !!) differ from index x. 21:16:24 shachaf: It's not that bad. 21:16:41 it got shorter by using integers and show<=<, anyhow 21:16:58 oerjan: pretty 21:17:06 > show<=[id,(1-)]) 21:17:08 "00101100110100101101001100101100110100110010110100101100110100101101001100... 21:17:16 hmph 21:17:22 What's this supposed to be? 21:17:24 there must be some way to eliminate that... 21:17:39 I would read the source that generates it but I don't feel like it. 21:17:46 Too long. 21:17:53 shachaf: thue-morse sequence 21:18:05 oerjan: How about look-and-say? 21:18:27 elliott: Isn't it the other way around? I mean, 21:18:28 @ty ((range ('a','b') !!), index ('a','b')) 21:18:29 (Int -> Char, Char -> Int) 21:18:34 Oh, that. 21:18:57 fizzie: Oh, yes. 21:19:31 > group "112333" 21:19:32 ["11","2","333"] 21:19:35 elliott: i dabbled with that yesterday and didn't get satisfied 21:19:47 @hoogle (a -> b) -> a -> (a,b) 21:19:48 Control.Monad.Writer.Class listens :: MonadWriter w m => (w -> b) -> m a -> m (a, b) 21:19:48 Control.Monad.Writer.Lazy listens :: MonadWriter w m => (w -> b) -> m a -> m (a, b) 21:19:48 Control.Monad.Writer.Strict listens :: MonadWriter w m => (w -> b) -> m a -> m (a, b) 21:19:53 :t groupBy 21:19:54 forall a. (a -> a -> Bool) -> [a] -> [[a]] 21:19:58 > group "112333" 21:19:59 ["11","2","333"] 21:20:06 > (length &&& head) group "112333" 21:20:07 Couldn't match expected type t1 -> t' 21:20:07 against inferred type (GHC.... 21:20:08 > (length &&& head)$ group "112333" 21:20:08 (3,"11") 21:20:13 wtf 21:20:13 oh 21:20:17 > (length &&& head) <$> group "112333" 21:20:18 [(2,'1'),(1,'2'),(3,'3')] 21:20:38 > (\xs -> show (length x) ++ head x) <$> group "112333" 21:20:39 Couldn't match expected type [a]' 21:20:39 against inferred type SimpleRef... 21:20:44 > (\xs -> show (length x) ++ [head x]) <$> group "112333" 21:20:44 Couldn't match expected type [a]' 21:20:45 against inferred type SimpleRef... 21:20:46 wtf 21:20:47 oh 21:20:50 > (\x -> show (length x) ++ [head x]) <$> group "112333" 21:20:51 ["21","12","33"] 21:21:10 > liftA2 (++) (show . length) head <$> group "112333" 21:21:11 Couldn't match expected type [GHC.Types.Char]' 21:21:11 against inferred ty... 21:21:21 > liftA2 (++) (show . length) (take 1) <$> group "112333" 21:21:22 ["21","12","33"] 21:21:46 > concatMap((++)<$>show.length<*>take 1).group$"112333" 21:21:48 "211233" 21:21:50 > join.map((++)<$>show.length<*>take 1).group$"112333" 21:21:52 "211233" 21:22:04 > iterate$join.map((++)<$>show.length<*>take 1).group 21:22:05 Overlapping instances for GHC.Show.Show 21:22:05 ([GHC.... 21:22:06 :t iterate$join.map((++)<$>show.length<*>take 1).group 21:22:07 [Char] -> [[Char]] 21:22:17 > (iterate$join.map((++)<$>show.length<*>take 1).group)"1" 21:22:19 ["1","11","21","1211","111221","312211","13112221","1113213211","3113121113... 21:22:27 > (join.iterate$join.map((++)<$>show.length<*>take 1).group)"1" 21:22:28 Couldn't match expected type a -> a' against inferred type [a]' 21:22:36 > join.(iterate$join.map((++)<$>show.length<*>take 1).group)"1" 21:22:37 Couldn't match expected type [a]' 21:22:37 against inferred type GHC.Types... 21:22:38 > join.(iterate$join.map((++)<$>show.length<*>take 1).group)$"1" 21:22:41 "11121121111122131221113112221111321321131131211131221132113111231131122111... 21:22:44 > join$(iterate$join.map((++)<$>show.length<*>take 1).group)"1" 21:22:46 "11121121111122131221113112221111321321131131211131221132113111231131122111... 21:22:49 > (>>=liftA2(++)(show.length)(take 1)).group$"112333" 21:22:50 oerjan: that's not bad imo 21:22:51 "211233" 21:22:57 shachaf: oh, very good 21:23:02 elliott: look-and-say isn't usually joined together like that 21:23:07 oerjan: well ok 21:23:19 > iterate(>>=((++)<$>show.length<*>take 1).group))"1" 21:23:20 : parse error on input )' 21:23:22 > iterate(>>=((++)<$>show.length<*>take 1).group)"1" 21:23:23 Couldn't match expected type GHC.Types.Char' 21:23:23 against inferred type... 21:23:29 shachaf: i think liftA2 is longer 21:23:41 Probably. 21:23:53 > iterate((>>=(++)<$>show.length<*>take 1).group)"1" 21:23:54 ["1","11","21","1211","111221","312211","13112221","1113213211","3113121113... 21:24:11 > iterate((>>=(show.length)++(take 1)).group)"1" 21:24:12 ["1","11","21","1211","111221","312211","13112221","1113213211","3113121113... 21:24:13 > iterate(join.:lift[show.length,take 1]<= Couldn't match kind (* -> *) -> * -> *' against ?? -> ? -> *' 21:24:19 oops 21:24:25 what was it i did yesterday 21:24:29 > iterate((>>=show.length++take 1).group)"1" 21:24:30 ["1","11","21","1211","111221","312211","13112221","1113213211","3113121113... 21:24:33 awesome 21:24:55 duh caleskell ++ 21:25:03 right 21:25:16 oerjan: I THINK YOU MEAN caleskell++ 21:25:21 @karma+ caleskell 21:25:21 caleskell's karma raised to 2. 21:25:31 > iterate(group>=>show.length++take 1)"1" 21:25:32 ["1","11","21","1211","111221","312211","13112221","1113213211","3113121113... 21:25:37 i think i win 21:25:48 darn i was going to do that :P 21:26:19 shachaf: we found another use of (>=>) 21:26:37 oerjan: the nice part is that it's still easy to understand 21:26:47 in fact it's even in the right order for reading naturally and all that 21:27:04 elliott: More like a reason (>=>) shouldn't be in the stdlib. 21:27:20 And by stdlib I mean stdlib.h. 21:27:57 :t (>=>) 21:27:58 forall a (m :: * -> *) b c. (Monad m) => (a -> m b) -> (b -> m c) -> a -> m c 21:28:04 hm 21:28:34 kleisli composition 21:29:36 elliott, ah 21:30:17 That helped? 21:30:35 oerjan: i conjecture that iterate(group>=>show.length++take 1)"1" is the shortest caleskell look and say prorgam :P 21:30:38 prorgam 21:30:42 elliott, somewhat, I have read about that before at some point. I did have to look up on wikipedia to refresh the details though 21:31:01 "SumaMoito-Z2 has been proven Turing complete by simulation of Bitwise Cyclic Tag. The details required to construct the interpreter can be found in the log of #esoteric for 8 January, 2012." 21:31:02 llo 21:31:03 night → 21:31:03 lol 21:31:10 Vorpal: it's just 21:31:15 (f >=> g) x = f x >>= g 21:32:02 -!- zzo38 has joined. 21:32:38 elliott, not sure why they would add a special name for that. It doesn't really save that much typing 21:32:59 Vorpal: it has nice theoretical properties 21:33:05 e.g. the monad laws are just 21:33:06 And it makes the monad laws so much nicer. 21:33:09 "return is identity for kleisli composition" 21:33:10 and 21:33:14 elliott: CURSES 21:33:14 "kleisli composition is associative" 21:33:21 elliott, ah 21:33:42 and also it saves so much typing??? 21:33:47 > iterate(group>=>show.length++take 1)"1" 21:33:48 so much 21:34:01 oerjan: what other nice sequences are there... 21:34:18 elliott, damn those mathematicians. We shouldn't let them design computer languages. They make crazy things like haskell. Leave it to engineers instead, then you get sensible things like VHDL, ADA and C 21:34:40 @quote kmc mathematicians 21:34:40 kmc says: Haskell isn't really designed by mathematicians. it's designed by people who programmers would consider to be mathematicians and mathematicians would consider to be programmers 21:34:51 heh 21:35:17 1echo a 21:35:18 echo a 21:35:23 a 21:35:30 @remember echo blah blah blah 21:35:30 Good to know. 21:35:33 @quote echo 21:35:34 echo says: blah blah blah 21:35:37 says: blah blah blah 21:35:37 as a pascal,basic,c,asm bred coder(not saying i know any of them well or that i can use them properly), i am highly interested in what i can learn from the mathematical programmers 21:35:47 @forget echo blah blah blah 21:35:47 Done. 21:35:55 hence why i keep ramming against the berlin wall of programming 21:36:14 i shouldn't beg for quotation in that way 21:37:01 -!- Klisz has joined. 21:39:49 * elliott decides to encourage non-begging behaviour by doing nothing. 21:40:17 O, so the people who designed Haskell are almost programmers and almost mathematicians. 21:40:22 ive been analyzing myself a bit 21:40:27 @hoogle (a -> a) -> a -> [a] 21:40:28 Prelude iterate :: (a -> a) -> a -> [a] 21:40:28 Data.List iterate :: (a -> a) -> a -> [a] 21:40:28 Data.Generics.Schemes everywhere :: (forall a. Data a => a -> a) -> (forall a. Data a => a -> a) 21:40:51 oerjan: did you really need to hoogle that 21:40:57 no. 21:41:04 its a bit like bush writing a heartfelt essay on why he was president for so many terms 21:41:06 elliott: You should be in #haskell. 21:41:09 i was hoping for some almost-hits 21:41:09 It makes one happier. 21:41:16 @hoogle+ 21:41:16 Data.Generics.Schemes everywhere' :: (forall a. Data a => a -> a) -> (forall a. Data a => a -> a) 21:41:16 Prelude until :: (a -> Bool) -> (a -> a) -> a -> a 21:41:17 Prelude map :: (a -> b) -> [a] -> [b] 21:41:31 i was thinking of until 21:41:40 oerjan: I was going to remind you of until. 21:41:41 but i doubt that helps 21:41:47 * elliott would have made 600 SO rep today if not for that pesky rep cap. 21:41:52 shachaf: FSVO happier? 21:41:58 itidus21: 2 is so many now? :P 21:42:09 it is 21:42:20 elliott: Just imagine talking to people who "just want to convert an Integer to a ByteString"! 21:42:25 @hoogle+ 21:42:25 Data.List map :: (a -> b) -> [a] -> [b] 21:42:25 Control.OldException mapException :: (Exception -> Exception) -> a -> a 21:42:26 Prelude ($) :: (a -> b) -> a -> b 21:42:27 shachaf: unsafeCoerce 21:42:39 Funny, that's the first answer that was given. 21:42:52 Followed by pack . return . fromInteger. 21:42:53 elliott, why are SO rep useful? 21:42:55 elliott: in this i am reminded of an einstein quote about having hand on a hot stove versus sitting next to a pretty girl 21:43:08 Vorpal: They aren't useful. However, they are SO useful. 21:43:11 Vorpal: Why is life useful? 21:43:18 Why is humanity useful? 21:43:19 elliott, it isn't 21:43:23 Why is chocolate useful? 21:43:31 not at all, we just pollute and such 21:43:34 So to answer your question, SO rep is useful because it's delicious and made of cocoa beans. 21:43:41 FSVO "just". 21:43:42 You have to answer all these questions with other questions: useful in what way? 21:43:54 elliott, also chocolate isn't useful either 21:44:00 so rep is useful because it pollutes and such 21:44:02 itidus21: Yeah, girls just can't compare to the magic of a stove. 21:44:04 > fix.("1":).map$group>=>show.length++take 1 --just a bit too long 21:44:05 Couldn't match expected type a -> a' 21:44:05 against inferred type [[GHC.... 21:44:11 and wrong besides :P 21:44:27 :t fix.("1":).map 21:44:28 Couldn't match expected type a -> a' 21:44:28 against inferred type [[Char]]' 21:44:28 In the first argument of (.)', namely ("1" :)' 21:44:28 "who's been a naughty stove?" 21:44:40 oerjan: ooh what about my favourite sequence 21:44:42 can stoves be naughty 21:44:48 :t fix.("1":).:map 21:44:49 oerjan: the self-avoidant sequence 21:44:49 ([Char] -> [Char]) -> [[Char]] 21:44:52 *avoiding i think 21:44:54 elliott: By the way, is it bad that my reaction to a lot of questions in #haskell is "step 1: Learn how to, you know, think"? 21:44:56 > fix.("1":).:map$group>=>show.length++take 1 --just a bit too long 21:44:58 ["1","11","21","1211","111221","312211","13112221","1113213211","3113121113... 21:45:01 monqy: during certain erotic fantasy 21:45:03 I think that would solve so many problems. 21:45:25 oerjan: where you build a markov model of increasing order of your own output so far 21:45:33 and output the least likely next bit 21:45:39 elliott: okay 21:45:40 elliott, what the self-avoidant sequence? 21:45:43 Vorpal: ^ 21:45:46 ah 21:45:56 oerjan: it /sounds/ like it should have a conceptually simple definition, but the one I implemented just did the obvious (reconstruct a markov model each step)... 21:45:57 elliott, that sounds interesting 21:46:09 Vorpal: it basically produces random-looking output 21:46:15 i don't know if it's "really" (pseudo)random 21:46:17 I figured out the Proxy monad first in the digraph category not in Haskell, but look in the document for Proxy type and found they defined the monad there too. But then, there can be Coproxy comonad, data Coproxy x; and everything has to be made undefined but that is OK since there will be no input value so there can be no output value either (it should be an empty case block, but Haskell doesn't support that!) 21:46:23 in the process i thought up a game based on hoarding. 21:46:28 elliott, probably isn't. 21:46:47 Vorpal: well you can consider it a reasonable mathematical /definition/ of a random sequence 21:46:48 elliott, anyway wouldn't it end up cycling a lot? 21:47:00 you walk around a single screen maze collecting randomly timed icons which unlock new randomly generated maze levels which can be played by a menu... 21:47:00 at least, it's a definition of a sequence that you can't predict locally 21:47:03 -!- atrapado has changed nick to atrapad. 21:47:06 well, you can predict it 21:47:09 but not with a markov model :) 21:47:11 Vorpal: nope 21:47:17 that's why you increase the order each step 21:47:18 the idea is that you have more fun collecting the levels than actually playing them 21:47:20 -!- atrapado has joined. 21:47:23 elliott, ah 21:47:32 itidus21: :D 21:47:36 -!- atrapad has quit (Quit: Bye). 21:47:45 * elliott just assumes oerjan is working on that sequence. 21:47:51 argumentum ad naivety 21:48:06 5 minutes in the player says to himself, dear god what am i doing? 21:48:07 elliott: NOPE 21:48:15 oerjan: :( 21:48:30 zzo38: agda supports empty pattern-matching :) 21:48:41 oerjan: what about the paper-folding sequence 21:48:52 elliott, which one is that? 21:49:30 00:28:30 In the book "Real World Haskell", I found the the following declaration: instance NFData BS.ByteString where rnf _ = () ! In my opinion, rnf does nothing! I don't understand how the argument of rnf will be reduced to "normal form". Any idea? 21:49:36 shachaf: Hey, a reason to dislike RWH more! 21:49:43 Vorpal: http://en.wikipedia.org/wiki/Regular_paperfolding_sequence 21:49:55 elliott: Well, I am glad they fixed that! But still, they should also fix GHC to support empty case blocks 21:49:56 please can someone review my proof of that SumaMoito-N is Turing-complete? http://esolangs.org/wiki/SumaMoito#Computational_class 21:50:22 elliott: Obviously that excalamation mark is just moved over by 7 characters. 21:50:26 EXCALAMATION! 21:50:45 elliott, nice 21:50:46 Anyway, if it was 7 characters to the left it would make sense. 21:51:10 elliott, I wonder if there is an irregular paperfolding sequence 21:51:42 atrapado: It's correct, yes. 21:51:47 oh, good 21:51:52 N is a pretty trivial extension of Z2. 21:52:15 Are you sure the decrements are the same though? 21:52:21 I thought N made the value the same when underflowing. 21:52:25 Oh, Z2 does to. 21:52:26 too. 21:52:39 Oh, it doesn't have decrement. 21:52:41 I didn't notice that :) 21:53:02 Yes, assuming the decrement function is right, it's correct. I think you can make it simpler though. 21:53:03 i am not ocmpletely sure that it is correct, elliott 21:53:05 atrapado, what about Z1? 21:53:12 Z1... 21:53:16 more complicated 21:53:19 negative values 21:53:21 I see 21:53:47 atrapado, also that mapping from Z2 to N seems trivial 21:53:48 atrapado: tmp1; out; tmp1+; while (tmp1 != in) { out+; tmp1+ } 21:53:54 That decrements out into in. 21:53:55 why are there even two languages? 21:53:56 Er. 21:53:58 In into out. 21:54:00 out = in - 1 21:54:09 and if it is 0 ? 21:54:24 atrapado: Oh, it doesn't halt. But that's easy... 21:54:42 atrapado: tmp1; out; tmp1+; while (in != out) { while (tmp1 != in) { out+; tmp1+ } } 21:54:57 :t zap 21:54:58 Not in scope: zap' 21:55:00 :t zapp 21:55:01 Not in scope: zapp' 21:55:06 wat 21:55:25 zap? 21:55:37 just zipWith id 21:55:52 i do not understand fully your algorithm, elliott , but do not doubt of its correcness.... 21:56:01 oerjan, why would you call that zap? 21:56:04 atrapado: Well, it's basically 21:56:08 :t zipWith id 21:56:09 forall b c. [b -> c] -> [b] -> [c] 21:56:11 atrapado: for (int i = 1; i < in; i++) out++ 21:56:20 -!- yiyus has quit (Ping timeout: 248 seconds). 21:56:24 atrapado: Since i starts at 1, the loop executes (in-1) times, rather than in as it would if it started at 0. 21:56:26 Vorpal: because it's <*> for ZipList 21:56:40 oerjan, I see. Not sure why it would be called zap still 21:56:42 ok 21:56:46 atrapado: The while (in != out) thing is just a trick: out starts as 0, so if in == 0, then the whole thing is skipped. If it's not, then we know that at the end of the inner loop, out = in - 1. 21:56:47 So out != in. 21:56:57 So it's equivalent to if (in != 0). 21:57:02 ah 21:57:07 more clear to me 21:57:16 good 21:57:50 (Disclaimer: Writing code like this is bad for your health.) 21:58:04 Vorpal: because (<*>) = ap 21:58:09 yes, it is itself obfuscated 21:58:14 oerjan, oh, right 21:58:31 Vorpal: APply 21:58:58 :t app 21:58:59 forall (a :: * -> * -> *) b c. (ArrowApply a) => a (a b c, b) c 21:59:43 :t app loop 21:59:44 Couldn't match expected type a (b, d) (c, d) -> a b c' 21:59:44 against inferred type (b1 -> c1, b1)' 21:59:45 Expected type: (a (b, d) (c, d) -> a b c) -> t 21:59:47 :t loop app 21:59:48 forall (a :: * -> * -> *) d c. (ArrowApply a, ArrowLoop a) => a (a d (c, d)) c 21:59:56 oerjan: :D 22:00:08 > loop app (\x -> (42, x)) 22:00:09 42 22:00:12 > loop app (\x -> (42, 1+x)) 22:00:13 42 22:00:18 > loop app (\x -> (x, 1:x)) 22:00:19 [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,... 22:00:23 > loop app (\x -> (2:x, 1:x)) 22:00:23 [2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,... 22:00:26 that's awesome 22:00:33 you get control over the final value, sort of 22:00:49 > fix.interleave$cycle[1,0] 22:00:51 [1,1,0,1,1,0,0,1,1,1,0,0,1,0,0,1,1,1,0,1,1,0,0,0,1,1,0,0,1,0,0,1,1,1,0,1,1,... 22:00:52 :t loop 22:00:53 forall (a :: * -> * -> *) b d c. (ArrowLoop a) => a (b, d) (c, d) -> a b c 22:00:56 oh 22:00:57 :t app 22:00:58 forall (a :: * -> * -> *) b c. (ArrowApply a) => a (a b c, b) c 22:00:58 oerjan: well that was easy :P 22:01:01 oerjan: and elegant 22:01:07 (haven't really used arrows) 22:01:23 :t loop arr 22:01:24 Couldn't match expected type (b, d)' 22:01:24 against inferred type b1 -> c' 22:01:24 Expected type: (b, d) -> (c1, d) 22:01:26 aww 22:01:29 :t arr loop 22:01:30 forall (a :: * -> * -> *) b d c (a1 :: * -> * -> *). (ArrowLoop a, Arrow a1) => a1 (a (b, d) (c, d)) (a b c) 22:01:42 :t arr app 22:01:43 forall b c (a :: * -> * -> *). (Arrow a) => a (b -> c, b) c 22:01:47 heh 22:01:48 :t app 22:01:49 forall (a :: * -> * -> *) b c. (ArrowApply a) => a (a b c, b) c 22:01:52 right 22:02:01 elliott: once i remembered interleave, yeah 22:02:22 :t arr 22:02:23 forall b c (a :: * -> * -> *). (Arrow a) => (b -> c) -> a b c 22:02:33 elliott, what are arrows for? 22:02:45 :t loop 22:02:46 forall (a :: * -> * -> *) b d c. (ArrowLoop a) => a (b, d) (c, d) -> a b c 22:02:50 (apart from pointing people and shooting them) 22:03:27 Vorpal: arrows 22:03:34 they're like monads, except not, and more static 22:03:35 elliott, yes, what are they used for 22:03:39 ah 22:03:40 things 22:03:43 they're not very nice 22:03:55 oerjan: do i have to build the self-avoiding sequence :( 22:03:56 elliott, so why does haskell have them? 22:04:00 if they are not very nice 22:04:44 they're like monads, except not, and more static 22:04:52 I never did get arrows. 22:05:34 I don't like much the Arrow class in Haskell so I made up my own class; there is two classes, one is the functor from one category to another, the other one is the other four things in the Arrow class. 22:06:11 Vorpal: Well, they're not *all* that unnice. 22:06:11 And you can also change to use a different type other than (,) type. Which makes ArrowChoice not needed since instead, it is the arrow for the dual category. 22:06:24 elliott, right. So why should someone use them? 22:06:46 If they want to. Or if someone else already did and they have to live with it. 22:07:05 elliott, so there is really nothing they are better at than, for example, monads? 22:07:31 They are different things! 22:07:39 Vorpal: There are arrows that are not (or should not be) monads. 22:07:44 ah okay 22:08:02 so that is the "except not" bit then 22:08:18 :t loop 22:08:19 forall (a :: * -> * -> *) b d c. (ArrowLoop a) => a (b, d) (c, d) -> a b c 22:09:14 oerjan: I TAKE IT THAT'S A YES 22:09:16 well, night → 22:09:16 But, if the category is the Kleisli category of some monad of (->) then it should make the monad. And, also coKleisli categories to make comonad 22:09:41 > (init &&& last) . take 2 [False,False,True,True] 22:09:42 Couldn't match expected type [a]' 22:09:42 against inferred type GHC.Bool.... 22:09:45 > (init &&& last) . take 3 $[False,False,True,True] 22:09:47 ([False,False],True) 22:10:58 > map ((init &&& last) . take 3) . inits$ [False,False,True,True] 22:10:59 [(*Exception: Prelude.init: empty list 22:11:02 o_O 22:11:02 oh 22:11:11 > map ((init &&& last) . take 3) . tails $[False,False,True,True] 22:11:12 [([False,False],True),([False,True],True),([True],True),([],True),(*Excepti... 22:11:39 > map (init &&& last) . takeWhile ((==3).length) . map (take 3) . tails$ [False,False,True,True] 22:11:40 [([False,False],True),([False,True],True)] 22:11:50 oerjan: SEE I'VE LIKE HALF WRITTEN IT FOR YOU ALREADY 22:11:58 elliott: i just cannot find much elegance in repeatedly building markov models. 22:12:12 oerjan: the idea was to come up with a more elegant expression of it than that :P 22:12:16 :t M.takeListWith 22:12:17 Couldn't find qualified module. 22:12:21 :t M.fromListWith 22:12:22 forall a k. (Ord k) => (a -> a -> a) -> [(k, a)] -> M.Map k a 22:12:54 -!- yiyus has joined. 22:13:38 oerjan: ok how about chaitin's omega :P 22:13:43 -!- MSleep has changed nick to MDude. 22:13:45 -!- Vorpal has quit (Ping timeout: 244 seconds). 22:13:53 should be a breeze 22:14:48 > iterate (id++map not . reverse) [False] 22:14:50 [[False],[False,True],[False,True,False,True],[False,True,False,True,False,... 22:14:56 WELL THAT'S NOT ANY FUN 22:15:09 > iterate (\xs -> interleave xs (map not (reverse xs))) [False] 22:15:10 [[False],[False,True],[False,False,True,True],[False,False,False,False,True... 22:15:14 sheesh 22:15:17 > iterate (\xs -> interleave xs (map not xs)) [False] 22:15:18 [[False],[False,True],[False,True,True,False],[False,True,True,False,True,F... 22:15:22 I GIVE UP 22:16:09 > show<=>=(!!)[[1],[0,1]]) 22:16:12 mueval-core: Time limit exceeded 22:16:16 argh 22:16:18 oh 22:16:31 > fix$(0:).tail.(>>=(!!)[[1],[0,1]]) 22:16:34 mueval-core: Time limit exceeded 22:16:41 hm something is wrong 22:16:50 the tail consumes too much? 22:16:57 oh hm 22:16:58 for production 22:17:00 maybe 22:17:05 you might need more starter elements 22:17:05 > fix$(0:).(>>=(!!)[[1],[0,1]]) 22:17:07 [0,1,0,1,1,0,1,0,1,1,0,1,1,0,1,0,1,1,0,1,0,1,1,0,1,1,0,1,0,1,1,0,1,1,0,1,0,... 22:17:22 > show<=>=(!!)[[1],[0,1]]) 22:17:24 "01011010110110101101011011010110110101101011011010110101101101011011010110... 22:17:52 that's a fairly general substitution sequence 22:17:55 which one is that? 22:18:21 fibonacci, unless i swapped the order 22:19:18 ah 22:19:55 04:50:34 makeDef text = [d|helloDefinition = $(litE . stringL$ text)|] 22:19:59 Sgeo: = $text i think 22:20:18 05:10:44 * Sgeo has no idea if GHC is smart enough 22:20:19 GHC is not allowed to turn a non-terminating program into a terminating one without printing <>. 22:20:40 > show<=>=(!!)[[0,1],[0]]) --seems this is canonical according to http://en.wikipedia.org/wiki/Fibonacci_word 22:20:41 "00101001001010010100100101001001010010100100101001010010010100100101001010... 22:20:56 oh wait hm 22:21:02 elliott, uh, what was the context of the smart enough comment? 22:21:05 so i just had this cool idea.. using mouse scrollwheel+some button to change window focus 22:21:08 Sgeo: length xs< x 22:21:09 > show<=>=(!!)[[0,1],[0]]) --seems this is canonical according to http://en.wikipedia.org/wiki/Fibonacci_word 22:21:11 "01001010010010100101001001010010010100101001001010010100100101001001010010... 22:21:17 that form needs tail 22:21:21 itidus21: you can scroll on the taskbar in gnome 2 at least 22:21:23 i used to do that a lot 22:21:25 to switch windows 22:21:30 Because the context that I'm thinking of is just an optimization, not ... oh, you only saw part of the context 22:21:36 Sgeo: i saw all context 22:21:41 i think 22:22:22 elliott: it occured to me on having 2 horizontally overlapping windows that the minimum distance to swap focus between them is the distance of the overlap 22:22:34 if you use clicking on it to change focus 22:22:36 Even the bit where I'm making my own Num that will let me write my own length that length xs < x terminates even for infinite xs? 22:23:37 Sgeo: "my own Num" 22:23:38 aka 22:23:41 the lazy peano numbers 22:23:43 the oldest thing ever 22:24:07 This is a bit more general than that, although I don't see any use cases that this covers that lazy peanos don't. 22:24:12 also, that if there is one window hidden behind another window then the minimum distance to change focus by clicking is moving to the minimize button, and then moving to the hidden window 22:24:37 clearly noone measures these vectors 22:24:57 at least not on windows :P 22:25:10 itidus21: fitts' law may interest you 22:25:19 Sgeo: how's it more general 22:26:10 -!- atrapado has quit (Quit: FIN). 22:26:11 > show<=>=(!!)[[1,0],[0]]) 22:26:12 "01001010010010100101001001010010010100101001001010010100100101001001010010... 22:26:15 -!- Patashu has joined. 22:26:26 Um, not sure how to describe it, but it's an infinite list of maybe upper and lower bounds 22:27:03 So I can represent a number that I know is "less than x" and then that x keeps decreasing as I calculate 22:27:07 Erm 22:27:29 ah it seems my first try is called the rabbit sequence 22:28:48 Sgeo: i'd like to see the code 22:29:05 Num instance is still being worked on 22:29:18 yup someone told me about it once.. i forget exactly what it is 22:29:26 http://hpaste.org/56271 22:29:33 but i do remember that the edge of the screen is more comfortable to scroll against 22:29:50 something to do with the size of the mouse target 22:29:53 logsearch function array indexing 22:29:56 ​/home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: logsearch: not found 22:30:04 searchlog function array indexing 22:30:06 and the edge of the screen is effectively an infinitely deep target 22:30:08 itidus21: yep 22:30:37 No output. 22:30:49 searchlog php index 22:31:03 2006-08-24.txt:22:24:26: http://www.codu.org/plof/index.php?title=LongWords 22:31:09 poor searchlog is ahead of its time 22:31:21 or whatever the term is 22:31:24 I do plan on factoring out the hard to read stuff in the Num instance 22:32:24 Sgeo: You could probably simplify it by realising that those Maybes are basically encoding a + -inf and a + inf. 22:32:30 Write appropriate instances, etc. 22:33:55 I'm pretty sure Num, Ord does not have -inf or +inf. I mean, RealFloat or Floating or something probably does, but I don't 22:34:04 What the fuck are you talking about? 22:34:04 erm, want to restrict myself like that 22:34:25 data WithNegInf a = NegInf | NotNegInf a deriving (Eq) 22:34:32 instance (Num a) => Num (WithNegInf a) 22:34:41 Similarly for NegInf; write appropriate Ord instances. 22:34:55 Change the thing to [(WithNegInf a, WithPosInf a)] 22:36:15 Brainfuck with only balanced loops is *proven* sub-Turing-complete. <-- not with unbounded cells 22:36:37 oerjan: Hmm, really? 22:36:46 Oh, of course. 22:36:51 oerjan: Don't worry, we later prove it TC. 22:37:01 With BCT. 22:37:18 heh 22:38:59 my 3-cell construction has balanced loops, of course (i couldn't _find_ any way to usefully use non-balanced ones) 22:40:32 oerjan: you might notice something interesting about http://esoteric.voxelperfect.net/wiki/Special:Recentchanges today 22:40:50 * oerjan makes a guess before visiting 22:41:47 alas, no, there's still a little spam 22:42:32 are my eyes malfunctioning? i dont see dozens of spam entries 22:42:50 oerjan: still a _little_ 22:42:52 but vastly decreased 22:43:01 no itidus21, your eyes are fully operational. 22:48:40 rawSetCaption :: Maybe String -> Maybe String -> IO () 22:48:47 Sets the window title and icon name. Use Nothing to unset. 22:48:52 I don't really understand the purpose of this 22:48:58 what is different about "" and Nothing here? 22:50:00 presumably the system can distinguish them 22:50:01 elliott: i don't see a proof for SumaMoito-Z1, but it seems obviously capable of handling my 3-cell balanced loops 22:50:11 a window with no title is not a window with an empty title 22:50:25 perhaps 22:50:32 oerjan: well it's easy to translate -z2 to -z1 22:50:38 oerjan: just replace a- with 22:50:39 it also has: 22:50:46 setCaption :: String -> String -> IO () 22:50:53 Sets the window title and icon name. 22:50:53 er hm 22:50:56 no it's not quite easy 22:50:58 but all you need is a copy 22:51:05 kallisti: for simplicity, presumably 22:51:06 The same difference with "" and NULL for SDL_WM_SetCaption is my guess. :p 22:51:13 elliott: yes that's what I would think. 22:51:27 OMG Darths & Droids is onto A New Hope. 22:52:42 fizzie: but wouldn't setting the caption to an empty string have the same basic effect as unsetting it? 22:52:47 or is there a minute difference? 22:52:57 I think, it should be designed (although I don't know how it actually works), "" for SDL set caption should make the caption blank and NULL to make it show the filename 22:53:16 oh I see 22:53:21 NULL could use some kind of default or something. 22:53:24 kallisti: you're confusing visual display for semantics 22:53:36 window with no title rendered same way as window with empty title =/= same thing 22:53:37 consider 22:53:40$ list-windows 22:53:44 495345: (no caption) 22:53:46 495345: caption: "" 22:53:51 elliott: yes I'm asking what those semantics are... indirectly 22:53:54 I do that a lot. 22:53:56 depends on the system 22:54:03 but there's one example 22:54:12 OK, it could do that but there is different system such as Windows, UNIX, and Macintosh. 22:58:31 05:24:44 when . not ? 22:58:32 Sgeo: unless 22:58:56 05:31:17 erus: There's an instance Error e => Monad (Either e) 22:58:56 WROOONG! You're not in here so I can't yell at you but WROOOONG!!!! 23:00:50 06:03:00 > let f a = const in f 1 2 23:00:51 06:03:00 Overlapping instances for GHC.Show.Show (b -> t) 23:00:51 06:03:01 arising from a use of ... 23:00:51 06:03:59 Which is a function, which doesn't have a Show instance 23:00:55 Sgeo: Yes it does. In fact, it has too many. 23:01:40 They need to implement instance disambiguation!! 23:02:26 08:00:04 Hmm 23:02:26 08:00:08 What is State# ? 23:02:28 Sgeo: Nothing. 23:02:37 Sgeo: State# s is 0 bits big. 23:02:39 It does not exist. 23:03:11 Sgeo: The reason IO uses it is so that GHC can't reorder IO expressions. 23:03:18 The (->) being used is the impure function arrow. 23:03:27 The State# is just used to introduce a fake evaluation dependency between computations. 23:03:57 08:11:40 What would happen if I did try to do something like weird a = IO \s -> (s, a) 23:04:00 Sgeo: With (##), that's return. 23:04:53 wait, so now we're shouting at #haskell from afar? 23:05:55 kmc: Yes! 23:06:01 kmc: You can't get banned that way. 23:06:07 Also, you don't even have to *be* in #haskell. 23:06:07 watching sgeo doing something stupid over there and shouting in his ear which is conveniently right here 23:06:21 monqy: Better: He did it in THE PAST! 23:11:30 10:00:17 i would like to plunge into haskell. i come from a c++/c/python background. can anyone suggest a strong text or set of lectures online that will give me a good foundation? 23:11:31 10:00:24 @where lyah 23:11:31 10:00:24 http://www.learnyouahaskell.com/ 23:11:31 10:01:13 koeien:thanks! if i keep at this, would i be able to gain employment where haskell is used? 23:11:31 10:01:22 at that site, i meant 23:11:33 10:01:27 sorry for being ambiguois 23:11:36 I... I don't understand... 23:11:50 Oh, I misread. 23:13:11 good channel 23:14:08 inteq is fighting an uphill battle 23:14:28 i don't envy him 23:19:26 -!- nooga has quit (Ping timeout: 252 seconds). 23:19:37 10:45:04 Sgeo : i think this is an interesting idea -- i saw some hand-written notes somewhere on the web about making such a lazy improving intervals type 23:19:41 Sgeo: likely referring to http://conal.net/blog/posts/exact-numeric-integration 23:19:54 Sgeo: which happens to do basically exactly what i proposed :) 23:20:04 sort of 23:20:22 see also http://www.reddit.com/r/haskell/comments/ajbso/conal_elliott_exact_numeric_integration/c0i391y 23:20:44 itidus21: ah but the view on the top is glorious 23:23:04 > [0..]>>- \_->cycle[1,0] 23:23:06 [1,1,0,1,1,0,0,1,1,1,0,0,1,0,0,1,1,1,0,1,1,0,0,0,1,1,0,0,1,0,0,1,1,1,0,1,1,... 23:23:56 * oerjan cackles evilly 23:24:08 oerjan: what is a good concise definition of "problem" in the computational sense 23:24:29 oerjan: lovely 23:24:40 > [0..]>>-cycle[1,0] 23:24:41 Couldn't match expected type t -> [b]' 23:24:42 against inferred type [t1]' 23:24:47 * elliott was hoping for function Num instance 23:25:03 > iterate(group>=>show.length++take 1)"1" 23:25:07 mueval-core: Time limit exceeded 23:25:11 > iterate(group>=>show.length++take 1)"1" 23:25:12 can't find file: L.hs 23:25:14 ... 23:25:15 ... 23:25:16 > iterate(group>=>show.length++take 1)"1" 23:25:19 ["1","11","21","1211","111221","312211","13112221","1113213211","3113121113... 23:25:21 * elliott has now committed that to memory 23:26:05 > iterate(group>=>show.length++take 1)"a" 23:26:07 ["a","1a","111a","311a","13211a","111312211a","31131122211a","1321132132211... 23:26:10 quintopia: a decision problem is simply the same thing as a language, mathematically 23:26:10 * Madoka-Kaname hides 23:26:14 -!- Jafet has joined. 23:26:19 > iterate(group>=>show.length++take 1)"0" 23:26:21 ["0","10","1110","3110","132110","1113122110","311311222110","1321132132211... 23:26:48 more general types of problems need their own definitions. 23:27:01 > head $drop 300$ iterate(group>=>show.length++take 1)"1" 23:27:02 "13211321322113311213212312311211131122211213211331121321123123211231131122... 23:27:25 Somehow that doesn't seem right 23:27:44 Madoka-Kaname: why not? 23:27:53 Eh. 23:27:54 Never mind 23:28:29 > iterate(group>=>show.length++take 1)"" 23:28:30 ["","","","","","","","","","","","","","","","","","","","","","","","",""... 23:28:34 > iterate(group>=>show.length++take 1)"hi" 23:28:36 ["hi","1h1i","111h111i","311h311i","13211h13211i","111312211h111312211i","3... 23:28:46 > iterate(group>=>show.length++take 1)$repeat 1 23:28:47 No instance for (GHC.Num.Num GHC.Types.Char) 23:28:47 arising from the literal 1... 23:28:53 > iterate(group>=>show.length++take 1)$repeat '1' 23:28:55 ["1111111111111111111111111111111111111111111111111111111111111111111111111... 23:28:58 > tail.iterate(group>=>show.length++take 1)$repeat '1' 23:29:00 Terminated 23:29:02 aww 23:29:39 > tail.iterate(group>=>show.length++take 1).concatMap show$[1..] 23:29:41 ["1112131415161718191110311211131114111511161117111811191210121132131214121... 23:29:45 > tail.tail.iterate(group>=>show.length++take 1).concatMap show$[1..] 23:29:46 ["3112111311141115111611171118111931101321123113311431153116311731183119111... 23:29:48 > tail.tail.tail.iterate(group>=>show.length++take 1).concatMap show$[1..] 23:29:50 ["1321123113311431153116311731183119132110111312211213212321141321151321161... 23:29:55 oerjan: pls explain patterns kthx 23:30:19 its simple really 23:30:40 oerjan: a language over the set of all possible mathematical symbols? 23:30:40 1,111,311,13211,111312211 23:31:02 i mean like, duh 23:31:13 am I a possible mathematical symbol 23:31:14 are you 23:31:33 > head $drop 300$ iterate(group>=>show.length++take 1)"22" 23:31:35 "22" 23:31:46 oh well the first step is just interleaving 1 everywhere 23:31:53 except, no 23:31:56 since digits can repeat there 23:31:57 interesting 23:31:59 > iterate(group>=>show.length++take 1)"4444" 23:32:00 ["4444","44","24","1214","11121114","31123114","132112132114","111312211211... 23:32:11 > iterate(group>=>show.length++take 1)"2222222222" 23:32:12 monqy: i'm gonna go with no not really 23:32:13 ["2222222222","102","111012","31101112","1321103112","1113122110132112","31... 23:32:23 > iterate(group>=>show.length++take 1)"222222222" 23:32:24 monqy: i think its okay to define a symbol as a specific string of other symbols. so, yes, if you can produce an axiomatic description of us 23:32:25 ["222222222","92","1912","11191112","31193112","132119132112","111312211911... 23:33:09 quintopia: a language over some arbitrary (finite) alphabet 23:33:13 log information is 23:33:21 2009-08-01.txt:15:08:18: because only that information is of the form to transmit itself into the future 23:34:46 elliott: all digits > 3 eventually become isolated from each other. then it devolves into conway's atoms, which behave as a substitution rule. 23:34:55 oerjan: but to mathematicians, the alphabet is not arbitrary, is it? there is a conventional set of symbols? 23:35:15 oerjan: yeah, i was just hoping somehow infinitely extending it would make it interesting :P 23:35:21 it was a wild delusion! 23:35:52 log [i]nformation is 23:35:57 Breaking news, look'n'say isn't turing complete 23:35:59 2010-01-10.txt:13:49:25: does anyone know if information is transferred faster by reading or by listening. Assume a skilled reader and native speaker. 23:36:45 searchlog itidus philisoph 23:36:53 2012-01-08.txt:23:36:45: searchlog itidus philisoph 23:36:58 oop 23:37:03 searchlog itidus philosoph 23:37:12 2011-08-14.txt:07:15:58: i don't have philosophical dilemmas about whether the opcodes of a rom are being emulated in a uniform way 23:37:20 wow 23:37:24 Wow indeed. 23:37:43 i cant even remember what that is supposed to mean 23:38:15 Fun fact: the person who invented coffee chocolates should be shot. 23:38:16 searchlog itidus philosoph 23:38:17 probably referring to NES emulation 23:38:23 2012-01-07.txt:12:36:21: fizzie: i don't understand why philosophy + retro gaming + symbols is so interesting 23:38:33 quintopia: this is for theoretical purposes, so you only _need_ two symbols, such as 0 or 1. otherwise, mathematicians will use whatever they fancy. 23:39:49 probably digits or letters from latin or greek alphabet, unless there's some reason to use something else (such as the problem coming from another part of math which uses specific symbols) 23:40:35 that was in reference to the vic20 chess video 23:41:58 also, that ever-popular "letter with number subscript" 23:42:41 when you don't really _care_ what the actual letters are, so you just make them indexed variables. 23:42:55 and the number may itself be a variable. 23:42:58 searchlog itidus21 information 23:43:06 2012-01-06.txt:15:43:38: but.. in any normal human's life, the history of video games is useless information :D 23:43:13 searchlog itidus philosoph 23:43:23 2011-11-26.txt:05:10:20: i love nothing more than to philosophize about these things 23:43:51 i was once compared to a markov 23:44:42 did it trigger an existential crisis 23:45:29 searchlog itidus existential 23:45:38 2011-09-17.txt:08:13:16: all im saying is when i stagger into my brothers room laying down having a whiskey from him while my body is shaking.. which all seems caused by existential pondering 23:46:10 OMFG 23:46:11 OK 23:46:12 stop 23:46:14 everything 23:46:16 i have worked 23:46:17 out 23:46:23 23:46:24 23:46:24 how to drag 23:46:27 on my touchpad 23:46:34 im stopinge 23:46:41 Phantom_Hoover: how does it, work 23:46:41 stop stop 23:46:41 this 23:46:43 omg 23:46:49 does it work by 23:46:50 buying a mouse 23:46:53 no 23:46:56 it works 23:47:00 does it work by drageing 23:47:14 by double clicking and then not taking your finger up on the second click 23:47:24 there 23:47:28 there is no limit 23:47:36 for so long i have asked myself 23:47:43 how do i drag without using the mouse buttons 23:47:48 now i know 23:47:50 dude 23:47:52 how did you not like 23:47:53 realise that earlier 23:48:20 Because who clicks and then immediately drags?? 23:49:12 Phantom_Hoover: It doesn't actually send a click. 23:49:31 Yes, that also. 23:49:41 What doesn't? 23:50:36 monqy: i know how to resolve this.. i will upload a random .txt file of mine and you will need a lot of help 23:50:44 13:59:00 roconnor: There's a Control.Monad.Error which provides a Monad instance for some Either's; and a fixed Monad class with a proper Either instance in the split of category-extras. 23:50:46 NO STOP YOU'RE SO WRONG! 23:50:56 shachaf: WHY DOES NOBODY REALISE THAT EITHER'S FAIL IS ERROR THESE DAYS 23:51:00 Phantom_Hoover: OK, divmod is quite tricky. <-- oh dear, this is pikhq's bfm/pebbles all over again :P 23:51:07 oerjan: heh howso 23:51:14 elliott: Hey, I was only half-paying attention in that conversation. 23:51:16 i guess it's similar-looking 23:51:22 shachaf: DMWIT HAS SAID IT _TWICE_ IN THIS LOG, TWICE!!! 23:51:25 * elliott cries. 23:51:27 Wait. 23:51:28 I didn't even realise they were talking about MonadError until a long time later. 23:51:28 Wait no. 23:51:32 I want him to be ignorant. 23:51:36 It means more SO questions for me to answer. 23:51:42 "How come Either's fail isn't working?" 23:51:44 SO many more questions. 23:51:50 Yes. 23:51:55 Delicious karma. 23:52:10 You should take Joel Spolsky hostage and demand a billion karma points. 23:52:22 14:02:51 > let { x :: Integer; x = fromIntegral (maxBound :: Int) } in x * x -- values of type Integer can be arbitrarily large. 23:52:22 14:02:52 85070591730234615847396907784232501249 23:52:27 Everyone knows 85070591730234615847396907784232501249 is the biggest number. 23:52:34 WHY DOES NOBODY REALISE THIS CHANGES EVERYTHING 23:52:41 elliott: because pikhq basically implemented all of that stuff by compiling into balanced brainfuck. 23:52:45 Phantom_Hoover: It only changes you being dumb to being slightly less dumb. 23:52:47 Phantom_Hoover: Just wait until you hear what happens when you TRIPLE-CLICK. 23:52:48 oerjan: heh 23:53:02 a few pieces of this are cut and pasted. most sadly.. is my original work. http://hpaste.org/56275 .. this is like concentrated essence of searchlog itidus philosoph 23:53:34 14:06:37 dmwit: anyhow It seems I shoudn't rely on fail to return Left 23:53:35 14:06:47 dmwit: so I should probably use ErrorT rather than Either? 23:53:35 14:07:27 roconnor: I doubt that behavior will change any time soon. It's relied on by many pieces of code other than yours. =P 23:53:42 shachaf: I think he's going for irony. 23:54:31 Why am I consuming 85% dark chocolate? 23:54:35 I don't like dark chocolate. 23:54:42 Then don't. 23:54:57 Whoa. 23:55:00 You can do that? 23:55:21 No. 23:55:22 Continue. 23:55:23 oerjan: diophantine equations are not decidable over N. therefore, such problems are not in PSPACE. therefore, they cannot be written in such a way that the tarski-kuratowski algorithm can be used on them. anything wrong with this logic? 23:55:41 14:21:43 Making fail part of MonadZero rather than Monad seems more reasonable than the current situation. 23:55:52 * shachaf prepares for rebuke. 23:55:58 shachaf: You should really have proposed the mzero :: (forall a. a) -> m a solution. 23:56:04 quintopia: probably not, but i lost you at tarski-kuratowski. 23:56:08 elliott: Ew. 23:56:15 Actually, "mzero :: a -> m b" would work per parametricity, I think. 23:56:22 shachaf: Come on, it's so brilliant. 23:56:24 That solution is a horrible joke. 23:56:38 shachaf: Well... yes, but is it really worse than taking a String which /changes based on column number/? 23:56:51 oerjan: its the one that places problems on the arithmetic hierarchy 23:57:01 shachaf: I mean, at least the idea of stuffing meaningful information into _|_ and extracting it in a safe place is well-covered. 23:57:45 Hmm. I guess that's a point. 23:58:11 The <- pattern-match failure thing is actually observable in the program, isn't it. 23:58:14 That's kind of horrible. 23:58:15 http://wiki.rpg.net/index.php/Worst_RPGs_ever 23:58:15 Yep. 23:58:23 Actually shouldn't it be exists a. a or something? 23:58:31 shachaf: AKA a. 23:58:35 Right. 23:58:36 shachaf: The problem is that you always want it to be _|_. 23:58:41 (forall a. a) forces that. 23:58:51 Yes, but who cares if it's not? 23:58:56 Racial Holy War (RaHoWa) 23:58:57 Well, true. 23:58:57 The PCs play “White Warriors”, fighting against the classic 'enemies' of racist groups: blacks, Jews, latrinos (the game uses that term), and basically everyone outside of the “Aryan ideal” 23:58:58 shachaf: Anyway, I mean, the _|_ message is obseravble in the program too, but only in the sin-bin. 23:59:08 elliott: I don't want my program to *depend* on _|_ existing. 23:59:16 elliott: Right, but that's different. 23:59:19 And that seems reasonable, since you can layer on error handling with it. 23:59:23 Right. 23:59:38 Also, either you typed very quickly or you're making use of the copy-paste-bin. 23:59:50 I cache lines with ctrl-x sometimes. 23:59:53 But I type very quickly too.