/dpt/ - Daily Programming Thread

the no shilling bls edition
What are you working on, Sup Forums?

Previous Thread:

Other urls found in this thread:

github.com/enfiskutensykkel/ssd-gpu-dma/
twitter.com/SFWRedditGifs

First for Go is the language of 2018.

don't you mean the language of superpower by 2020

>What are you working on, Sup Forums?
Shameful repost: Rewrote my API more or less from scratch the last couple of weeks and made a latency benchmark. I will most likely start make a bandwidth benchmark, and hopefully a CUDA workload example, issuing commands directly from within CUDA kernels, but need to think this through as I don't want to diverge warps.

github.com/enfiskutensykkel/ssd-gpu-dma/

Is Java still worth learning?

When learning the fundamentals of programming, yes

As an actual language to use and enjoy using, no

it's decent as a language (not amazing though) and it's still used irl so ...

>Is Java still worth learning?
If your dream job is generic enterprise application maintenance and you want to compete with Pajeets for your peanuts, sure. Otherwise, no.

Why the hell would you learn Java over Scala if you are not a pajeet?

>Why the hell would you learn Java over Scala if you are not a pajeet?
To get an actual job, I guess. I suppose some people are pressed for money/have to start somewhere.

>To get an actual job
The best JVM jobs (best paying) look for Scala/Java Senior dev

>implying you're gonna get the "best jobs" just because you can type out scala code
Yeah, no. If your primary concern is to get started somehow, and you have to choose between Java and Scala, you choose Java. If you have the time to learn another language besides Java, you're probably better off learning C#.

>implying that we are talking only about the beginners

>we are talking only about the beginners
Who else would ask "Is Java still worth learning"?

Anyone interested in broadening their language pool

Someone who gets their sexual thrill from being tortured

Threadly reminder that Agda is the only language worth learning.

Maybe in a few years.
It's even less developed and adopted than Idris which is considered ded by most.

>t. lispfag
Dynamic typelets... when will they learn?

No, you mean
t. Idrisfag

if you want a souless job but well pay, it is the best option

>a souless job but well pay
Only if you manage to make your way up. If you're just a Java code monkey, expect your job to be outsourced to Rajesh any day.

there were people having an /r/ tier "debate" so it got deleted

Gotta write a code to showcase the scheduling process of a policy like round robin or such.

Can't be bothered to think about it, sounds boring as shit, should I do it?

Is there any good reason not to just statically link libraries? I don't think file size is much of an argument in 2011+7.

Dynamic linking is a mistake.

>I don't think file size is much of an argument in 2011+7.
Maybe no for a little fizzbuzz project like yours, but complex software tends to have a lot of dependencies, and nobody wants to ship a 500 MB executable.

so just make a script that draws a timeline with the packets?
or do you have to actually receive and switch packets

Have you ever heard of electron?

Electron is a pile of fucking shit.

I have no clue, the request was vague as shit.

I think I'm just goign to ignore it and work on more important stuff, I have to practice with C libraries.

What are some proprietary platforms/services that you would like to see open source variants of?

Windows

>proprietary platforms/services that you would like to see open source variants of?
Half-Life 3.

Even pretending you're linking to hundreds of libraries to get a 500mb executable, does it really matter on a modern PC? I've seen video games with gigabyte sized executables (probably embedded data) and they start up just as fast as sub-megabyte executables.

this

Spotify.

>they start up just as fast as sub-megabyte executables
Except they don't.

>what is virtual memory
>what are page faults

They do for me. SSDs are pretty much normal these days. They might have load times after the program starts, but that's performing work like decompressing assets and stuff, the program itself is already fully loaded into memory.

By all means, produce 200MB executables for your fizzbuzz projects. I'm just telling you many people don't appreciate that.

Okay, so, ignoring grandpa with his pentium II processor and his 5400rpm HDD and his 14.4kbaud modem, is there any reason not to statically link?

All these linked dependencies have to be loaded into memory as well.

No. And it's not like you're making giant programs either. People will appreciate portable executables and no fucking temp writes. Dynamic linking is ass and just creates more issues than it solves.

~$ musl-gcc -static -O2 -o fizzbuzz fizzbuzz.c
~$ du -h fizzbuzz
8.0K fizzbuzz

>ignoring all the cons of large executables (taking up extra space, longer startup times) are there any cons to large executables?
I love when people pose their subjective opinions as questions to be discussed.

this threads are like console wars in Sup Forums but with programming languages.

For instance if you do not have the source code for the program and there's a security bug in the library, you can use the same API-compatible version with security holes patched to keep the application secure if the developer is not willing to release a new version, I don't know how you would go about that with static linking. There's also the con of decreased memory usage if many applications use the same shared library. There's also licensing issues, some libraries simply cannot be (legally) statically linked.

