code logs -> 2018 -> Wed, 17 Jan 2018< code.20180116.log - code.20180118.log >
--- Log opened Wed Jan 17 00:00:29 2018
00:24 workeegs [Keegs@Nightstar-7gp.5v4.49.65.IP] has joined #code
00:53 Kindamoody is now known as Kindamoody[zZz]
00:58 celticminstrel [celticminst@Nightstar-m9434e.dsl.bell.ca] has joined #code
00:58 mode/#code [+o celticminstrel] by ChanServ
01:05 Derakon[AFK] is now known as Derakon
01:27
< Jessikat`>
I learned why you have to write func(void) in C to indicate no parameters instead of just func()
01:28
< Jessikat`>
and, amusingly, it's because of C++
01:28
< McMartin>
Oh yeah, K&R C ABI -_-
01:28
< Jessikat`>
(I actually read K&R)
01:29
< Jessikat`>
(which I really feel I should have done by now)
01:29
< McMartin>
(That's how I learned it)
01:29
< McMartin>
This also means I need to relink http://www.bobhobbs.com/files/kr_lovecraft.html
01:29
< McMartin>
"Keener news-followers, however, wondered at the events of the winter of 1927-28, the abnormally large number of calls placed upon the stack, the swiftness with which that list was sorted, the disturbing lack of heap allocation throughout the proceedings, and the secrecy surrounding the affair."
01:31
< workeegs>
oh jesus
01:31
< workeegs>
i forgot what a trainwreck standard C became after C++
01:31
< McMartin>
"Function prototypes" are not usually one of the bad parts.
01:32
< McMartin>
(Reminder that C++ predates ANSI C by a fair distance)
01:33
<&[R]>
Doesn't func() work though?
01:33
< McMartin>
Yes.
01:33
< McMartin>
It does not, however, mean "a function that takes no arguments"
01:33
< McMartin>
It means what it meant in Times of Old: a function which takes any number of completely unspecified arguments.
01:33
< McMartin>
And you'd better match them up, because nothing will check.
01:33
<&[R]>
So it's an implicit func(...)
01:33
< McMartin>
No
01:33
< McMartin>
That's varargs, which is more structured.
01:34
< Jessikat`>
(and also C++'s fault)
01:34
< McMartin>
(And also allows an infinite number of them)
01:34
<&[R]>
Then how would on make (ab)use of the difference?
01:34
< McMartin>
The way one does in Javascript with "optional" arguments, mainly.
01:34
<&[R]>
Via an arguments not-array?
01:35
< McMartin>
I personally ripped some of that out of the MACROSS/SLINKY system, replacing them with varargs and the va_list systems.
01:35
< McMartin>
No
01:35
< McMartin>
By just passing two args to a three-argument function
01:35
< McMartin>
Or hey, pass four!
01:35
< McMartin>
Nobody will care!
01:37
<&[R]>
But you can't access the additional arguments can you? Except via pointer/address manipulation?
01:38
<&ToxicFrog>
[R]: AIUI this is talking about forward declarations. So if you have a header foo.h that declares `int do_the_thing();`, you can #include "foo.h" and then call do_the_thing(1, 2, "kittens"), and at no point will this be checked against the actual signature of do_the_thing in foo.c
01:38
< McMartin>
See, for instance, this code I replaced here: https://github.com/Museum-of-Art-and-Digital-Entertainment/macross/commit/4ab0baafe671a50c5b10bcbfa36434b7d6e300fc
01:38 * [R] has int testing() { return 4; } int main() { printf("%d\\n", testing(55)); return 0; } right now
01:39
<&[R]>
Which gcc compiles without warning or error
01:39
< McMartin>
Tjat
01:39
< McMartin>
That's right
01:39
< McMartin>
Because that is exactly what () means.
01:39
< McMartin>
If you wanted it to mean no arguments, that's testing(void).
01:39
<&[R]>
Yeah I got that bit a while ago
01:39
<&[R]>
<[R]> But you can't access the additional arguments can you? Except via pointer/address manipulation?
01:39
< McMartin>
Now, if you define it as testing(int, int, int), declare it as testing()
01:39
< McMartin>
Then you can call it with testing(55) and that's fine too.
01:40
< McMartin>
The other arguments will end up pulled from the stack if you use them, so maybe don't.
01:40
< McMartin>
As you can see in the patch I posted, in any case where you would do this, you actually want to define a varargs function and then a function that takes a va_list as its final argument that it forwards to.
01:41
< McMartin>
This lets you have no cap on the number of arguments and also some semblance of control over what happens with it.
01:42
< McMartin>
Oh right, also added to ANSI C
01:42
< McMartin>
The ability to say void f(int a, int b, int c)
01:42
< McMartin>
instead of
01:42
< McMartin>
void f(a, b, c) int a; int b; int c; { ... }
01:42
<&[R]>
Old function prototypes were annoyingly un-DRY
01:43
< McMartin>
Those were definitions.
01:43
< McMartin>
K&R didn't have prototypes.
01:43
<&[R]>
Weird
01:43
< McMartin>
C++ demonstrated they were good things to have~
01:43
<&[R]>
I'm guessing because linking was its own step that wasn't a problem?
01:44
< Jessikat`>
does that mean you could just call whatever and it would fail when linking?
01:44
< McMartin>
Any function you don't declare is assumed to be a function returning int, yes.
01:44
< McMartin>
If it returns something else, you can declare the function in advance, sort of, but that only served to declare return types.
01:44
< McMartin>
Argument type and number came later.
01:48
<&[R]>
Calling a function that didn't exist would've still been a linker error right?
01:51
< McMartin>
Yes.
01:51
< McMartin>
But the trick is that the ABI is completely self-contained, unlike, say, Pascal's
01:51
< McMartin>
Since the caller is responsible for popping its arguments.
01:51
<&[R]>
What does this distinction do for Pascal?
01:52
< McMartin>
If you get the argument count wrong in Pascal, your stack is smashed.
01:52
<&[R]>
So data/memory corruption effectively?
01:53
< McMartin>
(The relevant instruction in x86 is RET nn, which pops the return address, pops n more entries off the stack, and then jumps to the address you popped at first.)
01:57 Vornlicious [Vorn@Nightstar-9bgas6.sub-174-211-8.myvzw.com] has quit [Connection closed]
01:57 Vorntastic [Vorn@Nightstar-1l3nul.res.rr.com] has joined #code
02:02 Vornicus [Vorn@Nightstar-1l3nul.res.rr.com] has joined #code
02:02 mode/#code [+qo Vornicus Vornicus] by ChanServ
02:09 Jessikat` [Jessikat@Nightstar-bt5k4h.81.in-addr.arpa] has quit [Connection closed]
03:34 celticminstrel [celticminst@Nightstar-m9434e.dsl.bell.ca] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.]
04:38 Alek [Alek@Nightstar-7or629.il.comcast.net] has quit [Operation timed out]
04:40 Alek [Alek@Nightstar-7or629.il.comcast.net] has joined #code
04:40 mode/#code [+o Alek] by ChanServ
04:53 Derakon is now known as Derakon[AFK]
05:27 Namegduf [namegduf@Nightstar-08u.5uh.185.31.IP] has joined #code
05:27 mode/#code [+o Namegduf] by ChanServ
06:09 himi [sjjf@Nightstar-1drtbs.anu.edu.au] has quit [Ping timeout: 121 seconds]
06:41 Vornlicious [Vorn@Nightstar-1opj31.sub-174-211-12.myvzw.com] has joined #code
06:44 Vorntastic [Vorn@Nightstar-1l3nul.res.rr.com] has quit [Ping timeout: 121 seconds]
08:14 Vornlicious [Vorn@Nightstar-1opj31.sub-174-211-12.myvzw.com] has quit [Ping timeout: 121 seconds]
08:35 Vorntastic [Vorn@Nightstar-1opj31.sub-174-211-12.myvzw.com] has joined #code
09:01 [ [art@Nightstar-lbl.59v.61.68.IP] has quit [Connection closed]
09:01 [ [art@Nightstar-lbl.59v.61.68.IP] has joined #code
09:22 Vornicus [Vorn@Nightstar-1l3nul.res.rr.com] has quit [Ping timeout: 121 seconds]
09:37 Kindamoody[zZz] [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
10:24 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
10:24 mode/#code [+o himi] by ChanServ
11:26 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
15:06 Vornicus [Vorn@Nightstar-1l3nul.res.rr.com] has joined #code
15:06 mode/#code [+qo Vornicus Vornicus] by ChanServ
16:42 Vorntastic [Vorn@Nightstar-1opj31.sub-174-211-12.myvzw.com] has quit [[NS] Quit: Bye]
16:43 Vorntastic [Vorn@Nightstar-1l3nul.res.rr.com] has joined #code
17:13 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
17:35 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
17:35 mode/#code [+o Syloq] by ChanServ
18:27 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has joined #code
18:53 Vornicus [Vorn@Nightstar-1l3nul.res.rr.com] has quit [Ping timeout: 121 seconds]
19:02 Kindamoody|autojoin [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has joined #code
19:02 mode/#code [+o Kindamoody|autojoin] by ChanServ
19:03 Kindamoody|autojoin is now known as Kindamoody
19:56 Degi [Degi@Nightstar-othrpl.dyn.telefonica.de] has joined #code
20:11
<&[R]>
We're looking to replace MS OneDrive because it's failing to sync (and not mentioning that unless we dig into its UI). ATM looking at possibly switching to Mega, Dropbox, Google Drive or Mediafire. Any other suggestions?
20:13
< Degi>
Owncloud sounds nice
20:14
<&ToxicFrog>
Don't Mega/Mediafire do very different things from Dropbox/Drive?
20:15
<&[R]>
When I initially looked they had desktop sync apps
20:16
<&ToxicFrog>
Huh.
20:16
<&ToxicFrog>
I've only ever seen them used as (awful) file hosting services.
20:17
< Mahal>
[R] - we haven't had your issues with Onedrive
20:17
< Mahal>
what do you actually need the product to do?
20:18
< Mahal>
(and I'd be leaning to corporate Dropbox myself()
20:22
<&[R]>
ATM we have two accounts, one of them is sharing a folder, the main account hasn't had issues (IE the one sharing), but the other account repeatedly enters some kind of desync'd state that doesn't get corrected. Doesn't generate any errors in the UI (unless you specifically dig through menus to get to the sync issues page)
20:22
<&[R]>
Basically we need both people to add folders (one folder == one job, and we do 1-3 jobs/day) to a central repository.
20:24
<&[R]>
We could really just use an FTP/Samba/whatever server for this, but I need convenience for the other guy, and the fact that it's synced to everyone and thus they can access it offline is a massive boon
20:24
<&[R]>
Since we might need data from a job the other has done
20:24
<&[R]>
(While on site, and thus without internet)
20:29
< McMartin>
Dropbox has a corporate focused competitor named "Box" with whom I have no experience other than "they seem to be a company that exists and is relevant"
20:29
< McMartin>
If this is at "throwing names into a hat" stage it might as well go into the hat
20:30
<&[R]>
Okay thanks
20:31 Jessikat [Jessikat@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
20:32
< McMartin>
(Well, OK, the other relevant parts are "they are based in my hometown" and "they're one of the only companies that's sent me recruiting spam that I've actually replied to, because they opened it with "before the rest of this, um, are you the McMartin who fenced for Berkeley back in the late 1990s?" and I replied to tell that I wasn't looking for interviews at the moment but I was indeed Totally That Guy,
20:32
< McMartin>
What's Up - but both of those things happened after I had gotten the impressions I shared before.
21:16 Vash [Vash@Nightstar-1l3nul.res.rr.com] has joined #code
21:25 Netsplit Krikkit.Nightstar.Net <-> Deepthought.Nightstar.Net quits: @Alek, @Kindamoody, Emmy, @gnolam
21:25 Netsplit over, joins: Emmy
21:25 Kindamoody|autojoin [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has joined #code
21:25 mode/#code [+o Kindamoody|autojoin] by ChanServ
21:26 Kindamoody|autojoin is now known as Kindamoody
21:30 Alek [Alek@Nightstar-7or629.il.comcast.net] has joined #code
21:30 mode/#code [+o Alek] by ChanServ
21:30 gnolam [lenin@Nightstar-ego6cb.cust.bahnhof.se] has joined #code
21:30 mode/#code [+o gnolam] by ChanServ
22:00 himi [sjjf@Nightstar-1drtbs.anu.edu.au] has joined #code
22:00 mode/#code [+o himi] by ChanServ
22:02
< McMartin>
... derp
22:02
< McMartin>
Just noticed that the ghost in the logo for Spectre is carrying... a branch
22:11
< McMartin>
https://twitter.com/whitequark/status/952840692233048065
22:11
< McMartin>
(maybe check the first reply before *actually* trying this)
22:34
<@Tamber>
yow!
22:39
<&ToxicFrog>
Wooo ligaturized programming fonts
22:40
< McMartin>
wat
22:41 Degi [Degi@Nightstar-othrpl.dyn.telefonica.de] has quit [Connection closed]
22:42 workeegs [Keegs@Nightstar-7gp.5v4.49.65.IP] has quit [Ping timeout: 121 seconds]
22:42
< McMartin>
...
22:42
< McMartin>
So, around when Spectre was a thing, the notion of "side channel" attacks came up more generally
22:42
< McMartin>
With the classic example being deducing an RSA key based on the pattern of power that the CPU draws while doing the relevant math
22:43
< McMartin>
Here's an... alternative application: https://twitter.com/isislovecruft/status/953730560505020416
22:47 workeegs [Keegs@Nightstar-7gp.5v4.49.65.IP] has joined #code
23:06
< McMartin>
That said, apparently this has been a thing for awhile: https://www.usenix.org/node/190937
23:10 Jessikat [Jessikat@Nightstar-bt5k4h.81.in-addr.arpa] has quit [Connection closed]
23:22 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has quit [Connection closed]
23:46
<&ToxicFrog>
McMartin: monospace fonts with ligatures for character sequences commonly used in code, so that e.g. `->` renders as a two-character-wide right-pointing arrow rather than as `-` followed by `>`>
23:46
<&ToxicFrog>
I might turn off the ligature for `...`, though, it makes IRC look weird~
23:59
< workeegs>
yay ligatures
23:59
< workeegs>
call me old fashioned
23:59
< workeegs>
i prefer me some monospaced basic-ass fonts
23:59
< workeegs>
codepage 437 fo lyfe
--- Log closed Thu Jan 18 00:00:31 2018
code logs -> 2018 -> Wed, 17 Jan 2018< code.20180116.log - code.20180118.log >

[ Latest log file ]