←2007-01-11 2007-01-12 2007-01-13→ ↑2007 ↑all
00:02:09 <bsmntbombdood> brilliant I tell you! brilliant!
00:05:54 <lament> bloody he tells us! bloody!
00:06:04 <bsmntbombdood> bloody!
00:11:20 -!- tgwizard has quit (Remote closed the connection).
00:16:29 <bsmntbombdood> hmm
00:16:39 <bsmntbombdood> I could just pickle the whole object
00:20:14 <oerjan> DIE BOT DIE
00:20:29 <bsmntbombdood> ~exec self.load_callbacks("/bot/test.pickle")
00:20:32 <bsmntbombdood> now do it
00:20:39 <oerjan> DIE BOT DIE
00:20:39 -!- bsmnt_bot has quit (Remote closed the connection).
00:20:41 -!- bsmnt_bot has joined.
00:20:55 * oerjan feels the power
00:23:32 <bsmntbombdood> te he he
00:43:07 <bsmntbombdood> Well, it's persistant now
00:44:48 <oklopol> can i too?
00:44:54 <bsmntbombdood> yeah
00:45:05 <oklopol> DIE BOT DIE LIKE YER MOTHER!!!
00:45:11 <oklopol> :(
00:45:19 <oerjan> ~exec self.load_callbacks("/bot/test.pickle")
00:45:21 <oklopol> DIE BOT DIE LIKE YER MOTHER!!!
00:45:22 -!- bsmnt_bot has quit (Remote closed the connection).
00:45:25 -!- bsmnt_bot has joined.
00:45:32 <bsmntbombdood> heh
00:45:46 <oklopol> omg that's nice
00:46:03 <oerjan> a thereapeutic robot :D
00:46:08 <oklopol> yeah :)
00:46:22 <oklopol> ~exec print o
00:46:25 <oklopol> ~exec print "o"
00:46:32 <oklopol> meh
00:46:50 <oerjan> The sys.output problem has not been solved.
00:47:08 <oklopol> that is not fair :\
00:47:09 <oerjan> ~exec print >> sys.output "o"
00:47:14 <oerjan> ~exec print >> sys.output, "o"
00:47:26 <oklopol> >> ?
00:47:32 <oerjan> apparently renamed...
00:47:53 <bsmntbombdood> sys.stdout, as always
00:47:54 <oerjan> ~exec self.raw("PRIVMSG #esoteric :o")
00:47:55 <bsmnt_bot> o
00:48:06 <oerjan> darn my memory
00:48:25 <bsmntbombdood> I can't figure out how to fix that
00:48:48 <oklopol> why won't it help to just change the stdout here?
00:49:00 <bsmntbombdood> That's what it is
00:49:21 <bsmntbombdood> ~exec sys.stdout.write("foo")
00:49:22 <bsmnt_bot> foo
00:49:24 <bsmntbombdood> see
00:49:32 <oerjan> The problem is that the change should only affect the subthread, which may be impossible.
00:49:33 <oklopol> print is the exact same?
00:49:45 <bsmntbombdood> oerjan: right
00:49:59 <oklopol> ah okay
00:50:13 <bsmntbombdood> I change sys in the enviroment for the exec, but print borks anyway
00:50:43 <oerjan> A sub-process would solve that but make transmitting all other information awkward.
00:51:04 <bsmntbombdood> A sub proccess would require shared memory
00:51:09 <oerjan> Is it possible to redefine the print statement itself?
00:51:22 <bsmntbombdood> not that I'm aware of
00:52:10 -!- ShadowHntr has joined.
00:52:17 <oerjan> And I believe shared memory in a garbage collected language is hard, so Python probably doesn't have it.
00:52:25 <bsmntbombdood> yeah
00:52:37 <bsmntbombdood> don't think it does
00:53:05 <bsmntbombdood> It's possible to redefine the "import" statement with __import__, but I can't find the similar function for print
01:03:39 <CakeProphet> well...
01:04:13 <CakeProphet> the standard print can be altered with sys.stdout.write ...but other than that...
01:04:37 <bsmntbombdood> CakeProphet: But I have done that
01:04:48 <bsmntbombdood> sys.stdout.write writes to this channel
01:05:19 <CakeProphet> import imp
01:05:24 <CakeProphet> has some useful stuff for import hooks.
01:05:33 <CakeProphet> to do some more interpreter magic that can't be done with __import__ easily.
01:05:46 <bsmntbombdood> I don't care about __import__, that was just an example
01:06:09 <Sukoshi> ~quit
01:06:24 <Sukoshi> Aux vorto :(
01:06:45 <bsmntbombdood> Sukoshi: The only public commands are ~exec and ~ps
01:07:11 <bsmntbombdood> You can quit it with ~exec self.disconnect(message)
01:08:49 <Sukoshi> ~ps
01:08:50 <bsmnt_bot> None
01:08:56 <Sukoshi> ~ps
01:08:57 <bsmnt_bot> None
01:08:58 <Sukoshi> ~ps
01:08:59 <bsmnt_bot> None
01:09:14 <bsmntbombdood> only ~exec commands go in ps
01:10:08 <Sukoshi> What's this ``pickling'' thingamabobber?
01:10:23 <bsmntbombdood> Python object serialization
01:10:32 <bsmntbombdood> I was using it to provide persistance for callbacks
01:10:51 * Sukoshi pities those without lexical and dynamic bindings.
01:13:34 * CakeProphet has some nifty stuff you ould use to persitent the entire global namespace.
01:13:41 <CakeProphet> I can store functions if nessicary.
01:14:02 <bsmntbombdood> sure, just pickle globals()
01:14:09 <CakeProphet> the pickle protocol can only store references to functions on the top level of a module.
01:14:17 <CakeProphet> same with classes.
01:14:27 <bsmntbombdood> meh whatever
01:14:27 <CakeProphet> because it doesn't actually store the class itself... just a reference name.
01:14:42 <bsmntbombdood> Did you see my way of persisting functions?
01:14:44 <CakeProphet> but... with enough abuse... you can make it work for any function. :P
01:14:54 <CakeProphet> Nope.
01:15:20 <bsmntbombdood> we basically pickle [(i[0], marshal.dumps(i[1].func_code), inspect.ismethod(i[1])) for i in self.raw_regex_queue]
01:15:54 <CakeProphet> Eh... that would work.
01:16:00 <CakeProphet> for my MUD I use a class.
01:16:08 <CakeProphet> that wraps functions... and just store the source code.
01:16:18 <bsmntbombdood> getting it out is a little more complicated, because we have to convert functions to methods
01:16:49 <CakeProphet> the actual function isn't pickled... but the source is... upon a __call__ it recompiles the function if it doesn't exist or if the source string has been altered.
01:16:58 <bsmntbombdood> http://bsmntbombdood.mooo.com/chroot_ircbot.py
01:17:19 <CakeProphet> so you can edit the definition of a function inplace.
01:17:42 <bsmntbombdood> How do you get the source?
01:17:59 <CakeProphet> depends.
01:18:08 <CakeProphet> If it's something in the hard source... I use inspect.
01:18:24 <bsmntbombdood> Right, that parts easy
01:18:32 <CakeProphet> as for mid-runtime defined functions... I just capture the source as its defined and instantiate a new func object.
01:18:53 <bsmntbombdood> hmm
01:18:59 <CakeProphet> since it's a MUD... and it uses commands-mapped-to-functions... I can just hard-code that part into the "def" command.
01:19:15 <bsmntbombdood> ?
01:19:29 <bsmntbombdood> You can redefine def?
01:19:34 <CakeProphet> no no.
01:19:39 <CakeProphet> it's not Python... it's MUD commands.
01:19:44 <bsmntbombdood> oh
01:20:03 <bsmntbombdood> So you have your own dsl
01:20:10 <CakeProphet> the player could type "def WHEEFUNC(arg, arg)" and a text-editor would pop up or something.
01:20:16 <CakeProphet> dsl?
01:20:19 <CakeProphet> wassat?
01:20:38 <bsmntbombdood> domain specific language
01:20:47 <CakeProphet> if you wanna call it that.
01:21:27 <CakeProphet> it's just "command stuff" where stuff is matched to a command-specific parsing regex.
01:21:46 <bsmntbombdood> regexes!
01:22:17 <CakeProphet> I still have that way to do it..
01:22:26 <CakeProphet> but I decided in the end to make a new version that ditches all of that.
01:22:48 <CakeProphet> and I'm going to make my own language for the MUD... that resembles ORK and uses coroutines heavily.
01:24:08 <bsmntbombdood> I wonder if you could write a parser using only regexes
01:24:23 <CakeProphet> sure... depends on the language though.
01:24:33 <CakeProphet> Stue... for example... can be parsed entirely with regex.
01:24:39 <CakeProphet> as could ORK.
01:24:42 <bsmntbombdood> Using backreferences to get the actual values
01:24:54 <CakeProphet> Python's regex has named groups.
01:24:57 <CakeProphet> which is super handy for that.
01:25:06 <bsmntbombdood> yeah
01:25:17 <CakeProphet> Glass could probably be parsed with regex.
01:25:20 <CakeProphet> and BF too... :P
01:25:58 <CakeProphet> some things that probably can't be parsed too easily with regex would be like... HTML and English.
01:27:49 <oerjan> Actually simple regexes cannot parse nested parenthesis-like structures.
01:28:16 <CakeProphet> I think really parsing english is just a matter of amassing a huge database of words, slang terms, colloquialisms, acronyms, terminology, expressions, common names, etc.
01:28:24 <oerjan> Which rules out both Glass (/\) and BF ([])
01:28:33 <bsmntbombdood> hrm
01:28:42 <bsmntbombdood> yeah, I guess so
01:29:01 <oerjan> it's the difference between regular and context-free languages
01:29:08 <bsmntbombdood> But you say simple...are there complex ways to do it?
01:29:32 <CakeProphet> I've got a parsing library that extends off of regex to allow recursive structures.
01:29:41 <oerjan> Well I was hedging my bets for what strange extensions might exist :)
01:29:43 <CakeProphet> it uses some form of "forewarding" or something.
01:30:28 <CakeProphet> I guess if you a metacharacter that meant "a backreference to the group I'm in".
01:30:33 <CakeProphet> you could let the regex engine handle it.
01:31:53 <oerjan> There may of course be tricks to use regexes heavily together with explicit recursion.
01:33:47 <oerjan> For example, in BF you might use "[[^][]*]" to get everything between the first and last loop, and then have another regex to split _that_ up.
01:34:02 <bsmntbombdood> hmph
01:34:25 <bsmntbombdood> except you have to escape the []
01:34:46 <bsmntbombdood> "\[[^\]\[]*\]"
01:34:50 <oerjan> Eh, wait that was wrong.
01:34:56 <bsmntbombdood> er
01:35:00 <oerjan> In fact I meant:
01:35:34 <bsmntbombdood> "\[.*\]"
01:35:57 <oerjan> "\[^][]*\[(.*)\][^][]*\]"
01:36:22 <bsmntbombdood> huh?
01:36:55 <oerjan> first skip to the first [, then keep everything to the last ], then skip the rest.
01:37:16 <oerjan> Don't know if it's useful, just thought of it.
01:37:41 <bsmntbombdood> You can't get it to match the right ]
01:38:12 <oerjan> Gah, I forgot the final \[^][]*
01:38:45 <oerjan> i mean i had an extra \]
01:39:04 <oerjan> cannot read my own regexps :)
01:39:41 <bsmntbombdood> you can't get nested loops
01:39:52 <oerjan> I suppose real parser combinators are better.
01:40:24 <oerjan> What is wrong with "\[^][]*\[(.*)\][^][]*" ?
01:40:39 <bsmntbombdood> I can't read it :)
01:40:53 <oerjan> Gah. An extra \
01:41:01 <CakeProphet> regex should probably go the oher way around..
01:41:05 <CakeProphet> or at least... have an option to do.
01:41:15 <CakeProphet> use escape characters for the meta characters..
01:41:22 <CakeProphet> instead of escape characters for the regular characters.
01:41:30 <oerjan> What is wrong with "[^][]* \[ (.*) \] [^][]*"/v ?
01:41:39 <CakeProphet> all the slashes make it weird to read.
01:41:42 <bsmntbombdood> there's a sexp regex format
01:42:10 <CakeProphet> but I guess all the escape characters for metachars would just muck up the readability too.
01:42:11 <oerjan> I am trying to use the Perl format, which is what I know somewhat.
01:42:12 <CakeProphet> so..
01:42:39 <CakeProphet> I always use non-greedy *'s on .'s
01:42:42 <CakeProphet> .*?
01:42:44 <bsmntbombdood> that CL-PPCRE uses
01:42:50 <CakeProphet> otherwise it'll eat up your regex.
01:43:10 <oerjan> That /v should be /x
01:43:28 <oerjan> (for embedded whitespace for legibility.)
01:43:56 <CakeProphet> verboose mode comes in handy.
01:44:05 <CakeProphet> ignores whitespaces unless they're in brackets.
01:44:40 <oerjan> OK then: "^ [^][]*? \[ (.*) \] [^][]* $"/x ?
01:45:15 <CakeProphet> hmmm..
01:45:24 <CakeProphet> the tilde seems like a good escape character.
01:45:30 <bsmntbombdood> won't work
01:45:32 <oerjan> Actually that ? is useless.
01:45:40 <bsmntbombdood> wait
01:45:45 <CakeProphet> it's rarely used.... and it's not quite so weird and choppy looking as \
01:45:46 <bsmntbombdood> That might actually work
01:46:01 <bsmntbombdood> CakeProphet: writing your own pattern matcher?
01:46:08 <CakeProphet> Nah.
01:46:16 <CakeProphet> Any pattern matcher I wrote would be non-character-specific.
01:46:31 <CakeProphet> with an optional ability to match per-character.
01:46:43 <bsmntbombdood> oerjan, I think you've got something
01:46:59 <CakeProphet> ~[^~]
01:47:01 <CakeProphet> hmmm...
01:47:13 <CakeProphet> ![^!]
01:47:17 <EgoBot> Huh?
01:47:17 <CakeProphet> I kind of like !'s
01:47:20 <CakeProphet> but it's used.
01:47:35 <oerjan> The question is how to parse the interior further.
01:48:00 <bsmntbombdood> recurse
01:48:14 <oerjan> It needs a different expression for sure.
01:48:57 <bsmntbombdood> uh yeah, yours.doesn't work
01:49:43 <bsmntbombdood> matched agains "[ ] [ ]", it matches the whole thing
01:50:44 <oerjan> Yes, and then " ] [ " needs to be split up further.
01:51:11 <bsmntbombdood> I don't know of any way to do it other than counting, and regexes can't count
01:51:30 <CakeProphet> Lisp can be parsed... erm... linearly.
01:51:38 <bsmntbombdood> ?
01:51:48 <oerjan> I believe I said I meant to use more than one regexp.
01:51:51 <CakeProphet> character by character.
01:52:10 <bsmntbombdood> yeah
01:52:22 <bsmntbombdood> it still needs to count parens
01:52:41 <CakeProphet> "(" simply means accumulate another branch to the parse tree... ")" mean return to the last node... " and ' would start a string and symbol mode respectively.
01:52:44 <bsmntbombdood> increment on "(", decrement on ")", return buffer when count == 0
01:53:00 <CakeProphet> ...yeah.
01:53:32 <oerjan> Well, even if it could work it would end up rather complicated.
01:53:40 <CakeProphet> Yup.
01:54:07 <CakeProphet> parsers tend to be pretty damn weird to code by hand (i.e. without a parsing language)
01:54:59 <bsmntbombdood> I think I'm going to write a quit parser for nested (), just as an excersize
01:56:51 <oerjan> Recursive descent is not that bad.
01:57:00 <oerjan> When it works.
02:01:27 -!- CakeProphet_ has joined.
02:02:40 <oerjan> Is everyone else finding the net awfully slow these last days? And not just IRC either.
02:02:54 <bsmntbombdood> yes
02:03:01 <bsmntbombdood> I was just thinking that
02:03:46 <CakeProphet_> The tubes are clogged?
02:03:59 <bsmntbombdood> need some billaird balls
02:07:46 <bsmntbombdood> ok, no idea how to do this
02:08:07 <oerjan> do what?
02:08:12 <bsmntbombdood> I at least got the code to get the part in between the parentheses
02:08:24 <oerjan> What is a quit parser?
02:08:34 <bsmntbombdood> *quick
02:09:00 <oerjan> Darn, here I though I was up to some new interesting technology :D
02:09:44 <oerjan> Use either an explicit stack, or recursion.
02:09:50 <bsmntbombdood> yeah
02:11:38 <bsmntbombdood> I'm not sure what the parse tree should look like
02:12:07 <oerjan> A list of expressions, some of which are themselves lists of expressions?
02:12:13 <bsmntbombdood> (a(b)) => [["a", ["b"]]] ?
02:12:38 <oerjan> A single outer set should be enough.
02:12:56 <bsmntbombdood> a(b(c))
02:13:03 <bsmntbombdood> er, yeah
02:13:06 <oerjan> eh, right.
02:13:09 -!- CakeProphet_ has quit (Read error: 104 (Connection reset by peer)).
02:13:09 -!- CakeProphet__ has joined.
02:13:19 <bsmntbombdood> gah, I have no idea what I'm doing
02:13:32 <oerjan> actually your first seemed good.
02:13:42 <bsmntbombdood> what should (a(b)c) parse to?
02:13:59 -!- CakeProphet has quit (Read error: 113 (No route to host)).
02:14:03 -!- CakeProphet__ has changed nick to CakeProphet.
02:14:10 <bsmntbombdood> [["a", ["b"], "c"]] ?
02:14:21 <oerjan> I think so.
02:15:06 <CakeProphet> my web browser is acting weird.
02:15:09 <oerjan> for clarity, you might want two different functions, parse_list and parse_expr
02:15:09 <CakeProphet> it can't get to anything.
02:15:16 <CakeProphet> while everything else internet-wise works fine.
02:15:23 <bsmntbombdood> CakeProphet: wow
02:15:38 <CakeProphet> it just hangs up... :/
02:15:42 <oerjan> i also have web sites dropping out frequently.
02:16:01 <CakeProphet> it just sits loading forever...
02:16:10 <CakeProphet> without ever saying "lol no connection kthxbai"
02:16:12 <oerjan> Same with me, until it gives up.
02:16:18 <bsmntbombdood> yep
02:16:32 <CakeProphet> meanwhile telnet and IRC work hunky dory.
02:16:33 <oerjan> Oh, mine does give up eventually.
02:17:26 <CakeProphet> I can reach the esolang wiki and..
02:17:27 <CakeProphet> gmail.
02:18:14 <oerjan> Perhaps they are close to you? Anyhow the esolang wiki has always been on and off in my experience.
02:19:00 <oerjan> Maybe the spam is finally taking over :/
02:19:59 <CakeProphet> hmm... working fine for now..
02:20:02 <CakeProphet> a little bump though.
02:20:08 <CakeProphet> bumpy
02:21:31 <oerjan> Now I cannot get to BBC news...
02:21:53 <oerjan> Now I can.
02:27:25 <bsmntbombdood> weird
02:27:40 <oerjan> ?
02:27:50 <bsmntbombdood> the web
02:28:18 -!- pikhq has joined.
02:28:27 <bsmntbombdood> argh I can't do this
02:28:30 <bsmntbombdood> the parser
02:28:41 <oerjan> What's the problem?
02:28:47 <bsmntbombdood> ...I don't know
02:29:43 <oerjan> What are you doing at ( and ) ?
02:30:12 <bsmntbombdood> incrementing the count, decrementing the count and recursing if count == 0
02:30:41 <oerjan> Eh, recursing should be done whenever you hit a (
02:30:51 <bsmntbombdood> ?
02:31:03 <oerjan> Paste?
02:31:28 <bsmntbombdood> it's not even anything
02:31:47 <bsmntbombdood> oh I know
02:32:02 <bsmntbombdood> i need to return the string if it doesn't have any of () in it
02:32:14 <oerjan> If you are using recursion, you don't need any counting.
02:32:26 <bsmntbombdood> eh?
02:33:14 <oerjan> Just return when you would decrement and call a subfunction when you would increment.
02:34:14 <oerjan> The depth of the recursion stack automatically keeps track of the count.
02:37:12 <oerjan> And by the way, this is easiest in functional style: the result value of the function should be the parse tree of what that invocation has parsed.
02:37:25 <bsmntbombdood> right
02:38:45 <oerjan> On the other hand the pointer to the current character needs to be common for all invocations, so each can take over where another stopped.
02:39:09 <oerjan> Easy with a file-like object, I presume.
02:39:35 <bsmntbombdood> they just pass a substring
02:40:19 <oerjan> Right, in that case it needs to be passed upwards as well because the caller needs to take over where the called function stopped, as well.
02:40:33 <bsmntbombdood> argh
02:41:28 <oerjan> I believe in Python it is easier to use a common object with a pointer.
02:42:34 <bsmntbombdood> file like object it is, then
02:42:55 <CakeProphet> Python doesn't really recognize such a thing as a "pointer".
02:43:13 <CakeProphet> everything is implicitly a reference...
02:43:34 <bsmntbombdood> And index into an indexable object is a "pointer"
02:43:46 <bsmntbombdood> s/And/An/
02:45:01 <oerjan> That's what I meant anyhow.
02:45:32 <oerjan> Also, doing it this way has the advantage that you can easily parse directly from a file.
02:45:33 <CakeProphet> but if it's something like a string... there's very little difference in a reference to a string and a copy of a string.
02:45:36 <CakeProphet> due to immutability.
02:45:49 <CakeProphet> lists and dictionaries... on the other hand.
02:46:36 <oerjan> Just pretend I said "index", OK? :)
02:46:59 <CakeProphet> hmm... is an index a "pointer"?
02:47:34 <oerjan> Well, a pointer is an index into memory.
02:48:34 <CakeProphet> it doesn't matter much in Python though.
02:48:48 <bsmntbombdood> You have to use an index to emulate a pointer in python
02:49:02 <CakeProphet> mutability and immutability tend to outweigh pointers.
02:49:49 <CakeProphet> x = [[].[].[]]; y = x[0]; y.append(1); print x #[[1],[].[]]
02:49:54 <bsmntbombdood> well in c, everything is immutable
02:49:55 <CakeProphet> That's a "pointer"
02:50:24 <CakeProphet> anything assigned to a list is just a pointer... unless you use the copy method... or use the list() function.
02:50:52 <CakeProphet> x = [[].[].[]]; y = x[0].copy(); y.append(1); print x #[[],[].[]]
02:52:06 <CakeProphet> y becomes a "pointer" implicitly for any variable that references a list.... same with dictionaries and classes/instances.
02:52:10 <oerjan> This is all well and good, but we knew it already. I just used a loaded word OK?
02:52:29 <CakeProphet> nah nah... not the wording... I'm just trying to figure out... what you're trying to do..
02:52:55 <bsmntbombdood> some hardcore pointer manipulation makes me all warm and fuzzy inside
02:53:20 <oerjan> I was suggesting bsmntbombdood turned his string into an input file-like object so it could be scanned/parsed easier.
02:53:29 <CakeProphet> StringIO?
02:53:52 <oerjan> Which means he somehow needs an index into it.
02:54:13 <CakeProphet> import cStringIO as stringio; x = stringio(); x.write("wheeeee"); print x.getvalue()
02:54:15 <oerjan> There's a library for it? Not entirely surprising.
02:54:25 <CakeProphet> yup.
02:54:36 <CakeProphet> cStringIO is the faster version of it though... so I'd use it.
02:55:07 <CakeProphet> it's basically just a string-file... good pretty much anywhere a file is (it uses all the same methods... with an added "getvalue" method)
02:55:11 <bsmntbombdood> It's also a drop in replacement, so it doesn't matter what I use
02:56:38 <CakeProphet> Half of Python's awesomeness lies in the sheer amount of junk in its library.
02:56:54 <bsmntbombdood> oerjan: what do I do on ) ?
02:57:28 <CakeProphet> You place that accumulated bits into the next index of the node?
02:57:32 <oerjan> Just return.
02:57:59 <CakeProphet> That's what I'd guess... basically just convert it into tuples (or lists)
02:58:01 <oerjan> Perhaps not advancing the index, so that the parent also gets to see the )
02:58:05 <CakeProphet> lists would work better... being mutable.
02:58:43 <oerjan> Yes, return the accumulated list.
02:58:53 <CakeProphet> Generally speaking... if you're doing massive numbers of string, list, or tuple concats in a Python program... you're probably doing it the wrong way.
02:59:11 <bsmntbombdood> CakeProphet: I do string concats a lot :/
02:59:17 <CakeProphet> ewww.
02:59:19 <CakeProphet> they're slow.
02:59:26 <CakeProphet> list operations are much faster.
03:00:10 <CakeProphet> because when you work with a list... you don't have to construct an entirely new string object each and every time... as you do with concatenation.
03:02:03 <CakeProphet> it's really on a problem when you have a large number of successive concatenations on a progressively increasing string.
03:02:15 <CakeProphet> r/on/only
03:02:23 <oerjan> I guess stringIO doesn't actually construct the string until you call get_value?
03:02:31 <CakeProphet> Righto.
03:02:46 <CakeProphet> among other things.
03:02:51 <CakeProphet> it's a "mutable string".
03:03:20 <CakeProphet> but usually lists are the way to go when messing with strings.
03:03:23 <bsmntbombdood> there was a mutable string class once I think
03:04:26 <bsmntbombdood> arggggh
03:04:29 <CakeProphet> compared "\n".join(SomeListOfStrings) to x = ""; for string in SomeListOfStrings: x += string + "\n"
03:04:35 <bsmntbombdood> parse("(a(b))") => ['', ['a', []]]
03:04:48 <CakeProphet> What's wrong?
03:04:55 <CakeProphet> oh.
03:04:58 <CakeProphet> hmm.
03:05:00 <CakeProphet> no
03:05:01 <CakeProphet> wait
03:05:03 <CakeProphet> don't see it.
03:05:12 <bsmntbombdood> ?
03:05:48 <bsmntbombdood> http://pastebin.ca/313805
03:06:32 <CakeProphet> bsmntbombdood, haha... that's exactly the kind of problem I was referring to. :P
03:06:40 <bsmntbombdood> ...yep
03:07:24 <CakeProphet> why a while loop?
03:08:03 <bsmntbombdood> because
03:08:48 <CakeProphet> ...
03:09:08 <CakeProphet> it looks like you're just recursively calling parse() on the exact same string ( s )
03:09:16 <bsmntbombdood> How else would I do it?
03:09:19 <oerjan> Why the buff?
03:09:38 <oerjan> s shouldn't be a string but a file-like object.
03:09:48 <bsmntbombdood> CakeProphet: s isn't a string
03:09:55 <CakeProphet> file.
03:09:57 <CakeProphet> ah.
03:10:24 <CakeProphet> you couild use partition... if you wanted.
03:11:09 <bsmntbombdood> why?
03:11:24 <CakeProphet> "Wheee(wha wha wha (wha wha wha))".partition("(") == ("Wheeee", "(", "wha wha wha (wha wha wha))"
03:11:29 <oerjan> You are missing a tree.append(buff) before the return.
03:11:31 <CakeProphet> so you don't have to use that god awful buffer.
03:11:51 <bsmntbombdood> oerjan: oh, right
03:12:07 <bsmntbombdood> now it kind of works
03:12:09 <oerjan> And also you should check for buff==""
03:12:19 <CakeProphet> make a buff a list.
03:12:24 <CakeProphet> and append characters to the list.
03:12:33 <CakeProphet> much much quicker.
03:13:23 <oerjan> Perhaps...
03:13:38 <CakeProphet> no... that's the way you would want to do it.
03:13:40 <CakeProphet> :P
03:13:46 <CakeProphet> strings aren't meant to do stuff like tha.
03:13:48 <CakeProphet> t
03:13:52 <bsmntbombdood> okeey, it works
03:13:54 <oerjan> I wasn't responding to you. :)
03:13:57 <CakeProphet> oh.
03:14:23 <bsmntbombdood> http://pastebin.ca/313811
03:14:58 <oerjan> It might be an idea to do the collection of non-() as a second while loop inside the first. Then you don't have to worry about "" testing.
03:15:00 <CakeProphet> yeah... buff should definetely be a list... the string concats will get slow.
03:15:16 <oerjan> And it would be easy to do a join at the end of it.
03:15:24 <CakeProphet> "".join(buff)
03:16:32 <oerjan> However, then you need to be careful about when you read the next character. Unless the files have an undo method.
03:16:53 <bsmntbombdood> CakeProphet: http://pastebin.ca/313814
03:16:55 <bsmntbombdood> happy?
03:16:58 <CakeProphet> yup.
03:17:01 <bsmntbombdood> oerjan: they dont
03:17:14 * CakeProphet wishes file objects had an iterator for character-by-character stuff
03:17:25 <CakeProphet> you could make one pretty easy though.
03:18:14 <oerjan> I think there is still a bug in that if there is eof while buff is non-empty.
03:18:23 -!- digital_me has joined.
03:18:39 <bsmntbombdood> oerjan: indeed there is
03:18:58 <CakeProphet> for loops over files only go line-by-line...
03:19:57 <bsmntbombdood> http://pastebin.ca/313817
03:20:00 <CakeProphet> def chariter(file): for line in file: for char in line: yield char
03:20:20 <CakeProphet> for char in chariter(s): <code>
03:20:27 <CakeProphet> that'll solve pretty much all your problems.
03:20:58 <oerjan> Oh, and it definitely does not catch mismatched parentheses.
03:20:59 <CakeProphet> as a general rule of thumb... while loops tend to be infrequently used in Python.
03:21:31 <oerjan> The problem here is that the index of the for loop needs to be updated after the recursion.
03:21:46 <bsmntbombdood> yeah
03:21:54 <bsmntbombdood> and python is stupid about that
03:21:59 <CakeProphet> index of the for loop?
03:22:02 <CakeProphet> what for?
03:23:15 <oerjan> I mean, the parent function should not reparse the characters parsed by the child.
03:23:56 <CakeProphet> just cut it off each time.
03:24:29 <lament> "There's still a bug" - well said
03:24:34 <oerjan> What does cut off mean? Can two for loops share an iterator?
03:25:01 <bsmntbombdood> argh, parsign is hard
03:25:31 <oerjan> For proper error handling you need to use lookahead for the ")"
03:25:59 <oerjan> So that the parent takes care of checking if it was actually there.
03:26:00 <bsmntbombdood> to get the next character you could use s.getvalue()[s.pos+1]
03:26:23 <oerjan> Now _that_ is inefficient.
03:26:31 <bsmntbombdood> yep
03:30:28 <oerjan> On second thought, you don't need lookahead if the child knows whether it needs an end parenthesis.
03:31:20 <oerjan> Which it does unless it actually is the topmost parent.
03:31:30 <oerjan> *child = function
03:32:33 <oerjan> And the topmost parent, on the other hand, knows that it must not have a )
03:32:47 <oerjan> So an extra argument could fix that.
03:33:03 <bsmntbombdood> ugh
03:33:07 <bsmntbombdood> I hate doing that
03:33:37 <oerjan> Or you could make two different functions.
03:37:31 <CakeProphet> how about this? http://pastebin.ca/index.php
03:37:37 <CakeProphet> it doesn't do error checking... but meh.
03:37:49 <oerjan> I doubt that is your URL.
03:38:06 <CakeProphet> ...erm... yeah
03:38:14 <CakeProphet> http://pastebin.ca/313825
03:39:06 <CakeProphet> oh... wait.
03:39:10 <CakeProphet> duh.
03:39:12 <CakeProphet> obvious mistake.
03:40:32 <CakeProphet> it needs to check for the ending parenthesis.
03:44:05 <bsmntbombdood> whats that list[::n] syntax?
03:44:21 <CakeProphet> step.
03:44:29 <CakeProphet> (1,2,3)[::2] == (1,3)
03:44:36 <CakeProphet> it's kinda weird.
03:44:39 <CakeProphet> but strangely useful.
03:45:04 <CakeProphet> http://pastebin.ca/313826
03:45:06 <CakeProphet> new one
03:45:08 <CakeProphet> with a fix.
03:45:11 <CakeProphet> dunno if it works... but eh.
03:45:14 <CakeProphet> it's how I would have done it.
03:45:26 <bsmntbombdood> ...using partition is cheating
03:46:09 <CakeProphet> ...how's that?
03:46:18 <CakeProphet> it's not recursive.
03:46:25 <CakeProphet> it's not regular expressions.
03:46:30 <bsmntbombdood> You are only allowed to step through characters one by one
03:46:30 <CakeProphet> it's damn useful. :P
03:47:04 <CakeProphet> at it's heart... the partition source code probably steps through each character one by one.
03:47:06 <CakeProphet> so...
03:47:08 <CakeProphet> :P
03:47:32 <bsmntbombdood> I wanted a "real" parser
03:47:55 <CakeProphet> sure sure... just substitute what partition does into that and you'll have a character-by-character "real parser".
03:48:14 <bsmntbombdood> then it becomes waaay long
03:48:16 <bsmntbombdood> er than mine
03:48:39 <CakeProphet> of course it does.
03:50:28 <CakeProphet> for loop is the way to go over while.
03:50:39 <CakeProphet> while can't anticipate EOFs ;)
03:50:43 <CakeProphet> not easily.
03:51:07 <CakeProphet> using whle loops for iterating is a sin anyhow.
03:51:51 <oerjan> Does that code actually work with nested parentheses?
03:51:58 <CakeProphet> mine?
03:52:04 <CakeProphet> Don't know.
03:52:06 <CakeProphet> haven't tested it.
03:52:07 <oerjan> Yes.
03:52:09 <CakeProphet> it'll probably have bugs.
03:52:12 <CakeProphet> but... oh well.
03:52:42 <CakeProphet> the way I envision it... it would.
03:52:49 <CakeProphet> but... I doubt it works as I imagine.
03:53:24 <oerjan> Does partition include the "("'s in the list?
03:53:28 <bsmntbombdood> and what's the point of replace("\n", "")?
03:53:39 -!- pikhq has quit ("leaving").
03:53:46 <CakeProphet> newlines aren't signifigant... or so I'm lead to believe.
03:53:56 * CakeProphet was thinking of Lisp when he made it.
03:54:10 <bsmntbombdood> oerjan: partitition(sep) => (head, sep, tail)
03:54:22 <CakeProphet> it puts it in the middle.
03:54:25 <bsmntbombdood> CakeProphet: They aren't
03:54:31 <oerjan> Oh, so never more than one sep?
03:54:40 <CakeProphet> which I safely ignore via [::2]
03:54:42 <CakeProphet> nope.
03:54:47 <CakeProphet> split is the one that does them all.
03:54:56 <CakeProphet> it returns a list.
03:55:07 <CakeProphet> partition is just a 3-tuple of the first encountered seperator.
03:55:26 <bsmntbombdood> "a b c".split(" ") => ['a', 'b', 'c']
03:55:29 <oerjan> I doubt that it works when there are no ")"s in the string...
03:55:38 <oerjan> I mean "("
03:55:50 <bsmntbombdood> "a b c".partition(" ") => ('a', ' ', 'b c')
03:55:54 <CakeProphet> "a b c".split(" ") => ("a", " ", "b c")
03:55:56 <CakeProphet> yeah
03:56:01 <CakeProphet> partition
03:56:05 <bsmntbombdood> CakeProphet: no
03:57:20 * CakeProphet is still thinking abouit that esoteric parsing language.
03:57:33 <CakeProphet> parsing is a pain in the ass... and needs simplification... esoterically.
03:57:49 <oerjan> Anyhow if I understand your code right, it hardly works on anything containing more than a single set of parentheses.
03:58:37 <oerjan> Wait a moment, not even that.
03:58:48 <oerjan> You are checking for ")" in the wrong branch.
04:00:19 <bsmntbombdood> whoa, mine works when you leave off closing parentheses
04:00:38 <oerjan> In fact, partition used this way cannot do more than regexes.
04:02:05 <oerjan> Which we discussed previously, and I think we agreed it would at least become very complicated to parse nested parentheses using them, if at all possible.
04:03:46 <oerjan> bsmntbombdood: That's because there is no difference between eof and ), essentially.
04:03:56 <oerjan> In the code.
04:04:14 <bsmntbombdood> hmm, right
04:05:06 <oerjan> And as I implied, without extra arguments only the parent knows whether there must be a ")" or not.
04:05:17 <CakeProphet> oh ho..
04:05:19 <CakeProphet> I beg to differ.
04:05:24 <CakeProphet> [["I've", 'got', [['magic', 'in', [[[['my', 'pocket', [['really', 'have']]]]]]]]]]]
04:05:37 <CakeProphet> parsed from... print whee("(I've got (magic in ((my pocket) but) you can't (really have) it)")
04:05:48 <CakeProphet> it messes it up some.
04:05:59 <CakeProphet> oh wait.
04:06:05 <CakeProphet> no it doesn't... hmmm...
04:06:07 <bsmntbombdood> [["I've got ", ['magic in ', [['my pocket'], ' but'], " you can't ", ['really have'], ' it']]]
04:06:13 <bsmntbombdood> is what my parser gets
04:08:51 <oerjan> It misses the part after ")". As I said, the partition(")") is in the wrong branch.
04:09:08 <CakeProphet> It wouldn't work properly in the other one.
04:09:17 <CakeProphet> or.. it would work less properly.
04:09:45 <oerjan> Which strangely means that you call it recursively with something not well-formed.
04:09:51 <CakeProphet> see it works "backwards"... sorta.
04:10:19 <oerjan> You at least need to take case of the [3] part.
04:10:27 <oerjan> I mean [2]
04:10:32 <oerjan> *care
04:19:00 <CakeProphet> I'm awaiting a stroke of genius.
04:19:10 <CakeProphet> where I realize the grand pattern of parsing.
04:19:14 <CakeProphet> and make the ultimate parsing language.
04:19:15 <CakeProphet> but...
04:19:18 <CakeProphet> isn't happening.
04:20:09 <oerjan> Unfortunately it has already been done. It is called monadic parser combinators in Haskell :)
04:20:37 <bsmntbombdood> moniadic parser combinators!
04:20:41 <oerjan> Well, that or Prolog diff lists, perhaps.
04:20:44 <bsmntbombdood> that's a buzzword if I ever saw one
04:21:20 <CakeProphet> for languages with symbols... there's some basic general re-ocurring patterns.
04:21:32 <bsmntbombdood> tokens
04:21:39 <bsmntbombdood> lex+yacc
04:21:57 <CakeProphet> enclosures (parentesis), flippers (quotes), funnyhats(decorate syntax in Python
04:22:04 <CakeProphet> :P
04:22:16 <CakeProphet> hmmm...
04:22:57 <CakeProphet> you have things that serve as delimiters... usually operators... sometimes things like whitespace and newlines.
04:23:07 <bsmntbombdood> tokens
04:23:19 <CakeProphet> yes yes... tokens... you have to -make- them.
04:23:23 <bsmntbombdood> lex
04:23:30 <CakeProphet> which is what I'm trying to accomplish.
04:23:38 <bsmntbombdood> lex+yacc!
04:23:45 <CakeProphet> wait!
04:23:49 <CakeProphet> who needs tokens?
04:23:51 <CakeProphet> I mean really..
04:23:53 <oerjan> expr_list = many (liftM Left (notOneOf "()") <|> liftM Right (between (char "(") (char ")") expr_list)
04:24:43 <bsmntbombdood> CakeProphet: yacc does
04:26:16 <CakeProphet> esoteric parsers don't need "tokens".
04:26:25 <CakeProphet> they need coupons.
04:26:36 <CakeProphet> which cannot even be defined in terms of the English language.
04:26:38 <CakeProphet> so I won't even bother.
04:26:41 <bsmntbombdood> You might combine both stages into one, but you are still going to be tokenizing
04:26:47 <CakeProphet> Nope.
04:26:56 <bsmntbombdood> yes
04:27:03 <CakeProphet> esoteric parsers are so magificent they don't even need to parse things.
04:28:29 <oerjan> esoteric languages just run the string directly, searching forward or backward. At least I _think_ I saw someone trying to do this the other day ;)
04:29:52 <CakeProphet> pretty much... ignoring strings..
04:30:11 <CakeProphet> you want to find the parenthesis you can parse..
04:30:30 <oerjan> There is such a thing as a parenthesis.
04:30:43 <CakeProphet> interpreter it... substitute the results... and parse the next parse-able parenthesis thing.
04:31:06 <CakeProphet> thats's how you would do it non-recursively.
04:31:35 <oerjan> I think there might be a need for a fundamentalist ORK, incorporating such extensions as the "There is no such thing as a" statement.
04:31:43 <CakeProphet> find what matches the base pattern... evaluate it... repeat over and over and over.
04:31:50 <CakeProphet> eventually you'll wear away the recursive-icity.
04:32:30 <oerjan> That is of course what /// does.
04:32:41 <CakeProphet> I've always been interested in data is defined by what it isn't.
04:32:53 <CakeProphet> anti-objects.
04:33:28 <oerjan> There was a thread on anti-objects on Lambda the Ultimate recently.
04:33:37 <CakeProphet> Let's say you have an interpreter that... when run without a program... will compute everything.
04:33:53 <CakeProphet> the program will define what not to compute...
04:34:05 <CakeProphet> so to compute one null you would to manually decompute everything.
04:34:49 <CakeProphet> What's a networking framework? Well... it's definetely not AI, a parser, time travel, the hello world program, a symbolic manipulator, nor a date simulator.
04:35:01 <CakeProphet> so just make all of those and you'll have your networking framework.
05:29:19 -!- digital_me has quit ("Lost terminal").
05:38:30 -!- CakeProphet has quit (No route to host).
05:44:54 <bsmntbombdood> whoa neat
05:45:03 <bsmntbombdood> http://python.org/doc/lib/compiler.html
05:45:42 <bsmntbombdood> It parses python into syntax trees
05:49:16 <bsmntbombdood> that's awesome
05:49:29 <bsmntbombdood> I think that's the way to modify the print statement
05:50:39 -!- calamari has joined.
05:52:20 <bsmntbombdood> maybe not, though
05:53:22 <bsmntbombdood> You can write python as syntax trees :)
05:54:51 <bsmntbombdood> Function(None, "f", ["x"], [], 0, None, Stmt([Return(Name("x"))]))
05:59:18 <oerjan> You might do a search and replace on "print" in do_exec, inserting >> sys.stdout, if there isn't a >> there already. A bit brittle, perhaps.
06:00:03 <bsmntbombdood> very brittle
06:00:56 <bsmntbombdood> Hacking the compiler would be more fun ;)
06:02:02 <bsmntbombdood> change Stmt([Printnl([Name('x')], None)]) to Stmt([Discard(CallFunc(Getattr(Getattr(Name('sys'), 'stdout'), 'write'), [Name('what')], None, None))])
06:02:12 <bsmntbombdood> er, s/what/x/
06:20:15 -!- calamari has quit ("Leaving").
06:28:23 -!- ShadowHntr has quit (Connection timed out).
07:59:10 -!- Arrogant has joined.
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
08:08:55 -!- oerjan has quit ("leaving").
09:06:35 -!- Arrogant has quit ("Leaving").
10:34:40 -!- ihope__ has joined.
10:35:26 -!- ihope__ has changed nick to ihope.
12:05:10 -!- jix__ has joined.
12:10:11 -!- jix__ has changed nick to jix.
14:57:29 -!- tgwizard has joined.
15:29:20 -!- ngtr has joined.
15:29:59 -!- ngtr has changed nick to andreou.
16:29:12 -!- ihope has quit (Connection timed out).
16:30:13 -!- andreou has changed nick to ngtr.
17:18:49 <SimonRC> bsmntbombdood: Bah. Many languages are in denial about their need for algebraic datatypes
17:59:53 -!- jix has quit ("Bitte waehlen Sie eine Beerdigungnachricht").
18:31:56 <bsmntbombdood> SimonRC: what?
18:31:58 -!- ShadowHntr has joined.
18:32:19 <oklopol> what were you making earlier?
18:33:13 <oklopol> some kinda parser?
18:34:53 * SimonRC listens to _The News Quiz_.
18:36:23 <SimonRC> bsmntbombdood: Algebraic Datatypes are an enlightening system of describing datastructures. I much prefer them to classes or structs
18:36:35 <bsmntbombdood> oklopol: A simple parser
18:36:55 <SimonRC> ADTs are great for things like parsers.
18:37:10 <bsmntbombdood> What are they?
18:38:36 <oklopol> for regexes?
18:38:42 <SimonRC> A good start http://en.wikipedia.org/wiki/Algebraic_data_type
18:38:55 <bsmntbombdood> oklopol: no
18:39:02 <oklopol> okay
18:39:11 <bsmntbombdood> oklopol: for nested parentheses
18:39:16 <oklopol> i read it all but i'm half asleep
18:39:16 <oklopol> okay
18:39:16 <SimonRC> ADTs generalise structs and unions, for a start.
18:39:21 <oklopol> that was hard?
18:39:31 <oklopol> just the parenthesis thing?
18:39:43 <bsmntbombdood> oklopol: For someone who knows nothing about parsing, yes
18:39:53 <oklopol> i'll try in python
18:40:03 <SimonRC> bsmntbombdood: waitamo, did you just say you parsed parentheses with a regex?
18:40:07 <oklopol> in c++ that would take 20 min
18:40:11 <bsmntbombdood> SimonRC: no
18:40:28 <SimonRC> Ah, good, I though mathematics might be falling apart.
18:40:57 <bsmntbombdood> nope, oklopol just misread the earlier conversation
18:41:54 <oklopol> i didn't think you used regex for smth, i thought you were making a regex parser
18:43:42 <oklopol> k, does def a(b) take b as a reference if it's int
18:43:47 <oklopol> if b is int i mean
18:43:56 <bsmntbombdood> oklopol: no
18:44:00 <SimonRC> oklopol: which language?
18:44:04 <oklopol> python
18:44:04 <bsmntbombdood> ints are immutable
18:44:11 <oklopol> how do i pass as ref?
18:44:16 <oklopol> [4]?
18:44:19 <oklopol> not 4
18:44:20 <oklopol> a var
18:44:27 <oklopol> that's idiotic
18:44:28 <bsmntbombdood> oklopol: you don't
18:44:29 <SimonRC> (The answer would be yes in QBASIC.)
18:44:38 <bsmntbombdood> SimonRC: Python, I assumed
18:44:38 <oklopol> okay
18:45:04 <oklopol> i can't pass as an int as a ref easily?
18:45:19 <oklopol> okay, then i see where you were having trouble :DD
18:45:27 <oklopol> i'll have to use a stack then
18:45:54 <SimonRC> use a list containging a singel int
18:46:11 <bsmntbombdood> A list works, but it's ugly
18:46:44 <oklopol> i always code ugly with python, it's what python knows best imo
18:47:09 <oklopol> (okay, i just don't grasp functional languages)
18:48:03 <bsmntbombdood> python is functional
18:48:11 <SimonRC> snork
18:48:26 <oklopol> yes, i know
18:48:33 <oklopol> and i don't grasp it
18:48:42 <SimonRC> They are diking out map and rejecting multi-line lambdas
18:48:52 * SimonRC goes to eat dinner.
18:52:20 <bsmntbombdood> SimonRC: I know, it's stupid
18:52:32 <bsmntbombdood> but a list comprehension is just as usable as map
18:54:49 <bsmntbombdood> define map(f,seq): return [f(i) for i in seq]
18:55:06 <oklopol> okay, made it
18:55:11 <oklopol> but did it the ugly way
18:55:30 -!- ngtr has left (?).
18:57:58 -!- andreou has joined.
18:58:49 <andreou> greets
19:01:20 <andreou> greets anyone
19:01:24 <andreou> i'm back from the dead
19:02:19 <andreou> or back into the dead ... no one here?
19:03:03 <oklopol> some
19:04:18 <andreou> heh hey you
19:05:21 <bsmntbombdood> who's andreou ?
19:05:48 <andreou> i frequented the channel a few years ago
19:11:05 <oklopol> is there a pastebin? i have an obsession to share my python code
19:11:31 <bsmntbombdood> pastebin.ca
19:13:13 <oklopol> http://www.pastebin.ca/314421
19:14:54 <oklopol> python really shows you how much you suck when you use the ide since errors hide your code 5 miles up...
19:15:08 <oklopol> infinite recursion errors that is
19:15:58 <oklopol> >>> parentise("I've got (magic in ((my pocket) but) you can't (really have) it",[0])
19:15:59 <oklopol> ["I've", 'got', ['magic', 'in', [['my', 'pocket'], 'but'], 'you', "can't", ['really', 'have'], 'it']]
19:16:05 <oklopol> i'm not sure if that's right
19:16:15 <oklopol> and my algorithm is terrible :)
19:16:32 <oklopol> i iterate everything twice
19:19:41 <oklopol> oh, i forgot the slash
19:21:59 <oklopol> http://www.pastebin.ca/314437
19:22:02 <oklopol> betterz
19:28:00 * bsmntbombdood wonders how closures are implemented
19:29:01 <oklopol> in mine?
19:29:59 <bsmntbombdood> no
19:30:05 <oklopol> but?
19:30:11 <bsmntbombdood> ?
19:30:32 <oklopol> in python?
19:30:47 <bsmntbombdood> in any language
19:34:00 <oklopol> http://bsmntbombdood.mooo.com/testclosure.c
19:34:01 <oklopol> :)
19:34:20 <bsmntbombdood> heh
19:34:25 <bsmntbombdood> I doubt it's like that
19:34:30 <oklopol> i gotta compliment my memory
19:34:51 <bsmntbombdood> very nice
19:35:36 <oklopol> i gotta compliment that more tho, ingenious
19:36:39 <oklopol> thought of generalizing that with templates but never got into doing it
19:37:50 <bsmntbombdood> Hmm, I thought of a way of generalizing that code somewhat
19:38:27 <bsmntbombdood> except no
19:39:17 <oklopol> omg, managed to shut the lights with a throw of a ball
19:39:28 <oklopol> except no why?
19:40:50 <bsmntbombdood> no to the idea I had
19:41:35 <oklopol> okay :D
19:42:02 <oklopol> it could easily do that to any function given the function after it and before it :DD
19:42:40 <oklopol> curry(funcbefore,funcafter,firstvarvalue);
19:43:14 <oklopol> would search first variable in the function, variables being \0xDEADBEE(0,1,2,3,4, etc.) and currying
19:44:08 <oklopol> and return the function of course
19:44:17 <andreou> dhcpd is running as pid 666.
19:44:29 <andreou> this tells things about the upcoming net-installation...
19:45:39 <bsmntbombdood> heh
19:47:37 <andreou> well, has anyone installed debian on an old-world mac using netboot?
19:48:55 <andreou> no? wll, i'm screwed then.
19:57:09 -!- CakeProphet has joined.
20:38:59 <andreou> this deal sucks.
20:43:01 <fizzie> I think I might have, but I don't remember _anything_ about it, and I don't even have the silly box any more. Besides, come to think of it, I think I installed using the tried-and-true method of "move the hd to something more sensible".
20:45:00 <andreou> it's just insane. netbsd goes without a hitch, why not debian as well?
20:45:47 <fizzie> Right, the hd-switching it was. It was the sparc I had to net-boot, it did only "rarp and tftp to the answering rarpd", and it was OpenBSD I was installing. Got confused.
20:46:09 * andreou indulges in a huge piece of spinnach-cheese-pie, putting all the problems behind
20:47:19 <andreou> obsd-sparc goes without a flaw
20:47:30 * andreou has the sparcclassic buzzing to his right as a proof
20:49:46 <andreou> come to think of it, sparcs are very sensible boxes
20:50:02 <andreou> maybe i should just sell or give away all the junk lying around and about and get a U10 or something
20:54:36 <fizzie> I had a sensible sparcstation 5 as a interweb firewall/router box, but it retired when I moved to this 100baseT network, since I didn't want to start looking for suitable sbus cards. It's currently in a closet.
20:55:57 <andreou> eh i'm still on 10baseT, although the previous workstation had GE-grade NICs.
20:56:16 <andreou> threw it out, too many MIPS, too many movies
20:56:26 -!- ihope__ has joined.
20:57:06 -!- ihope__ has changed nick to ihope.
21:21:30 <andreou> today is "can't" day.
21:23:00 <andreou> i'm really waiting for the s/a/u/ day
22:00:48 <Sukoshi> toduy is "cun't" duy
22:00:49 <Sukoshi> There.
22:01:00 <andreou> ;p
22:01:28 <fizzie> There's no trailing g, so isn't it simply "Toduy is "can't" day."?
22:01:55 <Sukoshi> Oh. True.
22:02:13 <andreou> pedants
22:02:50 <Sukoshi> But it's right, and there's no denying it, and it's a common occurance.
22:16:50 * ShadowHntr has Solaris 10 on his Ultra 5...
22:19:49 <fizzie> Don't they call that "slowlaris"?
22:20:12 <andreou> a U5 is a perfect non-solaris box
22:21:43 <fizzie> The Ultra 10s (and the few Blade 1000s) in this university run Solaris 10, too.
22:28:54 <bsmntbombdood> you geeks and your non-x86 hardware
22:29:27 <andreou> a matter of pocket, not of brain.
22:29:35 <andreou> though, well...
22:29:52 <bsmntbombdood> I don't have any cool hardware :(
22:30:23 <fizzie> Well, those U10s aren't really mine. And since my SS5 and the Indy are both in the closet, and the old mac is gone, the only non-x86 hardware here in use are the PPC iBooks.
22:31:25 <andreou> plural? capitalist pig...
22:35:55 <fizzie> The other iBook is my wife's, actually. I could barely afford my own.
22:37:21 <fizzie> I would accept the labeling if they were MacBook Pros or something. :p
22:56:56 -!- digital_me has joined.
22:58:58 <bsmnt_bot> hi digital_me
23:47:54 -!- jix has joined.
23:49:49 -!- jix has quit (Client Quit).
23:50:15 -!- tgwizard has quit (Remote closed the connection).
←2007-01-11 2007-01-12 2007-01-13→ ↑2007 ↑all