code logs -> 2016 -> Tue, 26 Apr 2016< code.20160425.log - code.20160427.log >
--- Log opened Tue Apr 26 00:00:42 2016
00:02
<&McMartin>
I also totally did not expect boost::optional<std::vector<std::string>> to qualify.
00:04
<&McMartin>
Looks like libsoup is an HTTP library designed to coexist with GTK.
00:04
<&McMartin>
It used to involve SOAP.
00:04 * iospace gives McMartin a rope
00:05 * McMartin sends his heroes against the forces of CORBA Commander
00:05
<@celticminstrel>
I wasn't actually particularly interested in what libsoup was, just pointed it out because it sounds tasty. :P
00:10
<&McMartin>
Speaking up updates, I apparently have 600MB worth pending.
00:11 Alek is now known as Nerion
00:13 TurNoms is now known as Turaiel
00:29 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
00:40 McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has quit [[NS] Quit: brb]
00:45 McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has joined #code
00:46 mode/#code [+ao McMartin McMartin] by ChanServ
00:59 Nerion is now known as Alek
01:00 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has quit [[NS] Quit: Leaving]
01:34 Reiv [NSwebIRC@Nightstar-g7fs0k.xtra.co.nz] has joined #code
01:34 mode/#code [+o Reiv] by ChanServ
02:31 himi [fow035@Nightstar-dm0.2ni.203.150.IP] has joined #code
02:31 mode/#code [+o himi] by ChanServ
03:42 Turaiel is now known as Turaiel[Offline]
04:22 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Connection closed]
04:27 VirusJTG [VirusJTG@Nightstar-055.kas.104.208.IP] has joined #code
05:09 Derakon is now known as Derakon[AFK]
05:34 catadroid [catalyst@Nightstar-4ed3a5.dab.02.net] has joined #code
05:37 catadroid` [catalyst@Nightstar-aoh5tr.dab.02.net] has quit [Ping timeout: 121 seconds]
07:05 crystalclaw is now known as crystalclaw|AFK
07:44
< abudhabi>
I need a text editor that can deal with binary content.
07:44
<&McMartin>
emacs has a hex mode
07:44
< abudhabi>
The purpose of this is to edit HTTP request dumps.
07:44
<&McMartin>
I'm not sure if that's what you mean
07:44
< abudhabi>
Windows?
07:45
<&McMartin>
Mmm. Most Windows emacs ports are garbage atm
07:45
<~Vornicus>
http request dumps are not generally binary
07:45
< abudhabi>
Vornicus: These have MIME content.
07:45
<~Vornicus>
okay that might be a problem
07:45
<&McMartin>
That is likely to be base64-encoded such that even hex is a problem
07:45
<&McMartin>
Anyway
07:45
< abudhabi>
It totally is. I edited them with a normal text editor, and the binary content got corrupted.
07:45
<&McMartin>
kk
07:45
<&McMartin>
Notepad++ should prevent corruption, at least.
07:46
<&McMartin>
But it doesn't have a nice hex mode
07:46
< catadroid>
For reference, what was wrong was that I needed a write barrier and to switch the order of two tests in a conditional to avoid the data races
07:46
<&McMartin>
I was asking after hex editors a month back or so and went with ghex on a Linux VM.
07:46
< abudhabi>
I don't need to edit the binary data, I just need to prepend stuff and edit the text content.
07:46
< abudhabi>
I just need it to be able to save it as it read it.
07:46
<&McMartin>
Notepad++ may have you covered then.
07:46
<&McMartin>
catadroid: \o/
07:47
<&McMartin>
I'm pretty sure I've done that trick with other file types with it.
07:47
< catadroid>
Ideally I'd be using std::atomic but I'm not allowed to
07:47
< catadroid>
Scarily, I may be the person who determines whether we are allowed to
07:47
<&McMartin>
DOOM
07:48
<&McMartin>
I'm going to replace a bunch of mechanically generated boilerplate code with a generalized engine and generated tabular data
07:48
<&McMartin>
And abuse the shit out of all our objects matching std::is_standard_layout
07:48
< catadroid>
I've already had my lead suggest that I look at the capabilities of our current compiler set and determine which of the language features are sensible for us to use in core code
07:48
<&McMartin>
It will be glorious and terrifying, and it should drop that module's size by over 90%
07:48
< catadroid>
\o/
07:48
<&McMartin>
You are supremely qualified for that judgement, based just on our casual talk here.
07:49
<&McMartin>
... over time, not merely just now~
07:49
< catadroid>
I replaced about a thousand lines of copy pasted code with two variadic templates yesterday
07:49
<&McMartin>
... definitely a win but I have to ask if that shrank the binary any
07:50
< catadroid>
Unlikely, I've not merged this code onto a project yet
07:50
<&McMartin>
I'm pretty sure the thing I'm doing will result in smaller but less safe code and I hope I can mitigate that
07:50
< catadroid>
(I've been waiting to fix that threading bug in case it was important)
07:50
<&McMartin>
Yeah
07:50
<&McMartin>
The solution I have in mind right now makes an alarming amount of use of reinterpret_cast<>
07:50
<&McMartin>
And by alarming I mean non-zero
07:51
< catadroid>
Also, the binary size isn't significant when we have 1024x1024 textures and such lying around
07:51
<&McMartin>
... a point
07:51
<&McMartin>
I'm writing a library for use on phones, I have pretty sharp binary limits and we're way, *way* past "desirable" already
07:52
<&McMartin>
I'm not convinced there's such a thing as "small enough", but there is a point where it's no longer worth it to shrink further
07:52 simon_ [simon@Nightstar-sjjvb1.dk] has joined #code
07:52
< catadroid>
(although it was up until the end of around the 360/ps3 era)
07:52
< simon_>
hello.
07:52
< catadroid>
Sure, but you only get so much time to optimise
07:52
<&McMartin>
Yep
07:52
< catadroid>
Hi
07:52
<&McMartin>
My plan is to do my best and hope it's good enough~
07:52
< catadroid>
:)
07:53
< catadroid>
I have a performance review that
07:53
< catadroid>
Today*
07:53
<&McMartin>
But now my plan is to put on some New Age music and use it to put me to sleep
07:53
< catadroid>
It's only about six months late
07:53
<&McMartin>
Thinking good thoughts
07:53
< catadroid>
I always wonder whether they're going to tell me I'm awful and slow and not productive enough
07:54
<&McMartin>
"Hitting the pipe with the wrench: $5. Knowing where to hit it: $9,995."
07:54
< catadroid>
Then I need to remember that I'm literally driving the company's tools strategy and I'm actually the c++ guru and the person the technical director calls the de facto owner of our stl implementation
07:54
< catadroid>
So it can't be that bad
07:55
<&McMartin>
Anyway, gonna get keyboard face if I don't retreat
07:55
<&McMartin>
Have a great day :)
07:55
< catadroid>
And I would likely be a massive benefit to the company even if I didn't write any code
07:55
< catadroid>
Good night!
07:55 * McMartin ker-zzzz, which is like regular zzzz but it involves a lot of rockets
07:55
< catadroid>
Boom!
07:55
< catadroid>
As toddlebot would say :3
07:56
<&McMartin>
toddlebot knows the score
07:56
<&McMartin>
Toddlebot should be taught the robot dance
07:57
< catadroid>
I'm on it :3
08:04
<~Vornicus>
"Also, the binary size isn't significant when we have 1024x1024 textures and such lying around" --- I remember when I got my PS1 and it came with a demo disc with 20ish games on it. At some point I realized that the reason they could do this was because the data is expensive in terms of space, not the code
08:08
< catadroid>
Mhm
08:08
< catadroid>
Although the code is still significant
08:08
< catadroid>
Just the size of the data is increasing a lot faster
08:09
< catadroid>
...it's also audio's fault more often than you'd think
08:10
<~Vornicus>
movies and giant images and sounds and -- I mean you're looking at a meg a minute for relatively crappy sound, and something like a meg a *second* for fmv, but a lot of that is done in engine now anyway
08:11
< catadroid>
Hm?
08:11
< catadroid>
Oh, right
08:11
< catadroid>
Depends on the game, heh
08:12
<~Vornicus>
I don't even have any idea how big a level is any more.
08:14
<~Vornicus>
or a model, or an animation set, or any of that.
08:14
< catadroid>
Again, heavily depends on the game
08:15
< catadroid>
Oddly, I don't really know either
08:15
< catadroid>
Fortunately, I just need to know how to know and the tech art guys can sort that out themselves
08:15
<~Vornicus>
Fuckin' Pokemon Red is 1 megabyte
08:16
< catadroid>
I wonder how big E:D is
08:16
<~Vornicus>
You're burning that on a single bump map.
08:17
< catadroid>
Oh sure
08:17
<~Vornicus>
(maybe not, there's those compressed-for-graphics-cards formats nowadays)
08:17
< catadroid>
No, we still are :p
08:17
<~Vornicus>
heh
08:17
< catadroid>
Compression isn't that good
08:18 * catadroid considers taking a shower and going to work
08:18
<~Vornicus>
read somewhere you get like 1/4 the size, 4 bytes for 16px, for monochrome.
08:18
< catadroid>
If my review ends up with be being fired
08:18
< catadroid>
Please hug me
08:18 * Vornicus hugs catadroid anyway
08:19 * catadroid hugs
08:19
< catadroid>
I don't rationally think I will
08:19
< catadroid>
But I'm terrified
08:35 catadroid [catalyst@Nightstar-4ed3a5.dab.02.net] has quit [[NS] Quit: Bye]
08:39
< simon_>
I've got this enum, ScraperType { Omit, Dynamic, Scrape } indicating whether a website should be scraped or not. Omit = never. Dynamic = depends on other factors. Scrape = Always. (Note to self: Hey, those names are so much better.)
08:39
< simon_>
now I'm writing some predicate functions that relate to these, and I'm wondering if I should write them in a whitelisting or in a blacklisting fashion
08:39 himi [fow035@Nightstar-dm0.2ni.203.150.IP] has quit [Ping timeout: 121 seconds]
08:40
<~Vornicus>
Whitelisting I'd say
08:40
<~Vornicus>
if (should_i_scrape == Scrape || should_i_scrape == Dynamic && other_factors) { ... do scraping ... }
08:41
< simon_>
basically: ShouldHaveScraper = (ScraperType == Always || (ScraperType == Dynamic && (IsPre || IsWeb))
08:41
< simon_>
haha
08:41
< simon_>
yes.
08:41
< simon_>
ok, great.
08:41
<~Vornicus>
you want whichever one requires action to be the one you check for positively.
08:42
< simon_>
and the other one is, ShouldHardcodeUris = (ScraperType == Always || ScraperType == Dynamic) (rather than ScraperType != Omit)
08:42
< simon_>
I just don't want any sudden behaviour in case I extend the enum and forget about this dependency.
08:42
< simon_>
I don't know if I'll extend it in a DefinitelyDontDoAnything or a DoABunchofMoreStuff way.
08:42
< simon_>
so whitelisting. great.
08:43
< simon_>
thanks, Vornicus.
08:44
<~Vornicus>
If your IDE doesn't do it for you, you can annotate with the fact that you check against the enum via comments, so you can check every condition as you add more.
08:45
< abudhabi>
Hm. It still doesn't work with Notepad++.
08:45
< abudhabi>
I'm not sure if the files aren't corrupted to begin with.
08:46
<~Vornicus>
Possible.
08:46 Kindamoody[zZz] is now known as Kindamoody
08:46
<~Vornicus>
notepad++ and most real text editors are polite: they won't change existing text without you explicitly telling it to.
09:11 Kindamoody is now known as Kindamoody|afk
09:23 Emmy [NSkiwiirc@Nightstar-esfu0j.dynamic.ziggo.nl] has joined #code
10:00 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
10:29 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
10:29 mode/#code [+o himi] by ChanServ
11:41 gnolam [lenin@Nightstar-t1tbf0.cust.bahnhof.se] has joined #code
11:41 mode/#code [+o gnolam] by ChanServ
11:44 thalass [thalass@Nightstar-283.o7s.158.104.IP] has quit [Ping timeout: 121 seconds]
13:38 Reiv [NSwebIRC@Nightstar-g7fs0k.xtra.co.nz] has quit [Ping timeout: 121 seconds]
14:05 Emmy [NSkiwiirc@Nightstar-esfu0j.dynamic.ziggo.nl] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
15:30 catadroid [catalyst@Nightstar-bg002c.dab.02.net] has joined #code
15:38
< catadroid>
Review thing was fine
15:38
< catadroid>
Apparently I'm very good at my job
15:41
<@TheWatcher>
It's good they recognise it; are they going to give you a pay rise?~
15:49 gnolam_ [lenin@Nightstar-t1tbf0.cust.bahnhof.se] has joined #code
15:50 gnolam [lenin@Nightstar-t1tbf0.cust.bahnhof.se] has quit [NickServ (RECOVER command used by gnolam_)]
15:50 gnolam_ is now known as gnolam
15:50 mode/#code [+o gnolam] by ChanServ
15:54
< catadroid>
Pay reviews are a separate thing, heh
15:54
< catadroid>
They already pay me pretty well for the company
15:54
< catadroid>
So far as I can tell
17:08
< Azash>
Today's fine bit of JavaScript: ['10','10','10','10','10'].map(parseInt)
17:08
< Azash>
Try evaluating that
17:18
<&ToxicFrog>
If that doesn't result in [10 10 10 10 10] I will be unpleasantly surprised.
17:18
< Azash>
It doesn't
17:18
< Azash>
Because JS map
17:18
< Azash>
Unlike pretty much every other map function
17:18
<&ToxicFrog>
WHAT THE HELL
17:18
< Azash>
Also passes the index as second parameter
17:18
<&ToxicFrog>
IS THIS
17:19
< Azash>
And parseInt takes base as optional second argument
17:19
< Azash>
So it calls with ('10', 0), ('10', 1), so forth
17:19
< Azash>
Thus returning you the entirely intuitive, principle-of-least-surprise-conformant [10, NaN, 2, 3, 4]
17:30 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
17:30 mode/#code [+qo Vornicus Vornicus] by ChanServ
17:49
< catadroid>
But
17:51 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
17:52
<~Vornicus>
But, butt?
17:57
< catalyst>
Sure thing
18:05 * Vornicus drags catalyst to the discotheque for the purpose of shaking butt.
18:11 gizmore [kvirc@Nightstar-mkfpp8.dip0.t-ipconnect.de] has joined #code
18:11 VirusJTG [VirusJTG@Nightstar-055.kas.104.208.IP] has quit [Connection closed]
18:12 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
18:34 catadroid` [catalyst@Nightstar-5det0b.dab.02.net] has joined #code
18:37 catadroid [catalyst@Nightstar-bg002c.dab.02.net] has quit [Ping timeout: 121 seconds]
18:45
<&McMartin>
"It is a grievous error for the application to try to use a prepared statement after it has been finalized."
18:46
<&McMartin>
09:19 < Azash> Thus returning you the entirely intuitive, principle-of-least-surprise-conformant [10, NaN, 2, 3, 4]
18:46
<&McMartin>
This actually is conformant to the principle of least surprise in the same way strlen(<some UTF-16 string>) returning 0 is.
18:46
<&McMartin>
er, sorry
18:46
<&McMartin>
returning 1
19:39
<&ToxicFrog>
How do you mean?
20:18
<@ErikMesoy>
It is one string long?
20:21
<&McMartin>
ToxicFrog: It's behaving according to its spec
20:21
<&McMartin>
The fact that you have fed it something that would be consistent with a different spec that has has a similar or identical name is not entirely its fault.
20:21
< Azash>
ErikMesoy: UTF-16 for the most common characters starts with an empty byte which would confuse strlen
20:22
<&McMartin>
And it almost certainly returns 1 because the high byte of your little-endian UTF16 string was almost certainly 0.
20:22
<&McMartin>
And it's low-byte first on basically all chips these days, so, 1.
20:22
< Azash>
And the principle of least surprise applies to spec conformance to expectation, not program/code conformance to spec
20:22
<&McMartin>
Right
20:22
<&McMartin>
Interpreting that as "Nothing should ever look different from anything I ever learned" is handy when beating on acceptable targets but it's a dangerous trap~
20:23
<&McMartin>
It turns out people learn different things first
20:23
< Azash>
Entirely compartmentalizing expectations for different tech leads to a lot of learning waste too though
20:25
<&McMartin>
Yes
20:25
<&McMartin>
It's them, hrm
20:26
<&McMartin>
The visceral reaction that I try to push against
20:26
<&McMartin>
A lot of people don't seem to realize that "sane" is defined as "that thing I already know how to do"
20:33
<&ToxicFrog>
My fundamental objection here is that there is, and was when the spec was written, a *lot* of prior art for map which does not follow this convention
20:34
<&McMartin>
Yes, this function should be called mapi
20:35
<&McMartin>
OTOH, most languages also say "map must take a one-argument function" so passing it parseint would produce a compile error.
20:35
<&McMartin>
... well
20:35
<&McMartin>
"A function with a number of arguments equal to the number of sequences passed in"
20:35 Vash [Vash@Nightstar-uhn82m.ct.comcast.net] has joined #code
20:35 mode/#code [+o Vash] by ChanServ
20:35
<~Vornicus>
paresint is technically also a one-argument function
20:36
<&McMartin>
JS's notion of arity is a little cloudy, IMO
20:37
<~Vornicus>
I mean even if I were to strictly define it elsewhere, it's got a one-argument signature and a two-argument signature
21:01 celticminstrel [celticminst@Nightstar-q0f7bb.dsl.bell.ca] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.]
21:02 celticminstrel [celticminst@Nightstar-q0f7bb.dsl.bell.ca] has joined #code
21:02 mode/#code [+o celticminstrel] by ChanServ
21:03 crystalclaw|AFK is now known as crystalclaw
21:11 gizmore|2 [kvirc@Nightstar-mkfpp8.dip0.t-ipconnect.de] has joined #code
21:14 gizmore [kvirc@Nightstar-mkfpp8.dip0.t-ipconnect.de] has quit [Ping timeout: 121 seconds]
21:22 gizmore [kvirc@Nightstar-mkfpp8.dip0.t-ipconnect.de] has joined #code
21:24 gizmore|3 [kvirc@Nightstar-mkfpp8.dip0.t-ipconnect.de] has joined #code
21:25 gizmore|2 [kvirc@Nightstar-mkfpp8.dip0.t-ipconnect.de] has quit [Ping timeout: 121 seconds]
21:26 gizmore|2 [kvirc@Nightstar-mkfpp8.dip0.t-ipconnect.de] has joined #code
21:27 gizmore [kvirc@Nightstar-mkfpp8.dip0.t-ipconnect.de] has quit [Ping timeout: 121 seconds]
21:29 gizmore|3 [kvirc@Nightstar-mkfpp8.dip0.t-ipconnect.de] has quit [Ping timeout: 121 seconds]
21:39 gizmore [kvirc@Nightstar-mkfpp8.dip0.t-ipconnect.de] has joined #code
21:42 gizmore|2 [kvirc@Nightstar-mkfpp8.dip0.t-ipconnect.de] has quit [Ping timeout: 121 seconds]
21:48 gizmore|2 [kvirc@Nightstar-mkfpp8.dip0.t-ipconnect.de] has joined #code
21:51 gizmore [kvirc@Nightstar-mkfpp8.dip0.t-ipconnect.de] has quit [Ping timeout: 121 seconds]
22:12 gizmore [kvirc@Nightstar-mkfpp8.dip0.t-ipconnect.de] has joined #code
22:15 gizmore|2 [kvirc@Nightstar-mkfpp8.dip0.t-ipconnect.de] has quit [Ping timeout: 121 seconds]
22:17 gizmore|2 [kvirc@Nightstar-mkfpp8.dip0.t-ipconnect.de] has joined #code
22:20 gizmore [kvirc@Nightstar-mkfpp8.dip0.t-ipconnect.de] has quit [Ping timeout: 121 seconds]
22:27 Kindamoody|afk is now known as Kindamoody
22:52 thalass [thalass@Nightstar-283.o7s.158.104.IP] has joined #code
22:52 mode/#code [+o thalass] by ChanServ
22:54
< [R]>
<McMartin> OTOH, most languages also say "map must take a one-argument function" so passing it parseint would produce a compile error. <-- unfortunately JS makes this nigh-impossible, since function() { return arguments[14] } is totally valid.
22:55
<&McMartin>
R: I get to that several lines later!
22:58
< [R]>
I do not know of a word "arity" and was unsure what you meant by it.
22:58
<&McMartin>
Aha.
22:58
<&McMartin>
It's the number of elements in a tuple.
22:58
<&McMartin>
Or the number of arguments in a function, etc
22:59
< [R]>
IE the size of a set?
23:03
<&McMartin>
Maybe. Lots of CS terms get borrowed from math in inconsistent ways.
23:04
<@ErikMesoy>
[R]: More like the expectation/requirement of the size of a set, I'd say.
23:05
<&McMartin>
I don't see it with lists, though
23:05
<&McMartin>
Functions, tuples
23:08
<@ErikMesoy>
McMartin: CS arity is mostly 1 less than math arity, as math arity's count of domains tends to include the function's return value.
23:12
<&McMartin>
Makes sense
23:36 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has joined #code
23:36 mode/#code [+o Reiv] by ChanServ
23:37 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
--- Log closed Wed Apr 27 00:00:57 2016
code logs -> 2016 -> Tue, 26 Apr 2016< code.20160425.log - code.20160427.log >

[ Latest log file ]