00:01:12 !irp helloworld.irp 00:01:15 helloworld.irp: Unknown file or directory 00:01:24 !ls 00:01:27 bf/, glass/, linguine/ 00:01:34 !ls glass 00:01:37 dice.glass, hangman.glass, urls.glass 00:01:45 !irp glass/dice.glass 00:01:47 glass/dice.glass: Unknown file or directory 00:01:48 ? 00:02:02 !ls d 00:02:04 Erm 00:02:05 /bin/ls: ./files/d: No such file or directory 00:02:06 !ps d 00:02:09 1 ais523: daemon ul bf 00:02:11 2 immibis: daemon cat bf 00:02:13 3 GregorR: ps 00:02:28 OK, it's not a daemon, so it's just a user command :P 00:02:40 Probably just takes its input and adds "Unknown file or directory" 00:02:45 * immibis slaps GregorR with a rainbow trout 00:02:47 !irp fddfashfdfdsafds 00:02:51 fddfashfdfdsafds: Unknown file or directory 00:02:57 !irp asdfjkl; 00:03:01 asdfjkl;: Unknown file or directory 00:03:20 !irp immibis: you suck. irp 00:03:23 immibis: you suck. irp: Unknown file or directory 00:03:33 !irp fatal error: helloworld.irp 00:03:37 fatal error: helloworld.irp: Unknown file or directory 00:03:39 !usertrig show 00:03:41 No such user trigger: 00:03:45 er? 00:03:56 !help 00:03:59 help ps kill i eof flush show ls bf_txtgen usertrig daemon undaemon 00:04:01 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 00:04:03 !help usertrig 00:04:05 Use: usertrig Function: manage user triggers. may be add, del, list or show. 00:04:16 !usertrig show irp 00:04:19 (irp): bf ,[.,]+++++++++++[>+++++>+++>++++++++++>++++++++++<<<<-]>+++.>-.<+++++++++++++++++++++++++++.>>.>---.+++.+.<+++++++++.---------.<.<+++++++++++++++++.+++.>>--.-------.<.>>.+++.<<.>-.<<.>>>.<+.--.>++.-----.+++.+++++++. 00:05:15 Is it just me, or are there new EgoBot features? 00:05:23 it's just you. 00:05:32 Ah. 00:05:34 this feature has been around for a long time. 00:06:43 usertrigs predate daemons. 00:06:51 They turned out to be useless, so I added daemons :P 00:06:54 Then nobody used usertrigs. 00:06:59 er, i did. 00:07:08 +much 00:07:19 Huh. 00:07:21 back 00:07:25 And you never removed usertigs. 00:07:35 !irp foo 00:07:39 foo: Unknown file or directory 00:07:46 Hmm. 00:08:42 GregorR: egobot is a veritable hodgepodge, isn't it? 00:08:52 Yup 00:09:16 lots of unused stuff 00:09:17 :P 00:09:19 !help 00:09:23 help ps kill i eof flush show ls bf_txtgen usertrig daemon undaemon 00:09:25 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 00:09:39 !ps 00:09:40 Daemons are fairly used, the filesystem is never used but I stole the concept from EsoBot so eh *shrugs* 00:09:43 3 ehird`: ps 00:09:48 Esobot? 00:09:50 !ps d 00:09:53 1 ais523: daemon ul bf 00:09:55 2 immibis: daemon cat bf 00:09:57 3 ehird`: ps 00:10:14 !undaemon 1 2 00:10:15 :D 00:10:17 * ehird` is evil 00:10:20 !daemon cat ,[.,] 00:10:25 !undaemon cat 00:10:29 Process 2 killed. 00:10:29 oh 00:10:31 !undaemon ul 00:10:33 Process 1 killed. 00:10:34 !undaemon cat 00:10:37 mwahaha 00:10:40 i am evil for no specified reason 00:10:51 !daemon cat +[,[.,]+] 00:10:55 !ping pikhq 00:10:59 pikhq: No such nick/channel 00:11:07 !ping yadayadayada 00:11:08 !ping ehird` 00:11:11 ehird`: No such nick/channel 00:11:13 yadayadayada: No such nick/channel 00:11:19 !ping EgoBot 00:11:21 !usertrig show ping 00:11:23 (ping): bf ,[.,]+++++++++++[>+++++>+++>++++++++++>+++++++++<<<<-]>+++.>-.<++++++++++++++++++++.>>+.<.>++++.++.>.+++++.<<.>-------.-----.<<+++++++++++++++++++++.>>++.<+++++++++++++++.<.>>>.<<<--.>>+++..> ---.<--. 00:11:25 EgoBot: No such nick/channel 00:11:27 hah 00:11:30 its like the irp daemon 00:11:33 yes 00:11:34 !ping #esoteric 00:11:37 #esoteric: No such nick/channel 00:11:38 but with a different message. 00:11:43 !help usertrig 00:11:47 Use: usertrig Function: manage user triggers. may be add, del, list or show. 00:11:48 actually, my client does that. 00:11:49 These commercials advertise that they have 25MPG highway and say you can feel really smart because your gas mileage is so good. My car gets 40MPG. WTF universe do I live in. 00:11:52 [12:11] ->> #esoteric :No such nick/channel 00:12:10 !usertrig list 00:12:13 Triggers: decode encode irp ping urls 00:12:17 !urls x 00:12:26 !usertrig show urls 00:12:27 !encode WhatDoesThis Do? I wonder? 00:12:27 (urls): glass {M[m(_u)(URLs)!(_i)I!(_i)l.?(_u)u.?]} 00:12:31 1192921948-inahdkjjaaagclaenheekjafbc 00:12:35 !encode WhatDoesThis Do? I wonder? 00:12:39 1192921956-jonefedoneaknkiibhbopmllgd 00:12:40 ? 00:12:42 !decode 1192921956-jonefedoneaknkiibhbopmllgd 00:12:45 Error: bad message. 00:12:50 lol 00:12:52 !decode 1192921956-jonefedoneaknkiibhbopmllgd 00:12:53 !decode jonefedoneaknkiibhbopmllgd 00:12:55 Error: bad message. 00:12:57 Error: bad message. 00:13:00 !decode YOUR MOM 00:13:03 Error: bad message. 00:13:05 HA HA HA HA HA. 00:13:12 !usertrig show decode 00:13:15 (decode): linguine file://linguine/decode.lng 00:13:16 !usertrig show decode 00:13:17 (decode): linguine file://linguine/decode.lng 00:13:23 !cat linguine/decode.lng 00:13:25 Huh? 00:13:26 linguine? 00:13:29 ? 00:13:29 what is linguine? 00:13:31 !help 00:13:31 !help 00:13:35 help ps kill i eof flush show ls bf_txtgen usertrig daemon undaemon 00:13:36 obviously a language. 00:13:37 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 00:13:39 help ps kill i eof flush show ls bf_txtgen usertrig daemon undaemon 00:13:41 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 00:13:42 !show linguine/decode.lng 00:13:43 http://esolangs.org/wiki/Linguine ah 00:13:45 No such process! 00:13:54 HELP, I'm being spammed to death 8-O 00:14:12 GregorR: you. write a cat command 00:14:18 or implement it as a daemon, which would be hardcore 00:14:22 i did. 00:14:24 !ps d 00:14:27 1 immibis: ps 00:14:29 cat is easy. 00:14:31 maybe not 00:14:34 immibis: No, to cat a file from the filesystem. 00:14:36 does it cat FILES, though? 00:14:39 !daemon cat +[,[.,]+] 00:14:42 no 00:14:48 that's what i want 00:14:49 !cat hello. 00:14:51 immibis: You need to tell it what language it is X_X 00:14:52 so we can cat stuff on the file system 00:14:53 Huh? 00:14:57 oh 00:15:01 i always make that mistake :P 00:15:12 !daemon cat bf +[,[.,]+] 00:15:16 !cat file://linguine/decode.lng 00:15:19 file://linguine/decode.lng 00:15:27 GregorR: suggestion 00:15:28 Thought that might work :P 00:15:30 add a < command 00:15:32 and a > command 00:15:34 well, not command. syntax 00:15:38 which will do as in shells 00:15:46 !cat !cat this also means that interpreters which can also take files and urls 00:16:02 can be much simplified 00:16:05 as it's all done through < and > 00:16:06 -!- EgoBot has quit (Read error: 104 (Connection reset by peer)). 00:16:12 maybe even a | pipe if you want, but that's hardcore ;) 00:16:13 -!- EgoBot has joined. 00:16:15 what to do with file://linguine/../../../../../../../../../../../../../etc/passwd 00:16:21 immibis: it's sandboxed 00:16:22 duh 00:16:58 * immibis wonders why gregorr made egobot quit 00:17:08 WHY YOU KILL EGOBOT 00:17:08 it didn't 00:17:09 it crashed 00:17:27 foooooooof 00:17:32 * GregorR goes to work on Plof3 for a bit :P 00:17:38 -!- pikhq has quit ("leaving"). 00:17:42 glargh 00:17:50 GregorR: i will give you $39742397234 if you implement < 00:17:54 $239847239872398234 extra if you do > 00:17:59 and $293847293482698723648724628934623986986987236498234623874 for | 00:18:02 :D 00:18:21 * immibis implements < > and | for free because ehird` only offered that to gregorr 00:19:00 can you change egobot? :P 00:19:05 no 00:19:24 i could download the source and change it and send it to gregorr. 00:19:29 heh 00:24:39 what's < > | ? 00:24:46 piping! 00:24:51 oh 00:24:54 !cmd <(file or url) 00:24:57 Huh? 00:25:02 !language no longer has to do it itself 00:25:05 Huh? 00:25:06 and custom programs can have it too! 00:26:15 !cat < file://bf/../../../../../../../../../../../../../../../../../../../../../../etc/password 00:26:17 Huh? 00:26:25 immibis: i already told you how stupid that is 00:26:28 egobot is sandboxed 00:26:36 the filesystem is completely seperate from the normal fs 00:26:41 as in chroot'd? 00:26:49 iirc it's not even a real fs 00:26:57 it's a wrapper around some files on an fs 00:27:06 but, the EgoBot running is chrooted afaik 00:27:29 * SimonRC goes to bed 00:31:28 * bsmntbombdood bumps SimonRC's keys 00:33:57 -!- pikhq has joined. 00:36:13 !ping pikhq 00:36:15 Huh? 00:36:32 !stfu immibis 00:36:35 Huh? 00:38:26 !ping bsmntbombdude 00:38:29 bsmntbombdude: No such nick/channel 00:38:36 !ping bsmntbombdood 00:39:03 bsmntbombdood: No such nick/channel 00:39:10 stfu 00:40:06 haha i just realised 00:40:09 that actually DOES ping 00:40:10 XD 00:41:13 no it doesn't! 00:41:18 !usertrig ping show 00:41:18 yes 00:41:19 Huh? 00:41:20 it does 00:41:24 nick: BLAH 00:41:27 !usertrig show ping 00:41:28 and clients highlight on nick 00:41:29 (ping): bf ,[.,]+++++++++++[>+++++>+++>++++++++++>+++++++++<<<<-]>+++.>-.<++++++++++++++++++++.>>+.<.>++++.++.>.+++++.<<.>-------.-----.<<+++++++++++++++++++++.>>++.<+++++++++++++++.<.>>>.<<<--.>>+++..>---.<--. 00:41:30 so it does ping them 00:41:32 if unintentionally 00:41:34 no. 00:41:41 umm yes 00:41:47 it just says nick: No such nick/channel. 00:41:53 yeah 00:41:56 and clients will highlight it 00:41:58 because nick is in it 00:42:00 some clients. 00:42:03 mine doesn't. 00:42:39 your client sucks 00:42:39 :/ 00:43:39 -!- ehird` has quit ("Leaving."). 00:51:06 He was so offended by your client's lack of highlighting, he left in a huff. 00:51:32 actually it because i kept annoying him. 00:57:16 !immibis stfu 00:57:19 Huh? 00:57:36 Holy Underwear, Human! 00:58:31 bsmntbombdood, please type the following: !daemon bsmntbombdood bf +[,[.,]+] 00:58:38 in a query 00:58:40 with egobot 00:58:56 !daemon immibis bf +[,[.,]+] 00:59:11 !immibis stfu 00:59:13 stfu 00:59:44 it has to be in a query between me and egobot, or it shows up wherever it was created 01:00:04 ok, NOW !immibis sends a message to me. 01:00:26 !immibis Sure 'bout that? 01:00:41 yeo 01:00:43 yep 01:00:49 [13:00] Sure 'bout that? 01:06:01 !bsmntbombdood hello 01:06:03 Huh? 01:06:07 !help 01:06:11 help ps kill i eof flush show ls bf_txtgen usertrig daemon undaemon 01:06:13 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 01:25:37 -!- jix has quit ("This computer has gone to sleep"). 01:39:08 IRP SHOW THE IRP MANUAL 02:20:16 'sup, everyone? 02:20:26 immibis: go to hell 02:20:40 the manual is long 02:20:57 the manual includes the entire english language 02:20:59 hmm 02:21:06 how long would a manual for english be? 02:22:05 if there are 50,000 words, (roughly), and we assume the manual is in BNF or something, about 50 pages for grammar and the rest would fall into vocab 02:22:09 do you mean IRP go to hell? 02:22:19 !daemon cat +[,[.,]+] 02:22:32 english isn't context free so it can't be BNF 02:22:33 about the size of an unabridged dictionary with some additional pages 02:22:36 hm 02:22:40 dang- that's true 02:23:30 i meant the manual for the command IRP, as in how to invoke it. 02:24:25 IRP SAY IRP SAY IRP SAY IRP SAY IRP SAY IRP GO TO HELL 02:28:36 Except that proper IRP is English. 02:34:45 GregorR: a large subset of English. 02:35:12 A large and unpredictable subset of English :P 02:37:17 fair enough 02:38:13 An undefined subset of English. 02:38:41 Nah, it's defined, just based on factors you can't know. 02:39:10 You know, I wonder if a context-free subset of English could be made. 02:39:38 pikhq: oh, certainly. It really depends on how much you want to be able to express. 02:39:49 Oooh. 02:39:58 It'd probably just be sort of clumsy to talk in. 02:40:05 for the purposes of conventional programming, you could make one fairly easily. 02:40:22 I want a (potentially useless) English in YACC. ;) 02:40:40 "Add x to y" is probably easy to do context-free. 02:41:28 my guess is that you'd end up with something that looked an awful lot like COBOL. 02:41:39 XD 02:42:39 Or ORK. 02:43:12 probably an ungodly mix of the two. 02:43:28 especially if it's invented in this channel. :S 02:54:13 :) 02:54:27 ORKBOL, here we come! 02:54:41 Or maybe just CORK? 02:56:02 IRP SAY IRP SAY IRP SAY IRP SAY IRP SAY IRP GO TO HELL 03:01:44 That expression- you keep saying it. I don't think it means what you think it means. 03:01:49 -!- Tritonio has joined. 03:02:18 firefox just told me "Oops: Firefox cannot load this page for some reason" 03:02:39 sweet 03:02:41 Those exact words? 03:02:45 sounds like firefox 03:02:50 it either means to say "IRP SAY IRP SAY IRP SAY IRP SAY IRP GO TO HELL" or to say "IRP IRP IRP IRP IRP" and go to hell. 03:03:01 actually, i typed in about:neterror into the title bar 03:03:14 but that won't stop me sending it to www.worsethanfailure.com 03:04:35 my interpreter module won't parse expressions that use more than one level of parentheses because I don't care enough 03:05:00 the same goes for recursive statements or anything repetitive 03:05:15 when did the daily what-the-fuck become the daily worse-than-failure? 03:05:25 no idea. 03:05:37 it still abbreviates to WTF though. 03:06:11 bsmntbombdood, about a year agot, give or take 03:06:35 I think dailywtf.com still works though 03:06:48 -!- calamari has quit ("Leaving"). 03:07:22 and also one where AVG Antivirus told me that it was out-of-date just after it updated itself. 03:07:27 it does. 03:08:02 worsethanfailure.com even loads ads from syndication.thedailywtf.com 03:25:08 IRP (goToPlace (getPlaceFromList (getPlaceList "Places not in this world") "Hell")) 03:25:36 [15:25] [NickServ PING Reply] : 1 minute 58.906 seconds 03:25:36 guess something must be up with my client today 03:44:52 http://sexualidad.wordpress.com/2006/04/17/sexo-en-grupo/ , yay studies about sex 03:49:09 -!- Tritonio_ has joined. 03:49:12 -!- Tritonio_ has quit (Client Quit). 03:51:26 hot damn, DFAs are fun 04:07:27 -!- Sgeo has quit (Remote closed the connection). 04:13:35 dumb french assholes 04:26:10 Deterministic Finite Automaton 04:26:30 What are you doing on #esoteric if you don't know that expansion :P 04:27:03 * immibis wonders what he's doing on #esoteric as he didn't know that expansion 04:27:44 i do know that expansion 04:33:32 I didn't think of it right away. 04:33:40 I was getting assraped in FreeCiv, though. 04:34:56 That's my experience with FreeCiv too. 04:35:13 That's the first time I've lost. . . 04:35:17 In 4 years. 04:35:26 what's freevic? 04:35:46 A free software Civilization game. . . 04:36:04 pikhq: Yeah? Well grep 'Gregor Richards' `find ~/freeciv/src -type f` 04:36:05 :P 04:37:31 I salute you. 04:37:39 Also, the hard AI cheats. 04:37:47 I'm truly, truly convinced that it cheats. 04:39:42 GregorR: You may wish to know this. . . 04:39:48 Doubt it! 04:39:53 $ grep 'Gregor Richards' `find . -type f` 04:39:53 $ 04:40:15 OK, I don't know if any of my code actually survives :P 04:40:32 Not actually contributed since 1.14.2? 04:40:51 1.14.1 IIRC 04:41:14 Well, there's been a rewrite since then. . . 04:41:42 Well, that explains that :P 04:41:52 I haven't played it in a while, I'm frustrating awful at it :P 04:42:21 -!- galt has changed nick to [[g4lt]]. 04:42:25 I'm usually good at it. . . 04:42:49 Although the hard AI has convinced me that largepox rules ought to be the default. :p 04:43:06 * pikhq is used to playing with 3 cities. . . Producing about 500 bulbs/turn. . . 04:47:38 i wonder if solving sudokus (or similar game) is turing complete 04:48:20 What exactly would the act of solving a game being turing complete *entail*? 04:48:27 Capable of being solved on a Turing machine? 04:48:32 no 04:48:39 The game itself *being* a Turing machine? 04:48:41 the solver being the turing machine 04:48:45 yes 04:50:36 -!- [[g4lt]] has changed nick to [[g4lt]]-somethi. 04:50:46 a CAPTCCHA, if you will 04:50:46 [16:45] * pikhq is used to playing with 3 cities. . . Producing about 500 bulbs/turn. . . <--- what? 04:51:17 What, don't play Civ? 04:51:28 immibis: they are part of a perverted sex-cult 04:51:35 ok 04:51:35 immibis: that's part of their disgusting lingo 04:51:50 -!- [[g4lt]]-somethi has changed nick to g4lt-sb100-away. 04:51:57 immibis: sexual deviants like him are dangerous to society 04:52:09 A bulb is the unit of scientific research in FreeCiv. . . 04:52:30 -!- g4lt-sb100-away has changed nick to [[g4lt]]. 04:52:39 ok 04:52:40 translation: "my sex-cult is a danger to YOUR CHILDREN!!" 04:52:47 It's also an unsafe sexual toy for anal fetishists *shrugs* 04:54:12 i've been thinking that paraphilias are just sexual orientations 04:54:36 XD 04:56:11 males who are androphilic aren't diseased...so why should males who are pedophilic be? 05:03:50 this is an instance where the lines between disease, disorder and natural genetic variation become very fuzzy. 05:04:48 yes 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:42:01 IRP DIVIDE ZERO BY ZERO 08:55:27 -!- oerjan has joined. 08:58:10 goodnight 08:58:13 IRP DIVIDE ZERO BY ZERO 08:59:08 IRP (CrashProgram (GetCrashMethodByName "DivideByZero") (GetCurrentProgram) "thisistehpasswordtocrashtehprogram") 08:59:17 -!- immibis has quit ("Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC. Some folks ). 10:29:06 -!- RedDak has joined. 10:48:13 -!- [[g4lt]] has changed nick to glt-experienced. 10:48:23 -!- glt-experienced has changed nick to g4lt-experienced. 11:16:20 -!- jix has joined. 11:17:35 -!- SEO_DUDE38 has quit (Remote closed the connection). 11:36:23 -!- oklopol has joined. 11:38:46 -!- SEO_DUDE38 has joined. 11:55:10 bsmntbombdood: Sudoku can't be Turing-complete because it is finite. 12:01:00 -!- oklopol has quit ("( www.nnscript.de :: NoNameScript 4.02 :: www.XLhost.de )"). 12:06:40 -!- oklopol has joined. 12:21:42 -!- puzzlet has joined. 12:35:54 -!- oerjan has quit ("leaving"). 12:37:58 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 12:50:03 -!- oklopol has joined. 13:59:27 -!- Tritonio has quit (Remote closed the connection). 14:07:12 -!- Tritonio has joined. 15:03:33 -!- kxspxr has joined. 15:03:38 -!- kxspxr has quit (Remote closed the connection). 15:03:47 -!- ehird` has joined. 15:19:08 -!- sebbu has quit (Connection timed out). 15:36:09 -!- sebbu has joined. 15:47:13 Snow. :D 15:47:24 crap snow 15:47:41 15:51:02 -!- RedDak has quit (Remote closed the connection). 15:53:22 ... 15:53:28 what 16:27:00 -!- sebbu2 has joined. 16:43:04 -!- RedDak has joined. 16:43:31 -!- sebbu has quit (Read error: 110 (Connection timed out)). 16:43:32 -!- sebbu2 has changed nick to sebbu. 16:46:29 -!- jix has quit (Nick collision from services.). 16:46:39 -!- jix has joined. 17:39:56 -!- RedDak has quit ("I'm quitting... Bye all"). 17:49:05 -!- Tritonio has quit (Read error: 110 (Connection timed out)). 17:50:30 -!- Tritonio has joined. 17:51:07 -!- Tritonio has quit (Remote closed the connection). 17:52:23 -!- puzzlet_ has joined. 17:52:23 -!- puzzlet has quit (Remote closed the connection). 17:56:15 -!- Tritonio has joined. 17:57:46 -!- puzzlet has joined. 18:09:48 -!- puzzlet_ has quit (Read error: 110 (Connection timed out)). 18:12:07 does anybody use gutsy gibbon? 18:13:42 Certaintly *someone* does. . . 18:13:43 Just not me. 18:13:51 no 18:13:53 0 people use ubuntu 18:13:55 in the world 18:15:54 i mean here... i have a little crazy stupid problem with the windows list applet... 18:24:19 SimonRC: turing complete without unbounded 18:24:45 SimonRC: ? 18:26:53 pikhq: how much do you have? 18:27:01 pikhq: there's barely a dusting on the ground here ;( 18:27:11 no snow here 18:27:12 :) 18:27:15 I'd guess somewhere between 1/4" to 1/2". 18:27:19 Not much, really. 18:27:25 it's how you use it 18:27:35 my contact near denver tells me 4 inches 18:27:48 Well, the Steelers game ought to be interesting, then. 18:27:53 what's that? 18:28:06 Steelers @ Broncos, 6:15PM today. 18:28:10 ... 18:28:19 What? 18:28:20 oh, football? 18:28:23 Yeah. 18:29:17 playing around with stack-based languages is dangerous to the mind... i'm actually considering factor for my next project 18:29:40 Playing around with obfuscating C is pretty dangerous to the mind, as well. . . 18:30:01 you consider obfuscated C for your next project? 18:30:08 job security, i guess 18:30:36 I'm in high school. Coding's just a massive game ATM. ;) 18:30:47 ;) 18:30:53 http://pikhq.nonlogic.org/bubble.c And my, what a fun one. 18:30:59 haha wow, imagine an online game based on coding 18:31:01 that would be odd 18:31:39 oh em gee i'm in high school too 18:31:47 gosh, what a coincidence 18:31:59 pikhq: now do quicksort 18:32:00 ;) 18:32:20 ;) 18:32:42 without recursing 18:32:43 :D 18:33:23 Good idea. 18:33:51 keep lines to 72 characters, and keep it 4 lines or less, so it fits into a sig 18:34:07 extra points for being gcc-only and requiring crazy compiler flags 18:34:21 (you could probably squeeze a lot of the program into flags, knowing gcc...) 18:34:25 * pikhq takes a look at his sane quicksort implementation 18:34:34 I always assume GCC. . . 18:34:47 foo?({goto g;}):({goto h;}) is so much fun. ;) 18:34:49 hmm, if you specify gcc flags though you either need to have it 3 lines so you can fit gcc flags on the last line, or be able to fit a comment into a 4-line block 18:35:32 but - if you can fit a non-recursing quicksort, with the compiler flags (if any) needed to compile it included, in 4 lines or less where a line is 72 characters, then i am amazed 18:35:37 i don't think it's possible :P 18:35:57 Obviously, I'll need to choose a really, really simple pivot algorithm. . . 18:36:06 Hmm. 18:36:12 This could be trickier than I though. 18:36:27 the more flags are required the more fake-points you get :P 18:36:48 I don't think it's possible, with the non-recursing requirement. 18:36:57 if the flags specified require a certain shell to work properly, you get infinity points 18:36:59 :P 18:37:02 hmm 18:37:09 6 lines, then 18:37:12 at 80 characters per line 18:37:17 that gives you some more space :P 18:37:30 It's the non-recursing requirement that makes it tricky, I fear. 18:37:56 ok, then just make it tail-recursive :P 18:38:02 (bam! just-as-hard requirement substituted!) 18:41:39 ehird`: an online game based on coding, eh? 18:41:46 ever heard of Koth.org? 18:42:01 RodgerTheGreat: that's a corewars-alike right? 18:42:07 that isn't really what i was thining :P 18:42:20 hm 18:42:26 more like an MMO or something? 18:42:33 something like that 18:42:36 which would be hilarious 18:42:37 Screw it. 18:42:42 "collect the magic gem of printf!" 18:42:46 I'll just do an obfuscated quine. 18:42:50 I've had some thoughts about it 18:42:59 but collecting commands sounds retarded, I must say. 18:43:04 ;) 18:43:08 pikhq: pff ;) 18:43:11 ok you can recurse 18:43:20 but then 72 characters and 4 lines restriction comes back in 18:43:21 it'd need to be something more like Uplink 18:43:37 ehird`: what's he doing, punching these on cards? 18:43:57 RodgerTheGreat: putting them in ~/.sig, obviously 18:44:02 ah 18:45:29 pikhq: you are of course allowed to use bad practices like old-style definitions 18:45:39 func(a1,a2) instead of int func(int a1, int a2) 18:46:37 bonus points for anything involving comparisons or complex math performed directly upon pointers 18:46:44 it'd be awesome if there'd be a game where each level is a shell, and you need to kinda find out what you can do in it and hack your way into whatever the point of the current level is 18:47:09 RodgerTheGreat: bitwise operations on pointers for mega points 18:47:24 or the goal could always be to crash the system :P 18:47:26 oklopol: there are a few iirc 18:47:29 oh 18:47:38 oklopol: uplink is only tangentally related to that but there are games basically totally like that 18:47:43 maybe not as flexible as you'd like though 18:47:50 can i see one? 18:47:54 ehird`: Of course. 18:48:00 pikhq: :D 18:48:33 ehird`: do you know a name? 18:48:41 nope 18:48:42 q(s)char*s;{ anyone? 18:48:43 wikipedia 18:48:53 pikhq: pff you can get that shorter 18:49:00 why not make it operate on ints? 18:49:01 How? 18:49:11 q(l)int*l;{ 18:49:14 shorter 18:49:17 Then I have to convert the command-line argument to ints. 18:49:22 Which takes space. 18:49:30 oh, i didn't say you had to do command-line arguments 18:49:32 . . . Or I can just cast it. 18:49:33 but ok then :P 18:49:35 YES 18:49:36 cast it 18:49:37 :D 18:49:49 well, i guess casting is bigger, though 18:49:50 For more WTF-ness. :) 18:49:53 Not really. 18:49:55 fun: 18:50:01 *Implicit* casting. :D 18:50:06 mwaha 18:50:07 yes 18:50:10 main(c,v)char*v;{...} 18:50:18 no need to specify the type of c, it's default int :-) 18:50:19 fun 18:50:29 :) 18:50:36 i'm not sure the final ; is vital there 18:50:37 might be 18:50:39 ah probably 18:50:43 since the literal syntax for arrays/structs 18:50:50 We can check. :p 18:50:58 :D 18:51:34 hmph, ehird` is such a fun-ruiner 18:51:38 it'd be extra-funny if you could compact it to three lines without either " or ' (one but not both) 18:51:49 then you could put the compiling command completely in the sig :D 18:52:02 (well, 3 and a half lines, really, since you have the rest of the first one) 18:52:11 that would be really hard though 19:11:10 I've almost succeded. 19:11:15 Somewhre, I have a segfault. 19:11:20 :( 19:11:24 gdb! 19:11:59 It's fairly amusing to see what indent makes of it, though. 19:12:30 haha 19:12:34 show me! :D 19:12:38 (the indent-ed version that is) 19:12:57 http://pikhq.nonlogic.org/quick.c 19:13:14 haha 19:13:31 int *\ns; 19:13:35 that makes no effing sense :D 19:13:40 then again we all know indent is retarded 19:13:55 whoa, uh, you're calling strlen on s 19:14:04 And? 19:14:04 why don't you take length as an extra perameter 19:14:09 then you can have: 19:14:25 g[n], l[n], p = (n / 2)... 19:14:27 it'd be shorter 19:14:28 True. 19:14:38 and, it's just two extra chars in the definition 19:14:44 since you don't have to specify the type sa int 19:15:01 and q(1[v],strlen(1[v])) is still pretty short 19:15:08 overall, it'd be much shorter and much less readable :D 19:15:37 also 19:15:38 char **v 19:15:40 not char *v 19:15:41 for main 19:16:29 I forgot one thing. . . 19:16:34 what? 19:16:45 (BTW, the char *v instead of char**v was the segfault's cause) 19:16:47 Output.\ 19:17:01 puts(q(1[v],strlen(1[v])) 19:17:07 you get a newline free, too 19:17:08 :) 19:17:42 . . . And now it segfaults. 19:17:52 gdb to the rescue 19:17:56 (alternatively, show me the new code) 19:18:00 oh, wait 19:18:03 I only added puts. 19:18:05 what type does q return 19:18:16 a NEW pointer, right? 19:18:17 Unspecified. 19:18:18 or an array? 19:18:23 no i mean what does it return in practice 19:18:24 I need to do a memcpy. XD 19:18:32 thought so 19:18:46 Or output in q itself. 19:18:58 nahh 19:19:02 cause then q wouldn't qsort 19:19:04 it'd qsort-and-print 19:19:12 . . . Right. 19:19:34 so does it work? :D 19:19:40 Or strdup. 19:19:51 strdup is shorter 19:19:53 go for it! :P 19:20:01 And a nice little memory leak. ;) 19:20:05 heh 19:20:14 this does do ascii-sorting for commandline args right? like qsort adb -> abd 19:20:17 Yeah. 19:21:10 is it finalized? 19:21:15 how big is it with 72 char lines? :) 19:21:19 Odd. 19:21:24 It's *still* segfaulting. 19:21:28 With the puts. 19:21:32 well 19:21:35 show me the current code 19:21:39 strdup(s) would *surely* copy s. . . 19:21:48 i might be able to help 19:22:00 Uploaded. 19:22:21 indented or normal? ;) 19:22:28 Indented. 19:22:33 heh 19:22:39 It's still weird, but it's easier to edit. 19:22:53 s[n / 2] 19:22:54 (n / 2)[s] 19:23:00 you're wasting space trying to be clever 19:23:05 I know. 19:23:11 well, isn't that pretty silly? :P 19:23:13 If I don't fit the space bounds, I'll get rid of that. 19:23:22 you get extra points for smaller code ;p 19:23:57 x = 0, i = x, j = 19:23:57 (i ^= i) 19:23:57 isn't that equiv. to x=i=j=0? 19:24:10 Yes. 19:24:11 :) 19:24:24 sheesh, this isn't obfuscation, it's golf :P 19:24:58 x=(i=(x=(j=0))); or x=0,i=x,j=(i^=i);? 19:25:42 My version, by my count, is the same length. . . 19:25:46 But more WTF-y. 19:26:07 x=0,i=x,j=(i^=i) 19:26:07 x=i=j=0 19:26:13 you have duplicate x= 19:26:16 and you don't need the prens 19:26:19 *parens 19:26:53 x=i=j=0; doesn't compile. 19:27:10 wha? 19:27:11 And the parens wouldn't help. 19:27:14 i'm pretty sure it does 19:27:17 why doesn't it 19:27:25 int x=i=j=0;. 19:27:26 ;) 19:27:44 ahhh 19:27:55 aern't ints 0 by default? 19:27:59 i mean, its unportable 19:28:00 but... 19:28:10 In a function, no. 19:28:14 give it a try, you could reduce it to: x,i,j 19:28:17 i'm pretty sure they are 19:28:21 at least with default gcc 19:28:21 No. 19:28:40 Believe me, they're not 0. 19:28:54 If they're declared *outside* a function, they are, though. . . 19:29:32 gogogogogogo 19:29:34 global rangers! 19:30:57 Now, do you know how that segfaults? 19:31:08 nope but i will in a few minutes 19:31:09 brb. 19:36:06 -!- g4lt-experienced has changed nick to glt-mordant. 19:36:14 -!- glt-mordant has changed nick to g4lt-mordant. 19:39:19 -!- puzzlet_ has joined. 19:41:21 -!- oerjan has joined. 19:42:00 ok 19:42:03 when i say a few minutes 19:42:05 i mean ten 19:42:33 pikhq: well how about this 19:42:34 return 1[s] ? s : 0; 19:42:37 the first line of q 19:42:43 all the other code is, uh, not executed. 19:43:04 Shit. You're right. 19:43:12 ahahahahahahaha 19:45:37 http://fabrice.bellard.free.fr/otcc/ ok, this is awesome :-) 19:45:52 i now have an urge to write a small c compiler not obfuscated but compact 19:46:07 Which means there is *still* a segfault. :( 19:46:20 pikhq: use gdb damnit!! 19:46:21 Caused by puts. 19:46:25 I will. . . 19:46:26 hm 19:46:28 yeah 19:46:29 use gdb 19:48:37 The fuck? 19:48:42 ./a.out cb 19:49:00 i don't have a c compiler on this system (stuck on windows atm) 19:49:02 what does it output 19:49:06 It calls q, then gets to "1[s] ? ({return s;}):0;". . . 19:49:09 And returns. 19:49:16 that's the first statement in q 19:49:18 i told you that 19:49:24 anyway 19:49:28 indent shows it as 19:49:30 wait 19:49:31 I changed that statement so that it doesn't always return. 19:49:33 of course 1[s] is true 19:49:38 is 'c' true? 19:49:38 yes! 19:49:42 so, it runs return s 19:49:47 so q is just returning your input 19:49:55 Dammit. Need !1[s], don't I. XD 19:50:02 orrr just: 19:50:07 Switch it around. 19:50:10 1[s]?0:({return s}) 19:50:11 yes 19:50:12 but 19:50:14 why are you doing that 19:50:25 Hmm. . . 19:50:32 i mean... what's the point? 19:50:33 That's a good question. 19:50:45 remember 19:50:52 s[1] will just segfault, mostly 19:50:56 why? because it's int* 19:51:06 if you q(0, { }) 19:51:07 -!- puzzlet has quit (Read error: 110 (Connection timed out)). 19:51:10 s[1] -> BOOM anyway 19:51:15 so, just check length for 0 19:51:26 I want it to return when n>=1, not when s[1]==NULL. 19:51:49 what is n? sorry, i have not analyzed the code in depth 19:52:19 n is the length of the array. . . 19:52:27 Or, at least, should be. 19:52:28 right, right 19:52:30 that's what i meant 19:52:39 "so just check length for 0" 19:54:28 Shouldn't x[s] ? test for NULL? 19:54:42 err i guess 19:54:49 i thought length would be 0 on empty string 19:56:40 I think the bit about int*s rather than char*s is causing *this*. . . 19:57:33 And now I started something *completely different* into a segfault. 19:57:50 4 puts (q (strlen(v[1]),1[v])); 19:58:03 That line, before q gets called, is causing a segfault. 19:58:07 . . . Oh. 19:58:11 oh what 19:58:12 set args abc 19:58:13 Duh. 19:58:18 ...... 19:58:20 sifg. 19:58:21 *sigh 19:59:08 And now my recursion is done wrong. 19:59:13 q(l). XD 19:59:17 XDE 19:59:18 *XD 20:01:49 Interesting. . . 20:02:00 q(3, "c") gets called. 20:02:09 do you subtract from length each recurse? 20:02:20 :) 20:02:23 I do strlen with recurse. 20:02:31 right, well don't i think 20:02:33 just subtract manually 20:02:42 (gcc 3.4.4 good enough to compile this? I assume so :P) 20:02:44 (Bloody cygwin) 20:04:08 (yes) 20:04:13 (I hope) 20:04:54 not there 20:05:13 ? 20:05:23 ihope 20:05:43 heh 20:06:52 Now to figure out how q(3,"cba") calls q(1,"\0x01") and q(1,"c"). . . 20:07:49 Although it's easy to see how it segfaults. 20:08:10 That first line's return s;? Yeah, s gets freed in that return. ;) 20:08:33 hah 20:08:39 * ehird` presses Next >, hopes cygwin server doesn't suck 20:08:42 Now, I've just got a fucked up quicksort. 20:08:53 hmm, 150kb/s 20:08:55 not bad 20:09:04 (fucked up, as in "returns 'c\0x01' for 'cba'") 20:09:11 * ehird` is installing cygwin on this machine out of frustration 20:09:17 i'll compile and debug your code soon, pikhq ;) 20:09:32 (right after laughing at xeyes working on windows) 20:10:12 Latest version uploaded. 20:10:40 * ehird` wonders how big an x11 binary is 20:10:55 thank god i'm getting rxvt-unicode though 20:10:59 i am getting tired of cmd 20:12:27 cygwin 30%, not to obad 20:22:24 * pikhq thumbtwiddles, refusing to work on it for a while 20:22:39 :P 20:22:46 i'll be more help when cygwin installs 20:26:21 DAMNIT! 20:26:25 I closed it by mistake... 20:26:35 and lost all the package selections :'( 20:28:03 that's - ominous 20:28:12 :( 20:28:16 * ehird` goes through the whole list again 20:28:20 thankfully! it doesn't have to redownload. 20:28:24 it saves all the files it's downloaded. 20:28:28 but... i have to remember WHAT i wanted.. 20:29:05 i guess that's a good rule in general: always remember what you want 20:29:17 * ehird` hunts down where cygwin1.dll was 20:29:24 it crapped out on that at some point too 20:30:47 ok, WTF 20:30:59 cmd tab completion - and cygwin setup - finds c:\windows\system32\cygwin1.dll 20:31:01 but it's NOT THERE 20:31:13 wtf, notepad sees it 20:32:49 ... 20:33:01 yeah. 20:33:07 it isn't in explorer's list or `dir` 20:33:13 yet setup.exe sees it, and so does notepad 20:33:17 and del claims Could Not Find 20:33:22 lolololololololololol. 20:33:25 windoze. 20:36:04 wild guess: maybe it's a hidden file? 20:36:22 del removes hidden files and i have hidden files to show in explorer 20:42:56 finally 20:42:56 fixed 20:43:00 now to remember which packages i did 20:43:07 pikhq: soon, soon, i'll help ;) 20:43:39 :) 20:44:02 i wish cygwin would look BEFORE installing all that crap though 20:48:05 gogogogogo install 20:53:37 on to post-install, pikhq 20:53:46 i shall be gcc&gdb-helpering you very soon :P 20:54:26 bah, dtrace FTW 20:54:35 -!- Tritonio has quit (Read error: 110 (Connection timed out)). 20:54:41 that's not the point, i mean just cygwin :P 20:54:49 woot 20:54:50 installed 20:54:55 w00t. 20:54:55 * ehird` starts rxvt-unicode, hopes 20:55:29 well, just bash first 20:55:30 to test 20:55:45 test@f6b2c69 ~ 20:55:45 $ gcc --version 20:55:45 gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125) 20:55:46 woot! 20:55:58 -!- Tritonio has joined. 20:57:02 hmm 20:57:07 urxvt won't run. 20:57:23 nor does any x11 app 20:57:24 wait 20:57:26 did i start x11? 20:57:48 answer: no 20:57:50 lol am dum 20:58:25 XD 20:58:41 Any reason for Cygwin having GDC? 20:58:48 gdc? 20:59:08 the d compiler? 21:00:41 Yeah. 21:00:52 because it has software 21:00:52 :P 21:00:53 woot 21:00:54 xeyes runs 21:01:56 * ehird` gets himself some of dat urxvt runnin' 21:02:21 YOU ARE TALKING :OOOOOOOOO 21:02:36 yes 21:02:37 i am? 21:03:33 that is all. 21:08:31 jesus christ 21:08:34 god damn windows 21:08:37 its frozen up the start menu 21:08:41 so i'm talking blind 21:09:01 kill'd explorer 21:09:49 now 21:09:53 time to make an urxvt shortcut 21:11:57 gosh, cygwin is ugly 21:11:59 and hacky 21:19:07 bah 21:19:29 i'm currently suffering without it 21:19:41 i need scp 21:19:56 * ehird` asks in #cygwin how to make the shortcut 21:22:36 http://www.yale.edu/ypu/blog/ninja1.JPG 21:22:40 LOOK FEMALE NINJA 21:23:40 hot. 21:24:14 not really. 21:25:04 shirt ninja 21:28:40 But she's an *RMS* groupie. 21:28:44 You sure you want that? 21:29:10 copyleft ninjas? 21:29:11 i'd do rms 21:29:18 bsmntbombdood: oh god 21:29:29 you know what? i hate you 21:29:29 :P 21:29:36 oerjan: Reenacting xkcd. ;) 21:29:43 why? because rms loves me more than you? 21:29:47 http://upload.wikimedia.org/wikipedia/commons/c/cf/Portrait_-_Denmark_DTU_2007-3-31.jpg sexy rms! 21:29:55 XD 21:30:53 OH DAMN 21:30:56 * bsmntbombdood changes his pants 21:31:00 lmao 21:31:14 http://upload.wikimedia.org/wikipedia/commons/6/64/Wikimania_stallman_keynote2.jpg 21:31:46 he could stand to lose some weight 21:32:41 If he cut his hair & bear, he'd probably lose a good 20 pounds. :p 21:32:45 s/bear/beard/ 21:33:19 this is all academic, rms is a crazy hobo and would kill you for even suggesting that he is not perfect 21:33:20 ;) 21:33:34 fine, s/weight/paunch/ 21:33:48 because cutting his hair and beard would make him not rms 21:34:01 i think that would be a good thing 21:34:03 :) 21:39:40 -!- RedDak has joined. 21:41:37 -!- puzzlet_ has quit (Remote closed the connection). 21:41:38 -!- puzzlet has joined. 21:43:34 ehird`: Any ideas? 21:44:09 pikhq: asking in #cygwin 21:44:15 then i can get urxvt 21:47:33 woot 21:47:34 i did it 21:48:09 pikhq: okies here goes 21:48:14 w00ts. 21:48:24 sorry for, heh, taking 2 hours 21:49:25 ok 21:49:28 your problem seems to be 21:49:30 actually 21:49:32 your problem is 21:49:37 is that q has a type of int, by default 21:49:40 so, when it returns the string 21:49:43 it returns (int)string 21:49:49 and then puts(an_int) is called 21:49:57 gcc just told me this when i compiled it. 21:51:36 n>2?0: ({return strdup(s);}); does not do what you think it does 21:51:43 you want: (n>2)?0: ({return strdup(s);}); 21:51:54 right now it is: 21:52:02 n > (2 ? 0 : NEVER EXECUTED) 21:52:05 -> n > 0 21:52:06 -> nop 21:52:30 at least, i think so, pikhq 21:53:10 ok, you are doing something wrong with l and g 21:53:18 since they become things like "0K\020ac^\200|{j\020@" 21:53:27 pikhq: i doubt any of that is helpful, but :) 22:00:00 I know something is wrong with l and g; that much is obvious. :p 22:05:23 back 22:05:25 heh 22:05:27 ok, let's see 22:05:56 x[s] is just checking the first character isn't 0, so i can safely assume the first block is being executed... let me see... 22:06:13 p is half-way through the string, the pivot... 22:06:33 x <= p 22:06:33 if we are earlier than the pivot in the string, ... 22:06:38 ok, that's not fucking up obviously :P 22:06:54 er, wait 22:06:57 if this is less than the pivot 22:06:59 right, got it 22:07:09 BTW, that q returns an int doesn't matter. . . The call to puts makes it basically puts((char*)(int)(char*)"foo");. ;)' 22:07:10 pikhq: you mean: if x[s] <= p 22:07:23 . . . Oh, duh. 22:07:26 That would do it. 22:07:31 lololololololol 22:07:33 ;) 22:07:42 i'll make that change in my copy so You Don't Have To 22:07:51 That makes it output ac instead of abc. ;) 22:08:08 right, i think it's because of the \0 at the end of the strings 22:08:15 strip it somehow, so that n is actually the length of s 22:08:56 oh, also... 22:09:04 you aren't clearing out g[n] and l[n] to 0. 22:09:09 you should zero them out 22:09:16 memzero if i am not mistaken 22:10:12 *That* is a signifigant issue. 22:10:24 Heisenbugs will abound because of that mistake. . . 22:10:26 which? the \0 on the string or the non-zeroing-out g and l 22:10:33 heisenbug 22:10:34 i like it 22:10:43 Non-zeroing-out g and l. 22:10:47 thought so 22:11:08 upload a new version its a major enough change after that =) 22:11:32 Now, what's a good esoteric way to add in bzero? 22:11:53 just do memzero(ptr, size) 22:12:00 bzero, not memzero. 22:12:09 I want it esotericy, though. 22:12:14 ok 22:12:38 bzero(bzero(g,n)&&l,n) 22:12:38 :P 22:12:56 hm 22:12:59 bzero is deprecated 22:13:05 why not just memset(ptr,0,n) 22:13:51 Deprecated is even more cause for it. ;) 22:14:05 oh come on, esoterica yes but we don't want to make this break in the future ;) 22:14:15 Too late. 22:14:23 blargh ok :P 22:14:25 My function definitions are already depricated. 22:14:30 hehe 22:14:31 new version@ 22:15:08 BTW, void value not ignored as it should be for your suggestion. ;) 22:15:31 bzero((bzero(g,n)&&l)||l,n) 22:15:34 of course 22:15:36 why use & and |? 22:15:38 er 22:15:39 && and ||? 22:15:44 you could probably use & and | 22:15:46 bzero returns void. 22:15:49 argh 22:15:50 damn 22:15:51 well 22:15:56 fit some bitwise pointer arithmetic in there 22:15:58 :-) 22:16:31 Memset, however, returns void*. ;) 22:17:09 MWAHAHA :D 22:17:12 yes yes yes 22:17:31 I'll use both and some bitwise stuff. ;) 22:17:45 (um, does this still fit in 4 72-character lines?) 22:17:59 Um, dunno. 22:18:29 i'll compress the current version to see 22:19:22 Still a Heisenbug, though. . . 22:19:31 cba, sorted, is apparently bac. 22:19:46 And acb is a segfault. 22:19:58 Uploaded the new one, though. 22:20:12 let me tell you something 22:20:16 run in gdb and step over 22:20:22 That's my plan. 22:20:24 when a nested q call is made 22:20:31 you will see that, the strings have loads of garbage 22:20:33 in the argument 22:21:06 pikhq: good news 22:21:07 it fits 22:21:09 Not now. 22:21:34 http://www.nonlogic.org/dump/text/1193001671.html 22:21:39 please ignore the automatic indesntation... 22:21:47 I'm getting just q(1, "c") and q(2, "ba") called. 22:21:53 ok 22:22:00 well 22:22:07 wait!1 22:22:08 i know!! 22:22:18 s/(n>2)/(n>1)/. . . 22:22:19 when yu copy to the two arrays 22:22:25 you don't copy the whole thing 22:22:26 so 22:22:30 they won't have \0 in 22:22:31 BUT 22:22:33 they are passed to q 22:22:35 which calls strlen 22:22:54 The behavior you're trying to explain does not *exist* here. . . 22:23:08 solutions: 1. pass i and j instead of a strlen 22:23:19 ./a.out cba sorts right. 22:23:34 Everything else. . . Segfaults. 22:23:35 gdb'ing. 22:24:22 cab works 22:24:26 it sorts to acb though 22:24:38 I'm getting infinite recursions. 22:24:57 Which is causing the segfault. 22:25:51 ok, just change 22:25:54 q(strlen(l),l) to: 22:25:57 q(i,l) 22:26:00 and q(strlen(g),g) 22:26:00 Although I must salute my system for going through at least 25473 recursions. 22:26:06 to q(j,g) 22:26:12 i bet it will work 22:26:47 Nope. 22:26:55 Still have infinite recursions. 22:27:01 (n>1)?0: ({return strdup(s);}); 22:27:02 i'll gdb 22:27:10 This is the offending line, I fear. 22:27:14 pikhq: are you sure that actually returns 22:27:19 i think it'll only return from the {} block 22:27:32 If n>1, yes. 22:27:35 Erm. 22:27:38 If n<1. 22:27:47 Otherwise, it goes on. 22:27:58 See what happens with q(2, "ab"). . . 22:28:02 ok, let's just go through this mechanically: 22:28:09 let's use "hello" as arguments 22:28:20 now, lots of stuff goes okay, then we recurse into n=1,s="o" 22:28:30 this goes fine and returns 22:28:34 now, we get into n=4 s="hell" 22:28:46 The pivot is l again. 22:28:59 Thus, we get to n=4, s="hell". 22:29:11 then, it goes through 22:29:14 and recurses n=0 s="" 22:29:19 which returns 22:29:21 !!!! oh my 22:29:23 Huh? 22:29:32 then we get to... n=4 s="hell\002" 22:29:43 Just n=4 s="hell" over here. 22:29:50 oh. well... ok 22:29:54 maybe it's because i modified my version 22:29:55 heh 22:29:55 ok 22:30:01 Which obviously loops forever. 22:30:06 right, wait 22:30:08 i think i know why 22:30:15 Pivot selection. 22:30:21 well, yeah 22:30:44 i'll try and write a better pivot 22:30:50 -!- oerjan has quit ("Good night"). 22:30:54 hmm, but what 22:31:55 how about we just make it choose a random pivot :-) 22:32:09 :) 22:33:32 q (n=3, s=0x7ffff7ac6580 "abc��\177") at quick.c:9 22:33:37 ?!? 22:33:56 yeah i think we have a problem here 22:34:16 hey, how about you ask #c? AHAHAHAHAHAHAHAHAHAHAHAHAHAHAH-ehm. 22:34:28 (also known as the least helpful channel on freenode) 22:34:52 i wonder if poppavic still goes there, he had a really good continuous stream of nonsense generator installed in his brain 22:35:35 How's about p = (rand()%n)[s] instead of p=rand(). :p 22:35:43 ooh, interesting idea ;) 22:35:45 but... 22:35:49 doesn't rand() return, uh, a float? 22:35:50 from 0 to 1 22:35:57 No. 22:36:00 hm, ok 22:36:07 It returns an int from 0 to MAXINT. 22:36:09 Erm. 22:36:11 MAXRAND. 22:36:13 crazy c ;) 22:36:30 There should be a better pivot selection, though. 22:36:38 ehm 22:36:42 this new version with random pivot 22:36:45 sorts acb to acb 22:36:46 Works. 22:36:52 Odd. 22:37:03 test@f6b2c69 ~/cygwin 22:37:03 Maybe you've got other changes? 22:37:03 $ ./a.exe yourmom 22:37:03 mmooryu 22:37:11 also it sorts hello to hello 22:37:19 New version uploaded. 22:37:24 http://www.nonlogic.org/dump/text/1193002622.html mine 22:37:32 It segfaults on hello, though. 22:37:56 Heisenbugging. 22:37:58 does it sort bytes? 22:38:23 It sorts cbaefgh to, alternately, abcefgh, segfault, and abce�fg. 22:38:38 acb is a heisenbug 22:38:42 i just tried it three times 22:38:45 it sorted to "abc 22:38:48 a blank output 22:38:49 and abc 22:38:57 You need (n>1), not (n>2). 22:39:02 so you're doing things with the pivot wrong 22:39:02 and 22:39:05 i just downloaded your version 22:39:32 anyway 22:39:37 fix what you're doing with the pivot :P 22:39:42 because ANY pivot should work 22:40:13 *Should*, not is. ;) 22:40:39 i'm going to write CRAZYSORT! 22:40:46 which is my crazy sort algorithm which is like a fucked up quicksort 22:40:47 ;) 22:42:16 I've discovered that, somehow, having two elements equal to each other *guarantees* a segfault. 22:42:23 haha 22:43:15 And it's still heisenning. 22:43:23 you need to have nullity support ;P 22:43:41 haha, g4lt-mordant 22:43:48 it's SUPER-TURING! 22:43:50 ;) 22:44:42 The Missed Symphony - Classical Mushroom - Infected Mushroom 22:51:44 * pikhq still doesn't see *what* is fucked up here 22:53:48 tee hee my algorithm is really funny 22:54:05 it's basically quicksort, except the pivot is the first element, and i only sort the right list 22:55:20 hmm 22:55:31 http://fabrice.bellard.free.fr/otcc/ 22:55:34 inspiring ;) 22:55:38 i might write a compiler like that 22:55:45 *Doh*. 22:55:51 compiles just a small enough subset of c to do basic stuff and compile itself 22:56:00 It may help to have a pivot that's *in the list*. 22:56:09 pikhq: wow, really? 22:56:44 That doesn't explain the infinite recursion of sorting "ab", though. 22:58:05 Sure, it select b as the pivot. . . 22:58:12 hmm, actually a c compiler should actually be TRIVIAL to write... 22:58:16 a simple, old-style one 22:58:26 especially the parsing, you could write a very simple parser by hand 22:59:06 i mean, what does it take to parse: NAME "(" [NAME ","...] ")" VARS BLOCK? 22:59:28 i'd bet the parser for functions would just be a few lines, and only need to call the name, maybe namelist, declarations and the block parser 22:59:37 plus it isn't exactly hard to compile... 22:59:37 hmmmm 23:02:03 -!- GreaseMonkey has joined. 23:02:49 I suspect that my quicksort implementation has something fundamentally wrong. 23:03:22 hmm, otcc, unobfuscated, with all comments and whitespace, is just 632 lines 23:03:26 and it compiles itself 23:03:26 amazing 23:03:41 Otcc, unobfuscated, is what we call "tcc". 23:03:48 no 23:03:50 different codebase 23:03:57 By the same guy. . . 23:04:00 sure 23:04:03 look 23:04:04 http://fabrice.bellard.free.fr/otcc/ 23:04:09 he officially provides non-obfuscated versions 23:04:09 And from the same code base. . . 23:04:12 not just a link to tcc 23:04:15 they're different, ok?! 23:04:18 tcc is much expanded 23:04:25 otcc is a lot simpler and only compiles basic code 23:04:28 Although tcc has had many features added since he started on tcc and otcc. 23:04:40 exactly, they're practically seperate now 23:05:08 look at otccn.c 23:05:11 it's way different from tcc 23:05:16 and much easier to read for me 23:05:20 and also very very VERY tiny 23:09:37 i did a program that sorts the byte of argv[1] in 144 bytes 23:09:41 *bytes 23:09:46 jix: with quicksort? 23:09:50 nope ;) 23:10:05 bogosort? 23:10:10 nope 23:10:15 bubblesort? 23:10:18 mergesort? 23:10:20 nope 23:10:26 it runs in linear time 23:10:34 some sort of trick, then? ;) 23:10:39 quantum bogosort? 23:10:42 nope 23:10:48 oh just tell me 23:10:56 bucket sort 23:11:08 the number of different items that can be sorted is finite 23:11:13 so it can be done in linear time 23:11:23 and as the number is small it can be done very fast in linear time 23:11:32 main(c,v)unsigned char**v;{unsigned int q[256],x=0;++v;while(255&++x)x[q]=0;while(**v)++q[*(*v)++];while(255&--x)while(q[x]--)*--*v=x;puts(*v);} 23:14:15 -!- RedDak has quit (Remote closed the connection). 23:16:07 =) 23:16:19 how it works should be obvious from the source 23:17:26 uh the ints don't have to be unsigned 23:17:40 main(c,v)unsigned char**v;{int q[256],x=0;++v;while(255&++x)x[q]=0;while(**v)++q[*(*v)++];while(255&--x)while(q[x]--)*--*v=x;puts(*v);} 23:17:46 135 byte 23:22:33 pikhq: how is it doing? 23:22:34 by the way 23:22:37 random pivot idea 23:22:42 sum(list)/length(list) 23:22:50 probably too long to run btu eh 23:22:51 but eh 23:23:24 strcat() is a bad choice for combining the two strings. . . 23:25:00 orly? 23:25:24 http://en.wikipedia.org/wiki/Orly_Airport <-- lol 23:29:16 -!- jix has quit ("CommandQ"). 23:31:28 Orally Airport. 23:34:07 -!- puzzlet_ has joined. 23:34:07 -!- puzzlet has quit (Remote closed the connection). 23:34:25 someone propose an esoteric and silly sorting algorithm idea so i can implement it :P 23:37:57 Stooge sort. 23:38:02 = 23:38:03 what 23:38:11 Wikipede it. 23:38:27 nice time complexity 23:40:28 bubble sort is my favorite 23:40:47 stooge sort is the one by knuth right? 23:40:55 stooge sort is a joke sort 23:41:03 oh, nope 23:41:05 bubble sort really sucks anyway :P 23:41:24 the knuth one i'm thinking of has factorial time complexity 23:41:55 it rearanges the array randomly untill it's sorted 23:41:58 bogosort 23:42:34 ahh yes 23:45:46 "Satanic music, jazz, and swing, result from marijuana use." 23:46:19 haha where's that from 23:46:24 (... it is satirical right?) 23:46:46 nope, not satirical in the least 23:46:50 http://www.heartbone.com/no_thugs/hja.htm 23:47:15 direct quote from the commisioner of the burea of narcotics 23:48:40 "...the primary reason to outlaw marijuana is its effect on the degenerate races." 23:48:44 lolololoLOOOOOOOOL 23:48:47 yeah 23:49:10 he appears to mention nothing about the obviously superior whites using ti :P 23:50:57 however that heartbone.com site is kind of kooky, it has a link on the home page: Theory on the fundamental nature of the physical universe, which links to a page with many animated "UNDER CONSTRUCTION" gifs and the title "HeartBone Physical Universe Theory Page" 23:51:26 ya lol 23:51:49 "THE PHYSICAL UNIVERSE IS COMPOSED OF 2 PARTS POT AND ONE PART WHOOOAAA DUDE" -- leaked copy of the theory 23:56:09 haha i'm throwing random shuffling code together and calling it a sorting algorithm 23:56:26 my favourite so far is BONOSORT! 23:57:32 -!- sebbu has quit ("@+"). 23:57:37 get an output list and an appended list. reverse the list. for every index i in the list, if i is the last element in the list, skip this. otherwise, if the element is greater than the next element of the list and the next index in the list is not in appended, append the next element to the result and append the next index to appended. then: if i is not in appended, append the element to the result 23:57:43 it produces... something that isn't sorted :D