code logs -> 2014 -> Mon, 08 Sep 2014< code.20140907.log - code.20140909.log >
--- Log opened Mon Sep 08 00:00:25 2014
00:30 Azash [ap@Nightstar-28tp6p.plumbing] has joined #code
00:30 mode/#code [+o Azash] by ChanServ
00:41 Checkmate [Z@Nightstar-g2q2tu.customer.tdc.net] has quit [Ping timeout: 121 seconds]
00:44 gnolam [lenin@Nightstar-sanfmp.cust.bredbandsbolaget.se] has quit [[NS] Quit: Crash]
00:52 gnolam [lenin@Nightstar-sanfmp.cust.bredbandsbolaget.se] has joined #code
00:52 mode/#code [+o gnolam] by ChanServ
00:52 Checkmate [Z@Nightstar-g2q2tu.customer.tdc.net] has joined #code
00:53 mode/#code [+o Checkmate] by ChanServ
01:01 macdjord|out is now known as macdjord
01:31 RchrdB [0x2ba22e11@Nightstar-qe9.aug.187.81.IP] has joined #code
01:31 mode/#code [+o RchrdB] by ChanServ
01:33 RchrdB_ [0x2ba22e11@Nightstar-qe9.aug.187.81.IP] has quit [Ping timeout: 121 seconds]
01:42 RchrdB [0x2ba22e11@Nightstar-qe9.aug.187.81.IP] has quit [[NS] Quit: Leaving]
03:30 Reiv_ [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has joined #code
03:32 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has quit [Ping timeout: 121 seconds]
03:42 * Reiv_ frowns
03:43
< Reiv_>
This is both straightforward and something I've done before, but the way it's recorded here is Different and sort of hurting my head, hrm
03:43
< Reiv_>
I've got a query that returns work hours per month; this bit works just fine. I now need to tally up how many employees were active in each month, so I can normalise the data to hours-per-employee per month.
03:44
< Reiv_>
Doubling ones hours isn't a problem if one has doubled your staff in the same month, after all.
03:46
< Reiv_>
The labour data is stored as a set of rows: we've got a NAME, STATUS, and CHANGEDATE. So if Bob gets hired on 5th Janurary, he gets a row of BOB | ACTIVE | 05/01/2014
03:46
< Reiv_>
If he's then fired three months later, he'd get an extra row of BOB | INACTIVE | 05/04/2014
03:46
< Reiv_>
(or whatever)
03:47
< Reiv_>
I can roll it up to the month level, so the days portion of each date don't matter; if it's in that month at all it counts for that month.
03:48
< Reiv_>
But trying to do a tally per month is hurting my head a little nonetheless.
03:57
<@Checkmate>
I'd love to help but it's horribly early, or late depending on your point of view.
03:57
< Reiv_>
hm
03:57 Reiv_ is now known as Reiv
04:08
<~Vornicus>
Like -- how many people were active in a given month?
04:40 Kindamoody[zZz] is now known as Kindamoody
04:41
< Reiv>
Vornicus: Correct
04:52
<~Vornicus>
thinkathinkathinka
04:53
< Reiv>
I've done stuff like this before ,but this one is a pain in the butt.
04:56 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
05:00 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
05:15
< Reiv>
... oh, duh
05:15
< Reiv>
SELF JOINS WOO
05:15 Harlow [harlow@Nightstar-pq0497.il.comcast.net] has joined #code
05:15 * Reiv breaks out the bottle of tequila, hangs outside the car windows.
05:50 Checkmate [Z@Nightstar-g2q2tu.customer.tdc.net] has quit [Ping timeout: 121 seconds]
06:31 Harlow [harlow@Nightstar-pq0497.il.comcast.net] has quit [[NS] Quit: BED]
07:17 celticminstrel [celticminst@Nightstar-ak6p6n.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
07:39 Kindamoody is now known as Kindamoody|afk
08:00 Kindamoody|afk is now known as Kindamoody
08:19 Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has quit [[NS] Quit: ugh. beroot.]
08:22 Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has joined #code
08:22 mode/#code [+o Alek] by ChanServ
08:27 Kindamoody is now known as Kindamoody|afk
08:32 Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has quit [Ping timeout: 121 seconds]
08:50 Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has joined #code
08:51 mode/#code [+o Alek] by ChanServ
10:15
<@Azash>
https://twitter.com/liamosaur/status/506975850596536320/photo/1
10:18
<@TheWatcher>
Ahah, that's awesome.
10:43 Tarinaky [tarinaky@Nightstar-e99cts.net] has quit [Ping timeout: 121 seconds]
10:43 Tarinaky [tarinaky@Nightstar-e99cts.net] has joined #code
10:43 mode/#code [+o Tarinaky] by ChanServ
10:50 RchrdB [0x2ba22e11@Nightstar-952.jvr.168.194.IP] has joined #code
10:50 mode/#code [+o RchrdB] by ChanServ
11:13 RchrdB [0x2ba22e11@Nightstar-952.jvr.168.194.IP] has quit [Ping timeout: 121 seconds]
11:27 RchrdB [0x2ba22e11@Nightstar-952.jvr.168.194.IP] has joined #code
11:27 mode/#code [+o RchrdB] by ChanServ
11:44 RchrdB [0x2ba22e11@Nightstar-952.jvr.168.194.IP] has quit [Ping timeout: 121 seconds]
11:52 * Azash E Y E S distributed systems homework
11:53
<@Azash>
This assignment is very cutesy, which is fine
11:53
<@Azash>
eg. "In this exercise four cats are trying to catch a mouse. The characters of the story are: cheese-loving Mousie Mouse, driven Catty Cat, urban Jazzy Cat, attentive Listy Cat and overseeing Cordy Cat."
11:53
<@Azash>
However
11:53
<@Azash>
"The programming language is bash."
11:53
<@Azash>
I don't know if my choice for implementing a distributed system will often be bash scripts using netcat
11:54
<@TheWatcher>
s/often/ever/~
11:55
<@Azash>
Especially since this assignment involves, among other things, strings and interrupt handling
11:57 RchrdB [0x2ba22e11@Nightstar-952.jvr.168.194.IP] has joined #code
11:57 mode/#code [+o RchrdB] by ChanServ
11:57 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
12:10 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
12:10 mode/#code [+o Checkmate] by ChanServ
12:14 RchrdB [0x2ba22e11@Nightstar-952.jvr.168.194.IP] has quit [Ping timeout: 121 seconds]
12:15 RchrdB [0x2ba22e11@Nightstar-952.jvr.168.194.IP] has joined #code
12:15 mode/#code [+o RchrdB] by ChanServ
12:37 RchrdB [0x2ba22e11@Nightstar-952.jvr.168.194.IP] has quit [Operation timed out]
12:41 RchrdB [0x2ba22e11@Nightstar-952.jvr.168.194.IP] has joined #code
12:41 mode/#code [+o RchrdB] by ChanServ
13:02
<@Tarinaky>
Okay.
13:03
<@Tarinaky>
So. I have a Ruby program which takes ~1 hour to run.
13:03
<@Tarinaky>
I have run it through a Profiler and, lo and behold, my assumptions about where it was struggling do not match the actual profile.
13:03
<@Tarinaky>
About half of the % time is spent in Array#map!
13:04
<@Tarinaky>
I have no idea from what methods this is being called.
13:04
<@Tarinaky>
And I am not sure how to use this information to optimise effectively.
13:04
<@Azash>
Sounds like activerecord internals
13:04
<@Tarinaky>
Help>
13:04
<@Azash>
I've done some profiling and mucking around, and usually array operations and x-to-int casting is due to AR
13:05
<@Tarinaky>
I don't know what that means
13:05
<@Tarinaky>
I'm not using Rails.
13:05
<@Azash>
Oh
13:05
<@Azash>
Nevermind then
13:06
<@Azash>
Is it a lot of code or can you pastebin it?
13:06
<@Tarinaky>
It's a lot of code, and it's proprietary code (am at work)
13:09
< Syka>
run it in topaz
13:10
< Syka>
(http://docs.topazruby.com/en/latest/)
13:10
<@Tarinaky>
I'm not sure that's actually a solution.
13:10
< Syka>
well if it works in it, it is a solution
13:11
< Syka>
if you have a performance problem, run it on a RPython-built interpreter
13:11
< Syka>
if you have further performance problems, optimise
13:12
<@Tarinaky>
I'd rather take this opportunity to learn how to optimise.
13:12
<@Tarinaky>
Plus I don't want to hand the other engineers a bag of shit and tell them "Oh it's fine, just run it in an optimised environment to get something resembling an acceptable speed"
13:12
<@Azash>
Syka: Or JRuby
13:12
<@Azash>
Wait was JRuby an interpreter or
13:13
<@Azash>
Hm
13:13
<@Tarinaky>
When there's obviously something wrong with my code to put it in that positon.
13:13
< Syka>
jruby is an interpeter?
13:13
<@Azash>
Yeah
13:13
< Syka>
Tarinaky: you're using ruby.
13:13
<@Tarinaky>
jruby is a compiler iirc
13:13
<@Azash>
"JRuby is an implementation of the Ruby programming language atop the Java Virtual Machine"
13:13
<@Azash>
Sounds fairly legit
13:13
< Syka>
same as if you're using CPython
13:13
<@Tarinaky>
Syka: I'm not doing anything that should be using up so much time.
13:14
<@Tarinaky>
It /should/ take a couple of minutes at most.
13:14
<@Tarinaky>
It /is/ taking an hour.
13:14
<@Azash>
Tarinaky: Try grepping for \.map in the code
13:14
<@Azash>
Sorry, \.map!
13:14
<@Azash>
See where it's used if anywhere
13:15
<@Azash>
Also check if the profiler tells you how much time is done waiting in case there's a lot of HDD or network access leaving it waiting or something
13:15
< Syka>
to put this in perspective, *javascript* is faster than ruby these days
13:15
<@Tarinaky>
% time, cumulative seconds, self seconds, calls,self ms/call, total ms/call, name
13:17
<@Tarinaky>
No map! in my code.
13:18
< Syka>
Tarinaky: okay, so what does this code do
13:18
<@Azash>
Anyway Syka JRuby is supposed to be the fastest interpreter by a fair amount
13:19
< Syka>
like, as far as functionality
13:19
<@Tarinaky>
Syka: Calls a bash script that executes a ton of tinymix commands.
13:19
<@Tarinaky>
Then it plays some audio while recording from the microphone.
13:19
< Syka>
okay.
13:19
<@Tarinaky>
Then it finds the supremum of the samples in the recording.
13:19
< Syka>
Tarinaky: are you generating a lot of stdout/stdin?
13:20
<@Tarinaky>
And confirms if the recording is silence.
13:20
< Syka>
in that bash script
13:20
<@Tarinaky>
The bash command is invoked with a redirection to /dev/null
13:20
<@Tarinaky>
But yes, tinymix produces a lot of output.
13:20
< Syka>
right
13:20
< Syka>
so... is it ruby that's slow?
13:20
< Syka>
because it might be 90% .map
13:21
< Syka>
but it might be running for like two seconds
13:21
<@Tarinaky>
Kernel.System is the method that does something in bash.
13:21
<@Tarinaky>
I was /expecting/ to see that at the top of the stack...
13:21
<@Azash>
If there is no map! in your code it might be inside Kernel.System
13:21
<@Azash>
¯\_(ã)_/¯
13:21
< Syka>
i am wondering why you are using ruby as a scripting language
13:21
<@Tarinaky>
.map! has 1,474.15 self seconds
13:21
<@Azash>
Syka: Found the source I had from before http://www.madebymarket.com/blog/dev/ruby-web-benchmark-report.html
13:21
< Syka>
and not uh... bash
13:21
<@Azash>
Tarinaky: How many calls?
13:22
<@Tarinaky>
Syka: Because the entire thing is wrapped up in Cucumber.
13:22
<@Tarinaky>
It's test code.
13:22
< Syka>
Azash: http://benchmarksgame.alioth.debian.org/u64/benchmark.php?test=all&lang=yarv&lan g2=jruby&data=u64 also
13:22
<@Tarinaky>
1,821 calls.
13:22
< Syka>
Azash: that seems a bit all over the shop
13:23
< Syka>
as far as pure CPU
13:24
<@Azash>
Syka: You can tell from the test results in section 3 that this test failed to take into account what most tests involving Java do
13:24
<@Azash>
JIT caching
13:24
<@Azash>
Like they say in my link, JRuby is slower for the first couple of runs and then shows a general 50-100 percent improvement in speed once everything's done and loaded
13:25
<@Azash>
Tarinaky: A second per call seems kinda hefty
13:25
<@Azash>
I wonder if it's dealing with huge arrays or something
13:25
< Syka>
Azash: no not really
13:26
< Syka>
http://benchmarksgame.alioth.debian.org/u64/program.php?test=pidigits&lang=jruby &id=4
13:26
< Syka>
Azash: they do it for n=10,000
13:26
< Syka>
h wait
13:26
< Syka>
reading that wrong
13:27
< Syka>
okay it's essentially runs for some of them
13:27
< Syka>
but for http://benchmarksgame.alioth.debian.org/u64/program.php?test=knucleotide&lang=jr uby&id=4 , the inner bits should be JIT'd
13:29
<@Azash>
Hm
13:29 * Tarinaky does the only logical thing and RTFS
13:29
<@Azash>
Read the fucking Stackoverflow? ( ââ¿â)
13:30
<@Tarinaky>
Source
13:30
<@Tarinaky>
Read the Source
13:30
<@Tarinaky>
Except it's super-hard to search Ruby imo :/
13:30
<@Azash>
I need to find a decent profiler
13:30
<@Azash>
ruby-prof is not very useful
13:41
<@TheWatcher>
Tarinaky: how much code are you talking about here?
13:54
<@Tarinaky>
TheWatcher: I've been working solidly on this for ~2 months 9-5.
13:55
<@Tarinaky>
Mostly, I am just so unsure about the proprietry of pastebinning code from/at work
13:55
<@Tarinaky>
Because IP
13:56
<@Azash>
Usually unsure = don't when it comes to NDA
13:56
<@Azash>
I take it you did sign an NDA
13:56
<@Tarinaky>
I'm not under a personal NDA.
13:56
<@Azash>
You're not?
13:56
<@Tarinaky>
No. The company just owns everything I do.
13:57
<@Tarinaky>
Id have to double check my contract though.
13:57
<@TheWatcher>
I was more curious about scope rather than seeing it
13:57
<@TheWatcher>
(nostely, I prefer jabbing rusty forks in my legs than working with ruby...)
13:57
<@Tarinaky>
A lot of the code is replication of the same core functionality on several platforms.
13:58
<@Tarinaky>
So a lot of the code can be considered 'dead' during a run-through
13:58
<@Tarinaky>
But at the same time, anything that involves the phrase "functionality on several platforms" is automatically full of spiders.
13:59
<@RchrdB>
Usually, yes.
13:59
<@RchrdB>
Some people manage to do it cleanly, like "foo_api.h" and then "foo_windows.c" "foo_linux.c" "foo_solaris.c" etc.
14:00
<@RchrdB>
Can work if the presented API actually hides the entirety of the platform quirks, which is obviously difficult and pretty rare.
14:01
<@Tarinaky>
Yeah.
14:01
<@Tarinaky>
Part of the task though
14:30 celticminstrel [celticminst@Nightstar-ak6p6n.dsl.bell.ca] has joined #code
14:30 mode/#code [+o celticminstrel] by ChanServ
14:34 * Tarinaky facepalms
14:34
<@Tarinaky>
I know why my software is giving me unintuitive answers for profiling.
14:34
<@Tarinaky>
It's because the profiler adds overhead to method calls
14:36
<@Tarinaky>
I am a moron
14:39
<@Tarinaky>
God save us from people who try to be clever and don't just stick to implementing sampling profilers :(
15:02
<@RchrdB>
ye-es
15:03
<@RchrdB>
Quite often you can successfully use a funcall (not sampling) profiler despite the distortion from its overhead just because the signal that you're looking for is large enough to be visible anyway
15:04
<@RchrdB>
sampling profilers really are the best, though.
18:44 Kindamoody|afk is now known as Kindamoody
20:47 Kindamoody is now known as Kindamoody[zZz]
21:14
<&ToxicFrog>
16:10 < christinelove> [04] RT @mcclure111: Please note: Per ISO ISO 8601 if it is not formatted like 1994-11-05T08:15:30-05:00 it is not a date, it is just "hanging out"
21:15
<@Tamber>
hee
21:17 * TheWatcher facepalm
21:17
<&McMartin>
hooray
21:18
<@RchrdB>
Christine Love is a fantastic person.
21:18
<@RchrdB>
mcclure also.
22:01 * TheWatcher eyes this call graph, ughs
22:01
<@TheWatcher>
This is going to be a pain in the arse to refactor >.<
22:05
<@gnolam>
IPPON
22:10
<@froztbyte>
McMartin: found a thing which may be of interest to you, see pm
22:12
<@froztbyte>
McMartin: if you'd be interested, let me know, I think I could get you onto the list
22:23 RchrdB [0x2ba22e11@Nightstar-952.jvr.168.194.IP] has quit [[NS] Quit: Leaving]
22:27
< Reiv>
ToxicFrog: Y'know, I can't actually /read/ that datemask
22:27
< Reiv>
What's the -05:00 doing?
22:28
<@froztbyte>
timezone
22:28
< Reiv>
oh right
22:31
<@Alek>
what's the T?
22:32
<@froztbyte>
https://en.wikipedia.org/wiki/ISO_8601 fwiw
22:35
< Reiv>
Time, one would expect
22:35
<@Alek>
ah, T is the standard delimiter between date and time.
22:35
<@Alek>
it probably stands for time, but it's really just a delimiter at this point. ok.
22:36 * TheWatcher <3 8601, wishes more people'd fucking use it
22:41 RchrdB [0x2ba22e11@Nightstar-qe9.aug.187.81.IP] has joined #code
22:42 mode/#code [+o RchrdB] by ChanServ
22:52
<&McMartin>
froztbyte: Indeed that is of interest to me
22:59 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
22:59 mode/#code [+qo Vornicus Vornicus] by ChanServ
23:06 * TheWatcher stabs, and stabs, and stabs the dark engine
23:06
<&McMartin>
... that set off resonators in my brain
23:06
<&McMartin>
Then I realized that was Dr. Breen's Sandwich
23:07
<@TheWatcher>
Quite.
23:08
<&McMartin>
REFUSE TO RENDER
23:09
<@TheWatcher>
(or, in this case, refuse to add a metaprop (even when it says it has added it))
23:12
<~Vornicus>
the T is like the only part of iso 8601 I dislike
23:14
<@TheWatcher>
Well, it can be omitted by mutual agreement.
23:14
<@TheWatcher>
(as of 8601.2004)
23:44 * gnolam nghgnghs and grits his teeth.
23:44
<@TheWatcher>
?
23:45
< Reiv>
Vornicus: Yeah, I'd actually agree on that
23:46
< Reiv>
Having an alpha in the middle of your numerics and symbols is a bit messy
23:46
< Reiv>
(And also I'm actually used to T standing for Timezone)
23:47
<@gnolam>
One goddamned non-broken database file, is that too much to ask?
23:47
<@gnolam>
Or how about they at least decide to be broken in the same ways?
23:47
<@gnolam>
But no.
23:48
<@gnolam>
They're goddamned brokenness snowflakes.
23:52
< Reiv>
<3 databases
23:52
< Reiv>
</3 database files
--- Log closed Tue Sep 09 00:00:41 2014
code logs -> 2014 -> Mon, 08 Sep 2014< code.20140907.log - code.20140909.log >

[ Latest log file ]