/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Previous thread:

Other urls found in this thread:

jdoodle.com/compile-assembler-nasm-online
github.com/kostya/benchmarks
youtube.com/watch?v=bIhUE5uUFOA
youtube.com/watch?v=WLDT1lDOsb4
youtube.com/watch?v=3Ii_ALXDG70&t=0s
twitter.com/SFWRedditGifs

C++ is the best programming language.

C++ is the worst programming language.

Please, it isn't C.

What is a simple but non-trivial userland application that could be done as exercise o system programming?

c++ is the greatest language of all time

sepples doesn't even have generics.

I made a thread because im dumb and was pointed here.

I have Editplus 3 and no way to assemble and check if my coding is correct. i can save .asm files but no text colors change when i do commands like JMP or MOV and what not. I also cant run them to see if theyre correct as I said.

Im very dumb need to be able to do this so i can do my hw for classes and im running out of time. pls help

Explain pointers and how they are useful.

no, nigger!
you didn't say, "please".

What is with the penis measuring contest with C++ devs? In my experience it's mostly undergrads who want to learn the "hardest" language to prove themselves or something. The fact that "hardest" and "best" only overlap for a tiny handful of usecases is lost on them because of their inexperience.

To me it just seems like a horribly designed language with features you should not even be using 99% of the time.

Do any of you actually get paid to write c++? I'm curious what kind of work you do and if you find it enjoyable. I'd like a reason to relearn the language but each time I start I'm quickly reminded of how irritating it is to work with.

>What are you working on, Sup Forums?

Exploring the deepest, darkest corners of Racket. Advent of Code 2017.

jdoodle.com/compile-assembler-nasm-online

github.com/kostya/benchmarks

They updated .NET to .NET core 2.0
Spoiler: C# is still horribly slow

>.NET to .NET core 2.0
two separate branches, foolio.

Any variably sized data structure, for starters.
What language are you familiar with?

How else would you get the third element of an array?

i forbid you to help that rude faggot

Employed C++ coder here.

with an operator???

Bad wording from my side

so you make good money, yet you hate your job and life?

>so you make good money
No.
>you hate your job and life?
Yes.

Getting into memory injecting starting off creating simple trainers for games. I want to kill myself.

ah, yes. now this is accurate

What did i do wrong?

You tried to program in assembly. In 2017.

>C#
Why would anyone be using that horrible piece of trash?

>I'm curious what kind of work you do
Most C++ work is maintaining and upgrading existing systems written in C++, and less commonly systems programming for multimedia applications (including games).

I have to do it for school, not my choice. pls help so i dont have to keep doing it

I'm having trouble figuring out what to do, what to create anymore.

a linux daemon written in java that is basically a chron job.

don't laugh

Java++ must be better than Java, right?

>pls help
I can only do 6502. Sorry, user.

>Do any of you actually get paid to write c++?
Yeah
typical CRUD stuff
it's my favorite language

use the example code that the webpage starts with and you'll quickly see some of the things you're doing wrong

>manages to be worse than Java in terms of portability
>manages to be worse than Java in terms of job market
>manages to be worse than Java in terms of simplicity

i think the strongest argument against c++ is that everyone uses their own little chunk. for my own projects i pick out what i want and it's fine

sepples is septic.

CL is the best general purpose language.

Programming my qt3.14 gf (male) in SQL.

>Dat Numale

Why are coders all so immature for their age?

