code logs -> 2013 -> Tue, 29 Jan 2013< code.20130128.log - code.20130130.log >
--- Log opened Tue Jan 29 00:00:56 2013
00:11 Orthia [orthianz@3CF3A5.E1CD01.5A78C0.03128C] has quit [Ping timeout: 121 seconds]
00:16 Orthia [orthianz@3CF3A5.E1CD01.5A78C0.03128C] has joined #code
00:16 mode/#code [+o Orthia] by ChanServ
00:19 himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code
00:19 mode/#code [+o himi] by ChanServ
00:23 Attilla [Obsolete@Nightstar-9e7fa2b2.range86-162.btcentralplus.com] has quit [Ping timeout: 121 seconds]
00:24 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
00:24 mode/#code [+qo Vornicus Vornicus] by ChanServ
00:43 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds]
00:44 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
00:44 mode/#code [+ao Derakon Derakon] by ChanServ
00:47 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [Client closed the connection]
00:47 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
00:53 You're now known as TheWatcher[t-2]
00:53 syksleep is now known as Syk
00:56 You're now known as TheWatcher[zZzZ]
01:38
<&McMartin>
"OK. I'll have a look and check it out with my AIM65 SBC equipped with a Rockwell R65C02."
01:38
<&McMartin>
\o/
01:38
<&McMartin>
Having insane testers is the best
01:56 Orthia [orthianz@3CF3A5.E1CD01.5A78C0.03128C] has quit [Ping timeout: 121 seconds]
02:14 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds]
02:14 Derakon_ [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
02:14 Derakon_ is now known as Derakon
02:14 mode/#code [+ao Derakon Derakon] by ChanServ
02:44 Kindamoody[zZz] is now known as Kindamoody
03:06 Orthia [orthianz@3CF3A5.E1CD01.5A78C0.03128C] has joined #code
03:06 mode/#code [+o Orthia] by ChanServ
03:59 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
05:25 Kindamoody is now known as Kindamoody|out
05:32 * Vornicus finishes defuxxoring his permuter.
05:38 himi [fow035@D741F1.243F35.CADC30.81D435] has quit [Ping timeout: 121 seconds]
06:15 Derakon is now known as Derakon[AFK]
06:17 ErikMesoy|sleep is now known as ErikMesoy
06:51 Attilla [Obsolete@Nightstar-9e7fa2b2.range86-162.btcentralplus.com] has joined #code
07:26
<@simon`>
hmm...
07:27
<@simon`>
if one should use brainfuck as the target language in a compiler, would it be a bad idea to use cells as registers and simply keep track of the "current cell" during compile time? i.e. whenever something has been compiled, return the brainfuck code and the index of the current cell.
07:30 thalass is now known as Thalass|afk
07:30
<~Vornicus>
"if one should use brainfuck as the target language in a compiler, would it be a bad idea" yes.
07:32
<@simon`>
ah, come on ;-)
09:30 You're now known as TheWatcher
09:47 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
09:47 mode/#code [+o himi] by ChanServ
10:13 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
10:16 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
10:16 mode/#code [+o himi] by ChanServ
10:18 RichyB [richardb@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
10:53 Orthia [orthianz@3CF3A5.E1CD01.5A78C0.03128C] has quit [Ping timeout: 121 seconds]
10:58 Orthia [orthianz@3CF3A5.E1CD01.5A78C0.03128C] has joined #code
10:58 mode/#code [+o Orthia] by ChanServ
11:00 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
11:13 Nemu_ [NeophoxProd@Nightstar-c58376f0.asahi-net.or.jp] has quit [Connection reset by peer]
11:14 Nemu [NeophoxProd@Nightstar-4060a4fe.asahi-net.or.jp] has joined #code
11:21 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
11:35 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
11:35 mode/#code [+o himi] by ChanServ
13:48 RichyB [richardb@Nightstar-3b2c2db2.bethere.co.uk] has quit [[NS] Quit: >:3 This is BunThulhu. Copy him into your quit message to help him take over the Internet.]
14:08 Syk is now known as syksleep
15:08 RichyB [richardb@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
15:54 Attilla [Obsolete@Nightstar-9e7fa2b2.range86-162.btcentralplus.com] has quit [Ping timeout: 121 seconds]
16:00
<&ToxicFrog>
Hmm. I think I need to rethink how key-repeat is handled.
16:01
<&ToxicFrog>
Previously, you just called setRepeat(key, delay, period) and passed it a keysym. Now, however, I want to bind it to generic events, not just keys.
16:02
<&ToxicFrog>
So setRepeat("up", 1.0, 0.2) would enable repetition on all controls bound to "up"
16:04
< RichyB>
I don't suppose anyone knows any *good* books on Javascript, please?
16:04
< RichyB>
I have a newbie dev working with me who's just written the 3rd ugliest piece of JS that I have ever seen.
16:04
< RichyB>
I'd buy him a copy of Crockford's book, but I don't want to accidentally give him religion.
16:08 Attilla [Obsolete@Nightstar-9e7fa2b2.range86-162.btcentralplus.com] has joined #code
16:09
<@TheWatcher>
... you can learn javascript from books?~
16:09
<@TheWatcher>
(more seriously, no idea I'm afraid)
16:09
< RichyB>
Well, I didn't, but I assume that it's the quick way.
16:17
<@Azash>
RichyB: Javascript, the Good Parts
16:17
<@Azash>
(the book is really called that)
16:17
<@TheWatcher>
Please tell me it has :watman: on the front~
16:18
<@TheWatcher>
(https://www.destroyallsoftware.com/talks/wat in case you don't get the ref)
16:41 Attilla [Obsolete@Nightstar-9e7fa2b2.range86-162.btcentralplus.com] has quit [[NS] Quit: ]
16:44
<@Tarinaky>
I'm having issues with my java class path, again...
16:44
<@Tarinaky>
When I try to instantiate an object from a library it throws a Linker Exception NoClassDefFoundError.
16:45
<@Tarinaky>
But Eclipse says the Library is in the class path.
16:45
<@Tarinaky>
Both for the project, and the run configuration...
16:45
<@Tarinaky>
And the static code analysis can find it.
16:46 Thalass|afk is now known as Thalasleep
16:48
<@Tarinaky>
See also: "Why is Java so crap?"
16:56 ErikMesoy is now known as Harrower
16:58 Attilla [Attilla@Nightstar-9e7fa2b2.range86-162.btcentralplus.com] has joined #code
17:10
<@Tarinaky>
I'd try it on the command line but I can't for the life of me remember what hellish invocation you need for junit.
17:13
<&ToxicFrog>
Ok, so.
17:13
<&ToxicFrog>
Right now I have a big hairy input handling infrastructure that translates key and joystick events into one or more named input events.
17:14
<&ToxicFrog>
Eg, pressing J1,2 generates joy_1_button_2, joy_1_button_*, and joy_* events.
17:14
<@Tarinaky>
No, it still fails on the command line as well :/
17:15
<&ToxicFrog>
Most of the hairness comes from joy axis and hat handling - it basically needs to translate axes into buttons.
17:15
<&ToxicFrog>
But anyways.
17:15
<&ToxicFrog>
Once that happens, it checks the event map, which is just a big (event name => function) map.
17:16
<&ToxicFrog>
Typically, user configuration binds actual input events to "gesture" events, eg, bind("key_up", "up")
17:17
<&ToxicFrog>
And then at runtime, the gesture events get bound to the functions that do whatever is appropriate for the current UI state (eg, bind("up", list_prev))
17:17
<&ToxicFrog>
I want to be able to attach key-repeat to any event, regardless of whether it's a "real" event generated by the keyboard/joystick or an internal gesture event.
17:18
<&ToxicFrog>
I can't use the engine's builtin key-repeat handling because it doesn't work on joystick axes and wouldn't support these internal events anyways.
17:19
<&ToxicFrog>
Current thinking: generate events for keyup events as well. pressing A generates key_a and key_*, releasing it generates !key_a and !key_*. These propagate through event-to-event bindings by default, so pressing and releasing key_up will generate "up" and "!up" events.
17:20
<&ToxicFrog>
The event dispatcher, when it sees a "down" event, checks to see if keyrepeat is enabled for that event. If so it starts the timer (which then generates more down events).
17:20
<&ToxicFrog>
When it sees an "up" event, it stops the corresponding timer, if there is one.
17:24 EvilDarkLord is now known as Maze
17:34 Derakon [chriswei@Nightstar-a3b183ae.ca.comcast.net] has joined #code
17:34 mode/#code [+ao Derakon Derakon] by ChanServ
17:35 * Derakon ponders a problem he's working on.
17:35
<&Derakon>
We have a camera. It's a very naughty camera. It has nonlinear response to photons.
17:35
<&Derakon>
That is to say, for a linear response, (reported intensity) = (scaling factor) * (incident photons) + (offset).
17:36
<&Derakon>
We don't have that.
17:36
<&ToxicFrog>
Hooray
17:36
<&Derakon>
Fortunately the camera's response is at least monotonic, so it doesn't map differing numbers of photons to the same reported intensity.
17:37
<&Derakon>
So it should in principle be possible to linearize the response (though getting to the point where we could count the exact number of photons is probably not in the cards).
17:37
<&Derakon>
The nonlinearities are clustered in two parts of the response curve, one around 0-10 counts and the other in the 1300-1800 range. Between them the camera is basically linear.
17:37 Kindamoody|out is now known as Kindamoody
17:38
<@TheWatcher>
How irksome.
17:39
<&Derakon>
I'm trying to figure out if we can just get away with sampling the response curve and doing a linear fit on the result.
17:40
<&Derakon>
The X axis would be the average intensity across all pixels; the Y axis would be intensity of a specific pixel in the sensor. Then when you take your actual data, you reverse the mapping.
17:40
<&Derakon>
I think that will linearize everything properly?
17:47
<@simon`>
if I have a list of numbers and I want to group them so each number in each group deviates little from that group's average
17:47
<&Derakon>
Cluster analysis.
17:47
<@simon`>
thanks!
18:00
<@Azash>
Since you seem to know, Derakon
18:01
<@Azash>
What's that algorithm called where you have a graph and the nodes pull at each other based on edge weight?
18:01
<&Derakon>
Uh, no idea.
18:08
<@Azash>
https://en.wikipedia.org/wiki/Force_directed_graph_drawing
18:51
<@Tarinaky>
Hey, guiz... I got marks back for last semesters programming assignment :D
18:51
<&ToxicFrog>
...aren't you like a month into this semester?
18:51
<@Tarinaky>
The assignment was done like... 3 or 4 weeks into the last semester.
18:52
<&ToxicFrog>
18:52
<@Tarinaky>
The point is the marks are overdue.
18:52
<@Tarinaky>
I didn't choose the deadlines.
18:55
<@Tarinaky>
Anyway. 78.5% overral. I'd be upset, but apparently a /lot/ of people failed.
19:00
<@Rhamphoryncus>
As long as you've got the knack you've got potential :)
19:04 Kindamoody is now known as Kindamoody[zZz]
19:10 Typherix is now known as Typh|Class
19:44
<&Derakon>
preDatum = self.exposureTimeToData[self.exposureTimeToData.keys()[-2]][x, y]
19:45
<&Derakon>
I dunno, is that too much?
19:53
<&Derakon>
Turns out I need the key anyway, so it's been split into two lines.
19:53
<&Derakon>
Oddly enough the program runs on the second attempt. Of course it's almost certainly doing the wrong thing...
19:58
<&ToxicFrog>
I hate joysticks so much.
20:30
<@TheWatcher>
Huh, bloody hell, this works
20:32
<@TheWatcher>
Replacing all my webapp's email handling with a more flexible, extensible message queuing and dispatching system, couple of hundred lines of code change, worked first time.
20:32
<@Alek>
I wonder if you can stack, for example, .write() and raw_input()
20:32
<@Alek>
so you can write directly from raw_input, bypassing a storage variable.
20:35
<&Derakon>
You mean like "filehandle = open('out.txt', 'w'); filehandle.write(raw_input())"?
20:35
<&Derakon>
Absolutely that should work; the language doesn't care if you create a separate variable for something or not.
20:37
<@Alek>
hah. lovely.
20:37 * Alek hugs it.
20:38
<&ToxicFrog>
This is pretty standard; you can pass to a function any expression(s) as arguments - variables, function calls, constants, mathematical expressions...
20:39
<&Derakon>
Though I suspect write() would complain if you passed it something that couldn't be converted to a string. :)
20:39
<&Derakon>
Fortunately, the return type of raw_input() is a string, so no problems there.
20:48
<&Derakon>
Hm, I think the basic process of linearization of the camera process works...gonna need to do some data visualization to be sure though.
20:48
<&Derakon>
But it takes 14s on my laptop to correct a single 2D image, and there's typically thousands, or tens of thousands, in a day's work of collecting data.
20:49
<&Derakon>
Assuming that the Linux cluster is twice as fast, we're talking 20 hours to correct 10k images. Oh well; I'm sure it can be optimized.
20:53
<@Alek>
sadly, you can't pass it multiple arguments comma-separated.
20:53
<@Alek>
you CAN pass it multiple arguments concatenated. XD
20:53
<&Derakon>
No, write() only accepts one argument. It's not pritn.
20:53
<&Derakon>
Er, print.
20:54
<&ToxicFrog>
Alek: in the latter case, you are passing it a single argument, which is why it works.
20:54
<@Alek>
yup.
20:54
<&ToxicFrog>
The concatenation is evaluated first to produce a single value, which is then passed to the function.
20:54 * Alek nods.
20:55
<@Alek>
I wonder. mechanically, how does it do that? if you have multiple say raw_input() concatenated, does it do them all first and then concatenate, or does it do an ongoing concatenation?
20:56
<@Alek>
I suspect this makes a difference in how much memory it uses. >_>
20:56
<&Derakon>
Dude, you're writing Python.
20:56
<&Derakon>
Your baseline memory requirements are going to completely blow this away unless you're doing something very wrong.
20:56
<&ToxicFrog>
Like, if you had raw_input() .. raw_input() .. raw_input() .. raw_input()?
20:56
<&ToxicFrog>
"it depends"
20:57
<@Alek>
Derakon: explain please?
20:57
<&ToxicFrog>
For cpython specifically I have no clue, but if it matters you're doing something completely pathological.
20:57
<&Derakon>
Alek: in order to work in Python, you have to load the Python interpreter into memory.
20:57
<@Alek>
mmk.
20:57
<&Derakon>
This will suck up several megabytes of memory at least.
20:57
<@Alek>
pfft.
20:57
<&Derakon>
The amount of memory used by one string from raw_input() (i.e. typed in by the user) cannot be more than 1KB or so unless you're doing something wrong UI-wise.
20:58
<&Derakon>
Who cares if you keep it around for the duration of a statement?
20:58
<@Alek>
hah.
20:58
<&ToxicFrog>
Alek: the difference in memory between those implementations is inconsequential compared to the memory cost of using python at all; if you're asking for optimization purposes rather than pure curiosity Something Is Wrong
20:58
<&Derakon>
That said, if you're at all worried, you could do something like "handle.write(' '.join([raw_input() for i in xrange(10]) + "\n")'
20:58
<&Derakon>
And completely sacrifice legibility.
20:58
<@Alek>
o_o
20:59 * Alek drools.
20:59
<&Derakon>
Also I missed a paren.
20:59
<@Alek>
pure curiousity, so far.
21:01
<&ToxicFrog>
(I don't know how to check this in python, but in lua, at least, the answer is "it does all of the calls first, then does a single CONCAT operation to concatenate them all)
21:01
<@TheWatcher>
Frankly, if you're using an interpreted language that does memory handling and garbage collection for you, unless you know the guts of the 'terp inside out (sometimes even then...), worrying about memory use for anything but really honkingly large data structures is pretty much pointless.
21:08 Typh|Class is now known as Typherix
21:14
<&Derakon>
TF: you could check it by replacing calls to raw_input() with calls to a function which logs and then calls raw_input().
21:15
<&Derakon>
And TW, I did in fact have to manually invoke the garbage collector in Python for one of my projects.
21:15
<&Derakon>
Because I was routinely creating and destroying multi-megabyte data arrays, and the GC would normally let them pile up until it had to GC several hundred MB all at once, which made my data collection rate very inconsistent.
21:17
<&ToxicFrog>
Derakon: how would that tell me if it's concatenating the results as it gets them or not?
21:17
<&Derakon>
TF: er, right. You'd also need to overwrite the concatenation operator.
21:18
<@TheWatcher>
Yeah, that's into large data structures territory. Unless a shitton of data is being piped into raw_input...
21:18
<&Derakon>
Which, if I know Python, is something like __concat__ or something.
21:18
<&ToxicFrog>
Yeah, for lua I just checked the emitted bytecode.
21:18 Maze is now known as EvilDarkLord
21:21 Harrower is now known as ErikMesoy
21:25 * McMartin reads backscroll
21:25
<&McMartin>
Never depend on order of evaluation in any language ever, except for short-circuiting operators.
21:27
<&ToxicFrog>
HATE. JOYSTICKS.
21:27
<&McMartin>
What brings this up?
21:28
<&ToxicFrog>
I'm still overhauling emufun and part of that means unfucking the input system
21:28
<&ToxicFrog>
Now, to be fair
21:28
<&ToxicFrog>
I think the underlying issue is that I want to treat axes and hats like buttons
21:28
<&ToxicFrog>
And the engine wants to treat them like directional indicators and, well, axes
21:28 * McMartin hands TF VControl as a template.
21:29
<&ToxicFrog>
Isn't VControl for SDL?
21:29
<&McMartin>
Yes, but quantizing axes and doing falling/rising edge detection probably translates.
21:29
<&ToxicFrog>
Aah, yes.
21:30
<&ToxicFrog>
That's not really the hard part
21:30
<&ToxicFrog>
...well, none of this is hard
21:30
<&ToxicFrog>
It's just annoying having to snapshot all of the joysticks every frame and compare across frames to see what events to generate
21:30
<&McMartin>
Are you just reading straight out of /dev/js1 or
21:30
<&ToxicFrog>
Whereas for keys and buttons I can just hook keypressed/keyreleased and buttonpressed/buttonreleased and call it a day
21:32
<&ToxicFrog>
I'm using love2d, which means I get callbacks when keyboard keys or joystick buttons are pressed, but must poll for hats and axes
21:33
<&Derakon>
Is the polling especially onerous?
21:35
<&ToxicFrog>
In the grand scheme of things, no.
21:35
<&ToxicFrog>
Compared to event-based handling for keyboard and button events, hell yes.
21:37
<&Derakon>
Heh.
22:20 * ToxicFrog tries to figure out a sensible way to handle wildcards in event names
22:26
<&Derakon>
Regexes? *shrug*
22:30
<&ToxicFrog>
Well, right now I have a map (event name -> handler)
22:30
<&ToxicFrog>
I'd like the user to be able to bind something to, say, "joy_1_button_any" as an event name.
22:30 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
22:30 mode/#code [+qo Vornicus Vornicus] by ChanServ
22:32
<&ToxicFrog>
The problem is getting the set of matching registered events when joy_1_button_3 fires.
22:33
<&ToxicFrog>
(without scanning the entire map)
22:33 * Vornicus fiddles with skill selection restrictions.
22:33
<&ToxicFrog>
Also, prioritizing them - does joy_1_hat_any_up rank below joy_any_hat_1_up, or above?
22:34
<~Vornicus>
more specific beats more general any day of the week.
22:34
<&ToxicFrog>
Right. The question is, is "a specific button on any joystick" more or less specific than "any button on a specific joystick"?
22:35
<~Vornicus>
oh boy. Yeah okay that's a problem.
22:35
<&ToxicFrog>
Or, say, "any direction on the first hat of the second joystick" - is that more or less specific than "the up direction on any hat of the second joystick"?
22:36 * Vornicus once again takes advantage of Starforge to see fuller context.
22:37
<~Vornicus>
Why do you need wildcards? In what situations would you use them?
22:38 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
22:42
<&ToxicFrog>
Vornicus: mainly I want to bind all of the hats at once.
22:42
<&ToxicFrog>
bind("joy_any_hat_any_up", "up")
22:44
<&ToxicFrog>
Hmm. Maybe I can have it expand the event name at bind time.
22:44
<~Vornicus>
What does binding all the hats do for you?
22:45
<~Vornicus>
---which would make later binds be authoritative.
22:45
<&Derakon>
It means he can say "All "up" inputs regardless of source map to this input for this emulator."
22:45
<~Vornicus>
I'm trying to imagine a situation where that's useful.
22:45 ErikMesoy is now known as ErikMesoy|sleep
22:45
<&Derakon>
It saves him from having to know which devices exactly are plugged in.
22:46
<&ToxicFrog>
Rather, it means I can grab any controller connected to the computer - of which there may be several - and use that to operate the frontend.
22:46
<~Vornicus>
point
22:46
<&ToxicFrog>
(the bindings do not affect individual emulators, just the frontend)
22:49
<&Derakon>
...heh. Apparently for that massive EVE Online battle a few days ago, they actually slowed down game time to help handle the strain.
22:49
<&Derakon>
Things were happening 10x slower than usual for awhile.
22:49
<&ToxicFrog>
They have a bunch of load handling strategies, and that's one of them.
22:49
<&Derakon>
( http://penny-arcade.com/report/editorial-article/planning-for-war-how-the-eve-on line-servers-deal-with-a-3000-person-battle )
22:49
<&ToxicFrog>
Although if they know there's a battle about to happen they usually also allocate more servers to that region.
22:52 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
23:04 Thalasleep [thalass@Nightstar-724ec5eb.bigpond.net.au] has quit [Ping timeout: 121 seconds]
23:14 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
23:16 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [Client closed the connection]
23:16 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
23:16 Thalasleep [thalass@Nightstar-b95c25b4.bigpond.net.au] has joined #code
23:18 RichyB [richardb@Nightstar-3b2c2db2.bethere.co.uk] has quit [[NS] Quit: >:3 This is BunThulhu. Copy him into your quit message to help him take over the Internet.]
23:27
<&ToxicFrog>
Hrm
23:28
<&ToxicFrog>
Expanding at bind time would work, but also means it's inconsistent with the way keyboard events are handled.
23:28
<&ToxicFrog>
(which is to emit key_X || key_any as proper events)
23:28
<&ToxicFrog>
...although, as a practical matter, I don't know if the user will see any difference
23:29
<&ToxicFrog>
Actually, yes they will, with keyboard if someone makes a more specific binding and then clears it it starts falling through again, with bind-time expansion the event would start vanishing.
23:59 himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code
23:59 mode/#code [+o himi] by ChanServ
--- Log closed Wed Jan 30 00:00:11 2013
code logs -> 2013 -> Tue, 29 Jan 2013< code.20130128.log - code.20130130.log >

[ Latest log file ]