/dpt/ - Daily Programming Thread

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

Attached: 1540569773155.png (1024x491, 288K)

Other urls found in this thread:

bccfalna.com/core-asp-net-webforms/
twitter.com/NSFWRedditImage

and?

Lisp is the most powerful programming language.

JavaScript rocks!

Attached: js-rocks.png (1000x494, 369K)

Unfortunately, the only real C++'s competitor at this point is Rust. Why we need a C++'s successor is that it cannot scale to the demands of modern day programming needs. It's not 1970 anymore, people are not looking for primitive standard libraries.
They want good string processing libraries, networking APIs, a standard build and package management system. C++ has none of them.

Attached: 1536729500614.png (804x637, 64K)

All of those things exist, they're just not standardized. If standardization mattered to you, you wouldn't even consider Rust.

>C++ has none of them.
on the contrary it has all of them

>on the contrary it has all of them
So what's C++'s standard package manager?
>If standardization mattered to you, you wouldn't even consider Rust.
It does, which is why I don't consider C++ anymore.

I'm not working, but procrastinating like a motherfucker trying to draft a flowchart with all the recommended milestones when learning a new language. Can I have your suggestions? Here's an example to showcase what I have in mind.

e.g.
Rewriting old scripts and programs, reading the most recommended bibliography from cover to cover, reading and understanding other people's source code, programming challenges of a certain difficulty, writing something "original" yourself, etc.

Attached: peak-tism.png (920x1379, 65K)

I see you don't know C++ but just want to hate it

If you are missing anything from the STL then Boost most likely has it. But since Boost is not technically standard I guess the same applies again

Can you name even one language with a standard package manager?
protip: a convention that everyone follows isn't actually a standard.

I know C++ quite well.
So what's C++'s standard build system and package manger?
>a convention that everyone follows isn't actually a standard.
Prove it.

>I know C++ quite well.
sure thing, I can tell from your posts how much you know it

user here. Im a Java noob. I have this HashMap with values also being a HashMap. I need to make a copy of this. I had problems getting a copy which was not modified when I modified the original hashmap. Something about call by value, call by reference I guess, I find it difiicult. I came up with code that works, but I have to initialize the inner hashmap with "dummy" values, which is so ugly. Whats a better way to do this?


HashMap HashMap1 = new HashMap();
HashMap HashMap1_Backup = new HashMap();

//Some code here to fill HashMap_AllInfo
Set keys = HashMap1.keySet();
for (String key : keys) {
//put a dummy hashmap here to initialize...
HashMap1_Backup.put(key, new HashMap() {{put("dummy", "dummy");}});
Set keysInner = HashMap1.get(key).keySet();
for (String keyInner : keysInner) {
String valueInner = HashMap1.get(key).get(keyInner);
//...so that I can use .get(key) here without getting null-pointer error
HashMap1_Backup.get(key).put(keyInner, valueInner);
}
}

>I can tell from your posts how much you know it
Feeling's mutual.

Fuck, how does the code tag work? Sorry.

Attached: hashmap.png (761x216, 25K)

thanks for confirmation

Is Golang worth learning for a funnies web app project or should I just stick with C#?
The Google cloud/web app ecosystem looks pretty clean and easy to jump into, so I figured I might wanna try Golang, as well.

>I know C++ quite well.
#include
using namespace std;

struct Test {
int num;
void func() {}
};

int Test::*ptr_num = &Test::num;
void (Test::*ptr_func)() = &Test::func;

int main() {
Test t;
Test *pt = new Test;

(t.*ptr_func)();
(pt->*ptr_func)();

t.*ptr_num = 1;
pt->*ptr_num = 2;

delete pt;
return 0;
}

Always happy to help out a noobie :)

Dark theme.

Attached: 23532.png (1261x767, 37K)

I thought Golang was dying? It seems like Google has been caring more about Dart, lately.

Google really should bring Dart support to their GAE and GCP shit. Dart looks fun.

You should learn about reference semantics.

The only way to make a copy of an object in Java is the only way to make any object in Java - using the new operator to call a constructor. Assignment with = or by calling a method merely copies the reference to the object.
HashMap has a copy constructor which takes a Map as an argument and copies all the elements from it. Like this.
HashMap copy = new HashMap(oldmap);

Attached: Java primitive and reference.png (573x261, 18K)

feeling is mutual

>look mom I just learned about function pointers!
adorable

I have a m by n sized array of integers each holding a number to be used to represent pixel color, from 0-255. this is supposed to represent a picture.

How do I scale down this array into a x by y sized array? I see suggestions saying to use scaling algorithms like bicubic or bilinear but all the examples I see are for scaling up, I don't get how exactly you determine which columns/rows to keep and remove for scaling down

it still bugs me that we can't convert pointers to data members to offsets
I hate offsetof

>using namespace std;
kek enjoy your conflicting symbols

> pointers -> data members -> offsets
for reasons

that's baby's first C++

now explain this
struct A final: Foo {
A() = default;
[[noreturn]] virtual void foo() override;
}

template concept bool Equal = requires(T a, T b) {
{ a == b } -> bool;
}

it is for cruise control

