/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Previous Thread: >Which Programming Language should I learn?
Start with Agda, then Coq.

>What books should I read and use for learning?
Books are often outdated within three months of first publication. Look for tutorials on YouTube instead.

>Should I get a degree or learn on my own and have a really nice portfolio?
You should have a PhD and 20 completed mid-size projects at the very least.

>Look at my CSS/HTML/JS/Node/etc...
Nice! All of these things are welcome in /dpt/.

>How do you Sup Forumsuys get your code in that special style?
You need a Sup Forums Gold account. When you are logged in, select the text you want to display as code and click the 'code' button at the top of the reply form.

>How much money can I make if I get into Programming?
Typical salaries range from 30k to 50k in high COL areas in the United States and Canada. Salaries in Europe and Asia are approximately half that.

Now, please buckle up for a 300+ post thread. And as always, don't forget your programming socks!

>look at my [web garbage]
No. This is not welcome here.

>Start with Agda, then Coq.
This. But unironically.

>What books should I read and use for learning?
What's the best place to download Packt books?

I just finish bunch javascript tutorial
Should I learn AJAX?
And what framework I should focus anons?

why std::istream::get() didn't unblock the program when a char pas entered, and you need to press \n for it to start continuing the program?
And also, how to purge the stream after call of istream::get(), so whenever the user enter more than 1 char, it will not be picked up by another get() or getline() or anything??

>Should I learn AJAX?
AJAX is outdated, you should concentrate on web workers and websockets

buffering

>web workers
I will check web workers
ty

Rustlets, I need your help.
The reqwest crate doesn't allow mocking of the Response struct so I have to come up with an alternative. Is there a way to create a struct that implements the BufRead trait from a &str or String?

I was messing with you user. I don't sully myself with knowledge of web development

You only get that behavior if you give it a single char reference.
You probably gave it a C string. Then it requires the delimiter character to stop blocking.
>how do I flush
cin.ignore(something), I don't remember.

>reqwest
Is this really what rustoddlers name their packages? Surprised the language isn't called wust.

Yeah, it's a bit cheap. The reqwest crate is a convenience wrapper over the hyper HTTP client crate.

The input is fed line per line on the console because the user can press backspace and edit his line as long as it hasn't been sent using enter. That's the reason you're experiencing this effect. There are other modes that terminals can be put in but line buffering is the default one

If the first programming course in my uni uses only Python should I bother starting other languages right now or should I focus solely on Python?

The reason I ask is because the second course in the sequence switches to Java, and Java seems harder to learn.

Don't take anything about Python too deeply to heart. It's a peculiar language with many idiosyncrasies. That's the most polite way I can think of putting it.

Python and Java are both brainlet languages. You'll be finee.

>Start with Agda, then Coq.
Is this some sort of a joke?

If this were good advice, Universities wouldn't teach Python.

Soy milk goes sooooo well with programming. I'm almost done with today's daily dose. It tastes like a cooler and more fluid version of cum >w

Alright, as of right now I think I have a pretty decent grasp of the basics and the syntax. But on the side I am messing around with C++, but I guess I should switch to Java.

Most universities dance to the tune of an industry that wants cheap, low-skill, easily replaceable programmers.

is it possible to disable the buffering without messing up lots of stuff?

That's yakult, yah goof.

All languages have idiosyncrasies. It's just that python is too good to be appreciated by simpletons

This is why universities teach oop. So you can be cheap and easily replaceable.

>And what framework I should focus anons?
Front end or backend? For front end React is bretty good, for back end Express is the defacto framework.

The problem with learning python first is you'll see Java as an outdated dinosaur of a language later. Better learn Java first.

They want cheap, high-skill, easily replaceable programmers. There's no reason why anyone would prefer low-skill programmers.
If learning the newest-meme-functional-language were good advice, there would be more, not less, high-skill programmers. More equals cheaper and easier to replace.

>cheap
>high-skill
>easily replaceable
Pick at most two.

