--- Log opened Wed Oct 25 00:00:06 2006 |
00:37 | | You're now known as TheWatcher[T-2] |
00:42 | | You're now known as TheWatcher[zZzZ] |
00:43 | | Thaqui [~Thaqui@Nightstar-8027.adsl.xtra.co.nz] has joined #code |
00:47 | | ReivZzz is now known as Reiver |
00:58 | | Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
00:58 | | Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
00:58 | | mode/#code [+o Chalcedon] by ChanServ |
00:59 | | Reiver is now known as ReivWork |
01:21 | | Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #Code |
01:29 | | takyoji [~caleblang@Nightstar-25280.dhcp.roch.mn.charter.com] has joined #code |
01:33 | <@Vornicus> | Okay, pop quiz |
01:33 | <@Vornicus> | gimme a date from 7 days /before/ today. |
01:33 | <@Vornicus> | automatically |
01:38 | | * Janus picks January 12th, 502, when the Danes invaded something. |
01:39 | <@Vornicus> | I don't think they called themselves danes back then |
01:42 | <@Chalain> | Vornicus: What language? |
01:47 | <@Vornicus> | I don't particularly care as long as I can call it from bash; has to run on Shadowfax, though |
01:47 | <@Vornicus> | I want to make it dump my backups from a week ago automatically. |
01:47 | <@Chalain> | okay, and you need the date string for that day? What format? |
01:48 | <@Chalain> | 2006-10-23 ? |
01:48 | <@Vornicus> | %Y%m%d 20061023 |
01:48 | <@Chalain> | k |
01:48 | <@Chalain> | un momento. |
01:48 | <@Vornicus> | oh, and you've got mail. |
01:49 | <@Vornicus> | oh, and echo 134217728 >/proc/sys/kernel/shmmax |
01:49 | <@McMartin> | Man, acroread sucks |
01:50 | <@Chalain> | Okay, go grab my perl cookbook and read up on dates. You'll want something along the lines of "perl -e 'print strftime("%Y%m%d", date()-86400*7) . "\n"' |
01:51 | <@Vornicus> | ...oh yeah, this is what cookbooks are for. |
01:51 | <@Vornicus> | ...meh, I'll do it in the morning, I've got quitting time to do. |
01:51 | | * Chalain shrugs. |
01:52 | <@Vornicus> | (it's not like it'll change anything tonight - I deleted all my old backups but for Thursday's) |
01:54 | <@Vornicus> | time to head home. ni! |
01:54 | <@Vornicus> | or not ni, but you get the idea. |
01:54 | | Vornicus [~vorn@Nightstar-18307.slkc.qwest.net] has quit [Quit: ] |
02:03 | | Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
02:03 | | mode/#code [+o Chalcy] by ChanServ |
02:04 | | Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
02:05 | | Chalcy is now known as Chalcedon |
02:45 | | * Vornicus-Latens returns at home. |
02:46 | | Vornicus-Latens is now known as Vornicus |
02:47 | | Vornicus is now known as NSGuest-594 |
02:50 | < Janus> | Jinkies, it was an imposter all along! |
02:51 | | NSGuest-594 is now known as Vornicus |
02:52 | < takyoji> | ;O |
02:53 | | * takyoji sings the Scooby Doo theme song xD |
03:09 | | Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: bathipoo'n'bedibye!] |
03:29 | | EvilDarkLord [althalas@Nightstar-17046.a80-186-184-83.elisa-laajakaista.fi] has quit [Ping Timeout] |
03:35 | < takyoji> | Parse error: syntax error, unexpected '}' in /home/u4/jacobl/html/form-scripts/newsletter.php on line 26 |
03:35 | < takyoji> | the area of line 26 is: |
03:36 | < takyoji> | if ($p_water_feature=="Yes") { |
03:36 | < takyoji> | $water_feature_poll = " " . $p_fname . " does have a waterfeature." |
03:36 | < takyoji> | } elseif ($p_water_feature=="No") { |
03:36 | < takyoji> | $water_feature_poll = " " . $p_fname . " <b>doesn"t</b> have a waterfeature." } |
03:37 | < Vornicus> | Which one is 26? |
03:37 | < Vornicus> | also... language? |
03:37 | < takyoji> | php |
03:37 | <@McMartin> | Are you missing a ; after waterfeature."? |
03:37 | < takyoji> | oh |
03:37 | < takyoji> | yea, that's another thing I just noticed |
03:37 | < Vornicus> | and, yeah, check them semicolons |
03:38 | < takyoji> | oh |
03:38 | < Vornicus> | that's okay, earlier I checked for a database named "postgers" |
03:38 | < takyoji> | because it usually has a different error for that |
03:38 | < takyoji> | ah |
03:38 | < takyoji> | but yea, it worked |
03:40 | < takyoji> | hooray, I got my big script I wrote to work |
03:40 | < takyoji> | I was working on a script that take form results, make it absolutely readable, and mail it |
03:41 | | EvilDarkLord [althalas@Nightstar-17046.a80-186-184-83.elisa-laajakaista.fi] has joined #code |
03:42 | < takyoji> | Like if someone wrote their Name as "Caleb Langeslag" and wrote in a comment box saying "yada", I'd make it come out as "Caleb Langeslag has wrote this in the comment box: yada" |
03:43 | < takyoji> | although I haven't recieved the email yet of the results |
03:43 | | * Vornicus finds it more useful, in general, to use results that a computer can read |
03:44 | < takyoji> | I mean, this is supposed to also be sent to my brother's computer |
03:45 | < takyoji> | then I also have it saved to the MySQL database |
03:45 | < takyoji> | but without the extra crap |
03:45 | <@McMartin> | Watch out for command injection attacks. |
03:45 | < takyoji> | just with the varibles as is |
03:45 | < takyoji> | which happens how? |
03:46 | <@McMartin> | If you do something like "INSERT INTO stuff WITH name='$NAME' and desc='$DESC'" |
03:46 | < takyoji> | ahh |
03:46 | <@McMartin> | Because they can set their $DESC to, say, "'; DROP TABLE stuff;" |
03:46 | <@McMartin> | And doom and suffering ensue |
03:46 | < takyoji> | oh |
03:47 | <@McMartin> | There's probably some PHP function to make such things safe, but I'm not a PHP guy so I don't know what it is. |
03:47 | | * McMartin flees to dinner |
03:48 | < takyoji> | ahh |
03:48 | < takyoji> | crap |
03:48 | < takyoji> | because otherwise, I could just use a if statement to find such terms then report the person immediately as well as their IP Address |
03:49 | < takyoji> | otherwise I'm not really sure if that would work if the they inserted a MYSQL statement |
03:50 | < takyoji> | as the varible |
03:59 | | Raif [~corvusign@Nightstar-7918.hsd1.mn.comcast.net] has joined #Code |
03:59 | | mode/#code [+o Raif] by ChanServ |
04:05 | | Thaqui [~Thaqui@Nightstar-8027.adsl.xtra.co.nz] has quit [Ping Timeout] |
04:08 | < takyoji> | night folks |
04:08 | | takyoji [~caleblang@Nightstar-25280.dhcp.roch.mn.charter.com] has left #code [] |
04:21 | | Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
04:23 | | Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
04:23 | | mode/#code [+o Chalcy] by ChanServ |
04:23 | | Chalcy is now known as ChalcyWork |
04:27 | | Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
04:27 | | mode/#code [+o Chalcy] by ChanServ |
04:29 | | ChalcyWork [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
04:41 | | Thaqui [~Thaqui@Nightstar-8486.adsl.xtra.co.nz] has joined #code |
04:44 | <@McMartin> | Hmm, he left |
04:44 | <@McMartin> | I was going to say, you don't get to actually just ban apostrophes. |
04:44 | <@McMartin> | That makes people named O'Connor very unhappy |
05:14 | | ReivWork is now known as Reiver |
05:15 | <@Reiver> | McM: What about places that only allow one character for initials? That always annoyed me, 'cuz my surname initials /are/ McG. |
05:16 | <@McMartin> | Reiver: Well, that's not a massive security hole, though |
05:16 | <@Reiver> | Point. |
05:17 | <@Reiver> | Merely a minor annoyance for surname folks. >.> |
05:31 | | Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
05:49 | < Ev3> | McReiver? ^_^ |
05:49 | <@Reiver> | Something like that. :p |
05:52 | < Ev3> | :p |
06:03 | | Thaqui is now known as ThaquiWork |
06:57 | | Reiver is now known as ReivOut |
07:22 | | Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
07:22 | | mode/#code [+o Chalcedon] by ChanServ |
07:30 | | ReivOut is now known as Reiver |
07:59 | | McMartin [~mcmartin@Nightstar-8843.dsl.pltn13.pacbell.net] has quit [Quit: bbiab] |
--- Log closed Wed Oct 25 08:18:10 2006 |
--- Log opened Wed Oct 25 08:18:14 2006 |
08:18 | | TheWatcher [~chris@Nightstar-29731.dsl.in-addr.zen.co.uk] has joined #code |
08:18 | | Irssi: #code: Total of 15 nicks [10 ops, 0 halfops, 0 voices, 5 normal] |
08:18 | | mode/#code [+o TheWatcher] by ChanServ |
08:18 | | Irssi: Join to #code was synced in 30 secs |
08:18 | | TheWatcher[zZzZ] [~chris@Nightstar-29731.dsl.in-addr.zen.co.uk] has quit [Ping Timeout] |
08:52 | | Chalcedon is now known as ChalcyZzz |
10:05 | | You're now known as TheWatcher[afk] |
10:14 | | Mahal is now known as MahalZZZ |
10:50 | | Vornicus is now known as Vornicus-Latens |
10:58 | | You're now known as TheWatcher[wr0k] |
11:26 | | ThaquiWork is now known as Thaqui |
12:52 | <@ToxicFrog> | Vornicus-Latens: easier than Perl: |
12:52 | <@ToxicFrog> | date --date="7 days ago" "+%Y%m%d" |
12:52 | <@ToxicFrog> | Using "1 week ago" also works. |
14:01 | | EvilDarkLord [althalas@Nightstar-17046.a80-186-184-83.elisa-laajakaista.fi] has quit [Ping Timeout] |
14:01 | | Thaqui is now known as ThaquiSleep |
14:13 | | EvilDarkLord [althalas@Nightstar-17046.a80-186-184-83.elisa-laajakaista.fi] has joined #code |
14:47 | | Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
14:47 | | mode/#code [+o Chalcy] by ChanServ |
14:49 | | ChalcyZzz [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
15:17 | | Reiver is now known as ReivZzz |
15:20 | | You're now known as TheWatcher |
16:19 | < Vornicus-Latens> | sweet! |
16:20 | < Vornicus-Latens> | ...though it does not appear to work on my mac |
16:20 | <@ToxicFrog> | ...hmm. |
16:20 | <@ToxicFrog> | It works fine on Linux! |
16:21 | <@ToxicFrog> | BSD date(1) probably doesn't use GNU getdate(), though, which is the part that does that parsing. |
16:21 | | * Vornicus-Latens shall check it out when he gets to work. |
16:21 | <@ToxicFrog> | It should have something similar, though; check the man/info pages. |
16:22 | < Vornicus-Latens> | it does not appear to |
16:29 | <@ToxicFrog> | ...hmm. |
16:29 | <@ToxicFrog> | And this has to run on OSX? |
16:29 | < Vornicus-Latens> | no. |
16:29 | < Vornicus-Latens> | this will be running on linux |
16:29 | <@ToxicFrog> | Oh. |
16:29 | <@ToxicFrog> | Then it shouldn't be a problem. |
16:30 | < Vornicus-Latens> | indeed |
16:45 | | EvilDarkLord [althalas@Nightstar-17046.a80-186-184-83.elisa-laajakaista.fi] has quit [Ping Timeout] |
16:58 | | EvilDarkLord [althalas@Nightstar-17046.a80-186-184-83.elisa-laajakaista.fi] has joined #code |
17:28 | | Vornicus [~vorn@Nightstar-18307.slkc.qwest.net] has joined #code |
17:28 | | mode/#code [+o Vornicus] by ChanServ |
17:48 | | You're now known as theWatcher[afk] |
17:48 | | You're now known as TheWatcher[afk] |
19:02 | <@Vornicus> | Found in some unit test data: a person named Mojo Jojo. |
19:07 | <@Chalain> | Hee |
19:07 | | * Chalain wrote him. |
19:07 | | * Vornicus wonders what trips Mr. Jojo goes on. |
19:08 | | You're now known as TheWatcher |
19:08 | <@Chalain> | Incidentally, sign #423 that you're learning too much lisp: you discover this perversity in Ruby: |
19:08 | <@Chalain> | f.squee |
19:08 | <@Chalain> | => 42 |
19:08 | <@Chalain> | f.send :squee |
19:08 | <@Chalain> | => 42 |
19:08 | <@Chalain> | f.send :send,:squee |
19:08 | <@Chalain> | => 42 |
19:08 | <@Chalain> | f.send :send,:send,:send,:send,:send,:send,:send,:send,:squee |
19:09 | <@Chalain> | => 42 |
19:09 | <@Chalain> | (Sign #1 that you're learning to much lisp is: You're learning ANY lisp.) |
19:10 | <@Vornicus> | I have, in a text file at home, some stuff in Ruby to make it do lisp interpretation |
19:10 | <@ToxicFrog> | I take it that send takes a function name and returns the return values from that function? |
19:11 | <@Vornicus> | TF: yep |
19:11 | <@Chalain> | ToxicFrog: Yeah. send("function_name", arg1, arg2, ...) |
19:11 | <@Chalain> | f.send :foo, 42 == f.foo(42) |
19:11 | <@ToxicFrog> | Right. |
19:12 | | * Chalain got anonymous functions working in Lua yesterday. It made him send :squee to himself. |
19:13 | <@ToxicFrog> | ...how do you mean "got them working"? |
19:13 | <@ToxicFrog> | They kind of work automatically, yes? |
19:13 | <@Chalain> | figured out how to do them. |
19:13 | <@ToxicFrog> | Aah. |
19:14 | <@ToxicFrog> | I thought the reference manual said how. |
19:14 | <@Chalain> | ... |
19:14 | <@Chalain> | There's a reference manual? |
19:14 | <@Vornicus> | ...pffaaaahaahaa |
19:14 | <@Chalain> | Keep in mind that in my universe, Lua == Plua. :-) |
19:16 | <@ToxicFrog> | plua? Oh, Palm lua. |
19:16 | <@ToxicFrog> | And yeah, there is. |
19:16 | <@ToxicFrog> | www.lua.org/manual/ |
19:17 | <@ToxicFrog> | http://www.lua.org/manual/5.1/manual.html#2.5.9 <-- function definitions |
19:17 | <@Chalain> | Mmm. I'll go check it out. |
19:18 | <@ToxicFrog> | PLua probably uses a different version, though, so you should check the reference manual for that instead. |
19:18 | <@Chalain> | I'm hoping that with a good set of defs in Lua I can get solid OO with inheritance working WITHOUT having to call a bajillion housekeeping functions every time I want to write a new class. |
19:18 | <@ToxicFrog> | And not trust anything it says about the standard libraries unless plua says it includes them, etc. |
19:18 | <@ToxicFrog> | As long as it's lua 5.x you can do this fairly easily using metatables. |
19:18 | <@Chalain> | Plua 2.0b7 uses 5.1, I think. It's Lua 5 at least. |
19:19 | <@ToxicFrog> | Indeed, I have two different implementations of same: |
19:20 | <@ToxicFrog> | - Prototype-based OO. To create a new class you do SubClass = SuperClass:Copy() and then modify the copy. The line between "object" and "class" is kind of nebulous; in effect, an object is just a class that can't be copied and has had constructors invoked on it. |
19:20 | <@ToxicFrog> | This takes about 50 lines tops. |
19:20 | <@ToxicFrog> | - Classic OO. Class definitions look like: |
19:20 | <@ToxicFrog> | class "SubClass" extends "SuperClass" |
19:20 | <@ToxicFrog> | memberVariable = 10 |
19:20 | <@ToxicFrog> | anotherMemberVariable = {} -- empty table filled in by ctor |
19:21 | <@ToxicFrog> | function SubClass() -- ctor |
19:21 | <@ToxicFrog> | -- stuff goes here |
19:21 | <@ToxicFrog> | end |
19:21 | <@ToxicFrog> | endclass "SubClass" |
19:21 | <@Chalain> | Mm, not too shabby. |
19:21 | <@ToxicFrog> | This looks and behaves more familiarly but takes about 400 lines to implement is harder to verify. |
19:22 | <@ToxicFrog> | Although a lot of that 400 lines is function closure trickery so that inheritance and the "super" keyword work right inside method calls, etc. |
19:22 | <@Vornicus> | Arg. I have Happiness is a Warm Gun stuck in my head. Still. |
19:23 | <@ToxicFrog> | I prefer the former primarily because I know it has no bugs, whereas I only suspect that the latter has no bugs. |
19:23 | <@ToxicFrog> | However, they're both quite doable. |
19:24 | <@ToxicFrog> | Multiple dispatch is also doable, but kind of ugly because you need to make a function call after each function definition to register its argument types and it's just ick. I haven't finished that one yet. |
19:25 | <@ToxicFrog> | (with classic OO, you then declare new objects with [[obj = new "SubClass" (ctor, args, go, here)]]. Prototype-based, it's just obj = SubClass:New() or obj = SubClass:Copy() if you don't want to constructors to run.) |
19:25 | <@Vornicus> | Multiple dispatch is generally ick in non-static languages |
19:25 | <@ToxicFrog> | Yeah. |
19:26 | <@ToxicFrog> | It grew out of my desires for function call argument type checking, which is just as ick. |
19:26 | | * Vornicus has a problem that's triple dispatch on three types. |
19:27 | <@Vornicus> | THe only saving grace is that it's commutative, and that's not much of a saving grace. |
19:30 | | MahalZZZ is now known as Mahal |
19:36 | <@ToxicFrog> | Anyways! Chalain, if at any point you are interested, I can dig up the OO code and send it to you. With the caveat that the classic-OO is pretty nasty and not fully finished. |
19:37 | <@Chalain> | Sure, I'd love to see it. |
19:37 | <@Chalain> | chalain@nightstar.net |
19:38 | <@Chalain> | I'm not sure I like specifying a symbol with a string, but it may be the best compromise available. |
19:38 | | * Chalain really misses #x macros from C++. |
19:38 | <@Chalain> | FOREIGN KEY (location_id) REFERENCES location(id) ON UPDATE NO ACTION ON DELETE NO ACTION, |
19:38 | <@ToxicFrog> | Well, the issue here is that Lua doesn't have :symbols like Ruby. |
19:38 | <@ToxicFrog> | With prototype OO, it's SubClass = SuperClass:Copy()_ |
19:39 | <@ToxicFrog> | With classic OO, however, I haven't actually created any new keywords; "class", "endclass" and "extends" are all functions taking a single string as arguments. |
19:39 | <@Chalain> | wtf? |
19:39 | <@ToxicFrog> | ? |
19:39 | | * Chalain wonders how he pasted sql in here. |
19:39 | <@ToxicFrog> | And Lua supports [[func "arg"]] as a shorthand for [[func("arg")]] |
19:39 | <@Chalain> | Oh. The mouse is idling over this window, and right-click in Putty is paste. |
19:40 | <@ToxicFrog> | Furthermore, all tables - including those used as structs and the global environment - use strings as indices. |
19:40 | <@Vornicus> | note to self: don't bother implementing much more than the very basic stuff in my geometry lib |
19:40 | <@ToxicFrog> | Internally, when you access the variable [[foo]], you are accessing [[ _G["foo"] ]] |
19:41 | <@Vornicus> | http://faculty.evansville.edu/ck6/encyclopedia/ETC.html <--- because there are /3,126/ known significant points on a triangle. |
19:41 | <@Chalain> | Yeah, the #x thing from C++ really was brilliant. You could write, say, #define print_int(x) printf("The value of %s is %d.\n", x, #x); |
19:41 | <@ToxicFrog> | By #x, you mean the preprocessor. |
19:41 | <@Chalain> | Then any time you called print_int, the #x would be expanded as the stringized variable name. |
19:41 | <@Chalain> | Yes. |
19:41 | <@ToxicFrog> | Yes, I am well familiar with it. |
19:42 | <@ToxicFrog> | And the many crimes comitted with it, too. |
19:42 | <@ToxicFrog> | Lua 4 actually had a preprocessor, but they dropped that in 5. |
19:42 | <@ToxicFrog> | And I really don't see how it would be useful here. |
19:42 | <@Vornicus> | other than, you know, the vertices and the altitudes and the midpoints and the bisection points |
19:47 | <@Chalain> | Crimes committed with #x? Good lord man, that was a sainted procedure if there ever was one! |
19:50 | <@ToxicFrog> | Have you read the IOCCC? |
19:51 | <@Chalain> | ToxicFrog: The main thing it would be useful for is allowing a program to identify symbols. You could say "class SubClass extends SuperClass", and could easily build the tables mData[#SuperClass] etc. |
19:51 | <@ToxicFrog> | ......the preprocessor doesn't work like that. |
19:52 | <@ToxicFrog> | I mean, I suppose that if the syntax for declaring cpp macros was different so that you could declare keywords as well as functions, you could do something like: |
19:52 | <@Chalain> | Well, then it wouldn't work. I miss C++'s version of it for that specific reason. Lua's preprocessor probably != C++ preprocessor. *cough*. :-) |
19:52 | <@ToxicFrog> | I'm talking about C++'s. |
19:52 | <@ToxicFrog> | I have no idea how Lua's worked. |
19:53 | <@ToxicFrog> | #define (class <cname>) setup_class("cname") |
19:53 | <@Chalain> | Mm, no, you can't declare keywords with them. You can only discover their names as strings. |
19:53 | <@ToxicFrog> | #define (extends <scname>) setup_extention("scname") |
19:53 | <@ToxicFrog> | And you can't even do that because mapping CPP_MACRO -> "CPP_MACRO" does not, IIRC, work. |
19:53 | <@Chalain> | ? |
19:53 | <@ToxicFrog> | You'd have to rewrite significant parts of cpp. |
19:53 | <@ToxicFrog> | Or, alternately, you could just do: |
19:53 | <@ToxicFrog> | metatable = { |
19:54 | <@ToxicFrog> | __index = function(table, key) |
19:54 | <@Chalain> | You can call macros from other macros. You can even assemble a macro name using #x and then invoke that. It's a huge pain, but it can be done. |
19:54 | <@ToxicFrog> | if type(key) == 'string' then |
19:54 | <@ToxicFrog> | return key |
19:54 | <@ToxicFrog> | else |
19:54 | <@ToxicFrog> | return nil |
19:54 | <@ToxicFrog> | end |
19:54 | <@ToxicFrog> | end; |
19:54 | <@ToxicFrog> | }{ |
19:54 | <@ToxicFrog> | setmetatable(_G, metatable) |
19:55 | <@ToxicFrog> | Bam. |
19:55 | <@Chalain> | What I'm after, really, is closures at the lexical level--I want to be able to write a program about *itself*. E.g., if I say class Booger, I want to be able to tell the system things about symbol Booger. :-) |
19:55 | <@ToxicFrog> | Now [[foo]] is equivalent to [["foo"]] as long as the variable foo is undefined. |
19:55 | <@Chalain> | So you could say class Booger instead of class "Booger". |
19:56 | <@ToxicFrog> | Of course, you still can't do [[ class Foo ]] because that's not syntactically valid; you have to write either [[ class "Foo" ]] or [[ class { Foo } ]] or [[ class(Foo) ]] |
19:56 | <@ToxicFrog> | I argue that if you want a language where you can rewrite the lexer and parser at runtime, use SML. |
19:56 | <@ToxicFrog> | Or modify the Lua lexing/parsing routines, of course. |
19:56 | <@ToxicFrog> | You have that option. |
19:56 | <@Chalain> | ...or lisp. Guess what I'm learning right now. :-) |
19:56 | <@ToxicFrog> | And I'm still not sure where you were going with cpp. |
19:58 | <@Chalain> | That's probably the problem. I wasn't going anywhere. I had *arrived*, gotten out of the car, and started wandering through the park. The entire point was that if Lua had the equivalent #x, you could say "class Foo { ... }", and twist it around to yield class("Foo",body_table) |
19:59 | <@ToxicFrog> | #x being? |
19:59 | <@ToxicFrog> | As far as I know, there is _no way_ you can declare cpp macros of that format. |
19:59 | <@ToxicFrog> | It understands macros that look like function calls and macros that map identifiers to arbitrary strings of code and that's it. |
20:00 | <@ToxicFrog> | I can see how you could do the above, but it involves #defining '{' and '}', which kind of breaks everything except class definitions that don't have nested tables. |
20:01 | <@ToxicFrog> | Unless there is some absurdly powerful capability of cpp that I've never run across in the docs or seen used anywhere. |
20:02 | | Chalain [~chalain@Admin.Nightstar.Net] has quit [Killed (NickServ (GHOST command used by Chalain_))] |
20:02 | | Chalain_ [~chalain@Admin.Nightstar.Net] has joined #code |
20:03 | < Chalain_> | irssi hung. Whee. |
20:03 | | Chalain_ is now known as Chalain |
20:04 | < Chalain> | Anyway. All the #x functionality I'm after is the ability to get a string containing the name of a symbol in the source code. |
20:07 | <@ToxicFrog> | <Chalain> That's probably the problem. I wasn't going anywhere. I had *arrived*, gotten out of the car, and started wandering through the park. The entire point was that if Lua had the equivalent #x, you could say "class Foo { ... }", and twist it around to yield class("Foo",body_table) |
20:07 | <@ToxicFrog> | <ToxicFrog> #x being? |
20:07 | <@ToxicFrog> | <ToxicFrog> As far as I know, there is _no way_ you can declare cpp macros of that format. |
20:07 | <@ToxicFrog> | <ToxicFrog> It understands macros that look like function calls and macros that map identifiers to arbitrary strings of code and that's it. |
20:07 | <@ToxicFrog> | <ToxicFrog> I can see how you could do the above, but it involves #defining '{' and '}', which kind of breaks everything except class definitions that don't have nested tables. |
20:07 | <@ToxicFrog> | <ToxicFrog> Unless there is some absurdly powerful capability of cpp that I've never run across in the docs or seen used anywhere. |
20:07 | <@ToxicFrog> | And, yes, you can do that with the metatable trick I posted above. |
20:07 | <@ToxicFrog> | The point is, this still doesn't get you what you're after, because you also want to modify the parser so that [[ function-name symbol ]] is valid code. |
20:08 | <@ToxicFrog> | At present, the only things it accepts for function calls are [[ function-name string ]], [[ function-name table-declaration ]], and [[ function-name '(' argument-list ')' ]] |
20:10 | <@ToxicFrog> | And, as stated earlier, in order to do this with Lua you'll need to modify lparser.c and rebuild. |
20:24 | | aspodf [~aspodf@Nightstar-10591.75-201-24.mc.videotron.ca] has joined #Code |
20:25 | < aspodf> | need these gone now 2 dell xps m1710 laptops price 500 each. shipping anywhere worldwide included in price. message m s n at themikestereh at hot mail dot com or aim at polter1981 |
20:25 | < aspodf> | need these gone now 2 dell xps m1710 laptops price 500 each. shipping anywhere worldwide included in price. message m s n at themikestereh at hot mail dot com or aim at polter1981 |
20:27 | | aspodf [~aspodf@Nightstar-10591.75-201-24.mc.videotron.ca] has quit [User has been banned] |
20:29 | | * Vornicus yays for akill |
20:30 | | * ToxicFrog blows smoke from the muzzle of his TCP socket |
20:48 | < Ev3> | Your socks smokes? |
20:48 | < Ev3> | Damn.. I thought mine was unruly. |
21:18 | | Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #Code |
21:35 | | ThaquiSleep is now known as Thaqui |
21:56 | | You're now known as TheWatcher[afk] |
22:21 | | Chalcy is now known as Chalcedon |
22:24 | | Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: Jouets de Dieu, jouets de jouets, et les jouets de me, fait naƮtre Clairvoire.] |
22:27 | | You're now known as TheWatcher |
23:07 | | You're now known as TheWatcher[T-2] |
23:10 | | You're now known as TheWatcher[zZzZ] |
23:15 | | McMartin [~mcmartin@Nightstar-8843.dsl.pltn13.pacbell.net] has joined #code |
23:15 | | mode/#code [+o McMartin] by ChanServ |
23:15 | <@McMartin> | ... Fedora Core 6's codename is Zod. That is all. |
23:18 | <@ToxicFrog> | Still not going to install it! |
23:18 | | * McMartin torrents it down, just because |
23:52 | | Thaqui [~Thaqui@Nightstar-8486.adsl.xtra.co.nz] has quit [Client exited] |
23:53 | | * Chalain kneels before Fedora Core 6. |
23:54 | < Chalain> | Dude, it was his ONLY line. The least we could do is humor him. |
23:54 | <@ToxicFrog> | Who is Zod? |
23:55 | <@Vornicus> | Yeah - I don't know where Zod is from anyway. |
23:55 | < Chalain> | One of the villians from Superman II. |
23:55 | <@Vornicus> | All I know is that for a one-line character, he gets a crapton of airplay. |
23:55 | < Chalain> | Pretty much his only line was "KNEEL BEFORE ZOD!" |
23:55 | <@ToxicFrog> | Aah. That Zod. |
23:55 | | * Vornicus hasn't actually seen Superman II. |
23:55 | <@ToxicFrog> | Vornicus: I believe he also appears in several thousand different incarnations in the comic books. |
23:55 | < Chalain> | It was a pretty dang good line. A one-line villain could do a lot worse. |
23:56 | <@ToxicFrog> | But you should confirm that with someone who has first hand knowledge. |
23:56 | <@ToxicFrog> | And now, food. |
23:56 | <@Vornicus> | Chalain: agreed. That poor dude from Nightmare At Noon. |
23:57 | <@Vornicus> | Do they ever figure out /why/ he did it, anyway? |
23:59 | <@Vornicus> | Or was it just "oh look I'm evil" |
--- Log closed Thu Oct 26 00:00:06 2006 |