←2006-08-17 2006-08-18 2006-08-19→ ↑2006 ↑all
00:00:25 <oerjanj> some Lisp and Smalltalk systems allowed that as I recall. Don't know about Python.
00:00:47 <oerjanj> maybe there is a module you can use for it...
00:02:19 <CakeProphet> hmm... basically the only part of the parser that touches the main program is a single line... is it possible to put that single line into a try:except that somehow doesn't fuck the program over?
00:02:40 <CakeProphet> "blah = surrealocmds.SurrealoParse(cmd)"
00:04:29 -!- kipple has quit (Read error: 110 (Connection timed out)).
00:10:15 <oerjanj> hmm... could you make the Parser an iterator?
00:13:57 <CakeProphet> *scratches head*
00:14:06 <CakeProphet> Well... the parser parses via iteration..
00:15:44 <CakeProphet> It runs through all the command functions with a for loop and sees if any of them are triggered, if one is triggered, it returns it.
00:16:26 <CakeProphet> But.. I think I got it now... I basically just enclosed stuff in functions, so in the except statement I can tell it to run the function again...
00:16:47 <CakeProphet> Thus giving me something like resumable exceptions.
00:16:47 <oerjanj> i am talking here about Python Iterators, btw.
00:17:06 * CakeProphet nods, "Me too..."
00:18:09 <oerjanj> hm...
00:20:19 <CakeProphet> Python's iterators... are... while and for.
00:24:03 <oerjanj> um, no. iterators are objects having __iter__ and next methods, and can be used in for ... in loops.
00:25:09 -!- CXI has quit (Success).
00:25:24 <oerjanj> there is also something called generators...
00:25:51 <CakeProphet> Oooh
00:26:31 <CakeProphet> Python iterators then... are... pretty much any non-integer... strings, lists, arrays, dictionaries (associative arrays), etc...
00:26:41 <CakeProphet> tuples aren't iterators as well..
00:28:05 <CakeProphet> No wait... strings don't have the __iter__ method.
00:29:06 <oerjanj> so, if you made your parser an iterator, you could just do something like for token in parser: token.command()
00:29:34 <oerjanj> (if I have the syntax right, i am looking things up as we speak)
00:32:00 <oerjanj> and of course the token.command() could be wrapped in try: except, and maybe you could have one for the parser too.
00:32:17 <oerjanj> or maybe that would ruin your tracebacks?
00:32:53 <oerjanj> anyhow, i should go to bed
00:33:09 -!- oerjanj has quit ("CYL").
00:35:35 <CakeProphet> Oh... I made a CommandList list item to use in the for loop... but... yeah.. he left.
00:39:46 * CakeProphet bangs his head against the wall, "Ha! I'm such a shitty programmer it's not even funny."
00:58:28 <CakeProphet> Argh... functions give me headaches... I always get a bunch of unexpected errors that I have no idea how to fix.
00:58:38 <CakeProphet> When I work imperitively everything is pretty straightforward to fix.
01:07:45 -!- Sgeo has joined.
01:25:28 -!- Sgeo has quit (Read error: 104 (Connection reset by peer)).
01:28:47 -!- Sgeo has joined.
01:31:16 <CakeProphet> Hmmm... anyone know how to get Python to import modules twice?
01:31:33 <CakeProphet> Apparently it imports once... and then any other commands to import are ignored because it already has the file.
03:21:23 <Razor-X> ... Why would you need to import a module twice?
03:21:43 <pikhq> What's next?
03:21:51 <pikhq> #include <stdio.h>
03:21:55 <pikhq> #include <stdio.h>
03:21:56 <pikhq> ?
03:30:32 <Razor-X> #include <ieatbabies.h>
03:31:55 <pikhq> >:D
03:32:51 <GregorR> www.donotputthebaby.com
03:32:56 <GregorR> (Obligatory link)
03:33:42 <Razor-X> Are there any RSI-avoiding tips other than rest?
03:33:54 <Razor-X> Mind mf slow responses.
03:33:58 <Razor-X> *my
03:34:10 <GregorR> Ergonomic keyboard, Dvorak, and there are specially designed not-quite-keyboard things that are better for you.
03:34:29 <Razor-X> I have a Model M and already use Dvorak.
03:34:31 <pikhq> Wetware.
03:35:01 <GregorR> Don't use a keyboard :P
03:35:06 <Razor-X> I must.
03:35:16 <Razor-X> So much more vocabulary. So much more clicking.
03:35:25 <pikhq> Don't use a mouse.
03:35:26 <pikhq> Oh, wait.
03:35:27 <GregorR> Apple sez: "The keyboard is obsolete! Use teh mouse roflcopter"
03:35:33 <pikhq> Ratpoison user. :)
03:35:41 <Razor-X> Th keyboard is easier on me than a mouse.
03:35:45 <Razor-X> *The
03:36:14 <pikhq> As it should be.
03:37:23 <Razor-X> Even with a trackball.
03:56:28 -!- Sgeo has quit (Remote closed the connection).
03:58:42 -!- Sgeo has joined.
04:02:09 -!- Sgeo has quit (Remote closed the connection).
04:03:43 -!- Sgeo has joined.
04:08:38 -!- CakeProphet has quit ("haaaaaaaaaa").
04:10:22 -!- Sgeo_ has joined.
04:27:49 -!- Sgeo_ has quit (Remote closed the connection).
04:27:51 -!- Sgeo has quit (Read error: 104 (Connection reset by peer)).
04:34:10 -!- Sgeo has joined.
04:34:22 -!- Sgeo has quit (Read error: 104 (Connection reset by peer)).
05:19:44 -!- Sgeo has joined.
05:36:26 -!- Arrogant has joined.
07:39:19 -!- clog has joined.
07:39:19 -!- clog has joined.
07:57:44 -!- nooga has joined.
07:57:50 <nooga> aaa
07:57:53 <nooga> http://www.clifford.at/bfcpu/bfcomp.html
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
08:01:23 -!- GregorR-W has quit (Remote closed the connection).
08:02:13 -!- GregorR-W has joined.
08:04:18 <GregorR> nooga: ?
08:04:20 <GregorR> And?
08:06:21 <nooga> well
08:06:36 <nooga> it's almost like c2bf
08:07:20 <GregorR> Except it's not intended to be C.
08:07:23 <GregorR> Just a subset thereof.
08:07:45 <GregorR> And yes, I'm well aware of it.
08:10:11 <GregorR> And then, Gregor went to sleep.
08:12:58 <nooga> bah
08:53:00 -!- Sgeo has quit ("Ex-Chat").
10:09:56 <nooga> mhh
10:21:27 -!- Paragon_ has joined.
10:21:48 -!- Arrogant has quit (Nick collision from services.).
10:21:52 -!- Paragon_ has changed nick to Arrogant.
10:23:39 -!- anonfunc has quit.
10:51:02 -!- jix has joined.
11:20:01 <nooga> u
11:42:50 -!- Arrogant has quit (Read error: 110 (Connection timed out)).
12:08:09 -!- ivan` has quit (" HydraIRC -> http://www.hydrairc.com <- IRC for those that like to be different").
13:04:16 -!- Arrogant has joined.
13:13:56 -!- tgwizard has joined.
14:03:54 -!- Sph1nx has joined.
14:05:14 -!- RodgerTheGreat has joined.
14:05:37 <RodgerTheGreat> 'morning.
14:07:39 <nooga> moin
14:07:42 <nooga> g2g
14:07:43 <nooga> bye
14:07:46 -!- nooga has quit.
14:07:46 <RodgerTheGreat> cya
14:36:30 -!- ihope has joined.
14:51:25 <ihope> "This channel requires that you have registered and identified yourself with the network's nickname registration services."
14:51:28 <ihope> Does it, now?
14:53:47 <RodgerTheGreat> hunh
15:32:13 -!- kipple has joined.
16:23:58 -!- sekhmet has quit ("leaving").
16:24:33 <GregorR-W> ihope: Yeah, it says that but doesn't enforce it at all >_>
16:26:22 * RodgerTheGreat stifles a laugh
16:26:32 -!- sekhmet has joined.
16:40:58 -!- sekhmet has quit ("down for a sec or two").
16:52:59 -!- sekhmet has joined.
17:40:27 -!- Sgeo has joined.
17:48:00 -!- Arrogant has quit ("Leaving").
18:22:06 -!- smokecfh has joined.
18:27:55 -!- _jol_ has joined.
19:03:32 -!- smokecfh has quit (niven.freenode.net irc.freenode.net).
19:03:32 -!- Sgeo has quit (niven.freenode.net irc.freenode.net).
19:03:32 -!- tgwizard has quit (niven.freenode.net irc.freenode.net).
19:03:33 -!- pgimeno has quit (niven.freenode.net irc.freenode.net).
19:03:33 -!- GregorR has quit (niven.freenode.net irc.freenode.net).
19:03:33 -!- bsmntbombdood has quit (niven.freenode.net irc.freenode.net).
19:03:33 -!- _jol_ has quit (niven.freenode.net irc.freenode.net).
19:03:33 -!- kipple has quit (niven.freenode.net irc.freenode.net).
19:03:34 -!- GregorR-W has quit (niven.freenode.net irc.freenode.net).
19:03:34 -!- pikhq has quit (niven.freenode.net irc.freenode.net).
19:03:43 -!- Sph1nx has quit (niven.freenode.net irc.freenode.net).
19:03:43 -!- EgoBot has quit (niven.freenode.net irc.freenode.net).
19:03:43 -!- _jol_ has joined.
19:03:58 -!- bsmntbombdood has joined.
19:04:21 -!- pgimeno has joined.
19:04:29 -!- RodgerTheGreat has changed nick to RodgerTheAFK.
19:04:29 -!- Sph1nx has joined.
19:04:37 -!- smokecfh has joined.
19:04:37 -!- Sgeo has joined.
19:05:52 -!- _jol_ has quit (Client Quit).
19:07:58 -!- sekhmet has quit (niven.freenode.net irc.freenode.net).
19:08:18 -!- EgoBot has joined.
19:08:23 -!- GregorR has joined.
19:09:05 -!- pikhq has joined.
19:09:11 -!- kipple has joined.
19:12:12 -!- GregorR-W has joined.
19:20:34 <pikhq> Silence. . .
19:25:52 <GregorR-W> SILENCE!
19:29:37 <pikhq> Da.
19:30:23 <pikhq> 0^+.^
19:40:37 <ihope> Silence...
19:40:43 <ihope> ...is golden.
19:43:53 -!- GregorR-W has quit (Remote closed the connection).
19:44:42 -!- _jol_ has joined.
19:52:23 -!- GregorR-W has joined.
19:55:26 -!- kipple has quit (niven.freenode.net irc.freenode.net).
19:55:28 -!- cmeme has quit (niven.freenode.net irc.freenode.net).
19:55:28 -!- lindi- has quit (niven.freenode.net irc.freenode.net).
19:55:28 -!- lindi- has joined.
19:56:26 -!- kipple has joined.
19:57:01 -!- Sph1nx has quit (Client Quit).
19:57:42 -!- cmeme has joined.
19:58:11 -!- Sph1nx has joined.
19:59:06 <ihope> Would that be the code problem causing the netsplits?
20:00:53 <GregorR-W> No, that's the code problem causing Freenode servers to come to life and kill people rampantly.
20:00:57 <GregorR-W> The netsplits are just a side effect.
20:04:54 <ihope> Oh.
20:05:13 <RodgerTheAFK> hm.
20:10:15 <sparr> Cause a netsplit, please. :)
20:15:52 <ihope> [ERROR] Missing required parameter server1.
20:18:46 -!- RodgerTheAFK has quit (Remote closed the connection).
20:19:35 -!- Sph1nx has quit (Remote closed the connection).
20:19:49 -!- RodgerTheGreat has joined.
20:20:15 -!- Sph1nx has joined.
20:20:31 -!- Sgeo has quit (Client Quit).
20:23:02 -!- Sgeo has joined.
20:30:36 -!- smokecfh has quit (Remote closed the connection).
20:50:25 -!- Sph1nx has quit (Remote closed the connection).
20:51:55 -!- Sph1nx has joined.
20:51:58 -!- CakeProphet has joined.
20:56:22 -!- Sph1nx has quit (Client Quit).
20:57:45 -!- sekhmet has joined.
21:08:43 -!- _jol_ has quit ("leaving").
21:19:08 -!- tgwizard has joined.
21:23:54 -!- clog has joined.
21:23:54 -!- clog has joined.
21:23:56 -!- Anders has joined.
21:24:24 -!- pgimeno has joined.
21:28:15 -!- Sph1nx has joined.
21:41:32 -!- Sph1nx has quit (" !").
22:13:40 -!- preyalone has joined.
22:29:56 -!- ivan` has joined.
22:37:52 <ihope> main(){while 1{}}
22:37:56 <ihope> Is that a valid C program?
22:38:32 <GregorR-W> No.
22:38:49 <GregorR-W> main(){while(1);}
22:38:54 <GregorR-W> Is as close as you could get to that.
22:39:07 <GregorR-W> Just as short though :P
22:42:00 <ihope> What's that in assembler?
22:44:24 <fizzie> main(){main();} is shorter, and might not even crash in some environments.
22:46:20 <ihope> What about a label and a goto?
22:50:23 <GregorR-W> I think 'goto' would put you over.
22:53:14 <fizzie> main(){x:goto x;} has as many characters as the while(1); version.
22:53:32 <fizzie> main(){for(;;);} is one character shorter, actually.
22:57:41 <GregorR-W> If you use the compiler line: "gcc -Da=main(){while();}" then your program is really short:
22:57:43 <GregorR-W> a
22:59:06 <ihope> You mean the machine code in ASCII is "a"?
22:59:13 <ihope> Or the C code is "a"?
22:59:20 <GregorR-W> The C code is "a"
22:59:23 <ihope> Oh... yeah.
23:04:58 <fizzie> GCC compiles "main(){while(1);}" to 0xeb 0xfe, which is a relative jump to itself. (0xfe there is -2.)
23:05:59 <GregorR-W> Hahah
23:06:01 <GregorR-W> Awesome
23:07:17 <fizzie> (When optimizing, that is; when not, it does "0x55 0x48 0x89 0xe5 0xeb 0xfe", or in other words "push %rbp; mov %rsp,%rbp; jmp <itself>". And this all on x86_64; would be %ebp and %esp on i386, and something completely different on other archs.)
23:57:45 -!- ivan` has quit (" HydraIRC -> http://www.hydrairc.com <- Leading Edge IRC").
←2006-08-17 2006-08-18 2006-08-19→ ↑2006 ↑all