>longer startup times
>implying dynamic linking isn't a major factor contributing to slow startup times in large c++ programs

>con
Meant to say a pro.

... yes ... except it's more important

>waste an hour debugging because used an int instead of a long
:-)

>does not compile with -Weverything
>gets fucked

good as a starter language (holds your hand more than C but is still rougher than most). good for anything else? nope.

I write obfuscated code but not on purpose it's just that I hate long variable names and spaces and newlines
this shit used to happen to me a lot but you get used to it

>good as a starter language
Awful as a starter language. Shoves irrelevant JPOO ideology down your throat right off the bat. Even Go is a better starter language.

poo isn't necessarily bad if you tell the person using it that it's not the only way to write stuff

>poo isn't necessarily bad if you tell the person using it that it's not the only way to write stuff
At best, having JPOO ideology shoved down your throat when you're just trying to learn programming adds useless and distracting cruft to the process. The more likely outcome is a braindamaged programmer that needs to undergo a long process to unlearn JPOO.

if malloc is part of stdlib.h because it's part of the OS and not base C and therefore unavailable in bare metal C programming
Why C++ allow new without any header for it's OS implemented implementation?
Does that means C++ can't be used to write a bare metal program?
Does that also means C++ compiler for bare metal machine need to implement it's own memory management?

malloc isn't the only way to allocate memory

Idris is pretty much the minimum acceptable language in 2018.

>he has idris/agda listed in his CV
>his github is more than 20% Haskell
>his github has an anime profile pic
>he's not proficient in at least 3 dynamically typed languages
Straight to the trash it goes.

>>he's not proficient in at least 3 dynamically typed languages
But I am: Scheme, Emacs Lisp, and Common Lisp.

>i read the wiki page on macros once
>i'm proficient in lisp now

>probably embedded data
There ya go user. It would be even worse if they didn't dynamically link.

>I cannot conceive of someone being proficient in multiple languages

you're never really proficient in lisp tbhfamalam

>i cannot conceive of someone not believing that a /dpt/ poster is proficient at any language

Why come you guys don't talk about Pony much?

>object-oriented, actor-model
1990 was 48 years ago.

...

b-baka!

>stdlib.h
Anything part of the C standard library is also part of what you call "bare metal C", otherwise the implementation isn't conforming to the standard.

>the joke
>you

>le ebin joge

>my joke
>(you)
B-BAKAAAA!

What's wrong with object-oriented programming?

It's mainstream, therefore Sup Forums doesn't approve of it.

>being this accurate
shieeet

>all that text in README
What is it and why should I care?

It's mainstream because it's lowest common denominator programming.

>implying that's a bad thing
Programming is supposed to be convenient.

OOP is not convenient.

It says what it is in the readme

>structs with extra something something aren't convenient

Hundreds of thousands of Indians disagree

But it doesn't say why I should care though.

What language is this?

F# you idiot

looks like nim

How am I supposed to use RAII in C++ when using a library written in C? Write a billion wrapper classes?

>lemme just tell you guys I don't care real quick
>fails to realize we don't care about his ultra edgefaggotry

>What's wrong with object-oriented programming?
What's wrong with any other cargo cult programming ritual someone could come up with? Is the burden really on everyone else to prove that your paradigm is harmful? I've seen plenty of examples to suggest so, but you'll dismiss them as not "real" OOP/not written by "real" OO programmers. Do you have any evidence that it's actually any good that can't be dismissed just as easily?

Yes. For simple types, I use shared_ptr with a custom deleter though.

When the entire world believes design patterns like MVC, services and service providers, singletons, facades, factories, and states are the way to go, yes, yes you do need to prove OOP is harmful

>the entire world believes that my cargo cult programming practices are good
Your stating this doesn't make the statement true, your even if your statement was true, it wouldn't prove that your cargo cult programming practices are effective rather than harmful. Do you have any actual argument?

>"D-Bus is a simple way for applications to talk to one another"
>read documentation
>tons of config file editing is required
>code generation tools are requires
>additional steps into build system are required

Am I a brainlet who should spend more time learning the thing or is it really just not as simple as they claim it is?

>cargo cult this
>cargo cult that
isn't one either bucko

>"You need to provide arguments for why OOP is good, but I don't need to provide any arguments as to why OOP is bad besides labelling it as a 'cargo cult'"
This poster is clearly baiting, please don't respond.

hi im tryna learn c# and the documentation is so microsoft pajeet social media blog shit in street fragmented garbage it hurts

is there an easy way to control and manipulate attribute access like I can by using methods from the descriptor protocol in python?

I just want to have something like a __set__().