>To me it just seems like a horribly designed language with features you should not even be using 99% of the time.
I'm on a break now but my previous gig was to write C++ components for a real-time medical simulation framework. Starting next year I'll work on CFD (which is more like what I'm used to) again, still using C++.
I don't find irritating at all. It's the best tool for most computational jobs.

How important is a numpad really?

CL is a procedural abomination.

>muh FP cult

>>XYZ
>muh XYZ

>muh OOP cult

>>XYZ
>muh XYZ
>>>XYZ
>>muh XYZ

CLOS ain't bad and OO is inherently imperative.

...

>OO is inherently imperative
Yes, in that it takes imperative programming and wraps it in useless bullshit.

Haskell

I get paid to write C++. I work on routing algorithms at a major distributed systems company. We sell performance as a product and it matters for almost everything we do. Garbage like Java is not an option, and I can't imagine using C because we rely pretty heavily on modern C++11 features like RAII pointers.

Plain old Data Structure
No methods, but a whole lot of function/operator overloading
Single inheritance
Information hiding by namespaces/modules

Anything that I am doing wrong?

is Java truly the best programming language know to man?

I thought I'd miss it on my laptop after having a dumb huge laptop with full numpad, but I really don't mind not having one too much.

Why only single inheritance? Multiple inheritance can't cause problems in that case. You might as well drop inheritance anyway for composition at this point.

Well I'm learning C++ to make video games.

Yes. Just use Idris

>no methods
This is pointless, you're missing out on a lot of power notably when using inheritance. Some talks that could be useful to you
youtube.com/watch?v=bIhUE5uUFOA
youtube.com/watch?v=WLDT1lDOsb4

>How important is a numpad really?
Never used it in my life. I don't even know what it's supposed to be used for. It's kinda like Num Lock or End... why do they exist?

...

What can a method achieve that a friend function can't?

yes

i approve in a very general sense, but it's worth keeping in mind that a destructor is often the safest way to clean up from exceptional control flows (true exceptions or otherwise). true PODS impose a lot of requirements and it's often appropriate to violate specific ones

>friend function
POD means no encapsulation.

Making your program maintainable. You have no reason to expect your friend function to use some intrinsic property of your object in the first place, and even then using friend function is quite the anti pattern desu. Watch the first talk, it covers exactly that. You compose the so-called friend functions by calling small public methods from your object. This is way clearer and much more maintainable that having a lot of hidden friend dependency on private attributes that are actually used outside of the struct.

Are you talking about virtual methods?
Encapsulation via namespace/modules

youtube.com/watch?v=3Ii_ALXDG70&t=0s

Type hierarchy and runtime polymorphism are the point of public inheritance. If you don't use those don't rely on inheritance (single or not) at all but use composition as said.
Also keep in mind even in video games, runtime polymorphism has its uses.

The biggest reason C++ sucks, and also a reason that every other language in existence sucks a little bit but not as much as C++, is because there are basically just too many fucking mutually incompatible ways to do the same exact thing.
Common reasons for this:
>the standard keeps adding superfluous features to stay """modern""" without maintaining full backward compatibility -- this is the problem with sepples
>the language is trying to be compatible with everything and supports way too many platforms and possible user needs -- this is the problem with javeet
>the language's limited metaprogramming facilities fail to provide the level of abstraction necessary to make the different ways of doing the same thing compatible -- javeet, c, sepples to an extent, smalltalk-style poolangs in general
>there's TOO much metaprogramming support and not enough actual meat to the language, and pajeets will go overboard and create horrific POO abominations by tying data and code together at every opportunity, and multiple such beasts that do similar things will wind up mutually incompatible because they're all so hideously poorly designed -- e.g. javascript, ruby, not so much lisp because everything is so self contained in idiomatic lisp that the language can gracefully work with such eldritch creatures without tearing at the seams
>not enough support for modularity, so that all the function and type declarations wind up all thrown together in a jumble and they're hard for fellow developers to read so they'll be more inclined to ignore what you were trying to do and go do it themselves -- c and javascript
this is a rarer one but:
>there's a rich and expressive algebraic type system, so it's too easy to make type expressions, and people wind up with multiple solution types to the same problems because those types are just so effortless to express that they can just write them in stride and don't stop to think that maybe a collaborator already did something similar -- haskell

didn't read lol

Female programmers are better than male coders. Male coders invented JavaScript and PHP after all

>smalltalk-style poolangs in general
You mean Simula-style.

smalltalk == simula

Girl(male)s are almost as good at programming my software as genuine female programmers.

If you know what I mean.

Typical vulgar male coder, needs more soy in order to be able to concentrate on his work.

It's nice because you get to be really specific but I think c# is the future

>smalltalk == simula

sepples == septic

>c# is the future
what a bland and shit future that would be

Well?

I don't know if Rust is the future but it's what the future is gonna look like.

C# has no future. It'll meet the same doom as Objective-C

We need a Rust killer. It's had its time in the spotlight and educated enough people about verification and ownership, now we need to move on to better realizations of the vision.

ATS

>Rust educates people
Rustoddlers can't even write a basic formal proof

Forgot to add:
Not a dead memelang
Aren't you that stupid faggot who thinks scripts are not programs?

Idk I haven't really learned c# yet but it seems like that is the go to language for Android apps and "space engineers" so Idk. I'm currently working on Java.

Rust is so young that we're still getting breaking changes. Plus, non-lexical lifetimes, WASM, impl Trait, and many other things are on the horizon.

I'm gonna learn some ATS just for fun, but I really doubt you could use it for anything. It's real rough.

>gets angry about the truth
>makes assumptions

I don't think you can write for android in C#

The newest fad is Kotlin, and it works just fine. C# has been there for ages, couldn't top Java, never did, never will.

Microsoft is a curse-word.

Straight trash.

I didn't say it educated them in it, but about it. Which is the first step to being educated in it.

Yes, ATS is tough. Fucking about with pointers and memory is tough. Get used to it.

how to translate user's bullshit on /dpt/
lesson #42

>language x is shit and you are stupid if you want to use it for anything
that's MY language, i want to scare you off so you don't take my job, because i am shit at it and i'm afraid of being found out.

The only way Rust is improving significantly in terms of formal verification is a breaking change so massive that it's essentially an overhaul into an entirely new language. Dependent types, totality, etc.

I would rather use C than ATS. Isn't ATS basically just a garbage collected theorem proving language with inline C anyway?

A language without proper tools is like an intel paper-launch. Have you used it? Sell ATS to me.
Does it have a working language server? How is the performance? Any benchmarks?