code logs -> 2014 -> Mon, 24 Nov 2014< code.20141123.log - code.20141125.log >
--- Log opened Mon Nov 24 00:00:53 2014
00:16 io\PACKERS is now known as iospace
00:41
<&McMartin>
http://www.theguardian.com/technology/2014/nov/21/e-cigarettes-malware-computers
00:41
<&McMartin>
More fun because it *isn't* a BadUSB attack.
00:46 PinkFreud [WhyNot@Pinkfreud.is.really.fuckin.lame.nightstar.net] has quit [A TLS packet with unexpected length was received.]
00:51 * thalass eyes the leap motion controller, ponders its use as a 3d scanner or robot vision
00:52 Tur[a]iel is now known as Turaiel
01:27 Derakon is now known as Derakon[AFK]
01:52 Derakon[AFK] is now known as Derakon
01:56 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
03:37 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
03:40 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code
03:40 mode/#code [+o PinkFreud] by ChanServ
03:48
<&ToxicFrog>
aaaaaaaaaaaaaaaaaaaaaaa fuck dlls forever
03:49
<&McMartin>
what brings this up this time~
03:52
<&ToxicFrog>
Convention in lua-land, at least in linux, is that if you're writing a lua library you just leave the lua_* symbols unresolved at link time and let them resolve against the process dlopen()ing you at runtime, since that process's binary was (should have been) compiled with -rdynamic.
03:53
<&McMartin>
That seems like it would play incredibly poorly with the correct way to do dlls.
03:53
<&ToxicFrog>
On windows, -rdynamic is either not available or doesn't work reliably, I'm not clear on the details, so the convention is apparently to have a separate liblua dll that everything, executable and libraries, depends on.
03:53 Kindamoody[zZz] is now known as Kindamoody
03:53
<&ToxicFrog>
(if you static link a complete copy of liblua into everything Bad Things happen)
03:53
<&McMartin>
Yeah, the Linux approach is to exploit what is generally considered the biggest misfeature in Linux .sos because it's in your favor for once.
03:54
<&ToxicFrog>
The problem here is that windows, AFAICT, identifies DLLs by the string passed to LoadLibrary().
03:54
<&McMartin>
Which is to say "I'm not going to record which execution unit my symbols are from. If there happens to be symbol overlap in dependencies you've never heard of when you load a module, HA HA ENJOY YOUR SURPRISE REDEFINITION"
03:55
<&ToxicFrog>
So if the program is linked against liblua-5.1.dll and the library is linked against lua51.dll, you end up at runtime with either (a) a linker failure or (b) two distinct libluas loaded
03:55
<&McMartin>
PE32 and Mach-O both qualify every symbol you load with the name of the library you're loading it from ("two-level namespaces") and AFAIK this is considered The Right Thing.
03:55
<&McMartin>
Yeah
03:55
<&ToxicFrog>
Even if those two DLLs are ABI compatible, are byte for byte identical, or indeed are symlinks to the same actual file.
03:55
<&McMartin>
AIUI the "expected" behaviour is the latter
03:55
<&McMartin>
So that when somebody links their copy of libpng and it works differently than *your* copy of libpng you don't stomp each other.
03:56
<&McMartin>
Or, as in one case that broke our Linux system for like a month at work, openssl, because some third-party module was linking an old busted version and could not properly handle the results from newer ones.
03:56
<&ToxicFrog>
...the problem there is that you end up with one program that, at any given time, is interleaving calls to two different versions of libpng, possibly on the same data
03:57
<&McMartin>
Yes. My understanding is that this is considered less bad than essentially letting them LD_PRELOAD each other by accident.
03:57
<&McMartin>
Which is to say, two-level namespacing is a feature people deliberately add to their linkage systems as a feature they actually want.
03:58
<&ToxicFrog>
You end up with mysterious and hard to debug crashes in either case~
03:58
<&ToxicFrog>
In the Lua case specifically, at library load time some global stuff gets set up that is assumed to be constant for the lifetime of the process.
03:59
<&ToxicFrog>
If two lua libraries are loaded, you end up with data being accessed by both, which have different values for these globals, and sadness ensues.
03:59
<&McMartin>
If Lua is relying on the Linux behavior they not only won't work on Windows, they won't work on Mac either.
03:59
<&ToxicFrog>
It is not relying on the linux behaviour and does, in fact, work on windows.
04:00
<&ToxicFrog>
The problem is that this requires your windows exe and all of the lua extension libraries it loads to agree on what the lua DLL is named.
04:00
<&ToxicFrog>
Whereas on linux they just have to agree on what version of lua they target (and dlopen() will fail if they don't, anyways)
04:00
<&McMartin>
IIRC you can solve that problem with binary rewriting, but I'm not sure anyone's written an appropriate rewriter.
04:01
<&ToxicFrog>
In this specific case, the problem is that love2d targets lua 5.1 as lua51.dll, and all the binary distributions of LFS target lua 5.1 as either liblua.dll or lua5.1.dll.
04:01
<@[R]>
<jerith> Julius: /stripe(?!s)/
04:01 * [R] cries
04:01
<@[R]>
/stripe[^s]/
04:01
<&ToxicFrog>
So my options are either (a) hex edit lfs.dll as part of my build script to use the same name as love.exe or (b) build lfs from source for the windows release
04:01
<&ToxicFrog>
Which are both pretty revolting options.
04:02
<&McMartin>
If you're using a prebuilt version, it's part of the generate-prebuilt option, isn't it?
04:02
<&ToxicFrog>
What?
04:02
<&McMartin>
"You only have to do the rewriting once because after that it's been rewritten to the proper value."
04:03
<&McMartin>
I'm assuming that DLLs you are only using in raw binary form are living in some vendor/ directory or something.
04:04
<&McMartin>
I'm kind of alarmed that the global stuff set up seems to be outside the lua library itself
04:04
<&McMartin>
Normally the issue with the multiple loads etc is that you get, for instance, two errnos in your system and which one has a value depends on which function asked
04:04
<&ToxicFrog>
No, they're internal to the library
04:05
<&McMartin>
... OK, so this should produce a dag of dependencies, so I'm super confused where the stomping happens
04:06
<&ToxicFrog>
But it has, e.g., a "dummynode" static variable which is an internal "blank" hash table node used for some stuff, and assumes that anything that compares neq to that is not dummynode
04:06
<&ToxicFrog>
And if you have two lua libraries used, library A can produce a hash table containing dummynode that is then passed to library B
04:06
<&ToxicFrog>
Which has its own, different dummynode
04:06
<&McMartin>
OK
04:07
<&McMartin>
So what you want is that when one DLL says "I want function X from liblua5.1.dll" it actually gets function X from liblua.dll?
04:07
<&ToxicFrog>
Yes.
04:07
<&McMartin>
Yeah, the standard way to do that in Windows is to rewrite the import table.
04:07
<&McMartin>
Sometimes at runtime, which is actually how you do the equivalent of LD_PRELOAD~
04:08
<&McMartin>
(On OS X there are linker flags called something like DYLD_INTERPOSE to actually do this in a constrained way, and on Linux you can't actually say the thing I quoted in the first place so it doesn't come up)
04:08 * ToxicFrog nods
04:08
<&ToxicFrog>
I was just kind of hoping not to have a commit with the message "check in a custom hex-edited version of lfs.dll because the ones in l4w and luadist use the wrong dll name for this engine"
04:09
<&McMartin>
Anyway, unless its own dependencies are awful, (b) is the solution I'd probably say is best
04:09
<&McMartin>
And (a) is a well-documented procedure
04:09
<&ToxicFrog>
The dependencies of LFS itself are not terrible, the dependencies of a linux->windows cross compilation environment kind of are though.
04:10
<&McMartin>
loading a DLL is literally an mmap followed by filling in some dummy space in the DLL with the relevant function pointers, so the headers &c are extremely well-documented.
04:10
<&ToxicFrog>
And thus far I've gotten away without needing any kind of build environment for this; the make procedure is basically a lot of automated faffing about with zip
04:10
<&McMartin>
Er, loading a Windows PE32-based DLL
04:10 * McMartin nods
04:10
<&McMartin>
There are supposed to be PE32 dissectors for Python, but last I checked in on them they were not in great shape.
04:11
<&McMartin>
"Check in a custom-built .dll with the right linkage options" is totally a thing that may need doing though.
04:11
<&McMartin>
I have to do that for pretty much anything in Windows anyway because good luck getting any two library writers to agree on a C++ ABI
04:11
<&McMartin>
Even with extern "C" everywhere
04:11
<&ToxicFrog>
Ideally I would like to continue in that vein rather than going "for linux and osx, you can just run deploy.sh and get a working program out, for windows you will first need the ability to turn C source code into DLLs, plus an appropriately named import library for liblua and/or a compiler that can operate without one like gcc"
04:12
<&ToxicFrog>
Which pushes me towards checking in the DLL. Blergh.
04:12
<&ToxicFrog>
At least it's MIT licensed~
04:12 * McMartin nods
04:12
<&McMartin>
THe standard I'm used to for this is a separate directory next to src/ named vendor/ or prebuilt/ which has those organized by product, version, platform, etc.
04:12
<&McMartin>
This is also the kind of bullshit Maven was designed to solve~
04:13
<&ToxicFrog>
(also, you don't actually need the DLL header format for this change, since the DLL name appears only once and is stored as a cstring~)
04:13
<&McMartin>
-_-
04:13
<&McMartin>
Well then (tm)
04:13
<&McMartin>
In that case, sure, have a script that does the hex edit
04:13
<&McMartin>
And then have it transform the original into that as part of the build
04:13
<&ToxicFrog>
If I trusted sed to do the right thing on binaries -- and if I could tell it to insert nuls -- I could probably do this with sed, honestly
04:13
<&McMartin>
And put it somewhere that is a "build product" that is only removed on reallyclean, not clean.
04:14
<&ToxicFrog>
At some point I should probably give this thing an actual build system rather than an ad hoc bash script that downloads all the binary dependencies and juggles them around
04:16
<&ToxicFrog>
On the other hand, symbol and I are probably the only people in the world who use this software~
04:20
<&ToxicFrog>
I would like, one day, to find a good hex editor for linux.
04:22 Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has quit [[NS] Quit: beroot]
04:25 Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has joined #code
04:25 mode/#code [+o Alek] by ChanServ
04:28
<&ToxicFrog>
tada: dd if=<(printf 'lua51.dll\x00') of=.build/lfs.dll seek=9564 bs=1 conv=notrunc
04:28
<&ToxicFrog>
And now my opprobium is directed at git
04:38
<&McMartin>
How so?
04:38
<&ToxicFrog>
git archive does not include submodules and has no option to do so
04:38
<&McMartin>
Ah yes
04:38
<&McMartin>
git is real bad at having anything remotely equivalent to svn externals
04:39
<&McMartin>
(If you find a good one PLEASE LET ME KNOW OMG)
04:40
<&ToxicFrog>
(I have no idea what svn externals are and thus can't meaningfully evaluate)
04:41
<&ToxicFrog>
Thus far I've found submodules actually pretty great for "I have an in-tree dependency on another project" but they kind of fall down when you also have "and my build procedure consists of zipping up all of the source code including dependencies"
04:43
<&ToxicFrog>
Now, however, I have finally updated emufun for LOVE 0.9.1 compatibility and fixed the build script to generate hopefully working windows packages
04:44
<&ToxicFrog>
Which means next I either have to resume work on per-dir metadata, or tackle the sad state of configuration files (:gonk:)
05:03 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
05:14 Derakon is now known as Derakon[AFK]
05:38 Kindamoody is now known as Kindamoody[zZz]
06:32 celticminstrel [celticminst@Nightstar-l2rg83.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
06:35 Tamber_ [tamber@furryhelix.co.uk] has joined #code
06:35 simon__ [simon@Nightstar-2og823.pronoia.dk] has joined #code
06:35 Netsplit *.net <-> *.split quits: Xon, simon_, @Ogredude, @Tarinaky, @Tamber, EvilDarkLord, @thalass, grindhold, @iospace, @McMartin, (+3 more, use /NETSPLIT to show all of them)
06:36 Netsplit over, joins: Lambo
06:37 grindhold [quassel@Nightstar-uufabm.zebra.fastwebserver.de] has joined #code
06:37 Ogredude [quassel@Nightstar-dm1jvh.projectzenonline.com] has joined #code
06:37 mode/#code [+o Ogredude] by ChanServ
06:37 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
06:37
<&jerith>
[R]: /stripe[^s]/ doesn't match "the stripe".
06:37
<&jerith>
Or, indeed, "stripe".
06:38 Tarinaky [tarinaky@Nightstar-e99cts.net] has joined #code
06:38 mode/#code [+o Tarinaky] by ChanServ
06:38 EvilDarkLord [jjlehto3@Nightstar-evu5hu.org.aalto.fi] has joined #code
06:38 Syka [the@Nightstar-c409v3.vividwireless.net.au] has joined #code
06:39 froztbyte [froztbyte@Nightstar-frrora.za.net] has joined #code
06:39 mode/#code [+o froztbyte] by ChanServ
06:39 Xon [Xon@Nightstar-j72.ku7.252.119.IP] has joined #code
06:39 McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has joined #code
06:39 mode/#code [+ao McMartin McMartin] by ChanServ
06:39 iospace [Alexandria@Nightstar-fkokc2.com] has joined #code
06:39 mode/#code [+o iospace] by ChanServ
06:45
<@[R]>
Add a ?
06:46
<@[R]>
Should be cheaper and more compatible than a lookahead, no?
06:49
<&jerith>
[R]: The ? allows it to match "stripes", which kind of defeats the point.
06:50
<&jerith>
And the lookahead isn't really expensive if it's only one character.
06:50 thalass [thalass@Nightstar-bakqqn.bigpond.net.au] has joined #code
06:50 mode/#code [+o thalass] by ChanServ
06:50
<@Namegduf>
([^s]|$) should be an option, no?
06:51
<@[R]>
Yeah
06:51
<@[R]>
Still more portable
06:53
<&jerith>
Portability isn't really an issue here, because the context was "I need to do this in Perl".
06:54
<&jerith>
But yes, Namegduf's version should work nicely. :-)
06:56
<@[R]>
Aye, bi
06:56
<@[R]>
Aye, but if given the choice, I'd rather write a portable regex
06:57
<@[R]>
Unless it's massively uglier
07:00
<@Julius>
Well, my creation works. Now I just need to find a shell server where I can run it. For some reason, it refuses to run on this one.
07:00 PinkFreud [WhyNot@Pinkfreud.is.really.fuckin.lame.nightstar.net] has joined #code
07:00 mode/#code [+o PinkFreud] by ChanServ
07:00
<@[R]>
What's it do?
07:02
<@Julius>
It's an IRC bot that sits in freenode#stripes and tells people who say "stripe" to go to #stripe.
07:02
<@[R]>
You're... you're doing a god's work.
07:03
<@Julius>
A small god's.~
07:05 * jeroud sends Julius to Omnia.
07:07
<@Julius>
Mmm. My favorite DW novel.
07:17
<&McMartin>
I don't understand the context of this problem statement.
07:21
<@Julius>
Stripes is an obscure Java web framework.
07:21
<@Julius>
Stripe is a popular online credit card handling framework.
07:21
<@Julius>
A lot of people are confused.
07:24
< Tamber_>
and a lot of people also don't read channel topics?
07:24 Tamber_ is now known as Tamber
07:24 mode/#code [+o Tamber] by ChanServ
07:28
<&McMartin>
Tamber: You have *no idea*
07:28
<@Namegduf>
There is, on rare occasion, someone who does.
07:28
<@Namegduf>
Would be how I'd put it.
07:28
<@Tamber>
:)
07:29 * Tamber trundles off to work.
07:29
<&jerith>
I usually read the first 100 characters or so.
07:30 * jerith also trundles off to work.
07:30 * Julius is already at work.
09:07 Kindamoody[zZz] is now known as Kindamoody
09:28 Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has quit [Ping timeout: 121 seconds]
10:46 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
10:58 thalass [thalass@Nightstar-bakqqn.bigpond.net.au] has quit [Ping timeout: 121 seconds]
11:01 Kindamoody is now known as Kindamoody|afk
11:32 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
11:32 mode/#code [+o Checkmate] by ChanServ
11:34 thalass [thalass@Nightstar-bakqqn.bigpond.net.au] has joined #code
11:34 mode/#code [+o thalass] by ChanServ
11:57 ReivWerk is now known as Orthia
12:23 thalass [thalass@Nightstar-bakqqn.bigpond.net.au] has quit [Ping timeout: 121 seconds]
13:06 Syka [the@Nightstar-c409v3.vividwireless.net.au] has quit [Connection reset by peer]
13:06 Syka [the@Nightstar-c409v3.vividwireless.net.au] has joined #code
13:38 macdjord is now known as macdjord|wurk
13:59
< Lambo>
http://blogs.msdn.com/b/vsoservice/archive/2014/11/24/slowness-in-vso-services.a spx
13:59
< Lambo>
dammit
14:07
<@TheWatcher>
Horay clown computing.
14:12
< Lambo>
MS just sucks at cloud
14:19 * Tarinaky giggles at clown computin
14:28 Orth [orthianz@Nightstar-r89.tbp.224.119.IP] has joined #code
14:29 Orthia [orthianz@Nightstar-r89.tbp.224.119.IP] has quit [Ping timeout: 121 seconds]
14:40 thalass [thalass@Nightstar-bakqqn.bigpond.net.au] has joined #code
14:40 mode/#code [+o thalass] by ChanServ
15:10 * iospace arghs at SQL
15:30 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
16:34 Checkmate [Z@Nightstar-ev6.6um.94.83.IP] has joined #code
16:34 mode/#code [+o Checkmate] by ChanServ
16:37 Red_Queen [Z@Nightstar-ev6.6um.94.83.IP] has joined #code
16:37 mode/#code [+o Red_Queen] by ChanServ
16:37 Checkmate [Z@Nightstar-ev6.6um.94.83.IP] has quit [Connection reset by peer]
16:57 Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has joined #code
16:57 mode/#code [+o Alek] by ChanServ
16:59 * froztbyte gnashes teeth, breaks out paper for notes
16:59
<@froztbyte>
I honestly dislike it when information is structured in such a "computer-hostile" way that I have to restructure it on paper :/
17:00
<&jeroud>
froztbyte: What kind of information?
17:01
<@froztbyte>
in this specific instance, back-referenced information from coursera videos
17:01
<&jeroud>
Ah.
17:01
<@froztbyte>
this complaint somewhat-generally also expands to what I remember of university, but I'm trying to stay positive
17:07 celticminstrel [celticminst@Nightstar-l2rg83.dsl.bell.ca] has joined #code
17:07 mode/#code [+o celticminstrel] by ChanServ
19:35 Lambo [thelambo@Nightstar-ic6koa.fl.comcast.net] has quit [[NS] Quit: ]
19:41 Lamabo [thelambo@Nightstar-ic6koa.fl.comcast.net] has joined #code
19:58
<@Julius>
I can just return out of a Perl sub, right?
20:33 Kindamoody|afk is now known as Kindamoody
21:49 Kindamoody is now known as Kindamoody[zZz]
21:53 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
22:05 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
22:05 mode/#code [+o himi] by ChanServ
22:23
<@Azash>
https://imgur.com/qXNgFVz
22:41 Red_Queen [Z@Nightstar-ev6.6um.94.83.IP] has quit [Ping timeout: 121 seconds]
22:43 JustBob [justbob@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
22:45 JustBob [justbob@ServerAdministrator.Nightstar.Net] has joined #code
22:45 mode/#code [+o JustBob] by ChanServ
23:23 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
23:23 mode/#code [+o Checkmate] by ChanServ
23:58 macdjord|wurk is now known as macdjord
--- Log closed Tue Nov 25 00:00:09 2014
code logs -> 2014 -> Mon, 24 Nov 2014< code.20141123.log - code.20141125.log >

[ Latest log file ]