May 24, 2014
On Saturday, 24 May 2014 at 00:36:31 UTC, John wrote:
> I wish there was more time available.

My poor throat was getting dry near the end anyway...

But I was kinda worried that I was getting too negative at times. My theme was supposed to be encouraging, go ahead and try it, and instead I started complaining about triple faults and ugly code. But oh well, the agony of defeat contributes to the thrill of victory after you finally make it work!

> And btw, you were looking great too! :)

thanks! Part of that was that I wanted to be deliberately counter-culture. I almost never see anyone in these tech videos wearing a tie, and while in the facebook building I think I was the only one there too.

(the irony, a conservative business suit is my anti-authoritarian apparel lolololol)


Of course, that's not the /only/ reason I wore it, but it was a nice bonus.
May 24, 2014
Another thing I said but want to expand upon now: near the end, I started blabbing about stack frame setup in assembly, something I actually learned from C. (When I was writing assembly a bit more seriously - always still just a hobbyist btw - I would just use the registers, push/pop, and sometimes a global scratch buffer inside functions for computations. Actually, that worked really well, ideally compilers want to do that too with efficient register allocation, but the stack frame is nevertheless a useful concept to know.)

But anyway, the key point there isn't one specific technique, it is rather that digging a bit deeper into a new language can teach you new ideas in your existing languages. Of course, most languages can do everything any others can do fairly easily (and you can always do the x86 emulator and jit your other stuff to it if not :P), but you don't always /consider/ doing something else until a new language puts it in your face.

C got me thinking about stack frames in assembly. Assembly, in turn, helps understand just what those C constructs do so you can get a bit more out of them, e.g. a switch being a jump table makes sense when you think about the code it generates as well as other rationales in the standards like Scott Meyers talked about - do it, iff there's zero runtime cost. With that idea and some knowledge of the generated code, what previously looked like a set of contradictory, arbitrary rules now fit together and make sense. (You might still disagree with them, but at least now that disagreement will have some common ground of understanding to talk about instead of you thinking the authors are just idiots.)

Similarly, C++ was my introduction to virtual functions. Before playing with C++, I rarely used function pointers at all in C. They were always there; it was always possible to do that kind of generic indirection interface stuff in C, but until using C++, I just never even considered doing it.



Don's talk was fascinating to me on this same vein: slices are extremely common in D and super super useful. True, you can do the same kind of thing in C or C++ using a pointer and length combo (and it isn't even all that uncommon), and with a little care, you can handle memory ownership without the GC's help too (BTW I stand by what I said there about liking the gc. It isn't always right, but it really is so nice to have that standard owner, to not worry so much about things like double free bugs. It doesn't mean you can stop thinking entirely about ownership since the data may be stomped - immutable gc objects more or less do though lol - but it does really simplify a lot of things).

But anyway, I digress again, the point is yes you can do slices in C++, but just like doing vtables in C, is that a paradigm you'd have seriously considered if you didn't see it done so easily in D?

Isn't the ease of use D offers still a nice advantage over borrowing the concept in C++, just like how C++'s virtual keyword is a nice addition to doign it in C?


I say yes. So bottom line, the new languages can teach us stuff about our old languages and then if we really like idea, the new language can be compelling anyway just because it is that much easier to use.

So to sum up, I think it is a nice analogy to say D's slices wrt C++ could be argued to be like C++'s virtual functions wrt C.
May 24, 2014
On Saturday, 24 May 2014 at 20:11:22 UTC, Adam D. Ruppe wrote:

Were there actual slides? I mean that sheet of paper was an emergency right?
May 24, 2014
On Saturday, 24 May 2014 at 20:46:30 UTC, sclytrack wrote:
> Were there actual slides?

Nope, I never actually got around to creating any.

I just had an outline on my desktop of stuff I was thinking about creating, but just didn't finish it. The paper was my recreation of that outline from memory.



Here's the outline.txt stuff I didn't mention on the paper btw:

* Replacing functions with the linker

* Reflection: Using RTInfo's lint to enforce ownership rules (e.g. make it a compile time error to define a struct with a mutable slice. This has a few pros and a lot of cons.)

* Doing a custom calling convention with naked functions and mixins

