code logs -> 2016 -> Tue, 10 May 2016< code.20160509.log - code.20160511.log >
--- Log opened Tue May 10 00:00:33 2016
00:20 * McMartin fiddles with syscalls in Linux through assembly code
00:20
<&McMartin>
... this is a lot more like MS-DOS than I was expecting it to be
00:21
< [R]>
https://i.imgur.com/F30oHlS.png
00:21
< [R]>
Oh? Is that a good or a bad thing?
00:22
<&McMartin>
Hrm. I suppose at the end of the day it's not much of any kind of thing, actually
00:22
<&McMartin>
It's more comfortable *for me*
00:22
<&McMartin>
But it means syscalls work via triggering interrupts and passing data around in registers
00:23
<&McMartin>
Which I'm more comfortable with than messing around with alignment guarantees and passing stuff on the stack, as Windows and (I think?) BSD do.
00:23
<&McMartin>
On the minus side, the Windows approach means there's no real programmatic difference between making a syscall and calling something from a DLL
00:23
<&McMartin>
Which is cleaner[*]
00:24
<&McMartin>
[*] module ABIs across your DLLs, which are actually quite likely to be different after 20 years, but you're an assembly programmer, you take that shit in stride
00:24
<&McMartin>
*modulo
00:26 Derakon[AFK] is now known as Derakon
00:27 catadroid [catalyst@Nightstar-labuc5.dab.02.net] has joined #code
00:29 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has quit [[NS] Quit: Leaving]
00:49
<&McMartin>
catadroid: Hey, I had a point of C++ style to ask you about
00:50
<&McMartin>
If I am seized by the brainworms and actually make use of the offsetof() macro, how do I actually get a pointer out of base + offset?
00:51
<&McMartin>
Is the standard way really to reinterpret_cast base pointer to char *, add the offset, then reinterpret_cast back to member type?
00:51
<&McMartin>
*member type pointer
00:51
<&McMartin>
Or is there some less C-y way to rock this
00:54
< catadroid>
Rather too tired to think it through right now
00:55
<&McMartin>
OK, no problem
00:56
<&McMartin>
You're just the most authoritative person I know of on this. If there's a "here's a good place to find stuff like that" source too, I will also happily take pointers on that
00:56
<&McMartin>
But, uh, yeah, it's 1 AM for you now, isn't it
00:56
<&McMartin>
I suggest peppermint tea
00:56
< catadroid>
But I guess I would cast to uintptr_t or similar rather than char*
00:57 catadroid` [catalyst@Nightstar-g4k01n.dab.02.net] has joined #code
00:57
< catadroid`>
Erk
01:00 catadroid [catalyst@Nightstar-labuc5.dab.02.net] has quit [Ping timeout: 121 seconds]
01:18 Thalass is now known as thalass|brb
02:13
<&Derakon>
...should I be reading uintptr_t as anything other than "unsigned int pointer"?
02:14
< [R]>
No
02:14
< [R]>
I don't get why you'd use that over void * for something like that, but w/e
03:02
<@celticminstrel>
Isn't uintptr_t the int type guaranteed to be the same size as void*?
03:02
<@celticminstrel>
ie, not actually a pointer type, but an integer type that could store a pointer.
03:07
<&McMartin>
What CM said
03:07
<&McMartin>
And you don't use void * because void * cannot be serialized nor can it have math done to it
03:33
<@Reiv>
HEY VORN (and McMartin and other math dudes)
03:34
<@Reiv>
I have a fun math problem
03:34
<@Reiv>
Part of it being insane units, but here goes
03:34
<@Reiv>
Data set of 14000, 200 samples per week results in 15min of clashes as people accidentally take the same sample (it is psuedorandom, so obviously they're all picking from nearer the top of the list)
03:35
<~Vornicus>
wat
03:35
<~Vornicus>
"pseudorandom" should not give
03:35
<@Reiv>
They want to increase the sample rate to 400 pw, which will also start to eat into the data set by 200 pw (which is to say, after 10 weeks there should be 12000 left)
03:36
<~Vornicus>
I feel like there's even more missing context.
03:36
<@Reiv>
... so, of course, after a year there will be a smaller data set and the increased data sampling, so the clashes are going to increase exponentially, yes?
03:37
<@Reiv>
"We have a huge pile of work. We're going to increase our rate we work on it so it actually goes down instead of staying steady. We currently waste time when two people pick the same data point simultaneously*. How much time is going to get wasted if we increase the sampling rate, which will also reduce the pile of work?"
03:38
<~Vornicus>
Okay. So you're pulling in 200 items of work a week. You're then "trying" to parcel out 200 items of work per week
03:38
<&Derakon>
Higher sampling rate leads to more frequently grabbing the same piece of work, aye?
03:38
<@Reiv>
Correct
03:38
<~Vornicus>
But people are colliding on the work selected.
03:38
<&Derakon>
Fix your goddamn sampling function~
03:38
<@Reiv>
And I suspect it is quadratic at minimum
03:38
<@Reiv>
Derakon: Our sampling function is literally a list that's spat out each day
03:39
<@Reiv>
People are choosing 'at random' from it, but they are /people/ and there are no dice on hand
03:39
<@Reiv>
I also don't really know where to buy a d14000
03:39
<&Derakon>
Oh.
03:39
<@Reiv>
So it's not exactly true-random
03:39
<&Derakon>
Replace your people with computers, problem solved~
03:39
<@Reiv>
I am writing the justification for 'how much time will my proper, actually-sane solution save'
03:40
<@Reiv>
And ran into a lovely little math knot while I was there
03:40
<&Derakon>
This sounds like a dynamic systems / linear algebra problem, I think.
03:40
<@Reiv>
"So wait, we do 200/wk at the moment, and we waste maybe 15mins on clashes. Not too bad. But you want to increase to 400/wk, and this is going to start reducing the body of work by 200/wk accordingly, so ... shit, what the hell does that do to your collision rate"
03:41
<@Reiv>
"What does this look like in a years time, because then I can justify spending the money now"
03:41
<&Derakon>
Assuming perfect randomness, collision rate should be a function of the number of items and the amount of time it takes for a single person to process one item.
03:41
<&Derakon>
And the number of people doing processing.
03:42
<&Derakon>
Like, if you have 1 item, then you will have N collisions, N = number of people.
03:42
<@Reiv>
I was hoping for a ratio and/or multiplier, because I don't know how many actual collisions are involved, just the amount of time wasted accordingly
03:42
<@Reiv>
because administrative staff are lovely people, but they don't think in the raw beauty of mathematics like we do~
03:42
<&Derakon>
I'm inclined to say "throw Monte Carlo at it".
03:43
<&Derakon>
I don't appreciate math's raw beauty either~
03:43
<@Reiv>
... heh
03:43 * Vornicus thinks at it
03:44
<@Reiv>
If 200 samples from 14000 is 15min, what is 400 samples from 4000?
03:44
<~Vornicus>
Shrieking.
03:44
<@Reiv>
I'm pretty sure that's exponential or something equally silly.
03:44
<&Derakon>
Like I said, I think it's a linear algebra problem.
03:44
<&Derakon>
Those are not trivial to calculate.
03:44
<@Reiv>
Pity I don't know linear algebra
03:44
<@Reiv>
I note I am overthinking this of course
03:44
<~Vornicus>
Just shrieking.
03:44
<@Reiv>
Half my co-workers just write in "Value: 1500" or something and hope no-one notices
03:45
<@Reiv>
But nooo, I want to do maaaath don't I, because I am a craven soul who grew up valuing truth
03:45
<@Reiv>
I could just go a linear comparison.
03:45
<@Reiv>
It'll be much, much worse than it really is
03:45
<@Reiv>
But it might be right!
03:45
<@Reiv>
Or at least, it'll be a 'conservative estamite'
03:45
<@Reiv>
Which is probably for the best
03:46
<@Reiv>
Because who are we kidding, if it gets bad enough and the sample small enough they'll just stop using psuedorandom
03:46
<@Reiv>
So fuckit, I'll do that.
03:46
<&Derakon>
Like I said, throw Monte Carlo at it.
03:46
<@Reiv>
!14000/200*15
03:46
<@Reiv>
... aw, no dicebot
03:46
<@Reiv>
I'm not clever enough to do a monte carlo
03:46
<@Reiv>
And certainly not on work time
03:47
<@Reiv>
... I am not clever enough to algebra either, apparently
03:48
<@Reiv>
If one in 70 is 15; one in 10 would be... 105?
03:49
<@Reiv>
Fuckit, it's 105. So then I take the average of these (60) and declare that at the accelerated pace, we have provided a solution to avoid an hour a weeks' wasted work.
03:49
<@Reiv>
This is of course hilariously wrong
03:49
<&Derakon>
Heh.
03:50 thalass|brb is now known as Thalass|slep
03:51
<@Reiv>
But it has numbers and there are so many intangibles to the numbers, including whether or not 400/wk would really cut it down or if the rate of incoming increases so we stay steady [which reduces the value], or if they start hitting more collisions so change their method [which reduces the value] or if they increase the number of people working on it [which increases the value] that number-outta-a-hat might as well stay simple when it's impossibl
03:54
<&Derakon>
I maintain that you should just assign people their work items so there are no collisions.
03:54 Thalass|slep [thalass@Nightstar-283.o7s.158.104.IP] has quit [Operation timed out]
03:54
<~Vornicus>
Yes, the difficulty here is convincing manglement at that
03:59
<@Reiv>
No, the trick is arranging a method so that people don't get collisions
03:59
<@Reiv>
We have a tool for that
03:59
<@Reiv>
Literally
04:00
<@Reiv>
I'm just justifying the effort in arranging it to be used, and justifying training the people in how to use it
04:04
<@Reiv>
It will literally take a list constructed in SQL (like the one they currently have) and loads it nightly, /checks against the previous lists/ to see if something is a duplicate or not. If so, leaves it on the list. If it's new, adds it. If it's gone, hides it.
04:04
<@Reiv>
This persistent list then has the ability to have notes saved against it.
04:04
<@Reiv>
And 'come back to it later', 'ignore it's done now' etc.
04:05
<@Reiv>
Little bit useful.
04:05
<@Reiv>
Takes a bit of config to get the SQL to spit out the right shaped columns.
04:05
<@Reiv>
So they go through us
04:05
<@Reiv>
And so now I have to pull a dollar value to my config time. ;_;
04:11 Turaiel is now known as Turaiel[Offline]
04:21 Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
05:04 catadroid` [catalyst@Nightstar-g4k01n.dab.02.net] has quit [The TLS connection was non-properly terminated.]
05:04 catadroid [catalyst@Nightstar-g4k01n.dab.02.net] has joined #code
05:11 Derakon is now known as Derakon[AFK]
05:47 celticminstrel [celticminst@Nightstar-q0f7bb.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
06:09 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has quit [Ping timeout: 121 seconds]
06:58 Turaiel[Offline] is now known as Turaiel
06:59 Turaiel is now known as Turaiel[Offline]
07:27 catadroid` [catalyst@Nightstar-huiopn.dab.02.net] has joined #code
07:29 Turaiel[Offline] [Brandon@Nightstar-7mqsi0.mi.comcast.net] has quit [Operation timed out]
07:31 catadroid [catalyst@Nightstar-g4k01n.dab.02.net] has quit [Ping timeout: 121 seconds]
07:39 Turaiel[Offline] [Brandon@Nightstar-7mqsi0.mi.comcast.net] has joined #code
07:49
< catadroid`>
McMartin: I admit I think I'll need to do more thinking about offsetof before I have actual advice
07:51
<&McMartin>
I've been wandering the Internets for insight while you slept, as it happens
07:51
<&McMartin>
My tentative conclusion is "even if the standard says this is undefined, if it doesn't work, all hell breaks loose"
07:51
< catadroid`>
There's a lot of that
07:52
< catadroid`>
Our resource reading routines rely on it being common enough across platforms
07:52
< catadroid`>
For example
07:52
< catadroid`>
I think I came to the same conclusions about alignment
07:53
<&McMartin>
Well, so, (not to interrupt, but) the fun thing is that it's in question whether it *is* undefined; the standard apparently demands that standard-layout objects be in contiguous memory, which may mean that in fact *does* insist that seeking within it as if it were a byte array must be legal
07:53
< catadroid`>
The standard doesn't mandate the tightest packing scheme, but if a compiler doesn't it isn't competitive
07:53
<&McMartin>
Ah yes
07:54
<&McMartin>
That's off in #pragma land, isn't it
07:54
< catadroid`>
Sort of
07:54
< catadroid`>
In practice you can make simple assumptions
07:54
<&McMartin>
Yeah, my weird corner is that if my case doesn't work, offsetof() is part of the standard but it's undefined behavior to ever make use of the value as anything other than a charming curiosity
07:55
< catadroid`>
Whilst true, you can always set up a couple of unit tests as canaries and assume it's standard behaviour until they ever fire
07:55
< catadroid`>
(I doubt they will)
07:55
<&McMartin>
Yep
07:55
<&McMartin>
static_assert can be readily set up for this, even
07:55
< catadroid`>
Aye
07:56
< catadroid`>
I like that keyword
07:56
< catadroid`>
It's great fun in templates
07:56
<&McMartin>
And actually, I should have unit tests for it anyway if not straight-up in the raw production code: std::is_std_layout<> in the static_asserts don't cost anything at runtime and will scream if we make our value types too fancy
07:56
< catadroid`>
Mhm :)
07:56
<&McMartin>
"This unit test is: does the software compile"
07:57
< catadroid`>
\o/
07:57
< catadroid`>
The best kind of test
07:57
<&McMartin>
Heh heh
07:57
<&McMartin>
I've been in ObjC mode lately though
07:57
<&McMartin>
Very different headspace, has been as trong challenge to my design sense
07:57
<&McMartin>
It takes me three or four tries to get an architecture I like out of it
07:57
<&McMartin>
But each attempt is so much better than the last that it feels pretty great
08:14
< catadroid`>
:)
08:17
<&McMartin>
(Porting some of that design back into C++ is where I ran into this offsetof hilarity; it's getting around C++'s lack of reflection)
08:18
<&McMartin>
(Or, um, hm. Introspection? The line is fuzzy in ObjC)
08:42
< abudhabi>
Python compiles to bytecode, right?
08:43 Kindamoody[zZz] is now known as Kindamoody
08:44
<~Vornicus>
Yup.
08:44
< [R]>
In most circumstances, yes
09:01 Kindamoody is now known as Kindamoody|afk
09:57 Netsplit Deepthought.Nightstar.Net <-> Golgafrincham.Nightstar.Net quits: abudhabi, @Derakon[AFK], @Reiver, Xon, ion, @himi, pjdelport, @ErikMesoy, @Ogredude, @McMartin, (+10 more, use /NETSPLIT to show all of them)
09:58 Netsplit over, joins: @Ogredude, &Reiver, @JustBob, @gnolam, @Alek, @Tamber, starkruzr, &Derakon[AFK], @Thalass|bedzZzzZzz, catadroid` (+9 more)
09:58 jeroud [sid10043@Nightstar-h2b233.irccloud.com] has joined #code
09:59 mode/#code [+ao jeroud jeroud] by ChanServ
10:09 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection reset by peer]
10:51
< pjdelport>
abudhabi: Among the common implementations, CPython and PyPy compile to Python bytecode, and Jython compiles to either Python bytecode or Java class files (IIRC).
10:53
< pjdelport>
Cython is mainly used for its C bridging features, but it can compile most pure Python code to C (using the CPython runtime and C API, so it doesn't necessarily give you a magic speedup compared to bytecode)
10:54
< pjdelport>
Then there's probably at least dozen less common implementations that do various other things.
11:10 VirusJTG_ [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
11:10 VirusJTG_ [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Connection closed]
11:13 Thalass|slep [thalass@Nightstar-283.o7s.158.104.IP] has joined #code
11:19 Thalass|slep is now known as Thalass
11:20 mode/#code [+o Thalass] by ChanServ
11:31 Thalass is now known as Thalatwerk
11:35 Thalatwerk [thalass@Nightstar-283.o7s.158.104.IP] has quit [Ping timeout: 121 seconds]
12:02 Emmy is now known as Emmy-Werk
12:10 Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has joined #code
12:10 mode/#code [+o Crossfire] by ChanServ
12:14 catadroid` [catalyst@Nightstar-huiopn.dab.02.net] has quit [Ping timeout: 121 seconds]
12:30 Turaiel[Offline] is now known as Turaiel
12:31 Turaiel is now known as Turaiel[Offline]
12:54 Emmy [NSkiwiirc@Nightstar-41pbej.static.chello.nl] has joined #code
12:59
< Emmy>
Behold. the rare warking Emmy
13:33
< abudhabi>
How does a "web services" thingamajig work?
13:33
< abudhabi>
(Java.)
13:34
< abudhabi>
I'm told to write one of these things, but I haven't the faintest of what "WSDL" is and how one uses it.
13:40 Emmy [NSkiwiirc@Nightstar-41pbej.static.chello.nl] has quit [NickServ (RECOVER command used by M-E)]
13:40 emmy [M@Nightstar-9p7hb1.direct-adsl.nl] has joined #code
13:43 Emmy-Werk [M@Nightstar-9p7hb1.direct-adsl.nl] has quit [Ping timeout: 121 seconds]
13:43 M-E [NSkiwiirc@Nightstar-41pbej.static.chello.nl] has joined #code
13:58 * M-E blarghs violently at access.
14:00
< M-E>
apparently it is utterly impossible to know or use the row number of an item on a form in table mode or continuous form mode.
14:08 catadroid [catalyst@Nightstar-gi24sc.dab.02.net] has joined #code
15:14 mac [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
15:18 mac [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has joined #code
15:18 mode/#code [+o mac] by ChanServ
15:47 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
15:47 mode/#code [+qo Vornicus Vornicus] by ChanServ
15:56 M-E [NSkiwiirc@Nightstar-41pbej.static.chello.nl] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
16:58 crystalclaw|AFK is now known as crystalclaw
17:10 celticminstrel [celticminst@Nightstar-q0f7bb.dsl.bell.ca] has joined #code
17:10 mode/#code [+o celticminstrel] by ChanServ
17:47 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
17:48 catadroid [catalyst@Nightstar-gi24sc.dab.02.net] has quit [[NS] Quit: Bye]
18:55 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has quit [[NS] Quit: broken shit]
18:57 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has joined #code
19:19 ErikMesoy [Erik@Nightstar-hq72t5.customer.cdi.no] has quit [[NS] Quit: Leaving.]
19:48 ErikMesoy [Erik@Nightstar-hq72t5.customer.cdi.no] has joined #code
19:48 mode/#code [+o ErikMesoy] by ChanServ
21:38 Kindamoody|afk is now known as Kindamoody
22:11 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has joined #code
22:11 mode/#code [+o Reiv] by ChanServ
22:32 Thalatwerk [thalass@Nightstar-283.o7s.158.104.IP] has joined #code
23:05 Turaiel[Offline] is now known as Turaiel
23:24 emmy is now known as Emmy-zZz
23:41 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
23:49 Kindamoody is now known as Kindamoody[zZz]
23:51 Thalatwerk is now known as Thalass
23:51 mode/#code [+o Thalass] by ChanServ
--- Log closed Wed May 11 00:00:48 2016
code logs -> 2016 -> Tue, 10 May 2016< code.20160509.log - code.20160511.log >

[ Latest log file ]