code logs -> 2006 -> Thu, 23 Nov 2006< code.20061122.log - code.20061124.log >
--- Log opened Thu Nov 23 00:00:09 2006
--- Day changed Thu Nov 23 2006
00:00
<@ToxicFrog>
I mean, it's like eight lines of Lua, and Ruby has even more powerful hash comprehension tools, I thought.
00:00
< The-Librarian>
yeah
00:01
< The-Librarian>
I should be able to content_tag("ul", collection.each {|key, value| content_tag("li", content_tag("ul", value.each {|v| v}))})
00:01
<@Chalain>
puts "<ul>"; myhash.each_pair { |k,v| puts "<li><b>#{k}</b>: <ul>"; v.each { |item| puts "<li>#{item}</li>"; } puts "</ul>"
00:02
<@Chalain>
Oooh, collect() would make it a lot cleaner, yeah.
00:02
<@ToxicFrog>
Seven lines. Just tested it.
00:02
<@ToxicFrog>
That...looks plausible from what I know of Ruby.
00:03
<@ToxicFrog>
It doesn't work?
00:03
<@ToxicFrog>
(nine lines if you want proper start and end, actually)
00:04
< The-Librarian>
heh
00:04
< The-Librarian>
finally, I get someone's attention in #rubyonrails Freenode, and they're suggesting collect too
00:05
< The-Librarian>
guess I should go figure out how collect works
00:06
<@Chalain>
Collect takes a collection, does a transform, and returns a collection.
00:06
<@Chalain>
AHHHH
00:06
< The-Librarian>
ok
00:06
<@Chalain>
That's your problem
00:06
< The-Librarian>
?
00:06
<@Chalain>
collection.each() <-- what's the *return* value
00:06
<@Chalain>
That's what your outer content_tag is processing.
00:06
< The-Librarian>
right.
00:06
<@Chalain>
You want collect
00:06
<@Chalain>
In fact
00:07
<@Chalain>
Just replace each with collect and try it
00:07
<@Chalain>
You'll probably get exactly what you want
00:07
< The-Librarian>
ok, collection.each {|key, value| } <-- what's that going to return? Empty block.
00:07
<@Chalain>
Unless content_tag doesn't take collections, in which cas you'll need to do a join
00:07
<@ToxicFrog>
...what does collection.each() return?
00:07
<@ToxicFrog>
Aahg.
00:07
< The-Librarian>
ToxicFrog: it returns the result of the block
00:07
<@Chalain>
Right, so content_tag("ul", colection.each(...)) will wrap "nil" with <ul>"
00:07
<@ToxicFrog>
Which in this case is nil.
00:07
<@ToxicFrog>
Or ruby's equivalent.
00:07
< The-Librarian>
actually, it calls the block once per element
00:08
<@Chalain>
collect will return the processed value.
00:08
<@ToxicFrog>
Yeah, but will you get nil,nil,nil,... or just one nil?
00:08
< The-Librarian>
ok, but watch
00:08
< The-Librarian>
http://pastie.caboo.se/23692
00:08
<@Chalain>
irb(main):011:0> [3,2,1].collect { |x| x*2 }
00:08
<@Chalain>
=> [6, 4, 2]
00:09
< The-Librarian>
here's the interesting bit. In that pastie, if I completely remove the itemlist.to_sentence statement, leaving the block completely empty... The output is identical.
00:09
< The-Librarian>
If I put "blargh" in the block, which SHOULD make the block return the string "blargh" each time it hits... The output is identical.
00:10
<@Chalain>
In your paste, your code output makes sense for what you wrote. what did you want the output to be?
00:10
< The-Librarian>
actually it doesn't make sense
00:10
<@ToxicFrog>
Ruby doesn't have an explicit return?
00:10
< The-Librarian>
because the output of to_sentence should be "Red, blue, green, yellow, and orange"
00:11
< The-Librarian>
ToxicFrog: it does but then it only iterates the once.
00:11
<@ToxicFrog>
The value of the last executed expression in the block is the return value of the block?
00:11
< The-Librarian>
ToxicFrog: yep.
00:11
<@Chalain>
ToxicFrog: it does, but it's optional. If you don't say "return x", ruby returns the last expression evaluated.
00:11
<@ToxicFrog>
And the value of collection::each() is a list of concatenated return values of each time the block was executed?
00:11
<@Chalain>
Yes
00:11
<@ToxicFrog>
Hmm.
00:11
<@ToxicFrog>
So:
00:12
<@ToxicFrog>
[3,2,1].each { |x| return x } should -> 3,2,1 - yes?
00:12
< The-Librarian>
Windows is incredibly *rude*
00:12
< The-Librarian>
it's been pestering me since about a minute after I switched it on to reboot for automatic updates
00:12
< The-Librarian>
it pops up a dialog every couple minutes to pester me
00:13
<@ToxicFrog>
This is why I turn off automatic updates
00:13
< The-Librarian>
and if I leave it alone, doesn't matter what I'm doing or whether my work is saved or not, it's gonna reboot
00:13
< The-Librarian>
if I leave them off, then I forget to do it manually
00:13
<@ToxicFrog>
I have a cron job running on Orias that reminds me to update Durandal each week next time I log in.
00:14
<@MyCatOwnz>
ToxicFrog: I have a cron job on my desktop that automatically updates the machine nightly.
00:14
<@ToxicFrog>
MCO: that doesn't work on windows, though.
00:14
<@ToxicFrog>
Or rather, if it does, your computer ends up rebooting nightly.
00:14
<@MyCatOwnz>
ToxicFrog: also, I run a distro that occasionally renders the machine unbootable without action on the part of the administrator to make sure that GRUB, etc are all pointing at the correct kernel image. ^_^
00:15
<@ToxicFrog>
Debian?
00:15
< The-Librarian>
I need to get one of those monitor arms so I can start using my iMac
00:17
<@McMartin>
Ahahahahahahaaaaa
00:17
<@McMartin>
My madness has borne fruit
00:17
<@ToxicFrog>
You have shown them all?
00:17
<@McMartin>
Well, I need to copy over and upload text and screenshots first.
00:18
<@MyCatOwnz>
ToxicFrog: Arch Linux. Every now and again, they change, say, the boot process.
00:18
<@ToxicFrog>
Aah.
00:18
<@MyCatOwnz>
ToxicFrog: if you don't make sure to read the notices that come up during system upgrade, you'll end up in deep donkey poo.
00:18
<@McMartin>
But, briefly, 19 lines of Pascal to compute Fibonacci numbers has become 99 lines of assembler (which also links libraries) has become about half a kB of program code that runs in my C64 emulator.
00:18
<@ToxicFrog>
Debian has an amusing tendency to select kernels from other Linux distros when autoconfiguring Grub~
00:19
<@ToxicFrog>
McMartin: sw33t.
00:19
<@MyCatOwnz>
ToxicFrog: oO. Sounds hilarious and wrong, simultaneously.
00:19
<@ToxicFrog>
Yep.
00:19 * McMartin still hasn't implemented, like, if or while yet, though. Just addition, subtraction, write(ln), and for.
00:19
<@ToxicFrog>
Fedora Core 5 is not happy when it boots and finds a Debian install in /
00:20 Chalcedon is now known as ChalcyEditor
00:21
<@Chalain>
Oy, McMartin: is it possible, via Java Reflection, to browse the classes in a given package? I know part of the class name I'm looking for at runtime, but child classes can be added after the fact and I want to find and use them.
00:21
<@McMartin>
Hum. Let me check the APIs.
00:21
<@McMartin>
I know you can pick out methods and fields from a class.
00:22
<@MyCatOwnz>
ToxicFrog: hahahahah. Unsurprising.
00:23
<@McMartin>
Man, java.sun.com is slow on dialup.
00:24
<@MyCatOwnz>
McMartin: use a browser that refrains from downloading images? Or did they just splurge on Javascript and AJAX-ey baggage?
00:25
<@McMartin>
MyCatOwnz: No, it's mostly just that there are, for instance, frames with tens of thousands of links in them.
00:25
<@McMartin>
In any event, Chalian, it looks like you can't interrogate Packages the way you can Classes.
00:27
<@McMartin>
MCO: http://java.sun.com/j2se/1.5.0/docs/api/ in particular; note the lower left frame.
00:30
< The-Librarian>
huh.
00:31
<@MyCatOwnz>
McMartin: oh, crikey.
00:31
< The-Librarian>
I don't grok in fullness *why* this works, but it *does* work. http://pastie.caboo.se/24059
00:31
< The-Librarian>
Chalain: collect was the key.
00:32
<@ToxicFrog>
...that indentation is whack
00:32
< The-Librarian>
yeah it is
00:32
< The-Librarian>
not sure what's going on there
00:33
< The-Librarian>
you should see the original indentation
00:33
<@ToxicFrog>
I think I see what's happening.
00:33
<@ToxicFrog>
Although I can't be entirely sure with indentation like that.
00:33
<@ToxicFrog>
One moment while I rewrite it.
00:33
< The-Librarian>
it appears that my editor is doing some funky stuff with tabs and spaces.
00:33
<@ToxicFrog>
Aah, I see. Mixed spaces and tabs for the lose.
00:35
<@ToxicFrog>
http://pastie.caboo.se/24059
00:35
<@ToxicFrog>
Err.
00:35
<@ToxicFrog>
http://pastie.caboo.se/24060
00:35
< The-Librarian>
http://pastie.caboo.se/24061
00:35
< The-Librarian>
I can't find a decent Rails editor for Windows
00:35
< The-Librarian>
all of them suck ass to one degree or another.
00:36
< The-Librarian>
Scite doesn't have any integrated file browser.
00:36
< The-Librarian>
Komodo's file browser sucks ass. And it intermixes spaces and tabs for some reason.
00:36
<@ToxicFrog>
NEdit doesn't have a Ruby mode, but you could easily add one.
00:36
<@ToxicFrog>
However, it sounds like you want an IDE, not an editor.
00:36
< The-Librarian>
RIDE-ME doesn't have nearly as good a syntax highlighting, nor does it highlight braces and parens like Scintilla-based editors
00:36
< The-Librarian>
Eclipse is *WAY* memoryhoggy and SLOW AS HELL
00:36
< The-Librarian>
yeah I want an IDE
00:37
< The-Librarian>
And they don't make a good one
00:37
< The-Librarian>
well, certain elements of the IDE anyway...
00:37
<@ToxicFrog>
NEdit is not an IDE, but it does have the mad syntax hilighting.
00:37
< The-Librarian>
I don't care if it lets me run a server and the console and breakpoints from within the app
00:37
<@ToxicFrog>
Hmm. I bet it would be possible to write a GTK app that talks to nedit via the command line and acts as a filebrowser for it.
00:37
< The-Librarian>
I can always type 'breakpoint' where I need one and run the other stuff from cmd windows
00:38
<@ToxicFrog>
Anyways. As for what's happening there.
00:38
< The-Librarian>
I want good robust syntax highlighting, I want good robust auto indenting, and I'd *REALLY* love whatever the hell they're called today, code hints, intellitext, code intelligence, tooltips, whatever.
00:38
< The-Librarian>
the way Dreamweaver does for HTML, CSS, and PHP
00:38
<@ToxicFrog>
Calltips.
00:39
< The-Librarian>
and snippets. Preferably ones where you can type something and hit some hotkey and it substitutes a snippet.
00:39
<@ToxicFrog>
NEdit doesn't have those, which is one of the reasons I tried for so long to get SCIte to not suck.
00:39
< The-Librarian>
and I'd really like it if I type 'def', it'd give me an 'end' automatically.
00:39
<@ToxicFrog>
It does have snippets, if I understand what you just said there.
00:39
< The-Librarian>
stuff like that.
00:39
< The-Librarian>
snippets, trigger text, something.
00:39 Syloq [Syloq@Admin.Nightstar.Net] has joined #code
00:39
<@ToxicFrog>
Auto-replace, or auto-expansion.
00:40
< The-Librarian>
like in textmate, I understand, if you type a code word and hit TAB, it puts the text in for you.
00:40
< The-Librarian>
oh yeah and I don't care what anybody says, I am *NOT* using vim.
00:40
<@ToxicFrog>
Yeah. NEdit can do that.
00:40
< The-Librarian>
I've been pondering emacs.
00:40
<@ToxicFrog>
Actually it seems to have some kind of smart autoexpansion built in.
00:40 Syloq is now known as Syloqs-AFH
00:40
<@ToxicFrog>
It's bound to alt-D by default.
00:41
<@ToxicFrog>
fun<alt-d> -> function
00:41
<@ToxicFrog>
Ok, so maybe that's part of the language mode.
00:41
< The-Librarian>
huh.
00:41
<@ToxicFrog>
Mes<alt-D>
00:41
<@ToxicFrog>
-> Message'
00:41
< The-Librarian>
nifty.
00:41
<@ToxicFrog>
That's not part of the language spec, it's a class I just wrote.
00:41
< The-Librarian>
oh yeah, and I don't care what you do to Eclipse, it's still way too Java-centric.
00:41
<@ToxicFrog>
Mes<alt-D>.p<alt-D> -> Message.payload
00:41
<@ToxicFrog>
I need to bind this to a more useful key.
00:42
< The-Librarian>
I've been overall happy with RIDE-ME but they've stopped developing it
00:42
<@ToxicFrog>
...oh, hey.
00:42
<@ToxicFrog>
NEdit does support calltips.
00:42
<@ToxicFrog>
It just doesn't have any installed by default.
00:42
< The-Librarian>
free-ride bothered me because it opens up two taskbar buttons, and taskbar space is *always* at a premium... I never got into it far enough to tell if it was otherwise okay
00:43
< The-Librarian>
this computer's bitchiness is getting on my nerves. I'm gonna have to let it reboot so it will shut the hell up.
00:43
< The-Librarian>
bbiaf
00:44
< The-Librarian>
in the middle of typing a sentence, not only does it pop open the "do you want to restart now?" dialog, but that dialog GRABS FOCUS
00:44
<@ToxicFrog>
...
00:44
< The-Librarian>
I *hate* things that grab focus. For WHATEVER reason.
00:44
< The-Librarian>
I type at 90+ wpm, and before I even notice that something's popped up, I've typed a dozen or more characters into ti
00:44
< The-Librarian>
it
00:44
< The-Librarian>
anyway, bbiaf
00:45 The-Librarian [~user@Nightstar-22137.fmtc.com] has quit [Quit: Client Exiting]
00:46
< Janus>
Someone has a case of the mondays.
00:46 ChalcyEditor is now known as Chalcedon
00:47 * Janus goes to look up what Intellisense does, as it's probably a Good Thing.
00:52
< takyoji>
I have a pretty stupid question.. What is the HTMl for and image submit button?
00:52
<@ToxicFrog>
...context?
00:52
< takyoji>
a not and*
00:53
< takyoji>
'What is the HTML for a submit button that is in the form of an image'
00:53
< takyoji>
Wolud I have to use Javascript DOM?
00:54 TakyojiClone [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has joined #code
00:54
< TakyojiClone>
wth do I keep getting disconnected??
00:55
< TakyojiClone>
Why the hell*
00:55
<@ToxicFrog>
http://www.w3.org/TR/html401/interact/forms.html#edef-BUTTON
00:55
<@ToxicFrog>
http://www.w3.org/TR/html401/interact/forms.html#edef-INPUT
00:56 The-Librarian [~user@Nightstar-22137.fmtc.com] has joined #code
00:56 takyoji [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has quit [Ping Timeout]
00:57
< TakyojiClone>
I checked my log of my router says "Nov/22/2006 16:47:40 - SYN Flood Attack Detect - Packet Dropped"
00:57
<@ToxicFrog>
Those should answer your question fully, but in short, you create a <button type="submit" ...><img src="whatever" ...></button>
00:57
< TakyojiClone>
oh
00:57
<@ToxicFrog>
The-Librarian: where were we.
00:57
< The-Librarian>
donno
00:58
< The-Librarian>
but RIDE-ME does have brace/bracket/paren highlighting
00:58
< The-Librarian>
you were talking about NEdit?
00:58
< The-Librarian>
but will it run on Windows?
00:58
<@ToxicFrog>
Ok. NEdit. Calltips yes, but they're popup windows rather than drop-down floaters like in SCite. Mad syntax hilighting, and all forms of bracket hilighting, including hilight-matching, hilight-range, and jump to matching.
00:59
<@ToxicFrog>
No file browser, but it's tabbed, and not terribly hard to write macros for things like "open all files in this project in tabs".
00:59
<@ToxicFrog>
Macros can be used for custom word-completion, and it also has some kind of smart autocompletion based on what you've written rather than static files.
01:00
<@ToxicFrog>
Also has shell integration, so you can for example type a shell command and hit ctrl-enter and it'll run that command and dump the output into the current tab.
01:00
<@ToxicFrog>
And various other useful features.
01:00
<@ToxicFrog>
Now, the caveat.
01:00
<@ToxicFrog>
The windows version requires an X server.
01:00
<@ToxicFrog>
If you have Cygwin installed, it comes with both an X server and NEdit itself, so there's no problem.
01:01 TakyojiClone2 [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has joined #code
01:01
<@ToxicFrog>
If you don't have an X server, you'll need to either (1) install one and run NEdit on a seperate machine but display on this one; (2) install Cygwin, which comes with everything you need, (3) install an X server, NEdit, and the Cygwin libraries NEdit needs, or (4) rebuild NEdit using windows-native libraries (you'll still need an X server tho)
01:02
< TakyojiClone2>
Why the f*** am I BEING DISCONNECTED?
01:02
<@ToxicFrog>
Personally, I always have Cygwin installed, so it's a nonissue, but you might not agree.
01:02
<@ToxicFrog>
...also. Long ago, we were talking about what your Ruby code does.
01:02
< The-Librarian>
hmm
01:02
< The-Librarian>
I've got cygwin
01:02
< TakyojiClone2>
Is someone flooding my ip address??
01:02
< The-Librarian>
cygwin is one of the first things I install when I move into a new machine
01:02
<@ToxicFrog>
The-Librarian: ok, so try this:
01:02
< The-Librarian>
I'm looking forward to actually being able to use my iMac
01:02
<@ToxicFrog>
$ startxwin.sh &
01:03
<@ToxicFrog>
$ export DISPLAY=localhost:0.0
01:03
<@ToxicFrog>
$ nedit-client
01:03 TakyojiClone [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has quit [Ping Timeout]
01:03
< The-Librarian>
unfortunately the only place I have to put it at the moment is *on top of* one of my 17" monitors. And that doesn't seem like such a good idea.
01:03
<@ToxicFrog>
What I've done is:
01:03
< The-Librarian>
I should have bought that swing arm I saw at the thrift store the other day
01:03
<@ToxicFrog>
- c:/cygwin/lib/Singular/startxserver.bat is in my Startup
01:03
<@ToxicFrog>
- DISPLAY=localhost:0.0 is in my .bashrc
01:03
< The-Librarian>
then I could sit down at my desk and swing the imac into position to use it
01:04
<@ToxicFrog>
So, I just have to go $ nedit and bam, it's running.
01:04
<@ToxicFrog>
Now. The Ruby code.
01:04
<@ToxicFrog>
From the inside out:
01:04
< The-Librarian>
I live in a travel trailer, the path beside my "desk" is about a foot and a half wide, and my usable desk space is 21" wide by 24" deep
01:04
<@ToxicFrog>
Lines 5-7 evaluate to a collection containing a bunch of strings of the form "<li>(array element)</li>
01:05
< The-Librarian>
it's actually about 21" x 48" but there's a monitor in front of me, and behind that is about 16" of empty space where I can put a computer to work on temporarily
01:05
<@ToxicFrog>
Lines 4,8 wrap this in a <ul> tag and return the corresponding string.
01:05
<@ToxicFrog>
Lines 3,9 prepend key and then wrap it in a <li> tag.
01:06
<@Raif>
so make it a key<li>me?
01:06
< The-Librarian>
yeah
01:06
<@ToxicFrog>
Lines 2,10 do this /for every element in collection/ and evaluate to a collection containing all of these things.
01:06 * Raif waits for the tomatoes in various stages of decay.
01:06
<@ToxicFrog>
And lines 1,11 wraps all of that in a <ul> tag.
01:06
<@ToxicFrog>
Simple.
01:07
< The-Librarian>
which pastie are we working from?
01:07
<@ToxicFrog>
24060/24061
01:08
< The-Librarian>
okay
01:08
< The-Librarian>
that makes sense.
01:08
< The-Librarian>
21: def content_tag(name, content, options = nil)
01:08
< The-Librarian>
22: "<#{name}#{tag_options(options.stringify_keys) if options}>#{content}</#{name}>"
01:08
< The-Librarian>
23: end
01:08
< The-Librarian>
that's the content_tag method.
01:08
< The-Librarian>
so lines 1, 11 are putting that whole value into a string interpolation thingy #{}
01:09
<@ToxicFrog>
Which I think, if you pass it a collection, is the concatenation of all the contents of the collection.
01:09
<@ToxicFrog>
Based on the behaviour of that code.
01:09
< The-Librarian>
and I'm assuming the reason .each doesn't work is because .each is returning multiple values on multiple iterations, rather than a collection
01:09
<@ToxicFrog>
Yes.
01:09
< The-Librarian>
yeah, #{array} returns a concatenation of the array elements. Same result as array.join('')
01:09
<@ToxicFrog>
Mission accomplished, and without actually knowing Ruby~
01:09
< The-Librarian>
anyway apparently the whole returning multiple values thing frells up the string interpolation thing
01:09 Chalcedon is now known as ChalcyNap
01:10
< The-Librarian>
so. Now I just have to mangle the innermost li to contain a checkbox instead of just text. Easy enough.
01:13 ReivZzz is now known as Reiver
01:17
< The-Librarian>
dammit.
01:17
< The-Librarian>
I can't wait till next week.
01:17
< The-Librarian>
This laptop desperately needs a new power jack.
01:17
< The-Librarian>
I've got ten new ones in the car, but my electronics guy is off with his family for Thanksgiving
01:19
<@ToxicFrog>
Hmm.
01:19
<@ToxicFrog>
My bash instincts are to remap autocomplete to tab.
01:19
<@ToxicFrog>
But I kind of need that for indenting.
01:21
< The-Librarian>
bash your instincts.
01:21
< The-Librarian>
whee!
01:22
<@ToxicFrog>
Hmm. ^D is jump to definition, but I don't use ctags and thus can't use this feature. So I might as well remap it.
01:22
< The-Librarian>
http://pastie.caboo.se/24067
01:24
<@ToxicFrog>
Aha.
01:24
<@ToxicFrog>
The nedit autocomplete function is written in NEdit macro language.
01:24
< The-Librarian>
gad
01:24
<@ToxicFrog>
It grabs the partially completed word and then searches the file you're in for likely matches.
01:24
< The-Librarian>
ToxicFrog: interesting way of doing it.
01:24
<@ToxicFrog>
Yeah.
01:24
<@ToxicFrog>
You could also implement static autocomplete fairly easily.
01:25
<@ToxicFrog>
Where it has a table of input -> replace_with mappings.
01:26
<@ToxicFrog>
Now, what would be cool is if, were you to keep hitting ^D, it would cycle through progressively more unlikely matches.
01:27
< The-Librarian>
that would be cool.
01:27
<@ToxicFrog>
So if it gets it wrong, you just keep hitting ^D until the right one pops up.
01:27
<@ToxicFrog>
I think that's also possible, but my NEdit macro-fu is weak.
01:27
< The-Librarian>
btw, that static autocomplete you just mentioned is what I mean by "snippet triggers"
01:28 TakyojiClone [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has joined #code
01:28 * ToxicFrog nods
01:28
<@ToxicFrog>
It doesn't, to my knowledge, have this built in; but that's what the macro language is for.
01:29
< The-Librarian>
meh
01:29
<@ToxicFrog>
As well as more complicated things.
01:29
<@ToxicFrog>
Like:
01:29
< The-Librarian>
so far, RIDE-ME has been, overall, the least sucky.
01:29
<@ToxicFrog>
foo^F ->
01:29
<@ToxicFrog>
function foo()
01:29
<@ToxicFrog>
end
01:29
<@ToxicFrog>
with the cursor between the ().
01:29
< The-Librarian>
yeah
01:29
<@ToxicFrog>
(which I don't actually have as a macro, but it's trivially easy to do~)
01:30 TakyojiClone2 [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has quit [Ping Timeout]
01:30
<@ToxicFrog>
Also, somewhere I have a really cool stack-based file traversal macro kicking around.
01:30
<@ToxicFrog>
Put the cursor over a function or variable and hit ^] and it jumps you to the file and line where it's defined (assuming a valid tags file is loaded).
01:30
<@ToxicFrog>
Hit ^[ and it takes you back to where you were.
01:31
<@ToxicFrog>
However, I wrote it at work and now I can't find it.
01:31
< The-Librarian>
I hate computers.
01:31
<@ToxicFrog>
?
01:32 * McMartin gets if/then/else working.
01:32
<@ToxicFrog>
Sw33t.
01:33
<@McMartin>
The hard bit was actually code generation for >.
01:34 * ToxicFrog is some distance in to the Spellcast3 server.
01:34
< The-Librarian>
eh?
01:34
<@ToxicFrog>
??
01:34
< The-Librarian>
I borrowed one of Fandemonium's PS/2's, and I'm gonna start playing Kingdom Hearts tonight
01:34
< The-Librarian>
never played it
01:35
<@ToxicFrog>
Eh. It's ok, but it never really grabbed me.
01:35
<@ToxicFrog>
What were you "eh?"ing at?
01:35
< The-Librarian>
spellcast3
01:35
<@ToxicFrog>
Aah.
01:36
<@ToxicFrog>
Spellbinder is a turn-based, pencil-and-paper game of duelling wizards by Richard Bartle.
01:36
<@ToxicFrog>
Spellcast is an X11-based implementation of same by Andrew Plotkin.
01:36
< The-Librarian>
ah
01:36
< The-Librarian>
nifty
01:36
< The-Librarian>
anything like the wizards' duel in The Black Cauldron?
01:36
<@ToxicFrog>
Spellcastnet is a client-server, SDL-based version of Plotkin's X11 version.
01:37
<@ToxicFrog>
Since it's not X11 it works on things other than LANs and since it's SDL it works on windows and OSX as well as *nix.
01:37
<@ToxicFrog>
However, it has some...issues.
01:37
< The-Librarian>
ok now that I have this piece working properly, I should probably put it away and start working on something to import a CSV into the database.
01:37
<@ToxicFrog>
Spellcast3 is my working name for v3.x of same, which is a complete rewrite in Lua, scrapping both the SDL client (which is code I am not proud of) and the Plotkin-cored server.
01:37
< The-Librarian>
Ahhh, okay
01:37
< The-Librarian>
what's SDL anyawy?
01:38
< The-Librarian>
anyway
01:38
<@ToxicFrog>
Simple DirectMedia Layer. Cross-platform graphics, sound, input, networking, threads, and some other stuff.
01:38
< The-Librarian>
neat!
01:39
<@ToxicFrog>
Writing it using SDL meant that, on the one hand, porting it to windows and OSX was a matter of changing a few flags to gcc.
01:39
<@McMartin>
Very, very handy library.
01:39
<@ToxicFrog>
On the other hand, by "graphics" we mean here raw framebuffer access. It's meant for writing games.
01:39
<@ToxicFrog>
So I had to roll my own UI.
01:39
<@ToxicFrog>
Which was ;.;
01:40
< The-Librarian>
ugh.
01:42
<@ToxicFrog>
Also, the server is arcane and nonportable and basically only runs on my development machine.
01:42
<@ToxicFrog>
And has issues. Like if one player disconnects the server shuts down.
01:42
<@Reiver>
!
01:43
<@ToxicFrog>
This is what comes of riveting client-server code onto something that was originally written to have all the clients as part of the same program.
01:43
<@ToxicFrog>
Since the server side is Plotkin's X11 spellcast with the UI removed and replaced with a networking module.
01:44 * Reiver can just hear his OO teacher bragging how properly implemented OO would have avoided this~
01:44
<@ToxicFrog>
So, I'm doing a complete rewrite for version 3. GTK-based UI, client and server integrated into one program using libsurtr, and all of it Lua.
01:46
<@McMartin>
... there goes while and repeat.
01:48
< The-Librarian>
heh
01:48
<@ToxicFrog>
And yes, Reiver, it's OO~
01:48
< The-Librarian>
McMartin: what in the world are you doing?
01:48
<@ToxicFrog>
Writing a Pascal to C64 compiler.
01:48
<@McMartin>
In Python, yet.
01:50 * ToxicFrog gets Messages.Join finished, starts work on Messages.Talk
01:52
< The-Librarian>
silly.
01:52
< The-Librarian>
not saying anything's WRONG with it... It's just silly :)
01:52
< The-Librarian>
and geeky. I like.
01:52
<@ToxicFrog>
We're all silly here.
01:52
< The-Librarian>
*shrug*
01:53
< The-Librarian>
I've recently switched to a Hipster PDA for all my note-taking and planning
01:53
< The-Librarian>
so I really have no room to talk, myself.
01:53
<@ToxicFrog>
Heh.
01:53
<@McMartin>
Having implemented all the basic control structures except for function definition and invocation, I think my madness has been sated.
01:54 * ToxicFrog uses a Zaurus SL-5500 (running OpenZaurus) for scheduling, notetaking and book reading.
01:54
<@ToxicFrog>
I am without it pretty much only when I am in my sanctum.
01:55
< The-Librarian>
I use a Palm Zire 72 for maps, dictionary, crossword puzzles, and books, and sometimes scheduling and notetaking
01:55
< The-Librarian>
but I don't often carry it around, because it's rather breakable and quite expensive and the batteries like to die at the absolute *worst* moments
01:55
< The-Librarian>
switched to the Hipster a few days ago, loving it.
01:56
<@MyCatOwnz>
The-Librarian: ook, but doesn't that defeat the point of a PDA if you can't take it with you?
01:56
<@ToxicFrog>
I used to use a Zire 31, but traded it into for the Zaurus. Faster, more memory, much more storage, better screen, and Linux-based.
01:56 MyCatOwnz [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has quit [Quit: Sleep now.]
01:56
< The-Librarian>
it cost me about two and a half bucks.
01:56
<@ToxicFrog>
Battery life is around 2-8h depending on how hard you drive the backlight.
01:57
< The-Librarian>
I'm not so fearful of breaking it or whatever (hell, it won't break. Even if I drop it in water, I can still read the pages well enough to transcribe them into a new Hipster)
01:57
<@ToxicFrog>
Oh, and it runs an SSH server.
01:57
< The-Librarian>
and it cost me three dollars. And that includes the stylus.
01:57
< The-Librarian>
heh
01:57
<@ToxicFrog>
So I can put my PDA in its cradle and then SSH into it.
01:57
< The-Librarian>
ToxicFrog: Well mine can beam documents to people who don't even *OWN* a PDA
01:58
<@ToxicFrog>
Yeah, but can it store a hundred books?
01:58
<@ToxicFrog>
Because that's what I really use mine for.
01:58
< The-Librarian>
Unfortunately no, but that's what I use the Zire for
01:58
<@ToxicFrog>
It's a relatively tiny shard my personal library carried around in my pocket.
01:58
< The-Librarian>
books and maps, primarily.
01:58
< The-Librarian>
and crosswords.
01:59
< The-Librarian>
speaking of books. I have to do some bookbinding when I get home.
01:59
<@ToxicFrog>
The scheduling is just a side effect, and I use paper for major notes.
01:59
< The-Librarian>
this is a pretty cool thing, too. http://www.pocketmod.com/
02:00
< The-Librarian>
and PocketMods are totally compatible with my Hipster
02:02 Reiver [~reaverta@IRCop.Nightstar.Net] has quit [Ping Timeout]
02:02
<@ToxicFrog>
PocketMod would be handy if it weren't flash.
02:02
<@ToxicFrog>
And if I had a printer.
02:03 * ToxicFrog ponders. Is it at all likely that Spellcast will ever be translated into other languages?
02:04
< The-Librarian>
yes
02:05
<@ToxicFrog>
Hmm.
02:06
<@ToxicFrog>
If we do assume other languages, either
02:06
<@ToxicFrog>
- the client UI uses the local configured language but messages appear in the server's language, or
02:06
<@ToxicFrog>
- the protocol gets much nastier
02:09
<@ToxicFrog>
(because now, rather than sending strings over the network, you're sending /sprintf arguments/, some of which are indexes into the language table)
02:12
<@McMartin>
Find some standard string interpolation library?
02:13
<@ToxicFrog>
Rolling your own is basically five lines of code in Lua, so.
02:13
<@ToxicFrog>
But it's still ugly.
02:13
<@ToxicFrog>
Especially since you have nesting.
02:14
<@ToxicFrog>
Like, MESSAGE_PLAYER_RESURRECTED is "{player name} glows, twitches, and then jumps to {language-specific form of player's gender} feet!"
02:14
<@McMartin>
Right.
02:15
<@ToxicFrog>
So you have to be able to tell the client not only what the top-level message is, but what the name and gender of the player in question are too.
02:15
<@McMartin>
Hmm
02:15
<@McMartin>
Isn't there a fairly stock set of messages the server sends?
02:15
< The-Librarian>
hmm
02:15
<@ToxicFrog>
Umm. How do you mean "fairly stock"?
02:16
<@McMartin>
The Spellcast3 server could, as a result, say MESSAGE_PLAYER_RESSURECTED: Player = 2.
02:16
< The-Librarian>
the way Drupal handles translations is pretty cool and quite flexible
02:16
< The-Librarian>
any string you want to be translateable, you pass it through the t() function.
02:16
<@McMartin>
And then the client prints that out, in its language, doing the substitutiosn needed.
02:16
< The-Librarian>
so t("glows, twitches and dies")
02:16
<@McMartin>
This implies that the client knows all the players.
02:16
< The-Librarian>
and then you can create a new translation, and search through all the strings, and replace strings at will
02:16
< The-Librarian>
it's pretty nifty.
02:17
<@ToxicFrog>
(and of course, for languages with implicit gender, MESSAGE_PLAYER_RESURRECTED will actually be different things depending on the gender, rather than the same thing with a substitution point for a gender-specific pronoun)
02:17
<@ToxicFrog>
(and so forth)
02:17
< The-Librarian>
http://api.drupal.org/api/4.7/function/t
02:17
<@ToxicFrog>
Ugh, it's a hideous nest of snakes.
02:18
<@ToxicFrog>
McMartin: and yes, that's what I meant by "sending sprintf arguments"
02:18
< The-Librarian>
(yes, it's php, deal with it.)
02:19
<@ToxicFrog>
Hmm. I could implement t() in Lua without much difficulty. But again we run into substitution issues.
02:19 Reiver [~reaverta@IRCop.Nightstar.Net] has joined #Code
02:19 mode/#code [+o Reiver] by ChanServ
02:20
<@ToxicFrog>
I am sorely tempted to just say "screw it, that's what grep is for" and leave it with the strings hardcoded in.
02:20
<@Reiver>
!
02:20
<@Reiver>
Bad, bad TF.
02:21
<@ToxicFrog>
Reiver: talking about localization.
02:21
<@Reiver>
Oh.
02:21
<@ToxicFrog>
It is evil and hideous and full of spiders.
02:21
<@Reiver>
localization. It is a pain in the butt.
02:21
<@ToxicFrog>
If it's on the server side things stop making sense. If it's on the client side the client-server protocol just got much nastier.
02:22
<@Reiver>
Because the server has to reply in the correct language?
02:23
<@ToxicFrog>
...no, that would be a terrible, beatings-worthy piece of protocol design.
02:23
<@ToxicFrog>
Because it means you can no longer construct messages on the server side.
02:24
<@McMartin>
This shouldn't be too huge of a deal, for the most part.
02:24
<@McMartin>
All clients agree on the current situation.
02:24
<@ToxicFrog>
So rather than, say, sending [[MESSAGE^APlayerName says, "Spiders!"A]]
02:24
<@McMartin>
All events are of the form (Entity X) performs (Action) on (Entity Y)
02:25
<@ToxicFrog>
You send [[MESSAGE^AMESSAGE_PLAYER_SAYS^BPlayerName^BSpiders!^A]]
02:26
<@ToxicFrog>
With something like a Resurrect spell going off, it's MESSAGE_PLAYER_RESURRECTED, PlayerName, PLAYER__(PlayerName's gender)_PRONOUN, ...
02:26
<@McMartin>
Uh
02:26
<@Reiver>
-.^
02:26
<@McMartin>
Why can't it just be MESSAGE_PLAYER_RESURRECED, PlayerID?
02:26
<@Reiver>
Nono.
02:26
<@ToxicFrog>
Either that or we squirt the complete player table to all the clients.
02:26
<@Reiver>
...What McM said.
02:26
<@ToxicFrog>
Which is even worse.
02:26
<@McMartin>
There are, like, eight players tops.
02:27
<@ToxicFrog>
Because now the protocol has to support nested tables.
02:27
<@McMartin>
And you only have to do it once.
02:27
<@ToxicFrog>
Umm.
02:27
<@McMartin>
Players can't enter and leave in the middle.
02:27
<@ToxicFrog>
Not in original Spellcast, no.
02:27
<@ToxicFrog>
And 8 was an arbitrary hard-coded limit. Lua is garbage-collected and automatically extends tables; I have no need of such limits.
02:28
<@McMartin>
So add PLAYER_ADD and PLAYER_QUIT events.
02:28
<@McMartin>
The client has to know all the player data anyway because it's displaying their gestures.
02:28
<@ToxicFrog>
There are as many players are the server has memory for, although in practice the client will probably become unusable around 4-5 due to running out of screen space.
02:28
<@ToxicFrog>
No, all it has to know is a name, gesture stack, and hitpoint/status line.
02:29
<@McMartin>
You have to tell them about the names/
02:29
<@ToxicFrog>
It doesn't (at least until now) have to know gender, and it should never have to know things like socket index.
02:29
<@McMartin>
You can tell them the gender, too.
02:29
<@ToxicFrog>
Yeah. Alright then.
02:29
<@ToxicFrog>
Names are guaranteed to be unique, at least, so we don't need PIDs.
02:30
<@Reiver>
PLAYER_ADD Playername, Gender
02:30
<@McMartin>
Maintaining all relevant player info should be the client's job, because what is relevant may vary by language, too.
02:30
<@Reiver>
"$Playername has joined the arena." [Gender is stored for sneakyness later.]
02:30
<@ToxicFrog>
Reiver: actually, we can overload STATUS.
02:31
<@ToxicFrog>
STATUS with a name field that is unknown to the client indicates a new entity.
02:31
<@ToxicFrog>
STATUS with a flag line of "quit" means to remove this entity.
02:31 * Reiver frown.
02:31
<@ToxicFrog>
Or grey it out or however the client is configured to indicate players that are no longer in game.
02:32
<@Reiver>
I suppose you could do that. Wouldn't it be better to let it have an 'add' flag line?
02:32
<@ToxicFrog>
...why?
02:32
<@Reiver>
In case of some weird bug that means the wrong name starts getting sent or something?
02:33 * Reiver dunno how that'd happen but...
02:33
< The-Librarian>
alright, this laptop is driving me nuts
02:33
< The-Librarian>
power is flickering on it badly
02:33
<@McMartin>
If the server is sending the wrong messages, there's not a lot the client can do.
02:33
<@ToxicFrog>
Yeah.
02:33
<@Reiver>
Hm.
02:34
<@Reiver>
What about packetloss etc tho?
02:34
<@ToxicFrog>
It's TCP.
02:34
<@Reiver>
OK.
02:35
<@ToxicFrog>
TCP is usable even over 100% packet loss connections and any error will be reported
02:36
<@McMartin>
What happens to a player whose connection drops? Can he reconnect later?
02:36
<@ToxicFrog>
Depends on how the server is configured.
02:36 * Reiver hadn't been aware you were using TCP. Sorry.
02:36
<@ToxicFrog>
When the connection is dropped, the player is marked as surrendered and removed from play.
02:37
<@ToxicFrog>
If the server allows mid-game connections, the player can reconnect but will be starting from scratch.
02:37
<@ToxicFrog>
It doesn't keep disconnected clients around in case they reconnect.
02:37
<@ToxicFrog>
Although, I suppose I could have it do so...
02:37
<@ToxicFrog>
But then we end up with disconnected players using up server slots, so we have to put some kind of time limit on it.
02:38
<@Reiver>
sleep()!
02:38
<@Reiver>
>.>
02:38
<@ToxicFrog>
...or a /turn/ limit, say. So if the players want to wait for the guy who disconnected to come back, they just don't progress to a new turn until he reconnects.
02:38
<@ToxicFrog>
...er, no.
02:38 * Reiver was kidding. Honest.
02:39
<@Reiver>
Turn limit sounds good though, TF.
02:39
<@Reiver>
Esp. as it means one 'gains' nothing from dissapearing for a turn or whatever.
02:39
<@ToxicFrog>
Yeah. I think that if a player disconnects:
02:39
<@ToxicFrog>
- during gesture entry: they selected "nothing" for both hands
02:40
<@ToxicFrog>
- during questioning: they select "up into the air" or some similar no-effect answer for all questions
02:40
<@ToxicFrog>
And basically, it just attaches a very stupid AI to the socket that does that each turn until the player reconnects or the timer expires.
02:40 * Reiver remembers the old Subspace game, where people would intentionally disrupt their dialup connections for a few seconds during moments of flagruns, because flagruns were tracked clientside but having your craft blown up required you to be connected~
02:41
<@ToxicFrog>
...although this means select() wackiness. Argh.
02:41 * Reiver ponder.
02:41
<@Reiver>
Is this being done OO, TF, so you could unhook one player object and plug in an AI object instead, or?
02:42
<@ToxicFrog>
It's OO, but the server mainloop is:
02:42
<@ToxicFrog>
- select() on list of sockets
02:42
<@ToxicFrog>
- read any pending messages and process them
02:43
<@Reiver>
...Aha. And now you're trying to implement select() to deal with dead connections.
02:43
<@ToxicFrog>
..no.
02:44
<@Reiver>
Oh. Whoops.
02:44
<@ToxicFrog>
I'm trying to implement the server in such a way that I attach an AI to a socket instead of a seperate client.
02:44
<@ToxicFrog>
I suppose the easiest way to do this is preemptive threading + connection from localhost.
02:45
<@ToxicFrog>
The AI implements a very simple and nearly stateless client. If the timer runs out, it surrenders. If the socket is closed (indicating that either the server is shutting down or the real owner has reconnected), it exits.
02:46
<@ToxicFrog>
As for the messages...McM is right. They all follow the pattern either <thing>, or <player does thing>, or <player does thing to player>
02:46
<@ToxicFrog>
So I really only need three arguments for each message.
02:46
<@McMartin>
Well
02:47
<@McMartin>
"Player" here includes summoned monsters
02:47
<@ToxicFrog>
Ok, so "entity"
02:48
<@ToxicFrog>
And then we do string interpolation wackiness using string.gsub().
02:48
<@ToxicFrog>
So Message becomes:
02:49
<@ToxicFrog>
...hmm.
02:49
<@ToxicFrog>
Actually, we need four arguments.
02:49
<@ToxicFrog>
One of those is the message structure itself.
02:49
<@ToxicFrog>
Message|PLAYER_TALK|Player|Spiders!|false
02:50
<@McMartin>
Mmm. How are spell names handled?
02:50
<@Reiver>
-.^
02:50
<@McMartin>
I just remembered there's also a handedness thing.
02:51
<@ToxicFrog>
And then en.PLAYER_TALK is "${subj} says, '${action}'"
02:51
<@ToxicFrog>
Hmm.
02:51
<@McMartin>
CAST_LIGHTNING_RIGHT, CAST_LIGHTNING_LEFT, CAST_LIGHTNING_BOTH is feasible but silly =P
02:52
<@ToxicFrog>
Yeah, castings are of the form "${player} casts ${spellname} (with ${handedness}) at ${player:pronoun_self}"
02:52
<@ToxicFrog>
Err.
02:52
<@ToxicFrog>
At either pronoun_self or at another player.
02:52
<@McMartin>
Oh, wait!
02:52
<@ToxicFrog>
Or up into the air.
02:52
<@ToxicFrog>
Or at a monster. Etc.
02:52
<@ToxicFrog>
?
02:52
<@McMartin>
Don't forget the optional ${decoration:in_the_faaaaaaace} interpolation!
02:53
<@ToxicFrog>
if config.in_the_face is set, it just modifies the entry in the string table.
02:53
<@McMartin>
Or is that just rewriting en.STAB?
02:53
<@McMartin>
Ah
02:53
<@ToxicFrog>
And that's only for "stabs" anyways.
02:54
<@McMartin>
True
02:54
<@McMartin>
(That reminds me, I never did tell you about precedence_read())
02:54
<@ToxicFrog>
(do tell)
02:54 Reiver is now known as ReivOut
02:54
<@McMartin>
precedence_read takes two arguments (well, three): A reader and a list of operators (and a constructor that is generally unimportant for the trick.)
02:55
<@McMartin>
It calls the reader to get the first term. Then, as long as the next token is one of the operators, it eats the operator and then calls the reader again.
02:55
<@McMartin>
(And then when it can't, it takes this term-op-term-op-term list and processes it, but this is the identity function for me, really)
02:55
<@McMartin>
So.
02:56
<@McMartin>
parse_expr() = precedence_read (parse_term, ['+', '-'])
02:56
<@McMartin>
parse_term() = precedence_read (parse_primal, ['*', '/', '%'])
02:56
<@ToxicFrog>
Hang on. "as long as the next token is" - is this postfix notation? Infix?
02:56
<@McMartin>
Infix.
02:56
<@McMartin>
And then parse_primal is integers, variables, or ( expr ).
02:56
<@ToxicFrog>
Because that implies that something like "a + + b" is legal.
02:57
<@McMartin>
No, because after eating the first + you call parse_term().
02:57
<@ToxicFrog>
Right, which returns another +
02:57
<@McMartin>
No, parse_term starts by calling its reader, which is parseprimal.
02:57
<@McMartin>
Which wants INT, VAR, or (.
02:57
<@ToxicFrog>
Or does the reader /only/ lex terms, not operators?
02:57
<@McMartin>
And doesn't find that, finding the second +, which makes it angry.
02:57
<@McMartin>
Uh, that depends.
02:58
<@McMartin>
If you call 2*3+4*5-2, parse_term() will be called three times, returning 2*3, 4*5, and 2.
02:58
<@ToxicFrog>
Aah.
02:58
<@McMartin>
parse_primal is not implemented in terms of precedence_read.
02:59
<@McMartin>
And it has everything that would be in EXPR's FIRST set.
02:59
<@ToxicFrog>
Ok, I think I see how this works.
02:59
<@McMartin>
There are, naturally, generally more than two levels here.
02:59
<@ToxicFrog>
Yes.
02:59
<@McMartin>
A Javascript expression parser would require something like 17.
03:00
<@McMartin>
As would C.
03:00
<@McMartin>
Pascal turns out to only need four.
03:00
<@ToxicFrog>
Fundamentally it's just recursive-descent, I think.
03:00
<@McMartin>
Yes, with the boring bits abstracted away.
03:00
<@McMartin>
The part that makes it more entertaining than your standard recursive-descent or even YACC approach is that you get trees with N children, not two.
03:01
<@McMartin>
This makes compiling to an accumulator-based architecture (like, um, the 6502) much more straightforward.
03:01
<@ToxicFrog>
...I wasn't aware that was particularly noteworthy.
03:01
<@McMartin>
C-based compilers typically have AddExpr only have two children, and you chain them to get the full list.
03:01
<@ToxicFrog>
Or do you mean that, say, 1+2+3 is a single + node with three children?
03:02
<@ToxicFrog>
Spicy.
03:02
<@McMartin>
1+2+3-4+5-6 is a single LAssocExpr node with 11 children.
03:02
<@ToxicFrog>
Aah.
03:02
<@McMartin>
(And will compile to a Rather Long chunk of 16-bit math that nevertheless only uses one variable.)
03:03
<@ToxicFrog>
Ok. That's cool.
03:04
<@McMartin>
I haven't totally minimized register use: in particular, x = a + b puts a + b in a tempvar before assigning that to x -- but to not do that, I need to prove that x itself isn't read at evaluation time.
03:04
<@McMartin>
Which is Work (tm), and saves a whole two bytes of RAM if I do it.
03:05 * ToxicFrog nods
03:06 The-Librarian [~user@Nightstar-22137.fmtc.com] has quit [Ping Timeout]
03:07
<@McMartin>
And now, dinnar
03:10
< Janus>
How does one tell if they're using swap space..?
03:11
<@ToxicFrog>
top(1)
03:11
<@ToxicFrog>
If you're on a windows system ask the task manager.
03:12
<@ToxicFrog>
(a windows system without top, that is)
03:12
<@ToxicFrog>
...hmm. Actually, I can't find any useful swap info in the task manager.
03:12
< Janus>
How much can swap space take? I'm around 300 MB over the actual memory, and the 'puter's doing some /strange/ things.
03:13
<@ToxicFrog>
In theory, it can take up to the lower of either your hard drive space or your architecture's addressable memory.
03:13
<@ToxicFrog>
In practice I have no idea what the limitations of windows' swap system are.
03:14
<@ToxicFrog>
Hmm. Ok, top on windows will report memory stats for the whole system, but only lists Cygwin processes.
03:14
<@ToxicFrog>
Cpu(s): 0.5% user, 3.8% system, 0.0% nice, 95.7% idle
03:14
<@ToxicFrog>
Mem: 1047276k total, 398004k used, 649272k free, 0k buffers
03:14
<@ToxicFrog>
Swap: 1572864k total, 109800k used, 1463064k free, 0k cached
03:18 Clairvoire [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #Code
03:19 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Killed (NickServ (GHOST command used by Clairvoire))]
03:19 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #Code
03:20 * Clairvoire didn't kill it hard enough(?)
03:20 Clairvoire [~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.]
03:25
<@ToxicFrog>
Ok, let's see here.
03:26
<@ToxicFrog>
I think what we actually need are key-value pairs, not just arguments.
03:26
<@ToxicFrog>
Fortunately, the code already does this automatically.
03:27
<@ToxicFrog>
The key is what the string interpolation uses. The value is either a constant, or an index into the language table.
03:28
<@ToxicFrog>
So now, CAST_SPELL is [[${caster} casts ${spell} (with ${handedness}) on ${target}]]
03:29 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.]
03:30
<@ToxicFrog>
And the message itself might be Message|text/CAST_SPELL|caster=PlayerName|spell/SPELL_SHIELD|target/PlayerName,P ronounGtstSelf|
03:30
<@ToxicFrog>
For everyone else and
03:31
<@ToxicFrog>
Message|text/CAST_SPELL|caster/PlayerName,PronounYou|spell/SPELL_SHIELD|target/P layerName,PronounYourself|
03:32
<@ToxicFrog>
Of the messages, the only ones that actually need to worry about this are Message, Question, Wait, and Deny.
03:32
<@ToxicFrog>
Err. Text. Message is the superclass.
03:42
<@ToxicFrog>
Hmm. Lua doesn't have setenv.
03:45
<@ToxicFrog>
Ok, I see how to not only do this, but do it in a sufficiently general manner that you could install a language for "graphical representation" and it would Just Work.
03:45
<@McMartin>
Falcon's Eye Spellcast?
03:46
<@ToxicFrog>
Precisely.
03:46
<@ToxicFrog>
Basically:
03:46
<@ToxicFrog>
- the deserializer is smart enough to determine whether a given field contains a number, a boolean, a string literal or a language table index
03:47
<@ToxicFrog>
- messages that need to display stuff call lcInterpolateMessage or something on their payload:
03:47
<@ToxicFrog>
- if the entry in the language table is a string, it does standard string interpolation
03:48
<@ToxicFrog>
- if it's a function, it calls it with the payload as the sole argument
03:48
<@ToxicFrog>
Thus, for en, CAST_SPELL is as above.
03:49
<@ToxicFrog>
For falcons, it's a function that looks at payload.spell, payload.caster, and payload.target to determine what to display.
03:50 * McMartin nods
03:51 * McMartin uploads his Pascal compiler, so far, along with test programs and resulting binaries.
03:51
<@McMartin>
http://www.stanford.edu/~mcmartin/pyscal/
03:51
<@ToxicFrog>
And the string interpolation supports both string literals (caster=PlayerName), nested interpolations (spell=SPELL_SHIELD), and some simple functions (caster=LC_PRONOUN_YOU:PlayerName or however I decide to notate it)
03:52
<@ToxicFrog>
Probably I'll need functions for "you", "yourself", "you", "gtst", "gtstself", and "gtst's"
03:53
<@McMartin>
gtst?
03:54
<@ToxicFrog>
Polite gender-neutral form of "it".
03:54
<@ToxicFrog>
gtst's would be "his", "hers", etc.
03:54
<@ToxicFrog>
Although Spellcast uses "it", so I should probably use that.
03:55
<@McMartin>
Or "hir" for "indescribable"~
03:55
<@ToxicFrog>
That's for "other"
03:55
<@ToxicFrog>
And spellcast does indeed use it.
03:55
<@McMartin>
Indeed, hence why I brought it up.
03:55
<@ToxicFrog>
Hmm. Actually, it uses it for "neuter", which I don't think is right.
03:56
<@ToxicFrog>
"Gtst" is "this gender is either unknown or has no polite mapping into my language"
03:56
<@ToxicFrog>
Aanyways.
03:57
<@ToxicFrog>
Spellcast has pro_himself, pro_his, pro_him, and pro_he.
03:57
<@ToxicFrog>
We will also need "you" and "yourself".
03:58
<@McMartin>
Can the language mapper define it's own?
03:58
<@ToxicFrog>
I think these can actually be indexes into the language table rather than functions, since the client knows which player owns it and can thus choose an appropriate pronoun if the language has gender-specific versions of "you" or something.
03:58
<@McMartin>
German will need one more.
03:58
<@ToxicFrog>
...what for?
03:58
<@McMartin>
The Dative.
03:58
<@ToxicFrog>
I mean, you can define whatever language entries you want, but you can't make the server /use/ them.
03:58
<@ToxicFrog>
Example?
03:59
<@McMartin>
English has Genitive (his), Nominative (he), and Accusative (him), but not Dative.
03:59
<@McMartin>
I think Dative is "indirect-object version of him", but it's been too long since I've looked at German grammar.
03:59
<@ToxicFrog>
Yes. I mean, what messages in spellcast would require this?
03:59
<@McMartin>
Why does the Server have to care?
04:00
<@ToxicFrog>
The server is the one putting together things that aren't UI messages.
04:00
<@McMartin>
Aren't all declensions only of interest to the UI?
04:00
<@ToxicFrog>
I mean, it doesn't build the final string, but it selects which messages will be displayed.
04:00
<@ToxicFrog>
Argh. How do I put this.
04:01
<@ToxicFrog>
For UI messages, I mean things that aren't actually part of the game world, like the about box or "connection to server lost" error message.
04:02
<@ToxicFrog>
The UI just gets raw events for those and handles them however it likes.
04:02
<@McMartin>
OK, I was convinced that inworld things were also raw events.
04:02
<@McMartin>
From your spec above.
04:02
<@ToxicFrog>
For stuff in the game, the UI gets a message from the server telling it what entry in the language table to use and what substitutions to make.
04:02
<@ToxicFrog>
For some things like status updates, yes, it's raw events.
04:03
<@ToxicFrog>
For anything that appears in the text box, it's a language table index + substitution table.
04:04
<@ToxicFrog>
So, for example, if you cast shield on yourself, the client will see CAST_SPELL,caster=PRO_YOU,castee=PRO_YOURSELF,spell=SPELL_SHIELD
04:04
<@McMartin>
Yeah. I think I'm seeing the translation from PRO_YOU to "you" or "yourself" being done by the interpolator.
04:04
<@ToxicFrog>
The client does not actually have any conception that what's happening is that the player has succeeded in casting a spell on gtstself and is now shielded for the rest of the turn.
04:05
<@ToxicFrog>
It just knows that it needs to feed this to the interpolater to get a string, and then display that string to the user.
04:05
<@ToxicFrog>
Yes. It is.
04:05
<@McMartin>
Then why not just have caster=PRO_YOU and castee be PRO_YOU?
04:05
<@ToxicFrog>
"You cast Shield (with the left hand) at you."
04:06
<@McMartin>
No, see
04:06
<@ToxicFrog>
"You cast Shield (with the left hand) at yourself."
04:06
<@ToxicFrog>
My point, however, is that say you define a new type of pronoun - say the dative. The server will never tell you to interpolate that pronoun.
04:07
<@McMartin>
That puts you right back in Format String Constraints territory.
04:07
<@McMartin>
My german is bad.
04:07
<@ToxicFrog>
Format String Constraints?
04:07
<@McMartin>
But let us state for the sake of argument that when stabbing someone, you use the accusative
04:07
<@ToxicFrog>
Now, remember, when writing the language table, you can supply a function rather than a string.
04:07
<@McMartin>
But when shooting a fireball at them, you use the dative
04:07
<@ToxicFrog>
If you need to do something special.
04:07
<@McMartin>
I'm mainly not seeing why all languages shouldn't just do that.
04:08
<@ToxicFrog>
...just do what?
04:08
<@McMartin>
The server simply names targets, and the phrasing file decides whether PRO_YOU is "you" or "your" or "yourself" depending on the kind of interpolation.
04:08
<@McMartin>
In particular, I shouldn't have to be handed "YOUR" every time my phrasing puts in a possessive where the default does not.
04:08
<@ToxicFrog>
"the kind of interpolation"?
04:09
<@ToxicFrog>
And, expand that sentence please?
04:09
<@ToxicFrog>
I can't seem to parse it.
04:09
<@McMartin>
"{CASTER:NOMINATIVE} eyes {TARGET:NAME}, then stabs {TARGET:DIRECT_OBJECT_PRONOUN} with {CASTER:POSSESSIVE}'s sharp pointy knife."
04:10
<@McMartin>
Er, -'s
04:10
<@ToxicFrog>
Umm.
04:10
<@McMartin>
This is assuming the default is "{CASTER} stabs {TARGET}."
04:11
<@ToxicFrog>
Ok, first of all, what do you mean by "the default"?
04:11
<@ToxicFrog>
English?
04:11
<@McMartin>
The specific English strings you ship with.
04:11
<@ToxicFrog>
Ok.
04:11
<@ToxicFrog>
And it seems what you're asking is "why can't the language table also install new interpolation functions"
04:11
<@McMartin>
I'm using an alternate English phrasing as the "translation"
04:11
<@ToxicFrog>
And the answer is, it can.
04:11
<@McMartin>
So my question is now "Why bother the server with more than one case"
04:12
<@ToxicFrog>
So, hang on, let me get this straight.
04:12
<@ToxicFrog>
The server now sends:
04:12
<@ToxicFrog>
Text|CAST_SPELL|caster=PlayerName|castee=PlayerName|spell=SPELL_SHIELD
04:12
<@McMartin>
Right.
04:12
<@McMartin>
Actually, it can send that to everybody.
04:12
<@ToxicFrog>
And the interpolator then determines whether the caster is "PlayerName", "You", "Je", etc.
04:12
<@ToxicFrog>
Yes. That's what I meant.
04:13
<@McMartin>
Assuming the caster is not invisible, of course.
04:13
<@ToxicFrog>
Yeah. We have various things to deal with timestop, invisibility, etc.
04:13
<@ToxicFrog>
Or will once I implement them, anyways.
04:13
<@McMartin>
But essentially, given an event like that, the client can work out whether it should use the "You cast" message or the "So and so smites you" or the "Two other guys smite each other while you watch", or whatever.
04:13
<@ToxicFrog>
(and I keep forgetting handedness in the argument list. Oops.)
04:14
<@McMartin>
(Whatever)
04:14
<@ToxicFrog>
This does make the interpolation logic more tortured, though.
04:15
<@McMartin>
Not that much. It's a bit of preprocessing that was formerly done on the server, for what you ship.
04:15
<@McMartin>
Everything else is the translator's lookout.
04:15
<@ToxicFrog>
Well, no, unless you install it in the language table rather than in the interpolator proper.
04:16 * McMartin was thinking a little of both.
04:16
<@ToxicFrog>
That is to say, rather than a string, CAST_SPELL is now a function that compares caster, castee, and the player owning this client and based on that determines whether to use PRO_NAME, PRO_YOU, PRO_YOURSELF, or PRO_GTSTSELF for each field.
04:17
<@McMartin>
For English, the interpolation names would be GTST, GTST'S, GTSTSELF, and GTSTM
04:17
<@ToxicFrog>
GTSTM?
04:17
<@McMartin>
"him"
04:17
<@McMartin>
Whatever the GTST version of "him" is.
04:18
<@ToxicFrog>
"gtst"
04:18
<@McMartin>
... so what's "he"?
04:18
<@McMartin>
Even English has to distinguish "He" and "Him".
04:19
<@ToxicFrog>
Yes, but why? "Gtst can eat broken glass. It doesn't hurt gtst" is perfectly readable.
04:19
<@ToxicFrog>
Whereas in english it's "He can eat broken glass. It doesn't hurt him."
04:19
<@McMartin>
That's all well and good, but "He" and "She" are gender options in Spellcast, so the interpolator better be able to distinguish them.
04:19
<@McMartin>
Or rather, distinguish cases where it becomes "he" and where it becomes "him"
04:20
<@McMartin>
Even if both strings map to "gtst".
04:20
<@ToxicFrog>
Yes, it can.
04:20 * McMartin was attempting to name all the interpolation qualifiers necessary for English.
04:21
<@ToxicFrog>
This is why spellcast used he/him/his/himself to name the pronoun selector functions.
04:21
<@McMartin>
And actually, you don't even need GTSTSELF, because you can actually have the string be {GTST'S}SELF.
04:21
<@ToxicFrog>
Only if the language works like that.
04:21
<@McMartin>
English does, and this is all hanging out in the English language/interpolation section, yes?
04:22
<@McMartin>
Each language gets to define its own interpolation constants here, because only that language knows what's even necessary.
04:22
<@ToxicFrog>
True.
04:22
<@McMartin>
That's the whole advantage of this approach, which is why I was advocating it~
04:23
<@ToxicFrog>
Hmm. I think the correct approach here is to allow each language to provide its own interpolator as well as per-message functions.
04:23
<@McMartin>
Oh, right, you're OO~
04:24
<@McMartin>
Most text-based clients will be able to use the base interpolator as long as the language is remotely like English.
04:24
<@ToxicFrog>
So, for example, the english one can treat ${subject} and ${object} specially and fill them in with name, or gtstself, or yourself, or you, or whatever appropriately.
04:24
<@McMartin>
Finnish might havee issues.
04:24
<@ToxicFrog>
Well, the "base interpolator" does not actually support english.
04:24
<@McMartin>
(The English one specifically may also need to distinguish between "Use a proper name" and "Use a pronoun")
04:24
<@ToxicFrog>
Unless you have practically every message as a function in its own right.
04:25
<@McMartin>
Which Finnish would probably need.
04:25
<@McMartin>
Leeging agglutinative grammars.
04:25
<@ToxicFrog>
(and being OO is not a prerequisite to installing your own interpolator.)
04:26
<@ToxicFrog>
As for use a proper name vs use a pronoun...perhaps.
04:27
<@ToxicFrog>
...
04:28
<@ToxicFrog>
The sprintf format for cast_spell: "%s casts %s%s (%s) %s"
04:29
<@McMartin>
CASTER casts SPELL[???] (HANDEDNESS) (TARGET)
04:29
<@McMartin>
What's the %s%s bit?
04:29
<@ToxicFrog>
caster, permanent?"Permanent ":"", spell, handedness, target
04:29 * McMartin casts Permanent Magic Mirror on himself!
04:30
<@ToxicFrog>
Target is %s rather than "at %s" because it might be "up into the air" or "over the battlefield" or the like.
04:30
<@McMartin>
Indeed
04:30
<@ToxicFrog>
Yeah, CAST_SPELL is definitely going to have to be a function.
04:31
<@ToxicFrog>
For most of it, though, I think that I can get away with an interpolator that understands subject/object and some pronoun selectors.
04:32
<@ToxicFrog>
The general rule, I think, is: if player == subject == object, subject is "you", object is "yourself", subject's and object's are "yours", etc.
04:32 * McMartin nods
04:33
<@McMartin>
Likeways, if player != subject == object, you haul out the "himself" et als.
04:33
<@ToxicFrog>
If player != subject and subject == object, object is PRONOUN_ONESELF
04:33
<@ToxicFrog>
Yes.
04:33
<@ToxicFrog>
This should suffice for the vast majority of english strings.
04:33
<@McMartin>
Quite.
04:33
<@ToxicFrog>
For the more complicated ones, we provide functions.
04:37
<@ToxicFrog>
Ok. I think this sorts it out.
04:41
<@McMartin>
I think it's time for me to stop messing around with Pascal and go back to writing up demos of my program analysis in java.
04:51 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #Code
05:00
< Janus>
"There's a program that turns a Maya binary into a ready-to-use .cpp file." he saids, brushing back a tear.
05:00 ChalcyNap is now known as ChalcyOut
05:16 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: 1']
05:23 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
05:23 mode/#code [+o Chalcy] by ChanServ
05:24 ChalcyOut [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
06:07 ReivOut is now known as Reiver
06:28 AnnoDomini [~fark.off@Nightstar-29088.neoplus.adsl.tpnet.pl] has joined #Code
06:33 TakyojiClone2 [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has joined #code
06:33 TakyojiClone2 is now known as Takyoji
06:35 TakyojiClone [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has quit [Ping Timeout]
07:31 TakyojiClone [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has joined #code
07:33 Takyoji [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has quit [Ping Timeout]
07:34 TakyojiClone2 [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has joined #code
07:36 TakyojiClone [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has quit [Ping Timeout]
07:50 TakyojiClone [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has joined #code
07:52 TakyojiClone2 [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has quit [Ping Timeout]
08:13 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
08:14 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
08:14 mode/#code [+o Chalcedon] by ChanServ
08:16 TakyojiClone2 [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has joined #code
08:18 TakyojiClone [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has quit [Ping Timeout]
08:56 ReivSLEP [~reaverta@IRCop.Nightstar.Net] has joined #Code
08:57 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
08:57 mode/#code [+o Chalcy] by ChanServ
08:57 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Killed (NickServ (GHOST command used by Chalcy))]
08:58 Chalcy is now known as Chalcedon
08:58 Reiver [~reaverta@IRCop.Nightstar.Net] has quit [Ping Timeout]
09:00 ReivSLEP is now known as Reiver
09:02 Chalcedon is now known as ChalcyZzz
09:08 ChalcyZzz [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
09:09 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
09:09 mode/#code [+o Chalcedon] by ChanServ
09:13 Chalcedon is now known as ChalcyZzz
09:36 You're now known as TheWatcher[wr0k]
09:42 TakyojiClone2 [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has quit [Quit: Leaving]
10:51 Takyoji [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has joined #code
10:51
< Takyoji>
4:51AM and still awake
10:52
< Ev3>
The clock, according to my computer, is currently 11:51:34 (ST+0)
10:53
< Takyoji>
11:51AM there?
10:53
< Takyoji>
ah
10:56 Ev3 [~-@87.72.36.ns-26407] has quit [Quit: Don't try to read the quit message, that is impossible. Instead only realize the thruth; "there is no quit message" and you will see it is not you who read the quit message but the quit message who reads you.]
10:58
< Takyoji>
xD
10:58
< Takyoji>
yay for the matrix
11:01 Ev3 [~-@87.72.36.ns-26407] has joined #Code
11:21 Stephenie [Safyra@Nightstar-25904.ok.ok.cox.net] has quit [Quit: ]
11:22 Thaqui is now known as ThaquiSleep
11:34 ThaquiSleep [~Thaqui@124.197.36.ns-12825] has quit [Client exited]
12:26 You're now known as TheWatcher[afk]
12:31 Takyoji [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has quit [Quit: Leaving]
12:48 AnnoDomini [~fark.off@Nightstar-29088.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
12:54 AnnoDomini [~fark.off@Nightstar-29172.neoplus.adsl.tpnet.pl] has joined #Code
13:12 MyCatOwnz [~rb6822@Nightstar-23831.cs.bris.ac.uk] has joined #code
13:31
< MyCatOwnz>
Holy poop. Postscript's arrays have no typing at all.
13:40 You're now known as TheWatcher[wr0k]
13:48 ChalcyZzz [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
13:48 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
13:49 mode/#code [+o Chalcedon] by ChanServ
14:33
<@ToxicFrog>
MCO: Indeed.
14:33
<@ToxicFrog>
You can use them as structs if you're sufficiently insane~
14:38
< Reiver>
http://reaverta.livejournal.com/21126.html
15:25 * ToxicFrog arghs and tries to clearly differentiate between sockets, clients and players
15:32
<@ToxicFrog>
Ok.
15:33
<@ToxicFrog>
The Client object contains the socket, methods for sending and recieving messages and testing readiness, and some state for rejecting out-of-sequence messages and similar.
15:33
<@ToxicFrog>
Given a socket you can easily turn it into a client.
15:36
< MyCatOwnz>
ToxicFrog: I presume they can be nested, too? =)
15:36
<@ToxicFrog>
Probably, but why?
15:37 You're now known as TheWatcher
15:37
< MyCatOwnz>
All good things must be abused.
15:38
<@ToxicFrog>
I mean, yes, three extra lines each in Client::Send() and Client::Recv() and you can nest them, I just don't see the point.
15:40
< MyCatOwnz>
Trees, perhaps?
15:41
<@ToxicFrog>
...you aren't answering the question.
15:41
<@ToxicFrog>
Why would you want to make a tree of clients?
15:41
<@ToxicFrog>
Why would you want to nest one client inside another?
15:41
<@ToxicFrog>
What benefit does it confer?
15:42
< MyCatOwnz>
Oh, whoopsy. I was referring to Postscript arrays.
15:42
<@ToxicFrog>
Oh. Yes. They can be nested.
15:43
<@ToxicFrog>
And for that matter you can implement cons, car and cdr in terms of postscript arrays, and with those you can make anything
15:50 MyCatOwnz [~rb6822@Nightstar-23831.cs.bris.ac.uk] has quit [Quit: Swim, swim, hungry!]
15:58 Reiver [~reaverta@IRCop.Nightstar.Net] has quit [Quit: Changing servers]
15:59 Reiver [~reaverta@IRCop.Nightstar.Net] has joined #Code
15:59 mode/#code [+o Reiver] by ChanServ
16:12 Reiver is now known as ReivZzz
16:44 SouthernMyst [~SouthernM@74.193.191.ns-11809] has joined #Code
16:47 ReivZzz is now known as ReivSLEP
17:22 You're now known as TheWatcher[afk]
18:56 Raif [~corvusign@Admin.Nightstar.Net] has quit [Killed (NickServ (GHOST command used by Raif_))]
18:56 Raif_ [~corvusign@Nightstar-7176.hsd1.wa.comcast.net] has joined #Code
18:56 Raif_ is now known as Raif
18:56 You're now known as TheWatcher
18:56 Raif [~corvusign@Nightstar-7176.hsd1.wa.comcast.net] has quit [Killed (NickServ (GHOST command used by Raif_))]
18:56 Raif_ [~corvusign@Nightstar-7176.hsd1.wa.comcast.net] has joined #Code
18:56 Raif_ is now known as Raif
18:57 Raif [~corvusign@Nightstar-7176.hsd1.wa.comcast.net] has quit [Killed (NickServ (GHOST command used by Raif_))]
18:57 Raif_ [~corvusign@Nightstar-7918.hsd1.mn.comcast.net] has joined #Code
18:57 Raif_ is now known as Raif
18:58 Raif [~corvusign@Nightstar-7918.hsd1.mn.comcast.net] has quit [Killed (NickServ (GHOST command used by Raif_))]
18:58 Raif_ [~corvusign@Nightstar-7918.hsd1.mn.comcast.net] has joined #Code
18:58 Raif_ is now known as Raif
18:58 Raif [~corvusign@Nightstar-7918.hsd1.mn.comcast.net] has quit [Killed (NickServ (GHOST command used by Raif_))]
18:58 Raif_ [~corvusign@Nightstar-7918.hsd1.mn.comcast.net] has joined #Code
18:59 Raif_ is now known as Raif
19:05 Syloqs-AFH [Syloq@Admin.Nightstar.Net] has quit [Connection reset by peer]
19:45
<@ToxicFrog>
Hmm. Is translating a message structure into a localized, displayable string the message's job, or the UI's?
19:45
<@ToxicFrog>
I /suspect/ it's the UI's.
19:55
<@ToxicFrog>
So Message.Text::Process() just calls yield(self) and lets the UI handle it.
20:15 MyCatOwnz [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code
21:21 EvilDarkLord [althalas@Nightstar-17046.a80-186-184-83.elisa-laajakaista.fi] has quit [Ping Timeout]
21:30 EvilDarkLord [althalas@Nightstar-17046.a80-186-184-83.elisa-laajakaista.fi] has joined #code
21:33 EvilDarkLord is now known as EvilSLEPLord
21:38 EvilSLEPLord [althalas@Nightstar-17046.a80-186-184-83.elisa-laajakaista.fi] has quit [Ping Timeout]
21:39 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #Code
21:47
< Janus>
May I ask a turkey related question?
21:48
< Janus>
*non
21:49
<@ToxicFrog>
?
21:50
< Janus>
With torrents, (my knowledge is quite limited on the subject), what happens when someone tries to upload something from my drive..?
21:50
<@ToxicFrog>
Your question is either badly phrased or does not apply to bittorrent.
21:52
<@ToxicFrog>
If you mean "what happens when a peer requests a fragment from a torrent that I am currently downloading or seeding", the answer is generally "your client uploads it to them, subject to client-side bandwidth constraints, inter-client transfer negotiation, and the like"
21:52
< Janus>
Erm... alright, rephrasing, where exactly do the files from downloading with a bittorrent come from?
21:52 EvilSLEPLord [althalas@Nightstar-17046.a80-186-184-83.elisa-laajakaista.fi] has joined #code
21:53
< Janus>
Ah.
21:53
<@ToxicFrog>
They come from everyone else who is currently downloading or seeding that particular torrent.
21:55
<@ToxicFrog>
To clear up some common misconceptions: data will only be uploaded /from torrents that you are currently downloading or seeding/. Torrents that you have stopped, that you haven't started downloading yet, etc, and non-torrent data, is not visible to the tracker or to other bittorrent peers.
21:55
< Janus>
Finally... this is safe on my part, right..? [/paranoia]
21:56
<@ToxicFrog>
Depends on how paranoid you are.
21:56
<@ToxicFrog>
I consider it safe.
21:56 * Janus is Homeland Security Paranoid.
21:56
<@ToxicFrog>
So...incompetently paranoid about all the wrong things?
21:57
< Janus>
That sounds about right.
21:57
<@TheWatcher>
Although, given that obtaining a list of IP addresses currently using or seeding a torrent is actually part of what bittorrent does, if you don't want people ot know someone at your ip address is accessing the torrent, don't use it.
21:58
< Janus>
I can't think of anything bad that could stem from knowing an IP address by itself... right?
21:59
<@TheWatcher>
Again, depends how paranoid you are.
21:59
<@ToxicFrog>
Janus: well, if it's an unfirewalled windows box...
22:00 * Janus ponders the three folks tapping his Maya.
22:01
< Janus>
Firewall, what's that?
22:03
<@TheWatcher>
...
22:03
<@ToxicFrog>
...
22:06
< Janus>
Now, there's a firewall on here somewhere... I just can't, uh, seem to find it.
22:07
< Janus>
There it is, Windows Security Center, with firewall turned on... now.
22:07
<@ToxicFrog>
...and you aren't behind a seperate firewall or router/firewall?
22:08
< Janus>
There's a need for more than one..?
22:09
<@TheWatcher>
I'm behind three ¬¬
22:09
<@ToxicFrog>
Janus: sometimes. But my point is, you may be behind one already.
22:09
<@ToxicFrog>
What's your network topology?
22:11
< Janus>
Well... (huh?), there's this computer, my folk's computer, and both of which are connected to the cable router. (if that's what you were asking, of course.)
22:12
<@TheWatcher>
Ah, the cable router probably has a NATing firewall on it. At least, I'd hope so
22:14
<@ToxicFrog>
Most such things do.
22:15
< Janus>
All I know is that it's one of those boxes with the green/red lights on it. Sorry for the utter ignorance, by the way, I'll be sure to study the matter soon.
22:23
<@ToxicFrog>
Hmm. McM is right. I'm going to redo the message system as an event system.
22:27 AnnoDomini [~fark.off@Nightstar-29172.neoplus.adsl.tpnet.pl] has quit [Quit: Some people find sanity a little confining.]
22:32 Janus is now known as Jan[Maginot]
22:44 Thaqui [~Thaqui@124.197.36.ns-12825] has joined #code
23:38 You're now known as TheWatcher[T-2]
23:42 You're now known as TheWatcher[afk]
23:42 You're now known as TheWatcher[zZzZ]
--- Log closed Fri Nov 24 00:00:12 2006
code logs -> 2006 -> Thu, 23 Nov 2006< code.20061122.log - code.20061124.log >