code logs -> 2011 -> Mon, 14 Nov 2011< code.20111113.log - code.20111115.log >
--- Log opened Mon Nov 14 00:00:18 2011
00:13 You're now known as TheWatcher[T-2]
00:35 You're now known as TheWatcher[zZzZ]
00:55 AD[Shell] [abudhabi@9D46A2.088371.A474A5.6EEC27] has quit [Operation timed out]
01:03 AD[Shell] [abudhabi@9D46A2.088371.A474A5.6EEC27] has joined #code
01:08 AD[Shell] [abudhabi@9D46A2.088371.A474A5.6EEC27] has quit [Ping timeout: 121 seconds]
01:08 AD[Shell] [abudhabi@9D46A2.088371.A474A5.6EEC27] has joined #code
01:27 AD[Shell] [abudhabi@9D46A2.088371.A474A5.6EEC27] has quit [Operation timed out]
01:35 AD[Shell] [abudhabi@9D46A2.088371.A474A5.6EEC27] has joined #code
01:48 Kindamoody[zZz] is now known as Kindamoody
01:56
< ToxicFrog>
aagh, google, FUCK YOU
01:59
< Eri>
Yup
02:07 Attilla [Obsolete@Nightstar-f29f718d.cable.virginmedia.com] has quit [Ping timeout: 121 seconds]
02:15
< ToxicFrog>
I wanted to paste a link to premake.
02:15
< ToxicFrog>
I ended up pasting a huge link to google with the link to premake embedded in it somewhere.
02:15
< ToxicFrog>
And it only does this sometimes!
02:16
< ToxicFrog>
Most of the time I can right-click-copy-link and get the actual link!
02:42 Finerty is now known as Vornicus
02:52
< sshine>
ToxicFrog, I wonder why it only happens some of the time.
02:53
<@Tamber>
Because, if it happened all the time, it wouldn't surprise people.
03:10
<@Derakon>
It happens to me consistently, and it still surprises and pisses me off.
03:10 gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has quit [[NS] Quit: Z?]
03:11
<@Derakon>
Because you right-click some text that is the URL, and what is copied to your buffer is not the URL.
03:21 Vash [Vash@Nightstar-0858ee4d.wlfrct.sbcglobal.net] has joined #code
04:17 Stalker [Z@Nightstar-5aa18eaf.balk.dk] has quit [Ping timeout: 121 seconds]
04:21 Vash [Vash@Nightstar-0858ee4d.wlfrct.sbcglobal.net] has quit [[NS] Quit: I <3Lovecraft<3 Vorn!]
04:43 Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has joined #code
05:03 Kindamoody is now known as Kindamoody|breakfast
05:03
< sshine>
hmm
05:04 * sshine is grading exam answers in functional programming, and this one struck me.
05:05
< sshine>
he's "solved" the entire set of assignments without using recursion. for all assignments involving lists (most), he solves them (incorrectly) for lists with exactly 4 elements, and otherwise throws a WithoutSignificance exception.
05:06
< sshine>
and instead of pattern matching his way to four list elements, he uses Standard ML's List.nth(xs, 1) syntax to a horrible extent.
05:07
<@Tamber>
"struck you"? Like, say, an airborne brick? :p
05:08
<@McMartin>
WithoutSignificance exception?
05:14
< sshine>
McMartin, like, when you're doing matrix multiplication and your matrices don't have exactly the dimensions 3x2 and 2x3, they are WithoutSignificance.
05:15
< sshine>
McMartin, or when verifying that a predicate holds for a list, and it doesn't have exactly four elements in it, the result is Without Significance. :)
05:15
< sshine>
Tamber, sort of! I mean, the guy's followed a course for seven weeks, and there is not one recursive function.
05:16
<@Tamber>
Oh dear.
05:16 * Tamber hides klompen's code, shifty-eyes.
05:16
<@Tamber>
:p
05:17
< sshine>
who's klompen?
05:17
<@Tamber>
https://github.com/TamberP/Klompen
05:17
<@Tamber>
I swear, once I make it /work/, I'll clean the code up!
05:18
< sshine>
do you have a blog that uses it?
05:18
<@Tamber>
I'll be changing mine over to use it when I've finished adding a few things.
05:19
< sshine>
I just edit my HTML and use WordPress for the more active and multi-user blogs.
05:19
<@Tamber>
(Pages that let you show posts by tag, an index page to show the top 10 or so posts, an RSS feed, that sort of thing. :)
05:19
< sshine>
do you know WERC?
05:19
<@Tamber>
I don't like manually bashing out HTML; that's what /the computer/ is for.
05:19
<@Tamber>
WERC?
05:19
< sshine>
http://werc.cat-v.org/
05:20 cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has quit [[NS] Quit: Leaving]
05:20
<@Tamber>
Huh. Neat.
05:20
<@Tamber>
I'm aiming for "all the generation is done on my desktop, so I don't have to run CGI/PHP/etc on the server"~
05:20
< sshine>
yeah, WERC is all static as well.
05:21
< sshine>
I used to fancy publicfile as a webserver, but I do like dynamic content.
05:22
< sshine>
(publicfile is DJB's webserver)
05:23
< sshine>
when looking at DJB's slides, I think people couldn't even compromise him with a PDF file.
05:23 Kindamoody|breakfast is now known as Kindamoody
05:24
<@Tamber>
*chuckle*
05:24 cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has joined #code
06:04 Taki^ [Taki@Nightstar-98d9afe5.consolidated.net] has joined #code
06:10 ErikMesoy|sleep is now known as ErikMesoy
06:11 cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
06:17 kwsn is now known as kw-sleep-n
06:31 Derakon is now known as Derakon[AFK]
06:39 ErikMesoy [Erik_Mesoy@Nightstar-f7eedefa.80-203-17.nextgentel.com] has quit [[NS] Quit: Leaving.]
06:40 ErikMesoy [Erik_Mesoy@Nightstar-f7eedefa.80-203-17.nextgentel.com] has joined #code
07:07 Rhamphoryncus [rhamph@Nightstar-14eb6405.abhsia.telus.net] has joined #code
07:11 You're now known as TheWatcher
07:18 Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
07:44 Vornicus is now known as Vornicus-Latens
07:53 Kindamoody is now known as Kindamoody|out
08:09 You're now known as TheWatcher[afk]
08:11 cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has joined #code
08:58 cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
09:23 Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
10:09 You're now known as TheWatcher
11:03 Attilla [Obsolete@Nightstar-f29f718d.cable.virginmedia.com] has joined #code
11:42 Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has joined #code
11:58 Shoat [rstamer@Nightstar-e681a855.org] has quit [Ping timeout: 121 seconds]
12:22 Attilla [Obsolete@Nightstar-f29f718d.cable.virginmedia.com] has quit [Client closed the connection]
12:48 kw-sleep-n is now known as k-work-sn
13:05 AnnoDomini [annodomini@60F158.737D66.CA1918.CC7562] has joined #code
13:18 AnnoDomini [annodomini@60F158.737D66.CA1918.CC7562] has quit [[NS] Quit: leaving]
13:25 Lingerance [rstamer@Nightstar-e681a855.org] has joined #code
14:38 You're now known as TheWatcher[afk]
14:44 Rhamphoryncus [rhamph@Nightstar-14eb6405.abhsia.telus.net] has quit [Client exited]
14:50 Attilla [Obsolete@Nightstar-f29f718d.cable.virginmedia.com] has joined #code
14:51 gnolam [quassel@Nightstar-202a5047.priv.bahnhof.se] has joined #code
15:04
< k-work-sn>
god i love short circuiting in code :P
15:10
< k-work-sn>
i knwo some people probably find it cheap but when you need as little code as possible it's nice
15:13<~Vornicus-Latens> Short circuiting for side effects is Generally Considered Evil
15:14
< sshine>
what are short-circuits; gotos and exceptions?
15:15
< k-work-sn>
sshine: lets say you have an if(x and y)
15:15
< k-work-sn>
if x is false, the statement will be false, so why evauluate y?
15:15
< k-work-sn>
or if(x or y) if x is true the if will be true and the value of y won't matter
15:16
< sshine>
k-work-sn, ahhh. of boolean expressions.
15:16
< k-work-sn>
yeah
15:16
< k-work-sn>
Vornicus-Latens: i'm doing if(x == null || x->y == -1)
15:17
< sshine>
k-work-sn, I think that's somewhat neat.
15:17
< k-work-sn>
:P
15:17
< sshine>
not as neat, but also not as cryptic as those fallthrough switch statements
15:18
< k-work-sn>
heh
15:18<~Vornicus-Latens> SHort circuiting for non-side effects, like shown there, are Generally Considered The Way To Do It.
15:18
< k-work-sn>
Vornicus-Latens: so you're saying i'm doing it right?
15:18<~Vornicus-Latens> Yes.
15:18
< k-work-sn>
:P
15:20
< k-work-sn>
how would one use it for side effects?
15:21
< sshine>
if (x == null || x = 42)
15:21<~Vornicus-Latens> like that, among other things
15:21
< sshine>
essentially, if the short-circuited expression changes the state of the program beyond increasing the PC.
15:22
< k-work-sn>
ah
15:23
< sshine>
could be useful... if (x == null || x = some_function() || x = another_function()) { x might have one of two values, or still be falsy; }
15:24
< sshine>
I like languages where assignment is not an expression that returns the assigned value.
15:24
< sshine>
people always write hackish code with that.
15:31
<@jerith>
I often wish for assignment to be an expression in Python.
15:35
< k-work-sn>
heh
16:00
<@Tarinaky>
I did once write an expression in Java that was while( some_method() ) {}
16:00
<@Tarinaky>
I'm not sure how much of a sin this was.
16:01
< k-work-sn>
Tarinaky: apart from using java? ;)
16:01
<@Tarinaky>
It was a Java lab... As part of structured academic learning.
16:01
<@Tarinaky>
So the Java is excusable.
16:01<~Vornicus-Latens> Tarinaky: well, that's almost an iterator.
16:02
<@Tarinaky>
I'll stress that the while block was empty. I did all the work in some_method() -and- the flow control, by returning a boolean >.>
16:03
<@Tarinaky>
I felt dirty anyway.
16:03<~Vornicus-Latens> Okay that's just evil.
16:04
<@Tarinaky>
I probably should have come up with a getter of some sort and a do while.
16:08
<@Tarinaky>
I'm not sure I could have done so without making it more sphegetti though.
16:09
<@jerith>
Tarinaky: while(true) { if (!some_method()) { break; } }
16:10
<@jerith>
Semantically identical, but a little clearer as to intent.
16:35
< sshine>
Tarinaky, you could also just do while (some_method());
16:35
< sshine>
I don't know why that should be bad.
16:54<~Vornicus-Latens> keep_going = true; while (keep_going) keep_going = some_method();
16:54<~Vornicus-Latens> I use that pattern relatively often.
16:56
< ToxicFrog>
Yeah, I generally just write that as: repeat until not some_method() (or the while equivalent)
17:04
< sshine>
Vornicus-Latens, do you think using a variable adds clarity?
17:05
<@Tarinaky>
sshine: I never ever ever ever ever (except when I do) do whiles and ifs without blocks.
17:06
<@Tarinaky>
:p
17:06
<@Tarinaky>
Except when I do of course >.>
17:07
< sshine>
heh
17:07
< sshine>
well, I suppose you often want to wrap it within some interface command, like emptyWhateverContainer(), or emitAllMessages().
17:14 * gnolam arghs at humanities papers.
17:16
< gnolam>
The results and conclusion go into the abstract, dammit. >:E
17:19
< AD[Shell]>
>humanities
17:19
< AD[Shell]>
>results
17:19
< AD[Shell]>
laughingelfman.jpg
17:23 * ErikMesoy joins AD in going hurr hurr. :P
17:38 Attilla [Obsolete@Nightstar-f29f718d.cable.virginmedia.com] has quit [Ping timeout: 121 seconds]
18:08 SmithK [smith@Nightstar-e26015c4.home1.cgocable.net] has joined #code
19:01 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Operation timed out]
19:08 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code
19:18 Kindamoody|out is now known as Kindamoody
19:19 SmithK [smith@Nightstar-e26015c4.home1.cgocable.net] has quit [Ping timeout: 121 seconds]
19:32 Kindamoody is now known as Kindamoody[zZz]
20:00 SmithK [smith@Nightstar-e26015c4.home1.cgocable.net] has joined #code
20:10 SmithK [smith@Nightstar-e26015c4.home1.cgocable.net] has quit [Ping timeout: 121 seconds]
21:08 Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
21:11 You're now known as TheWatcher
21:42 Derakon [chriswei@Nightstar-f68d7eb4.ca.comcast.net] has joined #code
21:42
< Derakon>
Perhaps someone here knows more than I do about networking. That wouldn't be especially hard.
21:42
< Derakon>
I'm trying to set up a simple client/server system -- the server talks to a camera, the client requests and receives images from that camera.
21:42
< Derakon>
I'm using Pyro4, a Python library for remote objects.
21:43
< Derakon>
By default, the server daemon created by this library listens on localhost, and cannot hear remote requests.
21:43
<@jerith>
What protocol?
21:43
< Derakon>
If I pass the server's own IP address to the daemon constructor then it can hear requests from the outside world.
21:43
< Derakon>
Any idea why?
21:43
< Derakon>
Jerith: not sure.
21:43
<@jerith>
It's probably binding to localhost by default.
21:44
< Derakon>
Yes.
21:44
<@jerith>
If you tell it to bind to 0.0.0.0 it should listen on all interfaces.
21:44
< Derakon>
...that seems really weird, but okay.
21:44
< Derakon>
"localhost" is explicitly "only connections internal to this machine", correct?
21:44
<@jerith>
It's fairly standard, actually.
21:44
< Derakon>
Standards can be weird!
21:44
<@jerith>
localhost is the loopback device.
21:45
<@jerith>
Lots of stuff listens on 0.0.0.0 by default instead, but localhost-only is safer.
21:46
<@jerith>
You can probably put it behind some kind of proxy server.
21:46
< Derakon>
Default-exclude instead of default-accept, yeah.
21:46
< Derakon>
The computer ultimately is going to have no external network access, so security isn't a huge concern.
21:46
< Derakon>
What would the proxy server do?
21:47
< Derakon>
(Again, my knowledge of networking is sadly deficient)
21:47
<@jerith>
That's a very common config for HTTP servers. Have nginx or something in front doing load balancing and/or auth and/or other stuff and then have one or more instances of your app server behind it.
21:48
< Derakon>
In this specific case all it would do would be let the daemon itself only listen on localhost though?
21:50
<@jerith>
If you don't have a proxy or something in front or an ssh tunnel or similar to let you in from the outside world, then yes.
21:50
<@jerith>
If you're happy with it being available on the public network interface, pass in 0.0.0.0.
21:50
< Derakon>
Or the server's own IP address.
21:51 * jerith nods.
21:51
< Derakon>
Though that would require some "get my address" logic.
21:51
<@jerith>
But 0.0.0.0 is easier than...
21:51
<@jerith>
Yeah, that.
21:51
< Derakon>
Okay, thanks.
21:51
< Derakon>
I should probably write a networked game at some point or something.
21:51
< Derakon>
I doubt I'll really be able to get all this knowledge internalized otherwise.
21:51
<@jerith>
(And it isn't easy to get your own IP. Especially on a system with more than one public IP.)
21:52
< Derakon>
(Well, I can hardcode it~)
21:52
<@jerith>
I'm by no means an expert, but I've done a bunch of networking stuff in my time.
21:52
<@jerith>
If you hardcode it, you'll suffer pain when your DHCP lease renews or summat.
21:52
< Derakon>
Yeah.
21:52
< Derakon>
That wasn't a serious suggestion.
21:53
<@jerith>
I know, but I've seen it done more than I like. (Which is to say I've seen it done.)
21:54
<@jerith>
But now I have teeth which require brushing and a bed that's pining for me.
21:54
< Derakon>
Sleep well.
21:55
<@jerith>
So I shall say goodnight and close my laptopt.
21:55
<@jerith>
Goodnight. And thanks. :-)
22:03 Stalker [Z@2C3C9C.B2A300.F245DE.859909] has joined #code
22:03 * McMartin eyes the fuck out of this dialect of Haskell for systems programming
22:03
<@McMartin>
http://web.cecs.pdx.edu/~mpj/Habit-Northeastern-10Nov2011.pdf
22:20 ErikMesoy is now known as ErikMesoy|sleep
22:37
<@McMartin>
Hm. I have an exceptionally random question.
22:37
<@McMartin>
Is there a way to get the motherboard ID number out of /proc or similar on Linux?
22:38 * Derakon eyes that Haskell thing.
22:39
< Derakon>
I get the impression that most popular languages end up being excuses for people to reinvent various wheels.
22:39
<@McMartin>
To be fair, they're dicking around with formal verification here
22:39
< Derakon>
Mm, true.
22:40 * McMartin also eyes the fuck out of Nyfflas.
22:40
<@McMartin>
It's great that you posted your soundtrack for your game.
22:40
<@McMartin>
Did it have to be in AIFF format?
22:41
< Derakon>
But it's lossless~!
22:41
<@TheWatcher>
McM: not from proc, but it should be in /sys/class/dmi/id/ I think
22:43
<@TheWatcher>
Yeah, there's a bunch of board_* files in there with the info
22:43
<@TheWatcher>
(you need to be root to go near there, though)
22:43
<@McMartin>
Being root is fine
22:44 * McMartin is stress-testing VMs and wants to see Just How Good their hardware forwarding is >_>
22:44 * TheWatcher isn't getting those files at all in virtualbox, but is on a real system, but may just be misconfiguration or something on his part
22:48
<@McMartin>
Yeah, in VMware, the file is there but it has "none" in it
22:52
<@McMartin>
Also, huh, VBox doesn't have a /sys/class/dmi/id/board_name?
22:54
<@TheWatcher>
correct
22:55
<@McMartin>
Wow
22:55
<@McMartin>
Yeah, that's odd
22:55
<@McMartin>
In VMware Player it's "440BX Desktop Reference Platform"
23:05 Rhamphoryncus [rhamph@Nightstar-14eb6405.abhsia.telus.net] has joined #code
23:18 Attilla [Obsolete@Nightstar-f29f718d.cable.virginmedia.com] has joined #code
23:33
< Derakon>
Random device we have here at the lab: an optical isolation board.
23:33
< Derakon>
Digital lines enter on one end, get converted to optical lines, and then get converted back to digital lines that go out the other end.
23:34
< Derakon>
The goal being to interrupt the electrical signal and prevent surges from damaging equipment.
23:34
<@McMartin>
That's kinda slick
23:36
< Derakon>
I thought it was interesting.
23:44
< gnolam>
... are you using extremely high voltags/currents or something, or why doesn't the equipment itself come with optoisolators?
23:44
< gnolam>
*voltages
23:45
< gnolam>
(And proper IC-sized ones, at that=
23:48
< Derakon>
Gnolam: as for the individual devices, I don't know, but the inputs to this box are soldered directly to a fairly expensive PCI-E card plugged into a computer.
23:48
< Derakon>
The optoisolator is mostly just there due to paranoia after a prior employee fried a computer, I think.
23:54
< AD[Shell]>
(Melvin deleted calibration!)
--- Log closed Tue Nov 15 00:00:22 2011
code logs -> 2011 -> Mon, 14 Nov 2011< code.20111113.log - code.20111115.log >

[ Latest log file ]