/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Old thread:

Other urls found in this thread:

mono-project.com/docs/about-mono/languages/java/#compiling-java-code-to-x86-code
ddili.org/ders/d.en/
youtube.com/watch?v=iSmkqocn0oQ
twitter.com/SFWRedditGifs

How do I free a trie?

Recursion

Thanks

reminder that if unit tests arent a native feature of your language, it's time to switch.

such as

currently participate in a course about mobile phone application development. the main course is about java but the lecturer tell us that for the final project we can do whatever we want be it ios, android, etc.
Can i have a suggestion for what platform should i make my project on? please user?

depends on your field.

Rust.

>*for whatever reason*, it's time to switch to Rust

Rust and C# and maybe python

how can I become a C Hacker, /dpt/?

Learn ASM instead.

but C Hackers are cooler

(You)

What are some good MOOCs on algorithms and data structure?

>but C Hackers are cooler
Not really, ASM people have infinity more respect. C's learning curve is fucking nothing.

2^n > n > m/2^n > m/n > ...

> ASM people
All 3 of them.

A cookie clicker for iOS in unity, for my cousin to use as a sort of "proof of concept" when showing investors he can do stuff

D

>what is rom hacking
>what is emulation
>what is embedded systems
>what are compilers

C brainlets need to go and stay go.

>emulation
>embedded systems
Done in C.

>what are compilers
Generating assembly is far easier than trying to write large applications in it manually, and that's nowhere near the hard part of compiler-writing.

>what is rom hacking
Sure, I'll give you that one.

unless that thing is generating revenue i would look for something cooler to try to impress investors with

>there is no ASM in emulation
PLEASE stop existing.

...

>people still write emulators in assembly
But they mostly don't.

writing in != using
Emu's arent even just written in C anymore though.
In fact the big ones are sepples.

No, the actual project is unrelated to the cookie clicker he just wants a simple app to show off and say "look I'm a dev, too not just a network engineer," the actual product he wants them to invest in is based in customer service and would need to connect to restaurant backends and network all sorts of shit together (without giving away the idea it's all I can say).
There's no way we could make a demo of that, he needs money to get started and hire a serious dev team for shit. He has is drawing out the whole business model and plan and shit. Don't worry, not retarded.

>writing in != using
How are they "using" it, then? Emulating a particular CPU's instruction set in no way requires you to be an assembly hacker. I know it because I've done it numerous times.

If I have n different audio samples represented as 32-bit floats between 0.0 and 1.0, and I want to mix them together, do I just sum them all up and clip to 1.0 if the sum is greater than that? Is that all there is to it?

Is there a language that looks similar to java but gives you regular binaries?

Do they have anything worth reading in this guides? I just started python after java and c++.

you still have to use it and know it even if youre not writing it in 100% asm.

And for emulation you will eventually have to touch it. Don't even know why youre trying to argue this hard. C is on its way out because its a shitty brainlet lang.

java 9 will allow ahead of time compilation if that's what you mean

Is rust a meme?

sorta, but you should learn it any way.

>you still have to use it
You don't "use" it at any point.

>and know it
You don't even have to "know" it, you literal retard. You have to know the details of the CPU and the instruction set. Chances are you won't even see any assembly.

>C is on its way out because its a shitty brainlet lang
I don't even program in C these days anymore, but you're clearly some kind of degenerate sepples user. Assembly programming is pretty limited these days, even if you're programming embedded applications. Stop spreading misinformation.

What for?

insight

C++
;)

yes

Yeah, just add them together. As long as they aren’t correlated it’s not a big deal. Adjust the gain on the output. This is the canonical way to do it

basically I just want to be able to run it without the jre

c++ looks way to different

might run without the jvm but I doubt it'll run without jre

go look some languages with compilers that typically emit fat binaries like Go

j2exe?

mono-project.com/docs/about-mono/languages/java/#compiling-java-code-to-x86-code

What do you mean by adjusting the gain on the output? I also need to modify the final volume somehow? It's not determined by the sum of the amplitudes themselves?