>Should I learn AJAX?
There is not much to learn, but read up on the browsers native fetch() function and maybe the axios library.
>And what framework I should focus anons?
Assuming you are talking about frontend frameworks.
Depends on whether you are interested in hobby projects or are looking for a job.

For a job, Angular and React are the go-to ones
Angular is the more 'enterprise-y' of the two, that you will find in large companies everywhere.
Startups usually tend to choose React, if you want to generalize.

For personal projects you should be better off with React or Vue.
Read the docs if you want to get an impression.
React is great if you also care about personal marketvalue or something like that, though I do prefer Vue personally.

Angular is generally considered to be a full framework, while React and Vue are smaller libraries for the view layer only.

Is it a coincidence the bottles look like dicks

Be careful with Angular. There's a real risk that a new, incompatible version will be released in the near future. It's happened before.

>Is this some sort of a joke?
1/10 times it's one of the resident Peano-proving autists on /dpt/, the other 9 times it's other people making said autists into a joke.

*notices your unsafe block*
OwO what's this ?

It's not that risky I'd say. It goes only for UI and unless something else in your program is doing UI it's probably OK. It's OS specific, but you can get the terminal in raw mode and then the sky is the limit. In practice tho, use a lib like ncurses or libedit, otherwise you'll reinvent the wheel in a surprising and unergonomic way. It's not within your reach right now, and inputting chars is silly anyway

Tell me how would one mistake "could" for "want".

Let's say that, hypothetically, I was a pretty lonely user who wanted to find a programming buddy/mentor because I find it hard to answer only to myself with my projects.
Where would one go online to find such people?

Asking for a friend, of course.

>inb4 university
i dopped out, and part of the reason was that nobody cared about programming in my general vicinity (in a CS course...) and i didn't care to look further.

I'll be your programming buddy. From now on, you will come here and report your progress to me every day, and get harshly chided for failing to make progress. The rest of /dpt/ is welcome to join in the mockery and teach you a lesson for not programming hard enough.

That's a bad excuse. You shouldn't have dropped out.

>Where would one go online to find such people?
If you have a problem motivating yourself, I don't think a mentor would be of much help. Either way, emulator developers tend to be highly knowledgeable. Find an IRC/Discord channel and talk.

>If you have a problem motivating yourself, I don't think a mentor would be of much help.
Having other people involved actually makes a huge difference.

On second thought, I think you are right.

If only /dpt/ wasn't so mean and autistic... none of you guys make for good programming buddies. We need a Code of Conduct!

The impoverished imagination of those who can conceive only of implementing and proving Peano arithmetic in Agda or Coq is truly incredible.

low quality b12

I hate that curlylangs are dominant, Sup Forums.
>if and friends take only one argument like it's fucking Haskell or something, but you can use braces to group statements together
>dangling else "problem"
>stylistic holywars
>have to put the condition inside parens for some unexplained reason
>braces nonetheless mandatory for function and class definitions
Jesus we should've gassed all of them

Whatever advantage your so enriched imagination pictures those two languages as having, would fall short in comparison with any more gp and accessible languages.

Sup Forums, I wonder what "LEITE" means.

>The impoverished imagination of those who can conceive only of implementing and proving Peano arithmetic in Agda or Coq is truly incredible.
I don't their problem problem is a lack of imagination, user. They probably fap every day to the fantasy of real programs getting written in Agda or Coq, but I guess Peano arithmetic and autistic shilling is easier than actually doing it, so we'll never see them produce anything of value to demonstrate that their memelangs are practical. ;^)

that would be Laravel, user.

Agda and Coq are recommended only as the first and second languages that an aspiring programmer should learn. The skills and way of thinking that they impart is invaluable when later picking up the rougher, less consistent, more unreasonable languages that are used by mainstream industry.

Remember to use æ, ð, þ, and ȝ when posting in /dpt/.

Can I find a complete orthography description for /dpt/?

Even experienced programmers have a hard time getting anything real done in your meme theorem provers. You have to be deeply autistic to think the process would be in any way inspiring to a new programmer who can't wait to get useful programs done.

