code logs -> 2013 -> Sat, 29 Jun 2013< code.20130628.log - code.20130630.log >
--- Log opened Sat Jun 29 00:00:20 2013
00:01
< RichyB>
Hrmn, I think that the (smaller, 10k square) test PNGs that I have been spitting out actually have incorrect ADLER32 checksums in the zlib-format stream.
00:01
< RichyB>
I note this because ImageMagick and Eye of Gnome (which I think is powered by libpng) appear not to care or notice!
00:01 You're now known as TheWatcher[T-2]
00:03 ErikMesoy is now known as ErikMesoy|sleep
00:05 You're now known as TheWatcher[zZzZ]
01:14 Karono [KaronoPhone@Nightstar-03f66622.optusnet.com.au] has joined #code
01:17 Karono is now known as Karono|zZz
01:33 ktemkin[work] is now known as ktemkin
01:50 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has quit [[NS] Quit: Gone.]
01:54 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has joined #code
02:16 Derakon is now known as Derakon[AFK]
02:44 Karono|zZz [KaronoPhone@Nightstar-03f66622.optusnet.com.au] has quit [Client closed the connection]
02:45 Karono|zZz [KaronoPhone@Nightstar-03f66622.optusnet.com.au] has joined #code
02:46 Karono|zZz is now known as Karono
02:50 Karono [KaronoPhone@Nightstar-03f66622.optusnet.com.au] has quit [Ping timeout: 121 seconds]
02:56 Turaiel[Offline] is now known as Turaiel
03:01 Harlow [Harlow@Nightstar-b902fba7.chi.megapath.net] has joined #code
03:05 Typh|offline [Typherix@Nightstar-7dc8031d.mi.comcast.net] has quit [Ping timeout: 121 seconds]
03:06 Typh|offline [Typherix@Nightstar-7dc8031d.mi.comcast.net] has joined #code
03:06 Turaiel [Brandon@Nightstar-7dc8031d.mi.comcast.net] has quit [Ping timeout: 121 seconds]
03:07 Turaiel [Brandon@Nightstar-7dc8031d.mi.comcast.net] has joined #code
03:19 Typh|offline is now known as Typherix
03:44 Typherix is now known as Typh|offline
03:53 Harlow [Harlow@Nightstar-b902fba7.chi.megapath.net] has quit [[NS] Quit: This computer has gone to sleep]
04:04 Harlow [Harlow@Nightstar-fe8a1f12.il.comcast.net] has joined #code
04:05 Alek [omegaboot@Nightstar-56dbba0f.in.comcast.net] has quit [[NS] Quit: here goes...]
04:32 Kindamoody[zZz] is now known as Kindamoody
05:01 * Vornicus pokes at C++.
05:05
<~Vornicus>
I have an iterator into a std::map; I wish to delete the item at the cursor and move to the next.
05:08
<~Vornicus>
ah, erase. I think.
05:08
< [R]>
http://en.cppreference.com/w/cpp/container/map/erase
05:09
<~Vornicus>
yeah, seeing this. That invalidates the iterator I use; so erasing has to happen on a copy of the iterator.
05:10
< [R]>
Use the last version?
05:11
<~Vornicus>
Actually i suspect the interval version is the one I want.
05:11 Harlow [Harlow@Nightstar-fe8a1f12.il.comcast.net] has quit [[NS] Quit: Leaving]
05:16 Alek [omegaboot@Nightstar-56dbba0f.in.comcast.net] has joined #code
05:16 mode/#code [+o Alek] by ChanServ
05:16
<~Vornicus>
oh man and it even has the good complexity
05:16
<@Alek>
?
05:17
<&McMartin>
While find on a red-black tree is O(lg n), iterating through it in sequence given a start point is O(n).
05:18
<~Vornicus>
Alek: I'm doing crazy things with C++'s std::map, specifically using the interval form of erase; I had thought that you were stuck with O(k log(n)) time, were k is the number of things to remove.
05:18
<~Vornicus>
It's actually O(k + log(n))
05:18
<&McMartin>
But next and prev are amortized constant time.
05:18 * McMartin is totally implementing these assholes in C right now.
05:18 * McMartin does *not* have this shit swapped in, and indeed if he ever know it before last week forgot it like 15 years ago.
05:19
< RichyB>
Unless you have "prev" and "next" pointers in the leaves like a btree does, I think that it's impossible for next() and prev() to be constant time.
05:19
<&McMartin>
RichyB: *amortized* constant.
05:19
<&McMartin>
If you do an inorder traversal you hit each edge exactly twice.
05:19
<&McMartin>
Linear number of edges.
05:19
<&McMartin>
Any *given* next may be up to O(log N), but you get "paid back" in subsequent ones.
05:20
<~Vornicus>
(I knew that removing a single item caused O(log(n)) rebalancing operations; I didn't think they'd come up with a way to remove many items without doing a rebalance every time, but apparently htey have.)
05:20
< RichyB>
I understand amortisation, but I was counting the wrong thing.
05:20
< RichyB>
Is the number of internal branch->branch edges actually linear? I thought it was n*log(n)
05:21
<&McMartin>
There are n-1 edges.
05:21
<&McMartin>
Because every node but the root has exactly one "parent" link.
05:21
< RichyB>
You are right. Objection withdrawn.
05:21 Alek [omegaboot@Nightstar-56dbba0f.in.comcast.net] has quit [[NS] Quit: brb]
05:21
<&McMartin>
Vorn: I don't have that algorithm handy, but I suspect there's some way to batch-rebalance after an interval deletion.
05:21
< RichyB>
Evidently you have more of this swapped in than you think. ;)
05:22
<~Vornicus>
McM: yeah, it's baked into the library. I don't need to write it.
05:22
<&McMartin>
RichyB: I've been studying the relevant chapters in CLR for the past week.
05:22 * Vornicus deletes wholesale his two-sort skip list code.
05:22
<&McMartin>
Two weeks ago, if I ever knew it, it was 15 years ago.
05:22
< RichyB>
btw, try splay trees.
05:22
<&McMartin>
I'd rather not~
05:23
< RichyB>
They're really cool. IIRC *every* operation has amortised rather than real-time bounds.
05:23
<&McMartin>
The two forms I have actual analysis/pseudocode for with decent treatments thereof handy are R-B and 2-3.
05:23 * Vornicus deletes a full third of his codebase.
05:23
< RichyB>
Well, okay, don't write an implementation, all trees are tricky.
05:23
<&McMartin>
Yeah, IIRC splay trees do the rotations on lookup operations.
05:24
< RichyB>
IIRC there's a nice splay-tree implementation in the FreeBSD source code somewhere
05:24 * Vornicus does a stupid dance.
05:24 * Vornicus writes Yet Another Goddamn typedef map...;
05:24
<&McMartin>
Yeah, this is all ultimately bounded by "man, getting C++ to link cleanly against *anything else* is a pain in the ass, maybe I can write some decently reliable and non-license-encumbered code for this
05:25
< RichyB>
http://www.freebsd.org/cgi/man.cgi?query=tree&apropos=0&sektion=0&manpath=FreeBS D+9.1-RELEASE&arch=default&format=html
05:25
< RichyB>
You might want to look at the FreeBSD code, then.
05:25
< RichyB>
It's all C, BSD-licensed. I believe that there are no non-trivial BSDisms in those tree headers.
05:26
< RichyB>
That particular pile of code is probably 2-clause or 3-clause BSD license, so you won't have to worry about the old GPL-compat headache.
05:29
< RichyB>
(When in doubt, strip-mine FreeBSD. ^_^)
05:30 Alek [omegaboot@Nightstar-56dbba0f.in.comcast.net] has joined #code
05:30 mode/#code [+o Alek] by ChanServ
05:34
<&McMartin>
This is uglier than I'd like, tbh~
05:34
<&McMartin>
But it'll be good as a template.
05:45
<&McMartin>
Well, actually, "template" is the problem~
05:45 * McMartin is going for Uniform Reference style, this is Template Instantiation Style.
06:04 ktemkin is now known as ktemkin[awol]
06:04
<~Vornicus>
okay. Planet coordinate generation takes an element from the general coordinates map and multiplies each coordinate therein by the planet's value. Then I need to generate the loadout descriptor.
06:43 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
07:20 * McMartin wraps up a draft clean-room reimplementation of red-black trees.
07:21
<&McMartin>
Time to start doing black-box comparisons against the FreeBSD version.
07:43 ErikMesoy|sleep is now known as ErikMesoy
07:46 * Vornicus gneegs
07:48 cpux [cpux@Nightstar-98762b0f.dyn.optonline.net] has joined #code
07:48 mode/#code [+o cpux] by ChanServ
07:53 Kindamoody is now known as Kindamoody|out
07:59 Turaiel is now known as Turaiel[Offline]
08:45
<&McMartin>
Insertion looks good, deletion looks hilarious
08:46 Pandemic [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [Ping timeout: 121 seconds]
08:49 Pandemic [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
08:49 mode/#code [+o Pandemic] by ChanServ
08:57
<&McMartin>
Aaaand, making progress on that one nicely
09:33
<&McMartin>
OK, things are looking up!
09:33
<&McMartin>
Except there are two cases I haven't actually exercised with this yet >_<
10:05
<&McMartin>
And, that's that!
10:06 * McMartin feeds it random input until those cases come up, checks those results against the FreeBSD reference, comes up roses
10:07
<~Vornicus>
Hooray
10:07
<&McMartin>
I should probably also put in internal consistency checks; I had some stale pointers that didn't cause any problems until I tried to do internal rotations and rendered half the data in the tree unreachable~
10:07
<&McMartin>
That got fixed, at least~
10:08
<~Vornicus>
*snrk*
10:15
<&McMartin>
Anyway, yes. There are 6 basic code paths for inserting a node into an R-B tree and 8 for deleting. I marked the blocks and then started randomly generating trees until I confirmed that all cases were being hit.
10:16
<~Vornicus>
Nice.
10:16
<~Vornicus>
mmmm, three-index-deep map assignment.
10:16 You're now known as TheWatcher
10:17
<~Vornicus>
Now to write the code that dumps the results of that, to see if I've got it right.
10:19
<~Vornicus>
...but first, I create cucumber sauce.
10:19
<&McMartin>
Heh
10:20
<&McMartin>
I had one of those coming up
10:20
<&McMartin>
And then I realized that they were integer indices of ranges known at compile time and all roughly equally likely
10:20
<&McMartin>
Which is to say, they were a chain of C arrays.
10:20
<&McMartin>
At which point I started to seriously question why I was using C++ again
10:21
<~Vornicus>
I'm using maps all over the place.
10:21
<&McMartin>
Yeah
10:21
<&McMartin>
I'm gonna need a few, at some point.
10:21
<&McMartin>
I'm already using some.
10:22
<&McMartin>
But now I have red-black trees, and I can sneak them in undetected.
10:56 ErikMesoy [Erik@Nightstar-16aba739.80-203-17.nextgentel.com] has quit [Connection reset by peer]
10:57 ErikMesoy [Erik@A08927.B4421D.FE7332.704AA5] has joined #code
11:05 * TheWatcher sighs at this code
11:07 celticminstrel [celticminst@Nightstar-8403057e.dsl.bell.ca] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.]
11:08 celticminstrel [celticminst@Nightstar-8403057e.dsl.bell.ca] has joined #code
11:08 mode/#code [+o celticminstrel] by ChanServ
11:16 * Vornicus gives TW a cheese.
11:16
<~Vornicus>
what'd it do?
11:18
<@TheWatcher>
Use char * everywhere
11:18
<&McMartin>
sadface
11:23
<~Vornicus>
decidedly sadface
11:29 Kindamoody|out is now known as Kindamoody
11:33
<@gnolam>
http://stackoverflow.com/questions/14636178/unsure-if-i-understand-transactionaw arepersistencemanagerfactoryproxy/14636231#14636231
11:33
<@gnolam>
"And this, dear children, is why Java should stop taking drugs."
11:38
< ErikMesoy>
What do you suggest, hyphenation? ;)
11:40
<@Azash>
s/Java/Spring/
11:42
<@TheWatcher>
... ouch
11:44
< ErikMesoy>
Seriously, though, a long camelcased name hardly feels like "drugs" to me.
11:45
< ErikMesoy>
It's clunky, yes, but it doesn't seem all that bad if the alternative is something like "new TransactionAwareFactories.PersistenceManagerFactory().GetProxy()"
11:56
<@Alek>
what's camelcase?
11:56
<@froztbyte>
FunctionNamesLikeThis
11:57
<@froztbyte>
s/Function//
11:58
< Syka>
isnt camelcase in python bad
11:58 * Syka does camelcase in python
11:58
< Syka>
fuck the pep8lice
12:08
< ErikMesoy>
Pep8 suggests CamelCase for class names, lowercase for function names, UPPERCASE for constants.
12:09
< Syka>
does pep8 mention variables
12:10
< ErikMesoy>
Global variables as functions, instance variables _prefixed with underscore.
12:12
< Syka>
...huh
12:12
< Syka>
i thought _ was Bad
12:14
< Syka>
ooh i see
12:14
< Syka>
hmm
12:16
<@Azash>
I use underscore prefixes for parameter names
12:17
<@Azash>
I wonder if I will end up shot in the neck some day over it
12:19
< ErikMesoy>
You should use a suffix for that, apparently.
12:19
< ErikMesoy>
"single_trailing_underscore_: used by convention to avoid conflicts with Python keyword, e.g. Tkinter.Toplevel(master, class_='ClassName')"
12:22
<@Azash>
Oh we were talking Python
12:58
<@Namegduf>
I would suggest having a simpler architecture than one involving a proxy, to a factory class, to a manager, for a persistence layer which can either be transaction aware or not.
13:00
<@Namegduf>
That's teh "on drugs" aspect. Other languages avoid it by not having things like that to name, generally.
13:00
<@Namegduf>
(Or more precisely, not making it idiomatic to have things like that)
13:46 * Vornicus tries to figure out how to be Least Grump-Making when producing this console dump.
15:21 Vornicus is now known as Vash
15:28 Kindamoody is now known as Kindamoody|out
15:34 Vash [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
15:45 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
15:59
< AnnoDomini>
http://bash.org.pl/4851307/ <- "After a full day session of fucking with Word, LibreOffice and LaTeX, I opened Paint and drew that fucking line where I fucking wanted it."
15:59 Kindamoody|out is now known as Kindamoody
16:10 ktemkin[awol] is now known as ktemkin
17:21
< AnnoDomini>
WTF. Virtual box isn't detecting any of my many USB devices.
17:21
< AnnoDomini>
I have the extension pack installed and enabled.
17:24 Typh|offline is now known as Typherix
17:30
< ktemkin>
What host OS?
17:31
< AnnoDomini>
Debian testing.
17:31
< ktemkin>
Is your user in the vboxusers group?
17:31 Derakon[AFK] is now known as Derakon
17:32
< AnnoDomini>
Lemme try to find out.
17:33
< ktemkin>
Run 'groups $USER' and see if vboxusers (and plugdev, for that matter) are in the output.
17:34
< [R]>
`groups` as said user will suffice
17:34
< AnnoDomini>
"cdrom floppy audio dip video plugdev netdev bluetooth scanner"
17:35
< [R]>
sudo usermod -aG vboxusers $USER
17:36
< AnnoDomini>
That did not seem to change the groups list.
17:37
<@froztbyte>
is this for a user you're logged in as?
17:37
< AnnoDomini>
Yeah.
17:37
<@froztbyte>
yeah then you get to run into staleness fun
17:37
<@froztbyte>
easiest fix: log out, log in
17:37
< AnnoDomini>
Roger, roger.
17:39
< ktemkin>
(Why do I seem to recall being told that usermod -aG was considered harmful?)
17:39
<@froztbyte>
yes
17:39
<@froztbyte>
but typically if you know what you're doing you're fine anyway
17:40
<@froztbyte>
(hint: most people don't)
17:40
< ktemkin>
I've always used "gpasswd -a $USER <group>".
17:40
<@froztbyte>
the Canonical Correct way these days is `adduser user group`
17:40
<@froztbyte>
ktemkin: good god, I haven't seen that in years!
17:40
<@froztbyte>
(also, that's not Canonical as in Failbuntu ShitSauce, but the actual meaning)
17:40
< ktemkin>
I don't even have adduser on my system.
17:41
<@froztbyte>
odd
17:41
<@froztbyte>
which release?
17:41
< AnnoDomini>
OK. This worked.
17:41
<@froztbyte>
(and of what, I guess)
17:41
< ktemkin>
I'm using Arch (which is rolling release)
17:41
< ktemkin>
Arch has useradd, which I'm assuming is more BSD-like.
17:41 * froztbyte giggles inappropriately
17:42
<@froztbyte>
Gentoo v2, basically
17:42
< [R]>
Arch used to have both
17:43
< AnnoDomini>
Excellent. My vbox can now see my Hydroelectric Magnetosphere Regulator.
17:46
< ktemkin>
Yeah, adduser was dropped when it was deemed buggy by the arch-maintainer of the shadow package.
17:48 Typherix is now known as Typh|offline
17:50
<@froztbyte>
lols
17:50
<@froztbyte>
link?
17:50
< ktemkin>
https://bugs.archlinux.org/task/32893
17:51
< ktemkin>
Additional comments about closing: "removed adduser in testing/shadow-4.1.5.1-3"
17:53
<@froztbyte>
uh
17:53
<@froztbyte>
adduser script does not respect SHELL in /etc/defaults/useradd
17:53
<@froztbyte>
ONE OF THOSE THINGS IS NOT LIKE THE OTHER
17:55
< ktemkin>
I suspect the maintainer may have been having a lot of difficulties with aspects of "adduser" recently, and just say "adduser", and went "screw this, dropping".
17:55
< ktemkin>
*and just saw
17:55
<@froztbyte>
I suspect that maintainer should guzzle some dicks, and then choke on them
17:58
< Syka>
well its arch
17:58
< Syka>
arch maintainers generally do need to
17:58
< ErikMesoy>
Send this to maintainer? http://www.collegehumor.com/picture/60815
18:01
<@froztbyte>
hahaha
18:01
< ktemkin>
Ah, here's the problem. Looking at the new adduser package, here's the package description: "Interactive front end to /usr/bin/useradd from Slackware Linux"
18:02
<@froztbyte>
...wat
18:02
<@froztbyte>
that's not helping my opinion of arch
18:03
< ktemkin>
http://mirror.lug.udel.edu/pub/slackware/slackware64-current/source/a/shadow/add user <--
18:03
<@froztbyte>
ah well
18:03
<@froztbyte>
the issue at hand was solved
18:04
< AnnoDomini>
Remind me, who from this channel recommended me the elonics e4000 gizmo for receiving TV on my computer?
18:04
<@froztbyte>
I mentioned it as one of the options
18:04
<@froztbyte>
(also, I still don't have mine :<)
18:04 * froztbyte hates on the .za postal service
18:04
< AnnoDomini>
I can't figure out how to go from "plug in USB stick" to "watch TV".
18:04
<@froztbyte>
(my friend who ordered his like 2 months after me got it /3 days later/)
18:05
<@froztbyte>
AnnoDomini: on linux?
18:05
< AnnoDomini>
Linux. Windows. Either.
18:05
< Syka>
mythtv?
18:05
<@froztbyte>
http://www.linuxtv.org/wiki/index.php/LinuxTV_dvb-apps
18:08
< AnnoDomini>
Okay, what package do I need to install to have the "hg" command?
18:08
<@froztbyte>
mercurial
18:14
< AnnoDomini>
OK. Installed package.
18:15
< AnnoDomini>
What now?
18:16
<@TheWatcher>
Sacrifice the goat
18:16
< ktemkin>
AnnoDomini: You're trying to install the LinuxTV software linked?
18:17
< AnnoDomini>
I'm using http://www.linuxtv.org/wiki/index.php/LinuxTV_dvb-apps . Installed the dvb-apps package.
18:17
< AnnoDomini>
I want to reach the end step of "watch TV".
18:17
< ktemkin>
http://packages.debian.org/testing/dvb-apps <-- There's a list of the contained applications.
18:18
< ktemkin>
Looks like you want gnutv.
18:20
< AnnoDomini>
Hmm. Using "gnutv" gives the help file. Using "gnutv 1" gives "Could open channel file /etc/channels.conf" as if it's an error message.
18:22
< ktemkin>
http://www.linuxtv.org/wiki/index.php/Testing_your_DVB_device
18:22
< ktemkin>
There
18:22
< ktemkin>
*There's a "using DVB apps" section
18:24 * AnnoDomini bleeds tears of bubbling pitch. This does not in any way resemble using a TV set.
18:27
< ktemkin>
A TV set typically doesn't go for $30, like most of those devices do.
18:29
< AnnoDomini>
I once had a PCI TV card. The software that came with it actually did resemble using a TV set. It can't have cost very much; I'd have remembered better if it was super-expensive.
18:33
< AnnoDomini>
Am I supposed to have a /dev/dvb?
18:33
<@froztbyte>
what does dmesg say?
18:33 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds]
18:33
<@froztbyte>
(on plugging the device in you'll get a bunch of stuff relating to it, usually with the device name as well)
18:34
<@froztbyte>
(the driver or framework can decide which device name you get)
18:34 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
18:34 mode/#code [+ao Derakon Derakon] by ChanServ
18:35
< AnnoDomini>
http://pastie.org/8094937
18:41
< ktemkin>
You can use "usb-devices" to tell whether there's an active driver associated with the device. (It's in the usbutils package.)
18:42
< ktemkin>
Something like: "usb-devices | grep "Vendor=00d7" -B 3 -A 8" should get just the information for that device
18:43
< ktemkin>
That'll output the device's info, including a list of interfaces and the associated drivers
18:44
< ktemkin>
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=01 Driver=usbhid <-- There's the interface for my keyboard, for example, which is using the usbhid driver. If there's no relevant driver, you'll see Driver=(none).
18:44
< AnnoDomini>
Vendor is actually 0ccd.
18:45
< ktemkin>
(Whoops, I grabbed the product ID from your dmesg output, not the vendor ID-- but you get the point.)
18:45
< AnnoDomini>
http://pastie.org/8094956
18:48
< AnnoDomini>
OK. No driver, it seems.
18:50
< ktemkin>
What kernel version are you running?
18:52
< ktemkin>
(uname -r)
18:52
< AnnoDomini>
"uname -r" gives "3.2.0-4-686-pae". I have like three versions on this box, but I'm not using the newest one, because for some reason the wifi doesn't work there.
18:53
< ktemkin>
https://github.com/ambrosa/DVB-Realtek-RTL2832U-2.2.2-10tuner-mod_kernel-3.0.0 <-- There's the driver.
18:54
< ktemkin>
Looking at the ubuntu intallation instructions, it looks like they should work on Debian.
18:54
< AnnoDomini>
Great. Trying.
19:02
< AnnoDomini>
make failed with a fatal error.
19:02
< AnnoDomini>
"(snip)foundation.h:19:21: fatal error: dvb-usb.h: No such file or directory"
19:04
< AnnoDomini>
dvb-usb.h appears to be present in both include directories.
19:08
< AnnoDomini>
Copying the .h files to the main directory seems to have solved it.
19:19
< AnnoDomini>
Argh. I'm not getting the expected messages at the end.
19:20
< AnnoDomini>
Well, sort of.
19:20
< AnnoDomini>
They're considerably different from the liste ones.
19:20
< AnnoDomini>
+d
19:21
< AnnoDomini>
http://pastie.org/8095030
19:22
< ktemkin>
lsmod | grep dvb ?
19:23
< ktemkin>
(Also, I'd try unplugging and replugging your device and see if there's now a driver associated with the device.)
19:23
< ktemkin>
usbcore: registered new interface driver dvb_usb_rtl2832u <-- That looks promising; I'd expect that you might see driver=dvb_usb_rtl2832u when you run usb=devices this time.
19:25
< AnnoDomini>
http://pastie.org/8095039
19:26
< ktemkin>
Yeah, it looks like the dvb_usb_rtl2832u kernel module's loaded.
19:27
< AnnoDomini>
usb-devices still says that there's no driver.
19:34 Kindamoody is now known as Kindamoody[zZz]
19:36
< AnnoDomini>
Ideas?
19:37
< ktemkin>
There's a description of how to enable debug mode for that module on the bottom of the README for the git repo.
19:37
< ktemkin>
You could try that and see what shows up in your dmesg output.
19:40
< AnnoDomini>
Nothing much, apparently.
19:48 * Derakon mutters at grep, wonders why "grep -E '.h.' /usr/share/dict/words" is turning up words with more than three letters.
19:48
<&Derakon>
...oh right, beginning/end of line.
21:09 Turaiel[Offline] is now known as Turaiel
22:21 Turaiel is now known as Turaiel[Offline]
22:29 * TheWatcher eughs
22:29
<@TheWatcher>
This would be hilariously simple in perl
22:30
<@TheWatcher>
In C/C++, not so much
22:31
<@TheWatcher>
My code is being passed pointers to sScrMsg structures by the dark engine, for Reasons I need to be able to allow people using my scripts to access fields in those messages by name.
22:33
<&Derakon>
So you need the equivalent of getattr(object, userString)?
22:33
<&Derakon>
(getattr being the Python function for "look up the field with this name in this object")
22:33
<@TheWatcher>
Yep
22:33
<&Derakon>
I guess in Perl it'd just be object[userString].
22:33
<&Derakon>
I...guess you could just have every object maintain a mapping of strings to member fields.
22:33
<@TheWatcher>
Well, usually object -> {userString}, but something along those lines, yes.
22:34
<&Derakon>
I'm very rusty on any Perl that doesn't commonly show up in my one-liners.
22:38
<@TheWatcher>
(it's more complicated because there are actually something like 80 different message types. Each message type is a subclass of sScrMsg that adds message type specific fields to the standard message fields)
22:40
<@TheWatcher>
(so I need to work out what sort of message I'm looking at, whether the field the user has requested exists for that message type, and return the value if it does.)
22:49 ErikMesoy is now known as ErikMesoy|sleep
22:53
<@TheWatcher>
I'm actually wondering if the easiest way to do this would be to have a std::map with strings containing "MessageType.field" as the key and accessor function pointers as values.
22:57
<@TheWatcher>
Then have a function that works out the message type string, slaps the field name on the end, does a find(), and if a match is found call the accessor function.
22:57
<@TheWatcher>
Bit Heath-Robinson, but it should work.
23:04 Turaiel[Offline] is now known as Turaiel
23:05
<@TheWatcher>
... 649 function pointers.
23:06
<&ToxicFrog>
Awesome.
23:14 * McMartin rocks out entirely too hard to the Self Destruct soundtrack
23:14
<&McMartin>
TheWatcher: Computed GOSUB based on the MessageType.field enum~
23:15
<&McMartin>
Oh, except they're strings, so no "computed"
23:15
<&McMartin>
yeah, map
23:15
<&McMartin>
Also, welcome to ML/Haskell datatype declarations >_>
23:16
<@TheWatcher>
(well, unordered_map, I guess - ISTR they are faster for individual item lookup, rather than iteration, which is what I will be needing)
23:16
<&McMartin>
(At N=649 it's not clear that the asymptotic improvement will help.)
23:16
<&McMartin>
(As hashing a string requires accessing all characters and comparison doesn't)
23:17
<@TheWatcher>
Hm, point
23:17
<&McMartin>
That said
23:17
<&McMartin>
Premature optimization: square root of all evil
23:21 Orthia [orthianz@3CF3A5.E1CD01.B089B9.1E14D1] has quit [Ping timeout: 121 seconds]
23:23
<&McMartin>
Ah yes, of course. Random lootings of Modarchive.
23:23
<&McMartin>
(The Self Destruct song is http://www.youtube.com/watch?v=NiAgWhgp_mw )
23:39 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
23:39 mode/#code [+qo Vornicus Vornicus] by ChanServ
23:42 You're now known as TheWatcher[t-2]
23:50 You're now known as TheWatcher[zZzZ]
--- Log closed Sun Jun 30 00:00:34 2013
code logs -> 2013 -> Sat, 29 Jun 2013< code.20130628.log - code.20130630.log >

[ Latest log file ]