00:09:36 -!- Asztal has quit (Read error: 113 (No route to host)). 00:53:51 -!- ivan` has quit (" HydraIRC -> http://www.hydrairc.com <- IRC with a difference"). 01:32:24 -!- ivan` has joined. 01:36:58 -!- Asztal has joined. 01:39:15 -!- Asztal has quit (Client Quit). 02:28:14 -!- Renan_s2 has joined. 02:28:25 -!- Renan_s2 has left (?). 03:28:58 -!- jix_ has quit ("Bitte waehlen Sie eine Beerdigungnachricht"). 03:48:30 -!- RodgerTheGreat has joined. 03:48:48 howdy! What's everyone been up to during their vacation? 03:56:22 Traveling to malodruos places 04:52:18 hmmm... standardization should bear in mind the option of flexibility of the standard... 04:52:38 forwards-compatibility? 04:52:40 Maybe there should be a meta-standard... some sort of standardization for how to define standards. 04:52:49 basically... yes. 04:53:17 It can become impossible to change a standard once it gains inertia. 04:53:41 Unless you have some way to easily redefine your standard so that all parties are aware of the change. 04:54:19 well, HTML has done a pretty good job of growing over time without breaking itself, although it's certainly starting to show it's age 04:55:03 Telnet is strangely good at allowing changes in standard. 04:55:26 since you usually do a transaction to see if both sides are simplementing the same option. 04:55:47 You can do version checks and such. 04:56:57 * CakeProphet begins crafting the "protocol protocol"... a protocol for specifying your protocol. 05:00:14 If the data contains instrunctions about the specifics of its protocol.... making changes in a protocol become less difficult. 05:01:14 how you would create such a general meta-protocol is beyond me at the moment. 05:05:31 bonus points for creating a meta-protocol whose semantics themselves constitute a turing-complete system 05:06:36 Neat. 05:07:21 Once I start working out the specifics I'll begin specifying commonly used standards and protocols in my meta-protocol... so I can work out the specifics? 05:07:32 thiink it constitutes as an esoteric language? :D: :D :D 05:07:48 Maybe if I make it with strange syntax and concepts... 05:09:09 hm 05:09:22 sounds like you have a concept there 05:10:53 g'night everybody 05:10:57 see ya 05:11:12 -!- RodgerTheGreat has quit. 05:21:58 -!- CakeProphet has quit ("haaaaaaaaaa"). 06:04:29 -!- CakeProphet has joined. 06:14:45 -!- calamari has quit ("Leaving"). 06:32:28 CakeProphet: You can look at A/BNF for inspiration. 06:42:42 hmm? 06:43:49 hehe sorry if it takes a while to reply 06:44:34 * CakeProphet is learning dvorakv 06:59:07 Good god, people still use QWERTY? 06:59:40 Augmented/Backus Naur Format. 07:00:15 It's pretty much the defact parser/protocol description pseudo-language, and it's used by parser generators to generate parsers for the protocols. 07:02:03 *defacto 07:05:49 but it only expresses syntax... not what it means 07:07:28 Yup. Same with A/BNF. 07:08:09 I was talking about a/bnf 07:08:17 Oh. 07:08:19 it doesn't represent the meaning of syntax 07:08:32 Inspiration, I said. 07:08:54 the idea is to have a language for describing your standard... so that making changes to a standard simply requires you to change the metalanguage describing your standard. 07:09:15 G'luck with it. 07:09:25 so the inertia of a popular standard doesn't make it linger around longer than it should (like QWERTY persisting over dvorak) 07:09:38 Oh and look at the billions of other structure descriptions out there too. 07:09:51 *structure description languages 07:09:59 Like XML and stuffs. 07:16:08 hmmm... xml doesn't seem to have protocol implementation in mind. 07:16:33 It's too verboose for something like that. 07:19:44 -!- oerjan has joined. 07:37:50 hehe... there should be key layout designed for programmers 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:34:57 -!- oerjan has quit ("Later"). 09:27:31 oh, I missed the discussion on languages of yesterday 09:33:09 i can't learn anything besides qwerty because i've got qwerty memorized in 20 different hand positions and have spinal reflexes for error-correction 09:33:17 trying to switch is the worst mental exercise ever 09:33:33 and 100wpm is fast enough for me 09:48:11 agree 09:49:08 it's like that braindamaged standard that Gnome usability "experts" are trying to impose 09:51:18 (the "yes" button in the far right; the "cancel" button next to it and to the left and the "no" button next to the cancel one) 09:51:53 e.g. in "Save work?" dialogs 09:55:40 re languages, I think you must be a polyglot in a sufficient number of languages if you want to take different projects, since every project has a set of "adequate" languages, a set of "inadequate but feasible" languages and a set of "infeasible" languages 09:56:08 here, "infeasible" means for practical purposes 09:56:47 (the first two sets may even be empty) 09:59:13 nobody would write an OS or a RDBMS in JavaScript (I think) 10:00:15 nobody can write anything but JavaScript and (in some cases) VBScript in a web page (with a relaxed sense of "nobody" but you get the idea) 10:01:24 nobody would write a program like InkScape in assembler 10:02:05 nobody would write a library like GMP in anything other than assembler and C 10:02:45 (aiming for the best possible speed, that is) 10:03:05 there's an orthagonally persistent operating system being written in Python. 10:03:11 or.. "mostly" Python. 10:03:53 nobody would write a program to find (not just search) the factorization of Fermat numbers in Python 10:04:09 even if it has the support needed 10:04:30 I didn't exclude Python for OSes :) 10:05:24 hehe... a Perl operating system :D 10:05:31 yesterday I found myself looking for the best language to write a simple application that represents a graph, with the limitation that it must support arbitrary precision (and not lots of speed) 10:05:32 written in one file. 10:07:28 after checking that my PHP installation did not support GMP, I tried generating a PBM in C and viewing it with an external viewer. It worked but it required too many steps for it to be uselful to explore the graph. 10:07:59 I ended up learning a bit of TkInter and writing it in Python. 10:08:22 My point is that every project has an adequate language (and it can be subjective). 10:11:50 (the result is here: ) 10:13:44 damn, my server still breaks with python files even if they're renamed as .txt 10:16:23 http://www.formauri.es/personal/pgimeno/temp/functional-art.txt 10:16:26 rename to .py 10:19:07 oh, and you can write a Malbolge interpreter in Python but it's pretty slow 10:19:31 (or at least that's my experience) 10:24:31 the 99bob takes ages (it takes 13 million Malbolge instructions to complete IIRC, not negligible if the underlaying language is slow) 10:32:41 Python is usually adequately fast for my purposes. 10:34:08 its also the programmer that makes the program slow ;;) 11:20:59 try to write a Malbolge interpreter in Python, it's pretty simple 12:02:20 then compare the C version with the Python version when running 99BOB 13:43:12 -!- Asztal has joined. 14:42:30 -!- jix_ has joined. 15:02:56 -!- Asztal has quit (Read error: 113 (No route to host)). 15:06:22 -!- pikhq has joined. 15:07:08 -!- pikhq has quit (Client Quit). 15:07:22 -!- pikhq has joined. 15:07:43 Sorry; needed IRC in my screen session. 15:08:58 http://pikhq.nonlogic.org/bfm.tar.bz2 15:09:06 http://pikhq.nonlogic.org/basm.tar.bz2 15:09:24 We're under the 5000 character mark on basm. . . :) 15:32:51 4629 characters for EOF=0, 4282 for EOF=-1. 15:43:15 * pikhq assumes nobody's in the mood to care ATM 15:48:12 ba 16:08:12 -!- theblue has joined. 16:08:18 'Lo. 16:09:19 Hi. 16:26:45 * pikhq wonders what to code. . . 16:29:04 recode it all 16:29:08 it all sucks 16:29:12 i mean, everything 16:29:34 BFM? 16:29:38 no 16:29:48 But. . . I've already written that. . . 16:29:50 Twice! 16:29:56 not your programs 16:29:56 Oh. 16:30:00 programs in general 16:30:03 they suck 16:30:03 * pikhq no wanna 16:30:09 you should rewrite them 16:30:11 really 16:30:20 The programs I use kick-ass, actually. 16:30:21 :O 16:30:26 really? 16:30:29 what are they? 16:30:35 Ratpoison. 16:30:38 GNU Screen. 16:30:40 Emacs. 16:30:42 Eww! 16:30:45 cool 16:30:46 That one DOES suck. 16:30:46 Firefox (with Conkeror). 16:31:03 firefox sucks! 16:31:04 :D 16:31:10 There is no OS but GNU, and Linux is one of it's kernels. 16:31:14 oklopol: Not with Conkeror. 16:31:20 pikhq: I know, but Emacs sucks. 16:31:20 Gives it Emacsy bindings. 16:31:21 what is it? 16:31:24 pikhq: Use vim. 16:31:46 i'll prolly say it sucks if it's graphical and has a non-touring complete interface :) 16:31:46 theblue: Blasphemer. 16:31:54 pikhq: Elitist. 16:31:54 not and, or 16:31:59 Javascript is Turing complete. 16:32:13 It's semi-graphical. 16:32:28 but, the browser itself is not a console with commands that load pages etc 16:32:35 so it sucks! 16:32:35 :D 16:32:45 oklopol: elinks? 16:32:47 oklopol: w3m? 16:33:35 oklopol: Actually, with Conkeror, that's about what it is. 16:34:01 :O 16:34:02 cool 16:34:28 but i'll wait 10 years and hopefully be able to make my own systems 16:34:36 or 30 16:34:39 i have time 16:39:48 -!- Asztal has joined. 16:40:18 Saluton. 16:50:17 * pikhq hugs ratpoison 16:55:28 :O 16:55:33 not safe! 17:10:19 Yes, it is. 17:19:03 YOU are safe! 17:19:26 * pikhq feels his flesh melt from the laptop's compile job 17:34:25 -!- theblue_ has joined. 17:55:40 -!- theblue has quit (No route to host). 17:59:05 -!- oerjan has joined. 18:03:12 -!- calamari has joined. 18:03:22 Hey. 18:05:58 oerjan: New release of BFM and Basm is up, if you care. 18:06:06 basm? 18:06:18 calamari: My Brainfuck->C compiler, written in BFM. 18:06:57 ahh, was hoping it was an assembler for bf 18:07:16 I. . . Think you've already written on. 18:07:17 e 18:08:57 -!- theblue_ has changed nick to theblue. 18:10:53 basm, I believe, is now the smallest BF->C compiler in BF. 18:13:11 cool 18:13:17 how many chars? 18:14:09 4629 characters for EOF=0, 4282 for EOF=-1. 18:14:35 (the EOF=-1 build has a shorter string to output for ,) 18:15:29 string string2! "*p=getchar();" 18:15:42 String for EOF=-1. 18:15:47 string string2! "*p=getchar();if(feof(stdin)) *p=0;" 18:15:58 String for EOF=0. Makes for a good demonstration. ;) 18:16:36 is the space necessary before *p ? 18:16:41 Probably not. 18:16:53 it's not 18:17:01 it's ugly, take it away 18:17:03 :) 18:17:21 Done. 18:17:38 might also be able to use #define to squeeze things down.. for example "if(" and "*p=" 18:17:51 what is this: string string2! 18:18:10 Defines a C-style string named string2! 18:18:39 calamari: Yeah, but the #define would make the initially output string longer. 18:19:16 pikhq: yeah.. you'd have to weight the #define against the savings you'd get from it 18:19:22 weigh rather 18:19:44 Wouldn't be worth it. 18:19:49 Whole line versus a small handful of characters. 18:20:05 well, how many times do you use if( and *p= ? 18:20:13 if( is used once. 18:20:18 *p= is used once. 18:20:23 p= is used thrice. 18:20:26 how about *p 18:21:06 ooh 18:21:06 Twice. 18:21:34 -!- theblue_ has joined. 18:22:03 The initial string-setting code really isn't that large, as it is. . . 18:22:28 if(feof(stdin))*p=0; 18:22:28 *p=feof(stdin)?0:p; 18:22:36 ^^^ one char shorter :) 18:22:53 1976 characters for EOF=0, 1634 for EOF=-1. . . 18:22:59 Now that might be worth-while. 18:23:07 calamari, *p=p is not good 18:23:18 *p=feof(stdin)?0:*p; is the same length 18:23:36 oklopol: ahh 18:23:51 bummer hehe 18:24:11 one might turn out smaller than the other, depending on his text->bf algorithm 18:24:18 *p*=!feof(stdin); on the other hand 18:24:27 hehe 18:24:33 :) 18:24:39 My text->bf algorithm is remarkably simple. 18:24:55 that's the smallest possible. 18:24:59 For each character in the string, fill a cell using a stdcons call. 18:25:21 might also try comma to separate commands rather than ; .. might take less charas, depending on placement 18:25:24 (look in macro.tcl, proc string, for the gory details) 18:25:35 calamari: In main(). 18:25:55 Beyond that, I can't be certain. 18:26:20 And I'm not sure if the stdcons implementation of ; is shorter than ,. 18:26:32 which language is that? 18:26:32 you could try it and see 18:27:03 oklopol: What? The language Basm is written in? 18:27:07 pikhq: paste all the c code.. let's see what else might be optimized 18:27:10 -!- yoga has joined. 18:27:16 -!- alpha_q has joined. 18:27:28 -!- theblue has quit (Read error: 113 (No route to host)). 18:27:33 string string0! "#include 18:27:34 char b\[30000]; 18:27:34 char *p=b; 18:27:34 main()\{" 18:27:34 string string1! "putchar(*p);" 18:27:36 if-1 { string string2! "*p=getchar();" 18:27:38 Please say "!Ola mundo!" 18:27:38 } 18:27:41 if0 { string string2! "*p=getchar();if(feof(stdin))*p=0;" 18:27:43 } 18:27:46 string string3! "while(*p)\{" 18:27:48 string string4! "p+=" 18:27:51 string string5! "p-=" 18:28:19 hm... doesnt work 18:28:30 char b\[30000],*p=b; 18:28:36 !Ola mando! 18:28:38 Huh? 18:28:41 ;) 18:28:49 close 18:29:02 can remove the newlines.. so 18:29:07 calamari: That parses to char b[30000]=b;char *p=b; 18:29:16 pikhq: it does? 18:29:22 calamari: Pretty certain. 18:29:32 ahh, I thought you were just outputting text 18:29:45 calamari: It's outputting text which is compiled into C code. -_-' 18:29:58 -!- yoga has left (?). 18:30:15 oh, I see what you're saying.. I'm pretty sure it doesn't parse that way 18:30:26 I'll try it. 18:30:27 i have no idea what you're even doing :) 18:31:09 http://pikhq.nonlogic.org/basm.tar.bz2 has the full Basm source code. . . 18:31:16 char b\[30000],*p=b;main()\{ 18:31:24 And http://pikhq.nonlogic.org/bfm.tar.bz2 has the BFM code necessary to compile it. 18:31:38 (you'll need to install Tcl and Tcllib for BFM) 18:32:31 -!- alpha_q has quit ("ako izleza ot irc s toia message znachi e stanalo neshto neobichaino"). 18:33:33 -!- ihope has joined. 18:33:50 I suddenly feel like going fast and such. 18:33:52 *echm* 18:33:53 Fuck. 18:34:23 Code got borken somewhere. 18:35:27 try reverting the if( code 18:35:46 That's just it. . . 18:35:57 It's the *logic* that's borken. 18:36:18 * pikhq disables the BFM optimizer 18:36:41 Shit. 18:37:16 I think it's a BFM bug. 18:37:20 9<<9 = 4608, so I guess 30000 is the best you can do for 30000 18:37:47 You know, I always thought the de facto block length thingy was a bit harsh. 18:38:23 >>> print 9<<99 18:38:23 5704427701027032306735164424192 18:38:25 :) 18:38:57 99<<99! 18:39:01 Not that that's too much bigger. 18:39:19 369729637649726772657187905628805440595668764281741102430259972423552570455277523421410650010128232727940978889548326540119429996769494359451621570193644014418071060667659301384999779999159200499899! 18:39:20 9<<999 would be tho 18:39:24 Yep. 18:39:42 48217887323382029442679127207700081475263216526749012334968767476665797300622125512193927046706313615741760281289891607133421537856154131961930599086143586617705554986709039434394835722780670138450793819688709137426118735703294454016244947757346783115570384149589439754471934242436809740767425506312192 18:39:44 999<<(999<<(999<<(999<<(999<<999)))) 18:39:49 heh 18:39:58 the idea is to have the shortest string 18:40:07 Yup; it was a BFM bug. 18:40:36 Fixed with an older build of a stdlib macro. 18:40:46 but for length 4 or 5, regular decimal is the best you can do 18:42:14 what I should have said is for 1000-99999, regular decimal is the best you can do 18:42:15 probably not portable, but what about -1>>1? 18:42:27 let a 0 n=n^n;a m 0=a(m-1)1;a m n=a(m-1)$a m(n-1)in a 9 9 18:42:27 that's not shorter than 30000 18:42:45 ...Which, apparently, is 1. 18:43:00 no but the result might be bigger 18:43:03 * pikhq discovers more bugs 18:43:03 hmm.. wait 18:43:04 let a 0 n=n^n+1;a m 0=a(m-1)1;a m n=a(m-1)$a m(n-1)in a 9 9 18:43:09 -1.. that's shorter :) 18:43:14 That's a bit bigger. 18:43:45 but you probably can't do char b[-1] 18:44:26 And I've got bugs fixed. 18:44:31 char b[30000],*p=b;main(){ 18:44:34 That works. :) 18:44:42 k good 18:45:01 i'm not sure of the definition of >> for negative numbers. is it implementation-dependent whether it preserves the sign bit? 18:45:01 *p=getchar();*p*=!feof(stdin); 18:45:05 That, too, works. :D 18:45:08 -!- theblue has joined. 18:45:13 oerjan: Pretty much. 18:45:19 so what are the new lengths? 18:45:41 so -1>>1 _could_ be pretty big. or maybe the precedence is wrong too. 18:46:07 4466 for EOF=0, 4184 for EOF=-1. 18:46:27 yay 18:46:50 Let me try and finish up some work on itoa and divmod; those older versions are a bit longer than they should be. 18:51:11 . . . The hell? 18:51:24 My changes to itoa.bfm and divmod.bfm somehow made the source. . . longer. 18:51:51 pikhq: why not this? char*p[30000];main(){ 18:52:53 calamari: Um. . . That's a pointer to an array of char arrays, I think. . . 18:53:26 Alternately, an array of strings. 18:56:10 !help 18:56:13 -!- theblue_ has quit (Read error: 110 (Connection timed out)). 18:56:13 help ps kill i eof flush show ls bf_txtgen usertrig daemon undaemon 18:56:15 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 18:56:29 I'll try Glass. 18:56:41 Then again, BF might be nice. 18:56:49 Nah, Glass is better. 19:00:06 4457 for EOF=0, 4175 for EOF=-1. 19:00:51 dbc wrote one that is 874 for EOF=0 19:01:20 http://www.hevanet.com/cristofd/brainfuck/dbf2c.b 19:01:21 calamari: Does his optimize? 19:01:28 probably not 19:01:38 . . . No, it sure as hell doesn't. 19:02:27 So, mine is still better. :) 19:02:32 Not smaller, but better. 19:02:47 * pikhq is going to start calling basm the smallest *optimizing* Brainfuck compiler, then. 19:02:50 well, you had said you thought yours was the shorest, so I was clearing that up :) 19:03:05 Thanks. 19:03:33 but, you might be able to learn some from his implementation.. he might be using some c tricks we haven't thought of yet 19:04:52 He's using unistd.h 19:05:35 Aside from that, mine's using more C tricks. 19:06:26 Hmm. 19:06:45 Flooding: 19:06:48 #include 19:06:49 char r[65536],*e=r; 19:06:49 main(){ 19:06:49 ++ 19:06:49 ++*e; 19:06:49 In good ol' Glass, how do I set a variable to the thing at the top of the stack? 19:06:51 ++*e; 19:06:53 .. 19:06:56 write(1,e,1); 19:06:58 write(1,e,1); 19:07:01 ,, 19:07:03 read(0,e,1); 19:07:06 read(0,e,1); 19:07:08 -- 19:07:11 --*e; 19:07:14 --*e; 19:07:16 >> 19:07:18 ++e; 19:07:21 ++e; 19:07:24 << 19:07:24 -!- ihope has set topic: #esoteric - the international hub for esoteric programming language design and deployment - map: http://www.frappr.com/esolang - forum: http://esolangs.org/forum/ - EgoBot: !help - wiki: http://esolangs.org/wiki/ - logs: http://tunes.org/~nef/logs/esoteric/ or http://meme.b9.com/cdates.html?channel=esoteric - for brainfuck-specific discussion, go to ##brainfuck - NO IRP ALLOWED - Pastebin: http://pastebin.ca/. 19:07:26 --e; 19:07:29 --e; 19:07:31 [] 19:07:34 while(*e){ 19:07:36 } 19:07:39 exit(0); 19:07:41 } 19:07:44 Hahah. 19:10:37 I refuse to use unistd.h, so I'm using all the tricks he does. 19:10:55 (and quite a few more: I output a grand total of 2 newlines) 19:11:06 http://esolangs.org/wiki/Glass 19:12:27 Yes? 19:14:17 (name)1= 19:14:58 That won't set the variable to 1? 19:15:06 nope 19:15:25 that would be (name)<1>= 19:15:37 Oh, right. 19:16:28 Does that leave it on the stack or take it off? 19:18:00 leave it. add , to take off. 19:18:48 Thanks. 19:19:44 you're welcome. 19:39:45 -!- CakeProphet has quit ("haaaaaaaaaa"). 19:51:19 i learned Glass too :D 19:53:44 -!- Asztal has quit (Read error: 113 (No route to host)). 19:53:45 i don't like the fact that function local stuff is prefixed with an underscore, temp vars should be short imo :\ 19:54:00 now they're (_[name]) 19:54:32 starts to feel sensible tho 19:54:36 won't bother me for long 19:54:48 ah, yes, a clear break with Glass's fundamental principle of user friendliness. 19:54:56 * oerjan cackles evilly. 19:55:23 :D 19:58:56 but as all names are treated as strings, you should be able to change them to strings, alter them and push them back as vars or functions 19:58:57 :) 19:59:16 because you can do weird stuff anyway with that 20:00:14 i mean you can have a "function pointer" (zot) referring to any (zot)-function in any class 20:07:43 could be useful for dictionaries. 20:08:03 useful? 20:09:59 as in, making it not a complete pain to make dictionaries in Glass 20:10:20 ah as a data type :) 20:10:26 i'm a little dim again 20:10:40 i wasn't saying it is a bad thing 20:10:58 one never knows with esoteric languages :) 20:11:17 trues :D 20:12:51 oh my god that is beautiful :O 20:13:04 {M[m(_s)S!(_o)O!<34>(_s)(ns).?"{M[m(_s)S!(_o)O!<34>(_s)(ns).?""1(_o)o.?2(_o)o.? 20:13:05 1(_o)o.?2(_o)o.?2(_o)o.?0(_o)o.?2(_o)o.?0(_o)o.?]}"1(_o)o.?2(_o)o.?1(_o)o.?2 20:13:05 (_o)o.?2(_o)o.?0(_o)o.?2(_o)o.?0(_o)o.?]} 20:13:07 this one 20:13:13 * pikhq <3 esolangs. . . 20:13:15 all the o's and the ()'s 20:13:16 What's it do? 20:13:20 * oklopol too 20:13:24 quine 20:13:41 Purty. 20:14:03 !glass {M[m(_s)S!(_o)O!<34>(_s)(ns).?"{M[m(_s)S!(_o)O!<34>(_s)(ns).?""1(_o)o.?2(_o)o.?1(_o)o.?2(_o)o.?2(_o)o.?0(_o)o.?2(_o)o.?0(_o)o.?]}"1(_o)o.?2(_o)o.?1(_o)o.?2(_o)o.?2(_o)o.?0(_o)o.?2(_o)o.?0(_o)o.?]} 20:14:07 {M[m(_s)S!(_o)O!<34>(_s)(ns).?"{M[m(_s)S!(_o)O!<34>(_s)(ns).?""1(_o)o.?2(_o)o.?1(_o)o.?2(_o)o.?2(_o)o.?0(_o)o.?2(_o)o.?0(_o)o.?]}"1(_o)o.?2(_o)o.?1(_o)o.?2(_o)o.?2(_o)o.?0(_o)o.?2(_o)o.?0(_o)o.?]} 20:14:19 wow 20:16:49 Nice. 20:18:16 damn 20:19:22 Cool. 20:30:03 It must be possible to shorten those (_o)o's... 20:32:43 !glass 20:32:47 look look quine! 20:32:47 OK 20:32:50 :( 20:32:52 FUCK YA 20:33:05 :) 20:33:23 oklopol: Glass requires a null string to return OK. . . 20:33:54 really? 20:34:37 Yeah. 20:35:42 hard to grasp the factorial program when stupid ppl annoy me on msn :( 20:43:34 haha i'm so gonna make glass without names :) 20:43:45 it's called 20:43:47 . . . What's *wrong* with you? 20:43:49 sorry, 20:43:53 :O 20:43:57 it's just too easy! 20:44:16 (presumably the same thing that's wrong with the rest of us) 20:44:34 haha :D 20:44:43 but, you know, nameless classes and objects 20:44:57 !glass {M[m(_s)S!o11O!o.=<34>(_s)(ns).?"{M[m(_s)S!o11O!o.=<34>(_s)(ns).?""1o?2o?1o?2o?2o?0o?2o?0o?]}"1o?2o?1o?2o?2o?0o?2o?0o?]} 20:45:17 Did I happen to mention that something is wrong with you? 20:45:25 haha :D 20:45:26 darn 20:45:29 no, it's cool! 20:45:34 oerjan, you're my god :O 20:45:57 (if you get that working) 20:46:18 actually it might be easy to make a quine but never made one, so 20:46:24 seems impossible 20:47:23 !glass {M[m(_s)S!(_o)11O!o.=<34>(_s)(ns).?"{M[m(_s)S!(_o)11O!o.=<34>(_s)(ns).?""1(_o)?2(_o)?1(_o)?2(_o)?2(_o)?0(_o)?2(_o)?0(_o)?]}"1(_o)?2(_o)?1(_o)?2(_o)?2(_o)?0(_o)?2(_o)?0(_o)?]} 20:47:25 glass has the cool idea of mixing oo and stacks, but it's basically pretty "normal", gotta add some more esoteria!! 20:47:29 to cheer it up 20:47:51 oh, wait 20:48:00 haha, now just a few chars and it's the former one :) 20:48:25 i thought maybe i used the wrong namespace 20:48:38 but it is something else, i think 20:50:48 !glass {M[m(_s)S!o11O!o.=<34>(_s)(ns).*?"{M[m(_s)S!o11O!o.=<34>(_s)(ns).*?""1o*?2o*?1o*?2o*?2o*?0o*?2o*?0o*?]}"1o*?2o*?1o*?2o*?2o*?0o*?2o*?0o*?]} 20:51:06 or maybe it's both 20:51:34 !ps 20:51:38 2 oerjan: ps 20:51:46 what is that? 20:52:03 i'm having a hard time figuring out how to make anything without operators... 20:52:31 i'd like this lang with everything being just a stack of structures 20:52:41 structures as in functions and classes 20:52:51 Woah, that's some complicated Glass code XD 20:53:15 actually i am just using search and replace on the quine 20:53:23 You have made the inventor of Glass say that. . . 20:53:24 to make a shorter one. 20:53:26 I salute you. 20:53:45 -!- CakeProphet has joined. 20:53:45 What, you think I'm the only one that can write complicated glass code? :P 20:53:58 I didn't write the jixmath class, and that's pretty F***ing complicated :P 20:53:59 GregorR: Just saying that that's quite a compliment. 20:54:26 Jixmath? 20:54:44 (care to show me le source?) 20:55:10 !glass {M[m(_s)S!(_o)11O!o.=<34>(_s)(ns).*?"{M[m(_s)S!(_o)11O!o.=<34>(_s)(ns).*?""1(_o)*?2(_o)*?1(_o)*?2(_o)*?2(_o)*?0(_o)*?2(_o)*?0(_o)*?]}"1(_o)*?2(_o)*?1(_o)*?2(_o)*?2(_o)*?0(_o)*?2(_o)*?0(_o)*?]} 20:55:26 Lesse .. 20:55:35 hmph. 20:55:40 hahavvvv glass looks so funky 20:55:54 it's easy to make complicated code when it's wrong :( 20:56:07 {(JixMath)[(c)*][(c__)aA!p<9>=(ee)<2.71828182845905>=][(log)(_v)1=,(_c)<-1>=(_x)<1>=/(_x)(_v)*<1.5>a(ge).?(_x)1=(_y)1=,(_c)0*<1>aa.?=/(_y)(_v)0*(ee)*ad.?=(_c)(_y)<0>=\\(_p)p*=(_v)0*<1>as.?=(_o)(_v)*=(_s)<1>=(_i)<0>=(_x)<0>=/(_p)(_p)0*<1>as.?=(_i)0*<1>aa.?=(_x)0*(_o)*(_i)*ad.?(_s)*am.?aa.?=(_o)0*(_v)*am.?=(_s)<0>(_s)*as.?=(_x)\(_c)*(_x)*aa.?][(p)p*][(sp)p1=,][(sqrt)(_v)1=(_x)1<100>ad.?af.?=,(_q)<1>=/(_x)(_x)0*<100>ad.?af.?=(_q)0*<10> 20:56:08 -!- oklobot2 has quit (Read error: 104 (Connection reset by peer)). 20:56:13 ... 20:56:13 am.?=\(_p)p*=/(_p)(_p)0*<1>as.?=(_q)0*(_v)*1ad.?aa.?<2>ad.?=\(_q)*]} 20:56:17 And. . . What does Jixmath do? 20:56:21 Math :P 20:56:35 Like. . . A description? 20:56:35 logarithms, square roots ... 20:56:43 * pikhq sees a sqrt function. . . 20:56:44 Idonno, ask jix_ X-P 20:56:50 * GregorR goes to eat. 20:56:51 I need to figure out how glass works 20:56:56 jix_: I wish to pick your brain. 20:57:41 And salute you for that sheer craziness. 20:59:16 !glass {M[m(JixMath)(_m)!O(_o)!2(_m)(sqrt).(_o)o.]} 20:59:33 uhm what's crazy about that? 20:59:34 My Glass might be a bit rusty. 20:59:44 jix_: Jixmath == crazy. 20:59:50 why? 20:59:55 Look at it. 21:02:33 !glass {M[m(_s)S!(_a)(_o)1O!o.=<34>(_s)(ns).?"{M[m(_s)S!(_o)O!<34>(_s)(ns).?""1(_a)*?2(_a)*?1(_a)*?2(_a)*?2(_a)*?0(_a)*?2(_a)*?0(_a)*?]}"1(_a)*?2(_a)*?1(_a)*?2(_a)*?2(_a)*?0(_a)*?2(_a)*?0(_a)*?]} 21:03:12 !ps 21:03:15 !glass {M[m(_m)(Jixmath)!(_o)O!2(_m)(sqrt).?(_o)o.?]} 21:03:16 2 oerjan: ps 21:04:14 darn! 21:04:22 what is that? 21:05:36 -!- ihope has quit (Connection timed out). 21:06:13 !glass {M[m(_s)S!o00O!o.=<34>(_s)(ns).*?"{M[m(_s)S!o00O!o.=<34>(_s)(ns).*?""1o*?2o*?1o*?2o*?2o*?0o*?2o*?0o*?]}"1o*?2o*?1o*?2o*?2o*?0o*?2o*?0o*?]} 21:06:41 * oerjan sighs 21:07:19 it's that quirk about not accessing member variables from functions, I presume 21:08:27 !glass {M[m(_o)O!"o"(_o)o.?]} 21:08:30 o 21:08:33 :D 21:08:56 !glass {M[m(_s)S!Q00O!o.=<34>(_s)(ns).*?"{M[m(_s)S!Q00O!o.=<34>(_s)(ns).*?""1Q*?2Q*?1Q*?2Q*?2Q*?0Q*?2Q*?0Q*?]}"1Q*?2Q*?1Q*?2Q*?2Q*?0Q*?2Q*?0Q*?]} 21:09:51 !glass {M[m(_o)O!(_m)(JixMath)!<4>(_m)(sqrt).?(_o)o.?]} 21:11:18 gah... 21:11:19 -!- Asztal has joined. 21:11:48 Switching to dvorak makes a lot of brackets no longer work. 21:12:43 \]]]\\\\\\\\\\\\\\\\\\\\====\\\ 21:13:33 Ack 21:13:38 * CakeProphet was popping out keys. 21:14:34 ]]dgd;fg[ldfg;l';l[or=======================================================================[]]===============================================================================================================================================================' 21:14:54 ... 21:14:59 hehe 21:15:18 . . 21:15:38 !glass {M[m(_s)S!(_o)0O!o.<34>(_s)(ns).?"{M[m(_s)S!(_o)0O!o.<34>(_s)(ns).?""13?23?13?23?23?03?23?03?]}"13?23?13?23?23?03?23?03?]} 21:17:10 !ps 21:17:12 2 oerjan: ps 21:17:29 -!- ihope has joined. 21:20:44 !glass {T[t(_o)O!"Test"(_o)o.?]}{M[m(_t)T!(_t)t.0??]} 21:20:48 TestTest 21:21:47 !glass {[d(o_O)b]} 21:21:50 OK 21:22:02 !glass {M[m(_o)O!"Test"(_o)o.11?11?]} 21:22:04 TestTest 21:23:17 I'm trying to figure out how to do GLass... but it's very very difficult. 21:23:18 !glass {M[m(_o)0O!o."Test"02?02?]} 21:23:20 TestTest 21:23:22 Damn you postfix. 21:23:31 Heheheh. 21:26:33 !glass {M[m"Test"(_o)0O!o."Test"11?11?]} 21:26:56 Argh... 21:27:04 it's hard to follow the chain of evaluation when it goes... backwards. 21:27:07 aha 21:27:29 wait... 21:27:34 !glass {M[m"Test"(_o)0O!o.11?11?]} 21:27:38 TestTest 21:28:07 not if you're used to befunge 21:28:57 ah! 21:29:40 !glass {M[m(_s)S!(_o)0O!o.<34>(_s)(ns).?"{M[m(_s)S!(_o)0O!o.<34>(_s)(ns).?""14?24?14?24?24?04?24?04?]}"14?24?14?24?24?04?24?04?]} 21:29:42 {M[m(_s)S!(_o)0O!o.<34>(_s)(ns).?"{M[m(_s)S!(_o)0O!o.<34>(_s)(ns).?""14?24?14?24?24?04?24?04?]}"14?24?14?24?24?04?24?04?]} 21:29:48 :DD 21:29:49 wow 21:30:08 ...you made a program that... 21:30:10 prints itself? 21:30:26 actually i just shortened one that already existed 21:30:46 CakeProphet: That would be a quine. 21:31:41 !glass {M[m(_o)0O!o."Lol"11?]} 21:32:00 * CakeProphet isn't sure what the 0 is for... 21:32:06 but it looked nice there... so I put it there. 21:32:37 -!- Asztal has quit (Read error: 113 (No route to host)). 21:32:56 It breaks your code, methinks. 21:33:02 !glass {M[m(_o)O!o."Lol"11?]} 21:33:11 As does 11. 21:33:22 ....damn 21:33:27 * CakeProphet is trying to figure out how ? works. 21:33:31 (which pushs 1 onto the stack twice. . . And the ? tries executing 1.1, which doesn't exist) 21:33:53 !glass {M[m(_o)O!o."Lol"]} 21:33:55 ? 21:33:58 It takes a variable referring to an instance of an object and a string referring to a function off the stack and executes it. 21:34:11 m is main... so it should execute anyways. 21:34:12 no, 11 copies the top 2 elements 21:34:13 Thus, (_o)o? would execute _o.o 21:34:21 oerjan: Ah. 21:35:06 and 0 copies just the top element 21:35:32 Again: Ah. 21:36:32 !glass {M[m(_o)O!o."Lol"(_o)?]} 21:36:54 to use 11? the function must be on top. otherwise use 02? 21:36:59 That would execute Lol._o, methinks. . . 21:37:26 oooho. 21:37:44 Since there is no object Lol, it does. . . Nothing. 21:38:32 actually it tries to execute (_o), but this fails because it is a name not a function. 21:39:02 for that use *? rather than ? 21:39:33 !glass {M[m(_o)O!o."Lol"(_0)*?]} 21:39:35 ack 21:39:38 except that (_o) there does not contain a function either, but an object. 21:39:39 !glass {M[m(_o)O!o."Lol"(_o)*?]} 21:39:49 `.` 21:39:54 * CakeProphet is still getting used to this. 21:40:03 so use o.? 21:40:14 -!- Asztal has joined. 21:40:27 _or_ use 1? instead of (_o)*? 21:40:46 1 picks up the function you already have put on the stack. 21:40:59 !glass {M[m(_o)O!o."Lol"1?]} 21:41:12 I have trouble figuring out what's on the stack... >.< 21:41:46 (_o)O! leaves nothing on the stack, but a variable (_o) define. 21:41:48 ah, yes. the o. doesn't work because there is no (_o) on the stack - it was removed by ! 21:42:07 o. gives a stack underflow. . . 21:42:07 !glass {M[m(_a)A!<4><5>(_a)a.?(_o)O!(_o)o.1?]} 21:42:08 put a 0 after (_o) 21:42:20 !glass {M[m(_o)0O!o."Lol"1?]} 21:42:23 Lol 21:42:24 How do you tell what's on the stack? 21:42:30 and where. 21:42:32 Magic. 21:42:37 -.- 21:42:44 you read the specification _very_ carefully. :) 21:42:57 Which is magic. 21:43:04 !glass {M[m(_a)A!<4><5>(_a)a.?(_o)O!(_o)o.11?]} 21:43:14 :D 21:43:22 How do you represent input to a function? 21:43:35 CakeProphet: Use the I class. . . 21:43:46 Unless you mean, like, arguments. 21:43:48 That's user input. 21:43:48 !glass {M[m(_a)A!<4><5>(_a)a.?(_o)O!(_o)o.?]} 21:43:49 yeah 21:43:51 arguments 21:44:06 Leave the arguments on the stack in appropriate locations. 21:44:14 use on. not o. 21:44:15 The stack is shared. 21:44:52 !glass {M[m(_a)A!<4><5>(_a)a.?(_o)O!(_o)on.?]} 21:45:04 !ps 21:45:07 2 oerjan: ps 21:45:11 * CakeProphet doesn't understand... 21:45:13 hm... 21:45:38 now i am not sure why it doesn't work 21:45:59 Use (on) instead. 21:46:01 !glass {M[m(_a)A!<4><5>(_a)a.?(_o)O!(_o)(on).?]} 21:46:05 9 21:46:09 !glass {M[m(_a)A!<4><5>(_a)a.?(_o)O!(_o)(on).1111111111111111?]} 21:46:13 9 21:46:13 So... if "Lol" is the stack before the function is run... how do you represent "Lol" as a variable? 21:46:17 0? 21:46:29 "Lol"(variable_name)= 21:46:30 :D 21:46:38 ...I meant... in general. 21:46:43 it could be something other than "Lol" 21:46:49 an argument. 21:46:55 Oh. 21:47:00 CakeProphet, you're totally gotten it wrong 21:47:08 "Lol"'Function calling stuff here' 21:47:24 Yeah... 21:47:51 you mean "Lol"(variable_name)1=, 21:48:19 oerjan: That's if you want "Lol" on the stack *and* in a variable. ;) 21:48:21 so... in the function definition... how is the "argument" (The value on the stack before execution of the function) represented? 21:48:33 now, , is the pop command 21:48:40 *no 21:48:45 Um. . . 21:49:08 "Lol"(variable_name)= works just as well. IIRC, = doesn't push anything onto the stack. 21:49:30 no it doesn't because the arguments are in the wrong order 21:49:54 CakeProphet: The function just operates on the global stack. 21:50:05 oerjan: Well, *that* would screw things up. 21:50:20 Right... but you can mimic the use of arguments by treating the value on the stack as input right? 21:50:36 right. 21:50:39 (input)(function)! 21:50:53 how would you "get" (input)? 21:50:55 ? not ! 21:50:56 in the function itself. 21:50:59 er... right. 21:51:01 CakeProphet: ! creates an instance of an object. 21:51:06 yeah yeah. 21:51:09 wrong punctuation :D 21:51:22 the 0 1 2 commands etc. makes copies of things on the stack. 21:51:23 Same way you would operate on something on the stack otherwise. . . 21:51:35 but where is it... 0? 21:51:46 !glass {M[m(_o)O!(_o)(_a)A!(_b)B!(_c)C!f(_a)1.?(_b)1.?(_c)1.?]}{A[f0"a"1o.?]}{B[f0"b"1o.?]}{C[f0"c"1o.?]} 21:51:47 eh 21:51:50 * CakeProphet has a hard time visualizing "the stack" 21:52:03 Imagine you've got a bunch of plates on top of each other. 21:52:18 push equates with sticking a plate on top. pop equates with taking one off. 21:52:24 yes yes... a stack. 21:52:27 sounds a lot like befunge to me. 21:52:34 That's the visualisation. 21:52:37 I know how they work. I just don't know when it happens. 21:52:44 Asztal: Well, a stack *is* a common datatype. 21:52:56 CakeProphet: When the command for your stack operation is executed. . . 21:53:06 hmmm... that works I guess. 21:53:14 0 would be whatever came before the function then. 21:53:27 if you use it right at the beginning of the definitionl 21:53:42 every Glass command has a clearly specified effect on the stack, which you can look up at the wiki. In fact I wrote those descriptions myself. 21:53:46 You've got a copy of what's on the top of the stack. 21:53:57 * CakeProphet nods. 21:54:03 which... in that case, would be (input) right? 21:54:23 !glass {A[f0"a"1o.?]}{B[f0"b"1o.?]}{C[f0"c"1o.?]}{M[m(_o)O!(_o)(_a)A!(_b)B!(_c)C!f(_a)1.?(_b)1.?(_c)1.?]} 21:54:29 err... what's wrong? :D 21:54:31 Hit the Wikipedia page. 21:54:55 however, Glass is designed so that those effects are not always the most intuitive ones - sometimes it uses the stack for the result, sometimes a variable. 21:55:19 so you simply _have_ to look it up. 21:56:14 A, B and C have a function f that prints a char with stack operation (object of type O) -> (the same object), right? 21:56:24 in the code of mine 21:56:33 Although the builtin class methods happen to more consistently put their results on the stack. 21:57:33 oh 21:57:40 !glass {C[c0Oo.?]}{M[m"Lol"Cc.?]} 21:57:49 * CakeProphet probably screwed that up. 21:57:54 !glass {A[f0"a"1o.?]}{B[f0"b"1o.?]}{C[f0"c"1o.?]}{M[m(_o)O!(_o)(_a)A!(_b)B!(_c)C!f1(_a)2.?(_b)2.?(_c)2.?]} 21:58:22 A is a builtin class that might confuse matters. 21:58:47 * CakeProphet wonders how you would mimic inheritance with Glass. 21:58:58 What was screwed up with the above? 21:59:03 !glass {C[c0Oo.?]}{M[m"Lol"Cc.?]} 21:59:36 !glass {A[f"a"1o.?]}{B[f"b"1o.?]}{C[f"c"1o.?]}{M[m(_o)O!(_o)(_a)A!(_b)B!(_c)C!f1(_a)2.?(_b)2.?(_c)2.?]} 22:00:02 you cannot call methods in a class directly, you must instantiate an object. 22:00:08 ...poo 22:01:11 !glass {C[c0(_hehe)O!o.?]}{M[m"Lol"(_meow)C!c.?]} 22:01:20 oerjan, can you help me with mine too? :D 22:01:46 oklopol: i would suggest you rename the A class because there is a builtin with that name 22:01:54 :) 22:02:09 * CakeProphet shall make a language that uses a queue instead of a filthy stack. 22:02:42 !glass {B[f"b"1o.?]}{C[f"c"1o.?]}{D[f"d"1o.?]}{M[m(_o)O!(_o)(_b)B!(_c)C!(_d)D!f1(_b)2.?(_c)2.?(_d)2.?]} 22:02:48 Perhaps a deque 22:03:00 queue... the turing machine! 22:03:05 oh 22:03:08 not a queue 22:03:11 stfu me 22:03:17 A double-ended queue would be interesting. 22:03:24 cakeprophet: the ! command does not leave an object nor its name on the stack. put a 0 after the object variables to keep them. 22:03:51 !glass {C[c0(_hehe)0O!o.?]}{M[m"Lol"(_meow)0C!c.?]} 22:03:53 Lol 22:04:05 mej... I keep thinking in evaluation mode... like Lisp 22:04:31 Whoo hoo.. I made a needless wrapper around the output class. 22:04:41 talk about useful. 22:06:29 oklopol: you have hit upon one of the weirdities of Glass: object names are looked up in the environment of the . so the (_o) can only be used in the m function 22:06:50 haha! 22:07:02 i knew my code was right assuming my knowledge! 22:07:08 but... darn 22:07:52 simply move the o. from the subclasses to M 22:08:01 !glass {B[f(_t)O!"b"1o.?]}{C[f(_t)O!"c"1o.?]}{D[f(_t)O!"d"1o.?]}{M[m(_o)O!(_o)(_b)B!(_c)C!(_d)D!f1(_b)2.?(_c)2.?(_d)2.?]} 22:08:01 no! 22:08:03 never! 22:08:11 CakeProphet: a single-ended queue would be more interesting. 22:08:31 naj... with a double-ended you could rotate around to weird places. 22:08:40 Like a big merry-go-round. 22:09:30 ok another way is to use (_o)* in m to actually have an object rather than its name on the stack. but then you need to put it back into a variable in the subclasses before using . :) 22:10:04 k i'll leave that project.... xD 22:10:31 hm... 22:10:37 why didn't the temp thing work? 22:10:42 !glass {B[f(_t)O!"b"1o.?]}{C[f(_t)O!"c"1o.?]}{D[f(_t)O!"d"1o.?]}{M[m(_o)O!(_o)(_b)B!(_c)C!(_d)D!f1(_b)2.?(_c)2.?(_d)2.?]} 22:10:51 now the classes know O 22:11:05 !glass {M[mTO!"Test"To.?]} 22:11:07 Test 22:11:27 right i forgot, you can use a global variable starting with a capital :) 22:12:07 !glass {B[f"b"1o.?]}{C[f"c"1o.?]}{D[f"d"1o.?]}{M[m(Olp)O!(Olp)(_b)B!(_c)C!(_d)D!f1(_b)2.?(_c)2.?(_d)2.?]} 22:12:09 bcd 22:12:13 :) 22:12:14 <3 22:12:42 my lang is starting to get a nice feel to it, {[|<>*][(<>[1-])?]} 22:12:58 does factorials, tho under construction :) 22:14:28 a "class" now has a function stack and a var stack, each "object" lives while it has functions left.... and i have no idea about anything, but who cares :) 22:24:41 !glass {(Con)[(c__)a1=b0=][aa*^][bb*^][(iter)(_fun)0=a*(_fun)?(_fun)b(iter).?} 22:24:44 OK 22:24:50 hmmm... I'm trying to build a List datatype in Glass :D 22:28:08 that constructor doesn't look quite right 22:28:15 Yeah :/ 22:29:40 i think [(c__)a2=b2=,,] might work better 22:30:05 Why 2? 22:31:01 because that way you pick the deepest remaining argument 22:31:36 oh wait... 22:32:07 that should be [(c__)a2=b1=] 22:32:21 hmmm... I think, to feet the typical Glass syntax... the order of the list should be in reverse :D <123><4567>(pair)(Con)! (if I did the syntax right) would be a pair starting with 4567 and ending with 123 22:32:34 you just forgot to include the variable names on the stack, i think 22:32:42 when counting 22:33:12 but you might still want ,, at the end to remove the arguments. 22:34:15 i don't think you need ^ just before ] 22:35:12 reversing is as simple as a1=b2= 22:37:17 i think you might want a comma after 0= and BTW that should be 1= 22:37:35 as in (_fun)0= 22:38:17 !glass {(Con)[(c__)a2=b1=][aa*][bb*][(iter)(_fun)1=,a*(_fun)?(_fun)b(iter)?} {M[m(_p)<123><456>(_pair)(Con)!(_o)O! (_pair)a.(_o).o? (_pair)b.(_o).o?]} 22:40:26 er... 22:40:26 !glass {(Con)[(c__)a2=b1=][aa*][bb*][(iter)(_fun)1=,a*(_fun)?(_fun)b(iter)?} {M[m<123><456>(_pair)(Con)!(_o)O! (_pair)a.(_o).o? (_pair)b.(_o).o?]} 22:43:38 Don't think it worked. 22:43:38 missing some *'s after some (_fun)'s 22:43:38 !glass {(Con)[(c__)a2=b1=][aa*][bb*][(iter)(_fun)1=,a*(_fun)*?(_fun)*b(iter)?} {M[m<123><456>(_pair)(Con)!(_o)O! (_pair)*a.(_o)*.o? (_pair)*b.(_o)*.o?]} 22:43:38 and a . after (iter) 22:43:38 !glass {(Con)[(c__)a2=b1=][aa*][bb*][(iter)(_fun)1=,a*(_fun)*?(_fun)*b(iter).?} {M[m<123><456>(_pair)(Con)!(_o)O! (_pair)*a.(_o)*.o? (_pair)*b.(_o)*.o?]} 22:43:38 hehe... I'm assuming glass can handle recursiion. 22:43:38 a ] before } 22:43:38 >.< 22:43:38 !glass {(Con)[(c__)a2=b1=][aa*][bb*][(iter)(_fun)1=,a*(_fun)*?(_fun)*b(iter).?]} {M[m<123><456>(_pair)(Con)!(_o)O! (_pair)*a.(_o)*.o? (_pair)*b.(_o)*.o?]} 22:43:38 I'm going to make a list class to conviently wrap values into pairs before I attempt any sort of iteration. O.o 22:43:38 too many * in the main function 22:43:38 I thought you needed them to denote that the variable is in the current context. ;.; 22:43:39 not for the argument of . 22:44:36 !glass {(Con)[(c__)a2=b1=][aa*][bb*][(iter)(_fun)1=,a*(_fun)*?(_fun)*b(iter).?]} {M[m<123><456>(_pair)(Con)!(_o)O! (_pair)a.(_o)o.? (_pair)b.(_o)o.?]} 22:44:36 some .o should be o. 22:44:42 yeah 22:44:44 I got it. 22:45:39 oh and numbers are printed with on. not o. 22:46:03 !glass {(Con)[(c__)a2=b1=][aa*][bb*][(iter)(_fun)1=,a*(_fun)*?(_fun)*b(iter).?]} {M[m<123><456>(_pair)(Con)!(_o)O! (_pair)a.(_o)(on).? (_pair)b.(_o)(on).?]} 22:47:33 wheee.... slowly the process of abstraction takes place. 22:47:37 slowly... and painfully. 22:47:39 whoops. i remember that you cannot have methods with the same name as attributes. 22:47:54 meh... I'll call them what they're called in Lisp. 22:47:58 in fact it crashed Glass horribly last time i tried 22:47:58 what are they called in Lisp again? 22:48:07 car and cdr 22:48:38 hmmm... can't you just access the variables themselves? 22:48:52 instead of using a function? 22:48:59 no, that was in fact what crashed Glass horribly, it's a bug 22:49:41 !glass {(Con)[(c__)a2=b1=][(car)a*][(cdr)b*][(iter)(_fun)1=,a*(_fun)*?(_fun)*b(iter).?]} {M[m<123><456>(_pair)(Con)!(_o)O! (_pair)(car).?(_o)(on).? (_pair)(cdr).?(_o)(on).?]} 22:49:42 123456 22:49:49 I also forgot to do a ? on the pairs. 22:49:56 whoooo... we made a pair! 22:50:25 is that a working list? 22:50:36 As far as I can tell... 22:50:43 i think the (iter) is still slightly buggy 22:50:43 cool :) 22:50:47 It instantiated... took the two values in front of it, stored them, and accessed them. 22:51:15 yeah... I'll wait for the (List) class before figuring out the iter 22:51:23 no wait, i misread 22:51:53 (List) will probably need to take the length of the list as a value... so the constructor knows how far back to go. 22:53:20 -!- jix_ has quit ("Bitte waehlen Sie eine Beerdigungnachricht"). 22:54:04 you need a Nil class for a start 22:54:21 That would be like... 22:54:40 {(Nil)} ??? 22:55:14 -!- jix_ has joined. 22:55:16 rather, {(Nil)[(iter),]} 22:56:32 and probably you need a null? method too 23:00:43 actually that could be defined using (iter). 23:01:29 except... that would be bad on circular lists. 23:02:00 anyhow, time for bed. 23:02:03 {(Nil)[(iter),][(null?)1]} {(Con)[(c__)a2=b1=][(car)a*][(cdr)b*][(iter)(_fun)1=,a*(_fun)*?(_fun)*b(iter).?]} {(List)[(c__) (_a)A! (length)0=(tmp)(length)*=\(tmp)*a(tmp)*=b(tmp)<(tmp)*><1>(_a)s.?==]} 23:02:18 hmmm... not done yet on the constructor for list. 23:03:03 you need (null?) in (Con) as well 23:03:20 hmmm... 23:03:48 which would check cdr for null? right? 23:04:05 but what would happen if it wasn't null? 23:04:15 Is there a way to reliably check that? 23:04:28 null? is just a method that tells if the list is Nil or not. So Con can just return 0. 23:04:54 ooooh 23:04:56 duh :P 23:07:26 How would you change a into a (stack push)? 23:08:36 i think that is rather awkward. in fact i think you would need to create a list class just to temporarily store away the above elements. 23:09:55 Hmmm? 23:10:14 i don't think you need the (tmp) variable btw. just decrement length in the loop. 23:10:23 I'm trying to use a length parameter and a while loop to make it do a bunch of cons 23:10:55 Well... I was going to keep length unchanged by the loop so that it could be accessed by other things 23:11:05 ok 23:11:35 but you don't need it i think 23:12:17 In an environment built around getting values based on their position on the stack... a length variable would come in handy in tons of places. 23:12:58 but I'm still not sure how to use tmp to get something from the stack./ 23:13:53 you cannot. the simplest way to turn a number into a push is by using the List class you are trying to construct. 23:14:31 aah. 23:14:31 however if you do the loop the right way you don't need to access far down elements. 23:14:35 work backwards? 23:14:44 and just do 0? 23:14:51 0, 23:15:17 that would make the list go backwards. 23:15:20 you may not even need 0. 23:15:59 hmm? 23:17:44 if you are collecting elements into the variable (_l), say, then adding the top element of the stack to it (and removing it) is just (_l)*(_l)(Con)! 23:18:20 except you need to add those ,, i mentioned at the end of (Con).c__ 23:18:24 -!- Asztal has quit (Read error: 113 (No route to host)). 23:20:11 ....hmmm, I halfway understand. 23:21:33 so your loop would be something like /(_tmp)(_l)*(_l)(Con)!(_tmp)*<1>(_a)s.?\ 23:21:55 What's _1? 23:22:25 _l is the variable collecting the list 23:24:01 (_l)(Nil)!/(_tmp)(_l)*(_l)(Con)!(_tmp)0*<1>(_a)s.?=\ 23:25:59 Your *'s look like they're in the wrong place. 23:26:39 i don't think so 23:27:10 the first * is to get the content of _l onto the stack before using (Con) 23:27:41 Why doesn't the second _l have a *? 23:28:30 because the ! command takes an unevaluated name to put the contructed object in 23:28:48 Ah. 23:28:49 damn postfix 23:29:04 I forgot the _1 was just an identifier name. 23:29:35 it's a small L btw :) 23:31:15 it may not really be appropriate for this list collection function to happen in List.c__, because we are not actually trying to construct a class List object, but a chain of Con's 23:31:57 Eh... it's just for convience. 23:32:14 it's probably the easiest way I could think of doinging 23:32:21 implementing it as a method of Con would be kind of weird. 23:32:32 the problem is that we then get a new List object in addition 23:32:55 If the constructer simply returns _l... it'll be a chain of cons. 23:33:14 by "return" I mean... but _l on the stack. 23:33:39 yes, but the List object still is also created, and needs to be put in a variable 23:34:03 Hmmm... it wouldn't work right as a Con method though... 23:35:01 hmmm... maybe _l should be an instance variable? 23:35:13 and you can just access List.l 23:35:19 it could be List.list, that would be similar to the builtin classes 23:36:13 the builtin classes just need to be instantiated once, and after that you use their methods as if they were static 23:36:27 more or less 23:38:30 on the other hand wrapping the List object might also work, but then you need to declare (iter) and stuff in (List) as well. 23:39:31 anyhow now i really need to go to bed 23:39:41 Alright 23:39:57 Thanks for the pointers :D 23:39:57 -!- oerjan has quit ("Good night."). 23:43:28 {(Nil)[(iter),][(null?)1]} {(Con) [(c__)a2=b1=] [(car)a*] [(cdr)b*] [(null?)0] [(iter)(_fun)1=,a*(_fun)*?(_fun)*b(iter).?] } {(List)[(build)(_a)A!(_tmp)0= (_list)(Nil)!/(_tmp)(_list)*(_list)(Con)!(_tmp)0*<1>(_a)s.?=\(_list)] } {M[m(_o)O! (_l)(List)! "H" "e" "l" "l" "o" " " "W" "o" "r" "l" "d" "!"<12>(_l)(build).?(MyList)0= (_o)o.(MyList)(iter).?]} 23:44:03 !glass {(Nil)[(iter),][(null?)1]} {(Con) [(c__)a2=b1=] [(car)a*] [(cdr)b*] [(null?)0] [(iter)(_fun)1=,a*(_fun)*?(_fun)*b(iter).?] } {(List)[(build)(_a)A!(_tmp)0= (_list)(Nil)!/(_tmp)(_list)*(_list)(Con)!(_tmp)0*<1>(_a)s.?=\(_list)] } {M[m(_o)O! (_l)(List)! "H" "e" "l" "l" "o" " " "W" "o" "r" "l" "d" "!"<12>(_l)(build).?(MyList)0= (_o)o.(MyList)(iter).?] 23:44:05 OK 23:44:12 ... 23:54:40 Well.. I'll figure out the bugs later. 23:54:47 Would probably make a good built-in class. 23:55:18 . . . You didn't. 23:55:45 You did. 23:55:53 My god. You're just crazy. 23:56:26 I take pride in my insanity. 23:56:47 The cons class works fine... just need to figure out where I messed up on the list constructor. 23:57:19 other than it... missing a curly brace. 23:57:45 !glass {(Nil)[(iter),][(null?)1]} {(Con) [(c__)a2=b1=] [(car)a*] [(cdr)b*] [(null?)0] [(iter)(_fun)1=,a*(_fun)*?(_fun)*b(iter).?] } {(List)[(build)(_a)A!(_tmp)0= (_list)(Nil)!/(_tmp)(_list)*(_list)(Con)!(_tmp)0*<1>(_a)s.?=\(_list)] } {M[m(_o)O! (_l)(List)! "H" "e" "l" "l" "o" " " "W" "o" "r" "l" "d" "!"<12>(_l)(build).?(MyList)0= (_o)o.(MyList)(iter).?]} 23:59:54 -!- tgwizard has quit (Remote closed the connection).