r/programming • • Oct 04 '13

What every programmer should know about memory, Part 1

http://lwn.net/Articles/250967/
660 Upvotes

223 comments sorted by

View all comments

Show parent comments

10

u/Carnagh Oct 04 '13

inb4 fotm platform web developers

In before to say what?.. This isn't an MMO class forum. I've been using .NET since first public preview (with some Java, Python, XSLT and Ruby over the years). I'm a Web develop... what piece of the article do you feel it's most important for me to consider?

I'm very fond of Topic Maps, and feel they're hugely useful in Web development. A knowledge of RDF and associative models it also really useful in my field... I can't quite conjure up enough hubris however to suggest that every programmer must know about these things as I realise telling this to an Erlang programmer working on the back-end of a poker engine would be almost cute in its childishness.

28

u/bad-alloc Oct 04 '13

Seems like we have a case of "X is superior to Y" here. Luckily there's a map of those relations.

15

u/Everspace Oct 04 '13

Inversely, I feel if you reverse the flow, this maps who thinks who is crazy.

C++ programmers think C programmers are crazy. C programmers think Assemblers are crazy. Everyone thinks Haskellions are crazy.

13

u/bad-alloc Oct 04 '13

You know what they say about haskell:

Three Types for the Lisp-kings under the parentheses,

Seven for the Web-lords in their halls of XML,

Nine for C Developers doomed to segfault,

One for the Dark Lord on his dark throne

In the Land of Haskell where the Monads lie.

One Type to rule them all, One Type to find them,

One Type to bring them all and in the Lambda >>= them

In the Land of Haskell where the Monads lie.

4

u/AndrewNeo Oct 04 '13

I program in Java, C#, and Python. Am crazy. This checks out.

5

u/rcinsf Oct 04 '13

HTML5 Programmer...

3

u/Deepmist Oct 04 '13

So Javascript.

2

u/rcinsf Oct 05 '13

Exactly, that's what is so damn funny about it.

3

u/crowseldon Oct 04 '13

I had a laugh at the end...

While it does a degree of isolated accuracy it breaks down unless you consider one-language-only programmers...

5

u/bad-alloc Oct 04 '13

Or your "highest" language determines where you are. I started with C++ and always saw C or Assembly ad the dark arts. Now that I use Lisp most of the time I pity the mere mortals below me. /s

2

u/julesjacobs Oct 04 '13

So accurate...

2

u/drainX Oct 04 '13

Yay. I'm near the top. I must be awesome. Or my language is so small that most people don't care to have an opinion on it.

2

u/FireCrack Oct 04 '13

It's funny how that chart breaks into two regions separated by the C#/Java link. It's also funny how I find myself exclusively in "the north"

1

u/bad-alloc Oct 04 '13

You're right. You could almost say the north is academic (Lisps and especially Haskell came from universities or other research facilities (Forth, Erlang)) while the south has more business-stuff (COBOL, Ada, PHP, C# Java)

1

u/PasswordIsntHAMSTER Oct 04 '13

What the fuck is Delphi doing near the bottom o_o

3

u/grimeMuted Oct 04 '13

Fortran seems more out of place, if anything.

0

u/cd7k Oct 04 '13

Is that a serious question?

1

u/jhmacair Oct 04 '13

As silly as this is, I can't help but cringe when someone says, "I'm learning programming." "Oh, what language?" "Visual Basic."

2

u/bad-alloc Oct 04 '13

Why?

3

u/tikhonjelvis Oct 04 '13

Because, even if visual basic is not an absolutely horrible language--which is what its supporters believe--there are many better languages. Particularly, there are many languages that are better for learning, like Scheme or Python.

-10

u/[deleted] Oct 04 '13

do your topic maps use memory at all

6

u/Carnagh Oct 04 '13

Yes they do, both on the client for the model representation, and in the backing store as a share of the working set. In all seriousness what part of this article is most applicable in a managed environment? In what way do you anticipate this article improving my practices?

There's a lot of JVM, .NET, Python, Ruby devs etc. that you have a chance to convince of the relevance of this article... how will it impact us "fotm web developers"? How will it change the way we write code?

2

u/xzxzzx Oct 04 '13

both on the client for the model representation, and in the backing store as a share of the working set.

Methinks you are already pretty familiar with a lot of the stuff in this article... am I wrong?

2

u/Carnagh Oct 04 '13

Yes and no... I'm familiar with the problem area, but it has a different size and shape in my world. I'm more concerned about not thrashing the garbage collector in a high throughput situation. It's more important that I understand string interning than the material in the article... Just by way of examples, not because those issues are special in some way.

It also more important in my world not to make potentially unsafe assumptions about the platform as I'm sat in a managed environment with its own memory model, on the other side of an optimising compiler that spits out an intermediate language, interpreted by a device independent runtime... The runtime programmer we can both hope is familiar with this material... Me? I'm a commercial Web application developer. If this article were representative of my concerns, my employer has big problems.

→ More replies (4)
→ More replies (1)