code logs -> 2013 -> Fri, 16 Aug 2013< code.20130815.log - code.20130817.log >
--- Log opened Fri Aug 16 00:00:11 2013
00:02 VirusJTG_ [VirusJTG@BAD19E.09A45B.582A63.5AE998] has joined #code
00:05 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [Ping timeout: 121 seconds]
00:11 VirusJTG__ [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
00:14 VirusJTG_ [VirusJTG@BAD19E.09A45B.582A63.5AE998] has quit [Ping timeout: 121 seconds]
00:14 VirusJTG [VirusJTG@BAD19E.09A45B.582A63.5AE998] has joined #code
00:16 VirusJTG__ [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [Ping timeout: 121 seconds]
00:20 VirusJTG_ [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
00:23 VirusJTG [VirusJTG@BAD19E.09A45B.582A63.5AE998] has quit [Ping timeout: 121 seconds]
00:54 VirusJTG__ [VirusJTG@BAD19E.09A45B.582A63.5AE998] has joined #code
00:57 VirusJTG_ [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [Ping timeout: 121 seconds]
01:19 Derakon[AFK] is now known as Derakon
01:38
< RichyB>
ToxicFrog, explicit "resume C" makes much more sense. >_<
02:01 Derakon is now known as Derakon[AFK]
02:02 VirusJTG_ [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
02:03 VirusJTG_ [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
02:04 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has quit [[NS] Quit: Gone.]
02:05 VirusJTG__ [VirusJTG@BAD19E.09A45B.582A63.5AE998] has quit [Ping timeout: 121 seconds]
02:06
<&McMartin>
Oh man, this code -_-
02:06
<&McMartin>
Somebody was having a bad day when they wrote it
02:06 * Syka_ decides not to wear her "It's Not A Bug; It's A Feature" tshirt when she meets this client this morning about software
02:06
< Reiv>
Wise.
02:07 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has joined #code
02:07
< Syka_>
back at oldwork, i recieved it as a (tongue in cheek, naturally) gift from my supervisor
02:08
< Syka_>
after I had said that about one or two things >v>
02:08
< Syka_>
mainly it was something with three buttons
02:08
< Syka_>
and you had to press them in order
02:08
< Syka_>
but I didn't require it
02:08
< Syka_>
mainly because steps 1 and 2 were manually done on a few PCs
02:13
<&McMartin>
... why does my text-only server have Eclipse installed
02:13
< Reiv>
McMartin: You can tell, eh?
02:14
<&McMartin>
re: bad day?
02:15
<&McMartin>
Someone I know is better than this mistaking "system" and "exec" -_-
02:16
< Azash>
Hey McMartin~
02:16
< Azash>
To cheer you up
02:16
< Azash>
Did you see that thing earlier where someone named a file, just, delete character?
02:16
< Azash>
Like \del or however it's escaped
02:16
< Azash>
And the environment in question would draw said character as ?*
02:17
< Azash>
Guess thrice what happened when the newbie sysadmin wanted to delete it :P
02:17
<&McMartin>
-_-
02:17
<&McMartin>
\u007f
02:18
<&McMartin>
o_O
02:18
<&McMartin>
Answer: I have eclipse installed because Scala.
02:19
<&McMartin>
I guess I want Scala on this machine, so you win this round, Eclipse
02:19
< Azash>
Wot, it's really a dependency?
02:20
<&McMartin>
Looks like it is the way Fedora packaged it.
02:20
<&McMartin>
Shame on them, they're usually better about keeping things orthogonal
02:24 Derakon[AFK] is now known as Derakon
02:28 * McMartin is also kind of short on lightsaber chair fights.
02:32 Vorntastic [Vorn@Nightstar-6f48374c.sub-70-211-14.myvzw.com] has joined #code
02:33
<&ToxicFrog>
Azash: I can say with confidence that Eclipse is not actually a dependency of scala.
02:34
<&McMartin>
Yeah, this is, I think, "Fedora let its desire to minimize actual package count run away with them"
02:40
<&ToxicFrog>
That said, I would not be entirely comfortable using Scala without some kind of IDE to handle the type checking and build system for me~
02:44
<&McMartin>
Oh hey, SDL2 and SDL2-devel are now available in the F19 repos.
02:44
<&McMartin>
Let's see if Precise gets them at all
02:44
< [R]>
Precise?
02:45
<&ToxicFrog>
The latest Ubuntu release.
02:45
< [R]>
(I'd google that, but I suspect I won't get what I'm after)
02:45
<&McMartin>
Precise is actually not the latest Ubuntu release.
02:45
<&McMartin>
It's the latest LTS one, though.
02:46
<&McMartin>
They're up to Raring Ringtail now, I think, with Saucy Something-or-other coming up next.
02:47
<&McMartin>
I see evidence of it in Saucy.
02:48 Xon [Xon@9C034E.A7474E.446F1A.DEA144] has quit [Client closed the connection]
02:48
< Reiv>
... why am I so bad at DDL I mean seriously
02:48
< Reiv>
I code all goddamn day, this shouldn't be hard and yet it slips from my brain like a goddamn sieve
02:48
<&McMartin>
DDL?
02:49
< Reiv>
CREATE TABLE Foo something something (Columns go here)
02:49
<&McMartin>
Is that not SQL or
02:49 * McMartin does not database
02:51
< Azash>
McMartin: DDL is the term for the schema syntax
02:52
< [R]>
SQL decided to do the opposite of every other language when it came to variable declaration.
02:53
<&ToxicFrog>
That being?
02:53
< [R]>
char foo; // C
02:53
< [R]>
`foo` CHAR(20) NOT NULL; -- SQL
02:53
< [R]>
(err, -; on the SQL one)
02:53
<&McMartin>
SQL's following Pascal there
02:54
<&ToxicFrog>
Yeah, 'name type' is not as uncommon as you think.
02:54 Xon [Xon@9C034E.A7474E.446F1A.DEA144] has joined #code
02:54 McMartin [mcmartin@Nightstar-eb476be7.pltn13.sbcglobal.net] has quit [[NS] Quit: kernel update]
02:55
<&ToxicFrog>
Pascal and Scala both use 'foo: Char'
02:57 Xon [Xon@9C034E.A7474E.446F1A.DEA144] has quit [[NS] Quit: No Ping reply in 180 seconds.]
02:58 Xon [Xon@9C034E.A7474E.446F1A.DEA144] has joined #code
02:58 Zemyla [zemyla@Nightstar-8fbb7981.compute-1.amazonaws.com] has quit [Ping timeout: 121 seconds]
03:01 Zemyla [zemyla@Nightstar-8fbb7981.compute-1.amazonaws.com] has joined #code
03:01 mode/#code [+o Zemyla] by ChanServ
03:20 thalass [thalass@C2A270.1179B7.313116.0E50D0] has joined #code
03:29
< Syka_>
why do people use CHAR(20)
03:30
< Syka_>
is that some sort of MS SQL monstrosity
03:30
< Syka_>
since I've never used fixed length fields used everywhere in PG or SQLite
03:31
< Syka_>
also the MS BASICs do "dim foo as String"
03:35
< [R]>
MySQL does stuff with that number too
03:37
< Syka_>
but do people use it everywhere/do you have to specify it?
03:37
< Syka_>
I remember in college work, there were some SQL lessons
03:37
< Syka_>
let me grab the doc
03:39
< Syka_>
hmm i dont seem to have it anymore, maybe i deleted it
03:40
< Syka_>
but anyway
03:40
< [R]>
It comes up with CREATE TABLE
03:40
< Syka_>
this was a course on how2sql
03:41
< Syka_>
and everything had fun things
03:41
< Syka_>
eg. blatant disregard of the normal forms
03:41
< Syka_>
full name columns being 20 char max
03:41
< Syka_>
age being held in a text column
03:41
< Syka_>
date of birth being held in the same table in a text column
03:42
< Syka_>
i basically dropped out of doing that cert because it was painful to do
03:42
< Syka_>
either I disregarded what I knew about databases and let it screw my brain for the marks, or I go into maximum snark mode and do it properly, and get zero marks for not completing the task with the actual data
03:43 Harlow [Harlow@Nightstar-2dbe3d64.il.comcast.net] has joined #code
03:44
< [R]>
Heh
03:44
< [R]>
So basically the instructor knew shit-all and was teaching that?
03:45
< Syka_>
it was a remote course, so yeah, I am assuming
03:45
< Syka_>
it had windows 98 screenshots in places, in 2011
03:45
< [R]>
D:
03:47
< [R]>
I actually started up a Win98 VM when I was in college in 2009, but that was mostly because I needed a Windows version that was vulnerable to an older copy of bo2k (fucking dipshit cunts somewhere decided it's a good fucking idea to censor the thing out of the internet, so code's a bitch and her megaton of shit to find)
03:48
< [R]>
(I was in a network security course, I did an essay on it)
03:48
< Syka_>
"Microsoft will shut down its Games for Windows Live marketplace next week on Aug. 22, according to a post on the Xbox.com support page." yay
03:49 Turaiel[Offline] is now known as Turaiel
03:49
< [R]>
An event that I suspect will not affect me in the slightest.
03:49
< Syka_>
GFWL still exists
03:50
< Syka_>
but theyre slowly shitcanning it
03:50
< thalass>
...I didn't think it was even /possible/ to censor something on the internet. Much less somthing subversive like the source code of a virus.
03:51
< [R]>
When I went looking for it, I found 7 supposed hosts for it.
03:52
< [R]>
Two of them had code. The rest gave me "this was taken down by request of ..." notices.
03:52
< [R]>
I can't remember who exactly it was though.
03:53 * Syka_ sits and waits for like 400mb of debian sid packages to unpack
03:54 * ToxicFrog eyes his PSP unhappily.
03:54
<&ToxicFrog>
Roll a wizard. Character has a level 20 skill enabled. Since it's too high level, I can't even select it to disable it and free that skill slot.
03:55
< Syka_>
oooh kernel 3.10
03:55
<&ToxicFrog>
Roll a warrior. PSP kernel panics when I try to scroll the skill list.
03:55
<&ToxicFrog>
Erase all savedata from earlier versions. Roll a warrior.
03:55
<&ToxicFrog>
...character has a level 20 skill enabled.
03:55
< Syka_>
i think your psp is having one of those days
03:56
<&ToxicFrog>
I'm wondering if this is a bad interaction between Puzzle Quest (released when kernel 1.50 was common) and the current firmware version (6.60)
03:56
<&ToxicFrog>
Or if the memory stick is going
03:56
<&ToxicFrog>
Or if some of the internals like say the RAM are going
03:57
<&ToxicFrog>
The PSP is pretty old and much abused at this point.
03:57 Vorntastic [Vorn@Nightstar-6f48374c.sub-70-211-14.myvzw.com] has quit [Ping timeout: 121 seconds]
04:02 thalass [thalass@C2A270.1179B7.313116.0E50D0] has quit [Ping timeout: 121 seconds]
04:03 thalass [thalass@C2A270.1179B7.313116.0E50D0] has joined #code
04:06 McMartin [mcmartin@Nightstar-eb476be7.pltn13.sbcglobal.net] has joined #code
04:07 mode/#code [+ao McMartin McMartin] by ChanServ
04:08 Kindamoody[zZz] is now known as Kindamoody
04:12 McMartin_ [mcmartin@Nightstar-01ab314f.pltn13.sbcglobal.net] has joined #code
04:12 McMartin [mcmartin@Nightstar-eb476be7.pltn13.sbcglobal.net] has quit [Ping timeout: 121 seconds]
04:32 Syka_ [the@Nightstar-1aebe99b.iinet.net.au] has quit [[NS] Quit: leaving]
04:35 Syka [the@Nightstar-1aebe99b.iinet.net.au] has joined #code
04:42 thalass [thalass@C2A270.1179B7.313116.0E50D0] has quit [Client closed the connection]
04:44 gnolam [lenin@Nightstar-f7705974.cust.bredbandsbolaget.se] has quit [Client closed the connection]
04:44 gnolam [lenin@Nightstar-f7705974.cust.bredbandsbolaget.se] has joined #code
04:44 mode/#code [+o gnolam] by ChanServ
04:53 Derakon is now known as Derakon[AFK]
05:01 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.]
05:01 celticminstrel [celticminst@Nightstar-ae361035.dsl.bell.ca] has joined #code
05:01 mode/#code [+o celticminstrel] by ChanServ
05:14
< Harlow>
Anyone have any experience with Cmake?
05:17
< [R]>
Yes
05:25
< Harlow>
[R] have you ever used sfml?
05:25
< [R]>
Nope
05:47
< Syka>
sfml sounds like something i wouldnt want to use
05:50
< Harlow>
it has what I'm looking for thats all I'm concerned about.
05:57
< McMartin_>
Standardized Fuck My Life?
05:57
< [R]>
Simple, Fast Multimedia Library
06:08 Turaiel is now known as Turaiel[Offline]
06:17 Kindamoody is now known as Kindamoody|out
08:25 thalass [thalass@Nightstar-de48278f.bigpond.net.au] has joined #code
08:41 celticminstrel [celticminst@Nightstar-ae361035.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
08:49 Harlow [Harlow@Nightstar-2dbe3d64.il.comcast.net] has quit [[NS] Quit: Leaving]
09:12
< jeroud>
Never trust anything with "simple" in the name.
09:14
<~Vornicus>
Or "lightweight"
09:16
< jeroud>
At least SOAP was a bit embarrassed and changed the S to something else.
09:28
<@froztbyte>
ah yes
09:28
<@froztbyte>
http://www.sfml-dev.org/resources.php
09:29
<@froztbyte>
3 independent version tuts
09:29
<@froztbyte>
Confidence Inspiring(TM)
09:49 You're now known as TheWatcher
09:56 McMartin [mcmartin@Nightstar-4e8db81f.pltn13.sbcglobal.net] has joined #code
09:56 mode/#code [+ao McMartin McMartin] by ChanServ
09:59 McMartin_ [mcmartin@Nightstar-01ab314f.pltn13.sbcglobal.net] has quit [Ping timeout: 121 seconds]
10:26 thalass is now known as Thalass|fud
10:43 AverageJoe [evil1@Nightstar-4b668a07.ph.cox.net] has joined #code
11:27 AverageJoe [evil1@Nightstar-4b668a07.ph.cox.net] has quit [[NS] Quit: Leaving]
11:56 Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has joined #code
12:25 Sora [Sora@Nightstar-80076520.cable.rogers.com] has joined #code
12:30
< Sora>
hello im sora. I've got a little problem. I wanna learn python but everytime I look at a tut or an ebook, it just looks too easy then I get bored and end up quiting. So my question ia how do you motivate to code?
12:33
<@TheWatcher>
Choose a problem you want to try and address, write a program to do it.
12:35
< Sora>
thanks ill try that, I got up till looping last time and gave up just doing the excersises in the book gets really boring for me though
12:36 Thalass|fud is now known as Thalass
12:43
<@gnolam>
How much programming experience do you have?
12:45
< Sora>
I took a couple high school classes in programming in java and VB.net
12:46
< Sora>
but that was like 2 years ago and I forget some of what they taught me
12:48
<@gnolam>
Ok.
12:48
<@gnolam>
What TheWatcher said is true: the best way to learn is to solve problems.
12:49
<@gnolam>
You might want to have a look at Project Euler: http://projecteuler.net/
12:49
< Sora>
seems cool Ill try it thanks
12:51
< Sora>
well i gotta go to sleep now bye all and thanks
12:51 Sora [Sora@Nightstar-80076520.cable.rogers.com] has left #code ["[<bye and thanks>]"]
14:16 ktemkin[awol] is now known as ktemkin
14:23 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
14:26 Thalass is now known as Thalasleep
15:08 celticminstrel [celticminst@Nightstar-ae361035.dsl.bell.ca] has joined #code
15:08 mode/#code [+o celticminstrel] by ChanServ
15:34 * TheWatcher eyes this, ahahahahs
15:36
<@TheWatcher>
CODICIL WINTER HILL has to make multiple connections to the database server, as it needs to do some cross-database work and DBI prevents you from using a connection to one database to access a different one.
15:37
<@TheWatcher>
This means that I always have two (potentially three) database connections open, and I had "see if there's some way to optimise this" on my todo list
15:39
<@TheWatcher>
I just discovered that DBI is already optimising it for me, as long as they're on the same host
15:57 ktemkin is now known as ktemkin[out]
16:14 Namegduf [namegduf@Nightstar-5c10d129.beshir.org] has quit [Ping timeout: 121 seconds]
16:15 Namegduf [namegduf@Nightstar-5c10d129.beshir.org] has joined #code
16:15 mode/#code [+o Namegduf] by ChanServ
17:50 Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has quit [[NS] Quit: Leaving]
19:05 Kindamoody|out is now known as Kindamoody
19:35
<&ToxicFrog>
Welp
19:35
<&ToxicFrog>
The dotfile describing our systems is 200 lines long
19:55
< Azash>
20:45 <@Shiz> next unless ($_link =~ m|(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?|);
19:55
< Syka>
you know what would be a great password
19:55
< Azash>
That?
19:56
< Syka>
a regex that incorrectly parses emai
19:56
< Syka>
il addresses
19:56
< Syka>
slightly differently incorrectly for each site
19:56
< Azash>
:P
20:34 Kindamoody is now known as Kindamoody[zZz]
20:38 Derakon [chriswei@Nightstar-a3b183ae.ca.comcast.net] has joined #code
20:38 mode/#code [+ao Derakon Derakon] by ChanServ
20:38
<&Derakon>
So, threading question.
20:38
<&Derakon>
I have a function that, when called, gives me an image (array of pixel values).
20:38
<&Derakon>
I need to call it, get an image, tweak the image slightly, and then send it on to my client.
20:39
<&Derakon>
If I singlethread this whole thing then I can't keep up with the incoming image stream, the buffers fill up, and the system halts (no new images are generated). This is bad.
20:40
<&Derakon>
The get-image function is threadsafe, so I modified my code to have four threads in a loop pulling images out, sticking them into a Queue, and repeating, then a single thread dequeueing images, tweaking them, and sending them on to the client.
20:40
<&Derakon>
This keeps the limited-size buffers free, but the Queue can get rather large, rather quickly.
20:40
<&Derakon>
And we still can't send images to the client as quickly as they are taken.
20:41
<&Derakon>
So once the image stream ends, we can have a Queue taking up (potentially) dozens of GB of RAM, sloooowly getting unspooled and few to the client.
20:41
<&Derakon>
I could make the get-image threads also tweak the images and send them to the client, but they need to arrive in the right order.
20:42
<&Derakon>
So what I'm thinking is, each thread gets an image and an autoincrementing ID.
20:42
<&Derakon>
A separate variable tracks the ID of the last image sent to the client.
20:42
<&Derakon>
After the thread finishes tweaking the image, it waits for that separate ID to be (its ID - 1), and then sends the image along.
20:42
<&Derakon>
Then increments the separate ID.
20:43
<&Derakon>
Does that sound safe?
20:45
<@TheWatcher>
Warning: my brain is fried on entirely too much code.
20:46
<&Derakon>
So warned.
20:46
< [R]>
I don't see why you're using threads for this.
20:46
< [R]>
You obviously need to be droping images, so do that.
20:46
<&Derakon>
A singlethreaded approach cannot keep up with the image stream.
20:47
<&Derakon>
...no, images being dropped would be Very Bad.
20:47
<&Derakon>
We're recording data, not watching video.
20:47
<@TheWatcher>
How are you providing the autoincrementing ID?
20:47
<&Derakon>
TW: number and a lock around it, I guess.
20:47
< [R]>
<Derakon> And we still can't send images to the client as quickly as they are taken. <-- this implies a manditory "images must be dropped" clause.
20:48
<&Derakon>
[R]: no, it implies a mandatory "images pile up until they can reach the client".
20:48
<@TheWatcher>
Yeah, I was thinking that was the case, but that has the possibility of threads being let in out of order when getting IDs
20:48
<&Derakon>
Images being dropped is not an option. End of story.
20:48
<&Derakon>
TW: yeah, that is a problem.
20:48
<&Derakon>
Unless I put a lock around getting the image, but then we're effectively singlethreaded when getting images.
20:48
<@TheWatcher>
Is there anything unique per image in the image data stream, any kind of header data?
20:49
<&Derakon>
No, it's just a raw stream of pixel data.
20:49
<@TheWatcher>
Hm. Do you have a very high res clock available?
20:49
<&Derakon>
time.time() good enough?
20:49
<&Derakon>
Hm, I could modify the get-image function.
20:50
<&Derakon>
Let it handle the unique IDs.
20:50
<&Derakon>
...no, that doesn't fix anything. Stupid Derakon.
20:50
<@TheWatcher>
If so, what I'd suggest is have each thread timestamp the start of its read, process the image in the get-image thread, and then shove the images into some kind of holding store, and then the client can pull them out in order
20:50
< [R]>
Well he's how I'd do it: store the images in an linked list (images must be in order requirement), give each thread a node to work on at a time, have the mutexes stored in the list with the image data, and have a thread that keeps the workers fed. Then the main thread feeds the images to the client at a rate it can handle, provided the most recent image is ready.
20:51
<&Derakon>
I really, really want this code to push data to the client.
20:51
< [R]>
s/most recent/oldest/
20:51
<@TheWatcher>
Egh
20:52
<&Derakon>
It kind of fucks with my architecture to have data being pulled by the client.
20:52
<&Derakon>
Hmm.
20:52
< [R]>
(Actually ignore the feeder thread bit, instead the worker thread would be: START; getNextImage(); lock(); work(); unlock(); goto START;
20:53
<&Derakon>
The images are temporarily stored in a large continuous buffer.
20:53
<@TheWatcher>
Well, have a bunch of threads on one side shoving into the image store (whatever it is), and another process that takes images out of that and shoves them to the client when it's ready
20:53
<&Derakon>
The camera stores images into the buffer in order...
20:53
< [R]>
I wrote my suggestion assuming a server pushes model.
20:53
<&Derakon>
Once a buffer is read by my code, it is marked as available to the camera again.
20:54
<&Derakon>
If I could guarantee that buffers were released by my code in order then I could use the index of the buffer as a fairly reliable indicator of order, assuming I didn't get more than (number of buffers) behind...
20:55
< [R]>
... is there an issue using a linked-list here?
20:55
<&Derakon>
In what sense?
20:55
< [R]>
As a queue.
20:55
<&Derakon>
For what? Where?
20:55
<&Derakon>
Sorry, there may be gaps in our mutual understanding of each other since I haven't fully-explained the system.
20:55
< [R]>
Guaranteeing the client gets the images in order.
20:56
<&Derakon>
Let me hie away to a pastebin..
20:58
<&Derakon>
Okay, here's what the fully-singlethreaded approach looks like: http://pastebin.com/FC4XpCed
20:59
<&Derakon>
This singlethreaded approach cannot consume buffers fast enough (in getImage()), so they eventually all fill up, at which point the camera gives up on sending us new data as there's nowhere to put it.
21:02
<&Derakon>
The "get address of buffer used by camera" code is threadsafe and the camera will use up buffers in the order it was told about them.
21:02
< [R]>
http://xiennith.com/process.txt <-- current thing with psuedo code.
21:05
< [R]>
I have no idea how well that'd work if you're mixing languages though.
21:05
<&Derakon>
To make certain I understand you correctly: the main thread puts unprocessed images onto the queue; the worker threads consume unprocessed images and produce processed ones, and the consumer threads push processed images to the client?
21:05
< [R]>
You mixed up the main and consumer thread jobs.
21:05
< [R]>
But otherwise, yes.
21:05
< [R]>
Consumer is the input (from camera). Main thread is output (to client)
21:07
< [R]>
Ideally the consumer will have a pointer that's >n nodes back, main thread has the first node always and the processing threads have 0..n (hopefully 1->n more than 0->n-1) of the nodes.
21:08
< [R]>
Where n is the worker thread count.
21:08
<&Derakon>
Okay, the main thing I needed to understand is that there is 1 consumer, 1 main, and N worker threads.
21:08
< [R]>
Right
21:09
<&Derakon>
I can implement that in Python easily. Let's see how it goes.
21:09
< [R]>
A linked list style queue means you can add to the queue quickly and easily, and you have a guaranteed order.
21:11
<&Derakon>
Python's Queue class is FIFO and threadsafe.
21:11
<&Derakon>
I assume it uses a linked list behind the scenes.
21:11
< [R]>
Note that there's not just locks on the image data, there's also locks on being able to operate on the nodes.
21:11
< [R]>
k
21:14
<&Derakon>
fixImage is threadsafe, so those locks shouldn't be needed.
21:23 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
21:24
<&Derakon>
Hmph...
21:24
<&Derakon>
Did something wrong, getting too hungry to think straight anyway.
21:26
<&Derakon>
The weird thing is that when the experiment stops (new images stop being generated; everything is sitting in a Python Queue), my apparent framerate drops to less than a tenth what it was before.
21:26
<&Derakon>
It's like something very strange is going wrong in the send-to-client code.
21:28
<&Derakon>
...oh, missed a sleep statement, so a bunch of threads were busywaiting.
21:29
< [R]>
They're needed to tell the mainthread when the processing is done.
21:30
< [R]>
Unless you're using another signaling method you're going to need those locks.
21:30
<&Derakon>
I think actually my main limitation here may well be simply network bandwidth.
21:31
<&Derakon>
In which case all of this worrying is pointless. But we'll see.
21:31
< [R]>
Hence why I said you need to be dropping earlier :p
21:32
<&McMartin>
And if dropping is impossible, you need to either boost bandwidth or slow down the camera.
21:32
<&McMartin>
(producer/consumer architectures are classical - you should find lots of good discussions of variants online)
21:32
<&Derakon>
Or let things pile up and accept that you can't run collection indefinitely.
21:33
<&Derakon>
The main snag with this thing is the need to preserve order, I think.
21:45
<@TheWatcher>
MORE NICS
21:50 * Derakon blarghs, goes to lunch.
21:50 Derakon [chriswei@Nightstar-a3b183ae.ca.comcast.net] has quit [[NS] Quit: leaving]
21:52 * AnnoDomini finally gets his damnable Broadcom wifi NIC to work on this version of Debian.
21:53
< AnnoDomini>
OTOH, it's nice that there's a package for it now. I don't have to compile this shit and futz around with kernel modules.
22:03 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
22:03 mode/#code [+qo Vornicus Vornicus] by ChanServ
22:34 Derakon [chriswei@Nightstar-a3b183ae.ca.comcast.net] has joined #code
22:34 mode/#code [+ao Derakon Derakon] by ChanServ
23:43 Derakon [chriswei@Nightstar-a3b183ae.ca.comcast.net] has quit [[NS] Quit: leaving]
--- Log closed Sat Aug 17 00:00:27 2013
code logs -> 2013 -> Fri, 16 Aug 2013< code.20130815.log - code.20130817.log >

[ Latest log file ]