code logs -> 2013 -> Mon, 14 Jan 2013< code.20130113.log - code.20130115.log >
--- Log opened Mon Jan 14 00:00:47 2013
00:13 You're now known as TheWatcher[T-2]
00:21 You're now known as TheWatcher[zZzZ]
00:45
<&ToxicFrog>
Reiv: because most people who play space sims use Real Joysticks anyways.
00:46
<&ToxicFrog>
And because space sims in general are perceived as a dead genre.
00:46
<&McMartin>
Speaking of, I oughta hook up my never-unpacked Real Joystick and fire up WC1 again
00:46
<&McMartin>
Heh
00:46
<&McMartin>
I like to say Freespace 2 was so good it killed the genre~
00:46
<&ToxicFrog>
That said, I've heard that the 360 controller kicks a whole mess of ass in I-War 2.
00:49
<&ToxicFrog>
McMartin: that would be pretty unheamy given that it ended on a cliffhanger~
00:49
<@Reiv>
I-War 2 being?
00:50
<@Reiv>
And I don't have a Real Joystick, nor have I ever found one I liked, so...
00:50
<&ToxicFrog>
Independence War 2: Edge of Chaos.
00:50
<@Reiv>
Also the joystick ends up giving a bias towards Fighter WWII shooting systems.
00:50
<@Reiv>
Though Freespace got a pretty decent compromise.
00:50
<&ToxicFrog>
A space sim in which you pilot a corvette (in the HW sense, ie, a bigger-than-strike-craft-but-smaller-than-everything-else ship with a crew of 3-6) with newtonian physics.
00:51
<@Reiv>
That could be fun. Is it actually fun?
00:52
<&McMartin>
Freespace is basically TIE Fighter II, so.
00:52 * Reiv notes interestingly that he uses the term 'corvette' for /exactly the same kind of ship/.
00:52
<@Reiv>
McMartin: Er, whoops
00:52
<&ToxicFrog>
Ok, more ordered thoughts on this: sims in general, like RTSes, are generally seen as a PC genre. This may have something to do with the overall trend towards modeling control systems in greater and greater detail that ultimately culminates in stuff like Steel Battalion (which was a console game, but also required a huge custom controller with a thousand switches) or Falcon 4.0 (which has a manual that is basically the actual Falcon
00:52
<&ToxicFrog>
operations manual with install instructions prepended).
00:52
<@Reiv>
Not Freespace, that /is/ WWII shooting
00:52
<@Reiv>
Free/lancer/.
00:52
<@Reiv>
That system worked kind of OK.
00:53
<@Reiv>
But retained the old issue of being unable to shoot in a different direction to where you were steering.
00:53
<@Reiv>
This is what I want to do.
00:53
<&McMartin>
Then there was MANTIS, an inertial spaceflight game that was carefully worked out and unplayably shitty
00:53
<@Reiv>
Of course, on a joystick this is difficult unless you, I don't know, use the hat to steer your ship or something.
00:53
<&ToxicFrog>
On the console, you pretty much only get Ace Combat and its descendants, which aren't at all simmy; they're wholly on the "arcade" end of the sim<->arcade axis.
00:54
<&ToxicFrog>
Hybrids like Wing Commander (sim mechanics, arcade controls) are pretty much dead, AFAICT.
00:54
<&ToxicFrog>
Also, I cannot think of a single space sim from the past, oh, ten years that would be at all playable on a console without a complete control redesign; even I-War 2 requires you to go to the keyboard for some stuff.
00:54
<@Reiv>
Isn't that what Star Citizen was hoping to solve?
00:55
<&ToxicFrog>
(also, how is Freelancer not WW2 shooting, the mechanics are eqv. to Freespace except you have a quick-heal button and some gimbaling on the weapons)
00:57
<@Reiv>
It's the gimbaling, combined with the ability to point your mouse at something and shoot at it without nessisarily aligning the ship or requiring the ship head in that direction.
00:58
<&ToxicFrog>
Er
00:58
<@Reiv>
OK: You could shoot left while flying straight, or you could shoot left while flying left (chase-the-cursor movement)
00:58
<&ToxicFrog>
You couldn't do that in Freelancer, though. The control scheme is identical to Freespace's (or Wing Commander's) "mouse joystick emulation" mode, except that your guns turn to face the target faster than the ship does.
00:58
<&ToxicFrog>
You can't shoot at something you aren't facing/turning towards, and you can't face towards something without moving towards it.
00:59
<@Reiv>
I want it taken further so I can request the ship turn 'down' while I shoot 'left'.
00:59
<@Reiv>
This would have actually been extremely useful in even Freelancer itself!
00:59
<@Reiv>
Given that the best way to fight in a transport was in Turret Mode, but to do it you ended up flying straight ahead and thus getting hit by all the bombs and asteroids >_>
01:00
<&ToxicFrog>
I-War lets you independently rotate the ship and the turret, and since it's newtonian you can also rotate the ship without changing your vector to bring your spinals to bear
01:01
<&ToxicFrog>
And some FS2-style sims (Tachyon) have a "lock vector" command that temporary disables orientation/vector matching
01:03
<@Reiv>
Right.
01:03
<@Reiv>
What I want is to be able to change my vector in one direction while directing my weapons in another.
01:04
<@Reiv>
As opposed to 'both must be the same' or 'you can fiddle with either, but one at a time'
01:04
<&ToxicFrog>
That's an HCI issue as much as anything else; you need to be able to independently manipulate (and keep straight) four axes and look in two directions at once.
01:04
<@Reiv>
HCI?
01:04
<&ToxicFrog>
Human/Computer Interface.
01:04
<@Reiv>
Oh, ha.
01:04
<@Reiv>
Yes.
01:05
<@Reiv>
Which is why I specified /controller/ instead of /joystick/
01:05
<@Reiv>
That way you have two joysticks.
01:05
<@Reiv>
The second part of looking in two directions at once, I will freely grant is harder~
01:05
<&ToxicFrog>
I suspect the reason you don't see this a lot is not because it's technically difficult (it's not) or because developers don't think of it, but because it's a UI design and testing nightmare.
01:05
<@Reiv>
OTOH X could ssssort of do it.
01:05
<@Reiv>
You could have a window looking ahead while you spun the turret
01:06
<@Reiv>
But you could only either spin the turret or steer the ship, which rather defeated the point a bit.
01:10
<&ToxicFrog>
You can do it with MFDs, but that still leaves the problem of the user being able to focus on both at once
01:11
<&ToxicFrog>
Which is why it's much more common to restrict it one or the other at a time, optionally with an AI turret gunner/autopilot to handle the part you aren't.
01:17 Vornotron [vorn@Nightstar-221158c7.sd.cox.net] has joined #code
01:18 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Client exited]
01:19 Vornicus [vorn@Nightstar-221158c7.sd.cox.net] has quit [Ping timeout: 121 seconds]
01:21 Vornotron [vorn@Nightstar-221158c7.sd.cox.net] has quit [Ping timeout: 121 seconds]
01:22 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
01:22 mode/#code [+qo Vornicus Vornicus] by ChanServ
01:23 syksleep_ [the@Nightstar-ee1cef6a.iinet.net.au] has joined #code
01:24 syksleep [the@A6D346.0C1313.97001D.1140D4] has quit [Ping timeout: 121 seconds]
01:30 syksleep_ is now known as Syk
01:34 * iospace pokes Syk with Syk
01:36
< Syk>
wut
01:53
<@Alek>
now you're thinking with portals.
01:54 * Reiv pokes Syk with Syk's Syk
01:55
<@Alek>
O_o
01:55
<@Reiv>
Now you're thinking with Portal's Portals!
01:56 * McMartin drops 150 gallons of Repulsion Gel on Reiv.
01:57 * Reiv is finds the result... repulsive.
01:57 * Reiv (needs to get a client where he can actually see what he's typed onto the line, too.)
01:57
< Syk>
heh
02:02
<@Reiv>
TF: The client is good, but unless one is careful where one puts their mouse, Firefox puts up a link-location popup thingy on the bottom left of the screen... which is also where the text input cursor lives.
02:02
<&ToxicFrog>
helpful
02:02
<@Reiv>
Yah.
02:02
<@Reiv>
So usually I type blind, and this works. Mostly~
02:04
< Syk>
haha
02:04
< Syk>
i love when i'm looking something up on an apple site
02:04
< Syk>
and it errors and shows a red hat server running apache
02:06
<@Alek>
ahaha
02:08
<&McMartin>
Speaking of
02:08
<&McMartin>
Programs in-house MS devs do not use: Visual Studio
02:08
< Syk>
i honestly wonder if there is a vim/emacs war inside Microsoft
02:09
< Syk>
"Vim!" "Emacs!" "Vim!" "Emacs!" "Notepad!" "..."
02:09
<@Reiv>
McMartin: I should bloody hope not
02:09
<@Reiv>
It's fine for making apps and the like
02:09
<@Reiv>
But the efficiency hit would be rather noticable indeed in, say, Word.
02:10
<&McMartin>
Probably
02:10
<&McMartin>
Though it *has* gotten better
02:10 * McMartin uses MSVS2008 at work
02:10
<&McMartin>
And that's in the hundreds of KLOC
02:16
< Syk>
McMartin: 2010 is horrific
02:17
< Syk>
McMartin: 2010 on a quadcore Sandy Bridge w/ an actual graphics adapter is slower than 2008 on an early C2D
02:17
< Syk>
and this is with about maybe 10 KLOC
02:17
< Syk>
hell, even starting it takes fucking minutes
02:18
< Syk>
and GOD FORBID if you ever wish to anger the DEBUGGER GODS
02:18
< Syk>
for he will unleash his This Application Has Stopped Responding white screen of fury
02:19
<&McMartin>
Ugh
02:19
<&McMartin>
2008 was Pretty Solid, IMO
02:19
<&McMartin>
Though still an awful debugger
02:19
<&McMartin>
You can't beat WinDbg on a Windows platform
02:19
< Syk>
i dont think there is one useful debugger
02:20
< Syk>
every debugger comes with caveats that make it an ass to use
02:20
<&McMartin>
I've done amazing things with WinDbg, though it admittedly is commanded via ancient forbidden rituals
02:20
<&McMartin>
But so is gdb, so...
02:21
< Syk>
hehe
02:22
<&McMartin>
"steep learning curve" is the mildest of the caveats, because once you *cross* it, you then stand across your puny application and kernel space like a digital colossus
02:22
<&McMartin>
At least until you get knocked down by a passing navy that wants target practice
02:23 * McMartin goes and looks it up
02:24
<&McMartin>
I guess the Colossus fell to an Earthquake
02:24
<&McMartin>
Living as I do on the Ring of Fire I won't tempt fate by replacing that~
02:32 * Syk derps about
02:32
< Syk>
WELP time
02:32
< Syk>
time for like
02:32
< Syk>
stuff
02:32
<&McMartin>
yay stuff?
02:32
< Syk>
not really :(
02:32
< Syk>
gotta go to old house and help my mother
02:33
< Syk>
theyve not finished moving out
02:33
< Syk>
and they have to be done by tomorrow
02:36
< Syk>
derp off I go
02:44
< mac>
can pointers be used with arrays?
02:47
<&ToxicFrog>
You need to both contextualize and expand that
02:48
<&ToxicFrog>
First answer (51% confidence): yes
03:12 Kindamoody[zZz] is now known as Kindamoody
03:12 Nemu [NeophoxProd@Nightstar-a984b1cd.asahi-net.or.jp] has quit [Connection reset by peer]
03:28 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
04:03 mac [mac@Nightstar-fe8a1f12.il.comcast.net] has left #code ["Leaving"]
04:28 Nemu [NeophoxProd@Nightstar-775b6155.asahi-net.or.jp] has joined #code
05:05 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
05:06 mode/#code [+ao Derakon Derakon] by ChanServ
05:44 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Operation timed out]
05:44 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code
05:45 mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ
06:14 ErikMesoy|sleep is now known as ErikMesoy
06:28 Derakon is now known as Derakon[AFK]
06:56 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
08:06 Alek [omegaboot@Nightstar-56dbba0f.in.comcast.net] has quit [Ping timeout: 121 seconds]
08:06 Alek [omegaboot@Nightstar-56dbba0f.in.comcast.net] has joined #code
08:06 mode/#code [+o Alek] by ChanServ
08:39 You're now known as TheWatcher
10:05 Barrell_R [richardb@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
10:08 Kindamoody is now known as Kindamoody|out
10:28 Barrell_R [richardb@Nightstar-3b2c2db2.bethere.co.uk] has quit [Ping timeout: 121 seconds]
10:28 Vornotron [vorn@ServerAdministrator.Nightstar.Net] has joined #code
10:31 Barrell_R [richardb@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
10:31 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
10:44
< Vornotron>
oh my god, it's still thinking.
10:45 * Vornotron watches his python process pass half a gig trying to find a solution the The Impassible Gate 3
10:47
<@TheWatcher>
Ouch
10:47
< Vornotron>
I think part of it might be an explosion in redundant as-yet-unvisited states.
10:50
< Barrell_R>
You're using pypy, right? :)
10:50 Barrell_R [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.]
10:52 Barrell_R [richardb@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
10:52
< Vornotron>
This must be a seriously ridiculous problem, I'm into 15 minutes of thought.
10:54 * Vornotron kills it, adds a check to make sure he's not adding already-visited states to the upcoming queue
11:08 * Vornotron kills again, adds diagnostics. after 3 minutes it's at 237k states visited.
11:09
< Syk>
that's a whole lot of states
11:09
< Vornotron>
It's a few.
11:10
< Vornotron>
5 minutes: 1,000,000 things popped off the to-visit queue, 325k states visited
11:21
<@iospace>
the next time i see someone go "Cray cray" I'm going to ask "Why are you talking about a computer company?"
11:25
< Vornotron>
20 minutes have passed, 679,276 states, 2244000 pulled items. This is, well, cray cray
11:26
< Vornotron>
Gigabyte passed.
11:30 * iospace facepalms at Vornotron
11:31
< Vornotron>
I may need to hand this off to a computer with more beef, jesus
11:36 d4de [olorin@687AAB.1E386D.9CFB14.25391C] has quit [Ping timeout: 121 seconds]
11:36 * TheWatcher works on one of the most horribly complicated, challenging problems in programming
11:37
<@TheWatcher>
Naming things
11:37
< Vornotron>
Naming?
11:37
< Vornotron>
I was right!
11:39
< Vornotron>
I'm actually kind of amazed there are this many states that are easier to get to than the solution...
11:46 Vornotron is now known as Vornicus
11:46 mode/#code [+qo Vornicus Vornicus] by ChanServ
11:49
<~Vornicus>
1 million states
11:55
< ShellNinja>
Has the USA expanded when I wasn't looking?
11:55
<~Vornicus>
har. no, I'm watching my klotski solver work.
11:55
<~Vornicus>
it's... frightening how hard the puzzle it's working on is.
12:05
<~Vornicus>
right, it's been an hour, I need sleep
12:06
<~Vornicus>
I will ask the computer again tomorrow, with more diagnostics if I can figure out how to add them
12:06
<~Vornicus>
if I manage to find a way to reduce ram usage a bit more I'll be happy.
12:07
<~Vornicus>
1,160,601 states examined, and none of them have the goal piece in place.
12:08
<@iospace>
TheWatcher: you have no idea how many times i've stared at code going "What do i name this variable!"
12:09
<@Azash>
iospace: Follow the unofficial linux naming convention
12:09
<@iospace>
Azash: uhm...?
12:09
<@Azash>
make up a name of around 60-80 words, form an initialism, and pick the letters matching fibonacci numbers out
12:09 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: ]
12:10
<@Azash>
And then add a 'd' or 'lib' at the end to let people know you mean business
12:11
<@iospace>
...
12:11
<@iospace>
yeah no
12:13
<@iospace>
my boss would flay me alive for that
12:29
<&ToxicFrog>
Nonono, 'lib' goes on the front
12:36
< Barrell_R>
Also, "lib" prefix and "d" suffix are mutually exclusive.
12:46 * iospace beats TheWatcher with aprotocol
12:47
<@iospace>
...
12:47
<@iospace>
sorry TheWatcher
12:48 * iospace beats ToxicFrog with a protocol
12:48
<@iospace>
lag
12:49
<&ToxicFrog>
Barrell_R: untrue! There are a few 'libthingd' libraries, usually either containing most of a thingd implementation, or a protocol library to make it easy to write clients that connect to a thingd.
12:50
<&ToxicFrog>
libnscd, for example.
12:50
< Barrell_R>
Touch?.
12:50
< Barrell_R>
The latter seems like a mistake, though.
12:50
< Barrell_R>
Should be libthingc.
13:01
<@RobinStamer>
libhttpd
13:01
< Barrell_R>
RobinStamer: yeah, that's a good example of the former.
13:21
<@Azash>
14:19 <+brundlefly> i started writing a billiards game, but got off track and ended up writing a scheme interpreter
13:21
<@TheWatcher>
Easy done.
13:26
< Barrell_R>
They both contain round () things.
13:34 Barrell_R [richardb@Nightstar-3b2c2db2.bethere.co.uk] has quit [Ping timeout: 121 seconds]
14:10 Nemu [NeophoxProd@Nightstar-775b6155.asahi-net.or.jp] has quit [Client closed the connection]
14:11 Nemu [NeophoxProd@Nightstar-32ea4034.asahi-net.or.jp] has joined #code
14:26 * TheWatcher hairpulls at apache rewrite rules
14:48 Reiv [NSwebIRC@A3BDC3.5BE3EC.B8847E.5ADB9D] has quit [Ping timeout: 121 seconds]
15:16 Barrell_R [richardb@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
15:17
<@TheWatcher>
blegh, why doesn't RewriteCond support variable expansion in the pattern, damnit?
15:17
< Syk>
TheWatcher: because Apache wishes to destroy your hopes and dreams
15:18
<@TheWatcher>
It's too late; Tomcat got there first.
15:20
< Syk>
hee
15:20
< Syk>
i gave up on making Twisted understand vhosts
15:20 * Syk has solved her problems with Varnish :D
15:21
< Syk>
just run a shitload of twisted instances, 1 for each app, multiplex with Varnish
15:21
< Syk>
problems solved
15:24
< Barrell_R>
Varnish is a surprisingly nice place to put really-complicated URL routing code, just for the fact that its config is a straightforward imperative language.
15:25
< Syk>
i started varnish
15:25
< Barrell_R>
Bonus: if (req.url ~ "pattern") {}, is significantly easier to understand than RewriteRule pattern replacement [chain]
15:25
< Syk>
put some stuff in the VCL
15:25
< Syk>
and... it worked
15:26
< Syk>
it was very VERY refreshing
15:26
< Syk>
this means i can have each instance of my application running seperately on a different port internally
15:26
< Barrell_R>
Just don't use any of Varnish's backend health checking or load-balancing features; they all kinda suck.
15:26
< Syk>
with Varnish doing routing by the host
15:26
< Barrell_R>
Use HAProxy instead.
15:27
< Barrell_R>
*Use HAProxy for load-balancing between multiple instances of the same app.
15:27
< Syk>
eg. "sb.thing.com" -> :8081, "sb.stuff.com" -> :8082
15:27
< Barrell_R>
Varnish has code for that but it isn't as nice.
15:27
< Barrell_R>
Apache has code for that but it's awful ;P
15:27
< Syk>
and then each can be a different version, have independent stuff in them, and I can pull and start ones up
15:28
< Syk>
AND it's good because my app is in Python + Twisted, which is single threaded
15:28
< Syk>
and I'm not the best at async programming
15:28
< Syk>
so, if I do resort to blocking calls, it only stuffs up one app rather than them all
15:29
< Syk>
which I find great
15:29
< Syk>
if it caches things too, brilliant
15:30
< Syk>
it looks like it can do some fancy folder stuff
15:30
< Syk>
so I can have / be the python app, but /img/ be a different backend
15:31 * TheWatcher is just trying to moderately idiot-proof-ish his pathinfo rewriting trickery, as right now it's slightly different depending on whether the webapp is in the root or a subdirectory
15:34 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has quit [[NS] Quit: .]
15:35 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
15:35 mode/#code [+o Syloq] by ChanServ
15:47 Barrell_R is now known as RichyB
15:59 Nemu [NeophoxProd@Nightstar-32ea4034.asahi-net.or.jp] has quit [Ping timeout: 121 seconds]
15:59 Nemu [NeophoxProd@Nightstar-fd87b668.asahi-net.or.jp] has joined #code
16:03 Xires is now known as ^Xires
16:08 ^Xires is now known as Xires
16:14 Syk is now known as syksleep
17:12
<@iospace>
90 minute bugfixes fuckyeah
19:27
<@froztbyte>
<Barrell_R> Bonus: if (req.url ~ "pattern") {}, is significantly easier to understand than RewriteRule pattern replacement [chain]
19:27
<@froztbyte>
the *entire* apache URL routing system is a pain in the arse.
19:27
<@froztbyte>
Alias handling, module substitution, sending stuff to specific places, all of it
19:28
<@froztbyte>
I've basically entirely given up on Apache's httpd and just use nginx instead these days
19:28
<@froztbyte>
it's a bit C-esque on the config style, but at least the scoping is a hell of a lot better than the spaghetti mess you may get with httpd :/
19:29
<@froztbyte>
and the "but with apache you can just drop some PHP code on a server and it works" is near-complete bullshit anyway and it makes me want to stab people -_-
19:39 * TheWatcher vaguely considers trying nginx
19:39
<@TheWatcher>
How does it handle perl?
19:43
< RichyB>
froztbyte: I use nginx for my personal stuff. I'd love to move to it in work but everyone else here knows Apache already and no one wants to burn time learning.
19:43
<&McMartin>
To be fair, that's a fairly strong argument unless you've got a bit of spare devtime to convert, which as a rule you won't.
19:43
< RichyB>
TheWatcher: there's no mod_perl, but if your Perl webapp is written with FastCGI then you're pretty much golden.
19:44
<@froztbyte>
yeah, that
19:44
<@froztbyte>
but who uses perl anyway?~
19:45
<@froztbyte>
RichyB: I've found that pimping it subtly on internal stuff first is a neat way
19:45
<@froztbyte>
company wiki server, etc
19:45
<@froztbyte>
people are okay with playing there
19:45
< RichyB>
McMartin: I didn't say their reasons were irrational, but I'm not fond of working exclusively people who hate learning anything new.
19:45
<&McMartin>
True enough
19:45
< RichyB>
Resistance to change here is higher than I'd have set it. Not infinite, just very high.
19:45
<&McMartin>
That's a different beast, though
19:46
<@froztbyte>
and then when they feel a bit more confident with it in active use, there's less resistance to a suggestion for using it in some situation where it's actually good
19:46 * McMartin nods
19:46
<&McMartin>
Hmm
19:46 * McMartin reads about FastCGI
19:46
<@froztbyte>
our caches support windows caching, for instance
19:46 * McMartin <-- not a web guy
19:46
<@froztbyte>
and the server platform that dishes up those files is nginx
19:46
<@froztbyte>
apache just couldn't do it well enough, at all
19:47
< RichyB>
TheWatcher: oh, apparently Catalyst::Engine::HTTP::Prefork is a very easy way to get Perl webapps running with any httpd (nginx, apache, varnish, haproxy, whatever).
19:48
<@RobinStamer>
I like how FastCGI is basically almost-HTTP
19:48
< RichyB>
You just proxy requests through from whatever your frontend httpd is to a Perl process that's talking http on a socket.
19:50
<@TheWatcher>
RichyB: yeah, catalyst won't work for me, for a bunch of reasons.
19:51
< RichyB>
Is Catalyst one of those weird let's-pretend-it's-nonblocking libraries like Twisted?
19:53
<@froztbyte>
I don't think twisted really tries to pretend they're that ;)
19:54
<@froztbyte>
the design goal is "do stuff async", and "let's try really hard to not be blocking" goes well with that as a worthy goal to try for
19:55
<@TheWatcher>
RichyB: no, it's more of a gigantic attempt to do everything that works very well provided that everything you need to do fits into their way of doing it
19:55
<@froztbyte>
lulz
19:55
<@froztbyte>
you mean like Django, Rails, etc? ;D
19:56
<@TheWatcher>
More or less.
19:57
< RichyB>
froztbyte: meh, I think that the entire goal is an insane idea. So you break every request handler up into a million little pieces that are mutually concurrent (in that their mutual ordering is undefined except where you put in explicit dependency information)...
19:57
< RichyB>
...congratulations, you have reinvented threads, badly.
19:57
< RichyB>
If you're doing this (hi, Python!) to get around the fact that your runtime has awful threading support then that's understandable, but still, ehhhhh icky.
19:59
<@froztbyte>
except how many people have ever done threads well?
19:59
<@froztbyte>
async event-based is still a far easier concept to grok and get right for the majority of people
19:59
<@froztbyte>
so there's worth in that
19:59
<@TheWatcher>
(I mean, my stuff is as guilty of it, but at least in my case the stuff is designed to do stuff in the way I've needed to get it done... which I also admin may not be the best way, but I'm not convinced there is a best way)
20:00
<@TheWatcher>
*admit
20:02
<@TheWatcher>
(Of course, identifying the /worst/ way is easy: anything involving the words "using PHP"~)
20:03 Kindamoody|out is now known as Kindamoody
20:05
<@froztbyte>
hehe
20:05
<@froztbyte>
RichyB: well, there's another thing here; I say all of that, yet the questions that end up in #twisted at times makes me wonder..
20:06 Kindamoody is now known as Kindamoody[zZz]
20:12
< RichyB>
Plenty of people have done threads well! In particular, everybody who has ever achieved working software in a framework where concurrent requests interact with each other only through a single database is using parallelism quite happily.
20:13
< RichyB>
You'll note that it's pretty constrained, with all of the race issues pushed into the DB itself, but that works just fine.
20:21 d4de [olorin@4B91FF.00BEE6.E0802B.C554B9] has joined #code
20:23
<&ToxicFrog>
Personally I find threads a lot more pleasant to use than async callback/event style setups.
20:24
<@froztbyte>
I can't say I prefer one over the other
20:24
<&ToxicFrog>
That said, I thought Twisted was one of those "looks like threading" frameworks like Copas, where it's not concurrent but you write it as though it was?
20:24
<@froztbyte>
the first time I ever wrote threaded code (first year in uni), it had an async/event style model
20:27
<&ToxicFrog>
Yeah, sorry, I'm talking "what it looks like to the programmer" here, not "how it's implemented"
20:27
< RichyB>
ToxicFrog: yes, Twisted is a coroutine framework.
20:27
< RichyB>
IMHO a terrible compromise. If you take code that includes blocking I/O but doesn't shit on global state, and run it in a threaded runtime, it works perfectly.
20:28
< RichyB>
If you take code that blocks and try to put it into something like Twisted, well, you can't. You have to rewrite it with all the I/O made nonblocking.
20:29
<&ToxicFrog>
Wait, twisted doesn't transparently wrap that stuff?
20:29
<&ToxicFrog>
The frameworks I'm used to that do this (copas, luv) transparently wrap the usual blocking APIs to yield
20:30
<&McMartin>
I was going to say "it seems like you could easily do that mechanically" but then I realized I was sneaking in "using call/cc"
20:30
<&ToxicFrog>
So you can take blocking code and run it in copas unmodified and it'll get a coroutine to itself and play nice with the select() loop.
20:30
<&McMartin>
Though I guess yield does something roughly equivalent.
20:30
< RichyB>
I don't believe that it does. Python's flow-control mechanisms are deliberately very primitive.
20:31
<&McMartin>
Yeah, but it *has* yield.
20:31
< RichyB>
Python lacks both coroutines (except for generators, which unfortunately don't suffice for various reasons) and call/cc.
20:31
<&ToxicFrog>
Yield the coroutine operation, not yield the python generator keyboard
20:31
<&ToxicFrog>
*keyword
20:31
<&ToxicFrog>
(copas is not a python library)
20:32
< RichyB>
McMartin: yeah, not good. If I'm writing a generator f() and I call g(), g() can't yield to f's caller like f could.
20:32
<&McMartin>
The whole point of things like Twisted is that they are Not Python, but languages that looks suspiciously like it with different semantics.
20:36 * TheWatcher ponders, dev blog update, or skyrim, decides to sod it and go kill dragons
20:37
<&McMartin>
DARGONZ
20:37
< RichyB>
McMartin: yeah, that, exactly. "Not Python" is problematic. 90% of the code on the Cheese Shop is ordinary Python.
20:37 Reiv [NSwebIRC@A3BDC3.5BE3EC.B8847E.5ADB9D] has joined #code
20:37 mode/#code [+o Reiv] by ChanServ
20:38
<&McMartin>
Right, so, you're using Twisted in the first place because You Can't Use Python.
20:38
< RichyB>
TheWatcher: token update where you just post a Skyrim screenshot to your blog, title "I would have written something but eh busy"
20:40
<@TheWatcher>
heh
20:40
<&ToxicFrog>
McMartin: ideally, though, it should be source compatible with python to the point that you don't need to completely rewrite your existing singlethreaded-blocking code to get it to play nice.
20:40
<@TheWatcher>
Now that would just be silly.
20:42
<@froztbyte>
RichyB: well, it's not like Ordinary Python is any good :/
20:43
<@froztbyte>
I mean, see what they did in Python 3, and it's a pretty good indication of the level of care that you can find in the standard library
20:43
<@froztbyte>
but then
20:43
<@froztbyte>
nearly all software sucks
20:43
<@froztbyte>
so *shrug*
20:47
< RichyB>
There are only a few things that I can find to really strongly dislike about Python on a day-to-day basis.
20:47
< RichyB>
Total lack of thread-parallelism isn't quite at the top of the list, but it's close.
20:48
< RichyB>
*Actually* top of the list is the fact that the primary implementation is an interpreter that looks like it slimed its way up here from the bad end of the 1990s.
20:49
<@froztbyte>
well, yes
20:49
< RichyB>
CPython is sometimes really awful because you get to write fairly dumb code to get any performance out of it at all.
20:49
<@froztbyte>
cpython's default interpreter sucks big ass
20:49
<@froztbyte>
I use ipython a lot, and bpython also more recently
20:49
< RichyB>
e.g. just shoving blocks of code into a subroutine has measurable cost in CPython
20:50
<@froztbyte>
and I have great hope in pypy
20:50
< RichyB>
whereas in C I can do that for free because I can trust the fucking inliner.
20:50
< RichyB>
(on static functions, anyway)
20:50
< RichyB>
froztbyte: indeed, I have kicked the occasional penny at the PyPy fund for this reason.
20:54 Derakon [chriswei@Nightstar-a3b183ae.ca.comcast.net] has joined #code
20:54 mode/#code [+ao Derakon Derakon] by ChanServ
20:54
<&Derakon>
Several months ago I set up this device to be controlled over Telnet.
20:54
<&Derakon>
Now I find I forgot to write down its IP address anywhere.
20:54
<@froztbyte>
hahaha
20:54
<&Derakon>
Fortunately there are only 256 candidates~
20:55
<@froztbyte>
nmap -sP -n, arp, wait it out..
20:55
<@froztbyte>
it gets more annoying when you have /22's or so
20:55
<&Derakon>
Alas, Windows.
20:55
< RichyB>
Set up a local DNS server. :)
20:55
<@froztbyte>
you get nmap on windows
20:55
<&Derakon>
But I figure a for loop and trying to create telnetlib.Telnet instances in Python should do.
20:55
<@froztbyte>
with a GUI and everything
20:56
<@froztbyte>
it's nicely packaged as ZeNMap
20:56
<&Derakon>
froztbyte: yeah, I guess I could install it... :p
20:56
<@froztbyte>
generally useful to have around
20:57
< RichyB>
or put the IP addresses in a wiki somewhere.
20:57
<&Derakon>
Writing it down would have been the optimal solution, yes.
20:58
<@RobinStamer>
for n in `seq 1 254`; do ping -c 1 192.168.1.$n &>/dev/null; done & watch arp -an
20:58
<@froztbyte>
oh, this reminds me
20:58
<@RobinStamer>
Bash FTW
20:59
<@froztbyte>
that utterly terrifying cisco config generator. written in excel.
20:59
<@RobinStamer>
(Basically it pings every IP once, then displays the arp table while it's doing that, so every successful ping would also have a successful arp table entry)
20:59
<&ToxicFrog>
for ip in 192.168.1.{1..254}
20:59
<@RobinStamer>
Oh neay
21:00
<@froztbyte>
1) read all of the tldp ABS guide, 2) start using zsh instead
21:03
<@froztbyte>
did you guys know bash has internal string substitution and stuff?
21:03
<@froztbyte>
it's terribly slow
21:03
<@froztbyte>
it also has arrays. and they're also pretty bad.
21:03
<@iospace>
apparently, the devs for EDK2 are so anal that if you submit patches without using their style, they reject them
21:03
<@RobinStamer>
Knew about the string sub, don't care about the speed. If you're at the point where you care about speed you should really be asking why it's written in bash.
21:04
<@froztbyte>
indeed
21:04
<&Derakon>
iospace: well, that's what style guides are for...
21:04
<@iospace>
Derakon: well yes
21:04
<@froztbyte>
although usually I start asking why it's written in bash way before that >;)
21:04
<&Derakon>
Though they can be more or less rude about the rejection.
21:04
<@iospace>
but it also makes them look lazy and uptight
21:04
<@iospace>
yeah
21:05
<&Derakon>
For Pyrel I get style guide violations all the time in my pullreqs (since most contributors are relatively inexperienced), but generally once I point it out and explain why the guide is the way it is they come around.
21:05
<@iospace>
http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Code_Style/C
21:05
<&Derakon>
(Doesn't stop repeat violations though. :\ )
21:07
<@Reiv>
Derakon: What's your arguement?
21:16
<&Derakon>
Reiv: just that rejection because of style guide violations is not inherently evil.
21:16 * Derakon finds the IP address he needed -- 192.168.137.111.
21:16
<@Reiv>
Oh.
21:17
<@Reiv>
You don't argue why the style guide is needed, or?
21:17
<&Derakon>
The style guide argues itself.
21:17 * TheWatcher honestly boggles at the idea of submitting patches /without/ adhering to the style guide if there is one, and if there isn't at least making an attempt to make your changes fit the surrounding code; it's just polite!
21:17
<&Derakon>
If they haven't read the document (and don't know how to match style with adjacent code) then they have no business submitting pullreqs in the first place.
21:27 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has joined #code
21:27 mode/#code [+o celticminstrel] by ChanServ
21:33 McMartin [mcmartin@Nightstar-7f75c406.pltn13.sbcglobal.net] has quit [[NS] Quit: reboot]
21:46 mac [mac@Nightstar-fe8a1f12.il.comcast.net] has joined #code
22:14
< RichyB>
http://picturesofpeoplescanningqrcodes.tumblr.com/
22:18
<@Reiv>
... why is that even a thing
22:20
<&Derakon>
Oh hey, you guys might know something about this.
22:20
<&Derakon>
We have a device that needs to notify us when an event occurs.
22:20
<&Derakon>
The device has a digital line-out that can send a TTL signal (i.e. low/high voltage, digital).
22:20
<&Derakon>
Any recommended ways of translating that into something my programs can understand?
22:21
<&Derakon>
My boss is obsessed with figuring out how to use the parallel port on one of our computers.
22:21
<&Derakon>
I figured there might be some kind of USB module that would present itself as a serial device, maybe?
22:21
<&Derakon>
But this is one of those areas where I may not even be aware of the options I'm missing.
22:21
<@Reiv>
Hm
22:21
<@Reiv>
You need Thalass here
22:23
<&ToxicFrog>
A serial port is a bit more complicated than that, sadly
22:24
<&Derakon>
Well, I was figuring something just smart enough for me to be able to ask "is pin 1 high? is pin 2 high?" etc.
22:25
<&Derakon>
Then I can just write a program to busywait on the pin I care about.
22:27 * ToxicFrog does some fiddling
22:27
<&ToxicFrog>
What voltage range?
22:28
<&Derakon>
Dunno, probably 0-5V.
22:28
<&ToxicFrog>
Serial port expects +15 to -15.
22:28
<&ToxicFrog>
In practice you can get away with %U+%U5
22:28 Derakon_ [chriswei@Nightstar-a3b183ae.ca.comcast.net] has joined #code
22:29
<&ToxicFrog>
Serial port expects +3~+15 for high and -3~-15 for low.
22:29
<&ToxicFrog>
If it can do ?5V you can get away with that. 0-5 won't cut it.
22:30
< Derakon_>
Hm.
22:31 Derakon [chriswei@Nightstar-a3b183ae.ca.comcast.net] has quit [Operation timed out]
22:31 Derakon[AFK] [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds]
22:32
<&ToxicFrog>
The "standard" (these days) DB-9 serial port has 9 pins and use all of them. I know you can get away with 5 (drop bell, RTS/CTS, and carrier)
22:32 ErikMesoy is now known as ErikMesoy|sleep
22:32
<&ToxicFrog>
I don't think that's RS232 compliant at that point but it usually works.
22:32 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
22:32 mode/#code [+ao Derakon Derakon] by ChanServ
22:32
<&ToxicFrog>
The "standard" (these days) DB-9 serial port has 9 pins and use all of them. I know you can get away with 5 (drop bell, RTS/CTS, and carrier)
22:32
<&ToxicFrog>
I don't think that's RS232 compliant at that point but it usually works.
22:33 * Derakon_ nods.
22:33
< Derakon_>
/phone
22:33 * Azash curses wiringpi developers
22:34
<&ToxicFrog>
I don't know how many pins you can remove before a PC serial controller will stop paying attention, though.
22:34
<&ToxicFrog>
I mean, in principle, for unidirectional communication, you only need two pins, TxD and GND.
22:35
<&ToxicFrog>
The easiest approach is to find a spare microcontroller that can already easily communicate with the PC and hook your device up to one of the GPIO pins~
22:36 * ToxicFrog does a bit of reading
22:36
<&ToxicFrog>
Hmm. Here's an idea.
22:36
<&ToxicFrog>
Hook your input up to one of the control lines. Pull everything else low (which is actually high for one class of them, I forget which)
22:37
<&ToxicFrog>
Then ask the driver (or, if you can't do that, write a driver) what the control status of the port is.
22:43
< Derakon_>
Interesting, I think I understand.
22:43
< Derakon_>
The bit I care about will toggle the status of the port, so I can use that status as the proxy for the bit.
22:58
< RichyB>
There's a single-chip solution, which is that you buy a PIC18F, use one of its I/O pins to measure that signalling voltage, and use off-the-shelf firmware to act as a USB (1.1, I think) device.
22:59
< RichyB>
http://www.waitingforfriday.com/index.php/Building_a_PIC18F_USB_device
22:59
< RichyB>
I think that all of the free PIC development tools are a bit MSWindows-bound, but IIRC that's not a problem for you?
22:59
< RichyB>
PICs are lovely, durable little chips.
23:02
< Derakon_>
Having spoken with our resident CompEng-type guy, I think really any solution we could do for this problem is one that we'd hold off on doing until it's clear we need it.
23:03
< Derakon_>
I mean, right now we're just incurring some unknown extra latency in a not-strictly-time-sensitive aspect of the microscope's functioning.
23:03
< Derakon_>
The use case here is mapping out the contents of the sample, so we move the stage slightly, wait for it to stop, take an image, repeat.
23:03
< Derakon_>
The "wait for it to stop" bit currently involves a busywait with querying the serial port over and over again.
23:04
< Derakon_>
But we can configure the stage to send a signal when it reaches its destination.
23:04 * gnolam reads up.
23:05
<@gnolam>
Unless there was some critical piece of software that only ran on Windows, I'd just use a PC with GPIO pins.
23:05
<@gnolam>
Saves so much trouble.
23:05
< Derakon_>
We already have the PC, though~
23:06 * gnolam shrugs.
23:06
<@gnolam>
That kind of computer is cheap nowadays.
23:06
<@gnolam>
A gumstix is what, 200 bucks?
23:07
<@gnolam>
I think even a raspberry pi has GPIO pins, in fact.
23:07
< Derakon_>
...point.
23:09 * RichyB didn't knwo that.
23:09
<@gnolam>
... yep, it has. And it's hard to beat that price.
23:09
< RichyB>
For a one-off device, *impossible* to beat that price.
23:10
< RichyB>
It's like $50 but you save more because of how stupidly easy it is to program and set up. It's just a Linux machine, you just plug it into an ethernet and use TCP/IP.
23:11
< Derakon_>
It sounds like a smarter Arduino with less hardware integration.
23:12
< Derakon_>
But, y'know, standard computer so it can control anything that plugs in via USB or the like.
23:12
<@gnolam>
An Arduino is still a microcontroller.
23:12
<@gnolam>
A very easy to use and conveniently packaged microcontroller, but still.
23:12
<@gnolam>
A raspberry pi is a full-fledged computer.
23:12
<@gnolam>
s/computer/PC
23:14
<@TheWatcher>
Also, throw a Pi-Face on top and you get more io options
23:14 You're now known as TheWatcher[T-2]
23:15
< Derakon_>
Night, TW.
23:16
<@TheWatcher[T-2]>
I actually keep meaning to go bug the piface guys, see if I can blag a board+pi off them ¬¬
23:16
<@TheWatcher[T-2]>
(and see about making perl modules to control it, just to make Andrew fume ¬¬)
23:17
< Derakon_>
This is one of those things where they sound neat and all but I just can't think what I'd do with them.
23:17
< Derakon_>
Only idea I've had is to try to rig up a custom weather station but that seems like overkill when I'm sure there's existing solutions.
23:18
<@TheWatcher[T-2]>
I have a shitton of technic (somewhere around 10k pieces), and a mindstorms unit that I can't talk to anymore, so I'd just replace that with the pi+piface and be good to go
23:19
<@TheWatcher[T-2]>
Actually, that's probably a really low guess, but I'm not counting pegs/etc so *shrug* anyway, slep
23:19 You're now known as TheWatcher[zZzZ]
23:20
<@gnolam>
Derakon_: HTPC?
23:20
< Derakon_>
gnolam: I don't watch TV much at all.
23:20
< Derakon_>
My TV is a screen for my consoles.
23:20
< Derakon_>
Which also don't get much use these days.
23:22
<@gnolam>
My use case is "anywhere you'd have used a PC/104 but probably wouldn't have needed anything quite so rugged".
23:25
< Derakon_>
My computers at home are for coding, browsing the Net, and playing games.
23:25
< Derakon_>
My hobbies don't really involve computers otherwise.
23:26
< RichyB>
Can the R? output to HDMI?
23:28
< RichyB>
Indeed it can, thought so.
23:29
< RichyB>
Derakon: one of the plans here is that we have some data displays in the office that are currently driven by Mac Minis plugged into TVs. Idea is to replace the Mac Minis with R? boxes.
23:32
< Derakon_>
Ah, \u03c0 must be the UTF-8 code for pi.
23:32
< Derakon_>
What does it have for display driving?
23:33
< RichyB>
Apparently its built-in display outputs are component-video and HDMI. We have monitors and TVs lying around that take HDMI-in.
23:45
< himi-cat>
It definitely does HDMI
23:45
< himi-cat>
One of the guys here at work has one
23:55 McMartin [mcmartin@Nightstar-7f75c406.pltn13.sbcglobal.net] has joined #code
23:55 mode/#code [+ao McMartin McMartin] by ChanServ
--- Log closed Tue Jan 15 00:00:02 2013
code logs -> 2013 -> Mon, 14 Jan 2013< code.20130113.log - code.20130115.log >

[ Latest log file ]