/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Previous thread:

Attached: andrewrk.jpg (460x460, 35K)

Other urls found in this thread:

asciinema.org/a/193585
wiki.theory.org/index.php/YourLanguageSucks
codewithhugo.com/change-the-date-of-a-git-commit/
cs.lmu.edu/~ray/notes/nasmtutorial/
nostarch.com/assembly2.htm
github.com/Battelle/movfuscator
twitter.com/NSFWRedditGif

Wait. Are you the guy that created Zig? I Do you really want to be known as someone who visits Jow Forums?

Why do anime girls make the best programmers?

Attached: cV6Z5HT.png (953x587, 236K)

>want low latency audio for my gamedev framework written in C that's going to replace Unreal and Unity
>read about audio callbacks
>everyone is shilling NO BLOCKING CALLS IN THE AUDIO CALLBACK
>obey, use an atomic ring buffer, even tho it's inefficient (copies data twice, once to the ring buffer, then to the ALSA buffer
>fucking 20ms latency unless you kill the sound server and use hardware directly, if you try to lower it you'll get underruns, because ALSA calls the callback irregularly and you can't predict how many frames is it gonna ask next time, so you have to keep the ring buffer pretty full to avoid underruns
>FUCK YOU SHILLS
>use a spinlock in the audio callback
>nothing bad happens
>no redundant audio copying
>less than 10ms latency
>no underruns
>the shills were wrong
I'm an innovator and a scholar.

Attached: meanintellectual.jpg (764x551, 263K)

I like C!

>my gamedev framework written in C that's going to replace Unreal and Unity

Attached: 1521424591993.jpg (228x221, 11K)

cope harder csharplet
your days are counted

Attached: punch.jpg (575x512, 18K)

Emacs is the most powerful software ever written

Sauce for OP?

*most unergonomic

This.
Use GNU nano.
You can even browse internet with it!
asciinema.org/a/193585

That's why is modifiable and extensible, so you can make it fit to your definition of ergonomic. Evil-mode is a popular package, if you like vi bindings

It depends whether the callback is actually real time or not. If it is, you need a non-blocking progress guarantee in order to even begin trying to hit the deadline. The problem with blocking in a RT scenario (on a non-RTOS) is that your producer thread could take the lock and get context switched out, almost certainly causing the consumer thread to miss the next deadline. I don't know what ALSA is doing behind the scenes, but in some cases missing a deadline could cause the entire system's audio to glitch and in the worst case it could damage hardware or somebody's eardrums.

That being said, the fact that ALSA's callback asks for a variable number of samples probably means that it's actually not real time, and that it's not really all that low latency, either. Just pushing the corresponding amount of audio each game tick is probably the best way to go. True low latency audio on Linux means using JACK with RT scheduling in the kernel (and then you actually have to ensure your callback meets its deadline).

How is nano more ergonomic when it shares the same basic GNU key bindings? You have to be autistic to use nano over full fledged emacs. There's no rational reason to do so.

Which is a good programming build?

C, Python and JS are all you need.

Attached: D08FCCFD-CFF0-4AAC-A24C-517FE6C6DC50.png (628x714, 107K)

it's the zig creator's github profile pic

the ideal programming build is the lowest spec'd computer that you can get your hands on, especially for gamedev.
Devs should be forced to use low-end hardware so they'll feel the full force of their shitty code thrashing all their disks and swap.

This is serious advice btw, buy an old thinkpad or the cheapest windows 10 laptop you can buy and install debian with a minimal wm.

Attached: mmm pizza~.jpg (968x1148, 567K)

That's why rebind literally every key.

Lisp is the most powerful programming language.

and what is that bottom line nowadays? as waiting 20m for my Intel Centrino to compile haskell code is too much.

That's not a real thing.
Also, use makefiles so you don't have to recompile everything all the time, just recompile changed source files and relink the binary at the end.

This is a nice idea until you realize you have no vulkan, and you're stuck on openGL 2.1

OpenGL ES 2.0 is all you need.

no it's not.
pre 3.0 sucks

raspberry pi 4 can really be a thing?

Honestly better just to target windows 10 if your a game dev. That’s the actual lowest common denominator.

