00:16:32 -!- calamari has joined. 00:16:37 hi 00:16:42 'Lo. 00:51:55 oerjan: ` doesn't really mean much, monad-wise. 00:52:22 Just the S and K combinators should work, except make it ap and return instead of S and K. 00:53:06 well the point is not to do that. 00:53:54 The point is not to use ap and return instead of S and K? 00:54:10 let me look up the definition of ap. 00:54:33 ap :: m (a -> b) -> m a -> m b 00:58:34 hm, consider ``sAB with that definition. 00:59:09 A and B are of the same monad. A contains a function, and B contains the argument. 01:00:03 -!- rt has joined. 01:00:12 let A :: m (a->b) then. 01:00:58 then s :: (a->b) -> m 01:01:28 Um... 01:01:41 s :: m (a -> b) -> m a -> m b. 01:02:04 no. ` is bind, remember. 01:02:47 ` :: Monad m => (a->m b) -> m a -> m b 01:03:22 so s with your type would not fit. 01:03:23 Oh. 01:05:36 on the other hand haskell types may not fit well either. Monads are tracked partially separate from the functional type. 01:06:10 not that i have thought much about whether this works at all. 01:06:46 in particular, m1 a and m2 b could be the same type. 01:08:58 In your language, you mean? 01:09:05 yes 01:12:32 More examples of Forth code: Print out an ASCII table formatted to 5 entries per line. 01:12:33 : A-TABLE 128 33 DO I . SPACE I EMIT SPACE I 28 - 5 MOD 0 = IF CR THEN LOOP ; 01:12:42 Then run A-TABLE and all is well. 01:13:11 Razor-X: capital letters suck 01:13:25 xor_: Nah. It makes the code look more awesome :P 01:13:51 -!- GregorR-L has quit (Read error: 104 (Connection reset by peer)). 01:13:55 Oh, and that's an ASCII table for all the printable characters, by the way. 01:14:14 however, making `k A B act like return A seems reasonable 01:15:54 Oh, by the way, I somewhat designed a programming language. 01:16:08 aha 01:16:12 I'm not sure just how esoteric it is. 01:16:27 maybe it's a p-language then :) 01:16:50 It's assembly-like. 01:17:03 Gods of Earth and Erna! 01:17:18 Possibly easy to compile into x86. 01:17:39 More Gods! 01:17:46 what is Erna, apart from a Norwegian party leader? 01:18:16 Even read C.S. Friedman's Black Sun Rising series? 01:18:39 nope 01:19:21 Just what's x86 like? 01:19:39 a horrible mess iiuc 01:19:55 Impossible to virtualize? 01:20:31 i thought virtualization on x86 was all the rage nowadays 01:20:52 Hard to virtualize? 01:21:00 Well, x86 is a lot better than the z80 ASM on TI. 01:21:05 That's just my opinion though. 01:21:10 z80, eh? 01:21:50 Well, surely x86 doesn't meet the Chaim-Potok virtualization requirements or whatever they're called. 01:23:22 * oerjan isn't going to pretend he understands what ihope is talking about. 01:24:14 Of course it doesen't. 01:24:26 But who cares about that? Since when has anything popular *ever* followed standards? 01:24:30 I mean, look at Microsoft. 01:24:40 RFCs? Who NEEDS 'em! BAH! 01:24:44 ah, definitely not Chaim-Potok. he wrote "My name is Asher Lev". 01:24:51 ;D 01:25:12 which i've never read but it was in my parent's bookshelf 01:25:45 Who is Asher Lev? 01:25:54 Ah, it's the Popek and Goldberg virtualization requirements. 01:26:00 Close enough. 01:26:11 the main character in that novel, i assume 01:26:13 Goldberg, Chaim, same difference. 01:26:31 GregorR, Gates, same difference. 01:27:37 if you say so. you couldn't get gregorR to send me a couple million dollars? 01:27:50 Nah. Ask his wife for that. 01:28:24 Also, something tells me ihope knows who Asher Lev is. 01:28:52 No idea, until I read the Wikipedia article. 01:29:02 My English teacher assigned us The Chosen. 01:30:17 Sounds exciting. 01:30:24 * Sgeo was a showoff in math today 01:30:46 * Sgeo is actually trying to show off here by mentioning this 01:31:22 :o 01:31:39 What'd you show off about? 01:32:03 In Calculus, we started integrals 01:32:23 So I showed that I already knew the stuff we were learning today 01:32:42 I see. 01:33:12 aww I thought I was the youngest one here :( 01:33:19 Asztal, hm? 01:33:22 No, I am. 01:33:31 Unless one of you's younger than me. 01:33:46 Well I did 1st year calculus 3 years ago... ;) 01:33:57 I'm not to calculus yet. 01:33:58 * Sgeo is in High School 01:34:06 "P Calc BC" 01:34:08 er 01:34:12 "AP Calc BC" 01:34:30 I'm in pre-calculus, and I could be about the youngest guy in there. 01:34:32 So yeah. 01:34:40 * oerjan feels like he has one foot in the grave in this company. 01:35:13 ` doesn't really mean much, monad-wise. 01:35:15 Just the S and K combinators should work, except make it ap and return instead of S and K. 01:35:19 * Sgeo wonders if there's a way to find out who's the youngest by comparing years without actually revealing age.. 01:35:24 someone yesterday said he was 15 01:35:25 ^ yeah, but I understand none of that ;) 01:35:41 I'm 20 now 01:35:43 i don't think it was any of you speaking now 01:35:45 Sgeo: I turned 14 some days ago. Are you younger than that? 01:35:49 No 01:39:13 a great chance of employing zero-knowledge proofs wasted :/ 01:39:29 oerjan, that's what I was trying to refer to 01:39:43 i figured 01:40:01 How would we do a zero-knowledge proof thingy here? 01:40:59 Zero-knowledge proof? 01:41:31 a cryptographical technique for proving you have some knowledge without revealing it 01:42:14 How could that be done in chat? 01:43:16 i'm sure it would be verbose. we would have to simulate the algorithm 01:44:06 although first we would perhaps have to find an algorithm. 01:45:30 i think it is based on huge keys like in RSA. 01:49:54 Let's try to come up with a zero-knowledge proof. 01:50:22 Eh, wait. 01:50:35 Well... hmm. 01:51:09 http://www.cs.fit.edu/~msilaghi/secure/ 01:52:21 -!- wooby has joined. 01:52:39 AFK 01:52:50 -!- wooby has quit (Client Quit). 01:57:22 My math teacher chews and spits out show-offs. 01:57:36 And with Calculus III under her belt, I'm not one to challenge her. 01:58:21 I hate math class 01:59:30 -!- kipple_ has quit (Read error: 145 (Connection timed out)). 02:18:41 Actually.. 02:18:50 to do a zero knowledge proof... you need to only do this. 02:19:17 ! 02:19:26 The theory of everything... proven 02:19:34 now figure out the meaning. 02:20:01 I disagree. 02:20:05 * oerjan thinks the prophet must have eaten some bad cake 02:20:17 Razor-X, hm? 02:20:20 ihope, I DEMAND A COUNTEREXAMPLE. 02:21:00 ! is 33, silly. 02:21:07 Razor-X, what do you mean "chews and spits out show-offs"? 02:21:28 The theory of everything is actually * 02:21:43 ihope, I thought it was more like .* 02:22:04 No, that's the regex of everything. 02:22:26 Actually, the theory of everything is this: forall a. a 02:22:37 I.e. "everything is true". 02:27:09 * Sgeo still wants to conduct zero-knowledge proofs in this channel 02:27:33 to get a COUNTEREXAMPLE, use the theory of something: exists a. a 02:28:09 -D|5╫aT╫4╘4G╢♥3-4A☺☼49§☼457c╞7524☻455»-┐M+B!☻♦♦♣455♦♣-445♦64654♦♦♣:7♪û☺jä1▼4 02:29:06 See http://en.wikipedia.org/wiki/Secure_multiparty_computation, there are links to programs 02:32:40 oh, you were linking to one of them 02:34:10 Fairplay looks more flexible somehow 02:34:14 But not enough docs 02:34:56 ah, SMC is a programming language 02:34:57 oerjan: the theory of something contradicts the theory of everything? 02:35:46 of course. the theory of everything after all implies that everything contradicts everything. 02:36:18 * pikhq proposes a formal system of logic where everything I say is right 02:36:18 http://www.cs.fit.edu/~msilaghi/SMC/tutorial.html 02:36:50 The theory of everything is pretty darn inconsistent, you know. 02:37:08 Not that there are actually different levels of being inconsistent. 02:37:29 ah but there are in relevance logic 02:38:15 there, a contradiction from some propositions cannot affect irrelevant ones 02:38:26 SMC confuses me 02:40:29 Why is oblivious transfer important? 02:41:27 ah, Fairplay is a predecessor to SMC for only 2 participants 02:41:42 sounds interesting 02:42:26 i don't know but wikipedia said that oblivious transfer could be used to construct secure multiparty computations 02:44:27 http://64.233.161.104/search?q=cache:oMqmmv1jYlAJ:csrc.nist.gov/kba/Presentations/Day%25202/Jablon-Methods%2520for%2520KBA.pdf+%22Zero-knowledge+password+proof%22&hl=en&gl=us&ct=clnk&cd=3&client=opera 02:51:02 -!- ivan` has joined. 03:04:02 -!- thematrixeatsyou has joined. 03:04:58 hi 03:07:55 Hi 03:08:15 aaaaah where's egobot 03:08:22 I ate it. 03:08:34 no, i think the matrix did 03:08:37 How did he taste? 03:08:58 like an electronic chicken 03:08:59 Oishikunakatta. 03:09:05 meh, i didn't make the thing 03:09:24 Sumimasen. 03:09:25 pikhq: bless you 03:09:37 "Not tasty". 03:10:11 * pikhq likes Japanese. . . 03:10:12 oshikatta ni sumimasen. 03:10:24 oshii = disappointing 03:10:55 But I used "oishii". 03:11:41 i know, and i used oshii. 03:11:59 Mmkay. 03:17:48 i say tomato, you say tomato... 03:18:17 you say rubber... 03:18:25 I say tomato, you say redrum. 03:19:01 i say lets get drunk, you say sure, why not? 03:19:57 because I'm already drunk? 03:32:10 -!- ihope has quit (Connection timed out). 03:35:59 g'night, everyone. 03:38:26 xor_: Get MORE DRUNK! 03:38:33 lol 03:40:40 too drunk==not fun 03:40:47 nn 03:41:02 little drunk==too fun 03:41:13 little drunk==fun 03:49:06 翴 03:49:20 ֦ذƢ ǹ 03:49:26 . 03:56:18 cattttttttttttttttttttttttttttttttttttt 03:56:31 ddddddddddddddddddddddddddddddddddddog 03:57:22 concatenaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaate 04:20:09 I say 「あの人々は子供の動くようがあったし」 you say 「ナニッ?!子供心はとても主なことだったネ」. 04:21:37 反対に失礼。 04:24:14 !!! 04:25:44 -!- wooby has joined. 04:29:26 -!- wooby has quit (Client Quit). 04:29:38 -!- wooby has joined. 04:30:03 hello friends 04:31:48 * SimonRC goes to bed 04:35:12 -!- oerjan has quit ("Good night."). 04:49:10 -!- Asztal has quit (Read error: 60 (Operation timed out)). 05:16:30 -!- calamari has quit ("Leaving"). 05:20:35 -!- Sgeo has quit ("Ex-Chat"). 05:37:35 gonna go, bye 05:38:08 -!- thematrixeatsyou has quit ("-- food and stuff -- bye -- still haven't done that english essay --"). 06:08:44 -!- GregorR-L has joined. 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:27:26 -!- RodgerTheGreat has quit (Remote closed the connection). 08:28:07 -!- RodgerTheGreat has joined. 08:32:39 -!- ivan` has quit (" HydraIRC -> http://www.hydrairc.com <- State of the art IRC"). 08:36:52 -!- RodgerTheGreat has quit (Read error: 104 (Connection reset by peer)). 08:38:50 -!- RodgerTheGreat has joined. 08:58:45 -!- GregorR-L has quit ("Leaving"). 09:00:59 -!- RodgerTheGreat has quit (Read error: 110 (Connection timed out)). 09:02:45 -!- EgoBot has joined. 09:12:01 -!- CakeProphet has quit ("haaaaaaaaaa"). 09:20:47 -!- RodgerTheGreat has joined. 09:38:06 -!- RodgerTheGreat has quit (Read error: 110 (Connection timed out)). 11:17:16 cannot write checkpoint image 11:55:36 -!- kipple_ has joined. 11:59:42 -!- Asztal has joined. 12:45:09 -!- ihope__ has joined. 12:45:18 -!- ihope__ has changed nick to ihope. 13:02:42 From now on, everything in this channel must follow Wikipedia official policies. 13:03:17 * ihope nominates his above statement for deletion, it being non-notable original research 13:04:34 Oh, it's protected? Some administrator needs to unprotect it. 13:05:06 * ihope nominates that for deletion as well, for the same reason 13:08:09 * Asztal nominates User:ihope for deletion 13:09:01 * ihope votes "speedy keep" 13:29:48 -!- wooby has quit. 14:45:28 -!- tgwizard has joined. 14:54:50 -!- RodgerTheGreat has joined. 14:59:26 -!- kipple_ has quit ("See you later"). 15:03:13 -!- Asztal has quit ("Chatzilla 0.9.72-rdmsoft [XULRunner 1.8.1b2/0000000000]"). 15:45:06 -!- calamari has joined. 16:05:21 -!- Asztal has joined. 16:05:46 -!- calamari has quit (Read error: 110 (Connection timed out)). 16:24:17 'morning 16:24:53 hi (2) 16:25:03 heh 16:26:04 * SimonRC decides that assembley would be great for functional programming. 16:26:14 Functions really *are* data there. 16:26:27 hm 16:26:31 although the RO and NX bits may get in the way :-( 16:26:56 also, by fucking with the stack pointer, you can easily do coroutines 16:27:05 ww, maybe 16:29:34 I'm working on my synthesys reference interpreter at the moment- I think I'm going to need to figure out how to use HashMaps in Java to do this properly. 16:32:31 The trick to doing this kind of thing in Java is: 16:32:34 don't 16:32:52 so says you. 16:36:22 indeed 16:44:15 sweet. these things are actually *really* easy to use. 16:45:02 a hashmap is a perfect way to keep track of the name->value correlations for variables. 16:52:15 anyone remember the escape sequence for NULL offhand? 16:53:05 oh, nvm- it's \0 17:13:56 woot. just 3 more commands to implement. 17:24:34 -!- CakeProphet has joined. 17:24:53 hello, cakeprophet 17:26:02 Heys. 17:27:41 -!- Razor-X has quit (Remote closed the connection). 18:15:35 -!- CakeProphet has quit (Read error: 145 (Connection timed out)). 18:32:16 -!- CakeProphet has joined. 18:40:09 -!- Asztal has quit ("Chatzilla 0.9.72-rdmsoft [XULRunner 1.8.1b2/0000000000]"). 18:45:32 -!- calamari has joined. 18:46:06 hi 18:48:47 * CakeProphet waves. 18:57:03 hello 19:01:03 * calamari just found a major bug in bfbasic 19:01:17 something has gone wrong with do/loop 19:06:14 -!- CakeProphet has changed nick to SevenInchBread. 19:06:26 -!- SevenInchBread has changed nick to CakeProphet. 19:07:17 -!- CakeProphet has changed nick to GrandmotherChaos. 19:07:30 -!- GrandmotherChaos has changed nick to CakeProphet. 19:10:29 -!- CakeProphet has changed nick to SevenInchBread. 19:10:36 .... 19:12:07 Are you somehow using Python to do esoteric things with Wikipedia or something? 19:14:38 -!- Sgeo has joined. 19:25:01 * calamari wonders who ihope is talking to 19:25:31 To SevenInchBread. 19:25:39 * Sgeo wonders where calamari sees ihope talking 19:25:50 ihope, yes. 19:25:55 Are you somehow using Python to do esoteric things with Wikipedia or something? 19:26:14 Actually.. 19:26:16 I'm using magic. 19:26:22 to do esoteric things with Wikipedia. 19:26:36 Where's Python come in, then? 19:26:49 What's SevenInchBread doing with Wikipedia? 19:27:04 Python comes in everywhere. 19:27:16 Are you doing it to http://en.wikipedia.org/wiki/Python_(programming_language)? 19:27:35 It is within the rustle of every leaf... in the blooming of every flower. 19:27:56 python rocks 19:27:58 ihope, Your question reflects the true answer that is. 19:28:37 It would rock even more if it didn't use indentation 19:28:59 ...pretty much every language uses indentation as a standard precedure.... 19:29:02 * Sgeo <3 the indentation 19:29:19 I mean... is it any worse than asking you to put {}'s around everything? :P 19:29:25 yes 19:29:28 ... 19:29:39 because the indentation gets screwed up easily 19:29:44 {}s don't 19:30:18 Nah... it's simple to fix... most of the screw-ups are just errors caused by mismatches parenthetical thingies somewhere. 19:30:42 DM uses indentation 19:31:30 Use Python without the indentation stuff. 19:31:43 can't... unless you hack the interpreter. 19:31:57 indentation is its only means of specifying blocks. 19:32:05 You need blocks? 19:32:23 if something == somethingsomething: 19:32:24 block 19:32:26 block 19:32:28 block 19:32:29 Yes. 19:32:33 Unless you don't plan on using ifs, whiles, fors, or defs. 19:32:35 :D 19:32:43 Can't you use functions for if, while, and for? 19:33:11 None that are built in. 19:33:21 you could make one.. but that would require a def... which require indentation./ 19:33:35 and by then it's just simpler to indent. 19:33:37 Well then, only use... three blocks? 19:34:05 and the interpreter usually autoindents everything for you... so... it's not like it's difficult or anything. 19:34:46 you just have to dedent with a backspace at the end of the block... which is, in my opinion, much easier to do than shift+} 19:35:56 It's very easy to screw up the indentation 19:36:17 ...how? 19:36:26 C-j says otherwise. 19:36:37 Editors will do it for you, I know, but just try editing in a different editor or posting it somewhere 19:36:52 I don't mean mess it up while coding 19:37:00 SevenInchBread: BTW, God coded in Lisp. 19:37:11 I could see that. 19:37:22 Well.. God kinda seems like a Forth coder. 19:38:04 Maybe he uses a Lisp-Forth hybrid monster. 19:38:20 xor_, Why would you be editing Python outside of a Python editor? 19:38:20 prefix notation, postfix notation 19:38:45 Nah, he just coded the Lisp interpreter in Forth. 19:40:02 huh? 19:40:07 What's a python editor? 19:40:36 some editors use tabs, some use 4 spaces, some use 2, some use 8 19:40:47 xor_, Doesn't matter. 19:40:56 yeah it does 19:41:17 the Python interpreter requires that only the indention of a certain indent level remains constant. 19:41:28 "def foo():\n stuff()\n\tmorestuff()\n" 19:41:30 doesnt work 19:41:37 and I'm pretty sure most editors auto-detect the indent settings being used. 19:41:53 also, you can't cram a lot of code on one line 19:42:03 heh... I beg to differ :D 19:42:12 * SevenInchBread shows you his one-line prime number generator. 19:42:42 if x: stuff(); else: oh wait, i'm screwed 19:44:07 SevenInchBread, hm? 19:44:45 prime = lamba nums: filter(lamba x: Ture not in map(lamba primecheck: x % primecheck == 0, range(2, x/2)), nums) 19:44:56 I might have screwd it up.. I never saved it so I just sorta made it off of memory. 19:45:04 lemme test it. 19:45:42 Ture? 19:45:55 Oh. 19:45:57 True 19:45:58 :D 19:46:02 -!- Asztal has joined. 19:46:31 You can't use normal code on just one line 19:46:49 define "normal code". 19:47:19 using lambdas 19:47:43 isn't normal 19:47:49 Well... that's because statements aren't expressions. 19:48:15 Python isn't supposed to do one-line statement-expression type things. 19:48:18 It wasn't made for that. 19:48:21 yeah 19:48:36 But try and post your code to a forum that removes indentation 19:48:39 but... it can if you want it to. 19:48:57 Use a preformmatted setting on the forum. 19:49:00 xor_: That would be called "borken". 19:49:07 or find a better forum. :) 19:49:15 There are almost no decent languages that are whitespace sensitive 19:49:23 most forums have a [code][/code] feature for preformatted stuff. 19:49:43 Python is only whitespace sensitive at the front of a line. 19:49:46 Python is decent. 19:49:49 I know 19:49:50 It's whitespace sensitive. 19:49:59 It would be better if it wasn't 19:50:03 Therefore, there's at least one decent language that's whitespace sensitive. 19:50:14 * SevenInchBread honestly doesn't understand how whitespace sensitivity makes a language better. 19:50:25 There are _almost_ no decent languages that are whitespace sensitive 19:50:29 Ah. 19:50:37 hmmm... 19:50:45 Most of them actually seperate tokens by whitespace. 19:51:09 Unless "chari=5;" means anything in C? 19:51:10 I don't see how a language would find tokens easily without using whitespace. 19:51:22 hmmm... blah=2 works in Python. 19:51:56 Or "intmain(intfoo,charbaz){charbar=foo+baz;return(bar);}"? 19:52:32 ...I give up 19:52:46 SevenInchBread: "char i" would define a variable 'i' of type char, not a variable named "char i". 19:53:05 pfft... that's gay. 19:53:14 and I just used gay as a derogative word. 19:53:16 which isn't often. 19:53:16 It's called "a typed language". 19:53:34 >>> prime = lambda nums: filter(lambda x: True not in map(lambda primecheck: x % primecheck == 0, range(2, (x/2)+1)), nums) 19:53:35 >>> 19:53:37 >>> prime(range(2, 24)) 19:53:39 [2, 3, 5, 7, 11, 13, 17, 19, 23] 19:54:04 * SevenInchBread wiggles fingers ominously. 19:56:02 but now with the release of Python 2.5... the only control flow statements that don't have an expression equivalent are while and with 19:56:13 doesn't 19:56:47 ? 19:56:59 x = (y if check == True else None) 19:57:28 you can do that in 2.5! 19:57:31 Must be hell to parse. XD 19:58:04 * xor_ looks it up 19:58:05 squared = [n * n for n in (ThisList if HellFrozenOver == True else SomeOtherHellFriendlyList)] 19:58:06 yay! 19:58:43 Which is the equivalent of.... 19:59:51 * xor_ gets python 2.5 19:59:55 squared = [] 19:59:57 if HellFrozenOver == True: 19:59:58 for n in ThisList: 20:00:00 squared.append(n * n) 20:00:01 else: 20:00:03 for n in SomeOtherHellFriendList: 20:00:04 squared.append(n * n) 20:00:09 much more terse. :D 20:00:29 I think python just got 2.5 times better 20:00:50 yeah... but they're thinking about removing lambda in version 3 20:01:23 which isn't that terrible... list comprehensions can pretty much do anything lambda could do... 20:01:31 and are a tad easier to read. 20:01:44 foreach n [expr $HellFrozenOver ? $ThisList : $HellFriendlyList] {append squared [expr $n*$n]} 20:01:52 mmmm Perl 20:01:59 I think 20:02:12 looks like Perl... anything with $'s looks like Perl to me. 20:02:30 lol 20:02:47 wait 20:02:57 you cant do "print x if y" 20:02:59 :( 20:03:14 I'm pretty sure it needs an else. 20:03:36 nope 20:03:54 Ah... yeah 20:04:01 print 2 if x else print 1 20:04:05 SyntaxError: invalid syntax 20:04:23 Because you can't just make print magically print nothing when you're telling it to print something. 20:04:42 ? 20:04:59 print wouldn't play nice with the if expressions. 20:05:06 basically 20:05:21 Wouldn't it be 20:05:32 hm 20:05:32 hmmmmm 20:05:33 n/m 20:05:45 sys.stdout.write("1") if 1 else sys.stdout.write("2") 20:05:47 works 20:05:52 print (2 if x else 1) 20:06:05 Nope. 20:06:08 yep 20:06:12 Why not? 20:06:20 if doesn't work on print in general... methinks 20:06:25 print (2 if 1 else 1) 20:06:25 2 20:06:32 besides... you could just do. 20:06:38 if y: print x 20:06:41 problem solved. :D 20:06:55 My thing works 20:07:01 (2 if x else 1) is a value 20:07:15 print could just print that 20:07:19 =P 20:07:35 No I mean.. it doesn't work. 20:07:38 even if it is an expression 20:07:41 >>> print (2 if 1 else 1) 20:07:42 hm? 20:07:42 SyntaxError: invalid syntax 20:07:44 >>> 20:07:49 what version? 20:07:52 SevenInchBread, what version of Python? 20:07:52 2.5 20:08:04 $ python2.5 --version 20:08:04 Python 2.5 20:08:05 >>> print (2 if 1 else 1) 20:08:05 2 20:08:07 * SevenInchBread is up-to-date, biatch. *puts on stunna shades* 20:08:09 SevenInchBread: That was Tcl. 20:09:01 puts [expr 1 ? 2 : 1] 20:09:24 % puts [expr 1 ? 2 : 1] 20:09:24 2 20:09:44 SevenInchBread, worked for me 20:09:49 hmmm... 20:09:56 I think... IDLE is using the wrong version. 20:10:02 um wtf 20:10:08 * pikhq huggeth Tcl 20:10:11 SevenInchBread, "with" doesn't change color in IDLE 20:10:20 >>> print (2 if 1 else 1) 20:10:24 SyntaxError: invalid syntax 20:10:51 ooops wrong version 20:11:30 import sys; sys.version 20:12:00 Sgeo, You need to enable it via the __future__ module. 20:12:14 no.... 20:12:20 not in python2.5 20:12:22 * SevenInchBread is talking about with. 20:12:30 oh 20:12:43 with will be enabled by default in Python 2.6 20:13:02 why not in 2.5? 20:13:15 Not sure. 20:13:23 maybe for bug testing... or to make sure it's safe or something. 20:13:43 whoa nice 20:14:16 iterator.send(x) 20:14:17 -!- EgoBot has quit (Read error: 110 (Connection timed out)). 20:16:45 hmmm.. 20:16:51 for some reason idle is running in 2.4.3 20:17:10 idle-python2.5 20:17:42 neato 20:17:44 with open('/etc/passwd', 'r') as f: 20:18:29 * SevenInchBread still hasn't figured out how with works. 20:18:49 I think it just ensures that things close properly.. 20:18:59 yeah 20:19:10 "After this statement has executed, the file object in f will have been automatically closed, even if the 'for' loop raised an exception part-way through the block." 20:19:33 but it has some extra funcionality with user-made classes. 20:19:49 Most of Python's power is in its object-oriented stuff. 20:19:59 "the context management protocol" 20:20:38 -!- ivan` has joined. 20:20:47 I like the direction they're going with the whole "type/class unification" thingy. 20:21:07 -!- EgoBot has joined. 20:21:07 cannot read elfstream /home/gregor/esoteric/egobot/egobot/daemons/.cat 20:21:26 !daemon cat bf ,[.,] 20:21:46 -!- ihope__ has joined. 20:21:50 "The context manager must have __enter__() and __exit__() methods." 20:23:21 Yeah. 20:23:39 On user-made classes.... __enter__() and __exit__() will be called to specify what exactly happens in the with statement. 20:24:08 Like how __eq__() controls what happens when you use an instance in an == operation. 20:27:33 -!- SevenInchBread has changed nick to SixInchBread. 20:28:42 -!- SixInchBread has changed nick to SevenInchBread. 20:32:20 I never understood method decorators 20:37:55 -!- ihope has quit (Connection timed out). 20:46:58 * SimonRC point out that FORTRAN and INTERCAL don't need whitespace at all. 20:47:18 the language Whitespace needs whitespace, though 20:47:19 xor_, I wouldn't call them "decorators" 20:47:29 That's what the docs call them 20:47:41 Basically the __'s are just there to tell the user that the method is called somewhere special. 20:47:48 not those 20:47:52 You're probably referring to function decorators... 20:47:54 oh 20:52:00 * SimonRC likes the Haskell program in which evey variable is named by a string of ????? 20:53:19 you get lines like: let(???????)???(????????????????)=(??(?????))in(??????? 20:53:20 ) 20:54:08 haskell is weird 20:54:28 heheh 20:54:36 How do I replace "!@#$%^&*()" with a particular number in JavaScript? 20:55:12 is there an "indexof"-type function? 20:57:48 -!- SimonRC has changed nick to VickyPollard. 20:57:55 -!- VickyPollard has changed nick to SimonRC. 21:13:01 SimonRC: I like strings of underscores better. 21:13:07 heh 21:13:14 though _ is reserved 21:13:20 It's harder to count long strings of underscores. 21:13:28 _ being reserved is a good thing. :-) 21:15:22 __ _ ___ [] = ___ 21:15:26 St4ff 352e that. 21:15:41 Erm, stuff like that. 21:15:58 * ihope__ has n40ber 36c2 6n and 5s 4s5ng a 3a*t6* 21:16:37 you're writing in leet now? 21:16:53 oh, wait, you have the nu pad on 21:17:01 and you're on a laptop 21:21:47 Ye*. 21:22:01 nu pad? 21:22:14 *num pad 21:22:40 the thing that says /*-789+4561230. on it 21:22:52 Y64 05ght get 4sed t6 5t. 21:23:00 And I might turn it off. 21:24:36 is there anyone here familiar with perl that thinks they could help me figure out what I'm doing wrong here? http://nonlogic.org/dump/text/1162675301.html 21:26:26 -!- oerjan has joined. 21:26:30 * SimonRC inspects it closely. 21:26:40 thanks 21:26:50 it just i-loops for some reason... 21:27:20 have you tried putting a lod of prints in there? 21:27:22 *load 21:28:17 well, I put in a "print $x;" down by where I increment $x, and it never prints, so it may be getting caught in the ][ handlers somewhere... 21:28:45 perl? 21:28:51 yeah 21:29:19 I just decided to learn it this afternoon, and I figured a BF interpreter was a fairly good starting point. 21:30:05 good thought 21:30:58 Nah, you should write a PE -> PE compiler. 21:31:08 One that adds virtualization. 21:33:19 silly ihope, this is a talk page, not an article page. 21:33:38 haha 21:34:12 Hmm? 21:34:27 referring to your wikipedia policy 21:34:28 * ihope__ adds another instruction to his assembly-like language, making it 50 21:34:41 Am I supposed to sign all my messages, then? 21:34:57 s/instruction/nine instructions/ 21:35:13 yes. ~~~~ 21:35:27 fortunately, you already do so. 21:35:48 I do? 21:35:52 a little backwards, though 21:36:12 I thought the servers did that. 21:36:17 well, _i_ certainly see your nick before your messages. 21:36:31 oerjan: what a ridiculous idea! 21:36:51 IRC is much more fun when the server supports anonymous channels. :) 21:36:59 so? in wikipedia you just push a button. 21:37:03 * ihope__ adds instruction number 51 to his language 21:37:14 don't even need to write your name 21:37:55 we do have a nearly anonymous channel here. it's called /msg egobot !cat 21:38:31 -!- EgoBot has quit (Read error: 104 (Connection reset by peer)). 21:38:37 Not anymore. 21:38:46 -!- EgoBot has joined. 21:38:48 erm. 21:39:19 i hope that had no connection to what i said. 21:39:19 input, output, finish, jump, set, add, subtract, mult, div, mod, and, or, xor, nand, nor, nxor, equal, nequal, less, great, lesseq, greateq, popa, popb, pusha, pushb, user, popt, pusht, peeka, peekb, peekt, sizea, sizeb, sizet, rjump, load, retrieve, info, djump, drjump, popba, pushba, peekba, popbb, pushbb, flipa, flipb, call, choose 21:39:48 And actually, we need popbt, pushbt, peekbt, and flipt, too. 21:40:04 some of those sound like they're from some weird african language 21:40:33 "Popbt" = "pop from the bottom of the trap stack". 21:40:44 And all that jazz. 21:41:21 Anyway, this makes it 55 instructions. 21:41:22 you simply have to add a peekaboo instruction. so says i. 21:41:30 What would that do? 21:41:52 something with peeking and booleans, perhaps. 21:44:48 -!- EgoBot has quit (Read error: 104 (Connection reset by peer)). 21:46:17 Oh, and "popbt" is actually "pop from the bottom of the trap stack unless in user mode and the stacktt register is nonzero, in which case the instruction pointer as seen from system mode is to be pushed to the trap stack, system mode is to be entered, and a jump is to be done to the location in the stacktt register, or the trap stack is empty, in which case the jump instruction is to be... 21:46:19 ...called with the location in the stackte register". 21:46:27 referring to god, he coded in the following language: ftp://ftp.nvg.ntnu.no/pub/frc/39 21:46:50 It's one of those fancy assembly languages with support for system mode and user mode and all that stuff. 21:51:44 And I wondered why these assembly languages had to have so many instructions. 21:52:34 * ihope__ adds instruction number 56: cancel 22:02:20 * ihope__ finds his typing is not impaired that much when he removes his right index finger 22:03:12 that bored, huh? :) 22:03:59 i'm sure if you used a knife it _would_ impair it a great deal. 22:03:59 Did you remove it using a knife or something? 22:04:24 I stuck it in the thingy of a pen. 22:04:37 The thingy you use to stick it on things. 22:05:15 there is room for a finger in that? 22:05:49 Fingertip, yes. 22:28:25 -!- Razor-X has joined. 22:28:46 howdy. 22:31:48 Heya. 22:35:49 what's up? 22:40:58 I've been learning Perl this afternoon. 22:41:36 rodgerthegreat: i think you should set $iptr=0, not -1. 22:42:00 alternatively use ++$iptr instead of $iptr++. 22:42:15 ah- that may be the issue. I confused pre and post increment 22:42:49 i cannot see why that should cause an infinite loop though. 22:43:06 do you use the -w flag? 22:43:25 well, I commented out the [] code, and it doesn't i-loop anymore- still working on it 22:43:34 I need to learn Perl. 22:43:38 I've been setting it aside. 22:44:00 Aha. Language innaguration with a BF interpreter? 22:44:21 (I'm doing the same in Forth.) 22:44:41 :D 22:44:52 it's a proud tradition. 22:44:57 Yup. 22:45:39 I wrote all the code to deal with everything but [] and the actual parsing itself. 22:46:32 I also thought up a new technique of representing the BF pointer that may be handy in writing an ASM version. 22:48:00 sounds interesting. how does your approach work? 22:48:27 Really simple, actually. 22:48:51 The BF pointer is just an offset from the address of the first cell in the BF tape in memory. 22:49:10 ah 22:52:37 I just got bored and did a Tcl Brainfuck interpreter. 22:52:43 hm. I guess I'll try rewriting my postconditionals in a normal fashion- they might be causing some of my problems. 22:52:46 And I found something that I don't know in the language. 22:52:54 It's a bit challenging in Forth. A bit. 22:52:58 How the hell are you supposed to get only a single char from stdin? 22:53:30 Also because I'm trying to use as little non-stack memory as possible. 22:53:50 I only allocate a dynamic amount of memory for the tape, and a variable to hold the size of the tape. 22:54:03 The rest is just crafty usage of the main and return stacks. 22:55:16 aargh 22:55:29 nothing. 22:55:40 Heh. 22:59:38 The Forth people are correct too. I suffer from a typical problem. I try and overplan. 22:59:58 I hate it when I spend 10 minutes weighing an implementation idea in my head for advantages and disadvantages. 23:02:57 RTG: i note you are writing $x++;$ctr++ if $p[$x]=="["; . you are not wrongly assuming that the if would scope over both statements? 23:04:26 x should be scoped higher than everything- it's defined on line 3. 23:04:48 that's not what i meant. 23:05:12 i wondered why you aren't splitting that into two lines... 23:05:27 oh, no- I see what you mean 23:05:56 and I intended for X to be incremented for every iteration of that loop. 23:06:21 so that part is correct. 23:06:30 yeah, it ought to be. 23:07:28 do you understand how my code for that section works? 23:10:34 well, everything seems correct to me. 23:10:59 yeah, I just can't figure out what I'm doing wrong. 23:12:47 do you have an example program and input that goes wrong? 23:13:33 right now, I'm just trying it with ,+. and A. 23:14:16 and it outputs A. 23:14:29 which is pretty depressing, really. 23:15:30 well it tells us something: , and . are working. 23:16:00 actually, they don't. 23:16:17 if I run the same program with "ABC" as input, it outputs "ABC". 23:21:11 i am suspecting that your split("", does not work properly. 23:22:00 try replacing "" with //. 23:22:46 * pikhq has his Tcl Brainfuck interpreter working. . . 23:22:47 Slowly. 23:22:59 doesn't seem to make a difference. 23:25:38 aha. you really should have used the -w flag. 23:25:48 what does that do? 23:25:48 _always_ do that. 23:25:59 it turns on lots of warnings. 23:26:11 AH 23:26:17 I see the problem! 23:27:26 BF *interpreter*? 23:27:56 what was it, apart from the @p array being strangely empty? 23:28:26 the warnings telling me that I'm comparing numeric cells to a character. 23:30:22 hrm. 23:32:31 ah. i got the warnings flying by so fast i didn't see that. 23:32:59 does it work when you change to string comparison? 23:33:30 you can compare strings with ==, right? 23:33:58 I double-checked everything it was giving warnings about, and it doesn't seem to fix things. 23:36:15 now it prints 0123. 23:36:54 that's the debugging I was using to make sure x incremented properly. you can take that line out. 23:37:17 actually i'll rather add some more... 23:37:33 go ahead 23:37:47 -!- ihope__ has changed nick to ihope. 23:37:52 ok, it actually goes through the commands. although it seems to have an off-by-one error at the end. 23:38:04 hm 23:38:21 ah, that's probably just the \n character. 23:38:26 yeah 23:40:12 * pikhq loves how his BF interpreter works. . . 23:40:23 We compile to Tcl, and evaluate the compiled code. XD 23:41:34 ah, interesting. reading the input gives the wrong character. 23:43:01 how so? 23:43:16 is it a problem with using ord()? 23:43:28 no. it was that $iptr=-1 thing. 23:43:47 i forgot to fix it. 23:43:54 ah- haha 23:44:46 it works! 23:44:56 what? 23:45:21 the test worked. ,+. with ABC now gives output B and just that. 23:45:50 what did you change? 23:46:11 all == except one changed to eq 23:46:28 familiarize me with eq. 23:46:41 it's string comparison. 23:46:59 I'd wondered wether strings had their own comparator. 23:47:08 man perlop is your friend. 23:47:16 could you paste me your fixed code? 23:48:24 http://home.nvg.org/~oerjan/test.pl 23:49:15 erm... 404. if you want, you can use http://nonlogic.org/dump 23:50:02 strange. 23:53:24 ok, http://nonlogic.org/dump/text/1162684351.html 23:54:58 sweet 23:55:39 w00t! it totally works! 23:55:48 thanks, man- you were a big help. 23:56:00 you're welcome 23:57:04 also, the following man pages are good for reference: perlop, perlfunc and perlre. 23:57:29 ok, I'll be sure to check those out 23:58:32 and of course man perl to find all the other documentation. 23:59:58 Are we going to work on the Factory language?