code logs -> 2014 -> Fri, 26 Sep 2014< code.20140925.log - code.20140927.log >
--- Log opened Fri Sep 26 00:00:49 2014
01:00 Turaiel is now known as Turaiel[Offline]
01:14 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
01:14 mode/#code [+qo Vornicus Vornicus] by ChanServ
01:15 Derakon[AFK] is now known as Derakon
01:52 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
02:15 Turaiel[Offline] is now known as Turaiel
02:44
<@macdjord|nap>
froztbyte: Sure. WHat's the topic?
02:44 macdjord|nap is now known as macdjord
03:11 Thalass|QUADCOPTERWHEE is now known as Thalass
03:36 Thalass is now known as Thalass|afk
03:53 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
03:55 McMartin [mcmartin@Nightstar-pct.9b0.223.107.IP] has quit [[NS] Quit: brb]
03:58 McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has joined #code
03:58 mode/#code [+ao McMartin McMartin] by ChanServ
04:20 Kindamoody[zZz] is now known as Kindamoody
04:23 Thalass|afk is now known as thalass
04:57 * McMartin is introduced to http://istheinternetonfire.com/
04:57
<~Vornicus>
man
05:07 Derakon is now known as Derakon[AFK]
05:46 Syka [the@Nightstar-c409v3.vividwireless.net.au] has quit [Ping timeout: 121 seconds]
05:47 Syka [the@Nightstar-c409v3.vividwireless.net.au] has joined #code
05:59 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
06:01 thalass is now known as Thalass|werk
06:05 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!]
06:23 Thalass|werk [thalass@Nightstar-481nhl.bigpond.net.au] has quit [Ping timeout: 121 seconds]
06:31 Turaiel is now known as Turaiel[Offline]
06:52 * Alek boggles at McM's link.
07:07 Harlow [harlow@Nightstar-pq0497.il.comcast.net] has joined #code
07:12
< Harlow>
question about recursion, when a function is calling itself, something like Fibonacci where it has to compute n-2 + n-1 as a return, does the stack have both of those functions on there at the same time or does the program go down into 1 complete and then bring the value to be added to the other function when it returns?
07:13
<@macdjord>
Harlow: Only one is on the stack at a time.
07:14
< Harlow>
so the return value is put in a register that goes back to the previous item on the stack computes that then returns in the same fashion?
07:23
<@macdjord>
Um, okay.
07:23
<@macdjord>
unsigned int fib(unsigned int n) {if (n<2) {return n;} else {return fib(n-1) + fib(n-2);}}
07:24
<@macdjord>
Execution reaches the second return statement.
07:24
<@macdjord>
It calculated n-1, then makes the recursive call to fib(), passing that value, on a new stack frame.
07:25
<@macdjord>
When the recursive call is done it returns its result. The first call stores that result, calculates n-2, and makes the second recursive call.
07:26
<@macdjord>
When the second recursive call is done, it also returns its result. The first call takes those two results, adds them together, and returns.
07:26
<@macdjord>
The maximum stack frame depth will be O(n), but the total number of recursive calls will be O(n^2).
07:31
<@Azash>
I always thought it was neat that the naive solution supposedly also has the time complexity of fib(n)
07:31
<@froztbyte>
macdjord: it'll be making https://elegua.za.net/~froztbyte/logcabin_presentation/ more of a tech talk
07:34
<@macdjord>
froztbyte: So its a... log... summarizer?
07:34
<@froztbyte>
hmmm
07:34
<@froztbyte>
well, like
07:35
<@froztbyte>
it's a couple of steps above what you get out of awstats/webalizer/etc
07:35
<@macdjord>
I've never used any of those.
07:35
<@froztbyte>
they're pretty terrible, so don't
07:35
<@froztbyte>
:D
07:36
<@froztbyte>
(seriously, I've had awstats OOM some machines because I gave it "big" logs)
07:36
<@froztbyte>
(turns out that it creates an in-memory hash while parsing things, so if you have enough things..)
07:37
<@macdjord>
froztbyte: As in 'I have no idea what those are (beyond what I can guess from the names) so comparing to them is Uninformative'.
07:37
<@froztbyte>
oh
07:37
<@froztbyte>
they're webserver (usually) log summarizers
07:37
<@froztbyte>
would run nightly on cron, parse your logs, and do various stats-y things
07:37
<@macdjord>
Right, guess as much.
07:37
<@froztbyte>
message size histogram, etc
07:38
<@froztbyte>
so, with this stack
07:38
<@froztbyte>
I get to ship all my logs to a central point in realtime (about 2~3s delay sometimes)
07:39
<@froztbyte>
and I can search on 6 months of data in a few seconds
07:39
<@froztbyte>
so I can, for instance, trace a cascade failure caused by $x in a couple of minutes
07:39
<@froztbyte>
(and have :D)
07:40
<@froztbyte>
on one of our platforms we're doing a realtime breakdown of top UAs on the platform, top content, etc
07:41 Kindamoody is now known as Kindamoody|afk
07:43
<@macdjord>
Neat.
07:58
<@froztbyte>
quite
07:59
< Harlow>
is anyone familiar enough with asm to explain what in St moses is going on in line 14 of this? http://pastebin.com/8GzaYfe8
08:01
<@froztbyte>
movl -4(%ebp, %edx, 4), %eax # Full example: load *(ebp - 4 + (edx * 4)) into eax
08:02
<@froztbyte>
https://en.wikibooks.org/wiki/X86_Assembly/GAS_Syntax#Address_operand_syntax
08:04
< Harlow>
so its my (A ptr+ 4*eax) into edx
08:25
< Harlow>
froztbyte does it look like I'm on the right track? http://pastebin.com/6HnuHwmi i mean if its finding the spot that the values lie on like i describe on line 14?
08:26
< Harlow>
or is 4 built into it knowing that thats sizeof int at 32 bits :/
08:31
< Harlow>
meh, well I'm going to leave it at that for now its seriously time to get some rest. ttyl thanks for the point in the right direction though.
08:31 Harlow [harlow@Nightstar-pq0497.il.comcast.net] has quit [[NS] Quit: BED]
08:31
<&McMartin>
Assembler doesn't know what your puny "int"s are.
09:37 Attilla [uid13723@Nightstar-ed0oqj.irccloud.com] has joined #code
09:46 Zelclone [zoomzoom@Nightstar-c11.op7.189.197.IP] has quit [Connection closed]
09:46 Zelphar [zoomzoom@Nightstar-c11.op7.189.197.IP] has joined #code
09:59
<@Tarinaky>
Boolean question: Is there such thing as a 'Conditional Not'?
09:59
<@Tarinaky>
I guess thinking about it, that'd be !A && B || A && !B ?
10:05
< [R]>
What do you mean?
10:06 * [R] breaks out the truth tables
10:08
<@Tarinaky>
[R]: A not gate which is turned on/off by a second control bit.
10:09
<@Tarinaky>
There's a Quantum logic gate called a CNOT which is used to create entanglement between two independent qubits.
10:09
< [R]>
According to my truth table, that can be simplified to: !!A ^ !!B
10:10
<@Tarinaky>
Err... what's the associativity on those '!'?
10:10
< [R]>
(Double bang is to force the value to be 0 or 1
10:10
<@Tarinaky>
Why do you need to force the value to be 0 or 1?
10:10
<@Tarinaky>
It's Boolean algebra?
10:10
< [R]>
Because there's no logical xor
10:11 RchrdB [0x2ba22e11@Nightstar-952.jvr.168.194.IP] has joined #code
10:11 mode/#code [+o RchrdB] by ChanServ
10:11
<@Tarinaky>
What?
10:11
<@Tarinaky>
Wait: are you doing a particular programming language?
10:11
< [R]>
^ is bitwise
10:11
<@Tarinaky>
Because I'm just talking about Boolean Algebra.
10:11
<@Tarinaky>
On paper.
10:11
<@Tarinaky>
With pens.
10:12
< [R]>
Oh
10:12
< [R]>
Then the !! are pointless
10:12
<@Azash>
[R]: But there is
10:12
<@Azash>
(+)
10:12
< [R]>
Azash?
10:12
<@Tarinaky>
So a Conditional Not is just an XOR?
10:12
<@Azash>
The XOR operator
10:12
<@Azash>
It's a circle filled by a plus
10:13
< [R]>
That's a syntax error in most languages methinks
10:13
<@Tarinaky>
The C++ standard places no requirements against writing your code in crayon.
10:14
<@Tarinaky>
*stack overflow classic here*
10:14
<@Azash>
[R]: Sure but Tari seems to be talking general logic, not programming
10:16
< [R]>
I was assuming it was related to C++
10:16
< [R]>
Or some other language
10:18 * Tarinaky glares at her code.
10:18
< [R]>
https://gist.github.com/RobinStamer/753e19310fee6104b4e8
10:25 gnolam [lenin@Nightstar-lhk.n94.131.88.IP] has joined #code
10:25 mode/#code [+o gnolam] by ChanServ
11:16 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
11:41 * Tarinaky glares
11:41
<@Tarinaky>
wtf.
11:41
<@Tarinaky>
For some reason when I pass in /one/ number this produces some weird degenerative case.
11:46
<@RchrdB>
fuzz testers hate her
11:47
<@RchrdB>
find bugs instantly! with this ONE weird number, discovered by a local Tarinaky!
11:49 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
11:49 mode/#code [+o Checkmate] by ChanServ
11:50
<@Tarinaky>
And now all the noise sounds wrong.
11:50
<@Tarinaky>
Eugh.
11:52
<@Tarinaky>
W.T.F.
12:15 macdjord is now known as macdjord|nap
12:37 macdjord|nap is now known as macdjord
13:30 RchrdB [0x2ba22e11@Nightstar-952.jvr.168.194.IP] has quit [Ping timeout: 121 seconds]
13:42 Harlow [harlow@Nightstar-tvoscd.wireless.uic.edu] has joined #code
13:46 RchrdB [0x2ba22e11@Nightstar-952.jvr.168.194.IP] has joined #code
13:46 mode/#code [+o RchrdB] by ChanServ
13:54 celticminstrel [celticminst@Nightstar-ak6p6n.dsl.bell.ca] has joined #code
13:54 mode/#code [+o celticminstrel] by ChanServ
14:03 gnolam [lenin@Nightstar-lhk.n94.131.88.IP] has quit [[NS] Quit: Gone]
14:04 macdjord is now known as macdjord|nap
14:06 Turaiel[Offline] is now known as Turaiel
14:16 Q-AtWork [unknown@Nightstar-tvr.uqi.114.87.IP] has joined #code
14:19 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
14:44 gnolam [lenin@Nightstar-utbkuh.cust.bredbandsbolaget.se] has joined #code
14:44 mode/#code [+o gnolam] by ChanServ
14:52 Harlow [harlow@Nightstar-tvoscd.wireless.uic.edu] has quit [[NS] Quit: BED]
15:38
<@Tarinaky>
God I hate reading people's MATLAB code.
15:38
<@Tarinaky>
What did I do to get put in the special hell where people have to read scientist's code.
15:38
<@Tarinaky>
:(
15:38
<@RchrdB>
Science?
15:42 Turaiel is now known as Turaiel[Offline]
15:44
<@TheWatcher>
Tarinaky: be thankful it isn't java or perl written by a biologist
15:44 * TheWatcher shudders
15:49 simon_ [simon@Nightstar-2og823.pronoia.dk] has joined #code
15:49 Checkmate [Z@Nightstar-ro94ms.balk.dk] has joined #code
15:49 mode/#code [+o Checkmate] by ChanServ
15:51
< simon_>
I wonder how hard it is to take a string and a replacement regex (s/foo/bar/), apply it and determine if there exists a shorter, equivalent regex replacement. or rather, a pair of strings and determine the shortest regex replacement.
15:52
< simon_>
s/.$/ between them./
15:54
<@Tarinaky>
Surely the answer is always s/^Literals that match position-wise*More literals$/Literals that match position-wise STUFF NOT IN ORIGINAL More literals/
15:55
<@Tarinaky>
Or at least of that form.
15:55
<@Tarinaky>
Possibly apply recursion.
15:55 Q-AtWork [unknown@Nightstar-tvr.uqi.114.87.IP] has left #code []
15:56
<@RchrdB>
simon_, I bet there are a bunch of ways to encode an NP-hard problem in that
15:57
<@Tarinaky>
My ears hurt :(
16:03
< simon_>
well, since we're dealing with regular languages, I thought maybe not.
16:10
<@Tarinaky>
Question...
16:10
<@Tarinaky>
*Math Question
16:10
<@RchrdB>
I think both possibilities are plausible.
16:10
<@Tarinaky>
If I pick any two consecutive number:
16:10
<@Tarinaky>
Are they guarneteed to be /relatively/ prime?
16:11
<@Tarinaky>
i.e. will they have a common factor other than 1.
16:11
< EvilDarkLord>
They will not.
16:11
< EvilDarkLord>
If they did, you would obtain one from the other by adding a number other than 1.
16:12
< EvilDarkLord>
But they are consecutive, so this does not work.
16:25
<@Azash>
simon_: Generating it for a specific string and modified string shouldn't be too hard
16:25
<@Azash>
If you want a general-purpose "compactor", that's harder
16:26
<@Azash>
simon_: From our department, https://www.cs.helsinki.fi/en/story/70787/study-teach-and-do-what-fun
16:26
<@Azash>
You might consider waiting for his thesis to be done or contacting him yourself if it's important
16:29
<@Azash>
Oh wait that was his master's
16:29
<@Azash>
If you want I can probably get it for you
17:08
< simon_>
Azash, hah, cool.
17:09
< simon_>
Azash, there's a PhD at my dept. who works on regular expressions, too.
17:11
<@Tamber>
<virtadpt> I just threw up a little in the back of my mouth. https://pic.dhe.ibm.com/infocenter/wsdatap/v6r0m0/index.jsp?topic=%2Fcom.ibm.dp. xm.doc%2Fjson_jsonx.html
17:30 Checkmate [Z@Nightstar-ro94ms.balk.dk] has quit [Ping timeout: 121 seconds]
17:46
< simon_>
hahaha
17:46
< simon_>
I think they misunderstood something.
17:56 Turaiel[Offline] is now known as Turaiel
18:26 RchrdB [0x2ba22e11@Nightstar-952.jvr.168.194.IP] has quit [Connection closed]
18:46 Turaiel is now known as Turaiel[Offline]
19:21
<@gnolam>
https://twitter.com/MrAlanCooper/status/513767772443000832/photo/1
19:29
<@froztbyte>
Hahahhaha
19:32
<@gnolam>
http://cgit.freedesktop.org/gstreamer/gstreamer/tree/plugins/elements/gstfilesrc .c?id=RELEASE-0_10_22#n798
19:54 Kindamoody|afk is now known as Kindamoody
20:01
<@froztbyte>
gnolam: this is a project that implemented their own object model in C
20:01
<@froztbyte>
That's the entirety of my comment, though.
20:38 Kindamoody is now known as Kindamoody[zZz]
20:48
<&McMartin>
froztbyte: GObject is a thing. It's a reason I kind of steer clear of that set of technologies when I can
20:49
<@froztbyte>
Indeed
20:50
<@froztbyte>
I did some gst stuff earlier this year, and was very confused about GObjext
20:50
<@froztbyte>
GObject*
20:50
<@froztbyte>
So I read the implementation
20:50
<@froztbyte>
Not my best decision
21:08 Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has quit [[NS] Quit: bbl]
21:09
<&McMartin>
There's also a fake dialect of C# that compiles to it, which I find more hilarious than I should given that this is a completely reasonable thing to do when confronted with it.
21:22 ErikMesoy [Erik@Nightstar-jffd2p.80-203-16.nextgentel.com] has joined #code
21:22 mode/#code [+o ErikMesoy] by ChanServ
21:28 Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has joined #code
21:28 mode/#code [+o Alek] by ChanServ
21:46
<@froztbyte>
McMartin: tell me more
21:46
<&McMartin>
froztbyte: The project/language is called "Vala".
21:46
<@froztbyte>
oh, that
21:46
<&McMartin>
You have now been told more.
21:46
<@froztbyte>
never paid it terribly much attention
21:46 * McMartin bows formally, doffs top hat.
21:47
<@froztbyte>
but things clicked
21:47
<@froztbyte>
McMartin: the thing that I think struck out most for me was how hilariously the intersection between "vtable map/override hacks" and "C member calls" things got
21:47
<@froztbyte>
McMartin: the veneer is thin.
21:47
<@froztbyte>
yet there's this whole gigantic ecosystem built up around it
21:48
<@froztbyte>
(to the point where said ecosystem is actually pretty damn useful)
21:48
<@froztbyte>
(but...*damn*.)
21:50
<&McMartin>
(Seriously, virtual calls are a super-nice way to control use of function pointers)
21:50
<&McMartin>
(So even a thin veneer is pretty handy)
22:35 macdjord|nap is now known as macdjord
23:34 Turaiel[Offline] is now known as Turaiel
23:58 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
23:58 mode/#code [+qo Vornicus Vornicus] by ChanServ
--- Log closed Sat Sep 27 00:00:04 2014
code logs -> 2014 -> Fri, 26 Sep 2014< code.20140925.log - code.20140927.log >

[ Latest log file ]