Yes it its.
Textures sucks, don't use them.
Only use colored triangles, and that's it.

Attached: 2019-09-07-040311_1366x768_scrot.png (1366x768, 21K)

Guile Emacs will be too powerful for this world and on the day that it is finished, Earth will become Heaven.

I’ve been programming for nearly 9 years now and hate it. Strongly considering becoming a hentai artist and starting a project patron for some degenerate fetish, which one pays best?

Attached: F3391516-5A76-486C-BB30-5FEF49191679.gif (500x373, 1020K)

Nah, for gamedev you want something like a 2200G or 2400G so that you get a few threads and an up-to-date graphics architecture without a lot of raw power to use as a crutch.

for every 1 "how the fuck are they making this much" patreon, there's a hundred 0 patreons who've grinded for years with no avail.
The market's seemingly random, unless you specifically fill a niche or usurp one.

furries pay the most but it will warp your mind

terry davis had the biggest server processor money could buy

Why do I need to explicitly link math.h to compile in gcc?

There's nothing wrong with being attracted humanoid furry creatures. It's being attracted to "feral" shit that is mentally ill. Every normie though the rabbit from zootopia had nice hips and ass

The virgin raster vs the chad vector graphics.
The virgin raster textures:
>requires an artist
>limited resolution
>doesn't work well with different aspect ratios
>changing a texture requires a lot of resources
>using a texture atlas fucks up the sprites when mipmapping
>using a texture array requires OpenGL ES 3.0 which is not well supported on phones
>additional resource consumption
>additional complexity - if you want to port your game to your own hardware like arduboy you will have to write all the texture handling yourself
The chad vector models:
>autistic enough a programmer can code them himself, no editor needed, literally just source code
>infinite resolution
>any aspect ratio
>simple
>fast
>portable
>original

Attached: triangles.gif (768x768, 721K)

It’s an anachronism. I think it was more common to reimplement the math library back in the day for different platforms because of hardware limitations.

Is Swift shit? Why?

wiki.theory.org/index.php/YourLanguageSucks

It’s ok but doesn’t have any special qualities. The only reason to learn it is if you want to work on software for applel devices, because they are pushing it as the replacement to Obj-C.

It's not there

then it means it's so irrelevant it's not even worth looking at, unless, as said, you want to be a professional Apple developer

imagine being this deep into your mental illness that your rationalization is simply that everyone does it, which you must know deep down is false

Not everyone is into furshit particularly, but near everyone finds some level of furshit arousing, and it is perfectly normal because they are drawn to have attractive human features. Not everyone who's into that is a cancerous erp-er with an OC or even worse have a fursuit and dress as their OC in real life.

by your definition, everyone who faps to 2D is mentally ill because they fap to drawings of women they find attractive

but that's not what I said at all

only furries watched zootopia.

please tell me more.
do you have a book?

>no order or categorization to the languages at all
do I just add new languages to the bottom?
every language I like sucks to the point of not even being mentioned.

Attached: javaocd.png (494x390, 232K)

don't listen to me
I'm a failed gamedev
the best I will achieve will be a couple of game jam titles nobody will ever look at

Attached: output.webm (1366x768, 364K)

It's a programming language.

make it a cell phone app

I'm still making an algorithm that can create 3D models from 2D images.

There are over 36 of them already. I counted.
Maybe one day I will start a YouTube channel where I will make games in less than 30 minutes. This one won't be more than 200 lines of code when finished. Currently 96.
The triangle animation is 27 lines.

patent it

I don't even know what to ask...
I'm in uni, last year, this is our last big project, we work in groups of 6. I'm pretty good and the guys on my team are pretty good. We rocketed off pretty fast while other groups struggled with simplest features.
We'll most likely be able to deliver all project features, optional ones and the most advanced ones.
The problem is that I know that some of my team members have friends on other teams and I suspect that they will literally let them copy paste our code. There is going to be a big presentation at the end and I don't want to see other groups take credit for our work.
We work on git. Is there anything I can do on tech side to prevent this?

rm -rf *
git push -f

Interesting question.

Attached: crabman.jpg (184x184, 12K)

