code logs -> 2016 -> Mon, 26 Sep 2016< code.20160925.log - code.20160927.log >
--- Log opened Mon Sep 26 00:00:31 2016
00:03
<&McMartin>
Great
00:03
<&McMartin>
Derakon, I'd still like to hear the report from your twisted hybrid system as further confirmation, since then we'll have had four very different systems do the testing
00:04 * celticminstrel assumes a 10.11 (or is it at 1.12 now?) has also been tested.
00:05 * celticminstrel forgot the word "system" in that sentence.
00:05
<&McMartin>
Two 10.12 systems have been tested.
00:05
<@celticminstrel>
So should I replace my UQM with this version now?
00:05
<&McMartin>
Actually, the only change in the package is replacing SDL.framework.
00:05
<@celticminstrel>
Ah.
00:05
<&McMartin>
Everything else (including, crucially, SDL_image.framework) is bit-exact.
00:06
<@celticminstrel>
So really no point, then.
00:06
<&McMartin>
This does mean "still no native 64-bit build"
00:06
<&McMartin>
Well
00:06
<&McMartin>
10.12 seems to explode with the old SDL.framework
00:06
<@celticminstrel>
Any progress on SDL2?
00:06
<&McMartin>
If you plan on ever upgrading to that, it'll come in handy
00:06
<&McMartin>
No effort, no progress
00:06
<&McMartin>
Bluntly, there's no point in an SDL2 port unless we can remove our indirect requirement on ImageIO.framework explicitly.
00:07
<&McMartin>
So I would sooner replace SDL_image with raw libpng before trying to shift over to SDL_image and SDL2_image
00:07 * celticminstrel has no idea what ImageIO is.
00:09
<&McMartin>
It's macOS's native library for loading image files.
00:09
<&McMartin>
SDL_image and its successors use it in preference to things like libpng or libjpeg.
00:09
<&McMartin>
Unfortunately for UQM, ImageIO destroys palette information in files as it loads them, which makes it completely unusable for our purposes.
00:10
<&McMartin>
It's possible to trick SDL_image into thinking it's on a Linux machine and using libpng anyway, but my attempts to do this with modern recompiles have invariably resulted in weird graphical distortions.
00:12
<&McMartin>
I still think an SDL2 graphical engine for it would be pretty great, in part because it would render the pure vs OpenGL split utterly unnecessary
00:48 ion_ [Owner@Nightstar-6grqph.vs.shawcable.net] has joined #code
00:48 mode/#code [+o ion_] by ChanServ
00:51 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has quit [Ping timeout: 121 seconds]
01:03
<&Derakon>
Crippled Ilwrath ship destroyed, starbase active...everything looks good.
01:11
<&McMartin>
Excellent
01:11
<&McMartin>
What are your system's stats again?
01:12
<&Derakon>
OSX 10.9.5, Intel Core i7 3.2GHz, 8GB RAM...anything else?
01:12
<&McMartin>
That's all I needed to hear.
01:12 * McMartin pulls the trigger on the news and files page.
01:12
<&Derakon>
Congrats.
01:13
<&McMartin>
Only, oh
01:13
<&McMartin>
three years late
01:13
<&McMartin>
I think this issue started when 10.9 was released
01:13
<&McMartin>
But it became inescapable when 10.12 was, so clearly I'm being timely >_>
01:20 ion_ [Owner@Nightstar-6grqph.vs.shawcable.net] has quit [Ping timeout: 121 seconds]
01:24 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has joined #code
01:24 mode/#code [+o ion] by ChanServ
01:56
<&McMartin>
Ha ha, also, man
01:56
<&McMartin>
A 100% full install of UQM including all the remix packs is 397MB.
01:56
<&McMartin>
Remember when that was a lot?
02:04
<&[R]>
Yeah
02:04
<&[R]>
I had a 700mb C, and 1.7GB D drive, Windows was the only thing on C and it seemed to endlessly run out of space.
02:05
<&[R]>
This was of course long before I discovered that XP had mounting... but I think I kept both drives as FAT so I don't think that'd have helped any.
02:08 ion_ [Owner@Nightstar-6grqph.vs.shawcable.net] has joined #code
02:08 mode/#code [+o ion_] by ChanServ
02:09 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has quit [Ping timeout: 121 seconds]
02:19
<~Vornicus>
I remember getting my 2gig drive for my quadra
02:19
<~Vornicus>
that was huge.
02:20
<&McMartin>
Heh
02:20
<&McMartin>
ACtually, that's kind of cheating, though, it occurs to me...
02:20
<&McMartin>
... because back when that was "a lot" but not "inconceivably huge"...
02:20
<&McMartin>
... then this was half a CD-ROM
02:20
<~Vornicus>
true
02:20
<&McMartin>
The actual install size here would thus "clearly" be 11MB, and then the rest would be "is the CD in the drive? Yes? OK, fine"
02:23
<&McMartin>
Heh. And while we're at it, the original really *was* "all of a CD-ROM" because the graphics and audio were all uncompressed (TGA and AIFF).
02:27 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has joined #code
02:27 mode/#code [+o ion] by ChanServ
02:30 ion_ [Owner@Nightstar-6grqph.vs.shawcable.net] has quit [Ping timeout: 121 seconds]
02:36 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has quit [Ping timeout: 121 seconds]
02:38 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has joined #code
02:38 mode/#code [+o ion] by ChanServ
02:43 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has quit [Ping timeout: 121 seconds]
02:43 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has joined #code
02:43 mode/#code [+o ion] by ChanServ
03:59 catadroid` [catadroid@Nightstar-tr7i97.dab.02.net] has joined #code
04:03 catadroid [catadroid@Nightstar-0f146e.dab.02.net] has quit [Ping timeout: 121 seconds]
04:05 catadroid` [catadroid@Nightstar-tr7i97.dab.02.net] has quit [[NS] Quit: Bye]
04:09 catadroid [catadroid@Nightstar-tr7i97.dab.02.net] has joined #code
04:09 catadroid [catadroid@Nightstar-tr7i97.dab.02.net] has quit [[NS] Quit: Bye]
04:15 catadroid [catadroid@Nightstar-tr7i97.dab.02.net] has joined #code
04:15 catadroid [catadroid@Nightstar-tr7i97.dab.02.net] has quit [The TLS connection was non-properly terminated.]
04:15 catadroid [catadroid@Nightstar-tr7i97.dab.02.net] has joined #code
05:01
<@Alek>
\o/
05:11 Derakon is now known as Derakon[AFK]
06:05 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
06:28 Kindamoody[zZz] is now known as Kindamoody
06:59 * celticminstrel wonders why Alek was cheering.
07:01
<@simon>
I'm trying to iterate the space of pairs (a,b) where a,b \in [0...7000[ *randomly*
07:02
<@simon>
if it were just a scalar, I'd do: for (int i = 0, a = 0, p = rand_prime(>7000); i < 7000; i++, a = (a + p) % 7000) { ... a ... }
07:03
<@simon>
but if I nest these, for (int i = 0, a = 0, p1 = rand_prime(>7000); i < 7000; i++, a = (a + p1) % 7000) { for (int j = 0, b = 0, p2 = rand_prime(>7000); j < 7000; j++, b = (b + p2) % 7000) { ... (a,b) ... } }, then a is fixed for the first 7000 pairs, which is undesirable.
07:04
<@simon>
if, instead of 7000, it were some binary exponent of 2, I could generate *one* integer ab, and split it bitwise in two.
07:05
<@simon>
any ideas for generating the pairs shuffled in both parameters?
07:15
<@simon>
how about. int k = 7000; int p = rand_prime(>k^2); for (int i = 0, a = 0; i < k^2; i++, a = (a + p) % k^2) { (a,b) = (a % 7000, a / 7000); ... }
07:18 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
07:18 mode/#code [+qo Vornicus Vornicus] by ChanServ
07:46 * Alek was just stretching. :P
07:50
<@gnolam>
simon: generate two [0...7000[ integer arrays, shuffle them, then for (int i = 0; i < 7000; i++) { pair(array1[i], array2[i]); } ?
07:53
<@gnolam>
Disregard.
07:54
<@gnolam>
Have not had my morning caffeine yet.
07:56
<@gnolam>
I see no reason for (int i = 0; i < 7000; i++) { shuffle(array2); for (j = 0; j < 7000; j++) { pair(array1[i], array2[j]); }} shouldn't work though.
07:57
<@simon>
gnolam, array1[i] then becomes fixed for the first 7000 pairs.
07:57
<@gnolam>
... right.
07:57 * gnolam wanders off to put the kettle on. :P
07:57
<@simon>
:P
07:58
<@simon>
and I'd like them to be random. it's for visiting a network without annoying single nodes for any amount of time.
07:59
<@simon>
I went with just iterating i in [0...k^2] in random order, and then extracting (ri % 7000, ri / 7000)
08:00 Kindamoody is now known as Kindamoody|afk
08:30 catadroid [catadroid@Nightstar-tr7i97.dab.02.net] has quit [[NS] Quit: Bye]
09:06 macdjord is now known as macdjord|slep
09:35 You're now known as TheWatcher[lab]
10:11 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has joined #code
10:11 mode/#code [+o Emmy] by ChanServ
11:46 You're now known as TheWatcher
14:31 VirusJTG_ [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [[NS] Quit: Leaving]
14:31 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
14:31 mode/#code [+ao VirusJTG VirusJTG] by ChanServ
14:44
<~Vornicus>
what are we up to?
14:46
<@TheWatcher>
Wrangling ALL THE DATA
14:52
<~Vornicus>
generate numbers in the range [0...49000000[
14:52
<~Vornicus>
Then use divmod
14:52
<~Vornicus>
problem over
14:53
<~Vornicus>
or rather, shuffle that
14:53
<~Vornicus>
then use divmod. problem over.
15:55 macdjord|slep is now known as macdjord|wurk
17:24 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has quit [Ping timeout: 121 seconds]
18:03 gizmore|2 [kvirc@Nightstar-p3m0us.dip0.t-ipconnect.de] has joined #code
18:06 gizmore [kvirc@Nightstar-p3m0us.dip0.t-ipconnect.de] has quit [Ping timeout: 121 seconds]
18:43
<@simon>
I've got two classes, SharedHardcoding(Company, Uri, DocumentType, ContentType) and QuarterlyHardcoding(Company, Uri, DocumentType, ContentType, CompanyEvent, FiscalPeriod) that both derive from BaseHardcoding(Company, Uri, DocumentType, ContentType) (that is, same as SharedHardcoding).
18:44
<@simon>
now I've got a library function that's supposed to take a bunch of hardcodings, run an HTTP HEAD on them and see if the Content-Type changed.
18:45
<@simon>
I figured it'd be neat if it took an IEnumerable<BaseHardcoding>, since then I can make *one* function.
18:46
<@simon>
I also figured one good return value for this library function would be an IEnumerable<BaseHardcoding> for those that *did* change, with the ContentType updated.
18:47
<@simon>
but I've made these classes immutable, and I wonder if I should just extend BaseHardcoding with a virtual, polymorphic method that returns a copy of the object, but with ContentType changed according to an input type.
18:48
<@simon>
I guess: public virtual BaseHardcoding WithContentType(ContentType contentType)
18:48
<@simon>
now, is there any way in C# to say "this function should return the same kind of BaseHardcoding as it itself is"?
18:49
<@simon>
if it were an extension method, maybe the syntax would've been: public static virtual THardcoding WithContentType<THardcoding>(this THardcoding source, ContentType contentType) where THardcoding : BaseHardcoding
18:49
<&McMartin>
Hmm
18:50
<&McMartin>
Yeah, I was going to say, in Java I would have a template argument restricted to "subclass of IEnumerable<BaseHardCoding>" and then take, and return, that template type.
18:51
<@simon>
I wonder if it's uncommon to write extension methods to classes inside classes themselves :P
18:51
<&McMartin>
Without that, though, there's nothing stopping you from taking and returning IEnumerable<Hardcoding> and documenting "you get out exactly the class you put in"
18:51
<&McMartin>
C#, like C++ and Java, but unlike Objective-C, guarantees that constructors don't change classes under your nose mid-construction
18:52
<&McMartin>
That is, if you say new A(), you don't get a B extends A.
18:52
<@simon>
well, a method WithContentType() on SharedHardcoding isn't restricted from creating a QuarterlyHardcoding object.
18:52
<@simon>
(or the other way around, more likely, since a QuarterlyHardcoding has all the properties of a SharedHardcoding.)
18:52
<&McMartin>
Yeah, factory methods are in fact "hey, my language sucks because I can't have a constructor pick what type to really use"
18:53
<@simon>
of course virtual extension methods, which would allow the type annotation I need, don't exist.
18:53
<&McMartin>
Aha
18:54
<&McMartin>
(My C# is extremely rusty, so details I can't help with)
18:54
<&McMartin>
That said...
18:54
<&McMartin>
Is what you're hoping for here a statically enforced, automatic downcast?
18:54
<&McMartin>
Or a guarantee that you aren't getting something different?
18:54 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
18:54
<&McMartin>
The latter is actually something the type system wouldn't do
18:54
<&McMartin>
You can't really insist in a reference return type "this is an A and not a subclass of A", at least in Java, because that's not what its types do
18:55
< catalyst>
McMartin: https://www.youtube.com/watch?v=zBkNBP00wJE
18:55
<@simon>
actually, I was thinking of abstract extension methods. almost the same.
18:55
<&McMartin>
catalyst: Hee. Saving that for later
18:55
<&McMartin>
One of my current projects is doing that one level down but I haven't had the spare brainpower to do it :(
18:56
<&McMartin>
(Simulating an Atari 2600 game on the Commodore 64)
18:56
<@simon>
McMartin, I'd just like for my abstract class to have an abstract method that returns the same kind of subclass as the one that implements it.
18:57
<@simon>
it should work with simple type unification of type parameters used in two places. but alas.
18:59 * McMartin nods
18:59
<&McMartin>
I can force that to happen in C++, and I think the trick would work in Java
18:59
<&McMartin>
But it's ugly and in a language like Java it would literally only be saving me a single downcast per function call
18:59
<&McMartin>
I would probably deem that a guarantee not worth making statically.
19:00
<&McMartin>
(C++ needs it for, among other things, std::enable_shared_from_this<>)
19:00
<&McMartin>
(And that class is one of the strongest arguments against C++ as a language out there =( )
19:01
<@simon>
hehe, ok.
19:03
<&McMartin>
... correction. In Java, given how Generics are implemented at the JVM level the last time I checked, it wouldn't even save me the downcast.
19:03
<&McMartin>
It would instead make it a compile-time error if I violated that invariant while implementing the subclass
19:44
<@celticminstrel>
What is enable_shared_from_this, anyway?
19:50
< catalyst>
It lets you retrieve a single refcounted pointer to an instance from that instance
19:50
< catalyst>
...iirc
19:51
< catalyst>
that's essentially the one aspect of shared_ptr I didn't implement when I did a pass on that, heh
19:54
<@gnolam>
Well this is kind of scary. Apparently, I can still set up a new Mailman list with settings the way they're supposed to be in <= 5 minutes-
19:54
<@gnolam>
*.
20:16 Vash [Vash@Nightstar-uhn82m.ct.comcast.net] has joined #code
20:18
<&McMartin>
celticminstrel: So, the way shared_ptr works is that it holds a reference count to some heap object, and it deletes that heap object when it hits zero
20:18
<&McMartin>
Where things get exciting is that if you pass the same raw pointer to two std::shared_ptr constructors, then it will get deleted twice, which opens a portal from the heart of R'lyeh directly into your code.
20:19
<&McMartin>
So a std::shared_ptr generally needs to have one true source and then be replicated from that true source through everything else, which implies communication channels that whatever you are interoperating with might not have.
20:19
<&McMartin>
std::enable_shared_from_this<> is a class that, when implemented, makes the object itself the one true source.
20:20
<&McMartin>
It's exciting because it captures a value based on the template
20:20
<&McMartin>
So if you are trying to mix this with inheritance, everything goes to...
20:20
<&McMartin>
... well, not Hell, but Purgatory.
20:20
<&McMartin>
Because with a thousand years of suffering and sweat there is a hope of redemption.
20:20
< catalyst>
unnecessary taxation related issues
21:13 Kindamoody|afk is now known as Kindamoody
21:15 gizmore|2 [kvirc@Nightstar-p3m0us.dip0.t-ipconnect.de] has quit [Ping timeout: 121 seconds]
21:15 gizmore|2 [kvirc@Nightstar-cb121a.dip0.t-ipconnect.de] has joined #code
22:03 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
22:03 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
22:03 mode/#code [+o himi] by ChanServ
22:46 Kindamoody is now known as Kindamoody[zZz]
22:59 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has quit [[NS] Quit: Leaving]
23:34 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Connection closed]
23:49 Kylo-Ren [cmnd@Nightstar-7i6ec2.dyn.optonline.net] has joined #code
--- Log closed Tue Sep 27 00:00:47 2016
code logs -> 2016 -> Mon, 26 Sep 2016< code.20160925.log - code.20160927.log >

[ Latest log file ]