/dpt/ - Daily Programming Thread

Old thread: What are you working on, Sup Forums?

Other urls found in this thread:

python-guide-pt-br.readthedocs.io/en/latest/
learncpp.com
github.com/lhartikk/ArnoldC
twitter.com/NSFWRedditImage

>he doesn't enjoy OOP

He sounds normal to me

Pls help

>Captcha: THIRD Warning
I'm scared.

Trying to learn C++
Anyone able to give me some good places to learn?

t. rajeesh

look it up on a reference

thanks C

You mean a reference website?

Yes, there are many reference sites or you could read the standard itself.
However, size_t in particular is from stddef.h

t. assblasted c-cuck

You really could have put more effort into that like a personified segfault or something.

>le feely man

if event == "MOUSE_BUTTON_PRESSED" and arg == 1 and recoil then
if recoil then
Sleep(200)--1
for i = 0, 10 do
Sleep(13)
MoveMouseRelative(.3, 3.1)--2
end
for i = 0, 10 do
Sleep(13)
MoveMouseRelative(0, 3.9)--3
end
for i = 0, 10 do
Sleep(13)
MoveMouseRelative(.2, 5.3)--4
end
for i = 0, 10 do
Sleep(13)
MoveMouseRelative(.9, 5.9)--5
end
end
end
end
end

Recoil script for FPS games written in Lua. Works fine now but I want to put all the for loops in one big for loop. The problem is I wouldn't how to break out of the loop when I release MouseButton1. With all the loops separated like this I can add a break and check in between. Any help?

Instead of sleeping why not just make a proper cooldown function.

First for (((Rust)))

but user, that's the 14th post

He was trying out his new optimized rust client.

Yeah this obviously isn't going to work

how are you not blind.

>He thinks he knows the right kind of OOP

Is ricing really that important?

Just look for the typedef.
typedef.+size_t

No but having a readable font and decent colors are.

>OOP
>right

You're checking if recoil is True, and then check it again immediately afterwards in the body of the outer if statement... why?

Doesn't work with structs and functions, but I guess it's useful in certain situations.

Geez. How's this?

thats better, just use an off-black background though, pure colors are bad four your eyes in prolonged use.

Noted and fixed.

Thoughts?

Haven't you got anything better to do?

>java
0/100

It's a program

Thanks for a good anime image.

at least allow user to input his own age

where can I learn programming

