00:00:20 one is that v qvqa'g erpbtavmr gur dhrel fgevat ohvyqvat nf hafnsr vzzrqvngryl 00:01:00 and also v unq gb cbxr nebhaq va fdyvgr qbpf gb svaq bhg ubj gb rssrpgviryl nqq ebjf gb n fryrpg, pbagebyyvat bayl gur cneg bs gur dhrel v qvq 00:01:08 Maybe I should switch back to urxvt, which has built-in rot13. 00:01:13 it does?? 00:01:21 Ctrl-right-click 00:01:28 At least my installation does. Maybe it's a script that comes with it. 00:01:40 jesus 00:01:42 that's ridiculous 00:02:30 `run echo urxvt | tr a-z n-za-m 00:02:33 hekig 00:02:51 vad hekigt 00:02:53 ^rot13 shachaf@carbon 00:02:53 funpuns@pneoba 00:03:18 ^rot13 hydrogen helium lithium beryllium boron 00:03:18 ulqebtra uryvhz yvguvhz orelyyvhz obeba 00:03:51 shachaf: your name rot13s to funpuns? seriously? 00:04:02 ^rot13 nitrogen oxygen fluorine neon 00:04:02 avgebtra bkltra syhbevar arba 00:04:10 shachaf: that is amazing 00:04:24 ^rot13 kmc oerjan 00:04:24 xzp brewna 00:04:32 ^rot13 keegan 00:04:32 xrrtna 00:04:51 furrfu 00:04:55 ^rot13 ørjan 00:04:55 øewna 00:05:01 kmc: Oh, you didn't know? 00:05:07 no 00:05:15 is this why you like puns so much 00:05:33 Maybe it's my name because my mother likes puns so much. 00:05:40 Apparently I suck at understanding hints 00:06:00 (She was very pleased when I pointed it out, maybe 13 years later.) 00:06:11 Sgeo: What was your hint? 00:06:50 ^rot13 Filip 00:06:50 Svyvc 00:10:54 kmc: A lot of these puzzles are tricky to exploit, but things that would've never come up when writing the code in the first place, or reviewing someone else's code. 00:11:48 Mostly because the whole thing is flawed in a lot of ways -- just most of them happen not to be exploitable. 00:12:46 I'm scared that I may end up writing that sort of code 00:12:53 I guess that doesn't apply to all of them. 00:15:09 shachaf: I don't really agree 00:15:26 well, i agree that the examples are a bit contrived 00:15:49 but they are holes you see in real programs, and things you would want to look for in review 00:16:08 Right. 00:16:33 I guess what annoys me is the idea of reviewing exclusively for security holes, rather than other design issues. 00:16:43 But of course the latter can be a much bigger change. 00:17:02 well, other design issues are outside the scope of this challenge :) 00:17:08 maybe i'm missing the context of your complaint 00:17:49 having lots of other issues makes it a more realistic challenge 00:18:31 That's true. 00:19:01 and i think there is value in reviewing just for security holes 00:19:07 having a separate person thinking about that all the time 00:19:24 Sure. 00:19:29 with the caveat that they should be allowed to say "i don't see a hole in your code, but it's so poorly designed that i deem it insecure anyway' 00:19:44 but this should be a higher bar than merely ugly code 00:20:19 it's difficult as a reviewer to find that middle ground of "i would do this a different way, and i find your way gross, but i won't make you redo it" 00:21:29 Maybe I just mean that I'd rather have a challenge where there's some security hole but the puzzles still seem like "good code". 00:21:42 yeah 00:21:47 Even though that might be less realistic. :-) 00:21:53 well i don't think the code in this set is too bad 00:22:20 except for the PHP levels, because they are written in PHP 00:22:34 Can anyone write good code in PHP, kmc? 00:22:52 http://underhanded.xcott.com/ Related 00:22:55 """Do not tell me that “good developers can write good code in any language”, or bad developers blah blah. That doesn’t mean anything. A good carpenter can drive in a nail with either a rock or a hammer, but how many carpenters do you see bashing stuff with rocks? Part of what makes a good developer is the ability to choose the tools that work best.""" 00:23:01 FreeFull: yeah, i like that thing 00:23:11 i have plans to run an updated and more free-form version of it 00:23:45 Can God create a programming language so terrible that even God can't write good code in it? 00:23:51 (And is Rasmus Lerdorf God?) 00:24:02 * Sgeo wants eve and mallory's secrets 00:24:13 Sgeo: They are available. 00:24:19 If you can get bob's secret you can get them. 00:24:20 shachaf: that would explain a lot 00:24:23 dinner, bbl 00:24:30 shachaf, working on it 00:25:13 shachaf: A programming language that doesn't allow you to write any code would fulfill that purpose 00:25:43 FreeFull: You don't think there's such a thing as "code so bad it doesn't even compile"? 00:26:44 shachaf: With this language, no code compiles 00:27:06 Exactly. 00:27:10 Oh. 00:27:23 * shachaf got it backwards. 00:28:23 Well, brainfuck will compile anything 00:28:33 -!- oerjan has quit (Quit: Ok]). 00:30:53 I would think that yes God can create a programming language so terrible that even God can't write good code in it. 00:33:02 And yes one way is one that no code is valid. 00:42:29 -!- kinoSi has quit (Read error: Connection reset by peer). 00:42:31 -!- TeruFSX has joined. 00:42:57 -!- kinoSi has joined. 00:46:27 PHP 00:47:15 Argh 00:51:00 Ok, kmc went afk 00:51:04 no wonder he's not helping me 00:51:58 There's one blatantly obvious flaw in this code, and it's taunting me with my inability to abuse it 00:53:25 Just realized I have other things I really need to do 01:14:49 -!- DHeadshot has joined. 01:22:50 -!- DHeadshot has quit (Read error: Connection reset by peer). 01:57:22 -!- pikhq has joined. 01:57:59 -!- pikhq_ has quit (Ping timeout: 260 seconds). 01:58:07 Sgeo: Why are you unable to abuse it? 01:58:39 shachaf, well, it only allows one SQL statement, but kmc gave me a hint about that, but right now working on something more important 01:59:01 Surely you mean FDY statement! 02:00:59 -_- 02:07:25 Is a monad always covariant in its argument? 02:07:49 Oh, I guess it would have to be since you can write fmap. 02:11:13 -!- Tod-Autojoined has joined. 02:12:09 -!- vxhex has joined. 02:13:15 i think that's more correctly stated as "Is Monad covariant in its argument?" 02:13:41 Is it? I mean "are instances of Monad covariant in their argument". 02:13:46 -!- TodPunk has quit (Ping timeout: 244 seconds). 02:13:48 For example, Reader is covariant in its argument. 02:13:57 -!- TodPunk has joined. 02:14:08 what do you mean? 02:14:31 do you mean (Reader t)? 02:14:42 Er, yes. 02:14:53 Sorry. (Reader t) is the instance of Monad, though. 02:14:56 i don't know what "covariant" means in Haskell in general 02:15:03 the usual meaning relates to subtyping, which Haskell lacks 02:15:11 but a "covariant functor" is a particular kind of thing 02:15:22 and every Monad is a covariant functor, yes 02:15:30 it's the usual sort of functor captured by the Functor class 02:15:36 Right. 02:15:42 and yeah, i think your phrasing is more correct 02:15:50 -!- Tod-Autojoined has quit (Ping timeout: 256 seconds). 02:15:50 don't know what mine would mean -_- 02:16:08 I think saying that a type is covariant in a means that a only appears only to the left of an even number of ->s 02:16:48 If you look at -> as the branch of a tree, that is. 02:17:03 So "a" is covariant in "a", and so is ((a -> r) -> r) 02:17:24 -!- copumpkin has changed nick to dishonestbob. 02:17:25 But not (a -> r) 02:17:45 oh, so you're asking whether the implementation of every monad (the RHS of data Foo t = ...) must satisfy this? 02:18:04 -!- Tod-Autojoined has joined. 02:18:18 -!- dishonestbob has changed nick to copumpkin. 02:18:46 Right. 02:19:07 -!- TodPunk has quit (Ping timeout: 240 seconds). 02:19:17 And I think it does, and any covariant functor (i.e. Functor) must satisfy it in general. 02:19:28 -!- Tod-Autojoined has quit (Client Quit). 02:19:44 Whereas a contravariant functor (i.e. Contravariant) must satisfy the reverse. 02:27:10 edwardk says that for newtype Search f a = Search { optimum :: f a -> a }, instance Contravariant f => Monad (Search f) 02:27:39 And that this is a fun exercise to prove, or something. 02:27:58 it's not too hard to write, iirc 02:28:01 djinn can probably do it 02:28:17 @djinn-add newtype Search f a = Search (f a -> a) 02:28:17 Cannot parse command 02:28:21 @djinn-add data Search f a = Search (f a -> a) 02:29:00 @djinn ((a -> b) -> f b -> f a) -> (c -> d) -> Search f c -> Search f d 02:29:00 Error: kind error: (KVar 5,KVar 2) 02:29:19 @djinn ((a -> b) -> f b -> f a) -> (c -> d) -> (f c -> c) -> f d -> d 02:29:19 -- f cannot be realized. 02:29:36 Oh, I already wrote this, actually. 02:30:07 @djinn ((a -> b) -> f b -> f a) -> a -> (f a -> a) -> a 02:30:07 f _ a _ = a 02:30:25 @djinn ((a -> b) -> f b -> f a) -> a -> f a -> a 02:30:25 f _ a _ = a 02:30:32 Hmm. 02:30:48 @djinn ((a -> b) -> f b -> f a) -> (f (f a -> a) -> a) -> f a -> a 02:30:48 -- f cannot be realized. 02:30:56 Oops, c and d. 02:31:03 @djinn ((a -> b) -> f b -> f a) -> (f (f c -> c) -> c) -> f c -> c 02:31:03 -- f cannot be realized. 02:31:42 @djinn-add class Covariant f where contramap :: (a -> b) -> f b -> f a 02:31:47 Ah, djinn supports classes. 02:31:59 @djinn Contravariant f => (f (f c -> c) -> c) -> f c -> c 02:31:59 Error: Class not found: Contravariant 02:32:04 * shachaf sighs. 02:32:08 @djinn Covariant f => (f (f c -> c) -> c) -> f c -> c 02:32:09 -- f cannot be realized. 02:32:15 * shachaf stops djinnspamming. 02:35:55 -!- TodPunk has joined. 02:37:56 we found a level where shachaf and i have completely different solutions :) 02:38:01 -!- vxhex has left. 02:38:06 and probably mine is an unintended hole :) 02:46:11 kmc: They were talking in the CTF channel earlier about fixing some unintended holes. Maybe yours was one of them. 02:46:25 The Functor class is only for endofunctors of (->) category. 02:46:39 I would try to find out but I think I got my level 6 into an unusable state. 02:47:25 do you know which unintended holes? 02:48:26 No -- the channel was mostly (a) people asking for spoilers, (b) people giving spoilers, and (c) people talking about when the servers that went down will be back up. 02:48:47 I only cared about (c) so I tried to avoid reading spoilers about other levels. 02:48:53 That newtype Search f a = Search { optimum :: f a -> a } I have also called Algebra (as a F-algebra is). I also think that if f is Predicate you get the "infinite search" monad that someone else described, and I think also (CodensityAsk Predicate) is also the same, too! 02:52:14 zzo38: No, it's not an algebra when f is contravariant. 02:52:35 shachaf: Well, yes, you are correct; nevertheless it is what I called that type. 02:53:05 "infinite search" is where it gets its name, though, yes. 02:53:08 Contravariant functor would be a functor from (->) category to its opposite, or vice versa. Therefore it is a functor and follows the same laws as a functor because it is a functor. Actually, there are other things can you can simply say, this must be a functor, etc 02:53:23 I don't know whether (CodensityAsk Predicate) is also the same, too as well. But it's possible. 02:53:42 shachaf: I think I have once proven that it is the same, by the Yoneda lemma. 02:53:55 I don't know what CodensityAsk is. 02:54:33 newtype CodensityAsk f x = CodensityAsk { runCodensityAsk :: forall z. f z -> (x -> z) -> z }; 02:54:57 It is always a Monad. If f is Comonad then (CodensityAsk) is also a MonadPlus. 02:55:09 It is always a Monad. If f is Comonad then (CodensityAsk f) is also a MonadPlus. 02:55:54 There is also CodensityAskT which every "z" in that definition would be "m z" instead 02:56:41 OH GOD I HATE MYSELF THIS CODE WHICH IS GOING TO BE IN PRODUCTION USE HAS SEVERAL FUNCTIONS THAT ARE IDENTICAL EXCEPT FOR THE NAME I SHOULD REFACTOR IT BUT I PROBABLY WON'T 02:57:21 Sgeo: Yes you should refactor it, and then if it need multiple name, then depending on the programming language you can do something about that (such as, in C, you can define a macro) 02:58:02 You can define macros in C/C++! 02:59:41 -!- centrinia has joined. 03:01:25 I sometimes make those kind of mistake too, but then usually try to fix it 03:01:41 I'm basically abusing function names to act as a dispatch mechanism 03:01:50 Since I thought these functions might greatly vary 03:01:55 And one or two do 03:01:58 But the rest are the same 03:02:17 How would they act as a dispatch mechanism, and what programming language is it? 03:04:07 Tcl 03:04:29 I call a function named partially by a variable 03:04:34 As in, checkfeed-$method 03:04:45 And then checkfeed-etag, for example, is one function 03:05:23 Does Tcl have first-class functions? If so, can you assign them as same using an assignment? 03:09:29 I wouldn't call them first-class as such 03:10:05 But you can call a function whose name you only know at runtime quite comfortably, and you do have anonymous functions, although require a funcall-like command to use them 03:17:26 I can't help wondering if CLOS functionality would come in very useful here 03:22:30 "recreational substances" is a great category if you take it to mean more than just drugs 03:23:01 drugs, propane, helium, pudding, spray paint, lube 03:24:16 Those are even recreational chemicals! 03:24:37 The big problem with refactoring is I don't get to touch the code that often 03:24:50 I mean I do, but there's not often reason to work on it unless I'm adding a feature 03:25:04 And deployment is annoying, becuase it consists of giving the code to the person actually running it 03:26:11 i don't think pudding is a chemical 03:26:34 -!- Nisstyre has quit (Quit: Leaving). 03:26:54 True. 03:27:15 -!- Nisstyre_ has joined. 03:27:22 spray paint is pretty complicated too 03:27:31 Easiest thing to do would be to make the dispatcher check for the existence of the function it would call, and if it doesn't exist, call a default one 03:27:55 "dispatcher"? I just call that program "diff". 03:28:10 (Or maybe that's patch -R.) 03:28:20 whoa, dude, I haven't used patch in years! 03:28:31 Version control has taken over the world. 03:28:41 i still use patch a lot 03:29:07 For what? 03:29:09 like when i'm preparing a markdown document, but i want some custom tweaks to the generated html 03:29:31 That sounds like an unreliable system. 03:29:51 yeah but it doesn't have to work 100% automatically every time 03:30:36 I was thinking in particular of "applying other people's patches to things". 03:30:43 Or "releasing patches". 03:31:38 WEB can automatically apply changes from an external file. 03:34:36 shachaf, I did that once or twice 03:34:47 Or, well, used diff 03:37:23 I'm in AceHack http://patch-tag.com/r/ais523/acehack/snapshot/current/content/raw/doc/fixes36.0 03:37:44 Hmm, http://blog.sigfpe.com/2006/10/monads-field-guide.html are nice pictures. 03:39:20 monochrom says: seq is a suggestion. pseq is an order. 03:49:26 random question: what does Muller brainfuck do if you go past the cell limit? 03:55:34 i miss monochrom's puns :/ 03:55:47 @quote monochrom 03:55:47 monochrom says: most people tend to deny the usefulness of useful alternative perspectives --- their entrenched vested interests demand it. as they grow older they also have more influence and power 03:55:48 over "the state of the art" to preserve their self-fulfilling prophecy that "the alternative is useless" --- by controlling what practice looks like, they can control what looks useless. 03:56:38 * shachaf suspects that's not a pun. 03:56:40 @quote monochrom 03:56:41 monochrom says: isTrue = (unsafeCoerce :: Either a b -> Bool) . (unsafeCoerce :: Maybe c -> Either a b) . (unsafeCoerce :: Bool -> Maybe c) 03:57:32 @quote monochrom 03:57:33 monochrom says: All pointless debates can be settled by going polymorphic. 03:57:40 Would that work for any types in place of Either a b and Maybe c? 03:58:03 Presumably. 03:58:04 @quote monochrom 03:58:05 monochrom says: Welcome to #haskell, where @remember's are in majestic stereo! 03:58:36 And does it actually have to maybe type with type? As in, it becomes a Maybe c and then the thing accepts a Maybe c, do those have to match? 03:58:53 Or can it just be Bool in one end and out the other, regardless of whether the types in between fit? 03:59:13 The types definitely have to match. 03:59:39 unsafeCoerce :: A -> B is a real function that only accepts a value of type A and only returns a value of type B 04:00:03 It just happens to have a dubious implementation. 04:03:06 -!- Phantom_Hoover has quit (Read error: Connection reset by peer). 04:05:36 unsafeCoerce :: a -> b 04:06:07 Type variables start with lower case letters. 04:06:10 Yes, but once you explicitly give its signature as (Int -> Char), it'll be :: Int -> Char 04:06:18 Which is what I meant by A and B. 04:06:43 unsafeCoerce :: IO a -> a 04:15:08 -!- MoALTz has joined. 04:23:49 Are Canadian $1 coins made of plastic? 04:24:19 You tell me. 04:40:37 I don't know. That is why I ask. 04:44:13 But you're in Canada! 04:44:16 You can check! 04:44:30 Light Table looks interesting 04:45:47 I cannot tell if it is plastic or just a different kind of metal. I do not currently have one of the new $1 coins, and when I did, I did not know. Someone told me it is plastic although I am unsure, and he told me later, he is also unsure. 04:48:24 -!- MoALTz has quit (Ping timeout: 276 seconds). 04:51:57 lem_lemma :: (Not a -> b) -> (a -> b) -> b 04:54:24 did you do that shachaf 04:54:30 Do what? 04:54:38 It's just the church encoding of lem. 04:54:49 invite lambda into lw 04:55:10 In a manner of speaking. 04:55:35 Law of excluded middle does not apply in intuitionistic logic, though. 05:02:07 -!- SimonRC has quit (*.net *.split). 05:18:51 I said I proved that (CodensityAsk Predicate) is actually the same as the infinite search monad; actually, I have only proven that the type is equivalent, not that the monad is equivalent. However, it seems to be equivalent monad from testing it. 05:20:09 kmc: You should make a CTF! 05:21:11 -!- quintopia has quit (Ping timeout: 252 seconds). 05:21:49 -!- quintopia has joined. 05:25:24 Maybe that church encoding of lem can be made using (Kleisli (Cont r)) instead of (->) category? You will already have Peirce's law (callCC). 05:26:05 Yes, in Haskell you would use Cont. 05:26:17 I just want to avoid all the syntactic nonsense that comes with it. 05:34:17 -!- impomatic has joined. 05:38:38 -!- copumpkin has changed nick to yeasayer. 05:39:03 -!- yeasayer has changed nick to copumpkin. 05:58:56 -!- asiekierka has joined. 06:05:18 -!- copumpkin has changed nick to AgentOfChaos. 06:07:52 -!- AgentOfChaos has changed nick to copumpkin. 06:31:24 -!- Tod-Autojoined has joined. 06:31:41 -!- TodPunk has quit (Read error: Connection reset by peer). 06:32:45 -!- epicmonkey has joined. 06:41:03 -!- Phantom_Hoover has joined. 06:41:07 I don't like Clojure's ->, especially since there's a nice reader macro for lambda 06:41:29 It should be easy to write an actual function -> that threads a value through the rest of the arguments as functions 07:04:35 > map ($2) [(+) 1, (*) 3] 07:04:36 [3,6] 07:08:55 &(map #(% 2) [(partial + 1) (partial * 3)]) 07:08:55 ⇒ (3 6) 07:09:32 -!- zzo38 has quit (Remote host closed the connection). 07:13:21 -!- epicmonkey has quit (Ping timeout: 245 seconds). 07:14:15 -!- SimonRC has joined. 07:31:59 -!- asiekierka has quit (Remote host closed the connection). 07:40:07 -!- nooga has joined. 08:04:38 -!- nooga has quit (Ping timeout: 240 seconds). 08:15:53 -!- copumpkin has quit (Ping timeout: 260 seconds). 08:16:27 -!- copumpkin has joined. 08:19:18 -!- AnotherTest has joined. 08:28:17 -!- epicmonkey has joined. 08:34:18 -!- atriq has joined. 08:40:43 Can anyone link me that XKCD with the guy talking to the guy on the phone 08:40:50 The first guy isn't on the phone 08:41:03 TWIST: The second guy isn't on the phone either 08:41:11 Then who was phone? 08:41:13 (As they say.) 08:42:09 hello yes this is dog 08:43:36 hello dog, are you after human rights? 08:43:57 phon 08:45:29 Phone me a phoneme. 08:46:29 I 08:46:31 wow 08:46:43 TV Tropes now has an interstitial on all outbound links. 08:47:06 Warning people of the dangers of the internet? 08:47:09 They're the moral police afterall 08:47:36 I think they just want people like me to stay trapped 08:47:46 Outbound links are my way out of there 08:55:04 -!- oerjan has joined. 08:58:17 -!- DHeadshot has joined. 09:03:57 I just realised that the only reason I'm smiling is because the alternative is crying 09:04:01 :) 09:04:12 * oerjan grins madly 09:04:37 * oerjan fails 09:04:54 * oerjan chews another piece of bread 09:08:12 -!- sirdancealot has quit (Read error: Connection reset by peer). 09:09:50 I... 09:10:14 You... 09:10:14 I think the best thing to do right now is try to get 100% on Avalancha on Medium on Guitar Hero 3 09:12:39 -!- sivoais has quit (Ping timeout: 265 seconds). 09:13:56 -!- heroux has joined. 09:21:41 -!- knott_rays has joined. 09:21:51 -!- knott_rays has left. 09:28:40 -!- nooga has joined. 09:37:40 -!- sivoais has joined. 09:43:47 Well, I'm feeling a bit better now 09:47:01 A bit shaky, though 09:55:56 -!- atriq has quit (Ping timeout: 252 seconds). 10:25:16 -!- ineiros has quit (Remote host closed the connection). 10:25:37 -!- ineiros has joined. 10:28:48 -!- derdon has joined. 10:28:53 -!- itidus20 has left ("Leaving"). 10:36:22 -!- nooga has quit (Read error: Connection reset by peer). 10:42:05 -!- atriq has joined. 10:45:48 -!- impomatic has quit (Quit: http://RetroProgramming.com). 10:56:51 ion: Why is your nick "ion"? 10:57:05 shachaf: Why not? 10:57:25 Opportunity cost. 11:34:36 -!- MoALTz has joined. 11:50:34 "These are no _ordinary_ subterranean mecha-narwhals!" 11:51:20 -!- AnotherTest has quit (Read error: Connection reset by peer). 11:53:14 -!- AnotherTest has joined. 11:55:44 oerjan, :) 11:56:16 I'm going to think outloud here for a bit, if that's okay with everyone? 11:56:35 The intellectual and cultural ancestors of Homestuck: 11:57:04 " The let special form is used here for efficiency in the event that the first parameter, number, is passed as an expression instead of a simple value." 11:57:35 Yes. Efficiency is totally the reason you want something to evaluate only once in an impure language. 11:57:35 The most obvious is Problem Sleuth, Andrew Hussie's previous work, which had elements of choose-your-own-adventure/interactive fiction and film noir. 11:58:08 Problem Sleuth also has many references to Jail Break, another of Andrew Hussie's works. Jail Break is just silly. 11:58:14 (to be expanded upon) 11:58:55 While there are few if any Bard Quest references in Problem Sleuth, there are a handful in Homestuck, for instance Gamzee's god tier outfit. 12:00:00 Within Homestuck, there are references to Arthurian mythology, especially that Dave Strider encountered Caledfwlch, the Welsh name for Excalibur 12:00:31 There are also Lord of the Rings references, such as Strider possessing a broken sword 12:01:09 Lord of the Rings was influenced by Norse mythology 12:01:47 And Old English (Anglo-Saxon) stories 12:02:37 There are references to the Gospels, such as Jake kissing the head of Dirk, and "Being the Salome to [his] John the Baptist" 12:03:09 Other elements of Abrahamic mythology are touched upon 12:03:12 -!- mig22 has joined. 12:03:47 Such as the Angels being feared creatures, as they were throughout the Bible 12:04:00 Graeco-Roman mythology is referenced especially with the Denizens 12:04:18 For instance, Dave's denizen is Hephaestus, who was a Greek god 12:04:54 The works of Oscar Wilde, Mark Twain, Shakespeare, Snoop Dogg, and many others are referenced 12:13:29 :t (0$0<$>) 12:13:30 The operator `<$>' [infixl 4] of a section 12:13:30 must have lower precedence than that of the operand, 12:13:30 namely `$' [infixr 0] 12:16:27 :t print <$> readInt <$> getLine 12:16:28 Overlapping instances for Show 12:16:28 ((Char -> Bool) -> (Char -> Int) -> ReadS String) 12:16:28 arising from a use of `print' at :1:0-4 12:16:45 * oerjan swats lambdabot -----### 12:17:13 Why would you print <$> readInt <$> getLine? 12:17:26 beats me http://www.reddit.com/r/haskell/comments/ypyx4/why_does_print_readint_getline_return_an_ioio/ 12:18:13 Hmm, so if my program compiles but doesn't work, I just need to put join $ in front of it? 12:18:39 i can see why it is _wrong_, but my housemate is playing music so loudly i cannot get my brain to infer why it _does_ type 12:19:15 @ty readInt 12:19:15 (and it looks to me like the comments use the wrong associativity for <$>) 12:19:16 forall a. (Num a) => a -> (Char -> Bool) -> (Char -> Int) -> String -> [(a, String)] 12:19:27 I don't think that's the readInt you're thinking of. 12:19:37 oh duh 12:19:41 grmbl 12:19:44 @ty read <$> getLine 12:19:45 forall a. (Read a) => IO a 12:19:45 Oh god I've hit that issue before 12:19:48 @ty print <$> read <$> getLine 12:19:49 IO (IO ()) 12:19:52 See? 12:20:05 :t let readInt = read :: String -> Int in print <$> readInt <$> getLine 12:20:06 IO (IO ()) 12:20:13 (print :: a -> IO () in this case.) 12:20:15 Therefore, Haskell's type system should be taken out and shot. 12:20:17 So you get iO (IO ()) 12:20:39 Of course, join (print <$> x) == x >>= print 12:20:53 ok that makes sense, the first <$> just becomes . 12:20:57 It lets through wrong programs! This is a travesty! 12:21:05 oerjan: No, it doesn't need to. 12:21:16 YES IT DOES 12:21:18 <$> is infixr 12:21:28 shachaf: um i just checked it's not 12:21:36 Oh, right. 12:21:40 But if it was it would still work! 12:21:50 quite possibly 12:21:51 <$> IS SO ASSOCIATIVE, IT ASSOCIATES ACROSS DIFFERENT TYPES! 12:21:53 (It's true.) 12:22:09 oh it does tend to do that 12:22:14 (x <$> y) <$> z == x <$> (y <$> z), when both type-check. 12:22:19 Even if it's different instances of <$> 12:22:23 Of Functor 12:26:13 -!- oerjan has quit (Quit: MUST... ESCAPE). 12:37:41 -!- kmc_ has joined. 12:42:32 -!- centrinia has quit (*.net *.split). 12:42:32 -!- ion has quit (*.net *.split). 12:42:32 -!- kmc has quit (*.net *.split). 12:48:19 -!- ion has joined. 12:49:12 -!- centrinia has joined. 12:52:52 -!- mtve has quit (*.net *.split). 12:52:59 -!- mtve has joined. 13:07:18 -!- boily has joined. 13:31:38 -!- epicmonkey has quit (Ping timeout: 244 seconds). 13:43:58 -!- mig22 has quit (Quit: mig22). 13:47:31 Dear god Leeds is far south 13:50:52 Far out, man. 13:52:55 Halifax is about halfway between me and ais523 13:56:51 -!- monqy has quit (Quit: hello). 13:58:19 -!- copumpkin has quit (Quit: Computer has gone to sleep.). 14:00:53 halifax, as in nova scotia's halifax? 14:03:15 As in the Halifax that's about halfway between Birmingham and Hexham 14:03:31 Yorkshire, I think 14:04:33 :/ 14:05:53 -!- Tod-Autojoined has quit (Quit: This is me, signing off. Probably rebooting or something.). 14:06:03 That Halifax is about halfway between me and somewhere off the west coast of Mexico 14:06:04 -!- TodPunk has joined. 14:06:07 God, I'm far north 14:06:26 Actually, I'm not that far North, it's just California 14:08:07 if someone was double the distance that separates me from halifax, in the same direction, he'd be a little bit on the damp side. 14:20:34 -!- copumpkin has joined. 14:26:11 -!- nortti has changed nick to []{}\|-_`^. 14:26:20 -!- []{}\|-_`^ has changed nick to []{}|\-_`^. 14:26:42 -!- []{}|\-_`^ has changed nick to nortti. 14:35:42 Why is my num lock button flashing 14:35:45 WHAT COULD THIS MEAN 14:36:33 kernel panic 14:37:32 Wouldn't a kernel panic stop IRC from working? 14:37:53 yes 14:38:04 Probably not a kernel panic, then? 14:38:12 yeah 14:38:17 what os? 14:38:57 pernel kanic 14:39:00 -!- kmc_ has changed nick to kmc. 14:39:11 Ubuntu 14:39:17 ok. 14:39:28 there is your problem 14:40:04 I think my problem is the cable that snapped when the right hinge for the screen broke 14:40:58 :t (>>=) :: [a] -> (a -> [a]) -> [a] 14:40:59 forall a. [a] -> (a -> [a]) -> [a] 14:41:10 :t concatMap 14:41:11 forall a b. (a -> [b]) -> [a] -> [b] 14:41:26 :t concatMap `asTypeOf` (=<<) 14:41:27 forall a b. (a -> [b]) -> [a] -> [b] 14:41:41 Wait 14:41:46 Long story short, I'm having trouble explaining mapcat to someone in #clojure 14:41:51 Although they're now saying they get it 14:42:05 It maps then squishes? 14:42:16 -!- cheater has joined. 14:42:21 I don't know Clojure, though, so I couldn't say 14:42:54 -!- kinoSi has quit (Read error: Connection reset by peer). 14:43:20 mapcat is concatMap 14:43:21 -!- kinoSi has joined. 14:44:08 Okay, it turns out Numlock is actually switching on and off again repeatedly 14:45:12 644444464646464646464646464464646464646464664 14:45:23 why? 14:45:30 I don't know! 14:45:39 -!- boily has quit (Quit: Poulet!). 14:48:16 -!- Zuu has joined. 14:58:51 -!- soundnfury has quit (Quit: quIRC). 14:59:15 -!- soundnfury has joined. 15:01:08 :t (<*>) 15:01:09 forall (f :: * -> *) a b. (Applicative f) => f (a -> b) -> f a -> f b 15:01:14 -!- Gregor has quit (Excess Flood). 15:01:21 -!- Gregor has joined. 15:02:00 -!- DHeadshot has quit (Ping timeout: 276 seconds). 15:04:27 I present the most spurious patch ever: http://pcc.ludd.ltu.se/jira/browse/PCC-401 15:29:57 -!- atriq has quit (Ping timeout: 276 seconds). 15:30:13 -!- heroux has quit (Ping timeout: 252 seconds). 15:37:53 -!- heroux has joined. 15:56:27 -!- ogrom has joined. 16:15:06 -!- copumpkin has changed nick to ThreeFixt. 16:15:44 Gregor: :) 16:16:21 -!- ThreeFixt has changed nick to copumpkin. 16:22:46 -!- atriq has joined. 16:43:03 Rich Hickey appears to be convinced that allowing uncoordinated reads is a good idea. For some reason, that bothers me. 16:43:25 Uncoordinated read? 16:44:04 -!- ogrom has quit (Quit: begone). 16:44:05 Reading STM refs outside of a transaction, for instance. 16:45:26 Okay 16:45:38 I've never done any STMy type things 16:47:06 how does that differ from reading a STM ref in a transaction which consists only of that operation? 16:49:23 kmc, I guess it doesn't particularly, except that requiring the transaction might... discourage idiots from doing it that way? 16:49:29 I guess you're right 16:49:29 The fact that requiring it to be in an STM makes you think. 16:49:31 -!- ogrom has joined. 16:49:58 Also in principle there could be architectures where transactional memory is distinct from general memory, but that's unlikely. 16:58:41 In Clojure, println is available in dosync 16:58:50 "that would be a lot of overhead when it's generally not needed" 16:58:58 (about defining println with io!) 16:59:18 -!- atriq has quit (Ping timeout: 244 seconds). 17:12:51 -!- atriq has joined. 17:43:58 -!- variable has quit (Read error: Connection reset by peer). 18:00:43 -!- variable has joined. 18:03:33 -!- Vorpal has joined. 18:04:23 -!- atriq has quit (Read error: Connection reset by peer). 18:11:53 blargh 18:16:05 hi 18:20:19 -!- atriq has joined. 18:22:09 -!- ais523 has joined. 18:25:58 appelsiinit kerkiän 18:27:37 That's good. 18:28:38 what does appelsiinit päähän mean? 18:29:00 -!- zzo38 has joined. 18:29:05 "Oranges to the head". 18:29:19 Head being the body part. 18:29:55 Like, "hatut päähän" could be "put on your hats". 18:30:10 It sounds like the same thing except for oranges. 18:30:32 google translate translates päähän as "from the" 18:30:59 I suppose it would be appelsiini X päähän or something, to mean oranges from the X? 18:32:36 "päähän" is the illative ("into", in most cases) case of pää 'head'. 18:33:25 -!- ogrom has quit (Quit: begone). 18:37:02 At least primarily. There's a different -han/-hän suffix (illative is -an/-en/etc., just changes a bit to work with "pää") it could also be, but I'm not exactly sure how that'd translate. It wouldn't fit in after the oranges, anyway. 18:37:03 Pää can also mean “side”, as in “this side of the room”. 18:37:26 http://en.wiktionary.org/wiki/-han that one. 18:37:54 Yes, I guess. Or I'd say more like "end" as in "this end of the room". 18:38:26 Indeed 18:39:40 :0g,:93+`#@_1+ 18:41:13 does anyone know what difference there is between properly ejecting and just yanking out an usb stick with write cache disabled, and no open files, under windows 7? I know there is one (long story, can tell it if you want), but I don't know what it is. 18:42:07 the universe implodes if you remove usb devices without completing the wizard 18:42:18 olsner, what wizard? 18:42:27 the eject devices wizard? 18:42:47 olsner, eh, no need for that thing on windows 7, you can just right click the device in explorer and select eject 18:43:51 olsner, anyway there is a difference, in one case the embedded controller we use at work accepts it to load the code from, in the other it doesn't. 18:43:52 FreeFull: "Output character on row 0, column corresponding to top of stack; if TOS > 12, stop; otherwise increment by 1 and continue"? 18:44:16 Quine, then? 18:45:24 A random quine from the web 18:45:57 It's very reasonable, though I suppose a purist would say a g-quine is just boring. 18:46:17 fizzie, huh? 18:46:28 FreeFull: Huh? 18:46:39 Uh, I mean, Vorpal: Huh? 18:46:49 (Huh.) 18:46:55 g? 18:47:05 Goedel? 18:47:06 FreeFull: One that uses 'g'. 18:47:09 fizzie, why would a g-quine be boring? 18:47:10 Oh 18:47:35 Vorpal: "Too easy," I believe is the reasoning. 18:47:45 Since it can just read the source. 18:47:59 -!- AnotherTest has quit (Quit: Leaving.). 18:48:21 fizzie, ah 18:48:29 Not that the "-based ones are really any unboringer, I suppose. 18:48:52 I have to yet write a quine 18:49:44 hmm, I had an interesting idea related to quines a while ago, but I can't remember what it was 18:50:59 olsner: If you still have a binary of your idea, and it's related to quines enough, maybe running it will recover the original idea. 18:51:11 no, the idea was only in my head 18:51:32 olsner: Was it a program that prints a program in another language, that prints the original program? 18:51:53 it shouldn't have been because I've read about programs like that before 18:52:07 Yeah, they're pretty cool 18:52:49 Ruby → Python → Perl → Lua → OCaml → Haskell → C → Java → Brainfuck → Whitespace → Unlambda 18:52:53 And then back to Ruby 18:54:32 once the program has managed to get out of ruby, why would it want to get back? 18:54:52 I don't know 18:55:22 To escape Unlambda? 18:56:04 FreeFull, do you have a link to that quine? 18:59:06 http://d.hatena.ne.jp/ku-ma-me/20090916/p1 18:59:52 heh 19:01:29 It's surprisingly short 19:03:55 wc -c says 1945 bytes 19:05:09 I don't have ruby, ocaml or lua installed, so meh 19:05:24 nor do I have a whitespace interpreter 19:06:10 Ruby 1.9 seems to error on it 19:06:24 ouch 19:23:30 -!- Slereah has joined. 19:24:04 -!- oerjan has joined. 19:24:49 butts 19:24:53 butts 19:25:23 we all empathize with your tourette's, kmc 19:25:34 I don't 19:25:46 except olsner 19:26:00 that's because he's swedish 19:26:10 is that code supposed to have yen symbols all over 19:26:15 or is this some character encoding fuckery 19:26:22 oh, that could be backslashes 19:26:34 yeah they are actually backslashes 19:26:41 in fact when i copy-paste one it's a backslash, wtf 19:26:50 -!- Slereah_ has quit (Ping timeout: 252 seconds). 19:27:03 i've heard about that japanese encoding quirk before 19:27:05 -!- Slereah_ has joined. 19:27:20 I think they assigned characters just before backslash became the second most useful character in ascii 19:27:22 or something like that 19:27:53 well backslash _is_ one of characters that was commonly nationalized 19:27:56 -!- Slereah has quit (Ping timeout: 245 seconds). 19:28:03 [|]{\} afair 19:28:22 i think \ was used for Ø in norway 19:28:28 us stages coup in iran in response to nationalizing backslash 19:28:52 the infamous backslash backlash 19:29:04 kmc: i see you've nationalized backslash to mean oil 19:29:35 $ echo '[|]{\}' | iconv -f iso646-no 19:29:35 ÆøÅæØå 19:30:29 int main() æ printf("Hei, verden!Øn"); å 19:30:37 XD 19:30:39 interesting! iso646-se gives ÄöÅäÖå 19:31:11 olsner: which means they used consistent encodings rather than going by each alphabet's order 19:31:20 so that's like from the 7-bit days? 19:31:23 yeah 19:31:37 yep, ISO 646 is the international standard for ASCII and its variants 19:32:05 UTF-.875 19:32:33 kmc: Are there any interesting theorems in plain typed-lambda-calculus Curry-Howard? 19:32:49 callcc not included. 19:33:15 this is also why [\] are considered to be upper-case versions of {|} by some IRCds 19:33:32 because they are ÄÖÅ and äöå respectively in iso646-fi 19:33:51 olsner: :) 19:35:06 shachaf: simply typed lambda calculus is equivalent to intuitionistic propositional logic restricted to -> afaik. 19:35:20 oerjan: Right. 19:35:40 a theorem _about_ it is that it is PSPACE-complete to check propositions for theoremhood 19:36:04 (unlike NP-completeness for boolean logic) 19:36:59 -!- derdon has quit (Remote host closed the connection). 19:38:41 I was wondering if it would make a good puzzle game on its own if expressed in the right way. 19:38:47 But then I couldn't think of many interesting puzzles. 19:39:01 it should be on the level of sokoban, by complexity alone 19:39:32 shachaf: did you see http://logitext.mit.edu/main 19:39:41 You can make puzzles that are a lot of work to solve, but I'm wondering if you can make ones that are interesting. 19:40:09 Polymorphism and rank-n types and so on can be permitted if they make it more interesting. 19:40:13 kmc: Nope. 19:41:25 polymorphism means at least hindley-milner, so doubly exponential time iirc 19:41:35 Oh, that's ezyang's thing. 19:41:45 He may have mentioned it before. 19:41:52 it was reddited 19:42:01 I missed that. 19:55:30 I find that sort of proof with turnstiles and \frac{...}{...} pretty hard to read. 19:56:27 -!- Phantom_Hoover has quit (Ping timeout: 276 seconds). 19:59:57 -!- Vorpal has quit (Ping timeout: 240 seconds). 20:00:59 shachaf: made a comment out of our earlier discussion http://www.reddit.com/r/haskell/comments/ypyx4/why_does_print_readint_getline_return_an_ioio/c5y85z4?context=1 20:01:26 We had a discussion? 20:01:34 a brief one :P 20:01:38 Oh, yes. 20:01:55 Something tells me that in C++, allocating sizeof(SomeClass) bytes and then casting the result to SomeClass* is a bad way of creating an object. 20:02:24 it doesn't create an object; the constructor doesn't get called 20:02:28 but you can use placement new for that 20:03:16 I like it. 20:04:08 SomeClass *x = malloc(sizeof(SomeClass)); new (x) SomeClass(); 20:04:21 allocating and casting is a bad way, but it's not illegal or anything 20:04:41 Huh, i don’t think i’ve ever seen that syntax. 20:04:54 i think it's undefined behavior, unless the object is Plain Old Data 20:05:11 Placement new is undefined behavior? 20:05:19 using an object without calling the constructor 20:05:27 Oh. 20:05:29 Makes sense. 20:05:44 even if there's no explicit constructor code, there might be other stuff that needs to happen behind the scenes 20:05:53 for example an object with virtual methods will likely need a vtable pointer 20:06:04 right, I meant with placement-new to call the constructor, otherwise you're obviously getting uninitialized bytes anyway 20:06:42 even if you're okay with all the explicitly named data fields being uninitialized, it's still undefined behavior 20:06:49 Is it valid to cast it in one place and then use placement new in another place? 20:07:14 probably, but not 100% sure 20:07:31 SomeClass *x = malloc(...); doesn't compile, by the way (I think). 20:07:40 oh, right, not in C++ 20:08:06 ion: Do you know the syntax "foo.template bar()"? 20:08:25 ion: http://www.parashift.com/c++-faq/placement-new.html 20:09:25 void Foo::reset() { this->~Foo(); new (this) Foo(); } 20:10:04 eww, destroying this and then constructing a new object in the same place 20:10:21 -!- Phantom_Hoover has joined. 20:10:51 I'm beginning to wonder why, exactly, I'm using malloc() for objects at all... 20:11:56 it's not a thing to do for no particular reason 20:12:10 shachaf: Nope 20:12:15 if you want to do that safely you can implement new to call malloc instead 20:12:26 otoh, most likely that's exactly the implementation you already have 20:12:56 I'm declaring a class representing a header. I'm then allocating enough memory to hold the header and some additional data, then creating the header, and putting a pointer to the additional data in the header. 20:12:59 what's even more fun is that you can overload "operator new" 20:13:13 The only benefit to this is that the header and the data are next to each other. 20:13:18 so that within "new (x) SomeClass()", x could be an object rather than a raw pointer 20:13:23 such an object can implement a memory pool 20:13:26 http://www.parashift.com/c++-faq/memory-pools.html 20:13:44 I think you can also overload new in SomeClass such that new SomeClass does that 20:13:52 And I don't think it's at al important that the header and the data be next to each other. The computer doesn't care too much. 20:14:09 since there is no placement delete, overriding placement new is limitedly useful 20:14:47 Placement delete... 20:14:58 Remove a specific object from a specific location? 20:15:39 well, delete-with-custom-arguments is more what I meant 20:15:40 olsner: no, it lets you implement memory pools, and overloading "operator delete" plays an important role in that 20:15:53 the link i just gave explains how 20:16:06 you can define a delete operator with arguments, but afaik it's impossible to call it 20:16:42 olsner: Presumably you can use the regular delete operator, since you know where the pool is. 20:19:13 sure, if you're willing to waste a pointer for each allocation you can store the Pool* there and override global delete 20:20:45 the thing is, you can define and use a hundred news each with different frobs and wobnickles, but you don't really know which of them are known by delete foo 20:22:40 kmc: Did you see http://byorgey.wordpress.com/2012/08/24/unordered-tuples-and-type-algebra/ ? 20:22:52 (I don't remember if you were involved in the discussion about that a while ago.) 20:23:02 There. Now I'm doing this the non-stupid way instead of the stupid way. 20:23:21 Instead of allocating the whole thing at once and using placement new, I'm just using malloc() on the individual pieces individually. 20:23:25 overrides of "placement delete" *look* like they'll do the right thing, but they only actually get called when constructors throw 20:24:38 shachaf: no 20:28:27 -!- Nisstyre has joined. 20:40:41 -!- copumpkin has quit (Quit: Computer has gone to sleep.). 20:55:13 So, now we've got a simple object system. 20:55:23 There is one object, called Class, of type Class. 20:56:36 a very classy system 20:57:10 I guess classes ought to have superclasses. Class's superclass will probably be Object. Object's class can also be Class, and Object's superclass can also be Object. 20:57:31 will there be a method? 20:57:44 Then again, metaclasses are pretty much mandatory. 20:57:50 There will be methods at some point. 20:58:29 we need a classless society 21:02:49 we need an assless society 21:03:58 we need a lassless society 21:06:45 We need a lossless society. 21:07:01 The extra bandwidth and disk space required would be worth the increase in reliability. 21:16:07 JathObject*& JathClassObject::superclass() {return strongPtrs[SUPERCLASS];} 21:16:20 I can't shake the feeling that I'm doing something horribly wrong. 21:19:30 j_Class_class->_class = j_Class; 21:19:33 "Class" is no longer a word. 21:19:42 i wrote a program to figure out when the wait at the Registry of Motor Vehicles will be shortest 21:21:40 kmc: now investigate what will happen if _everyone_ uses such a program. 21:22:25 -!- atriq has quit (Remote host closed the connection). 21:28:52 Presumably, it would not increase or decrease the speed at which people are served, so it would probably make everyone's wait time the same. 21:29:22 Except that it would eliminate times at which there are no customers. 21:29:40 Okay, so we've got objects, which have classes; and classes, which are objects and have superclasses. 21:30:13 well most people have constraints on when they can go 21:30:36 True. 21:31:20 kmc: How does it figure that out? 21:36:00 the RMV lists wait times on their website 21:36:15 updated every minute or so 21:36:29 and indeed it's available in an extremely scrapeable AJAXy format at http://www.massdot.state.ma.us/DesktopModules/BranchMapDNN/GetWaitTimes.aspx?Town=Boston 21:41:10 there is bike share all over Cambridge now 21:44:43 How does that work? 21:45:15 which? 21:45:43 Bike share. 21:45:55 http://www.thehubway.com/ 21:46:01 same as most city bike share programs 21:46:11 they have stations around the city with electronically-locking bike racks 21:46:46 you pay for a subscription (1 day, 3 days, or 1 year), which gives you the right to check out a bike for 30 minutes for free 21:46:49 Hmm, they had something similar in Tel Aviv when I was most recently there. 21:46:53 (you can return it to a different station than the one where you got it) 21:47:00 you pay more if you want more than 30 min 21:47:19 the bikes are kinda crap though 21:47:28 also they have no solution for helmets 21:47:36 Yep. 21:48:30 (I ended up using the thing in Tel Aviv.) 21:48:53 i could actually use this, since my bike is broken at the moment 21:48:53 That was my experience. 21:49:20 what was your experience? 21:49:26 Also once they didn't have enough bicycles at a station, so we had to manage with two bicycles for three people. 21:49:34 The bicycles weren't very good and we didn't use helmets. :-) 21:49:38 that sounds inconvenient 21:50:40 the amount of tourist-gouging in the pricing is always entertaining 21:51:05 a yearly pass costs the same as 17 day passes 21:51:26 That doesn't seem unreasonable. 21:51:44 * shachaf ought to get a bicycle. 21:51:49 Well, I have a bicycle. But it's in WA. 21:52:52 west antarctica 21:54:40 Code like "cmpq $36,%rax; jl .Lc1jq; cmpq $36,%rax; jne .Lc1jo" is redundant, right? 21:55:26 I mean the second cmpq 21:55:49 At least to me it seem it is but I don't know exactly how the instructions operate. 21:55:50 For no good reason I've been contemplating Brainfuck stuff again. 21:55:59 down that path lies only pain 21:56:06 Another possibility is if the second cmpq is a jump target 21:56:23 pikhq: What kind of Brainfuck stuff? 21:56:28 Namely, how to get a really damned compact threaded code compilation of it. 21:56:28 zzo38: That's true, but I assume it would have a label in that case. 21:57:03 shachaf: Yes I would think so. But without seeing the rest of the program I wouldn't know for sure. 21:57:16 zzo38: This is code being generated by GHC. 21:57:45 which backend? 21:58:10 The default one. 21:58:14 -fasm, I guess. 21:58:20 Maybe this is one of the optimizations that -fllvm would do. 21:58:30 Does GHC ever compile a code where jump target addresses are computed from arithmetic? 21:58:48 If not, then you should complain about such a code like you wrote 22:00:12 Hmm, it looks like -fllvm generates similar code. 22:01:18 Will it generate a LLVM code or a native code, though? 22:01:36 I mean the x86 code generated by LLVM. 22:01:42 I'm just looking at the output of ghc-core here. 22:02:28 Then improve LLVM. LLVM seem to be missing many optimizations as far as I know. 22:02:34 First, I've got a single byte *ludicrously* packed. Next, I'm trying to figure out how I can get loops more compactly expressed... 22:02:58 I bet pikhq can fit a byte into 7 bits. 22:03:01 6 on a good day. 22:03:06 pikhq: Explain more specifically? 22:03:14 it all comes down to how hard you shove 22:03:21 What I'm thinking is that each loop can get expressed as a function, and any loops with identical bodies are the same function... 22:04:09 Are you trying to make program to compile a brainfuck code into another program? 22:05:20 zzo38: Two bits indicate whether you've got a tape add, a movement, or something else. If it's something else, then we've got the rest of the bits to express that. Otherwise, the rest of the bits indicate how much you add to the tape cell, or how far you need to move. 22:05:42 zzo38: Trying to get it to a ludicrously compact expression for no good reason *at all*. 22:06:01 zzo38: For, like, an interpreter or something. 22:06:03 pikhq: OK. Yes that makes sense and I have thought of similar things too, and possibly some other people have also done something similar. 22:06:25 It's silly, but it's Friday and I don't have much else going on. So. :P 22:07:09 Anyways, with just compacting the opcodes like that I've got LostKng.b in 216k. 22:07:52 I have been told that LLVM will not optimize brainfuck programs very good compared to other programs, perhaps optimization of pointer arithmetic and so on? 22:08:09 And I think making it so loop bodies only ever get expressed once could do better still... 22:09:57 -!- pikhq_ has joined. 22:10:11 Other ideas I have thought of for optimization in LLVM would be constraint analysis, BCD optimization (for target architectures which support it), analysis of representation of enumerations, etc 22:10:21 As well as shoving references to particularly common ones inside of the byte, so e.g. [-] could be a single byte per instance as well as 2 more bytes per program. 22:10:28 And self-modifying code, too. 22:10:59 pikhq_: You could also make [-] a special case if it would seem to help 22:11:19 About the only benefit this would have, of course, is letting you run LostKng.b from L1. :P 22:11:36 pikhq_: Another optimization is that sequences -+ +- <> >< +, -, should never occur. 22:11:47 zzo38: I already handle those. 22:12:04 <>< is very fishy brainfuck 22:12:09 Therefore the packed representation should become unable to represent such sequences. 22:12:25 I think the packed representation is theoretically capable of it. 22:12:47 But it's never actually expressed. 22:13:08 -!- pikhq has quit (Ping timeout: 248 seconds). 22:13:37 Once I'm done with this I'll probably make a simple interpreter, and have a LostKng binary in $tiny. 22:15:47 Phew, Stripe stroped. 22:17:06 Another thing I was thinking of is to make a Famicom-based software synthesizer in .NSF, possibly using FDS and MMC5 expansions so that you can use the 8-bit PCM, hardware multiplication, and extra RAM (using FDS expansion makes most of the ROM area into RAM, so combining it with PCM reading from the ROM area you might be able to make RAM PCM too). 22:21:21 Hah. And gzip'd, LostKng is 40k after this... 22:21:21 fizzie: ? 22:21:35 (vs. 88k otherwise) 22:23:53 kmc: As in, "done". 22:26:23 congrats 22:26:44 fizzie, what stripe 22:26:55 Oh, I need to get back to that. 22:28:53 -!- oerjan has set topic: May contain strawberries | Just a remote control and some old gum | atriq is Taneb, just so you know | any topic history can be faked | except this | http://codu.org/logs/_esoteric/. 22:28:59 Phantom_Hoover: stripe-ctf.com i assume 22:31:47 The above, yes. 22:48:35 they had some fun levels 22:48:41 i think i learned more than in the previous ctf 22:49:23 Ditto, due to the different topic. 22:49:34 fizzie: Which solution did you have for level 6? 22:50:25 -!- ion has set topic: May contain strawberries | Soy strawberries are more ethical | Just a remote control and some old gum | atriq is Taneb, just so you know | any topic history can be faked | except this | http://codu.org/logs/_esoteric/. 22:50:36 shachaf: A script-embedderistic one. 22:51:07 OK, so the same as mine, I assume. 22:51:10 kmc did something else. 22:51:57 shachaf: I saw a mention in the interwebs that there was a cookie-mungling-with-secrets-from-error-message solution that the Stripe folks patched out (by disabling the error messages in question). 22:52:11 Yep, that. 22:52:30 kmc: ☝ 22:52:53 yeah, that's what i did 22:56:19 -!- zzo38 has set topic: May contain: soy strawberries, people, computer programming, esoteric, THX deep note, ecliptic longitude, some CPU bugs, nonsensical analogies and theories, constructible with compass and ruler, matrix of solidity, lovecraftian horrors, and no tea. | http://codu.org/logs/_esoteric/ | http://esolangs.org/wiki/Special:RecentChanges. 22:59:37 no tea? how naughty. 23:00:07 May contain tea, and no tea. 23:00:38 If you want tea you have to make tea. 23:01:01 fizzie: O, yes, I forgot that now you have to fix it 23:02:40 -!- fizzie has set topic: May contain: soy strawberries, people, computer programming, esoteric, THX deep note, ecliptic longitude, tea, some CPU bugs, nonsensical analogies and theories, constructible with compass and ruler, matrix of solidity, lovecraftian horrors, and no tea. | http://codu.org/logs/_esoteric/ | http://esolangs.org/wiki/Special:RecentChanges. 23:02:53 I put it in the middle in order to not be as obvious. 23:02:57 OK 23:03:02 Yes that is good put it middle 23:03:13 -!- ion has set topic: May contain: soy strawberries, people, computer programming, esoteric, THX deep note, ecliptic longitude, tea, some CPU bugs, nonsensical analogies and theories, constructible with compass and ruler, matrices of solidity, lovecraftian horrors, and no Ice-T. | http://codu.org/logs/_esoteric/ | http://esolangs.org/wiki/Special:RecentChanges. 23:04:01 or Mr. T 23:05:38 Mr. ⊤ 23:05:53 but what about Mr. F? 23:05:59 -!- monqy has joined. 23:06:18 Mr. ⊤ and Mr. ⊥ 23:12:23 Mister Bottom? 23:12:25 i just got asked if monoid is pronounced "monowid". 23:12:54 Phantom_Hoover: When I first read the word, I pronounced it "mono'ID" 23:12:57 With a glottal stop. 23:13:05 That's probably because I was talking in Hebrew at the time. 23:17:53 Mono id or mono eye dee? 23:18:12 The former (I think). 23:18:21 The capitalization was for emphasis. 23:18:29 ok 23:20:18 Mon Oyd. 23:25:50 i guess i should do the script embedding attack for level 6 23:25:52 for completeness 23:26:17 in the last CTF i used a timing attack on the last level, which was also not what they were looking for :) 23:26:41 kmc: It was, I think. 23:27:29 Actually I gather that they decided that the "impressive" solutions were the ones that used timing attacks and the "unimpressive" ones were the ones that were deterministic. 23:27:57 At least everyone I talked to who did a timing attack got a responds within a few hours, whereas it took them several days to get back to me. 23:28:28 Which is kind of backwards because the timing attack is the "obvious" thing to do -- it's what I started out by doing -- and the deterministic solution is much more situation-specific. 23:30:18 but the timing attack is harder to actually get working, i think 23:30:40 it was relatively easy for me, only because i had already spent days banging my head against a similar level in IO 23:31:29 kmc: It probably was. But that means I allocated my time better! 23:31:30 also i'm entertained by the list of programming challenges on https://stripe.com/jobs 23:31:38 In particular the MBR demo? 23:32:00 -!- MoALTz has quit (Ping timeout: 244 seconds). 23:32:11 yes 23:32:18 I spent a while on the timing attack, it turned out to be trickier than I thought, so I thought about the problem again and came up with the pipe solution. 23:32:21 also the code search one, which is probably inspired by nelhage doing that exactly 23:32:22 * shachaf might just be bitter. 23:34:09 i had like four tricks for making the timing attack more effective 23:34:17 That sounds interesting. 23:34:18 which i thought of over days, and asked nelhage for one of them 23:34:29 should i list them? 23:34:36 I should do io.sts. :-( 23:34:36 i might write a blog post about this eventually 23:34:44 Which level has the timing attack? 23:34:51 (Which level was I at?) 23:34:57 12. 23:35:07 Man, I'm no good at coming back to CTFs. 23:35:24 11 is also really fun 23:35:31 i didn't finish IO yet 23:35:51 though i beat the last level, in beta test 23:36:54 kmc: You should run the underhanded code contest and then turn the solutions into CTF levels! 23:40:47 also amused because i think the answer to the first question is given in _The Social Network_ 23:41:49 "Given a corpus of voting data, how would you compute a total ordering?" 23:42:00 s/$/?/ 23:43:30 voting data being pairwise comparisons 23:43:46 I haven't seen the film. 23:48:01 Zuckerberg made a website where it shows you two Harvard women and you click on which one is hotter 23:48:14 and (in the film anyway) they calculated Elo ratings from this 23:57:17 -!- pikhq_ has quit (Ping timeout: 240 seconds). 23:57:24 -!- pikhq has joined.