/dpt/ - Daily Programming Thread

Old thread: What are you working on Sup Forums?

Other urls found in this thread:

amazon.com/Discovering-Modern-Scientists-Programmers-Depth/dp/0134383583
learncpp.com/
cplusplus.com/
youtube.com/watch?v=n4fI4eUTTKM
en.wikipedia.org/wiki/Intel_iAPX_432
twitter.com/NSFWRedditGif

Lisp is the most powerful programming language.

define "powerful programming language"

AS3 is the only true language, all others are obsolete.

>Lisp
Trash.

Daily reminder that lisp machines had hardware-assisted garbage collection. Regardless of whether or not lisp was shit, that is a pretty cool factoid. IIRC, Azul is doing something similar for Java servers.

>Master Foo and the Ten Thousand Lines

Master Foo once said to a visiting programmer: “There is more Unix-nature in one line of shell script than there is in ten thousand lines of C.”

The programmer, who was very proud of his mastery of C, said: “How can this be? C is the language in which the very kernel of Unix is implemented!”

Master Foo replied: “That is so. Nevertheless, there is more Unix-nature in one line of shell script than there is in ten thousand lines of C.”

The programmer grew distressed. “But through the C language we experience the enlightenment of the Patriarch Ritchie! We become as one with the operating system and the machine, reaping matchless performance!”

Master Foo replied: “All that you say is true. But there is still more Unix-nature in one line of shell script than there is in ten thousand lines of C.”

The programmer scoffed at Master Foo and rose to depart. But Master Foo nodded to his student Nubi, who wrote a line of shell script on a nearby whiteboard, and said: “Master programmer, consider this pipeline. Implemented in pure C, would it not span ten thousand lines?”

The programmer muttered through his beard, contemplating what Nubi had written. Finally he agreed that it was so.

“And how many hours would you require to implement and debug that C program?” asked Nubi.

“Many,” admitted the visiting programmer. “But only a fool would spend the time to do that when so many more worthy tasks await him.”

“And who better understands the Unix-nature?” Master Foo asked. “Is it he who writes the ten thousand lines, or he who, perceiving the emptiness of the task, gains merit by not coding?”

Upon hearing this, the programmer was enlightened.

>Regardless of whether or not lisp was shit
Just to clarify, it was indeed shit.
>that is a pretty cool factoid
True.

TL;DR
Don't reinvent the wheel.

So you're saying to program in high level languages with garbage collectors?

Yes. Use Lisp.

I'd rather use other high level languages with garbage collection.

Why would I be using a blatantly shit """""""""""""""""""""""""""""language"""""""""""""""""""""""""""""?

No, I'm just saying don't implement something that is already available to you, unless you're doing it for learning purposes though.

In your example, it really depends on the application, if it's an embedded software app then I would try to use a lower level language. On the other hand, if I am designing an interface for some engine (e.g. unity) then I would prefer using something like python.

