code logs -> 2013 -> Wed, 25 Sep 2013< code.20130924.log - code.20130926.log >
--- Log opened Wed Sep 25 00:00:23 2013
00:35 You're now known as TheWatcher[T-2]
00:47 Ogredude [quassel@NetworkAdministrator.Nightstar.Net] has quit [[NS] Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
00:47 Ogredude [quassel@Nightstar-749a261c.projectzenonline.com] has joined #code
00:49 You're now known as TheWatcher[zZzZ]
01:19 Turaiel[Offline] is now known as Turaiel
01:37 Turaiel is now known as Turaiel[Offline]
01:43 Derakon[AFK] is now known as Derakon
01:55 Reiv [NSwebIRC@Nightstar-95746c1f.kinect.net.nz] has quit [Ping timeout: 121 seconds]
02:02 NeoGeo64 [trizzo@Nightstar-a940610b.client.mchsi.com] has joined #code
02:03 Reiv [NSwebIRC@Nightstar-95746c1f.kinect.net.nz] has joined #code
02:03 mode/#code [+o Reiv] by ChanServ
02:06 NeoGeo64 [trizzo@Nightstar-a940610b.client.mchsi.com] has left #code []
02:23 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
02:52 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
02:52 mode/#code [+qo Vornicus Vornicus] by ChanServ
03:00 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
03:51 Turaiel[Offline] is now known as Turaiel
04:54 Derakon is now known as Derakon[AFK]
05:19 Turaiel is now known as Turaiel[Offline]
05:28 Kindamoody[zZz] is now known as Kindamoody
06:00 ErikMesoy|sleep is now known as ErikMesoy
06:19 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has quit [[NS] Quit: Gone.]
06:23 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has joined #code
07:00 Kindamoody is now known as Kindamoody|out
07:02 celticminstrel is now known as celmin|sleep
07:44 Xon [Xon@9C034E.A7474E.446F1A.DEA144] has quit [Client closed the connection]
07:45 Xon [Xon@9C034E.A7474E.446F1A.DEA144] has joined #code
09:53 You're now known as TheWatcher
12:00 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
12:27
<@gnolam>
And the prize for the most impressive use of inverse perspective projection goes to: https://www.youtube.com/watch?v=lX6JcybgDFo
12:32
<@gnolam>
No post production effects. Captured in camera.
13:04 celmin|sleep is now known as celticminstrel
13:20
<@froztbyte>
hah
13:20
<@froztbyte>
fantastic
13:25 * AnnoDomini refactors for 85+% code reduction in one place. :D
13:30
<~Vornicus>
gnolam: fuckin' magic
13:31
< Syka>
fuckin boxes
13:32 * Syka forgets where she heard that from
13:32
< Syka>
eh i cant't find it
13:34 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [Client closed the connection]
14:08 * iospace facepalms
14:08
<@iospace>
http://sourceforge.net/p/edk2/code/HEAD/tree/trunk/edk2/MdeModulePkg/Application /HelloWorld/
14:15
< AnnoDomini>
Why are you facepalming?
14:26 himi-cat [qicruser@Nightstar-5d05bada.internode.on.net] has joined #code
14:26 mode/#code [+o himi-cat] by ChanServ
15:03 celticminstrel [celticminst@Nightstar-5d0169f9.dsl.bell.ca] has quit [Client closed the connection]
15:03 celticminstrel [celticminst@Nightstar-5d0169f9.dsl.bell.ca] has joined #code
15:03 mode/#code [+o celticminstrel] by ChanServ
16:00 celticminstrel [celticminst@Nightstar-5d0169f9.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
16:30
< AnnoDomini>
admit_to_afterlife();
17:43
<@Tarinaky>
http://thedailywtf.com/Articles/SyncingSunk.aspx
18:42
<&jerith>
TheWatcher: What is CODICIL WINTER HILL?
18:43
<&jerith>
(Apart from a Laundry codename.)
18:43
<@Tarinaky>
http://typicalprogrammer.com/?p=8
18:44
<@froztbyte>
haha
18:44
<@froztbyte>
that tdwtf is lulzy
18:44
<@froztbyte>
I've had to do similar crazy shit
18:45
<@Tarinaky>
"A fragile base class is a class or module that has been in the application for a long time, and any change to it will break the rest of the application."
18:47
<@Tarinaky>
"You‚ll probably find that most established shops already follow some or all of these abject-oriented practices. Fads like agile and ‚extreme‚ programming come and go, but the abject style has stood the test of time. Managers are familiar with abject practices and will expect you to be able to work with their abject-oriented code base."
18:53
<@gnolam>
Tarinaky: heh
18:53
<@gnolam>
Sent that link on to a friend.
18:54
<@gnolam>
Got the reply "Graah, bad memories from CryEngine"
18:54
<@Tarinaky>
I've posted it to my CS department's facebook page. But since we've just had an intake of freshers, and programming lectures don't start till tomorrow, I felt the need to add a PS indicating it was satire.
18:54
<@Tarinaky>
I am unsure whether the notice was patronising... but...
19:01
<@Tarinaky>
"PS: if you are a fresher, this is a piece of satire. Only do this if you want to wind up the advisers"
19:03
<@gnolam>
I mentally added a "like" there.
19:03
<@Tarinaky>
Thanks... I think.
19:04
<@gnolam>
As in "Only do this if you want to wind up like the advisers"
19:04
<@Tarinaky>
Oh.
19:04
<@Tarinaky>
Lol.
19:04
<@Tarinaky>
Yes. It's the punishment for submitting bad code for assessment here.
19:05
<@Tarinaky>
Being cast into Dante's Inferno, to forever debug code written by first years.
19:05
<@Tarinaky>
Your only respite being that advisory is open only between the hours of 2 and 5.
19:06
<@Tarinaky>
Repent sinner, so that the might be saved.
19:07
<@gnolam>
Recurse, sinners, the endp is nigh!
19:07
<@Tamber>
t
19:07 Kindamoody|out is now known as Kindamoody
19:08
<@Tarinaky>
The bizarre imagery in Revelations actually refers to the 'mascot' of some obscure Linux distro that has yet to be released.
19:13
<@gnolam>
I liked Kevin's approach to instilling good programming practices.
19:13
<@Tarinaky>
Which one was that?
19:13
<@gnolam>
He was the professor in my first university programming course. In the first lecture, after emphasizing the value of readable names, he showed us a Scheme snippet with a function that looked something like "(define (f a b c) [...]".
19:14
<@gnolam>
After letting us look at the slide for a while, he turned to us again and went "And if you /ever/ hand in a piece of code like this... /I WILL HUNT YOU DOWN AND I WILL KILL YOU!/"
19:14
<@Tarinaky>
Most of the issues with bad fresher code here tend to be the result of Java being inherently confusing as a teaching language.
19:16
<@Tarinaky>
First lecture, here is a hello world that makes heavy use of public and static which we will use to explain compiler invocation without explaining what either public or static are. Despite the first two or three programs you use making heavy use of global state you should not use globasl state. We will not explain this apparent idiosyncricity until 2 lectures from the end of the first semester. HAVE FUN LOL
19:17
< ErikMesoy>
Global state? Blah.
19:18
< ErikMesoy>
My uni had Java as a teaching language, but admitted up front that "public static void main string args" was mostly boilerplate, and was pretty good from there.
19:18
<@Tarinaky>
Yes. The trouble with boilerplate is it's confusing and gets in the way of teaching.
19:18
< ErikMesoy>
It was at least consistent boilerplate.
19:19
< ErikMesoy>
"This is how you start your program. Explanations later."
19:19
< ErikMesoy>
There was nothing to be confused about unless you insisted on demanding explanations now.
19:20
<@Tarinaky>
Compare this to the shortest technically correct C program that requires ~21 characters and whatever newline your platform requires.
19:20
< ErikMesoy>
C has the stuff with includes and defines, though
19:21
<@Tarinaky>
I find it hard to learn stuff like that without demandint explanations now.
19:22
<@Tarinaky>
Includes are directly comparable to importing.
19:23 * Tarinaky shrugs.
19:24
<@Tarinaky>
Lots of first years still get confused and hand in their first assignment making heavy use of public attributes and static methods.
19:25
<@Tarinaky>
So there's clearly a problem even if you don't agree that the problem is Java.
19:25
< ErikMesoy>
Yes. Lots of first years can't program.
19:26
<@Tarinaky>
I learned Java after I learned C++ so my problems and bad habits have always been specific to that.
19:26
< ErikMesoy>
Remember the FizzBuzz issue?
19:26 * ErikMesoy learned Lisp first, then Java, is now on Python.
19:26 * Tamber learned BASIC first. This might explain a lot.
19:27
<@Tarinaky>
FizzBuzz issue doesn't apply to people who can write fizzbuzz but can only do so because it only requires one monolithic public static void main and no class beyond its container.
19:28
<@Tarinaky>
The FizzBuzz 'problem' relates specifically to people struggling to write 'tiny' programs. Not best practices, languages and styles etc...
19:28 * AnnoDomini learned BASIC first too! From my C64 manual!
19:29
<@Tarinaky>
Well, technically I learned whatever the scripting engine in RPGM2k was. Then the scripting language for Neverwinter Nights (which was close enough to C with some extra OOP stuff).
19:31
< AnnoDomini>
I wonder when a C64 manual will fetch a good price on the antiques market.
19:34
<@Alek>
BASIC, flavors of.
19:34
<@Alek>
add batch.
19:34
<@Alek>
add a dash of assembly. just a sprinkle, really.
19:37
<&ToxicFrog>
Lots of first years can't program, but starting them off on a high-overhead, experimentation-hostile language like C/++ or Java does not help at all.
19:38
<@Tarinaky>
I was not seriously suggesting C as a good modern teaching language.
19:38
< ErikMesoy>
How exactly are you using "experimentation-hostile"?
19:38
<@Tarinaky>
Memory management.
19:39
< AnnoDomini>
There's memory management in Java?
19:39
< ErikMesoy>
The most obvious attribute that comes to mind is that C will do mysterious things and throw obscure errors a lot and demand you hold its hand through memory management and boundary checking and whatnot, Java will catch a lot of that for you.
19:39
< ErikMesoy>
So I'm curious what the grouping here is.
19:40
< ErikMesoy>
AnnoDomini: Mostly no. Java has automatic garbage collection. You can still leak memory by setting up objects in such a way that they don't get collected.
19:40
< AnnoDomini>
I don't think there's a srs language that's actually "bad" for teaching. It's just that the two-humped camel problem will fuck you over if you expect everyone to come out programming-capable.
19:41
<&ToxicFrog>
Tarinaky: no, not at all
19:41
<&ToxicFrog>
ErikMesoy: for Java, you have a bunch of boilerplate you don't understand yet, you write that all out, write your code, then invoke the compiler that you also don't understand yet, then finally run it and watch it explode.
19:41
<&ToxicFrog>
If you want to test a small fragment of code or see if some expression typechecks, you need to do all of that.
19:42
<&ToxicFrog>
In three words: there's no REPL.
19:42
<&ToxicFrog>
Being able to test small bits of code in isolation, or load the program you just wrote and then manually call individual functions and inspect the results, is hugely helpful not just for debugging but for learning the language and libraries.
19:43
<&ToxicFrog>
(I freely grant that Java errors are much more helpful than C's "segmentation fault (core dumped)", but that's not what I'm talking about here)
19:44 * AnnoDomini nods.
19:45
<&ToxicFrog>
AnnoDomini: "I don't think there's a srs language that's actually "bad" for teaching" -- as you have probably gathered by now, I disagree.
19:45 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Operation timed out]
19:46
<&ToxicFrog>
Based on personal observation, starting students on C or Java means you get students who can cobble together mostly-working programs in C and Java but have no understanding of programming in general, because they spent all of their cycles learning the tools and boilerplate and how to avoid the many sharp edges of the language.
19:46 himi-cat [qicruser@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
19:47
<&ToxicFrog>
Starting with a HLL at least gives you a chance of using the language to teach programming, rather than teaching the language and hoping they can figure out the programming by second or third year.
19:52
< ErikMesoy>
I never got told about Java tools.
19:52
< ErikMesoy>
I should complain to the runiversity.
19:52
< ErikMesoy>
-r
19:53 Kindamoody is now known as Kindamoody[zZz]
19:56
<@Tamber>
rune-iversity? How arcane.
19:57
< AnnoDomini>
ToxicFrog: Noted.
19:58
<@Azash>
Tamber: Sounds more like a sports science school
19:59
<@Tamber>
:p
19:59 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
20:00 mode/#code [+o himi] by ChanServ
20:00
<@Azash>
Did you guys see this email someone sent Guido van Rossum?
20:00
<@Azash>
"I came across your resume in a Google web search. You seem to have an awesome expertise on Python. I would be glad if you can reply my email and let me know your interest and availability."
20:02
<@Tamber>
hehehehehe
20:03
< AnnoDomini>
Context?
20:03
<@Azash>
AnnoDomini: "You seem to have an awesome expertise on Python"
20:03
<@Azash>
van Rossum is the creator of Python
20:04
< AnnoDomini>
I see.
20:22
<@Namegduf>
ToxicFrog: On the bright side, with C there's a chance they may understand pointers.
20:22
<@Namegduf>
Students and pointers are just weird.
20:29 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Client closed the connection]
20:29
<@Tarinaky>
Java is terrible for teaching the difference between Pass-by-reference and pass-by-value because there're so many rules.
20:31
<@Tarinaky>
Java methods always pass by reference, unless it's a primative, except on a thursday when invoked by the blind or anyone who owns a pet or other animal weighing more than 10 troy ounces.
20:31
<@Tarinaky>
Unless right of arbitration has been invoked, then a meeting will be convened in no more than 6, but no less than 4 months, to determine what the correct behavior is.
20:33
< ErikMesoy>
Ahem. British coinage. You shouldn't talk. :P
20:33
<@Tarinaky>
What's wrong with British coinage?
20:33
<@Tarinaky>
It's decimalised.
20:33
< ErikMesoy>
It is /now/.
20:34
<@Tarinaky>
Most of the world has had funky coinage at some point. The exceptions being notable due to the lack of any form of coinage until relatively recently.
20:35 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code
20:35 mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ
20:35
<@Tarinaky>
Insert Hitchhiker's reference about some island where the only form of currency is a giant stone wheel that takes great effort to move from one property to another.
20:36
<@Tamber>
Well, it cuts down on impulse-buys.
20:36
<@Tarinaky>
I can't remember if that was from Hitchhikers or QI.
20:36
<@Tarinaky>
Which probably says a lot about both.
20:36
<@Tamber>
:)
20:36
<@Namegduf>
"You shouldn't talk, 100 years ago people who lived in the same place you do now were foolish."
20:37
<@Tamber>
And, 100 years from now, the people who live in the same place as you do now, will still be foolish.
20:37
<@Tamber>
who will live*
20:37
<@Tarinaky>
*insert joke about Norway's national past-time being taking long drives into Sweeden to fill up on cheaper petrol*
20:38
<@Tarinaky>
There, we're even now.
20:40
< ErikMesoy>
You know, giant stone wheels of great effort have a useful currency role.
20:41
< ErikMesoy>
It's basically the same principle that drives Bitcoin.
20:41
<@Tarinaky>
If it was Hitchhikers it was probably a giant stone triangle.
20:41
<@Tarinaky>
That's something of a gross simplification.
20:41
< ErikMesoy>
Bitcoin and the giant stone wheel currency both demonstrate proof-of-work.
20:42
<@Tarinaky>
And if you simplify it to that level most wage labour also simplifies to that level too.
20:42
< ErikMesoy>
The government can't fire up the printing press and make fiat stone wheels. :P
20:42
<@Tarinaky>
It's not the printing press that confers value.
20:43
< ErikMesoy>
I'm not saying the printing press confers value.
20:44
< ErikMesoy>
Tarinaky: Anyway, in response to the previous thing, Java is pass-by-vale.
20:44
< ErikMesoy>
*value
20:44
<@Tarinaky>
And even then the act of creating modern coinage has labour and costs associated with it that use proof of labour as a means of deterring forgery >.>
20:44
<@Tarinaky>
ErikMesoy: But that value is usually a reference ;)
20:44 * ErikMesoy shrugs.
20:45
< ErikMesoy>
Java has references. Java can manipulate references. Java passes values.
20:46
<@Tarinaky>
References means a lot.
20:47
<@Tarinaky>
Java passes values, but the values are a complex reference-like handle object that is best described as 'more magic'.
20:49 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [Connection reset by peer]
20:50
<@Tarinaky>
In lieu of that, if you call them a reference you have a mental model that works a lot better than if you insist they're a value with no further qualification or information on top of this.
20:50 Pandemic [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [Client closed the connection]
20:55
<@Namegduf>
I think if you don't understand values that contain the lookup stuff for another value that's automatically used if you just refer to them by name, you're going to struggle.
20:55
<@Tarinaky>
This is far from what is traditionally considered 'pass-by-value'.
20:55
<@Namegduf>
Actually it ins't.
20:55
<@Tarinaky>
I feel this counts as 'additional qualificvation'
20:55
<@Namegduf>
C is considered strictly pass by value.
20:56
<@Namegduf>
And is only enough to be heavily influential on what people use pass by value to mean.
20:56
<@Namegduf>
*old enough
20:56 Pandemic [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
20:56 mode/#code [+o Pandemic] by ChanServ
21:22 celticminstrel [celticminst@Nightstar-5d0169f9.dsl.bell.ca] has joined #code
21:22 mode/#code [+o celticminstrel] by ChanServ
22:03 gnolam [lenin@Nightstar-f7705974.cust.bredbandsbolaget.se] has quit [Client closed the connection]
22:05 gnolam [lenin@Nightstar-f7705974.cust.bredbandsbolaget.se] has joined #code
22:05 mode/#code [+o gnolam] by ChanServ
22:58 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
23:00 ErikMesoy is now known as ErikMesoy|sleep
23:11 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
23:11 mode/#code [+qo Vornicus Vornicus] by ChanServ
23:14
<&McMartin>
Well
23:14
<&McMartin>
To be fair, C is matching Pascal here, which offered both pass by value and pass by reference
23:15
<&McMartin>
And if you passed a pointer "by value" it behaved as C does.
23:15
<&McMartin>
C has no equivalent to Pascal's pass by reference on the grounds that passing a pointer by value is equally expressive if not more so
23:21 * AnnoDomini never quite understood what the difference is between pointers and reference.s
23:21
< AnnoDomini>
*references.
23:21
<&McMartin>
At the machine code level, there isn't one
23:21
<&McMartin>
At the language level, references recycle syntax.
23:22
<&McMartin>
When people are *actually bitching about pointers* they are bitching about arbitrary pointer arithmetic.
23:22
<&McMartin>
Since that tends to boil down to "here are some invariants that you must keep or the entire program can fail in arbitrarily bad ways. Verifying these invariants is formally undecidable."
23:23
< AnnoDomini>
Like un-allocating a pointer to a normal variable and a pointer to an array?
23:23
<&McMartin>
That's one way
23:24
<&McMartin>
But any time an array index is the result of a complicated computation, the halting problem will end up all up in your business except in very special cases.
23:24
<&McMartin>
References are a way of making only the special cases legal, with compiler-generated run-time checks to handle the rest.
23:24
<&McMartin>
But run-time checks only replace "arbitrarily bad ways" with 'a denial of service attack'.
23:25
<@Namegduf>
McMartin: People who bitch about pointers seem to be confused by memory layout in general.
23:25
<@Namegduf>
McMartin: You are giving students too much credit.
23:25
<@Namegduf>
When copies are happening, and similar.
23:26 * AnnoDomini used pointers extensively in his Snake game, but that was before I figured out how to use extern to allow me to have a global struct that contained the game state.
23:27
<&McMartin>
OK, fine.
23:28
<&McMartin>
Language theorists who complain about pointers aren't complaining about indirection.
23:28
<@Namegduf>
Oh, sure.
23:28
<&McMartin>
It occurs to me, though, that you're right that pointer-y code and reference-y code have two different models of memory.
23:28
<&McMartin>
Reference-y code may be more "magical" but it occurs to me that it shouldn't be.
23:28
<@Namegduf>
The reason I mention students is that they're who I was referring to back with the original comment that the idea that C didn't teach programming theory and HLLs did was in my view flawed given that the people learning the latter are incredibly bad at understanding memory layout, pointers, and such.
23:29
<&McMartin>
Because LISP was really not very magical.
23:29
<&McMartin>
C assumes you know a specific virtual architecture that we've gotten really good at simulating in hardware
23:29
<@Namegduf>
At least common HLLs like Python, Ruby, etc, which is what I assume was being referred to.
23:29
<&McMartin>
Which is why you should teach algorithms in Scheme and Architecture with C~
23:30
<@Namegduf>
That's reasonable. I think it's fair to say that if you can't grasp references or pointers and structures you're missing on the theory front, though.
23:30
<@Namegduf>
Not just practical.
23:30
<&McMartin>
"yes, but"
23:31
<&McMartin>
I think having a REPL is my sine qua non for an introductory language
23:31
<@Namegduf>
I'm not saying C is the best introductory language.
23:31
<&McMartin>
Yes, this very technically makes early but not modern BASICs beat out C >_>
23:31
<&McMartin>
So it would probably be good to also require things like "local variables"
23:31
<@Namegduf>
I'm just saying that people who start with it have an advantage in some areas of theory, I've noticed, that students as a whole are bizarrely awful at.
23:32
<@Namegduf>
So it's not useless from the perspective of teaching theory.
23:32
<&McMartin>
Hmmm.
23:32
<&McMartin>
Part of the problem here is that my undergrad school was insanely good at CS
23:32
<@Namegduf>
Back when I was an undergrad I remember everyone complaining about pointers
23:32
<&McMartin>
And we still had jackoffs, but it also means that it may be possible to blame the curriculum in ways I don't think of.
23:33
<&McMartin>
Also, how soon is "start with it"?
23:33
<@Namegduf>
I was like, they're just stored locations and they can have structuere of the references
23:34
<@Namegduf>
"This isn't complicated"
23:34
<@Namegduf>
"Imagine a bunch of pieces of paper telling you where the next piece in in weird patterns, like a particularly shitty treasure hunt"
23:34
<@Namegduf>
I'm not sure.
23:35
<@Namegduf>
People who's first language is C seem to be fine with them. But it probably is a bad first language.
23:35
<&McMartin>
Berkeley's setup int he mid-late 90s was to assume that people dicked around with C or the C-like Pascals in high school, and thought they were hot shit, and needed to be slapped down.
23:35
<@Namegduf>
I'd think that if architecture teaching it was detailed and actually did useful stuff
23:35
<@Namegduf>
It might be fine
23:35
<&McMartin>
So the first class was taught in Scheme and involved requiring you to do things like violate stack discipline in your call trees
23:35
<@Namegduf>
But I think architecture courses that detailed are relatively unusual
23:35
<&McMartin>
This was the weeder course
23:36
<&McMartin>
Then the second class was in C++ (later Java) and covered how to implement core data structures. You could test out of this one if you survived the first class.
23:36
<&McMartin>
The third class was taught in C and MIPS assembler and was on, nominally, "the hardware/software interface", but that boiled down to Baby's First OS and Architecture Survey
23:37
<&McMartin>
Virtual memory, TLBs, etc.
23:37
<@Namegduf>
That sounds like a good approach.
23:37
<&McMartin>
So you taught the C memory abstraction and then alongside it you showed how modern chips provided it.
23:37
<@Namegduf>
Aside that I'm not a fan of Lisps for anything, weird action at a distance is silly
23:37
<&McMartin>
And yeah, I like that approach a lot, and it seems to me like the reverse should work just as wel.
23:38
<&McMartin>
Hrm, not sure what you mean by "weird action at a distance" here.
23:38
<@Namegduf>
Lots of hidden shared state through shared portions of lists.
23:38
<&McMartin>
Oh.
23:38
<@Namegduf>
Hidden, mutable shared state.
23:38
<&McMartin>
Yeah, one reason to stay functional when you can.
23:39
<&McMartin>
OTOH, when you then demand that they implement their own linked lists one course later, you can just reference the first class and say "remember that mess? Now you have front-row seats!"
23:39
<&McMartin>
(In fact, "we don't have to cover this because we covered it in your first class in Scheme" was a running joke throughout the entire major)
23:39
<@Namegduf>
XD
23:39
<&McMartin>
(Said first course was SICP-based, and SICP is a really good book~)
23:42
<&McMartin>
I mean, BASIC generally and Commodore BASIC speciifcally did corrupt me a bit.
23:42
<&McMartin>
I had to unlearn, then relearn, then re-un-learn, casting integer constants to pointers and then dereferencing them
23:42
<@Namegduf>
Ew.
23:42
<@Namegduf>
XD
23:42
<&McMartin>
OTOH, local variables and recursion are recognized as blessings of the runtime.
23:42
<&McMartin>
(Woo, memory-mapped I/O)
23:43
<&McMartin>
Less true when writing machine code on Intel chips
23:43
<@Namegduf>
I think there's more to the "wow, these people struggle with memory layout" thing than just the C memory abstraction
23:43
<&McMartin>
I agree
23:43
<@Namegduf>
Maybe a data structures heavy part of the functional stuff would help.
23:44
<&McMartin>
But it is kind of interesting, because back in my day the C memory abstraction wasn't an abstraction. :D
23:44
<@Namegduf>
The C memory abstraction is a weird one even now
23:44
<@Namegduf>
It wasn't designed
23:44
<@Namegduf>
It is also, kind of, the PC abstraction
23:44
<&McMartin>
Well, I'm actually not using the *real* C memory abstraction, which is also kind of wonky
23:44
<&McMartin>
Yeah.
23:45
<&McMartin>
I'm pretending that there's no memory protection, so the C memory abstraction is "pointers are really just integers"
23:45
<@Namegduf>
It was how things used to work, and each individual component still pretends to be the way it was before.
23:45
<@Namegduf>
Roughly.
23:45
<&McMartin>
But they aren't, really, they're a *specific subset of integers that you can only assume very limited things about it*
23:45
<&McMartin>
Yeah.
23:45
<&McMartin>
That's why I think it was really great to start teaching in C at the point where you're teaching TLBs and similar.
23:45
<@Namegduf>
I wonder about teaching it to an old model
23:46
<@Namegduf>
And then teaching TLBs as the update
23:46
<@Namegduf>
Teaching it on a "it's actually pretty accurate" machine, so to speak
23:46
<&McMartin>
Yeah
23:46
<&McMartin>
MIPS can be configured to be that, so it worked out fine
23:46
<&McMartin>
I bet ARM would do the same.
23:47
<@Namegduf>
Quite possibly.
23:47
<&McMartin>
(MIPS is nice and all, but I imagine that Berkeley and Stanford use that as their instructional assembler because it was invented there.)
23:47
<@Namegduf>
We didn't have assembly at where I did my degree. :(
23:47
<@Namegduf>
I keep meaning to teach myself some, at present I've only picked up drips and drabs, enough to sort of read it given a reference.
23:48
<&McMartin>
Huh. Did you have a Compilers course? If so, what level did it stop at?
23:48
<@Namegduf>
It was optional, and not on the year I was eligible.
23:48
<&McMartin>
Ah. Boo.
23:48
<@Namegduf>
The lecturer who normally did it was away, for reasons that are mysterious, mostly because I never looked into why very hard.
23:48
<&McMartin>
(It's a weird subdiscipline, because compilation has been a solved problem for decades so now 'studying compilers' really means 'studying program analysis')
23:49
<&McMartin>
Funnily enough, my favorite assembly language is actually still the old 8-bit 6502 series.
23:50
<&McMartin>
Though I've worked with MIPS, and 16-bit x86, and I've *read* 32- and 64-bit x86 and ARM/THUMB, I can't write any of them anymore.
23:50
<&McMartin>
MIPS is not far from abstract three-address code, though, so there's not much brain-bending going on.
23:51
<&McMartin>
6502 is interesting because it's so register-limited that it ends up treating memory as registers, which is oddly freeing
23:51
<@Namegduf>
Heh.
23:52 Derakon[AFK] is now known as Derakon
23:52
<&McMartin>
But that's also the one where I have a lot of investment. It's the first one I learned, at 12, with no devtools
23:52
<&McMartin>
So I assembled my programs by hand on graph paper.
23:52
<&McMartin>
And I've worked with it (now with better tools, mostly of my own design~) in modern times as a curiosity.
23:53
<&McMartin>
But the flipside of *that* is that I've been able to read raw hex machine code and get sense out of it sometimes.
23:53
<&McMartin>
That is usually my cue to Work On Something Else, Because Jesus Christ
23:53
<@Namegduf>
XD
23:53
<@Namegduf>
That's awesome.
23:53
<&ToxicFrog>
Namegduf: honestly, pointers are way less fundamental than people seem to think. Also, I'm not saying they shouldn't learn C ever. I'm saying they shouldn't learn C first
23:53
<&McMartin>
Oh right, since it wasn't part of the little syllabus I gave above and since it was relevant to the initial question I was asking
23:54
<@Namegduf>
ToxicFrog: I think understanding structures built of blocks referencing each other and their attributes and being able to manipulate them and make new ones is pretty significant.
23:54
<&McMartin>
"This means the C/MIPS class is taken the first semester of sophomore year, so you traverse the whole abstraction layer" was 1.5 years.
23:54
<@Namegduf>
ToxicFrog: And that's the understanding thing I think is badlingly absent.
23:54
<&McMartin>
Namegduf: Hrm. I literally have never had a LISP class that didn't go into excruciating detail on this
23:54
<@Namegduf>
*bafflingly
23:55
<&McMartin>
Drawing cons cell graphs was a major component of homework assignments, etc.
23:55
<&ToxicFrog>
<McMartin> But run-time checks only replace "arbitrarily bad ways" with 'a denial of service attack'. -- no-nullable references :D
23:55
<&McMartin>
ToxicFrog: Does anyone besides C++ have that?
23:55
<@Namegduf>
Hmm.
23:55
<&McMartin>
OTOH, I've never seen a Java class that *did* do it.
23:55
<&McMartin>
I mean, I assume the data structures class must have, right?
23:55
<&McMartin>
(the one I tested out of?~)
23:55
<&McMartin>
But maybe not!
23:56
<&McMartin>
And we'd just done all that back in CS61A, so maybe not there, but, you know, in general.
23:56
<&McMartin>
Be An Allocator is great drill, and mapping it to physical^Wvirtual addresses is kinda independent of that.
23:56
<@Namegduf>
My experience has been with other students while I was in university, and with others I know elsewhere, that data structures is a huge pain, they get it wrong a lot, eventually replicate the structures they were asked to
23:56
<@Namegduf>
And then forget what little they learned
23:56
<@Namegduf>
And pointers and memory layout remain Magic
23:56
<&McMartin>
(And gave me bad habits! When I went to implement insertion sort on the C64 pointers corrupted me.)
23:57
<@Namegduf>
People who are kind of confused passing data around in C, and such
23:57
<&McMartin>
(It's way more efficient with its addressing model to instead have one array for the high bytes of your integers and another array for the low bytes, and a third for the links between them)
23:57
<@Namegduf>
Possibly the reason C seems to avoid this is that you just plain can't fail to get it and do decent work in the language
23:57
<@Namegduf>
Whereas in the likes of Python it's just a screwup every so often if you don't get references properly
23:58
<&ToxicFrog>
...you object to lisp because of spooky action at a distance? But not C?
23:58
<@Namegduf>
DittoJava
23:58
<@Namegduf>
Yeah, I do.
23:58
<@Namegduf>
C *lets* you do it.
23:58
<@Namegduf>
With specified structures, stuff noted as shared between this and that.
23:59
<&McMartin>
Can we call "spooky action at a distance" what it actually is, viz., "aliasing"?
23:59
<@Namegduf>
Lisp arbitrarily shares parts of any list and you need to be sure to do copies to get rid of it.
23:59
<&McMartin>
It's not remotely arbitrary.
--- Log closed Thu Sep 26 00:00:07 2013
code logs -> 2013 -> Wed, 25 Sep 2013< code.20130924.log - code.20130926.log >

[ Latest log file ]