>}else{
just awful

hello fellow trannies programmer what do people use to play sound nowadays in Windows?? do people still use DirectSound?

>massive fag wastes sexts
You don't deserve an answer

God damn it, /dpt/.

Pretty lame.

RUINED

checked

>}else{

...

Why are you starting in Java? You should learn Python first.

>bad to worse

Here you go:

python-guide-pt-br.readthedocs.io/en/latest/

Your opinion is wrong. Python really fucks you up when switching to other major languages, mostly due to its type system (or lack thereof) and weird code structure/best practices. I wouldn't recommend Java as a first language, but it's better than Python in that regard.

There is nothing wrong with Java.

What is a good first language then?

Don't say C.

Just use OpenAL.

Jesus Christ what a waste of sexts

Except for the language, the libraries, the runtime and the users.

It's C.

I can tell straight away that this is the New Boston tutorial.

Spotted the fedora.

C++ or even C#, depending on which way you want to go after that.

WASAPI
Directsound a shit

You should start with C on DOS, anything else will permanently damage your understanding of programming.

>implying I don't
>but also implying I use it ad absurdum like Java

>C on DOS
>when C was designed for UNIX

>i recognise that gay tutorial

>Not MS colors
stop half-assing it

I stand by my statement

>not writing in the thinking man's language

false flag

Good luck getting a job with that, faggot.

samefag

Hey Sup Forums, I said i will be open sourcing my project soon. Here it is: go-o.-gl/Qtfns9 (remove dashes)
Written in C++/Qt Widgets. Working on it for over a year now.
Thoughts?

Why are you swimming and studying math at the same time?

>tfw you are too dumb to program in Haskell
Why did Haskell never take off anyway?

I would say either Java or C#, c or c++ would be totally horrible to have as a first language.

Meme language.

what is this and why should i use your app instead a free better one?

Most programmers are too dumb, like you

multitasking

Looks pretty bad, to be completely honest. I'm not seeing why anyone would use this.

Because it's pretty much useless in the real world.
The performance is abysmal. Non-free abstractions. Shit module system. Long compilation times. Default setup lacks anything usable so you need extensions to make anything useful.

Can someone advice me the best IDE for Linux? I tried Code::Blocks but it was shit.

What does Sup Forums think of Arnold C?

>it's another "I'm so clever for doing some basic replacements related to this pop culture thing" episode

It's shit, and so is everything like it.

this

i guess i'm the only autist here who cares about the code :( the app is shit atm, i agree, but my goal was to write a good code, not a good product. although now i might consider focusing more on the futures and not on their implementations.

Sauce on that language.

Chill out. Dickwad.

>but my goal was to write a good code, not a good product
You are everything that's wrong with like half of the programming community. Yes, you should write good code, but your #1 goal is to solve a problem, or otherwise generate some sort of value using programming as a tool. Write good code while creating something useful, interesting, or fun. You can go back and gold-plate the code later.

learncpp.com

samefag

Asks for sauce on something that's easily copied into google to pretend that a 3rd party is showing interest in this low-effort replace-and-label piece of shit "language".

Fuck you, I'm not same fagging. That jealous someone else likes their programming?

Sauce?

github.com/lhartikk/ArnoldC

Well, i was just learning stuff, so my goal was adequate imo.

If you're a real programmer you should be able to ensure that a*b, a-b and a+b don't overflow.

Number of real programmers ITT: -2.

I use unbounded integers

>Why did Haskell never take off anyway?

Imagine you have a factory which produces tinware. You can chose between two different technologies:

1) A super laser which can be used for pretty much everything. Downside is that it's control panel has 5000 buttons and you need at least two years of training for a worker to be really productive. There aren't many people that can really use this laser, and those who do probably don't want to produce tinware, but rather build comlicated stuff.

2) A cheap old metal press. It does only one thing, but you can learn to use it in 5 months. Also everybody is working with it, so you can find plenty of workers.


A no-brainer, isn't it?

>
1) A super laser which can be used for pretty much everything. Downside is that it's control panel has 5000 buttons and you need at least two years of training for a worker to be really productive. There aren't many people that can really use this laser, and those who do probably don't want to produce tinware, but rather build comlicated stuff.
Then how did C++ get popular?

>this is what Hasklets actually believe

C++ got popular because most of it's buttons don't work and are clearly marked as such

What a fucking waste!

>Imagine you have a factory which produces tinware. You can chose between two different technologies:
>1) A super laser which can be used for pretty much everything. Downside is that it's control panel has 5000 buttons and you need at least two years of training for a worker to be really productive. There aren't many people that can really use this laser, and those who do probably don't want to produce tinware, but rather build comlicated stuff.
>2) A cheap old metal press. It does only one thing, but you can learn to use it in 5 months. Also everybody is working with it, so you can find plenty of workers.
In practice the super laser breaks down often because it has many small and fragile components which are very expensive to replace while the simple mechanical press continues to work for many years with minimal maintenance because it doesn't try to over engineer the solution.

Because in 1985 when C++ came out (10 years before Java) it seemed like a good idea. It was more powerful than C and there were not many alternatives.

But it's no wonder that Java BTFO of C++. Today C++ is the sacred cow of some distinct technolgies where you need every single bit of performance or just have a huge bunch of libraries already. But if you can avoid it, you usually do.

Are Go and Rust decent alternatives? Are they a lot slower than C++ or would it be fine programming something in them on modern hardware?

Go is GCC, Rust doesn't have much to offer.