Is there some sort of convention for separating multiple files being piped on stdin? I'm doing a graph thingy and I want to use tgf because it's the only sane format that doesn't have oodles of cruft and can be parsed by hand with zero effort, but I want to be able to pipe in several graphs. I could extend tgf with something to delimit individual graphs, but I'm wondering if there's an existing convention for that kind of stuff. Like, I dunno, 0x04 perhaps.

>mom I just learned about this C++17 [[noreturn]] and C++2a concepts, isn't it cool?
how cute

Is this supposed to be difficult?

is this c++17?

I bet you feel very proud of that virtual method too.
lmao. Is Jow Forums full of high schoolers?

Graduating in 1 1/2 years. Can some one tell me how do I not end up as a code monkey? What types of places should I look for work?

you should learn some UI design

Attached: [email protected] (2121x1833, 300K)

no but it shows how much shit c++ became with the latest additions

I want to get into programming and I want a job with it in the future.
What languages do you recommend I learn ?
I wanted to get more into web dev so I was considering PHP and Javascript (I still need to find a proper course for learning php7 since all of them are still giving php 5.6 that is EOL).
However I was also feeling interested to learn C# (because I wanted to take Unity up as a hobby).
Are there certain languages that would are in demand right now and would be good for a beginner to learn ?
Thanks for reading all of this.

All of that is pretty straightforward though. The only objectionable thing really is concepts.

MS PhD

>2018
>can't split a string
"oh but have you heard about the upcoming non-portable 2D graphics library in the standard yet?"
The actual state of C++ hahaha

Any good tutorials/books on ASP.NET, MVC5 and Entity Framework?

Nothing since my network got highjacked and I can't fix it.

here you go, pajeet
bccfalna.com/core-asp-net-webforms/

even C can split strings

Well, I'm not a UI designer and I know that I suck at that shit. Your pic actually looks kinda cool. I think I'm going to use it as a reference.

cpp cucks BTFO again

Attached: returning.png (640x854, 523K)

constexpr auto pi = 314LLu;
thread_local decltype(pi) rage = 0b10;

[[deprecated("fuck you")]] char16_t *f() noexcept {
return nullptr;
}

Jesus, zero pussy the thread.

AAAAAAAAAAAA

Attached: JUST.png (2880x1704, 1.24M)

>#include "../gl/texture.hh"
Learn to use CMake you literal retard

Attached: Screenshot_2018-09-26 g - dpt - Daily Programming Thread - Technology - 4chan.png (3328x740, 147K)

>he didn't saw the CMakeLists tab
sweetie

>having a CMakeLists means I know CMake
RTFM you fucking mongrel

>he likes to make assumptions based on a image
sugar..

>the absolute state of webdevs

Attached: Screenshot_2018-11-14_11-20-16.png (1225x197, 34K)

>he copy/pastes SDL headers
THE UTTER STATE

Attached: 1540916378574.png (711x590, 395K)

but if you (plan to) have different build systems, there is no need to shape your source structure around a single build system

Help.

I know enough to infer your sheer incompetence when I see a hardcoded "../" into your include directive

>NEETs on /dpt/ telling me how to program
honey..

>headers
Pretty sure he's copy/pasting the entire fucking SDL codebase
What a fucking retard kek

>they didn't the SDL folder in the project structure
babies..

How does it feel to learn that a NEET on /dpt/ knows basic CMake but you don't?

Is udemy a good place to learn programming from ?
Absolute beginner here

>can't even form a sentence
Are you experiencing an autistic meltdown?

>sugar
>honey
>babies
Nice defense you got there

ask at Jow Forums is absolutely the worst place to ask about tech related things

>knowing a huge bloated C++ build system
>compilation takes longer than compiling GCC
>requires learning a new custom scripting language

yep, sounds something a NEET would spend his time on

>hardcoded "../"
What's wrong with this if using C?

sweet pie pls

there is nothing wrong with it but it can be avoided easily

>properly specifying include paths will make my compilation slower
>call others NEET at the even of getting called out for stupidity as if finding a job was a special achievement for him
Peak insecurity
Using C.

so you're just complaining for nothing?
classic

Neat

Attached: 1520466750303.png (1920x928, 65K)

what
are you experiencing an autistic meltdown?
neet

>What's wrong with this if using C?
Another brainlet. Why do you think using C makes it any different?

Because I just looked at a couple mature, quality C projects and they use it.

ky

>Not knowing basic CMake
>Call others NEET

>CSV
>comma separated values
>separated by semicolons

Guess I'll try there, thanks bruh

>knowing basic CMake

It's okay, learning something in and out would overflow an average C tard's low capacity brain

Then how come they always say everything in Java is passed by value?

>Oracle 12.0 is 20 million lines of C code

Attached: 1542223903333s.jpg (125x60, 1K)

>1542223903333s.jpg
>s
It's $current_year and people still save thumbnails. Jesus Christ.

>pragma once
>hardcoding include paths
>litrally pasting 3rd party libs into your project
>pointless C style casting and not checking error
>Not using STL
3/10 see me after class

it's just to grab attention, newfag fuck

>It's another I was pretending to be retarded episode

>see me after class
are you going to suck me off?

Attached: 2018-11-14 21_37_09-Python 3.7 (64-bit).png (209x48, 1K)

I'm also interested, but am also lazy as shit and have no ideas.

What are you spewing on about?

>newfag fuck
It's "you newfag fuck." Learn grammar.

Yes. I like feminine penis.