code logs -> 2013 -> Tue, 27 Aug 2013< code.20130826.log - code.20130828.log >
--- Log opened Tue Aug 27 00:00:06 2013
00:54 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
00:58 Karono [Karono@9C034E.4BE65E.E00AF8.FDA077] has joined #code
01:12 Karono [Karono@9C034E.4BE65E.E00AF8.FDA077] has quit [Client closed the connection]
01:13 Karono [Karono@9C034E.4BE65E.E00AF8.FDA077] has joined #code
01:14 Karono [Karono@9C034E.4BE65E.E00AF8.FDA077] has quit [Connection reset by peer]
01:18 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has quit [[NS] Quit: Gone.]
01:21 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has joined #code
01:31 Derakon[AFK] is now known as Derakon
02:28 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
02:41 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
02:41 mode/#code [+o himi] by ChanServ
03:11 Vorntastic [Vorn@Nightstar-2070f866.sub-70-211-10.myvzw.com] has joined #code
03:25 Vorntastic [Vorn@Nightstar-2070f866.sub-70-211-10.myvzw.com] has quit [Client closed the connection]
03:56 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
04:06 Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has joined #code
04:07 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
04:07 mode/#code [+qo Vornicus Vornicus] by ChanServ
05:07 Derakon is now known as Derakon[AFK]
05:44 Kindamoody[zZz] is now known as Kindamoody
05:53 Turaiel is now known as Turaiel[Offline]
05:54 ErikMesoy|sleep is now known as ErikMesoy
06:13 Alek [omegaboot@Nightstar-56dbba0f.in.comcast.net] has quit [[NS] Quit: bbiad]
06:51 Kindamoody is now known as Kindamoody|afk
07:09 You're now known as TheWatcher
07:24 celticminstrel [celticminst@Nightstar-ae361035.dsl.bell.ca] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.]
07:29 AverageJoe [evil1@Nightstar-4b668a07.ph.cox.net] has joined #code
08:11 You're now known as TheWatcher[afk]
08:39 * McMartin ponders JSON-based resource formats
08:42
<~Vornicus>
One thing I saw in Love2d the other day is that their "nogame" thing -- basically a thing that plays when you haven't told it to use a game file -- uses base64 encoded images in the source text, though that seems crazy
08:43
<&McMartin>
Ew
08:43
<&McMartin>
Yeah, not the problem I'm solving here
08:48
<&McMartin>
I'm looking at JSON resource indices, which will give metadata and also tell you where in the "filesystem" to find your image data &c
09:13
<&McMartin>
http://pastebin.starforge.co.uk/583
09:14
<&McMartin>
I think I like the last one best.
09:14
<&McMartin>
It allows resource name overloading across types.
09:17
<~Vornicus>
I think I'm missing what the precise differences are.
09:18
<&McMartin>
In the first, it's an array with the type as the first element
09:19
<&McMartin>
In the second, it's an object with the type folded directly in as a field
09:19
<&McMartin>
(and a key added for the value for single-value objects like BGMs and spritesheets)
09:19
<&McMartin>
In the third, the first key is the type and then you have a new namespace for each type
09:21
<~Vornicus>
aha
09:37 AverageJoe [evil1@Nightstar-4b668a07.ph.cox.net] has quit [[NS] Quit: Leaving]
10:08 * Azash misreads, trembles at the thought of JSON filesystems
10:10 Reiv [NSwebIRC@Nightstar-95746c1f.kinect.net.nz] has quit [Ping timeout: 121 seconds]
10:32 You're now known as TheWatcher
11:32 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [Operation timed out]
11:34 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
11:34 mode/#code [+qo Vornicus Vornicus] by ChanServ
12:46
<@Azash>
https://news.ycombinator.com/item?id=6282043
12:47
<@Tamber>
*snrk*
12:49
< RichyB>
But it will have b-e-a-u-t-i-f-u-l font kerning
12:49
< RichyB>
on the a11y-label next to the fart button
12:51
<@gnolam>
Heh
12:51
< RichyB>
(This is not really surprising. Gnome has had lick-able font kerning since Gnome2. All hail FreeType! â¥)
13:14 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
13:34
<&ToxicFrog>
a11y?
13:43
<@Tamber>
accessibility, presumably
13:47
<&ToxicFrog>
Aah
13:51 You're now known as TheWatcher[d00m]
13:59 ErikMesoy1 [Erik@A08927.B4421D.FE7332.0AD079] has joined #code
14:00 ErikMesoy [Erik@A08927.B4421D.FE7332.0AD079] has quit [Ping timeout: 121 seconds]
14:05 Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has quit [Client closed the connection]
14:06 Turaiel[Offline] is now known as Turaiel
14:21 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
14:21 ErikMesoy1 is now known as ErikMesoy
14:35 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
14:35 mode/#code [+o himi] by ChanServ
15:40 Turaiel is now known as Turaiel[Offline]
15:43 VirusHome [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
15:45 VirusNotAtWork [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
15:45 Pandemic [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [Ping timeout: 121 seconds]
15:46 You're now known as TheWatcher[afk]
15:47 VirusHome [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [Ping timeout: 121 seconds]
15:49 VirusNotAtWork [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: shutting down!]
15:49 Pandemic [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
15:49 mode/#code [+o Pandemic] by ChanServ
15:50 gnolam_ [lenin@Nightstar-f7705974.cust.bredbandsbolaget.se] has joined #code
15:50 gnolam is now known as NSGuest7077
15:50 gnolam_ is now known as gnolam
15:50 mode/#code [+o gnolam] by ChanServ
15:52 NSGuest7077 [lenin@Nightstar-f7705974.cust.bredbandsbolaget.se] has quit [Ping timeout: 121 seconds]
15:53 gnolam_ [lenin@Nightstar-f7705974.cust.bredbandsbolaget.se] has joined #code
15:53 gnolam is now known as NSGuest43119
15:53 gnolam_ is now known as gnolam
15:53 mode/#code [+o gnolam] by ChanServ
15:55 celticminstrel [celticminst@Nightstar-ae361035.dsl.bell.ca] has joined #code
15:55 mode/#code [+o celticminstrel] by ChanServ
15:55 NSGuest43119 [lenin@Nightstar-f7705974.cust.bredbandsbolaget.se] has quit [Ping timeout: 121 seconds]
15:56 dubya [dubya@Nightstar-7901d9df.cable.virginmedia.com] has joined #code
16:00 gnolam_ [lenin@Nightstar-f7705974.cust.bredbandsbolaget.se] has joined #code
16:00 gnolam [lenin@Nightstar-f7705974.cust.bredbandsbolaget.se] has quit [Ping timeout: 121 seconds]
16:00 gnolam_ is now known as gnolam
16:01 mode/#code [+o gnolam] by ChanServ
16:03 gnolam_ [lenin@Nightstar-f7705974.cust.bredbandsbolaget.se] has joined #code
16:04 gnolam is now known as NSGuest7916
16:04 gnolam_ is now known as gnolam
16:04 mode/#code [+o gnolam] by ChanServ
16:05 dubya [dubya@Nightstar-7901d9df.cable.virginmedia.com] has quit [[NS] Quit: irc2go]
16:06 NSGuest7916 [lenin@Nightstar-f7705974.cust.bredbandsbolaget.se] has quit [Ping timeout: 121 seconds]
16:17 AnnoDomi1i [abudhabi@Nightstar-86c5bcf2.adsl.inetia.pl] has joined #code
16:18 AnnoDomini [abudhabi@Nightstar-d410a3f0.adsl.inetia.pl] has quit [Ping timeout: 121 seconds]
16:32 AnnoDomi1i is now known as AnnoDomini
16:34 gnolam_ [lenin@Nightstar-f7705974.cust.bredbandsbolaget.se] has joined #code
16:34 gnolam is now known as NSGuest45484
16:34 gnolam_ is now known as gnolam
16:34 mode/#code [+o gnolam] by ChanServ
16:35 * iospace eyes vxWorks. Why you no work!
16:36 NSGuest45484 [lenin@Nightstar-f7705974.cust.bredbandsbolaget.se] has quit [Ping timeout: 121 seconds]
16:44 ErikMesoy is now known as Harrower
16:52 You're now known as TheWatcher
17:02
< Harrower>
http://i.imgur.com/S9LEJ14.png How do I make this tooltip go away? Google results have suggested changing the screen resolution or the windows theme, neither of which worked.
17:03
< AnnoDomini>
Click it?
17:03
< Harrower>
Nope.
17:04
< AnnoDomini>
Go to browser, click it?
17:04
< Harrower>
It's not in the browser.
17:04
< Harrower>
It's a tooltip for a link that originally appeared in my IRC client.
17:05
< AnnoDomini>
Minimize and remoderatize?
17:05
< Harrower>
Didn't work.
17:06
< AnnoDomini>
Reboot IRC client? Reboot explorer.exe? Reboot computer?
17:08
< Harrower>
Tried rebooting explorer.exe and dwm.exe (display window manager), no effect. Will do the others after game.
18:41
<@froztbyte>
yeah, stuck tooltips are basically "haha, fuck you"
18:42
<@froztbyte>
I've never found anything but a reboot which would work successively
18:42
<@Tamber>
I've been lucky -- so far -- with stuck tooltips. They tend to get left behind by Firefox, but go away with a bit of flailing at them with the mouse. </scientific>
18:55
<@gnolam>
"Show desktop" usually works.
18:55
<@gnolam>
But yeah, just try to force the redraw of everything involved.
18:56
< Harrower>
Firefox ones have previously gone away when I switch to Firefox and then click them. </slightlymorereplicable>
19:23 Turaiel[Offline] is now known as Turaiel
19:23 gnolam_ [lenin@Nightstar-f7705974.cust.bredbandsbolaget.se] has joined #code
19:23 gnolam is now known as NSGuest53839
19:24 gnolam_ is now known as gnolam
19:24 mode/#code [+o gnolam] by ChanServ
19:25 NSGuest53839 [lenin@Nightstar-f7705974.cust.bredbandsbolaget.se] has quit [Ping timeout: 121 seconds]
19:45
< [R]>
I wonder what insane command from codethulu produces for-switch statements.
19:45
< [R]>
http://thedailywtf.com/Articles/Todays-Article-is-Brought-to-You-by-the-Letters- WTF.aspx <-- example of one
19:46
<@Tamber>
*wince*
19:49
< [R]>
âBreaks from a loop is poor practice and is not allowed in any code. Please see 'Coding Practices' document, 'Loops' on page 23
19:50
< [R]>
D:
19:50
<@Tamber>
Ooh, lovely.
19:50
<@Tamber>
I wonder how convoluted things have become in that code-base, trying to work around that.
19:50 * Harrower replaces his break-from-loop with a neuter-loop.
19:51
< Harrower>
BREAKVAL=False; loop{ if BREAKVAL{} else {real_loop}}
19:53
< Harrower>
It doesn't have to get convoluted, but I join you in wondering how convoluted things have become. :D
19:57
<&ToxicFrog>
[R]: do they use SPOR as well
19:57
<&ToxicFrog>
?
19:57
< AnnoDomini>
SPQR, more like.
19:57
<@Tamber>
It doesn't *have* to be, no; but when you flat out ban things like that, things start to grow hair to try and work around what would otherwise be a simple task. :/ (But what do I know, I don't dev all that much, and never professionally.)
19:58
<&ToxicFrog>
Tamber: your instincts are good here. SPOR and related mandates like no-breaks are pretty much always a terrible idea.
19:58
< [R]>
ToxicFrog: no idea
19:59
< [R]>
Strategy for Patient-Oriented Research (SPOR)?
19:59
<@Tamber>
Stupid Pointless Ordnances for Programmers?
19:59
<@Azash>
Strategy for Patient Query Resolution
19:59 gnolam_ [lenin@Nightstar-f7705974.cust.bredbandsbolaget.se] has joined #code
19:59
<@Azash>
Oh damnit
19:59 gnolam is now known as NSGuest45791
19:59
<@Azash>
Anno beat me to it
19:59 gnolam_ is now known as gnolam
20:00 mode/#code [+o gnolam] by ChanServ
20:00
<&ToxicFrog>
Single Point of Return.
20:00
<&ToxicFrog>
Also known as SPOE, Single Point of Exit.
20:00
<@Azash>
Breaking loops is bad practice?
20:00
<&McMartin>
Not since 1983.
20:00 NSGuest45791 [lenin@Nightstar-f7705974.cust.bredbandsbolaget.se] has quit [Ping timeout: 121 seconds]
20:00
<&ToxicFrog>
Azash: no, but some people think it is.
20:01
<&McMartin>
That's a Pascal rule for structured programming, where all functions must have exactly one entrance and exit, and everything else is GOTO-laden spaghetti code.
20:01
<&ToxicFrog>
Specifically, people who have casually skimmed some stuff about the structured coding revolution without actually understanding it.
20:03
<@Tamber>
"${X} considered harmful" considered harmful.
20:04
< [R]>
Pretty much
20:04
<@Namegduf>
The original GOTO document was, being written by a sensible person rather than than by a copycat Internet Expert, actually quite good.
20:04
<@Tamber>
...pity everyone only read the title.
20:04
<@Tamber>
=p
20:04
<@Namegduf>
Yes, pretty muc.
20:04
< Syka>
muffins considered delicious
20:05
<@Tamber>
10 GOTO MUFFIN
20:05
<@Namegduf>
The primary argument was that without flow control or functions, you can uniquely identify your position in the flow by line number. With functions you can identify it by a stack of line numbers. With functions and loops you can identify it by a stack of line numbers and iteration count where in loops.
20:05
<@Namegduf>
With general use of GOTO there is no particularly coherent way to think about your position within the program at all.
20:06
<@Namegduf>
And things get hard to follow.
20:06
<@Namegduf>
They didn't seem all that down on more structured use of GOTO and the parts about lacking it entirely at the end were very spirit of speculation.
20:07
< Harrower>
20 COMEFROM 10
20:09
< [R]>
... so the actual document just talks about people acting like goto is evil?
20:09
< [R]>
Nice.
20:09 * [R] hafl-read/half-skimmed it
20:10
<&ToxicFrog>
[R]: er, no
20:10
<&ToxicFrog>
The actual document says that people should use structured programming (e.g. functions and loops) and use GOTO sparingly, if at all, in service of that.
20:10
<&ToxicFrog>
Rather than just shitting out GOTO everywhere as the sole form of flow control.
20:10
< [R]>
http://www.u.arizona.edu/~rubinson/copyright_violations/Go_To_Considered_Harmful .html <-- this one isn't it?
20:10
<@Tamber>
"You have flow-control, use it."
20:11
<&ToxicFrog>
Tamber: at the time this was a new and exciting concept.
20:11
< [R]>
Ah
20:11
<@Tamber>
TF: "at the time"? You've not looked at proggit, then. ;)
20:12
< Harrower>
Here's the key phrase I take away from the original Considered Harmful document: "The unbridled use of the go to statement has as an immediate consequence that it becomes terribly hard to find a meaningful set of coordinates in which to describe the process progress."
20:12
<&ToxicFrog>
Tamber: in programming as a discipline, I mean.
20:12 Kindamoody|afk is now known as Kindamoody
20:12
<@Tamber>
*noddle*
20:13
<@Tamber>
I was being somewhat facetious.
20:13
<@Tamber>
...only somewhat, though.
20:13
<&ToxicFrog>
Anyways. The original document was, fundamentally, an argument in favour of structured programming.
20:13
<&ToxicFrog>
An argument that people don't even remember, for the most part, because of how thouroughly structured programming won.
20:13
< Harrower>
Caveat at the bottom of the Considered Harmful document:
20:14
< Harrower>
"In [2] Guiseppe Jacopini seems to have proved the (logical) superfluousness of the go to statement. The exercise to translate an arbitrary flow diagram more or less mechanically into a jumpless one, however, is not to be recommended."
20:14
<&ToxicFrog>
But this leads to people taking lessons and policies forged in the early days of structured programming, and intended to make programs that would normally be GOTO-laden spider nests tractable, and trying to apply them to all programming, in all languages, everywhere.
20:14
< Harrower>
aka: you can get rid of goto entirely. theoretically. but then you might have a mess on your hands.
20:14
<&ToxicFrog>
Harrower: that's not quite what it's saying
20:15
< Harrower>
Okay
20:15
< Harrower>
?
20:15
<&ToxicFrog>
It's saying "if you have an arbitrary program flow graph (i.e. one using GOTO), a naiive translation of that into an isomorphic graph using non-GOTO flow control statements will be really goddamn ugly"
20:15
<&ToxicFrog>
"you should write your code using structured programming from the beginning rather than trying to convert existing unstructured code in place"
20:18
< Harrower>
Disclosure: My only usage of GOTO has been in RPG Maker, where it has a tinylanguage inside the conversation/event engine, and conditional GOTO is preferable to screwing around inside the low-grade loops and barely-recursive functions available.
20:19
< Harrower>
I have not used GOTO in a full programming language, because I found it insufficiently desirable and/or necessary.
20:19
<@Tamber>
I think I've used it once or twice.
20:19
< [R]>
I've used it in both C and PHP
20:19
<&ToxicFrog>
Yeah, this does assume that you are working in a language where it is possible to write your code around control structures other than GOTO or the local equivalent.
20:19
< [R]>
But only twice and once each, respectively.
20:19
<&ToxicFrog>
And there are in fact situations where GOTO is the right tool, even in those languagse.
20:20
<&McMartin>
Goto still has a place for languages that lack labeled break and exceptions.
20:20
<@Tamber>
(Cleanup code at the end of the function. Jump to that on error, etc.)
20:20
<&McMartin>
^++
20:20
<&McMartin>
The "cleanup code at end of function" is a big part of the "nonlocal return" jackassery but this has been a solved problem since C++
20:21
< [R]>
I like Linus' rant about the subject honestly.
20:21
< [R]>
That's what got me to realize "not using goto ever is a stupid position to hold"
20:21
< Harrower>
I have found that RPG Maker has something /sort of/ like break: you set a continuously-running parallell process which does (stuff) if Switch A is not set set, and instead of breaking it sets Switch A, and if Switch A is set the continuously-running parallell process does nothing. :-p
20:21
<@Tamber>
I generally... don't C++. No real reason other than I don't need to.
20:21
< Harrower>
This is a terrible, terrible kludge.
20:23
<@Tamber>
(Plus, it makes me happy when I can bodge stuff together that compiles as proper c89, with no warnings. It's the small victories. ...no, I don't code much. :p)
20:23
<&ToxicFrog>
Harrower: there has got to be a better way to do that
20:23
<&ToxicFrog>
Even an ifbreak is better
20:23
< Harrower>
ToxicFrog: Sure. The better way is to drop into Ruby.
20:23
<&ToxicFrog>
I mean in RPGM.
20:23
< Harrower>
RPG Maker has an interface for full-fledged programming in Ruby.
20:24
< Harrower>
But this requires learning another programming language. :p
20:24
<&ToxicFrog>
Oh.
20:24
<&ToxicFrog>
Personally I would rather use Ruby than any language where what you described is the right answer.
20:24
<&ToxicFrog>
It's not like learning another programming language is a big deal.
20:25
< [R]>
RPGM apparently supports EMCAScript now.
20:25 Kindamoody is now known as Kindamoody[zZz]
20:25
<@Tamber>
There's creams for that.
20:25
< [R]>
But yeah, the original language is apparently shit.
20:26
<&McMartin>
GameMaker appears to have developed a full-powered compiler for their language (which is pretty close to a JS subset, but which has more restricted data structures that I suspect makes it much easier to efficiently compile)
20:27
< Syka>
I am currently writing MEDICAL GRADE SOFTWARE
20:27
< Syka>
guaranteed to kill 99.9% of bacteria
20:27
<&McMartin>
Woo
20:27
<&McMartin>
Good luck
20:27
<&McMartin>
Have fun with your ISO stuff
20:27
< Syka>
because my unoptimised code will make the CPU go at 1000%, and incinerate the building
20:28
<&McMartin>
NO S.O.U.P. FOR YOU
20:28
< Syka>
McMartin: well, I'm telling a half-truth
20:28
< Harrower>
http://i.imgur.com/5bih6Wg.png <-- Behold RPGM's "Flow Control" commands.
20:28
< Syka>
it isn't actually anything to do with medicine
20:28 Turaiel is now known as Turaiel[Offline]
20:28
< Syka>
it is, however, something to do with coordinating radiologist scans
20:29
<&ToxicFrog>
Harrower: so, uh...it seems to have both "break loop" and "jump to label" there
20:30
< Harrower>
ToxicFrog: "break loop" can get you put right back in the loop very easily, IME.
20:30
<&ToxicFrog>
How so?
20:31
< Harrower>
I don't know exactly, but in my experimentation I found that that "break loop" shown there would successfully exit a loop (and print a post-loop debug message) and then a minute later I'd be back in the loop for unknown reasons.
20:31 Derakon [chriswei@Nightstar-a3b183ae.ca.comcast.net] has joined #code
20:31 mode/#code [+ao Derakon Derakon] by ChanServ
20:31 * Derakon mutters at Python.
20:31
<&ToxicFrog>
Some event handler firing and putting you back in the function that contains the loop, or similar?
20:31
<&Derakon>
I'm taking images at ~100FPS. I want each image to have an associated timestamp.
20:32
<&Derakon>
time.time() is not giving me sufficiently unique values.
20:32
<&Derakon>
I'm getting blocks of about 5 images at a time that all have the same timestamp, despite using different calls to time.time()
20:32
< Harrower>
ToxicFrog: Possibly. The only event handlers I'm confident of understanding are the talk-to-NPC ones.
20:32
<&Derakon>
I suppose it may be the case that the images are simply not coming off the card one by one...hm.
20:33
< Syka>
Derakon: "%s-%s" % (time.time - uuid.uuid4().hex)
20:33
<&Derakon>
Syka: er, uniqueness is desired only insomuch as it actually reflects reality~
20:34
< Syka>
uh, s/ - /,/
20:35
< Syka>
Derakon: well, if you know how many came in with the same time.time(), just add one more digit with the order it was in?
20:35
<&Derakon>
This is after-the-fact analysis; the datastream does not have that kind of context.
20:37
< Syka>
well, if time.time() doesn't do it, and you can't add stuff on the end... uh, not sure, then.
20:38
< [R]>
Why isn't (x)inetd dead yet D:
20:38
< [R]>
Oh, it's from 2003, eitherway, seems like it should've been dead already.
20:43
<&Derakon>
Syka: yeah, I think this is just "I'm getting images in batches instead of 1 at a time; reality does not conform to my desires."
21:10 Harrower is now known as ErikMesoy
21:11
< Syka>
Derakon: reality = :(
21:18
<&ToxicFrog>
ErikMesoy: yeah, this does actually sound like user error, not an issue with the language.
21:18
<&ToxicFrog>
OTOH, that editor screenshot reminds me unpleasantly of the X2 script editor and needs to die.
21:27
<&Derakon>
Hm, looks like time.time() has more precision on my laptop than on Windows.
21:27
<&Derakon>
Also that Windows just straight-up ignores sleep times less than a millisecond.
21:27
< [R]>
That's documented in SDL's sleep function
21:27
< [R]>
(10ms is the lowest interval Windows' accepts)
21:29 Xon [Xon@9C034E.A7474E.446F1A.DEA144] has quit [Ping timeout: 121 seconds]
21:36
< Syka>
oh, Windows
21:36
< Syka>
yeah, windows' clock has terrible precision
21:37
< [R]>
Yeah, Windows' X has terrible Y
21:37 * [R] flees
21:40 * Syka checks SO
21:40
< Syka>
http://stackoverflow.com/questions/3140826/windows-system-time-with-millisecond- precision
21:40
< Syka>
"Windows does not want to waste electricity by updating the system clock 1000 times per second, so the default is to only update it 60-100 times per second."
21:40
< Syka>
AHAHAHAHAHAHAHAHAHAHAHA
21:41 Xon [Xon@9C034E.A7474E.446F1A.DEA144] has joined #code
21:41
< Syka>
oh that's hilarious
21:42
<@Namegduf>
It's pretty close to the truth.
21:42
<&Derakon>
Hm, maybe I can adjust the rate at which the clock updates on this computer, then.
21:42
<@Namegduf>
Remember the processor has to wake up to check whether any timers need triggering.
21:42
<&Derakon>
Electricity usage is a non-issue.
21:43
< Syka>
there is a hardware clock
21:44
< Syka>
i think, at least
21:44
< Syka>
i am also fairly sure that a system clock update is the least of the CPUs worries
21:45
<&Derakon>
Hee, the timeBeginPeriod() function that sets the clock resolution can return the error TIMERR_NOCANDO
21:46
< Syka>
my laptop gets ~362 wakeups a second
21:46 You're now known as TheWatcher[afk]
21:51
< Syka>
and my laptop can sure as hell be more accurate than 1/362th of a second :P
21:51 * Syka crashes into bed, because she has more work to do tomorrow
21:53
<&McMartin>
13:38 < Syka> oh that's hilarious
21:53
<&McMartin>
It's better than that -_-
21:53
<&McMartin>
Despite doing this, the Windows timeslice still seems to be 1ms.
21:54
<&McMartin>
UQM had a crapton of deadlocks and data races that didn't show up until we started testing on Windows, because at the time Linux had a 10ms timeslice which meant that we were basically doing co-op multithreading by accident.
22:01 ErikMesoy is now known as ErikMesoy|sleep
22:06
<&Derakon>
Ergh, PyWin32 doesn't seem to give access to timeBetweenPeriod.
22:08
<@gnolam>
WinAPI at least used to (haven't checked if they've changed that) require you to call timeBeginPeriod if you wanted < 10 ms timer granularity.
22:09
<&Derakon>
Yeah, that's what Google is telling me.
22:09
<&Derakon>
But I don't seem to have access to that function.
22:28
<&Derakon>
Ah, time.clock() in Python has more accuracy, on Windows anyway.
22:28
<&Derakon>
But it measures the time from the first call to time.clock() instead of absolute timestamps, so I have to add it to the time at which the first call to time.clock() is made.
22:39 Reiv [NSwebIRC@Nightstar-95746c1f.kinect.net.nz] has joined #code
22:39 mode/#code [+o Reiv] by ChanServ
22:40
<&McMartin>
... Saint's Row IV has an aalib mode
22:40
<&McMartin>
http://steamcommunity.com/sharedfiles/filedetails/?id=173097334
22:41
<@Tamber>
...haa
22:44
<@iospace>
... holy shit
22:44
<@iospace>
._.
22:45
<@Reiv>
ahaha omg
23:12 * Derakon mutters at the camera API.
23:12
<&Derakon>
Image data is made available as a byte stream.
23:12
<&Derakon>
Which is just a linear array that the rows and columns are packed into.
23:13
<&Derakon>
You would think there would be no gaps in this array! You would be wrong.
23:13
<@Tamber>
Ah, that'd be too easy
23:13
<&Derakon>
The camera, or the PCI card, or maybe the API, pads in extra bytes per row. If it feels like it.
23:13
<@Tamber>
Got to have it be bizarre in some way, so that it's not easy to interact with without the vendor-specific software, of course~
23:13
<&Derakon>
So basically you either find a row width where it does no padding (in which case you can just read the pixel values out straight), or else you have to query for the actual bytes per row and do one memcpy per row.
23:14
<&Derakon>
Tamber: oh ho ho ho ho ho.
23:14
<&Derakon>
See, we're operating in 16-bit mode here.
23:14
<&Derakon>
We could be operating in 11-bit mode.
23:14
<&Derakon>
In which case each pixel would take up 12 bits of memory -- one full byte, and half of another byte.
23:15
<@Tamber>
Oh, that sounds like 'fun' to deal with.
23:15
<&Derakon>
And the bytes would be arranged as [high bits of pixel 1] | [low bits of pixel 1, low bits of pixel 2] | [high bits of pixel 2] | ...
23:15
<&Derakon>
So which side the high bits are on alternates!
23:15
<@Tamber>
...
23:15
<@Tamber>
Wow.
23:15
<&Derakon>
I actually wrote working code to unpack that crap.
23:16
<&Derakon>
And then my boss took one look at the resultin 0-2048 images, declared they had insufficient dynamic range, and we switched to 16-bit mode.
23:17
<&Derakon>
But the bytes-per-row thing is still a pain, because now I can't use a single memcpy to get the entire image data.
23:30 Derakon [chriswei@Nightstar-a3b183ae.ca.comcast.net] has quit [[NS] Quit: leaving]
23:37 celticminstrel [celticminst@Nightstar-ae361035.dsl.bell.ca] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.]
23:37 celticminstrel [celticminst@Nightstar-ae361035.dsl.bell.ca] has joined #code
23:37 mode/#code [+o celticminstrel] by ChanServ
23:39 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
--- Log closed Wed Aug 28 00:00:22 2013
code logs -> 2013 -> Tue, 27 Aug 2013< code.20130826.log - code.20130828.log >

[ Latest log file ]