Vy ðo?

Oh, you should also use Ƿynn.

I am learning the HTML and CSS programming languages right now

>ðoȝ
ftfy

It's similar to modern English, except:

æ for the a sound in 'today' (but NOT the y)
c for ch, never s or k
ð for voiced th
þ for unvoiced th
s for unvoiced s
ȝ for gh
z for voiced s

Can non-anglos disregard these weird conlang obsessions? (Yes I know is historical but you are basically constructing it back into existence)

Stop trying to eræs my heritage.

Can we also use digraphs like sc?

>constructing it back into existence
Good

Yes.

how hard is it to get a job making six figures?

I have spent 6 months reading w3 schools and i have read HTML,Javascrip, & xml

Not hard at all, move to Japan.

Decided to do a database query program.

The user starts a GUI in JavaFX to input the database connections and then he can write queries.

To make this cross-platform is it better to in Java right? Java already has all those database conncetors..

So, the user can just
java -jar dbConnector.jar


to start the program

...

Don't you need to visit Onsen to drink this drink?

no, that's a brazilian fermented milk. you can get fermented milk everywhere.

this OP message is blasphemous!
you took the right, style but lied in each answer (or queered it up, *socks*)

Making a simulation framework!

He didn't specify 6 figures in USD so six figures in Yen is easy in Japan since I dunno the exact exchange rate but something in the vicinity of 100Y : 1USD IIRC.

How do I become an lisp hacker

1. give up all hope in life
2. resign yourself to being a sexless meme forever
3. learn lisp
4. learn hacking
5.?
6. profit

Speaking of lisp, do cadfags still use autolisp? Or modern architects are to dumb to write it

>front end React is pretty good, for back-end Express

More back-end, I already search for node.js Express web

For Laravel, I need learn PHP first, but ty for advice

Ty for advice but I'm trying to focus on the back-end.
I already hear about React and Vue

they use python these days

Instead it is better for them to learn unemployable languages. Neat.

>Should I learn AJAX
What is there to learn?

Better learn Http itself. Ajax is just a way to use Http from a web page.

He's talking about Javascript not Php. And Php's defacto framework is Symfony.

i just spent 400$ in meme books i will never read
i hope you are happy

quite happy. thank you.
-President of O'reilly Books

...

damn I wish I had $400

what did you buy senpai?

tell me about your latest Chindōgu code.
>we had to write a UWP that tells you how much time you are wasting on non-productive programs.

1 college textbook can cost $400
SICP costs $120

post them

I'm afraid that Old English orthographic specification is only valid for Old West Saxon, which by far predominates in the historical record and which is NOT the ancestor of Modern English. There is nothing special about Old West Saxon's orthography that would make it well-suited to representing Modern English, especially in the wake of the great number of phonological changes that English has undergone over the centuries.

What's the deal with Americans and their college textbooks anyway? Do students unironically have to buy them every year?

>SICP costs $120
You can literally print it out for free... (Ignoring the ink and paper costs, which surely don't add up to $120)

every semester* unless the course profs explicitly have gone through the effort of using textbooks that span semesters
and yes out of their own pocket its not included in tuition majority of the time

it’s mostly the big glossy underclassman texts that are outrageous

SICP
The pragmatic programmer
The art of computer programming, volume 1
The C programming language
Introduction to algorithms
Design patterns
The mythical man-month
Think python

A Chrome extension that deletes cookies as soon as they are stored.

>no SICM

well, be careful. 100k is poverty in sf
the answer is always to know people

i've seen some master's level texts which run about 1800-2500 USD.
it's a shit system. publishers push profs to req the latest version (99% of the time the new versions are 95%+ similar)
and since the money is likely not our own, we spend it freely at a young age. and the publishers KNOW that and use it.

>1800
post one, if you will. i’ve never seen such a thing

Programmers smoke weed?

Programmers can work under the influence of weed?

Weed helps to program better?

Tell me your personal experience and with coworkers