code logs -> 2015 -> Thu, 30 Apr 2015< code.20150429.log - code.20150501.log >
--- Log opened Thu Apr 30 00:00:22 2015
00:11 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Connection reset by peer]
00:12 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
01:02 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has quit [[NS] Quit: ]
01:07 catadroid [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
01:32 himi [fow035@Nightstar-dm0.2ni.203.150.IP] has joined #code
01:32 mode/#code [+o himi] by ChanServ
01:50 Derakon[AFK] is now known as Derakon
02:09 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has joined #code
02:09 mode/#code [+o Reiv] by ChanServ
02:16
<~Vornicus>
function foo(x) {a = 1; if (x) {a = 2;} else {a = 3;} return a;}
02:17
<~Vornicus>
What's the name for the, uh, thing that has happened here, as regards the a = 1 statement
02:21
<&Derakon>
AFAICT all it's accomplishing is ensuring that the name "a" exists outside the scopes of the if/else blocks.
02:22
<~Vornicus>
arg fuckin' block scope why do you exist
02:23
<&Derakon>
To avoid polluting the namespace?
02:23
<~Vornicus>
I have never once had block scope do anything but bite me in the ass, so I don't really believe that. But! Assume function scope, so that that line is in fact useless
02:24
<&Derakon>
...then that line is useless and I don't know what you're asking about~
02:25
<~Vornicus>
the point is -- the point is, static analysis will tell you that line is useless. What precisely will it tell me
02:25
<&Derakon>
Um, unnecessary initialization of a variable? I dunno.
02:28
< ToxicFrog>
Depends on the language.
02:29
<~Vornicus>
dammit people
02:30
<&Derakon>
I'll have you know I'm not a person, merely a somewhat clever chatbot.
02:32
<@Reiv>
You are a /very/ clever chatbot, then
02:33
<&Derakon>
No, you just aren't very clever people.
02:33
<@Reiv>
And I remain impressed by your ability to procgen Cities Skylines screenshots~
02:33
<@Reiv>
Oooh burn ^.^
02:58 macdjord|wurk is now known as macdjord
03:03 * Vornicus does battle with graphviz
03:15
<&McMartin>
Vornicus: "Dead code"
03:15
<&McMartin>
Also, what crack are you on with function scope being better than block scope that is about 90% of what is wrong with JS
03:16
<&McMartin>
gcc's warning for that, however, is "a is assigned a value that is never used"
03:16
<&Derakon>
Python's lack of block scope is also about 90% of what's wrong with that language~
03:16
<&Derakon>
It's tripped me up on occasion.
03:17
<&McMartin>
Well
03:17
<&McMartin>
the Right Thing is lexical scope
03:17
<&McMartin>
However, that requires you to sacrifice minor things like, you know, a call stack
03:17
<&Derakon>
Wait, how does that differ from block scope?
03:18
<&McMartin>
C has block scope but not lexical scope. Lexical scope assumes the full set of powers that Scheme gives you with nested functions and closures and such.
03:18
< ToxicFrog>
Derakon: closures.
03:19
<&Derakon>
Ah, okay.
03:19
<&McMartin>
(And closures are also why you can't just have a call stack, because returning a closure means that your "stack" frame lives longer than the length of the function call.)
03:21
<&Derakon>
Closures are worth making a few sacrifices~
03:22
<&McMartin>
That said, I suspect this is a split hair - the important thing is whether or not objects are destroyed the instant they go out of scope, and the guys that do that (mainly C++) like the term "block scope"
04:17
< [R]>
<Vornicus> function foo(x) { var a; if (x) {a = 2;} else {a = 3;} return a;} // This does the more correct thing
04:18
<~Vornicus>
[R]: right
04:18
<~Vornicus>
I was looking for "a is assigned a value that is never used"
04:19
<~Vornicus>
I did not feel like splitting hairs on scoping rules
04:20
< [R]>
It's used. It's returned.
04:20
< [R]>
OR actually nm
04:20
< [R]>
I'm tired.
04:20
< [R]>
But eitherway, if global.x (node) or window.x (DOM JS) happens to be setter, it does have a side effect.
04:21
< [R]>
But that's the only case.
04:24
<~Vornicus>
I was actually trying to avoid being any particular language
04:24
< [R]>
Ah
04:37
<@macdjord>
[R]: When it says 'a is assigned a value that is never used' the value in question is '1', not 'a'.
04:39
< [R]>
<[R]> OR actually nm
04:39
< [R]>
<[R]> I'm tired.
04:42 kourbou|zzz [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [[NS] Quit: Bye]
04:44 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code
04:51 Checkmate [Z@Nightstar-ev6.6um.94.83.IP] has quit [Ping timeout: 121 seconds]
05:03 Vash [Vash@Nightstar-uhn82m.ct.comcast.net] has quit [[NS] Quit: Quit]
05:08 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
05:13 Derakon is now known as Derakon[AFK]
05:43 himi [fow035@Nightstar-dm0.2ni.203.150.IP] has quit [Connection closed]
06:04 himi [fow035@Nightstar-dm0.2ni.203.150.IP] has joined #code
06:04 mode/#code [+o himi] by ChanServ
06:33 kourbou|phone [kourbou@Nightstar-o4f.go0.161.37.IP] has joined #code
06:34 kourbou|autojoin [kourbou@Nightstar-o4f.go0.161.37.IP] has joined #code
06:34 kourbou|phone [kourbou@Nightstar-o4f.go0.161.37.IP] has quit [Connection closed]
06:35 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [Ping timeout: 121 seconds]
06:37 kourbou|autojoin [kourbou@Nightstar-o4f.go0.161.37.IP] has quit [Connection closed]
06:51 Kindamoody[zZz] is now known as Kindamoody
08:11 macdjord is now known as macdjord|slep
08:15 Xon [Xon@Nightstar-j72.ku7.252.119.IP] has quit [Ping timeout: 121 seconds]
08:15 Xon [Xon@Nightstar-j72.ku7.252.119.IP] has joined #code
08:19
< abudhabi>
>mysql
08:19
< catadroid>
>noyoursql
08:20
< abudhabi>
So, I have a field of type BIGINT(20) that can be NULL. And NULL is a perfectly acceptable value of that field.
08:20 Kindamoody is now known as Kindamoody|afk
08:20
< abudhabi>
But when I use the mysql resultset converter, what I get is "0" when the field is NULL.
08:21
< abudhabi>
0 is an invalid value; it would fail the foreign key check.
08:23
< abudhabi>
This is because getLong("whatever") returns a long, not a Long.
08:23
< abudhabi>
They don't even provide a method to give you a Long.
08:50 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
08:55
<@macdjord|slep>
abudhabi: Is JDBC involved here? Because it has that problem too: http://thecodelesscode.com/case/152
08:58 himi [fow035@Nightstar-dm0.2ni.203.150.IP] has quit [Ping timeout: 121 seconds]
08:58
< abudhabi>
It might be. I work many layers of abstraction above the actual DB access code.
08:58
< abudhabi>
I just write the resultset conversion routines.
08:59 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has quit [[NS] Quit: ]
09:01
<@macdjord|slep>
Is there a isNull function?
09:14 catadroid` [catalyst@Nightstar-bm1uar.dab.02.net] has joined #code
09:16 celticminstrel [celticminst@Nightstar-nef76s.dsl.bell.ca] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.]
09:17 catadroid [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has quit [Ping timeout: 121 seconds]
09:21
< abudhabi>
wasNull().
09:28 Meatyhandbag [sebastianfe@Nightstar-dk0.5eb.224.136.IP] has quit [Client exited]
10:55 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
10:55 mode/#code [+o himi] by ChanServ
11:46 gizmore [kvirc@Nightstar-uoelap.dip0.t-ipconnect.de] has joined #code
11:52 catadroid [catalyst@Nightstar-ve78ej.dab.02.net] has joined #code
11:52 catadroid` [catalyst@Nightstar-bm1uar.dab.02.net] has quit [A TLS packet with unexpected length was received.]
13:10 catadroid` [catalyst@Nightstar-7d63ak.dab.02.net] has joined #code
13:10 catadroid [catalyst@Nightstar-ve78ej.dab.02.net] has quit [Connection closed]
13:16 catadroid` [catalyst@Nightstar-7d63ak.dab.02.net] has quit [The TLS connection was non-properly terminated.]
13:17 catadroid [catalyst@Nightstar-7d63ak.dab.02.net] has joined #code
13:28 catadroid [catalyst@Nightstar-7d63ak.dab.02.net] has quit [Ping timeout: 121 seconds]
13:46 catadroid [catalyst@Nightstar-bm1uar.dab.02.net] has joined #code
13:49 catadroid [catalyst@Nightstar-bm1uar.dab.02.net] has quit [A TLS packet with unexpected length was received.]
13:49 catadroid [catalyst@Nightstar-bm1uar.dab.02.net] has joined #code
13:49
< abudhabi>
Interesting fencepost error.
13:50
< abudhabi>
I've got server-side pagination going. It works mostly right, except if there is *precisely* a multiple of the page size items.
13:50
< abudhabi>
In which case it reports one more page than there should be.
13:50
< abudhabi>
All the items are displayed, but the last page is empty.
13:54
< abudhabi>
Easy to fix, too.
14:04
<@TheWatcher>
The poor goat you sacrificed probably doesn't think it was easy~
14:29 catadroid [catalyst@Nightstar-bm1uar.dab.02.net] has quit [[NS] Quit: Bye]
14:36 catadroid [catalyst@Nightstar-2amdif.dab.02.net] has joined #code
14:45 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
14:45 mode/#code [+o Checkmate] by ChanServ
14:49 NSGuest19212 is now known as ^Xires
14:57 ^Xires is now known as Xires
15:59 * Tarinaky headdesks over and over and over and over and over
16:01
<@froztbyte>
?
16:02
<@Tarinaky>
Regular expressions
16:02
<@Tarinaky>
Imagine a face slamming into the desk of all mankind over and over again.
16:03 * froztbyte can't really
16:03
<@Tarinaky>
For some reason the capture groups are disappearing
16:08
< ToxicFrog>
Language?
16:09
<@Tarinaky>
Gherkin+Ruby
16:10
< ToxicFrog>
I've got nothing
16:12
<@Tarinaky>
I'm also convinced the lack of a simple yarddoc/rdoc for Cucumber is a conspiracy to sell me books,#
16:14
<@Tarinaky>
Got it!
16:14
<@Tarinaky>
I needed to be using #invoke, not #match.
16:48 gizmore [kvirc@Nightstar-uoelap.dip0.t-ipconnect.de] has quit [Operation timed out]
16:49 Meatyhandbag [sebastianfe@Nightstar-dk0.5eb.224.136.IP] has joined #code
17:00 Kindamoody|afk is now known as Kindamoody
17:26 kourbou [kourbou@Nightstar-89l.tsc.165.37.IP] has joined #code
17:34 kourbou [kourbou@Nightstar-89l.tsc.165.37.IP] has quit [[NS] Quit: Bye]
17:34 kourbou [kourbou@Nightstar-89l.tsc.165.37.IP] has joined #code
17:38 kourbou|phone [kourbou@Nightstar-89l.tsc.165.37.IP] has joined #code
17:38 kourbou [kourbou@Nightstar-89l.tsc.165.37.IP] has quit [Connection closed]
17:59 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code
18:01 kourbou|phone [kourbou@Nightstar-89l.tsc.165.37.IP] has quit [Ping timeout: 121 seconds]
18:06 kourbou_ [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code
18:07 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [NickServ (RECOVER command used by kourbou_)]
18:07 kourbou_ is now known as kourbou
18:07 kourbou|phone [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code
18:07 Derakon[AFK] is now known as Derakon
18:10 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
18:13 catadroid [catalyst@Nightstar-2amdif.dab.02.net] has quit [[NS] Quit: Bye]
18:14 Vash [Vash@Nightstar-uhn82m.ct.comcast.net] has joined #code
18:15 mode/#code [+o Vash] by ChanServ
18:40 celticminstrel [celticminst@Nightstar-nef76s.dsl.bell.ca] has joined #code
18:40 mode/#code [+o celticminstrel] by ChanServ
18:55 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [[NS] Quit: What does the 'x' do?]
19:04 kourbou|phone [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [[NS] Quit: Bye]
19:04 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code
19:05 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [[NS] Quit: Bye]
19:05 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code
19:16 Kindamoody is now known as Kindamoody|afk
19:27 Vashicus [Vash@Nightstar-uhn82m.ct.comcast.net] has joined #code
19:29 Turaiel[Offline] is now known as Turaiel
19:30 Vash [Vash@Nightstar-uhn82m.ct.comcast.net] has quit [Ping timeout: 121 seconds]
19:40 Vashicus is now known as Vash
19:41 mode/#code [+o Vash] by ChanServ
20:15 gizmore [kvirc@Nightstar-uoelap.dip0.t-ipconnect.de] has joined #code
20:32 gizmore [kvirc@Nightstar-uoelap.dip0.t-ipconnect.de] has quit [Ping timeout: 121 seconds]
20:34 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [Connection closed]
20:34 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code
20:39 kourbou|phone [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code
20:40 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [Ping timeout: 121 seconds]
21:10 Turaiel is now known as Tur|Food
21:23 kourbou|phone is now known as kourbou
21:31 Harlow [harlow@Nightstar-6eslf9.ece.uic.edu] has joined #code
21:31
< Harlow>
ugh, does anyone know anything about semaphores?
21:31
< Harlow>
(in c)
21:37
< ToxicFrog>
Harlow: I know about semaphores as an abstract concept, and I remember most of the pthread semaphore API
21:38
< ToxicFrog>
Harlow: if you're talking SysV/XSI interprocess semaphores...not really.
21:39 Alek [omegaboot@Nightstar-03ja8q.il.comcast.net] has quit [[NS] Quit: bbs]
21:39
< ToxicFrog>
Harlow: what kind of semaphores are you asking about?
21:39
< Harlow>
binary and counting
21:41
< ToxicFrog>
So you're asking about theory, not a specific API?
21:43
< Harlow>
its not a specific api
21:44
< Harlow>
http://pastebin.com/76YtXwQn is my code. umm i can explain a bit better... i think i can get it...
21:45
< ToxicFrog>
You say "not a specific API", but your code appears to be using the pthreads semaphore API
21:46
< ToxicFrog>
(also, pthreads has dedicated mutexes, you don't need to use a binary semaphore as a mutex unless you specifically want the ownerless semantics of a semaphore)
21:47
< Harlow>
I'm using binary semaphores as a mutex because i have been instructed to lol.
22:05 Tur|Food is now known as Tur|GTA
22:19 Harlow [harlow@Nightstar-6eslf9.ece.uic.edu] has quit [[NS] Quit: BED]
22:21
<&jerith>
So, Java 7 is EOL.
22:22
<&jerith>
It wasn't even released when I last wrote Java code professionally.
22:23
<@TheWatcher>
Java 6 wasn't released the last time I wrote any Java code at all >.>
22:24
<@TheWatcher>
Thank gods
22:25 Alek [omegaboot@Nightstar-03ja8q.il.comcast.net] has joined #code
22:25 mode/#code [+o Alek] by ChanServ
22:27
<&jerith>
Java 6 was released while I worked at Amazon, but I don't think I ever used it.
22:38 Kindamoody|afk is now known as Kindamoody
23:02
<&McMartin>
I should really look into what Java 8 has, since they Actually Tried that time
23:03
<&McMartin>
By which I mean "finally noticed C# was relevant" I think =P
23:03
<&McMartin>
The last time I used Java as Java, Java 6 was out and offered some things that would have made my life easier, but I couldn't use them because nobody had Java 6 installed.
23:04
<&jerith>
Doesn't Java 8 finally have closures?
23:05
<&McMartin>
Also "call this cleanup method when you leave this block", which it has direly needed for over a decade
23:15
<@Reiv>
wait, you can manually control garbage collection now?
23:27
<&McMartin>
You've had hooks into that for awhile
23:27
<&McMartin>
No, what this is not not needing to do 47 nested try-finally blocks to not leak your database connections
23:31 Kindamoody is now known as Kindamoody[zZz]
23:31 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [Connection closed]
23:31 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code
23:35 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
23:35 mode/#code [+qo Vornicus Vornicus] by ChanServ
23:38
<@Reiv>
... oh yes that would be nice
--- Log closed Fri May 01 00:00:40 2015
code logs -> 2015 -> Thu, 30 Apr 2015< code.20150429.log - code.20150501.log >

[ Latest log file ]