You probably meant this:
(((((((((((((((((((((((((language))))))))))))))))))))))))
>inb4 not correct number of parenthesis.

>start learning a language
>Sup Forums says it's shit
>drop it and move to another language

10th language in a row now

>I would prefer using something like python
Stopped reading right there. Opinion discarded.

You just fell for Sup Forums's trap to snuff out job competition.

it's the end...

This is why you use emacs to indent your code. You never count parentheses yourself, you infer their position from how emacs auto-indents your code.

Your point being?

>inb4 not correct number of parenthesis.
haha tough luck buddy, try making a point next time without making a single mistake

Should I be using Alex/Happy or Parsec?

What is an actually good book on C++ as a first language?

>just Principles and Practice Using C++ bro

I swear this book is a retarded meme. Between the outdated custom header he makes you use that has known bugs, to the "review" where you're apparently expected to google shit he never explained that is so much more advanced than the review it might as well be "jk just read another book or learn programming online", this shit is painful to work through. I keep getting stuck on literally every exercise/drill/review because he conveniently did not actually explain the shit that is in the "review". Surely there must be a better way.

>seriously taking opinions from Sup Forums
That was my point dummy, that it adds more overhead to check the number of parenthesis. And we're all traps here so I could sure use some anal beads~

anyone ?

Neither.

Just write it out by hand, idiot.

>java test in a week
>still can't manipulate linkedlists for shit
Help me gee

Whom are you referencing this from?

>actually good book on C++
There is no such thing. C++ is a terrible language, so it's only natural that all of the resources on it are terrible as well.

Nah

LOL

>Master Foo and the Methodologist

When Master Foo and his student Nubi journeyed among the sacred sites, it was the Master's custom in the evenings to offer public instruction to Unix neophytes of the towns and villages in which they stopped for the night.

On one such occasion, a methodologist was among those who gathered to listen.

“If you do not repeatedly profile your code for hot spots while tuning, you will be like a fisherman who casts his net in an empty lake,” said Master Foo.

“Is it not, then, also true,” said the methodology consultant, “that if you do not continually measure your productivity while managing resources, you will be like a fisherman who casts his net in an empty lake?”

“I once came upon a fisherman who just at that moment let his net fall in the lake on which his boat was floating,” said Master Foo. “He scrabbled around in the bottom of his boat for quite a while looking for it.”

“But,” said the methodologist, “if he had dropped his net in the lake, why was he looking in the boat?”

“Because he could not swim,” replied Master Foo.

Upon hearing this, the methodologist was enlightened.

Bjarne should give up the idea of writing books.

amazon.com/Discovering-Modern-Scientists-Programmers-Depth/dp/0134383583

this desu, covers c++14 and some bits of 17

That's a nice story, but who are you quoting?

use Maths mode with numbered list, also google it faggot.

I think this learncpp.com/ and this cplusplus.com/ are sufficiently good sources and won't waste much of your time and good for starting out.

>use Maths mode with numbered list
What

Don't bully me pls

I can remove and get shit for them but what I'm having trouble with is exchaging values between two or more linked lists. Solutions to this problem?

>inb4 read a book

This is kind of why you don't learn C++ as your first language. Stroustrup's book is the least bad option if you are a beginner. I learned C++ only from it and from Modern Effective C++, but it also wasn't my first language.

Elaborate.

>inb4 read a book
Who said that?

This image is doing weird things to my penis.

kys autist

Like I know how to use it to store stuff and how to put stuff in them and remove them later if I want. But I can't exhange values between them.

Don't be rude

Please answer the question. Who said the thing you quoted?

Exchange in what way?

youtube.com/watch?v=n4fI4eUTTKM
>What's essentially just linking functions
>4 hours of explanation
C and C++ are terrible languages.

> x----DDD this "who are u qoting" ting is funny AND relevant 2 stoping shitposters............................................. - you
You have never, EVER, been on /jp/ in your life. You are among the /dpt/ Autists, the legendary crossboarders/consumershits who have not programmed anything past fizzbuzz (a generous assumption) yet make this thread their home. Unironically and immediately consult your nearest bottle of cyanide or acetaminophen and just chug the contents down.

I don't know what you're talking about

nvm just figured it out

Are you ok, user? You're posting some weird things, but that's ok. Have a nice day, user.
You quoted things nobody has previously said.

I didn't quote anything at all. Quit being such an annoying faggot.

If you're not quoting anyone, please stop typing in a retarded fashion.

>inb4 read a book
>java test in a week
>still can't manipulate linkedlists for shit
You quoted these things. Nobody has previously said them though.

TL;DR
Don't reinvent the wheel, but also learn more about it and understand it in case you wanted to fix it or make it run better
Please don't feed the troll.
I want to do weird things to your penis too~

I'm quoting every post verbatim you've made so far

I wasn't quoting anything you autist, I was just sharing my struggles. Meme arrows don't have "quoting" as their designated use.

>Master Foo and the Script Kiddie
A stranger from the land of Woot came to Master Foo as he was eating the morning meal with his students.

“I hear y00 are very l33t,” he said. “Pl33z teach m3 all y00 know.”

Master Foo's students looked at each other, confused by the stranger's barbarous language. Master Foo just smiled and replied: “You wish to learn the Way of Unix?”

“I want to b3 a wizard hax0r,” the stranger replied, “and 0wn ever3one's b0xen.”

“I do not teach that Way,” replied Master Foo.

The stranger grew agitated. “D00d, y00 r nothing but a p0ser,” he said. “If y00 n00 anything, y00 wud t33ch m3.”

“There is a path,” said Master Foo, “that might bring you to wisdom.” The master scribbled an IP address on a piece of paper. “Cracking this box should pose you little difficulty, as its guardians are incompetent. Return and tell me what you find.”

The stranger bowed and left. Master Foo finished his meal.

Days passed, then months. The stranger was forgotten.

Years later, the stranger from the land of Woot returned.

“Damn you!” he said, “I cracked that box, and it was easy like you said. But I got busted by the FBI and thrown in jail.”

“Good,” said Master Foo. “You are ready for the next lesson.” He scribbled an IP address on another piece of paper and handed it to the stranger.

“Are you crazy?” the stranger yelled. “After what I've been through, I'm never going to break into a computer again!”

Master Foo smiled. “Here,” he said, “is the beginning of wisdom.”

On hearing this, the stranger was enlightened.


TL;DR
Don't have ambitions.

Link? I can't seem to find any of them. At no point in time did I say "*D"
>Meme arrows
Ah... So you're just new here.
In that case please at least make an attempt to learn the local culture before posting.

Did you mean to reply to some post?

>complaining about meme arrows
You do realize it's been years since you could have the majority of a thread not be less than 4 years old.

I have a feeling you're a pajeet for some reason.

...

Yes but I can't find it now.

This guy just trolled you again and you all fell for it.

>meme arrows
Return to your home board. Here, I'll even help you Why is that exactly?
This image is obviously doctored. I never said anything like that.

If lying to yourself makes you feel better, sure, but you have a proper home board filled with people just like you. Actually, several:

function(x){
return x;
}

I actually have this in my code... and it actually serves a purpose

This is just the identity function.

So how are your homeworks coming along? Are you playing too much games?

>s4s

that's actually a good board though it's just too deep and you don't understand it

Amen to that.

Didn't know that was a thing. But I'm doing JS, not functional programming. It was just a strange case where I was constructing an object in the view, but the view wouldn't recognize it as an object unless I returned it from that identity function

What does the identity function have to do with functional programming?

t. programmerlet

Wich is useful for some point free programming

>point free
What do you think I am, some kind of degenerate?

Relearning pthreads and thread synchronization in C for systems programming class.

Sounds like fun.

x language is actually really nice once you get used to it

I have some ideas for a couple of phone applications that i want to run on IOS and Android. Where do i start? What language and what software?

Swift for iOS, Java or Kotlin for Android.

Programming is actually really nice once you stop doing it. Computers are actually really nice once you stop using them.

Cheers. Is it possible to build for one OS and port to another without having to rewrite completely?

I have no clue, really, never written an app for either of them.

Assuming no platform specific features are used.

Intel tried this too once.
en.wikipedia.org/wiki/Intel_iAPX_432
It didn't end well.

That's what google / wiki said when I search for it

Sup Forums is really nice once you stop posting here.

Life is really nice once you stop living.

linux is finally nice once you remove stallman

>to intelligant to program Rust

Rust is trash.

unsafe blocks turn me on

I've been disassembling this graphics card BIOS. idk if that's relevant in a programming thread.
Some interesting things to be found in there. Like there's a print screen key interrupt, and it actually prints the screen to an actual piece of paper. never knew the graphics card did that.
Also there's this one data structure that's used all over the place and I haven't been able to identify it. It's like a pointer to a table with pointers to a table with pointers, etc... Like five or six levels deep. No idea what it does.

How does one get started with something like this?

What is the alternative, then? D?

THISTHISTHIS

Anything, honestly. Rust is like the programming language that never got to be a programming language.

May I ask whomst you are quoting?

>programming language that never got to be a programming language.

What does this even mean?