Basically, no, there’s small trade offs for anything else. Go if you’re ok with losing a lot of OOP (a good thing, probably). Python if you know there’s an interpreter (any Linux system). D if you’re ok with a slightly less popular language. Vala if you’re a weirdo. C# if you’re on Windows. Typescript/dart if you have a js runtime. Don’t write cepples if you’re not comfortable with super complex memory management

But basically, no, nothing has the libraries of Java and the ease of writing

>compile java program with static jre
>hello world binary is 218mb

C# can be compiled to native code?

I mean turn the volume on your speakers. As long as the signals aren’t correlated it’s fine, this is how your ears work. Adding 10 uncorrelated samples won’t make it 10x louder, it’ll be 3.2x

D, it's probably the most under-rated GC'd language

> the most under-rated GC'd language
That would be Haskell. D really has nothing special about it to be underrated, it's just a weird C++/Java hybrid from the late 90s.

who here uses vscode
i am trying to get it to check my python code for errors as I go like any IDE would, I have the python extension installed and pylint, all the paths are correct settings are turned on, and yet nothing happens
i can write gibberish and not a single complaint will show anywhere

Haskell would be one if it wasnt painfully slow.

>hasklel
please. Go circlejerk about your type theory academia bullcrap somewhere else

>i can write gibberish and not a single complaint will show anywhere
Isn't that how Python works?

lol, Haskell is not underrated. It’s taught at universities and every programmer I know knows it, including my nonhacker engi friends

>haskell is so underrated!
Is that why it has armies of shills telling everyone how great it is everywhere and all of the time? Looks rather overrated to me.

did you reload it?
Did you make sure your PATHs actually work?

>every programmer I know knows it
Guess how I know you're a sepples user. (Protip: don't lie so boldly next time)

haskel fast, just don’t use any builtin data types and write this 200 line symbol soup pure code that simulates nonpure code :-)

cepples is disgusting. move to SV and meet skilled programmers, it’s refreshing

I'll probabbly look D then

yup, that location is in my PATH and pylint is also installed on that environment

I'm surprised more people are attacking Haskell than defending D.

ddili.org/ders/d.en/

...

so you can actually run python stuff but none of your extensions work?

Maybe because haskell is useless?
youtube.com/watch?v=iSmkqocn0oQ

kys fag

>I'm surprised
why is that? haskell is fucking garbage and its users are smug reddit fags. D is meh/irrelevant

thank you user

poorfag neet is mad he can’t into irl professional satisfaction

Okay I wasted a whole day because I lost interest in reading through "Compositions", "Aggregations" and "Association" --because I fail to see a practical point of these theories.

This means that I am moving too fast with C++.

I have been doing uni-fags' homeworks in reddit for free because I like doing those and it boosts my confidence. I dropped out of the uni. Where can I find some more uni homeworks?

How about you build up your portfolio and apply for jobs lad?

np

How do I program in machine language?

I must be overlooking something. Where am I supposed to check if they don't work? All the consoles don't say anything is wrong.

In C++ can you forward declare standard library classes like fstream?

>jobs
Dude I don't even know about inheritance, move-semantics and templates yet. I have a C++ project as a clear goal though

become a hardware dev and make your custom environment.

cute

read the specifications of your CPU

dumb frogposter

fun ends here

Read the manual.
It's not any harder than ASM, just more tedious.

Are you actually saving your file after the gibberish?

...

So i have two local variables in C with same name. One is declared right in method and another is declared in code block inside method.

How do i access outer local variable without using pointers? (this is done just for research purposes)

Currently i managed to print outer variable using pointers

[CODE]int a = 10;
printf("%d", a);
if(param == 15) {
int a = 99;
int *ptr = &a - sizeof(int);
printf("%d", *(ptr));
}[/CODE]

Didn't watch the show but why was she being a dick?

...

Yeah, not like that matters though I have autosave after delay and lint on type enabled

It's literally assembly, only with mory cryptic commands (instead of "mov ax,0x3" it's "01100110 10111000 00000011 00000000").


A lot of those higher design patterns are pretty pointless unless you do large scale development.

>Maybe because haskell is useless?
You didn't understand the point of that video (if you even watched it at all).

bump

>implying that you need to know any of that to get a job as a webshit

Over the line, sicko!