* Talk about ABI details and the implementation of scope statements (e.g. scope(exit). I briefly talked about it being lowered to finally {} but didn't go into the asm like I was considering

* The -betterC switch and what I want more from it.



Otherwise, my memory was pretty decent for remembering what I had in mind! Then my random on-the-spot digressions padded out the time.
May 24, 2014
On Saturday, 24 May 2014 at 20:53:18 UTC, Adam D. Ruppe wrote:
> On Saturday, 24 May 2014 at 20:46:30 UTC, sclytrack wrote:
>> Were there actual slides?
>
> Nope, I never actually got around to creating any.


Okay, busy guy.

>
> I just had an outline on my desktop of stuff I was thinking about creating, but just didn't finish it. The paper was my recreation of that outline from memory.
>
>
>
> Here's the outline.txt stuff I didn't mention on the paper btw:
>
> * Replacing functions with the linker
>
> * Reflection: Using RTInfo's lint to enforce ownership rules (e.g. make it a compile time error to define a struct with a mutable slice. This has a few pros and a lot of cons.)
>
> * Doing a custom calling convention with naked functions and mixins
>
> * Talk about ABI details and the implementation of scope statements (e.g. scope(exit). I briefly talked about it being lowered to finally {} but didn't go into the asm like I was considering
>
> * The -betterC switch and what I want more from it.
>
>
>
> Otherwise, my memory was pretty decent for remembering what I had in mind! Then my random on-the-spot digressions padded out the time.

I would have preferred slides though. I'm not so good at listening. The visual impact helps ME better at remembering. Yeah, your memory is fine.


:-)

May 24, 2014
On 5/24/2014 3:49 PM, Adam D. Ruppe wrote:
>
> thanks! Part of that was that I wanted to be deliberately
> counter-culture. I almost never see anyone in these tech videos wearing
> a tie, and while in the facebook building I think I was the only one
> there too.
>
> (the irony, a conservative business suit is my anti-authoritarian
> apparel lolololol)
>

It seems a very "Talking Heads" irony, I like it :)

May 24, 2014
On 5/24/2014 3:41 PM, Adam D. Ruppe wrote:
>
> And good old mode 13h!
>

Real programmers used Mode X!

(I mainly used 13h though ;) )

May 24, 2014
On Saturday, 24 May 2014 at 21:01:13 UTC, sclytrack wrote:
> I would have preferred slides though. I'm not so good at listening. The visual impact helps ME better at remembering.

Yea, they were on my todo list, I was just too lazy and/or distracted to do it. But I'm not sure they would have been really informational anyway; I think a talk is a terrible way to deliver information and one of the reasons I was stalled/procrastinating on this is I didn't have a good solution to that problem. If I want to deliver info, I'd prefer to do it in writing such as emails, blogs or traditional code documentation.

(The best idea I had to work around this deficiency was to script it ahead of time with supporting photographs or occasional data tables to give you an associated image to remember the concept, and post the script along with any supporting material to the 'net later. But I didn't know how many words would fit in an hour and writing a script is a pain anyway so my laziness kicked in.)

But ultimately, I decided my primary goal wasn't to deliver information but to instead sell a feeling so you might be stirred to try some new things on your own.
May 24, 2014
On Saturday, 24 May 2014 at 23:47:58 UTC, Nick Sabalausky wrote:
> Real programmers used Mode X!

Yea! ...I never really got into it tho and kept going back to 13 for the plain simplicity.
May 25, 2014
On 5/24/2014 3:49 PM, Adam D. Ruppe wrote:
>
> thanks! Part of that was that I wanted to be deliberately
> counter-culture. I almost never see anyone in these tech videos wearing
> a tie, and while in the facebook building I think I was the only one
> there too.
>
> (the irony, a conservative business suit is my anti-authoritarian
> apparel lolololol)
>

My favorite way to be counter-culture is to use slang terms in unexpected contexts. Like using a meme to make a point on a very technical topic. Or more commonly, well gee, I think deadpan delivery of anachronistic slang is just swell, dawg. Bonus pizzoints for mixing all those swingin' tubular eras...I really can dig that (Again, deadpan delivery be paramount). Or concocting me up some pluralities of formalism levels. Similarly, mixed cussing is golly good f**king fun.

Word.

(I really do like to deliberately use outdated slang, and the more deadpan the better.)