code logs -> 2013 -> Mon, 27 May 2013< code.20130526.log - code.20130528.log >
--- Log opened Mon May 27 00:00:04 2013
00:04 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
00:04 Reiv [NSwebIRC@Nightstar-95746c1f.kinect.net.nz] has joined #code
00:04 mode/#code [+o Reiv] by ChanServ
00:09 * TheWatcher stabs people who take open source projects, modify and add to them, release the binaries but no the source because "the source is too messy and I don't have time to clean it up right now"
00:10
<@TheWatcher>
(where "right now" has been "at any point in the last three years")
00:10
< RichyB>
That shit's part of what the GPL is for.
00:10
<@TheWatcher>
It is GPLed
00:11
< RichyB>
That shit's not legal.
00:11
< RichyB>
Probably no one will care.
00:11
<@TheWatcher>
Pretty much, yes.
00:11
< [R]>
:/
00:12
< [R]>
Name and shame son.
00:12
<&ToxicFrog>
^
00:13
<@TheWatcher>
HAsn't made any difference
00:13
<@TheWatcher>
People have known for years
00:13
< RichyB>
Assume that the modifications genuinely *are* bunk, probably full of fucky segfaults; take the idea and do it properly.
00:13
<&ToxicFrog>
I'd still like to know who
00:13
<@TheWatcher>
(but for the record: Nameless Voice, and his thief scripts)
00:13
<&McMartin>
I actually did that once, though I maintained compliance by offering malicious compliance to those who contact me by email
00:14
<&McMartin>
"Oh, did you want a patch that could actually be applied to trunk? Then WAIT FOR ME TO FINISH WITH IT.")
00:14
<&McMartin>
Of course, that was also a matter of more like two weeks.
00:16
<@TheWatcher>
I used to care from the point of view of "these do things nobody else has worked out how to do yet", but I've since worked it out for myself and documented that shit, and released the code. Now it's more "there are long standing bugs and dificiencies in this that you still haven't fixed, I'd rather not have to reimplement these myself, but I will do if needed"
00:17
< RichyB>
McMartin: nothing wrong with replying with the patch that you actually have, i.e. one against a given VCS revision or stable tarball.
00:18
<&McMartin>
If I had that I'd have had it out quicker
00:18
<&McMartin>
I delivered an entire source replacement tarball instead.
00:18
< RichyB>
Also fine but annoying. :)
00:18
<&McMartin>
The changes in question were extremely drastic (and not my own; I was the project maintainer)
00:18
< RichyB>
The GPL's intent is that you share alike derivatives of precisely the code that you took, not that you share alike with the project's HEAD.
00:18
<&McMartin>
Right
00:18
<&McMartin>
That is not, however, the expectation~
00:19
<&McMartin>
That's why I explicitly tagged it as malicious compliance. ;-)
00:19
<&McMartin>
This was also in the days before Dropbox, so it actually was something I couldn't just toss online somewhere offhandedly
00:19
<&McMartin>
Or that *he* couldn't.
00:20
<&McMartin>
This was also in the pre-subversion days where "given VCS revision" is not a well-defined term.
00:21
< RichyB>
Ewww icky icky icky.
00:21
<&McMartin>
Exactly
00:21
<&McMartin>
Thus: "give me a couple weeks to sort this out into something you actually use. You are legally permitted to force my hand but if you do I assure you that you will regret it"
00:22
<&McMartin>
Then development moved on, the binary mirror went away, and a few years later I dropped the source mirror as permitted, so it's lost and, honestly, good riddance
00:29
<@TheWatcher>
(Besides, I know I'm something of an oddity, but I generally believe that if the source isn't good enough to make public, the binary isn't good enough either)
00:31
< RichyB>
TheWatcher: that's where I was going with "assume it's bunk & full of fucky segfaults anyway".
00:31
<&McMartin>
TheWatcher: Well, there's a difference between "isn't good enough to make public" and "if you make it public, it won't actually be in a usable form"
00:32
<&McMartin>
I'm pretty onboard with the phased rollout of the Inform 7 source code, for instance, since the first step of that was releasing *the compiler for the language it was written in*
00:38
<@TheWatcher>
RichyB: they work, in most situations, except when they don't, especially in NewDark.
00:38 You're now known as TheWatcher[t-2]
00:46 You're now known as TheWatcher[zZzZ]
00:51
< RichyB>
I'm starting to wonder if maybe there's a use-case for a proper flaming-shithead data aggregation system.
00:53
< RichyB>
I'm thinking that it might be really nice if there were some creepy automated way of identifying that "that person over there once tweeted 'kill all the fuckin' <insert racial epithet of choice here>', don't ever interact with them."
00:53
< RichyB>
A genuine use-case for Google Glass, perhaps~
00:53
<@Tamber>
Hehehe
00:54
<@Tamber>
And a way of adding that tag if they ever started a sentence with "Now, I'm not racist, but..."? :p
00:55
< RichyB>
Don't do that, because I do that shit on purpose sometimes for giggles.
00:56
< RichyB>
"I'm not racist, but (onlookers stare) it's close to lunchtime and we're all quite hungry, shall we go to the market?"
00:56
< RichyB>
"I'm not trying to be race-ist but we are playing MarioKart here."
00:56
<@froztbyte>
:D
00:56
<@Reiv>
Hey McMartin
00:56
<@Reiv>
What ever happened to your ultralight graphics engine?
00:58 * froztbyte spots a handful of m4 folders in this ocaml-* tree
00:58 * froztbyte expects lulz will happen soon
01:41 Turaiel[Offline] is now known as Turaiel
02:14 himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code
02:14 mode/#code [+o himi] by ChanServ
02:55 Kindamoody[zZz] is now known as Kindamoody
03:01
<@gnolam>
Tamber: I know someone who starts sentences with "Now, I'm a racist but..." just to fuck with people's heads.
03:08 Turaiel is now known as TurShower
03:16
<@Tamber>
:)
03:43 TurShower is now known as Turaiel
03:51 VirusJTG [VirusJTG@2B12AA.572255.206A2A.901581] has quit [[NS] Quit: Program Shutting down]
03:52
< Syka>
Tamber: except node is awful
03:52 * Syka time delay of 5 hours \o/
03:54
< Syka>
yay my jenkins works properly
04:18
<@Alek>
leeroy?
04:21
< Syka>
no, CI :U
04:21
< Syka>
my leeroy jenkins instance keeps exploding
04:49 RichyB [richardb@37647E.0E56C6.CF639B.ACD1C1] has quit [Connection closed]
04:52 Kindamoody is now known as Kindamoody|nap
05:45 Reiv [NSwebIRC@Nightstar-95746c1f.kinect.net.nz] has quit [Ping timeout: 121 seconds]
06:22 * Vornicus tries to remember the finer points of working in C++, like for instance declaring and (eventually) allocating an array of pointers.
06:26
<~Vornicus>
derp, use a vector, there is a place I need it to be one.
06:33 Derakon is now known as Derakon[AFK]
06:42 Kindamoody|nap is now known as Kindamoody
06:43 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.]
06:50 * Vornicus has a think at what things need to be explicitly destroyed
07:28 Turaiel is now known as Turaiel[Offline]
07:34 himi [fow035@D741F1.243F35.CADC30.81D435] has quit [Ping timeout: 121 seconds]
08:25 AverageJoe [evil1@Nightstar-4b668a07.ph.cox.net] has joined #code
09:30 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
09:30 mode/#code [+o himi] by ChanServ
09:55 You're now known as TheWatcher
10:35
<&McMartin>
This is where boost::shared_ptr comes in handy
10:35
<&McMartin>
Since while vectors of pointers don't own their contents, vectors of shared_ptrs own exactly those members that have not escaped
10:37
<~Vornicus>
After a detailed discussion in another channel I actually now know exactly when and where I need to delete stuff.
10:37
<&McMartin>
Be sure to document this
10:38
<~Vornicus>
Of course.
10:39 * McMartin has been trying for Monocle to get the outer API to look just like individual object creation and destruction with everything on the stack or as singletons.
10:39 AverageJoe [evil1@Nightstar-4b668a07.ph.cox.net] has quit [[NS] Quit: Leaving]
10:39
<~Vornicus>
Earlier the real trouble was I had something like four models of when I need to manually control object creation and deletion.
10:40
<~Vornicus>
I have now learned that of the four models, the one where I do the least -- barring actual gc -- is the one that was correct.
10:47
<~Vornicus>
Now I've got another problem, which is one I vaguely remember crashing into a few times long ago: two classes that refer to each other in their method signatures. I seem to recall some special trick I needed to do to get it to work.
10:50
<&McMartin>
Forward declaration
10:50
<&McMartin>
The one that is defined for real second (call it B) gets declared before the other one (class A)
10:50
<&McMartin>
with
10:50
<&McMartin>
class B;
10:50
<&McMartin>
class A { ... };
10:51
<&McMartin>
class B { ... };
10:51
<~Vornicus>
Aha, that was it, thank you
10:52 Kindamoody is now known as Kindamoody|out
11:11 * Vornicus now faces the true most difficult problem in computer science: naming.
11:14
<~Vornicus>
Okay, building a skip list. one of the pieces of information I must often obtain is a list of nodes such that nodes[n] is before a particular fencepost, nodes[n].successors[n] is another node after that fencepost.
11:16
<~Vornicus>
(skip list setup is also such that nodes[n].successors[n] is the first such node that itself has a successors[n])
11:21
<~Vornicus>
...skyline.
11:32
<@TheWatcher>
Whee, nested classes time.
11:33
<~Vornicus>
Wheeeee
11:59
<&McMartin>
Classes are basically namespaces, so whatever >_>
12:11 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
12:37
<&McMartin>
Completely inappropriate soundtracks for Dapper Delver: HYPERDRV.XM
12:49
<@Azash>
I'm henceforth going to use this to explain NOP slides http://i.imgur.com/vQ1KEcW.gif
13:04
<@TheWatcher>
McM: ... >.<
13:05
<&McMartin>
pingus-8.it is unusually well-suited, though.
13:14 * McMartin also opens up HYPERDRV.XM into Schism Tracker and boggles at the panning commands.
13:25 * McMartin rocks out to hyper.mod
13:45
<&ToxicFrog>
HYPERDRV.XM is, what, the UQM hyper music?
13:46
<@TheWatcher>
http://modarchive.org/index.php?request=view_by_moduleid&query=47347
13:48
<&ToxicFrog>
Can't see from here.
13:49
<@TheWatcher>
It's a mod I linked McM to ages ago as good muic to play Sable to
13:49
<&ToxicFrog>
Aah
13:51
<&McMartin>
hyper.mod is however the UQM hyper music
13:51 * ToxicFrog makes a note to feast on modarchive.org later
13:52
<&ToxicFrog>
...from home, because it's considered deeply impolite to use the corp network for that kind of thing
13:52
<&McMartin>
Heh
13:52 * McMartin is currently torrenting a half gig of .MOD/.It instrument packs
13:53
<&McMartin>
If you played the "full" version of Sable you've heard it
13:53
<&ToxicFrog>
We can't use bittorrent either ever since that time someone accidentally DoS'd all the trackers for some linux release~
13:54
<&McMartin>
Teehee~
13:54
<&McMartin>
(Today is a holiday in the US)
13:54
<&ToxicFrog>
(aah, that was last monday for us)
13:55
<&McMartin>
Also used in the "full" version of Sable is the incomprehensible hippos.mod, which was deployed in the expectation that people would not stick around on the main menu screen long enough to notice that something had gone terribly wrong
14:17 VirusJTG [VirusJTG@2B12AA.572255.206A2A.901581] has joined #code
14:56
<@sshine>
what are your favourite surreal number?
14:56
<@sshine>
s
14:57
<@gnolam>
Ah, Scirocco's Hyperdrive. A true classic!
15:16
<&McMartin>
I hope you like Orchestra hits!
15:25 VirusJTG_ [VirusJTG@2B12AA.572255.206A2A.901581] has joined #code
15:27 VirusJTG [VirusJTG@2B12AA.572255.206A2A.901581] has quit [Ping timeout: 121 seconds]
15:28
<@sshine>
I never thought about this until two days ago: you can perform a tail-recursive traversal of a tree!
15:30
<@sshine>
using continuations, you can move all your stack-allocation to the heap. I wonder then, is it always so that an optimizing compiler would put the thunks (that are to traverse the remaining branches of a tree whenever choosing one) on the heap?
15:31
<@sshine>
I read in an introductory F# book that "the continuations-based version handles 30% larger inputs" and I can't help but wonder if this is not just a property of the compiler's tendency towards limiting the stack memory a little more?
15:34 VirusJTG_ [VirusJTG@2B12AA.572255.206A2A.901581] has quit [[NS] Quit: Program Shutting down]
15:34
<@sshine>
here, e.g., is a function that counts the number of nodes in a tree:
15:34
<@sshine>
fun countAC t a c =
15:34
<@sshine>
case t of
15:34
<@sshine>
Leaf => c a
15:34
<@sshine>
| Node (tl, _, tr) => countAC tl (a+1) (fn va => countAC tr va c)
15:54
<&McMartin>
Ugh
15:54
<&McMartin>
I feel I should opine on this
15:54
<&McMartin>
I haven't had enough sleep to do so intelligently
15:55
<&McMartin>
The best I can manage is "putting stack frames on the heap is strictly stronger than stack discipline, but it usually carries a cost"
15:55
<&McMartin>
But there are tricks to map between the two; Gambit's generated C code is nuts
15:56 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
16:51 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
17:02 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
17:05 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
17:05 mode/#code [+o himi] by ChanServ
17:23 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
17:35 VirusJTG [VirusJTG@2B12AA.572255.206A2A.901581] has joined #code
17:36 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
17:36 mode/#code [+o himi] by ChanServ
17:49 VirusJTG [VirusJTG@2B12AA.572255.206A2A.901581] has quit [[NS] Quit: Program Shutting down]
17:56 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
18:01
<@froztbyte>
McMartin: usually C code compiles to objects files, then the linker has at it
18:01
<@froztbyte>
if you get nuts out, you may want to inspect your toolchain
18:28 Turaiel[Offline] is now known as Turaiel
19:05 Kindamoody|out is now known as Kindamoody
19:13 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has joined #code
19:13 mode/#code [+o celticminstrel] by ChanServ
19:25 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
19:25 mode/#code [+qo Vornicus Vornicus] by ChanServ
19:25 Derakon[AFK] is now known as Derakon
19:43 Kindamoody is now known as Kindamoody[zZz]
19:43
<@sshine>
McMartin, that sounds interesting because I didn't completely understand what you said. :)
19:45
<&ToxicFrog>
sshine: putting stuff you would normally put on the stack on the heap instead is strictly more powerful (i.e. there is nothing you can do with the stack that you can't do with the heap, but the converse is not true), but you generally pay for it elsewhere (e.g. in performance - stack allocation is stupid cheap on most architectures)
19:46
<&ToxicFrog>
But a Sufficiently Smart Compiler can translate heap-using code into stack-using code or vice versa.
19:46
<&ToxicFrog>
Gambit here is a Scheme to C compiler.
19:46
<~Vornicus>
Hooray, non-deterministic data structures
19:59
<@celticminstrel>
...I just tried to use tab-complete in my text editor. <_<
19:59
<&ToxicFrog>
That works in mine >.>
20:00
<@celticminstrel>
For JavaScript code?
20:00
<@celticminstrel>
Also, completion is generally not tab in an IDE.
20:00
<~Vornicus>
Sure. THere's only one situation where javascript generates names that you don't see, and if you're doing it you're doing it wrong.
20:00
<~Vornicus>
And it certainly can be.
20:00
<@celticminstrel>
I think I've gotten used to Firefox's tab-complete in the console. >_>
20:01
<@celticminstrel>
What's this one situation?
20:01
<&ToxicFrog>
celticminstrel: for pretty much anything, it uses syntax-aware completion for languages it understands and fuzzy expansion for languages it doesn't.
20:01 cpux|2 [cpux@Nightstar-98762b0f.dyn.optonline.net] has quit [[NS] Quit: Well, most things get better when I kick them!]
20:01
<&ToxicFrog>
And yes, I have it bound to tab, because I basically never want text immediately followed by an indent.
20:02
<@celticminstrel>
Ah, I see.
20:02
<~Vornicus>
Since JS's objects are also dictionaries, you can do this: foo = "bar"; baz[foo] = function { ... }; baz.bar();
20:02
<@celticminstrel>
The things that would be tab-completed are defined in a different file though. Not sure if that's relevant.
20:03
<~Vornicus>
Protip: don't do this.
20:03
<@celticminstrel>
I'm doing that sort of thing, but I don't think I'm doing it to assign functions.
20:03
<&ToxicFrog>
celticminstrel: the scope of the fuzzy expander is "all open files", IIRC
20:03
<@celticminstrel>
Fun.
20:03
<@celticminstrel>
Maybe I should switch programs for JS. :P
20:03
<&ToxicFrog>
But it won't go and load extra files to complete things for languages it doesn't understand. Not sure about ones it does.
20:04
<@celticminstrel>
Perhaps see what Dashcode is like.
20:05
<&ToxicFrog>
Oh wait no, sorry, normally autocomplete is only for the current file. Plugins (including language support) can override this as desired, and I have a plugin installed that makes it default to all open files.
20:06 * celticminstrel uses TextWrangler at the moment.
20:13 * ToxicFrog has been using Sublime Text 2
20:31
<@TheWatcher>
For some reason I appear to have developed the habit of using { /* fnord */ } for empty blocks. I'm not entirely sure why.
20:31
<&Derakon>
Why do you even have empty blocks?
20:32
<@celticminstrel>
Well, if you have a while/for-loop whose action is contained entirely within the parentheses, that could be one reason...
20:34
<@TheWatcher>
Derakon: things like c++ constructors with initialisation lists but no body
20:34
<@celticminstrel>
Ah, better reason.
20:35
<@celticminstrel>
One that's actually a common occurrence.
20:35
<&ToxicFrog>
CL in for review removes 1100 lines of code and four classes. Yesssssssssssssss
20:35
<@celticminstrel>
Especially since, in this situation, you can't just replace it with a semicolon.
20:39
<&Derakon>
TW: ahh, righto.
20:40 * ToxicFrog pushes the big glowing APPROVE button
20:40
<&Derakon>
TF: heh.
20:40
<&Derakon>
I like how making the codebase smaller is just unequivocably a good thing~
20:41
<&ToxicFrog>
Best part is, it's fixit week, which means I get to completely ignore feature/bugfix requests in favour of cleaning up the codebase
20:41
<&ToxicFrog>
With my
20:41
<&ToxicFrog>
CHAINSAW of NATURAL SELECTION
20:42
<&Derakon>
Man, memes.
20:42
<&Derakon>
Queen of Wands hasn't updated in, what, 15 years?
20:42
<~Vornicus>
Not nearly that long
20:42
<~Vornicus>
8 years.
20:43
<&Derakon>
I was thinking of the first iteration.
20:43 * TheWatcher ponders
20:43
<~Vornicus>
("Originally aired 2/23/05". 8 years, 3 months, 4 days)
20:43
<&Derakon>
Okay then.
20:45
<@TheWatcher>
One day I shall constuct something like one of these, USB connected, for initiating compiles, big commits, and so forth: http://www.ukrocketman.com/rocketry/controller.shtml
20:47
<&ToxicFrog>
I kind of want to get those before the first time I'm on release control rotation.
20:47 * TheWatcher ponders
20:48
<@TheWatcher>
... I have a RasPi and a Piface board, I could actually do it with that
20:49 * TheWatcher blinks, goes to see where he can get covered, illuminated toggle switches from
20:52
<@froztbyte>
RS
20:52
<@froztbyte>
(they're global)
20:53
<@froztbyte>
(and they have a crapton of stuff)
20:53
<@TheWatcher>
Yeah, looking there now
20:53
<@froztbyte>
http://za.rs-online.com/web/p/toggle-switches/0419845/
20:53
<@TheWatcher>
(I even remember my account)
20:53
<@froztbyte>
http://za.rs-online.com/web/p/toggle-switches/0419849/
20:53
<@froztbyte>
green too
20:54
<@froztbyte>
and then a couple of smaller/thinner ones of the http://za.rs-online.com/web/p/toggle-switches/4537966/ sort
20:54
<@gnolam>
Oh, building one of those would be easy.
20:55
<@gnolam>
In fact, I think I have enough parts to make one /now/. >_>
20:55
<@froztbyte>
the toggle switch, or TW's original link
20:55
<@froztbyte>
?*
20:55
<@gnolam>
TW's original link.
20:55
<@froztbyte>
ah
20:56
<@gnolam>
Must... resist...
20:56
<@froztbyte>
nope
20:56
<@froztbyte>
make, nao.
20:56
<@TheWatcher>
Give in to it
20:56 Turaiel is now known as Turaiel[Offline]
20:56
<@gnolam>
froztbyte: also, you want to add "safety" to your keywords when searching for toggle switches. You need the cover to make it look proper.
20:57
<@froztbyte>
I'm discussing with someone else now that we build something like that for deploys
20:57
<@froztbyte>
gnolam: yeah, I just threw 'toggle illuminated' in
20:57
<@froztbyte>
I expect you might actually want the illumination seperately
20:57
<@froztbyte>
since that's just an LED+resistor you need to run
21:03
<@TheWatcher>
Hmm. http://www.amazon.co.uk/Racing-Illuminated-Toggle-Switch-Cover/dp/B00AZI130S/ would be what I'm after. Bit steep though
21:04
<@gnolam>
Also, go for the regular unilluminated ones.
21:04
<@gnolam>
I bought one exactly like the one you linked (or similar enough that I can't see a difference), and it just doesn't look as cool as the regular ones.
21:07
<@TheWatcher>
Huh, really? Weird.
21:09
<@TheWatcher>
Holycrap
21:09
<@TheWatcher>
http://uk.rs-online.com/web/p/toggle-switch-guards/0294319/ £15.40 each
21:09
<@gnolam>
It just looks... cheaper. More toyish and plasticky.
21:10
<@gnolam>
TheWatcher: that's just the cover itself minus the switch, right?
21:10
<@TheWatcher>
Yeah
21:15
<@TheWatcher>
http://www.ebay.co.uk/itm/Aircraft-Style-Toggle-Switch-Flip-Up-Cover-RED-/110753 277383 - £2.50 instead >.>
21:27 * Vornicus writes C++, which is still weird and alien after all these years, but it's coming back to him and nicely.
21:45
<@TheWatcher>
Gmm, I could get one of these, https://www.modmypi.com/raspberry-pi-expansion-boards/raspberry-pi-blue-and-whit e-16x2-LCD-kit replace the puch buttons with toggles, and maybe rig up other stuff off the piface, hmmm
--- Log opened Mon May 27 22:20:41 2013
22:20 TheWatcher [chris@Nightstar-3762b576.co.uk] has joined #code
22:20 Irssi: #code: Total of 36 nicks [18 ops, 0 halfops, 0 voices, 18 normal]
22:20 mode/#code [+o TheWatcher] by ChanServ
22:21 Irssi: Join to #code was synced in 41 secs
22:31 Reiv [NSwebIRC@Nightstar-95746c1f.kinect.net.nz] has joined #code
22:31 mode/#code [+o Reiv] by ChanServ
22:38 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
23:03 * McMartin returns, somewhat refreshed
23:04
<&McMartin>
So, the Gambit-C compiler
23:04
<&McMartin>
Before I go on,I need to define two terms
23:05
<&McMartin>
(1) "Tail call" - this is like "tail recursion" except it isn't necessarily recursive. When messing around with continuation-passing style and such you have a lot of these floating around. Note that C cannot do the tail call optimization, but compiled Gambit can. It also has full continuation support, which C cannot even begin to contemplate directly
23:06
<&McMartin>
(2) "Basic block" - this is basically a chunk of straight-line code where each statement not at the end has only its successor as its successor and each statement not at the beginning has only its predecessor as its predecessor. ; so, { A; if (B) { C; } else { D; } E; } has four basic blocks, AB, C, D, and E.
23:07
<&McMartin>
AB forms a basic block because you only get to B by finishing A, but DE does not because you could also enter E by finishing C.
23:08
<&McMartin>
As far as I can tell from examining the code, a compiled Scheme program in Gambit is a switch() statement with one entry for every basic block in the program, which updates the various call stacks (which all live on the heap), and which updates the current basic block...
23:08
<&McMartin>
... wrapped in a while(ProgramNotOver)
23:08
<&McMartin>
(The code is kind of opaque, but that's kinda what it looked like and it also Would Manage To Pull Off The Requirements)
23:21 RichyB [richardb@Nightstar-86656b6c.cable.virginmedia.com] has joined #code
23:47
<@sshine>
hi McMartin. thanks a lot for the writeup! I did know what TCs and TCO were.
23:47
<@sshine>
ToxicFrog, thanks for your input also. I had the same impression that stack/heap were interchangeable in the compiler, but I wasn't sure what *is* sufficiently smart. :)
23:51
<&McMartin>
My rule of thumb is that if I'm using closures to actually carry state with them (that is, not just as more syntactically convenient function pointers), I'm doing something that breaks stack discipline.
23:52
<&McMartin>
For continuations, there's a notion of "escape continuations" in some languages where an Escape Continuation is one where you guarantee that you will only ever call the continuation while the continuation definition is above you on your call-stack (that is, you're going to use it like an exception, not like co-routines or like a setjmp/longjmp sort of deal). Those also don't break stack discipline.
23:52
<&McMartin>
Color out of those lines though, and AFAIK turning it into stack-based code is actually *theoretically* impossible without rearchitecting the runtime and your relationship to it.
23:53
<&McMartin>
At which point you end up back inside the lines, just with narrower definitions of which things are, in fact, part of stack frames.
23:55
<&McMartin>
(The stuff that the Lisps and JavaScript end up with I'm used to hearing called an "environment tree")
23:56
<&McMartin>
(Oddly enough, I've never actually seen an explanation of this with an ML language, but it would make sense for it to do that too)
--- Log closed Tue May 28 00:00:35 2013
code logs -> 2013 -> Mon, 27 May 2013< code.20130526.log - code.20130528.log >

[ Latest log file ]