you're in uni. anyone stealing your work is just cheating himself out of an education. don't worry about it.

oh fuck this one won't do shit
rm -rf *
git add .
git commit -m 'nothing personnel, kid'
git push -f

Computers used to have only 4 megabytes of ram? How did they run Java?

I would be more concerned about failing for plagiarism. Could you give the professor a copy of the code early?

java was a skinny lady with nice fake silicone tits back then
now it's a fat slob with sweet low, swing chariots

the dates will show in the git log

Are you sure?
codewithhugo.com/change-the-date-of-a-git-commit/

threaten them if they leak code? you're dealing with literally the weakest part of op/info-sec

the first Java application of any kind that I ran was a web browser, written in Java and extensible with Java applets.
This was on a Pentium, 133Hz CPU, with 16 MB of RAM.

The browser took tens of minutes to even load to a usable state.

the professor's not dumb. He's going to see a bunch of girls' teams submit code that looks similar to code written by a boy on a team with girls.

Java would have run on the (relatively) beefy servers and mainframes, not PCs.

>133Hz CPU
The fucking state of Intel
holy shit
my overclocked relay CPU is like 10Hz

>Hz
lol, MHz

thanks for shitting on rust so much
I'm learning it and actually like it
remember: Jow Forums is always wrong

After Guile Emacs is complete, of God so allows its completion, we will begin Guile Rust Emacs, rewriting the C parts of Emacs in Rust. Then we will begin Rust Guile Rust Emacs in which Guile will be rewritten in Rust. At that point Rust Guile Rust Emacs will be more powerful than God, and with it humanity will defeat God and assume their place as the new ruler of Heaven.

Good for you.

i bet you rasterize them in some shader instead of doing it the ultra chad way of precomputing SDF's

checkmate you filthy pythoneer

based

This. Also never use OO "features" in Python and JS.

how's the hrt going? when's the op, user?

>index.php/

really well, thanks

const fooBar = () =>

function fooBar()

Javascript is retarded.

Truth.

Are you saying that lisp is shit?

Working on a compositor and animation program. Very comfy

Needs more compression artifacts.

const fooBar = () => {}

is ES not JS, and is an analogue of
(function() { }).bind(this);

not
function fooBar(){}

retard

Trying to learn Assembly, but I'm having a lot of trouble finding any guides that list the tools and resources to compile a simple x86 assembly program. I haven't event found a guide that says what extension to save in yet.

Attached: Xisd93MS82kP.png (640x480, 196K)

Well right now I'm focusing on other things but eventually I'll get around to adding more compression artifacts. How many are good enough to pass Steam screening?

cs.lmu.edu/~ray/notes/nasmtutorial/

extensions are a windows thing, they don't actually matter. the convention is .s though.
I've heard good things about nostarch.com/assembly2.htm go find a pdf on libgen or something.

helloworld $ nasm -f elf -o hello_world.o hello_world.s
helloworld $ ld -m elf_i386 -o hello_world hello_world.o
helloworld $ ./hello_world
Hello, World!
helloworld $ cat hello_world.s
%define sys_write 4
%define sys_exit 1
%define stdout 1

BITS 32
section .text
global _start

_start:
mov eax, sys_write
mov ebx, stdout
mov ecx, hello_world_str
mov edx, hello_world_str_len
int 0x80 ; write("Hello, World!\n", 14)

mov eax, sys_exit
xor ebx, ebx
int 0x80 ; exit(0)

section .data

hello_world_str db 'Hello, World!',0xa
hello_world_str_len equ $ - hello_world_str

>go to commit history
>go one commit back
the whole project is there. You'd have to rollback all the commits to the first one.

Looks cool as fuck, keep at it.

You proud of yourself? kek

rewriting the windows kernel in postscript

I am coded.

Attached: CDE06FB4-F8B8-438E-9D32-D8D03F839F33.jpg (400x400, 19K)

github.com/Battelle/movfuscator

Attached: 1550342247529.png (911x81, 8K)

Yes, it is good-enough for running Emacs and shit like Rust.

Wouldn't this burn out the MOV circuits in your CPU since all the heat is going to be localized to the logic for one opcode only?