Skip to main content

Timeline for Build a Compiler Bomb

Current License: CC BY-SA 3.0

14 events
when toggle format what by license comment
Sep 3, 2018 at 17:34 comment added wizzwizz4 @user234461 Ok, I won't be... I don't know where that came from, though; I was rubbish at golfing when I first came to this site and am still not as good as this user, so I used bold face to emphasise the compliment. xkcd.com/677
Sep 3, 2018 at 13:31 comment added user234461 @wizzwizz4 don't be a patronizing asshole
Jan 19, 2016 at 19:17 comment added Warbo @Axman6 A program of length L can't exceed binaries of size BusyBeaver(L). Any "boilerplate" bytes (those which aren't part of our numerical expression) don't count towards the argument of BusyBeaver, so for B bytes of boilerplate we're limited to BusyBeaver(L-B). Therefore the overwhelmingly best strategy is to minimise boilerplate (in our case, TH): no matter how smart it looks, BusyBeaver is smarter than us, and will make better use of those bytes ( news.ycombinator.com/item?id=9060014 ).
Jan 19, 2016 at 18:57 comment added Warbo @Axman6 Interesting, but remember that FOO is an arbitrary Haskell expression of type Int. The linear relationship to the value of FOO is incidental: imagine if we used 2^BAR instead of FOO: that matches your proposed exponential solution without having to change the TH. We could also beat it using factorial, or Ackermann, etc.
Jan 18, 2016 at 3:17 comment added Axman6 It should be easy to make the growth here exponential here. Ben Lippmeier used to show an example on IRC which looked like: main = print x where x1 = (); x2=(x1,x1), x3=(x2,x2)... x=(xn,xn), which should be almost trivial to implement using TH. Then the file size would be proportional to 2^N (where N is FOO but optimised for code size :P) [For food measure, use !x with BangPatterns turned on, to ensure it is actually computer, if the binary doesn't end up being that big]
Jan 13, 2016 at 21:09 comment added Dave Cool; confirmed :)
Jan 13, 2016 at 12:15 comment added MathematicalOrchid I came here to post something exactly like this. Well done.
Jan 13, 2016 at 11:36 comment added Warbo Hi @Dave the <$> function is widely used in Haskell, but was only moved to the "prelude" (the set of functions available by default) in GHC 7.10. For earlier versions you'll need to add import Control.Applicative; after the exising import statement. I just tried with GHC 7.8.4 and it works.
Jan 13, 2016 at 1:46 comment added Christopher King Too bad template haskell isn't lazy enough to stream out an infinite executable.
Jan 12, 2016 at 23:36 comment added Dave When I compile with GHC 7.8.3 I get "Not in scope: ‘<$>’" (I set the code to [...].replicate (2^10)<$>[|0|])). I'm not experienced with Haskell; any hints on how to make this compile?
Jan 12, 2016 at 17:14 comment added Mason Wheeler @wizzwizz4: Yeah, it is a brilliant answer. It's essentially the same as mine, except that in Haskell it requires a special compiler directive to make the metaprogramming work. ;)
Jan 12, 2016 at 17:05 comment added wizzwizz4 Welcome to Programming Puzzles and Code Golf. This is a brilliant answer, especially for a new user to this site. If you need any help (which I doubt), feel free to ask.
Jan 12, 2016 at 16:54 review First posts
Jan 12, 2016 at 17:05
Jan 12, 2016 at 16:50 history answered Warbo CC BY-SA 3.0