code logs -> 2011 -> Mon, 28 Mar 2011< code.20110327.log - code.20110329.log >
--- Log opened Mon Mar 28 00:00:19 2011
00:19
< TheWatcher>
I wouldn't advise holding any breath over it.
00:21 Shield is now known as EvilDarkLord
00:34
<@McMartin>
Well, C++98 took... five years? six?
00:35
<@McMartin>
And this time there are teams at gcc that actually give a fuck about having compilers that accept standard code, as opposed to considering that a threat to the purity of open source
00:42
< celticminstrel>
Huh, I just noticed no-one actually answered my question.
00:42
< celticminstrel>
....what's that about GCC?
00:42 * Vornicus is still trying to figure out how the hell a standard without an implementation is in any sense a standard.
00:43
<@McMartin>
celticminstrel: GCC didn't get a reasonable implementation of C++ until the mid 2000s or so, when IBM and Apple started taking interests.
00:43
<@McMartin>
The old GCC group didn't like the idea of having sensible internals because that would mean somebody might be able to feed its output into a *gasp* closed-source backend
00:44
<@Vornicus>
And that line of logic bethumps me as well.
00:44
< Derakon>
It makes a kind of sense.
00:44
<@McMartin>
The gcc->egcs->gcc again->crazy LLVM fork whose name escapes me, and other fork aiming towards gimple
00:45
< Derakon>
They make this tool for everyone to use freely, so long as what you do with it is also made freely available.
00:45
<@Vornicus>
Only in the sense that security by obscurity makes sense.
00:45
<@McMartin>
Anyway, my impression of gcc in the 2.xx era is that they considered gcc to be an instrument of control.
00:47 * McMartin checks the history
00:47
<@McMartin>
And yeah, the egcs guys were actually doing what the words said instead of trying to hit people with sticks, and it's unsurprising they took over the whole project later.
00:47
<@McMartin>
And part of doing that meant opening the internals so that you could actually function as open source, or, indeed, anything useful at all
00:49 * McMartin boggles.
00:49
<@McMartin>
Apparently gcc 4.6 supports Go directly.
00:49
< Derakon>
Public relations is really the only relevant one I can think of.
00:49
< Derakon>
Er, mischan.
00:51
<@Vornicus>
celmin: the original line of discussion is the publication of C++0x as a standard.
00:52
< celticminstrel>
GCC supports Go? Huh. Interesting.
00:52
<@McMartin>
celticminstrel: Well, the one I have here doesn't
00:52
<@McMartin>
But GCC's idea of latest stable apparently does, according to Wiki
00:53
<@McMartin>
And GCC got its Properly Sane IR in 4.0
00:53
<@McMartin>
But that's not politics, that's "it was an academia project, and it takes that long to go into production"
00:53
< celticminstrel>
IR?
00:54
<@McMartin>
Intermediate Representation
00:54
< Derakon>
Go? ...Google's programming language?
00:54
<@McMartin>
Derakon: ... yeah. I'm surprised it's going mainstream that fast, hence my boggling.
00:55
<@McMartin>
I knew they had a fork for it...
00:56
<@McMartin>
celticminstrel: Anyway, 2.x didn't *have* an IR, 3.x had an immensely complex one that was hard to deal with, and 4.x uses GIMPLE, which is a static-single-assignment "quad" IR, which is a form that allows for standalone, extremely powerful program analysis for optimization and code-proofs.
01:01
<@McMartin>
Heh. I still have my Ultima IV save hacking code that I wrote in Go.
01:01
<@McMartin>
https://hkn.eecs.berkeley.edu/~mcmartin/go/u4scan.go
01:05 * Vornicus tries to figure out what static-single-assignment means. also "quad", but suspects that it's... targeting a simple fictional machine?
01:16 You're now known as TheWatcher[T-2]
01:20 You're now known as TheWatcher[zZzZ]
01:52 Attilla [Some.Dude@37647E.0E7447.22C7B1.567421] has quit [Ping timeout: 121 seconds]
02:07
<@McMartin>
MOre or less
02:08
<@McMartin>
Quad is a data structure for holding three-address code
02:08
<@McMartin>
SSA is "any variable is assigned exactly once"
02:09
<@Vornicus>
aha
02:10
<@Vornicus>
yes, I can see that as a spectacularly valuable thing for program analysis.
02:10
<@McMartin>
THe problem is, languages like C that are weakly typed and revel in it tend to result in "OK, you're dereferencing this pointer and it could be anything in the address space."
02:12
<@Vornicus>
Yes, that could suck.
02:13
<@McMartin>
This is why past a certain point, better analysis doesn't get you more optimizable code
02:13
<@McMartin>
But if you're doing type annotations or using a more constrained language, you can get craploads more mileage.
02:15
<@Vornicus>
How does an ssa language handle loops?
02:16
<@McMartin>
Well. If you're *programming* in something that insists on SSA, it's purely functional, so via recursion or some kind of list iterator.
02:17
<@McMartin>
I'm not sure how GIMPLE handles it. Most quad systems are not SSA.
02:17
<@McMartin>
The simplest thing I can think of is "one of the options for the value you take is from the future"
02:19 * Vornicus 's head asplode.
03:09 Kindamoody is now known as Kindamoody[zZz]
03:14
< Derakon>
From a thread on the TASVideos site on what people would do if they could TAS real life: "I'd probably desync and end up jumping into and banging on a wall for the rest of my life." "maybe that's what has happened with some so called mentally ill people who bang their heads on walls. actually they just got a desync. it would require a very advanced emulator to run the universe, so desyncs might happen easily."
03:39
< celticminstrel>
What is SSA?
03:39
< celticminstrel>
Oh never mind.
03:39
<@McMartin>
Static Single Assign---OK
03:40
< celticminstrel>
:)
03:40
< celticminstrel>
Saw your answer earlier.
03:40
<@McMartin>
Vorn: You don't execute SSA - it's just that each variable is assigned once and is computed as a choice from all the places its value could come from.
03:40
<@McMartin>
If you have a loop, that point could be from later in the code.
03:40
<@McMartin>
If there's aggressive pointer aliasing, it can be Fucking Anywhere.
03:52
<@Vornicus>
Aha.
06:03 Stalker [Z@2C3C9C.B2A300.F245DE.859909] has quit [Ping timeout: 121 seconds]
06:11 kwsn [kwsn@Nightstar-9d744862.dyn.centurytel.net] has quit [[NS] Quit: I'VE GOT A LOVELY BUNCH OF... dopefish?]
06:16 Stalker [Z@5E691D.FC7C16.75EF63.3CC5FD] has joined #code
06:24 Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [[NS] Quit: ]
06:30 Stalker [Z@5E691D.FC7C16.75EF63.3CC5FD] has quit [Ping timeout: 121 seconds]
06:35 Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
06:36 Derakon is now known as Derakon[AFK]
06:36 Syloqs_AFH is now known as Syloqs-AFH
06:45 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
07:10 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
07:52 You're now known as TheWatcher
07:54 Kindamoody[zZz] is now known as Kindamoody
08:20 AnnoDomini [annodomini@D553D1.9D4909.CA87F7.C2CD06] has joined #code
09:05 Rhamphoryncus [rhamph@C06FE3.F5723C.BE3FEB.9D4666] has joined #code
09:30 Vornicus is now known as Vornicus-Latens
10:12 AnnoDomini [annodomini@D553D1.9D4909.CA87F7.C2CD06] has quit [[NS] Quit: I hate building pump stacks, but love pumping magma.]
10:44 Attilla [Some.Dude@37647E.0E7447.22C7B1.567421] has joined #code
12:40 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code
12:56 Kindamoody is now known as Kindamoody|out
13:10 AnnoDomini [annodomini@D553D1.41311B.3D1443.F692F4] has joined #code
13:26 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
13:32
< gnolam>
Finally.
13:32 * gnolam can has account on a TOP500 machine.
13:35
< Tamber>
Shiny.
16:45 Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has quit [Connection reset by peer]
16:45 Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has joined #code
17:00 Tarinaky [tarinaky@Nightstar-dd7e4a05.net] has quit [[NS] Quit: leaving]
17:01 Tarinaky [tarinaky@Nightstar-dd7e4a05.net] has joined #code
17:05 Rhamphoryncus [rhamph@C06FE3.F5723C.BE3FEB.9D4666] has quit [Ping timeout: 121 seconds]
17:09 Rhamphoryncus [rhamph@C06FE3.F5723C.BE3FEB.9D4666] has joined #code
19:05 Vornucopia [NSwebIRC@C888DE.7F9621.E9EB68.4F3E89] has joined #code
19:32 * Vornucopia args, finds himself adrift while writing this thing, decides he needs to Actually Design. blarg.
19:41 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Operation timed out]
19:55 * Vornucopia does, however, write smooth_sample, which makes sure that when sample_size > population, every available thing is used approximately the same number of times.
19:58 Rhamphoryncus [rhamph@C06FE3.F5723C.BE3FEB.9D4666] has quit [Client exited]
19:59 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code
20:03
< TheWatcher>
Vornucopia: What're you workin on?
20:03
< Vornucopia>
I'm still poking at the refactor of multiplication_drill to make it possible to write addition_drill and division_drill and so on and so forth.
20:03
< TheWatcher>
aha
20:03
< TheWatcher>
Well, good luck with it!
20:28
< Vornucopia>
Shit feature creep again.
21:14 Kindamoody|out is now known as Kindamoody
21:31 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
21:39
< Vornucopia>
okay, that looks good. Design done, back to the offshore coding rig.
21:51
<@McMartin>
offshore coding rig?
21:51
< Vornucopia>
Kind of like the code mines.
21:51
< Tamber>
They don't want to risk his code escaping, either.
21:51 * Tamber ducks.
21:52
< Vornucopia>
But first, actual work.
21:53
< Vornucopia>
(or the code farms, or the codeyard.)
21:53 Vornucopia [NSwebIRC@C888DE.7F9621.E9EB68.4F3E89] has quit [[NS] Quit: Page closed]
21:56
< celticminstrel>
XD
23:09
< gnolam>
Yay, the data loading is passing the unit tests now.
23:13
< ToxicFrog>
This is new and exciting.
23:13
< ToxicFrog>
>>> a = ([],)
23:13
< ToxicFrog>
>>> a[0] += [1]
23:13
< ToxicFrog>
Traceback (most recent call last):
23:13
< ToxicFrog>
File "<stdin>", line 1, in <module>
23:13
< ToxicFrog>
TypeError: 'tuple' object does not support item assignment
23:13
< ToxicFrog>
>>> a[0]
23:13
< ToxicFrog>
[1]
23:13
< ToxicFrog>
I understand why it happens, but it's a bit eyebrow-raising at first glance.
23:13
<@McMartin>
Does a[0].append(1) have the same effect?
23:14
< ToxicFrog>
Without the error, yes.
23:14
< ToxicFrog>
What happens is that += first updates the list in-place, then (rendundantly) tries to update the tuple with the updated list.
23:14
<@McMartin>
yeah
23:15
< ToxicFrog>
The latter operation fails because tuples are immutable, but at that point the list has already been mutated.
23:15
< ToxicFrog>
(The fact that += updates in place does strike me as a lot WTF, since + doesn't)
23:19
<@McMartin>
If you make += not update in place, code that looks linear becomes secretly quadratic
23:19
<@McMartin>
Java Strings are infamous for this
23:19
< ToxicFrog>
In general I feel that += should be equivalent to + followed by =; if I wanted in-place updates I'd use a mutator method.
23:19
<@McMartin>
The problem is that "a = a + [1]" is almost always wrong
23:20
<@McMartin>
Since it is an O(n) operation
23:20
<@McMartin>
Followed by a garbage collection of that thing you copied
23:20
< ToxicFrog>
Yes.
23:20
< ToxicFrog>
My argument is that += should also be almost always wrong, rather than behaving surprisingly different from +
23:20
<@McMartin>
Ah, I see
23:21
<@McMartin>
The problem is that + is usable correctly
23:21
<@McMartin>
Like, say, b = a + [1]
23:21
<@McMartin>
This does something useful
23:21
< ToxicFrog>
Hmm.
23:23
<@McMartin>
It seems like if you aren't going to change +='s semantics you should disallow it, becuase making it + and then = here is always wrong.
23:23
<@McMartin>
Unless a is already aliased, I guess
23:33
< gnolam>
McMartin: "Secretly Quadratic" would make a good band name.
23:35
<@McMartin>
Duly noted
23:37 AnnoDomini [annodomini@D553D1.41311B.3D1443.F692F4] has quit [[NS] Quit: leaving]
23:56 shade_of_cpux is now known as cpux
--- Log closed Tue Mar 29 00:00:33 2011
code logs -> 2011 -> Mon, 28 Mar 2011< code.20110327.log - code.20110329.log >