00:05:54 <lament> bloody he tells us! bloody!
00:11:20 -!- tgwizard has quit (Remote closed the connection).
00:20:39 -!- bsmnt_bot has quit (Remote closed the connection).
00:20:41 -!- bsmnt_bot has joined.
00:45:05 <oklopol> DIE BOT DIE LIKE YER MOTHER!!!
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:46:03 <oerjan> a thereapeutic robot :D
00:46:50 <oerjan> The sys.output problem has not been solved.
00:47:09 <oerjan> ~exec print >> sys.output "o"
00:47:14 <oerjan> ~exec print >> sys.output, "o"
00:47:54 <oerjan> ~exec self.raw("PRIVMSG #esoteric :o")
00:48:48 <oklopol> why won't it help to just change the stdout here?
00:49:32 <oerjan> The problem is that the change should only affect the subthread, which may be impossible.
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:09 <oerjan> Is it possible to redefine the print statement itself?
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:53:05 <bsmntbombdood> It's possible to redefine the "import" statement with __import__, but I can't find the similar function for print
01:04:13 <CakeProphet> the standard print can be altered with sys.stdout.write ...but other than that...
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: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:10:08 <Sukoshi> What's this ``pickling'' thingamabobber?
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:14:09 <CakeProphet> the pickle protocol can only store references to functions on the top level of a module.
01:14:27 <CakeProphet> because it doesn't actually store the class itself... just a reference name.
01:14:44 <CakeProphet> but... with enough abuse... you can make it work for any function. :P
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: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:17:19 <CakeProphet> so you can edit the definition of a function inplace.
01:18:08 <CakeProphet> If it's something in the hard source... I use inspect.
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: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:20:10 <CakeProphet> the player could type "def WHEEFUNC(arg, arg)" and a text-editor would pop up or something.
01:21:27 <CakeProphet> it's just "command stuff" where stuff is matched to a command-specific parsing regex.
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:33 <CakeProphet> Stue... for example... can be parsed entirely with regex.
01:25:17 <CakeProphet> Glass could probably be parsed with regex.
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: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: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:50 <oerjan> Eh, wait that was wrong.
01:35:57 <oerjan> "\[^][]*\[(.*)\][^][]*\]"
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: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:52 <oerjan> I suppose real parser combinators are better.
01:40:24 <oerjan> What is wrong with "\[^][]*\[(.*)\][^][]*" ?
01:41:01 <CakeProphet> regex should probably go the oher way around..
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: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:43:28 <oerjan> (for embedded whitespace for legibility.)
01:44:05 <CakeProphet> ignores whitespaces unless they're in brackets.
01:44:40 <oerjan> OK then: "^ [^][]*? \[ (.*) \] [^][]* $"/x ?
01:45:24 <CakeProphet> the tilde seems like a good escape character.
01:45:32 <oerjan> Actually that ? is useless.
01:45:45 <CakeProphet> it's rarely used.... and it's not quite so weird and choppy looking as \
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:47:35 <oerjan> The question is how to parse the interior further.
01:48:14 <oerjan> It needs a different expression for sure.
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:48 <oerjan> I believe I said I meant to use more than one regexp.
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:32 <oerjan> Well, even if it could work it would end up rather complicated.
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.
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: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: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:12:07 <oerjan> A list of expressions, some of which are themselves lists of expressions?
02:12:38 <oerjan> A single outer set should be enough.
02:13:09 -!- CakeProphet_ has quit (Read error: 104 (Connection reset by peer)).
02:13:09 -!- CakeProphet__ has joined.
02:13:32 <oerjan> actually your first seemed good.
02:13:59 -!- CakeProphet has quit (Read error: 113 (No route to host)).
02:14:03 -!- CakeProphet__ has changed nick to CakeProphet.
02:15:09 <oerjan> for clarity, you might want two different functions, parse_list and parse_expr
02:15:16 <CakeProphet> while everything else internet-wise works fine.
02:15:42 <oerjan> i also have web sites dropping out frequently.
02:16:10 <CakeProphet> without ever saying "lol no connection kthxbai"
02:16:12 <oerjan> Same with me, until it gives up.
02:16:33 <oerjan> Oh, mine does give up eventually.
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:21:31 <oerjan> Now I cannot get to BBC news...
02:28:18 -!- pikhq has joined.
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: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: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: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: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:41:28 <oerjan> I believe in Python it is easier to use a common object with a pointer.
02:42:55 <CakeProphet> Python doesn't really recognize such a thing as a "pointer".
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:49 <CakeProphet> lists and dictionaries... on the other hand.
02:46:36 <oerjan> Just pretend I said "index", OK? :)
02:47:34 <oerjan> Well, a pointer is an index into memory.
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: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: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: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:57:28 <CakeProphet> You place that accumulated bits into the next index of the node?
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: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.
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:23 <oerjan> I guess stringIO doesn't actually construct the string until you call get_value?
03:03:20 <CakeProphet> but usually lists are the way to go when messing with strings.
03:04:29 <CakeProphet> compared "\n".join(SomeListOfStrings) to x = ""; for string in SomeListOfStrings: x += string + "\n"
03:06:32 <CakeProphet> bsmntbombdood, haha... that's exactly the kind of problem I was referring to. :P
03:09:08 <CakeProphet> it looks like you're just recursively calling parse() on the exact same string ( s )
03:09:38 <oerjan> s shouldn't be a string but a file-like object.
03:10:24 <CakeProphet> you couild use partition... if you wanted.
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:12:09 <oerjan> And also you should check for buff==""
03:13:38 <CakeProphet> no... that's the way you would want to do it.
03:13:46 <CakeProphet> strings aren't meant to do stuff like tha.
03:13:54 <oerjan> I wasn't responding to you. :)
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: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:17:14 * CakeProphet wishes file objects had an iterator for character-by-character stuff
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:58 <CakeProphet> for loops over files only go line-by-line...
03:20:00 <CakeProphet> def chariter(file): for line in file: for char in line: yield char
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:23:15 <oerjan> I mean, the parent function should not reparse the characters parsed by the child.
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: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: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: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:37 <oerjan> Or you could make two different functions.
03:37:31 <CakeProphet> how about this? http://pastebin.ca/index.php
03:37:49 <oerjan> I doubt that is your URL.
03:40:32 <CakeProphet> it needs to check for the ending parenthesis.
03:46:30 <bsmntbombdood> You are only allowed to step through characters one by one
03:47:04 <CakeProphet> at it's heart... the partition source code probably steps through each character one by one.
03:47:55 <CakeProphet> sure sure... just substitute what partition does into that and you'll have a character-by-character "real parser".
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:53:24 <oerjan> Does partition include the "("'s in the list?
03:53:39 -!- pikhq has quit ("leaving").
03:53:46 <CakeProphet> newlines aren't signifigant... or so I'm lead to believe.
03:54:31 <oerjan> Oh, so never more than one sep?
03:55:07 <CakeProphet> partition is just a 3-tuple of the first encountered seperator.
03:55:29 <oerjan> I doubt that it works when there are no ")"s in the string...
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:05:06 <oerjan> And as I implied, without extra arguments only the parent knows whether there must be a ")" or not.
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:06:07 <bsmntbombdood> [["I've got ", ['magic in ', [['my pocket'], ' but'], " you can't ", ['really have'], ' it']]]
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:45 <oerjan> Which strangely means that you call it recursively with something not well-formed.
04:10:19 <oerjan> You at least need to take case of the [3] part.
04:19:10 <CakeProphet> where I realize the grand pattern of parsing.
04:20:09 <oerjan> Unfortunately it has already been done. It is called monadic parser combinators in Haskell :)
04:20:41 <oerjan> Well, that or Prolog diff lists, perhaps.
04:21:20 <CakeProphet> for languages with symbols... there's some basic general re-ocurring patterns.
04:21:57 <CakeProphet> enclosures (parentesis), flippers (quotes), funnyhats(decorate syntax in Python
04:22:57 <CakeProphet> you have things that serve as delimiters... usually operators... sometimes things like whitespace and newlines.
04:23:19 <CakeProphet> yes yes... tokens... you have to -make- them.
04:23:53 <oerjan> expr_list = many (liftM Left (notOneOf "()") <|> liftM Right (between (char "(") (char ")") expr_list)
04:26:36 <CakeProphet> which cannot even be defined in terms of the English language.
04:26:41 <bsmntbombdood> You might combine both stages into one, but you are still going to be tokenizing
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: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: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:49:29 <bsmntbombdood> I think that's the way to modify the print statement
05:50:39 -!- calamari has joined.
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:02:02 <bsmntbombdood> change Stmt([Printnl([Name('x')], None)]) to Stmt([Discard(CallFunc(Getattr(Getattr(Name('sys'), 'stdout'), 'write'), [Name('what')], None, None))])
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:58 -!- ShadowHntr has joined.
18:32:19 <oklopol> what were you making earlier?
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:55 <SimonRC> ADTs are great for things like parsers.
18:38:42 <SimonRC> A good start http://en.wikipedia.org/wiki/Algebraic_data_type
18:39:16 <oklopol> i read it all but i'm half asleep
18:39:16 <SimonRC> ADTs generalise structs and unions, for a start.
18:39:31 <oklopol> just the parenthesis thing?
18:39:43 <bsmntbombdood> oklopol: For someone who knows nothing about parsing, yes
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: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:44:29 <SimonRC> (The answer would be yes in QBASIC.)
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: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:42 <SimonRC> They are diking out map and rejecting multi-line lambdas
18:55:30 -!- ngtr has left (?).
18:57:58 -!- andreou has joined.
19:02:19 <andreou> or back into the dead ... no one here?
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: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:21:59 <oklopol> http://www.pastebin.ca/314437
19:34:00 <oklopol> http://bsmntbombdood.mooo.com/testclosure.c
19:34:30 <oklopol> i gotta compliment my memory
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:39:17 <oklopol> omg, managed to shut the lights with a throw of a ball
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: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: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:23:00 <andreou> i'm really waiting for the s/a/u/ day
22:01:28 <fizzie> There's no trailing g, so isn't it simply "Toduy is "can't" day."?
22:02:50 <Sukoshi> But it's right, and there's no denying it, and it's a common occurance.
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:29:27 <andreou> a matter of pocket, not of brain.
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: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.
23:47:54 -!- jix has joined.
23:49:49 -!- jix has quit (Client Quit).
23:50:15 -!- tgwizard has quit (Remote closed the connection).