This board is schizophrenic in regards to its ability to reason about programming...

this board is schizophrenic in regards to its ability to reason about programming. One one end this board recommends people use Lisp, while at the same time claiming that C is the best language because its faster or something. Explain this contradiction

Attached: 1495398141882.png (1000x1100, 121K)

Other urls found in this thread:

youtube.com/watch?v=YQs6IC-vgmo
twitter.com/NSFWRedditVideo

Jow Forums is more than one person

Linked lists can be fine in certain scenarios
Jow Forums is more than one person
This drawing sucks ass
op is a faggot

The trinity of terribly designed shitpile programming languages is PHP, Javascript, and C.

two of those languages can actually get you a job

Which do you think can't?

Technical merit only has a very weak correlation with popularity in the tech sector, and cargo culting and tool fashion trends are rampant. What's your point?

different collections for different purposes
if you are constantly adding and removing elements an array is trash

You know what linked lists are good for? Implementing malloc/free or equivalent.

This board is schizophrenic.
FTFY

>Linked lists can be fine in certain scenarios
youtube.com/watch?v=YQs6IC-vgmo
Linked Lists are always shit for performance on modern architectures.
They can sometimes be used to create elegant solutions in languages that allow you to pattern match against the head and tail of the list, though.

Not pictured
>Wants to add a single int to his array
>Needs to ask the OS to "please allocate me , all contiguous, thanks :)"
>Needs to copy over the entire array if realloc doesn't have enough contiguous space

Versus just mallocing a structure and changing a pointer. If you want to be autist about fragmentation, you can build on it and use a pool of preallocated node structures and get predictable insert/remove so the OS doesn't ruin the performance of your Enterpriseā„¢ software

/thread

is thats the case, you're not very creative

brainlets shill c, woke shill lisp

>cargo culting
>tool fashion
???

Just use an ArrayList you doubleniggers

>java
fucking lol

What the hell do you think ArrayLists do in the background?

the hardware early lisps were implemented on were friendlier for linked lists

its the same now with modern embedded hardware, memory is divided into banks, an array cant span a bank so linked lists are used
there are a ton of reasons to use linked lists, yes arrays are nice and efficient but in many scenarios they arent as good as a linked or doubly linked list

ArrayList use arrays, check the source code Idiot.

Sometimes they are the right data structure to use. Don't spout this "they are always bad"-nonsense.

no shit faguino is saying "use arraylist" like its not just a fucking array

Attached: 1514157263767.jpg (593x640, 97K)

Linked Lists are great (performance wise) if you frequently need to remove items at the beginning / middle of the list, in very long lists.

>beginning
Insert at the end of an array instead
>middle
No they are not

>remove
>just insert instead
???

brainlet

...

he's only talking about traversal cost
insertion and deletion are O(1) for a linked list, arrays can be up to O(n) which is disgusting for certain applications

the only book you'll ever need

Attached: Structure and interpretation of poopoo and peepee.png (1198x1728, 200K)

intrusive linked list you tools

Didn't know the term. I always thought that that was the normal way to implement them.

cpu is cute. CUTE!

yay, my comic!

less list elements will fit in the caches

That's the default, fucko. Pretty sure that's what the comic talks about.

4 U

Attached: for_u.png (180x100, 4K)

RULE 34 OF THE CPU PLEASE!

Use C# unless you absolutely cannot find a way to solve a problem with it.

C brings you close to the actual representation of modern hardware without being autistic (assembly)

Lisp brings you to the ideal world of pure computer science.

just like a samurai learns poetry in his spare time to improve his swordmanship, a programmer must master both hardware and software to master either.

Attached: circassian.jpg (477x720, 35K)

Have some dirty fan-on-cpu action.

Attached: 34.png (237x204, 6K)

whether you believe it or not, Jow Forums only consists of two persons, you and me. two persons replying to each other.

there are no other persons on this board, except you and me. every post not made by you, is made by me. and vice versa...

which one of my posts are you quoting?

C has not been a close representation of modern machines for decades. C is a close representation of a PDP-11 or Motorola 68000, not a modern x86-64 monstrosity or even ARM.

The C compiler does so much magic in the background so C progammers can continue programming like they did in the 80s and STILL be fast. I'm not hating on C, but computers have changed massively in the last 30 years

the ones that recommend C are trolling you. no sane person would use that shit.

>hurrr durrrrrrrrr what could i possibly learn from that retard Stroustrup
No he's not, you jackass. Actually watch the video. Nearly every damn node traversed is going to be a cache miss, actually multiple cache misses per node traversed.

If performance is not of your concern, you can just pick the most convenient implementation that works for you. Otherwise, you have to understand subtleties of the CPU.

In most of the cases all you want is dumb plain array. It has perfect locality and very predictable memory access pattern, in addition to that it has the lowest complexity, compared to other data structures. Even if you deal with lots of random inserts, growing, sorting, etc. it still would be faster than linked list.

Reverse iteration?

this

>Explain this contradiction
every language except the one I use is trash

also
>implying there is a single best language instead of just choosing the language that meets your needs for the given scenario

Yeah, it's like "multiple people in one board"

*goes to psych, personas need to leave, JavaScript&PHP&Python wave bye to them*

Attached: known_Universe.jpg (2002x996, 796K)

What if you need to insert at the beginning and the end? Also, yes they are fast to INSERT in the middle, just not to search. Often, we will have pointers into those items in the middle. Also, dynamic arrays aren't safe to point into, while lists are.

M-More

I don't even understand.

The blockchain is a linked list btw.

Sorry, I don't have the time, nor the drawing skills as correctly noted. Feel free to make a drawthread on /b/ or Jow Forums.

That makes it even ore worthless

Same is true for assembly. The changes you're talking about (mainly speculative execution and all the supporting machinery like prefetch, branch prediction, ...) are all abstracted away.
And it's a good thing, you'd never be able to program in a language that would expose this shit.

It's possible to like two different languages that fill different use cases at the same time. For example Richard Stallman's favorite languages are C and Lisp and he used them both in emacs to allow a mix of C's performance and Lisp's expressive power.