00:14:10 this isn't a city deep under the sea? 00:34:09 there might be a dimensional loophole 00:35:49 so! who wants to help work on the underload->C compiler 00:58:18 -!- skabet has joined. 01:01:13 nobody? :( 01:01:27 i'm not nobody... 01:05:57 -!- puzzlet_ has quit (Remote closed the connection). 01:05:57 -!- puzzlet has joined. 01:27:13 ehird`: written in python? 01:43:33 -!- ehird` has quit. 01:48:44 -!- puzzlet has quit (Remote closed the connection). 01:48:45 -!- puzzlet_ has joined. 02:16:15 -!- skabet has left (?). 03:46:22 -!- puzzlet has joined. 03:46:25 -!- puzzlet_ has quit (Remote closed the connection). 04:40:10 -!- GreaseMonkey has quit ("Hi Im a qit msg virus. Pls rplce ur old qit msg wit tis 1 & hlp me tk ovr th wrld of IRC. and dlte ur files. thx."). 05:21:21 -!- puzzlet_ has joined. 05:31:41 -!- puzzlet has quit (Read error: 110 (Connection timed out)). 06:26:18 -!- Justin_ has joined. 06:26:39 -!- Justin_ has left (?). 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:08:52 http://www.vjn.fi/oklopol/graphica.txt turns out it *was* trivial to make an n-dimensional hypercube 08:09:17 also turns out my implementation is slow as hell :D 08:42:31 -!- oklopol has changed nick to Z. 08:42:46 -!- Z has changed nick to oklopol. 08:42:59 too late 08:50:26 -!- oerjan has joined. 09:39:46 Hello. 09:43:12 malbolgo 09:44:09 Am I supposed to mod this by 94 to get hello? 09:45:48 i should ask you that very same question. 09:47:59 -!- oerjan has quit ("leaving"). 09:48:42 -!- slereah_ has joined. 10:04:27 -!- Slereah has quit (Read error: 110 (Connection timed out)). 10:48:34 -!- puzzlet_ has quit (Remote closed the connection). 10:48:46 -!- puzzlet has joined. 11:27:12 -!- puzzlet has quit (Remote closed the connection). 11:27:19 -!- puzzlet has joined. 11:47:29 -!- puzzlet has quit (Remote closed the connection). 11:47:35 -!- puzzlet has joined. 13:00:24 * slereah_ will try to implement the 2D version of the Love Machine 9000. 13:07:29 -!- jix has joined. 13:24:11 -!- Corun has joined. 13:42:49 -!- helios24 has joined. 13:47:12 -!- sebbu has quit ("@+"). 14:01:30 -!- sebbu has joined. 14:03:00 -!- puzzlet has quit (Remote closed the connection). 14:03:02 -!- puzzlet has joined. 14:14:54 -!- Corun has quit ("This computer has gone to sleep"). 14:36:02 -!- Corun has joined. 14:38:17 -!- slereah__ has joined. 14:38:17 -!- slereah_ has quit (Read error: 104 (Connection reset by peer)). 14:40:23 -!- Corun has quit (Client Quit). 14:56:45 -!- slereah__ has quit (Read error: 104 (Connection reset by peer)). 14:56:48 -!- slereah_ has joined. 15:08:21 -!- helios24 has quit (Remote closed the connection). 15:34:46 -!- ehird` has joined. 15:40:09 -!- jix has quit (Read error: 104 (Connection reset by peer)). 15:42:39 -!- timotiis has joined. 15:44:50 who is fast with log grepping? 15:45:00 i need to know the date where me and ais523 discussed 'turing complete regexps' 15:49:00 http://tunes.org/~nef/logs/esoteric/07.10.03 15:49:06 or maybe http://bespin.org/~nef/logs/esoteric/07.11.12 15:49:28 -!- jix has joined. 15:49:30 or maybe neither, btw, I used http://www.google.co.uk/search?hl=en&q=ais523+ehird+turing+complete+regexp :D 15:56:14 2007-10-03 is right, Asztal 15:56:15 thanks 15:57:03 The 2D Love Machine has some problems dealing with the adding-new-squares-around 15:58:16 -!- helios24 has joined. 16:00:01 * ehird` (a(b)) -> [['a', ['b']]] 16:00:04 that IS a good idea. 16:02:04 FUCK! I'm starting to think like Larry Wall. 16:02:09 wait, why am i still ehird` 16:02:10 -!- ehird` has changed nick to ehird. 16:12:48 -!- fax has joined. 16:13:43 hello fax machine 16:14:48 Hello 16:15:33 I found a great Logic textbook 16:16:18 Lectures on the Curry Howard Isomorphism 16:30:25 http://membres.lycos.fr/bewulf/Russell/Hello.png 16:30:29 Am I doin it rite? 16:30:57 There seem to be some problems with some of the tape-displaying functions. 16:31:12 But then again, it's not the most important part I guess. 16:31:49 One day, I'll have to dig in that code to clean it. I don't look forward to it. 16:33:44 your code looks like random line noise. 16:34:35 Well, it's just directions and "print space". 16:35:16 -!- sebbu2 has joined. 16:39:18 http://membres.lycos.fr/bewulf/Russell/Hello2.png 16:39:31 Hides the problems better with space as the empty char! 16:41:37 -!- ais523 has joined. 16:42:11 Hi. 16:42:20 -!- ais523 has set topic: What is the title of this topic? Logs: http://tunes.org/~nef/logs/esoteric. 16:42:35 Freenode get annoyed if a channel is publically logged but you don't tell anyone 16:42:37 and hi 16:43:03 wow, ehird, you got your nick back? 16:43:05 Hey 16:43:17 h 16:43:18 ais523: yep 16:43:27 <3 freenode staff 16:43:35 I also have 'rice' 16:43:39 and as for those TC regexps, I'm still working on them 16:43:49 written about 70% of the spec, now 16:43:50 because, i saw an unused-for-a-year, short, memorable dictionary word, and nabbed it 16:43:53 heh 16:43:56 and started working on the implementation for a third time 16:43:57 i'm picking mine up again 16:44:01 kind of from the start 16:44:17 now I have a version of Perl that understands (??{$regexp}) 16:44:28 ais523: Why embed it in perl? 16:44:31 It's turing complete by itself! 16:44:40 I'm using Perl to write the interpreter 16:44:57 but without that construct, matching brackets is tedious 16:45:13 of course, it exists in my regexp language too 16:45:18 with a much shorter notation 16:45:50 Mine will be written in Haskell or something, probably. 16:45:54 Dunno. 16:46:13 one of my favourite innovations is a concise way to do yacc-like matching 16:46:19 ais523: what's a^nb^nc^n 16:46:21 in yours 16:46:39 ^(a*)b*:1c*:1$ 16:47:21 or you can use :- rather than :1 if you don't want to hardcode a group number 16:47:21 that has changed since last time.. 16:47:24 significantly 16:47:34 what did I say last time? 16:48:29 also, I have things like (a*)b*:-c*:- to solve the famous n as, n bs, n cs problem, which I think is considerably shorter than the corresponding BF program 16:48:39 so it's the same program 16:48:49 except that I didn't put the ^ and $ to anchor it to the whole expression 16:48:57 incidentally, ^ and $ have completely different implementations 16:49:50 hm 16:50:00 i'm going to start with regexps as i like them, then extend to matching brackets 16:50:03 which is to say: 16:50:04 recursion 16:50:08 ais523: does that sound like a good basis? 16:50:16 mine is also based on recursion 16:50:27 -!- sebbu has quit (Connection timed out). 16:50:30 a* is just an abbreviation for (|a$+) 16:50:50 i.e. either match nothing, or match a followed by a repeat of the current group's code 16:51:05 that's crazy :) 16:51:08 strictly speaking, (??|a$+), but the ?? just prevents the group being allocated a number 16:51:24 I want a lambda symbol 16:51:26 $ = quine 16:51:39 lambda in a RE language 16:51:46 hmm... 16:51:58 \(\)|\($\) 16:52:00 it would be easy enough in a self-modifyin language 16:52:04 matches balanced brackets, but does nothing with them 16:52:14 \(\)()|\(($)\) 16:52:19 matches brackets into a parse tree 16:52:21 () -> [] 16:52:24 (()) -> [[]] 16:52:24 etc 16:52:25 -!- puzzlet_ has joined. 16:52:25 -!- puzzlet has quit (Remote closed the connection). 16:52:27 well 16:52:30 [""] 16:52:31 i guess 16:52:40 my language produces a parse tree no matter what you do 16:52:49 and the colons force two regexps to have the same parse tree 16:53:39 you can choose whether . matches just a character, or whether it's equivalent to (\x0|\x1|\x2|...|a|b|c|...|\x10fffe|\x10ffff) using options 16:53:49 (or whatever Unicode goes up to nowadays) 16:54:05 and which option in a set is chosen is also taken into account 16:54:13 ais523: does that account for all the nomansland stuff in unicode? 16:54:18 those higher 'planes' or whatever they are 16:54:26 it's all very epic and spooky 16:54:26 I'm not entirely sure 16:54:27 :) 16:54:34 all I know is that there are some codepoints that can't be used 16:54:36 so I don't use them 16:54:37 'The Unicode encoding space consists of 17 planes with each plane consisting of 65536 code points' 16:54:52 that at least explains where the 10ffff comes from 16:54:54 As of Unicode 5.0.0, 102,012 (9.2%) of these code points are assigned, with another 137,468 (12.3%) reserved for private use, 2,048 for surrogates, and 66 designated noncharacters, leaving 872,582 (78.3%) unassigned. The number of assigned code points is made up as follows: 16:55:02 9.2% assigned :P 16:55:30 I wonder when if ever they'll run out and have to add more planes? 16:55:35 the BMP itself is sufficient for most things 16:56:25 http://en.wikibooks.org/wiki/Windows_Programming/Unicode/Character_reference/E0000-E0FFF do they really need this page. 16:56:33 you can also do things like ('a-z=A-Z') 16:56:39 to change lowercase to caps 16:56:59 and as for do they really need that page; I think that might have beeen on Wikipedia once but they moved it because Wikibooks was a better fit 16:57:13 and it seems reasonable that some book might need page after page of Unicode characters in it... 16:57:38 * ais523 has to go for a while, but should be back maybe about half an hour later 16:57:56 -!- ais523 has quit ("hopefully back in about 1e mins..."). 17:05:57 -!- slereah_ has quit (Read error: 104 (Connection reset by peer)). 17:06:14 -!- slereah_ has joined. 17:06:50 -!- slereah_ has changed nick to Slereah. 17:35:24 -!- ais523 has joined. 17:45:49 -!- fax has changed nick to afx. 17:50:01 -!- RedDak has joined. 17:54:36 -!- afx has changed nick to fax. 17:56:33 ^(\`$+$+=$+$+\^|'skivdce(\..)')$ 17:57:58 that converts Unlambda from Polish to Reverse Polish notation 17:58:24 it's easy enough to expand on it to produce an Unlambda to Underload converter in a single statement, except for c 18:00:24 hello ais523 18:00:29 hello 18:00:48 of course, my implementation isn't finished yet, so I haven't tested any programs 18:00:59 I've only got as far as implementing the crazy quoting and precedence rules 18:01:24 i'm still thinkning about mine 18:01:37 ais523: i think i'll start a rewrite of the compiler's scheme code 18:01:41 the prelude staying the same ofc 18:01:51 i was thinking, I dunno. Haskell? It'd be good for writing the optimizations.. 18:01:57 I'm better at the C than at the Scheme 18:02:08 yeah, and the scheme is ugly 18:02:11 but I think the C's about as good as it's likely to easily get 18:02:14 which is why i'm switching to something else :) 18:02:25 (one of the things i want to add is a real parse tree) 18:02:30 I figured out how to make dup O(1), but the other costs of doing so are sufficiently high that it isn't worth it 18:02:35 also, with a new frontend 18:02:38 we can optimize the code 18:02:50 ais523: so, what languages do you understand? haskell might be a bit optimistic i guess :) 18:03:02 I'm trying to learn it without docs 18:03:05 which is a bit difficult 18:03:16 and I'm not on my own computer at the moment, so I don't have access to an interpreter anyway 18:03:22 nor to svn for that matter 18:03:30 ah 18:04:36 my computer is currently over 4 miles away from my Internet connection... 18:05:54 ais523: this seems like a bit of a problem ;) 18:06:08 well, I'm at the Internet connection at the moment, obviously 18:06:28 but not your computer. 18:06:49 no, so I'm stuck with the ancient version of ChatZilla 18:08:17 awesomecakes 18:09:04 ais523: do you even have a decent editor? :-) 18:09:31 when I connect to Unix, like I do now, I have Emacs or vi 18:09:41 otherwise, Visual Studio, Notepad, Wordpad and Textpad 18:09:49 (and MS Office, of course, bu I don't count that) 18:09:57 it's your opinion as to what's a decent editor 18:10:07 personally I find sed works quite well in many cases 18:11:21 heh, sed 18:11:24 wellll, let's see.. 18:11:41 emacs, blah, blah, blah, blah ... ok, you have one good OS which has a good editor inside 18:11:50 if you're connecting to unix already that's an awful lot of indirection :-) 18:12:07 it's worse; some of the projects I do are on a friend's Linux server 18:12:16 and I have to connect to Unix to ssh over to Linux... 18:12:26 it's great fun trying to run curses programs like that 18:12:35 * ais523 uses Linux at home, by the way 18:12:41 I use OS X :) 18:12:59 haha, wow.. I telnetted in to Franz's Allego Lisp demo prompt for no reason 18:13:02 = ^? 18:13:06 just like the good ol' days 18:13:13 ^H works XD 18:13:20 DOS was worse 18:13:26 = 18:13:37 but the backspace key worked as well, fortunately for everyone's sanity 18:13:56 ais523: still in windows prompts today.. 18:13:59 or at least: xp era. 18:14:01 :) 18:14:15 I should netcat the whole swank source to the prompt 18:14:17 and conncet with SLIME 18:14:17 run doskey and it gets a lot saner 18:14:18 :D 18:14:29 what, you mean netcat | sh 18:14:36 no 18:14:42 you know what SLIME/swank is 18:14:43 surely 18:14:49 no 18:14:51 ah 18:14:56 SLIME = Superior Lisp Interaction Mode For Emacs 18:15:11 basically, it's what Symbolics would have been proud of. 18:15:13 is that real lisp, or elisp? 18:15:18 real lisp 18:15:23 The whole editor gets knowledge about your lisp system 18:15:35 SLIME actually connects with a socket to your lisp implementation 18:15:36 Emacs knows scarily much anyway 18:15:39 which is running swank 18:15:42 swank is the backend 18:15:47 with some implementation-specific parts 18:15:53 and it tells SLIME /everythiing/ it wants to know 18:16:20 from basic things like 'complete based on symbol table' to crazy, crazy introspection 18:16:25 and it has a lisp mode 18:16:29 like "run-lisp" 18:16:31 but vastly superior 18:16:40 with debugger integration and everything 18:16:50 it's one of the Must Haves for CL development 18:16:59 Emacs has all those features which are great but nobody who was brought up on a GUI will like or even understand 18:17:03 but anyway... i should cat that over to franz' telnet and get SLIME on it 18:17:04 :D 18:17:09 ais523: I was brought up on a gui.. 18:17:22 but you managed to shake yourself out of it 18:17:26 no.. 18:17:30 i'm still running a gui irc client here 18:17:30 :) 18:17:38 connecting to the Internet doesn't count 18:17:42 and - shock! - using a mouse! 18:17:46 it became designed for a GUI 18:17:55 ais523: occasionally i end up using the mouse in emacs :P 18:18:00 and actually I don't use mice all that often nowadays, now I have a laptop 18:18:00 i'm fast with a mouse though 18:18:02 so it doesn't matter 18:18:26 my editing style is really idiosyncratic 18:18:37 so is most people's, I expect 18:18:40 it comes from using every editor from Notepad to vim to TextMate to ... 18:19:04 sed? 18:19:08 no, i suck at sed 18:19:11 oh! 18:19:13 I've used acme 18:19:29 it overwhelms you with pure awesomeness, too bad it can't really do shit i guess 18:19:36 actually i have al lthe plan9 tools installed on here 18:19:43 including an x11 acme 18:19:49 ais523: OH! Have you used sam? 18:19:52 another plan9 invention 18:19:55 it has: 18:19:57 no 18:19:59 a top frame, with an ed prompt 18:20:06 and loads of windows below each with one file 18:20:18 and you can edit the file with all the flexibility of ed, while seeing it below 18:20:19 hardcore 18:20:24 it's even GRAPHICAL! 18:20:31 sort of like the relation of ddd to gdb? 18:20:38 ddd= 18:20:43 I was started on ddd, but grew to prefer gdb 18:20:50 ddd is sort of a GUI for gdb 18:21:14 it runs gdb in a separate process, and translates GUI input into gdb commands and gdb output into graphical displays 18:21:26 and you can see the gdb commands scrolling past at the bottom 18:22:03 heh 18:22:27 ais523: plan9 is crazy 18:22:27 anyway, this /is/ the computer on which I wrote my buggy elisp abstraction eliminator 18:22:30 ever used it's WM? 18:22:40 so I'm pasting it now so I can later get it onto my laptop 18:23:09 and no, I've only used Win 3.1 and Win 95 onwards WM, X11, the Common Desktop Environment, Gnome and KDE 18:23:21 never used OS X? 18:23:22 poor thing 18:23:23 :p 18:23:30 not on my own computer 18:23:36 I've used it on other computers 18:23:43 and I'm a fan of several of its features 18:23:52 it's probably slightly better in UI terms than Gnome/KDE, but not by much 18:24:05 it is once you learn about it through using it 18:24:30 i must admit that i'm an exposé addict, though mostly keyboard-based :P 18:24:55 anyway, the abstraction eliminator is at http://pastebin.ca/860539 18:25:03 it's buggy if you don't use a prefix arg to disable optimisation, though 18:25:18 I wrote it so long ago that I've forgotten the syntax, though so I'd have to work it out again 18:25:50 Is it for lambda expressions in Haskell syntax? 18:25:59 Unlambda syntax 18:26:07 with an extension to write lambdas 18:26:16 \ or ^? 18:26:32 it seems to be ^ and $, according to the source 18:26:42 ^ to declare a lambda binding, $ to use it 18:27:52 Unlambda. Mode. 18:27:52 Jeez. 18:28:06 FONT LOCK WHAT THE HELL 18:28:07 I make it a habit to write Emacs modes for all the esolangs I work in 18:28:14 with font lock 18:28:31 only intercal-mode is publically released, though, and I didn't even originally write that 18:28:39 just added font lock and some helpful functions to it 18:29:06 `^x`$x$x`^x`$x$x 18:29:11 followed by C-c C-b 18:29:16 gives ```sii```sii 18:29:26 which come to think of it is actually wrong 18:29:47 * Slereah uses this one : http://membres.lycos.fr/bewulf/Russell/Lazy%20Bird/ae9.py 18:29:48 because the input should have been `^x`$x$x^x`$x$x 18:30:01 giving the correct ```sii``sii 18:30:11 Although it doesn't differentiate combinators from variables. 18:30:25 So s, k, i, c and b are better left out of the expression. 18:30:26 I still th ink we need an abstraction introducer. 18:30:43 ```sii``sii -> ((\x. x x) (\x. x x)) 18:30:49 who was it who said that decompiling Unlambda was probably easier than compiling? 18:30:50 Wouldn't that just be replacing the combinator by its lambda? 18:31:00 that's what abstraction introduction is 18:31:18 well yes 18:31:20 but also optimizing 18:31:22 see my example 18:31:27 'kay. 18:32:07 here's a program I wrote for the abstraction eliminator: 18:32:08 http://pastebin.ca/860594 18:32:18 I wonder, does Unlambda and all the purely functional qualify as string-rewriting? 18:32:37 it can be implemented with string-rewriting 18:32:46 and that's the method I use when stepping through Unlambda by hand 18:33:05 I could probably write a quick interpreter in my new regexp language, which I decided to call Cyclexa 18:34:25 the program that I pasted, by the way, is a P'' interpreter in Relambda (which compiles into Unlambda with C-u C-c C-b; it should work without the prefix arg, but it's buggy) 18:34:48 Relambda = Unlambda + lambda; any infinite loop must contain a ! character somewhere, which otherwise has the same semantics as i 18:35:11 ais523: Does it detect? :-) 18:35:23 it detects everything but infinite loops 18:35:31 btw, my golf idea: http://golf.shinh.org/, but you can add challenges, and it has a golf challenge for the site source itself 18:35:34 ais523: aww 18:35:34 which is why you have to put a ! somewhere inside to tell it where they are 18:35:40 ais523: why? 18:35:45 that's in theory, at least. In practice it seems not to work. 18:35:53 Can't you just solve the halting problem to detect them? 18:37:18 how does that golf site work? 18:37:23 as in, how do you use it? 18:38:22 ais523: uh 18:38:26 you see input/output 18:38:30 implement the program, etc 18:38:31 upload it 18:38:33 it goes in the rankings 18:38:45 does it check the program to see if it works? 18:39:40 and how can Esolang not have a page about GolfScript? 18:39:47 yes, it does check 18:39:51 http://golf.shinh.org/p.rb?print+file 18:39:55 it checks input to output 18:40:03 ais523: because its really new 18:40:21 * ais523 must write a stub immediately 18:43:28 http://golf.shinh.org/reveal.rb?Quine/shinh/1182045546&php 18:43:30 that is so cheating 18:43:50 What language is it? 18:44:05 Ruby? 18:44:51 Brainfuck, probably 18:46:22 no 18:46:23 PHP 18:46:32 _ is apparently a PHP quine 18:46:39 just tested it: yep. 18:46:43 oh 18:46:44 duh 18:46:45 as is anything that doesn't contain because it's not in 18:46:51 grrr 18:46:53 that is so cheating 18:47:07 In HOMESPRING, the null program is not a quine. 18:47:23 http://golf.shinh.org/p.rb?Quine i'm trying to find an interp with short error messages 18:47:26 so ican do a kimian quine 18:47:26 :) 18:47:30 I wonder if it has ed 18:47:36 one char quine! 18:48:12 * ais523 had the idea of trying to create an iterating Kimian quine 18:48:26 or even better, a quine-pair where one program was Kimian but the other wasn't 18:49:03 hah 18:49:05 Heh. 18:49:30 if I manage to do it in gcc, then that'll be my IOCCC entry for next year 18:49:56 my previous one was a BF interpreter in alphanumericless C (apart from defines and the prototype of main) 18:49:59 sed: 1: "~": invalid command code ~ 18:50:06 which contained several hidden programs 18:50:16 damnit 18:50:18 they use a different sed 18:50:27 * ehird installs gnu sed 18:50:31 some of which were written in Perl, some of which were written in BF 18:50:35 gnu error messages are large :( 18:51:06 Create a language full of short error messages! 18:51:16 Or some sort of language where the output is only error messages 18:52:18 ed 18:52:56 what about this for a Kimian quine, in x86 machine code? 18:53:03 Illegal instruction (core dumped) 18:53:25 at least on the 8086, all lowercase letters are illegal instructions, so I'd just have to check what capital I does 18:53:44 hah 18:53:55 not too long either... 18:54:05 "Error: not ELF binary" 18:54:07 from the golf site 18:54:17 what, they want it in Elf format? 18:54:20 yes 18:54:25 just give them your own shorter program 18:54:29 that you just told me 18:54:34 which one... 18:54:35 that sed? 18:54:38 it's bsd sed output 18:54:41 they use gsed 18:54:41 Error: not ELF binary 18:54:43 oh 18:54:44 hah 18:54:45 no.. 18:54:49 it outputs it and rejects the submission 18:54:53 it checks before verifrying 18:55:06 so that's a Kimian quine against the website itself 18:55:12 that's a moral victory, at least 18:56:23 heh 18:56:24 hm 18:56:32 oh, shit 18:56:35 it checks for status=1 18:56:37 bastards:P 18:56:49 I had my D compile time quine: 18:56:50 test.d(1): found '1' when expecting ')' 18:56:51 test.d(1): no identifier for declarator test.d 18:56:51 test.d(1): semicolon expected, not ')' 18:56:51 test.d(1): Declaration expected, not ')' 18:56:55 do you mean status=0? 18:57:05 or are you using VMS? 18:57:11 -!- RedDak has quit (Remote closed the connection). 18:57:44 it checks if status=1 and denis it 18:57:45 *denies 18:58:21 test.sh: line 1: [: missing `]' 18:58:25 fuck you bash 18:58:30 fuck you for matching up yuour []s in errors 18:58:37 cruel people 18:58:59 incidentally, the man page for true gave information on how to make it error out 18:59:10 oh well: 18:59:12 'cat $0' 18:59:14 accepted. 18:59:19 i feel kinda hollow inside 18:59:22 /bin/true --version 2>&1 | /dev/full 18:59:28 ais523: wow 18:59:37 WTF TRUE TAKES OPTIONS 18:59:39 ..... 19:00:01 only --help and --version 19:00:06 and only then if you give a full path 19:00:22 and even only then on the GNU version 19:00:34 incidentally, /bin/false errors even if you ask for help or version info 19:00:46 because it's so important to know what version of true you're running ;) 19:01:00 updated in version 2. now fails. 19:02:00 I wonder if anyone ever has run true --help in an attempt to find out what it does? 19:02:30 well, they'd find out alright. 19:03:11 http://golf.shinh.org/p.rb?Nothing Um 19:03:36 oh 19:03:37 hahaha 19:03:38 you have to print: 19:03:43 *NOTHING* 19:03:54 with the actual input: 19:03:56 *NOTHING* 19:04:09 You'd think that most of the shortest programs would be of length zero. 19:04:18 no, Slereah 19:04:21 you have to print out the string: 19:04:23 *NOTHING* 19:04:41 Then why are some of the program of length one :o 19:04:54 because you get the stirng: 19:04:56 *NOTHING* 19:04:57 as input 19:04:59 so in e.g. sed 19:05:03 you can just do nothing 19:05:06 It is subtle 19:05:06 but it denies 0 length programs 19:05:14 http://golf.shinh.org/p.rb?Evil+C+Compiler i'm just gonna hardcode this one 19:05:14 :) 19:05:18 I just entered qq as a palindromic PHP quine 19:05:31 it rejected q; apparently it only wants even-length palindromes 19:05:51 wait no... i want to call out to gcc 19:05:52 MWAHAHA 19:06:43 echo"Compiling...\nRunning...";gcc /dev/stdin;./a.out 19:07:09 hm 19:07:13 ais523: how do you read form stdin in gcc compiles 19:07:19 gcc -x c /dev/stdin 19:07:24 you have to tell it what language stdin is in 19:08:29 * ais523 is now trying to figure out a palindromic quine in Underload 19:08:36 omg i did it 19:08:37 NEW RECORD 19:08:39 echo 'Compiling... 19:08:39 Running...';gcc -xc /dev/stdin;./a.out 19:08:50 HAHAHAHHAAHAHAH I RULE 19:09:06 I'm sure that's cheating... 19:09:07 huh wtf 19:09:11 ... 58 chars 19:09:15 thats not hte winner 19:09:19 ais523: um duh all the submissions are like 19:09:23 500-40 chars 19:09:27 ofc they do that 19:09:56 !daemon ul bf http://pastebin.ca/raw/367774 19:10:36 -!- oklopol has quit (Remote closed the connection). 19:11:49 ais523: could i abuse gcc to make it print my lines? 19:11:55 which are 19:11:56 Compiling... 19:11:58 Running... 19:12:06 I don't think so 19:14:05 ais523: speaking of which 19:14:09 how small can a c compiler get? 19:14:11 self-compiling 19:14:24 I would venture, 200-300 lines maybe? 19:14:45 http://fabrice.bellard.free.fr/otcc/otcc.c otcc is rpetty close, but post-obfuscation.. 19:15:00 also: 19:15:04 outputting assembly 19:15:06 for portability. 19:15:08 int main(){system("gcc -xc /dev/fd/0");} 19:15:13 har har 19:15:15 but seriously 19:15:23 fd/0 saves one char over your stdin 19:15:25 * ehird /dev/stdin 19:15:27 * ehird /dev/fd/0 19:15:29 hm 19:15:30 thanks for the suggestion 19:15:31 ;) 19:15:32 but anyway 19:15:33 yeah 19:16:24 !ul (:aS(:^S^:)Sa:):^S^:(:aS(:^S^:)Sa:) 19:16:25 ais523: so what about for a real compiler 19:16:26 ;) 19:16:27 (:aS(:^S^:)Sa:):^S^:(:aS(:^S^:)Sa:) 19:16:33 !ul ( 19:16:37 !ul ) 19:16:40 !ul ~ 19:16:47 try a longer program 19:16:54 !ul (Test)S 19:16:57 Test 19:17:05 !ul S 19:17:16 !ul S 19:17:19 !ul (S)^ 19:17:27 !ul (S):^ 19:17:27 !ul (S):^ 19:17:30 .. 19:17:31 S 19:17:33 S 19:17:34 yay 19:17:40 !ul (S):a^ 19:17:46 !ul (SS)::a^ 19:17:55 hm 19:17:56 a^ is unlikely to produce output 19:17:58 oh 19:17:59 yes 19:18:05 and I can only assume that EgoBot restarts the daemon each time 19:18:06 !ul (S):~a~^ 19:18:09 (S) 19:18:17 because it's written in BF and does no error checking 19:18:17 !ul (SS):~a~^ 19:18:21 (SS)SS 19:18:27 !ul (:~a~^):~a~^ 19:18:32 hm 19:18:34 eff ths 19:18:35 L:P 19:18:37 no Ss in that 19:18:48 !ul (:aSS):aSS 19:18:51 (:aSS):aSS 19:19:08 !ul (aS(:^)S):^ 19:19:11 (aS(:^)S):^ 19:19:13 I know 19:19:28 those are the two main sorts of quines 19:19:32 !ul ()(*)*S 19:19:35 * 19:19:42 !ul ()(()*S)*S 19:19:45 ()*S 19:19:58 !ul (()*S)(*S):*S 19:20:01 *S*S 19:20:15 !ul (()*S)(*S)*~:~^ 19:20:49 ais523: have you got svn on that machine yet? :) 19:20:52 or a c compiler. 19:20:56 I have a c compiler 19:20:59 two c compilers, in fact 19:21:06 there's also a program called c99 19:21:09 when I run it I get 19:21:23 c99 utility unavailable SunOS 5.9 19:21:52 do you have svn yet? :P 19:22:13 can't install software on here 19:22:26 hahaha, golf.sinh.org pokes fun at ICFP 19:22:28 "GolfScript is the programming tool of choice for discriminating golfers. 19:22:28 Ruby is a fine programming tool for many courses." 19:22:29 it isn't my machine, I'm not root, and I'm not supposed to download any to my home account 19:22:42 ICFP is a great idea, by the way 19:23:07 oh, and Perl is not too shabby 19:23:14 according to their rankings, anyway 19:25:10 heh: puts'gXgle'.sub'X','o'*gets.to_i 19:25:16 i'm silly 19:25:45 what does that do? 19:26:17 10000000000000000000000000000000000000000000000000000... ? 19:26:38 input 1 19:26:39 and you get 19:26:42 gogle 19:26:42 2 19:26:43 google 19:26:44 10 19:26:46 gooo... 19:26:51 its the 'google' challenge 19:26:53 on the golf site 19:26:57 puts"g#{'o'*gets.to_i}gle" 19:26:59 26 chars 19:27:10 the top is 14 chars in golfscript. 19:27:15 to beat ruby i need to beat 24 chars 19:28:35 i need to optimize gets.to_i 19:30:28 I see String#oct .. but no String#dec :( 19:31:20 "42".oct.to_s(8).to_i 19:31:20 :D 19:33:44 oh my god 19:33:48 here's a loop forever program: 19:33:48 main=-277; 19:34:09 is that machine code for goto self? 19:34:15 or machine code for wait-for-interrupt? 19:34:18 or something similar? 19:34:25 I heard the IOCCC disqualified such things 19:34:41 ais523: it works on os x 19:34:47 and i dont think golf.shinh.org does 19:34:48 so: 19:34:49 that was a rule change after that won the first year 19:34:52 i think its portable, in some crazy way 19:34:53 because although compilers would technically accept main not being a function... 19:34:54 also: 19:34:55 1 GOTO 1 19:34:58 my basic entry :D 19:35:05 hmm 19:35:06 my befunge entry: 19:35:06 can you do 19:35:08 1GOTO1 19:35:18 LOOL 19:35:18 in C, I think the record is main(){main();} 19:35:24 4 char ruby: 19:35:25 `vi` 19:35:30 ais523: doesn't work on it 19:35:32 is that valid C? I know it's not valid C++ 19:35:32 but the compiler needs to do tail-recursion optimization to optimize that 19:35:44 C doesn't have a no-recursive-main restriction 19:36:00 in C++, at least, main has undefined linkage and can't be called from inside the program :( 19:36:13 * Slereah is rewriting the Love Machine 9000 19:36:19 you can just work around it by making a function that main is a wrapper around 19:36:24 Hoping for some nicer code 19:36:37 you can't call main() in C ais523 19:36:38 its forbidden 19:36:41 and undefined 19:36:50 no, you're thinking of C++ 19:36:54 it's legal in C 19:36:54 nope 19:37:34 * ehird submits ```sii``sii 19:37:45 Ooh 19:37:47 ``ci`ci 19:37:48 now that's clever. 19:38:57 I can beat that 19:39:04 which number is the problem? 19:39:18 oh i submitted >< in befunge 19:39:21 ais523: "timeout" 19:39:25 Ctrl-F it 19:39:34 omg 19:39:36 a one-char befunge 19:39:38 "1" 19:39:55 pity, it didn't work 19:40:03 ais523: what was it 19:40:04 ` leads to a timeout in normal Unlamda because it waits for more input 19:40:08 -!- RedDak has joined. 19:40:13 but they remembered to add an EOF 19:40:52 hah, I like this ruby one: `vi` 19:42:16 yes 19:46:14 ais523: the only thing better will be mine 19:46:20 which as i have asid will have a golf on the site's code itself 19:56:26 loooooooooooooooooooooooool 19:56:31 ais523: I submitted this to the 123 challenge 19:56:33 puts 1;x=File.read("test.rb").sub("puts","puts 1+");File.open("test.rb","w").write(x) 19:56:57 * ais523 looks at the 123 challenge 19:57:58 take a look at the top ones 19:57:59 :) 19:58:10 I did, it's a clever idea 19:58:15 basically 19:58:15 keep resubmitting until it works... 19:58:22 and hah 19:58:22 yeah 19:58:24 you're right 19:58:25 sheesh 20:00:03 what's the sheesh for? 20:00:28 because its lame for them to do that 20:00:28 :P 20:02:29 puts$_ unless$_=="\n"while gets 20:02:30 i am lame. 20:03:17 ,[----------[++++++++++.],] 20:03:19 heh. 20:03:25 ais523: what's the most compact way to represent 10 in BF? 20:03:28 just 10 -s or +s 20:03:28 isn't it 20:03:34 there's a page about it on the wiki 20:03:55 +++++[>++<-]> 20:03:57 and yes, all numbers up to 14 are best done in unary 20:04:04 ais523: but i have duplication there 20:04:05 ? :S 20:04:07 10 -s and 10 +s 20:04:57 incidentally, I like my Perl entry for the echo, even though it's clearly not the shortest 20:05:01 #!perl -p 20:05:23 the whole program is preprocessor directives ! 20:05:37 hah 20:06:30 most people probably don't even realise that you can do that 20:07:42 likewise, a perl quine: 20:07:46 #!/bin/cat 20:08:01 I don't even know if that's cheating or not 20:08:08 it is 20:08:13 also, it's an X quine for all X 20:08:39 no, because only perl will run a different program with the current source if it sees a #! at the start 20:08:44 cat doesn't, for instance 20:09:11 my ruby sort: 20:09:12 print gets.split('').sort 20:09:16 http://golf.shinh.org/p.rb?sort+characters 20:09:19 -!- oerjan has joined. 20:11:01 hello oerjan 20:11:04 we were discussing golf. 20:11:39 one of the many sports i have not tried. 20:11:39 I went and entered a new competition: to create the shortest Underload interpreter 20:11:57 unless you count minigolf. 20:12:08 this is the programming kind of Golf 20:12:24 ais523: Our compiler won't do very well. :-) 20:12:36 I allowed execs, though, so it will be allowed... 20:13:14 why did you allow execs? 20:13:17 :P 20:13:26 so that you can pipe a compiled output into gcc 20:13:39 and because I couldn't see a reason to deny them 20:14:03 I 20:14:06 'd need to include prelude.c 20:14:13 and that would make it biiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiig ;) 20:14:33 there should be an anti-golf 20:14:43 'find the most obscure, drawn out, just plain ridiculous solution' 20:16:02 all the COBOL users would win on file size :( 20:17:21 Well, you could probably make some program that will send an email to a third party, asking him to send a letter containing "Hello world!" 20:17:46 Ideally, on another continent 20:17:51 which is then OCR'd in 20:18:07 by writing an x86 emulator, an OS, with a TCP/IP stack and sendmail 20:18:47 not email, snailmail 20:19:31 Are there any company that will send snailmails containing some text automatically? 20:19:42 Relying on a third party feels a little like cheating. 20:22:01 probably not 20:22:03 :) 20:22:15 you'd still have to write a "driver" for the third party. Think of it as a piece of hardware. 20:25:40 I'm not a machine! 20:25:43 I'm a man! 20:25:58 Slereah: man: a very fancy machine 20:26:03 for some values of 'very fancy' 20:26:08 pretty slow ones. 20:27:04 humans are slow and unreliable, but quite flexible 20:27:05 Well, depends in what areas. 20:27:18 both mechanically and in terms of their capabilities 20:27:18 We can walk without bumping into walls! 20:27:32 You can't say that of every robot 20:27:35 we can read crappy handwriting with amazing accuracy! 20:27:41 we can interpret regional accents! 20:30:47 Plus, we're not that slow! 20:30:56 It just takes us a while to speed up. 20:31:06 A few thousand years, the time for us to invent computers. 20:32:00 -!- puzzlet_ has quit (Remote closed the connection). 20:32:07 -!- puzzlet has joined. 20:32:38 fair enough 20:32:55 plus our collective processing power is capable of growing at a nearly exponential rate 20:33:36 so! who wants to write a tiny esoteric C compiler 20:33:44 aimed to be the smallest self-compiling C compiler 20:33:44 well 20:33:45 not really C 20:33:48 tiny-esoteric-subset-of-C 20:33:49 :P 20:34:40 * Asztal foresees abuse of goto 20:34:48 sounds vaguely interesting. What platform will we target? 20:35:00 Asztal: if that's the case, I'm definitely in. :D 20:35:14 * fax wants an ISWYM impl. 20:35:22 let's make goto capable of calling function pointers or something 20:35:26 wasn't that done already as an IOCCC winning entry? 20:35:37 oerjan: maybe, but whatever 20:35:42 RodgerTheGreat: i was thinking just portable asm 20:35:47 oerjan: heard of it, but who cares, it'll be fun 20:35:50 1. it's easier to debug :) 20:35:54 2. portability! 20:35:58 hm 20:35:59 i use OS X, you probably use something else. 20:36:03 I use OSX 20:36:07 do you 20:36:07 ok 20:36:10 well someone else might not 20:36:10 ;) 20:36:14 what about replacing goto with the J operator (not that I actually know what it does) 20:36:27 lies and heresy. Everyone uses OSX or a degenerate form of OSX. 20:36:30 fax: that's a bit too changed from C 20:36:34 hopefully we can make the only thing requiring special stuff syscalls 20:36:40 It is? 20:36:48 It's very much like how all labor is really degenerate forms of bending. 20:36:51 also, this code should compile OK: 20:37:00 int main(void) { printf("Hello, world!\n"); return 42; } 20:37:02 when we're done obviously. 20:37:05 ok 20:37:07 int main(int argc, char **argv) { printf("Hello, world!\n"); return 42; } 20:37:08 that too 20:37:11 so: we do need types 20:37:13 let's build everything around those two examples 20:37:19 RodgerTheGreat: let's not :P 20:37:23 lol 20:37:29 bit hard to jump right into c like that 20:37:29 dang 20:37:56 RodgerTheGreat: Oh yeah and no parser generators 20:37:57 :-) 20:37:57 will we also have to build portions of a standard library from scratch? 20:38:04 and... maybe. maybe not. we'll see 20:38:09 * ais523 did a 303-byte Underload interpreter in Perl 20:38:13 ehird: I never use parser generators. They're for pussies and people in a rush 20:38:21 RodgerTheGreat: though i don't think we should compile to _main 20:38:28 because the C stdlib does that stuff 20:38:33 and well it just seems like too much of a copout :P 20:38:33 hm. 20:38:36 it's actually an optimising interpreter, so it's not quite correct because it sometimes optimises inside literal strings, but the examples don't catach that problem 20:38:40 but... entry points are wildly different between platforms 20:38:56 I'm just trying to firmly establish what we plan to accomplish and create from scratch 20:39:34 RodgerTheGreat: yeah 20:39:51 RodgerTheGreat: OK i guess we can compile to just main for now 20:39:55 make 'int' arbitrary precision 20:39:57 and let the c runtime do the legwork. 20:40:33 RodgerTheGreat: do we want to typecheck? :D 20:40:39 no 20:41:02 it'll make it simpler, and we can just assume C programmers know what they're doing 20:41:11 aww 20:41:12 everything is an int! including pointers! 20:41:16 but that's not as fun RodgerTheGreat :) 20:41:17 yes 20:41:19 exactly 20:41:22 everything IS an int 20:41:31 chars will actually be ints, booleans will actually be ints, etc 20:41:41 everythin is arbitrary precision int 20:41:47 we can encode things differently, but you can randomly swap however you want 20:41:47 RodgerTheGreat: but imagine golfing a typechecker 20:41:48 heck 20:41:50 you're inventing BCPL 20:41:53 we could add type inference 20:41:56 so we *might* want some way to cast stuff 20:41:58 'wtf' type 20:42:02 wtf foo = 2; 20:42:11 :P 20:42:15 ais523: exactly 20:42:19 it's not C without type checking 20:42:27 I encourage an extremely minimalist standard 20:42:39 ideally with as little undefined behavior as is reasonably possible 20:42:51 But we're trying to compile something that is recognizable as C here :P 20:43:55 we're trying to make something that is A) a programming language, B) is compatible with C functions/libs/etc, and C) can compile the test programs "int main(void) { printf("Hello, world!\n"); return 42; }" and "int main(int argc, char **argv) { printf("Hello, world!\n"); return 42; }" like you'd expect them to in regular C, without cheating. 20:44:07 this is different than "recognizable as C" 20:44:19 you are splitting hairs here, though 20:44:35 Splitting hairs, perhaps, but this is necessary 20:44:54 why can't we just aim to write "A c compiler" and then decide what to not implement when we come to that? 20:45:06 But type checking is very fundamental to *C*, one of its defining things, so.. 20:45:13 I am reducing the scope of the problem until we have solidified a design. This is generally how I work. 20:45:27 yes, but this way we'll be going through the whole spec 20:45:28 nitpicking 20:46:12 if you don't nitpick, how can you collaboratively design something as necessarily precise as a programming language? 20:46:15 what about the preprocessor? 20:46:37 RodgerTheGreat: we're not designing a programming language. we're implementing a language, continually reducing it. 20:46:42 it's incremental development. 20:46:47 Asztal: i think that can come last. 20:46:53 Asztal: it seems reasonable that we could do without a preprocessor, unless it allows us to get away with a simpler language 20:47:15 a preprocessor will only be a few hundred lines anyway 20:47:23 we're going for 'conciseness', not 'bytes' 20:47:30 A nice macro system would be cool 20:47:53 concise CLISP 20:48:01 a nice macro system and a powerful goto might make it possible to have entirely synthetic functions! XD 20:48:05 haha 20:48:16 macros with return types! 20:48:21 brilliant 20:48:23 they define the type of the expression they produce 20:48:23 I love it 20:48:52 all we need to do is come up with a way for macros to generate something a linker can work with 20:49:02 RodgerTheGreat: Macros are easy: 20:49:12 docompile(macro_body); 20:49:16 call_assembler(that); 20:49:21 then: 20:49:29 call_linker(that,"blah"); 20:49:31 dlopen("blah"); 20:49:35 ... get a funcptr ... 20:49:40 funcptr(argstomacro); 20:49:42 basically 20:49:43 :P 20:49:44 hm... 20:49:56 RodgerTheGreat: you can just grab a funcptr from the linked file 20:49:59 and call that 20:50:28 sounds very creative, and it will significantly reduce the complexity of the language, I think 20:50:42 nah, i don't think so 20:50:45 it'll be a fun extra 20:50:51 recursion may cease to be possible, depending on how this works, but that's fine. 20:50:54 but i don't think it'll provide much actual usefulness or ways to reduce 20:51:39 RodgerTheGreat: by the way, what source control systems do you have? 20:51:45 pleasesaymercurialordarcspleasesaymercurialordarcs 20:52:00 I don't enjoy source control systems 20:52:07 they cause me pain and irritation 20:52:30 are you suggesting that we just ftp it somewhere and overwrite everything? 20:52:30 anyway 20:52:35 darcs and hg aren't like svn and the like 20:52:38 http://rodger.nonlogic.org/ssvn/about.htm 20:52:40 woo 20:52:58 so you have experience with subversion and didn't like it 20:53:00 not suprising. 20:53:09 you should try a distributed system like darcs or hg though. 20:53:24 subsubversion solves most of my objections to source-control systems in general 20:55:41 meh 20:56:01 * sekhmet can't stand *not* using VCSes 20:56:55 anybody want to work on the compiler that doesn't despise vcses? :P 20:56:58 -!- sebbu has joined. 20:59:23 hehe, guess not 21:01:39 RodgerTheGreat: so are you adamant about this vcs thing? :P 21:01:58 pretty much 21:02:08 not even going to *try* darcs or hg? 21:02:14 which are nothing LIKE svn? 21:03:23 there is a sizeable portion of my soul dedicated to my hatred of version control systems. If I am getting paid, I will use one, but I at one point stated that I would never use one for personal projects 21:03:51 What do you hate about them, out of curiosity? 21:04:08 just for future reference: 21:04:09 RodgerTheGreat: you really think they're all like svn don't you.. 21:04:10 '('/'{'*')'/'}'*'S'/'p'*'a'/'`'*'~'/"\\"*'!'/';'*'*'/'+'*':'/'.'*'^'/'~'* 21:04:20 is almost a Underload -> GolfScript compiler in GolfScript 21:04:27 'almost'? 21:04:29 except that the output is completely wrong 21:04:35 ais523: ah 21:04:38 because it translates string literals into GolfScript too 21:04:40 ais523: make it store the original string. 21:04:42 ais523: as well 21:04:50 ais523: then add an 'eval' and submit it to your competition :P 21:04:53 not very easy, I don't think 21:05:04 they seem to me an inherently flawed design. Merging, forking and the like can be resolved with policy, rather than software. They also almost universally force people to install the program just to check out the latest ticket, which is stupid for many reasons. 21:05:11 because it simply literally converts equivalent commands 21:05:22 RodgerTheGreat: Yes, let's do what the computer can do for us! 21:05:22 that second reason is a bigger gripe for me, really. 21:05:33 both languages are concatenative, and in such cases a one-to-one conversion is often possible 21:05:35 And you can check out svn, darcs, ... just with a recursive wget. 21:06:03 oh, a recusive wget, how incredibly convenient 21:06:22 oh i'm sorry i forgot that typing one line is impossible 21:06:27 let's just click instead :| 21:07:03 there are many reasons I use a mac, and one of them is that I have no patience whatsoever for a shitty UI, be it console-based or graphical. 21:07:17 ... wget is a shitty UI? 21:07:23 the UI defines the usefulness of any program. 21:07:27 i repeat 21:07:32 wget is a shitty ui? 21:07:33 and you're intentionally misinterpreting my argument 21:09:04 i'm not 21:11:18 so, is this bash quine a quine by cheating? 21:11:20 ps ho%a -Cps 21:11:36 ps: %a: keyword not found 21:11:37 ps: no valid keywords 21:11:38 -!- sebbu2 has quit (Connection timed out). 21:11:50 it looks to me like on some system, it works by ps'ing to find its own command line 21:12:59 wow, someone's come up with a 76-byte Underload interpreter in C 21:13:04 I wonder if it's for real or by cheating? 21:13:22 cheating 21:13:31 has to be, really, doesn't it 21:13:45 maybe it looks at the input and comes up with one of the three possible outputs depending on what the input was 21:13:50 But, is it good cheating or bad cheating? 21:14:07 ps -Aocommand|grep "ps -" 21:14:10 ^ working ps quine 21:14:14 err wait 21:14:14 no 21:14:23 hm. 21:14:26 eh. 21:14:29 ais523: and yeah of course 21:14:38 can't you check? 21:14:40 as the creator 21:14:46 not until the deadline 21:14:49 which I set in 4 weeks time 21:14:56 ais523: bah, 4 weeks? 21:15:04 may as well leave it up there a while 21:15:05 51b(embed) 21:15:06 'embed'.. 21:15:09 hm. 21:15:10 also: 21:15:15 51b is a big user of that site 21:15:15 so that's a clue that it's a cheat 21:15:17 so.. it's possible 21:15:29 that it's real 21:15:31 but what's (embed) 21:15:41 my guess is that the answers are embedded in the source 21:15:51 ah 21:15:58 then 51b pointed it out 21:15:59 so its ok 21:18:43 I did it probably the same way in 37 by cheating 21:19:49 just switch between the 3 possible answers based on whether certain characters are in the source 21:20:09 ais523: does an underload interp reeaallly need an infinite stack 21:20:14 or is, say, 65536 enough 21:20:41 according to the spec, it needs an infinite stack, but it also has to be capable of infinitely long strings, etc., regardless of your computer's memory 21:20:47 in real life you can put limits on it 21:21:22 yeah i am going to for speed 21:21:27 ais523: what about the length of the strings? 21:21:32 1024 enough? 21:21:37 i.e. (..morethan1024chars..)=err 21:21:42 not nearly, because numbers are generally stored in unary 21:21:46 ok 21:21:47 taking up two characters per value 21:21:47 what then 21:22:07 65540 is probably enough 21:22:18 that lets you store numbers up to 32767 with a bit of leeway for doing arithmetic 21:22:50 why do you want a string length limit anyway? 21:22:55 Are you trying to avoid malloc? 21:23:09 ais523: no -- trying to avoid realloc() 21:23:17 cause you have to store the length, check, etc 21:23:34 golf here.. 21:23:45 actually, wait 21:23:52 in that case, make the limits just long enough to run the example programs 21:24:11 i wish you could get the length of stdin in c 21:24:11 XD 21:24:31 putting a limit on the /length/ of an input program is probably acceptable 21:24:40 i'm just doing it in ruby 21:24:42 far easier to golf 21:24:50 -!- Corun has joined. 21:25:14 yup 21:26:35 ais523: i'm only handling one line programs 21:26:35 :P 21:26:50 it isn't as if newlines are legal outside strings anyway 21:31:39 huh. the compiler allows that. 21:31:45 in fact it allows all junk 21:31:53 for strings, ofc. 21:32:11 it uses the INTERCAL rule; junk only causes an error if it's executed 21:32:22 so just compile an error function as the code and use the correct string 21:32:58 nope: 21:33:00 (abc)^ 21:33:04 well 21:33:06 the a will fail 21:33:07 (foo)^ 21:33:09 that works. 21:33:41 you just need to map all unrecognized characters to call error() just like ~ is mapped to swap(), etc. 21:34:08 no 21:34:13 thats sloow 21:34:15 no 21:34:16 i mean 21:34:17 thats big 21:35:30 not slow, but inefficient 21:35:45 hmm... maybe you could not generate any code in a block after the first error() 21:35:54 after all, nothing past that point can be run anyway 21:38:08 ais523: damn mine is 325 21:38:10 vs your 303 21:38:17 ul.rb:1:in `+': 21:38:18 line 1. 21:38:19 what sort of method did you do? 21:38:20 very helpful ruby. 21:38:33 s=(gets.split"").map{|x|x[0]}.reverse; 21:38:37 ais523: ^^ probably what takes the space 21:39:00 mine's all regexp 21:39:39 it doesn't evaluate in the right order - it's a strange mix of lazy and eager - but that doesn't matter for the example problems because it only affects the S command 21:40:51 % echo "(:aSS):aSS" | ruby ul.rb && echo 21:40:52 (:aSS):aSS 21:41:00 343 21:41:17 % echo "(x)(::**)(::**)^^S" | ruby ul.rb && echo 21:41:17 ul.rb:1:in `[]=': index -2 out of array (IndexError) 21:41:18 damn. 21:41:54 % echo "(x)(::**)(::**)^^S" | ruby ul.rb && echo 21:41:54 x::**::**x::**::**x::**::**x::*............ 21:42:04 ais523: 21:42:04 a=[];s=(gets.split"").map{|x|x[0]}.reverse;while s!=[];c=s.pop;case c;when ?(;i=1;a<<[];while i>0;x=s.pop;if x==?(;i+=1;elsif x==?);i-=1;else a[-1]< debug my code for me! :-) 21:42:42 the error doesn't spring out at me 21:43:11 ais523: im gonna write one in sed.. 21:43:13 does ^ remove an entry from the stack? 21:43:20 ais523: no 21:43:21 thank you 21:43:22 i will fix 21:43:40 I might be able to get a sed version by translating from the Thutu, but I wouldn't really want to try 21:43:54 ul.rb:1: undefined method `+' for nil:NilClass (NoMethodError) 21:44:00 ais523: Anyway 21:44:06 ais523: Give me a good code/stack seperator 21:44:12 < 21:44:16 wait, that's easy 21:44:18 because it's banned in the original language 21:44:20 any single char not an underload command 21:44:21 :-) 21:44:28 then seperate with.. what? 21:44:29 <> i guess 21:44:32 that's what your js does 21:44:45 yup, I was preparing to retrofit the " syntax in later 21:44:50 but it never really caught on 21:45:05 so it remains part of the spec but never implemented, and it's probably better to keep it that way 21:45:19 besides, an escape character is useless if it can't even escape parens 21:45:31 it only escapes <>[]", which are only banned because I say so 21:45:59 My basic stuff is going to be: s/INSTRUCTION([^<]*)(([^<]<)*)TOP ELEMENT/RESULT/g 21:46:04 is... that right? 21:46:13 hm 21:46:16 paren matching will be too hard 21:46:17 fsck that 21:46:18 :P 21:48:11 the Thutu method is to change inner parens to {} temporarily 21:48:25 but that makes up a good part of the program 21:49:22 i submitted a cheat one. 21:49:23 s/.*^^S/xxxxxxxxxxxxxxxxxxxxxxxxxxx/ 21:49:23 s/.*^S$/::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::/ 21:49:34 but forgot to say cheat 21:49:34 shit 21:49:56 ais523: Write an UL interp in your regexp lang 21:54:22 (```s$+$+$+!=``=1=3`=2=3|``k$+$+!==2|`i$+!==1|`$+$+|[ski])=^*?('ski'|`'sk'$+|``s$+$+)$ 21:54:28 does it for ski unlambda 21:54:29 I think 21:54:40 but it'll go into an infinite loop on an invalid program 21:55:08 oh, as for forgetting to say cheat, resumbit it as ehird(otherthesamelengthisacheatandsoisthisone) 21:57:17 http://golf.shinh.org/p.rb?Minimal+scheme+interpreter 21:57:21 possibly the hardest one yet :P 21:57:46 barely golfable actually 21:58:34 ais523: if you even get a submission that works with that in less than an awful lot of code i'll be impressed :P 21:59:23 pretty cheatable, of course 21:59:30 yeah 21:59:39 and i missed out things like (quote X) 21:59:40 but eh. 21:59:43 does Scheme have an eval? 21:59:48 yes. 21:59:49 yes it does. 21:59:58 you don't need to provide it though 22:00:04 no, but you could use it 22:00:12 actually yes 22:00:14 you're right 22:01:23 (let l()(let((_(read)))(if(not(eof-object? _))(eval _))(l))) 22:01:52 damn 22:01:56 have to specify an environment 22:02:26 DAMNIT 22:02:31 i have unbalanced parens in my test 22:02:33 woe is me 22:03:08 lfjklsdhfsdjklfhs WHY CAN'T YOU EDIT IT 22:04:12 submit a 'fixed version' of the problem, and mention in the description that the other has typos in the test cases 22:04:51 ais523: i'm just submitting a lambda calculus one 22:04:54 with unlambda-lambda-syntax 22:04:59 but with multichar identifiers 22:05:03 ^x x 22:05:03 abstraction elimination? 22:05:06 or interpretation? 22:05:08 ^x $x x 22:05:14 interpretation 22:05:19 acxtually 22:05:20 $ -> ` 22:05:23 ^x `x x 22:05:25 that looks good 22:05:38 `^x x ^ x x 22:05:39 etc 22:05:52 what is apply? 22:06:05 ais523: (a b) in lambda calculus 22:06:10 wait 22:06:17 ais523: should i specify regular lambda calculus syntax? :) 22:06:17 so you use parens for disambiguation? 22:06:22 er no 22:06:32 `x y 22:06:33 make it Unlambda syntax, just with lambdas 22:06:33 BUT 22:06:36 IT IS 22:06:39 :| 22:06:43 but anyway 22:06:47 i think i should make it real lambda calculus 22:06:48 \x. x 22:06:59 \x y z. x z(y z) 22:07:00 etc 22:07:02 :D 22:07:05 hah 22:07:07 possibly too hard 22:08:24 Why does no one use ?? 22:08:31 in what context? 22:08:40 I use ?? in Perl a lot 22:08:50 eek 22:09:16 I meant lambda character 22:10:08 * ehird makes golfscript-inspired language 22:10:21 everything is a stack: even the program 22:10:22 :D 22:11:15 { a b c } -> stack with top=a, prev=(top=b, prev=(top=c, prev=())) 22:11:19 and you can call it 22:11:25 Around stacks, never relax. 22:11:33 * Slereah <3 tapes 22:11:35 the whole program is implicitly in {...}! 22:12:58 and the main stack is accessed as $ 22:13:03 {1}{1+}$~! 22:13:09 we start with: 22:13:32 STACK={ }, PROG={ { 1 } { 1 + } $ ~ ! } 22:13:39 STACK={ { 1 } }, PROG={ { 1 + } $ ~ ! } 22:13:45 STACK={ { 1 } { 1 + } }, PROG={ $ ~ ! } 22:13:56 STACK={ { 1 } { 1 + } }, PROG={ ~ ! } 22:14:10 STACK={ { 1 1 + } }, PROG={ ! } 22:14:19 >>zoop callstack 22:14:31 >>STACK={ }, PROG={ 1 1 + } 22:14:39 >>STACK={ 1 }, PROG={ 1 + } 22:14:43 >>STACK={ 1 1 }, PROG={ + } 22:14:47 >>STACK={ 2 }, PROG={ } 22:14:49 >>zeep 22:14:56 STACK={ 2 }, PROG={ } 22:15:09 my stack trick for the genuine Perl Underload interpreter was to just leave (...) constructs at the left-hand end of the program as a stack, and to execute the first real command after them 22:15:18 saves having to implement (...) at all 22:16:26 challenge 22:16:30 someone step through: 22:16:32 {0={1}{:1-#!*}?}4! 22:17:26 not very easy when we don't know the syntax 22:17:33 'xactly 22:17:41 you got a kind of feel for it up there 22:17:41 so. 22:18:59 maybe 2008 will be the year of concatenative languages? 22:19:24 I've spent a while thinking about one which also has arrays, pointers and GOTO 22:19:33 so as to be able to use as many paradigms as possible 22:23:15 -!- ais523 has quit ("wow, it's late"). 22:24:21 so, what languages should i allow in my golf? 22:27:21 -!- RedDak has quit (Remote closed the connection). 22:29:11 -!- oerjan has quit ("Good night"). 23:04:11 -!- cherez has quit (Read error: 110 (Connection timed out)). 23:09:42 -!- helios24 has quit ("Leaving"). 23:14:13 -!- jix has quit (Read error: 113 (No route to host)). 23:16:36 -!- jix has joined. 23:22:48 hello jix 23:23:30 -!- immibis has joined. 23:45:42 -!- cherez has joined. 23:48:58 who's alive? 23:49:00 !help 23:49:03 help ps kill i eof flush show ls bf_txtgen usertrig daemon undaemon 23:49:05 1l 2l adjust axo bch bf{8,[16],32,64} funge93 fyb fybs glass glypho kipple lambda lazyk linguine malbolge pbrain qbf rail rhotor sadol sceql trigger udage01 unlambda whirl 23:52:59 ehird: obviously everyone in the channel is alive (or most people anyway) 23:53:06 it was meant figuratively 23:53:08 well it depends. what is life? 23:56:08 -!- Corun has quit (Read error: 110 (Connection timed out)). 23:56:54 -!- timotiis has quit ("leaving"). 23:57:06 -!- timotiis has joined.