/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Last thread:

Attached: yuki.gif (450x258, 2.34M)

Other urls found in this thread:

stackoverflow.com/questions/1335786/c-differences-between-char-pointer-and-array
youtube.com/watch?v=AXymNSorgnc
nimble.directory
pastebin.com/RaVFds4g
twitter.com/NSFWRedditVideo

webgl 2d renderer with supersampling AA

Reminder that arrays are not pointers and you should read K&R as well as the standard if you think otherwise.

This, especially if you don't like C.
Before shitting on something, you have to at least know it first.

Getting into the world of emulators and VMs. Shit's interesting even though I'm just starting.

I don't write in Rust. It is slow and irrelevant.

What is the actual implication of this though? If they decay to pointers by default anyway, is it actually harmful to think of them as such, besides the fact that it's not technically correct?

It's almost as if the language was awfully designed to begin with.

I will write my software in Scheme, and you will like it.

Attached: trim_立ち絵/ジュリア/戦闘.png (559x1229, 464K)

Lisp is the most powerful programming language.

most western swords don't work that way, otherwise you wouldn't have half swording or the technique of striking people with the cross guard by holding it backwards

Is there a good modern learning C++ for programmers book? Like Advanced C++, but using current preferred idioms rather than C++98? I want Herb to be proud of me.

*Accelerated, not Advanced

The standard says they’re pointers, you projecting retard.

nah

Attached: cecurity.jpg (1920x1080, 855K)

The people who know it, shit on it, and say arrays are pointers are the same people.

stackoverflow.com/questions/1335786/c-differences-between-char-pointer-and-array

Yeah, but WHY does it matter that arrays aren't technically pointers since they decay to pointers in all but like two situations?

I was saying they are pointers.

for one, it's not safe to assume a block of memory is writable if you assign "a string" to a char*.

It’s still just a const pointer and works the same way.

well no shit, all a pointer is is a location in memory. By that logic everything almost everything in your program is just a pointer. When you get different behavior from identical lines of code depending on whether or not an array was actually used, it's obvious you should consider them distinct. If you can't into details I'd recommend javascript

>almost everything in your program is just a pointer.
How can you be this stupid? By no logic is this true in C, maybe it is in Python where everything is a reference to an object.

Attached: 6947DDEC-8835-4D03-BDD0-10FD71BDA26A.png (1500x952, 159K)

is C++ the language to learn for graphics programming?

You don't know C if you believe arrays are pointers.

Yes

If you want to do 3D and make an engine from scratch.

yeah, but you don't have to be 3 books deep. start looking at shaders right away and go back to the woodshed everytime you see something you don't know.

c++ binary for graphics is deprecated

use webgl, it will run for at least 20 years

Haskell is not meant for straight people.

Attached: FDEB66DD-9C57-46DD-9CE9-1CB420E7533E.jpg (749x1013, 206K)

>lel every language i don't like is a tranny language
Please end this cancer.

If you make a distinction between pointers and arrays, you're an insufferable faggot. Pretty much the only meaningful difference is in the behavior of sizeof.

I actually like Haskell. It just has a disproportionate number of tranny developers because it’s so euphoric.

Literally everything has a disproportionate number of trannies.

>understanding proper language definitions makes you an insufferable faggot
You're never going to make it.
sizeof() behavior alone is a pretty fucking huge reason to be aware of the difference.

How did that even happen? The one thing programmers should excel at is binary but mutants have taken over the whole industry.

>You're never going to make it.
I've made it for quite a few years now just fine.
>sizeof() behavior alone is a pretty fucking huge reason to be aware of the difference.
Literally makes no difference, when you'll always use sizeof(x) * n anyway.

I blame bytes. People no longer care about bits, so they get snipped off.

link repo

What’s a good syntax for reading and writing to files? Should I just keep it simple?
write(“hello”, “file.txt”)
data = read(“file.txt”)

func > file.txt
func < file.txt

By all logic this is true in literally every language. Even functions are a pointer.

Would program be faster written in C instead of C++?

maybe

Yes, but you should only use C for small things.

You're unlikely to see any significant difference.

Thank you.

What are some of the most difficult fields in CS where you're less likely to encounter trannies and pajeets (i.e. no web dev, no java) but also has some job opportunities.

Friendly reminder the C hater is also shilling for Python and C#, laugh at him

Attached: WrongProgramming.jpg (400x518, 49K)

>become software engineer
>start saying nigger more frequently
am i going to become the next terry?

>Implying Windows XP can keep up with that input.

array is an operator to do pointer aritmetic

But I don’t like C#. You’re thinking of multiple people.

Does perl talk belong here or wdg?

Please no C# bullying. It's comfy when you need a quick proof of concept.

Help I'm only taking this java online course because I'm getting paid to. This instructor barely speaks English so I never know what's gibberish and what's not.

3 times now he's had us do exercises where we copy and paste his code and compile it and explain what it does. Every time the output is garbage and the class discussion board is full of confusion.

Attached: 2019-02-15 22_16_53-Window.png (531x542, 28K)

>How did that even happen?
People enabled them. All these disgusting tranny monsters should be shot.

Depends on the implementation details.

I was just watching this youtube.com/watch?v=AXymNSorgnc
lol

>worthless graduate students, whose computer skills appear to be limited to downloading bitmaps off of netnews?

I don't even know how to do that. Why can't I be as good at computers as people who didn't even have them

youtube java tutorial

False. Python and C# are trash. I use C++.

I like Lisp.

Attached: 1447681664557.jpg (500x364, 27K)

I only know Python, how fucked am I?

have you contributed to /ourlang/ yet?
nimble.directory

Attached: happy_megumin.png (512x512, 144K)

completely

nim is trash

python is fine but you're probably fucked cause ur a dumb dumb though

no u

Attached: megumin_pout.jpg (1552x873, 167K)

working on creating a chess endgame tablebase

I used this syntax for file io in my toy language. Is it fine?
write “hi” -> “test.txt”
print read(“test.txt”) #prints hi

no, extremely inconsistent
if you're going to stick with the first line, do
write read("text.txt") -> stdout

I’d rather change write than complicate print. At worst I could just do what Lua does.
output “test.txt”
write “hi”

"_____ is trash" is not an argument

Why is Turing Machine simulator rated as difficult on this, half the medium ones seem harder.
Also please rate, I just taught myself C based on what I knew of C++ and searxing.

pastebin.com/RaVFds4g

Attached: Roll.png (3840x2160, 1.61M)

It depends if you need another language.
If so, knowing one will make it a lot easier to learn.

I know C/C++, C#, Java, Python, JS/TS, Ruby, SQL. C++ only up to C++11, bet the rest is up to date. How fucked am I?
Don't know bash trough, fuck that shit.

hey are there any other pics like this?

Yeah

can i have them plz

Attached: 1548525306774.png (297x363, 221K)

Anime is shit.
Animetards may not reply.

How does one even contribute to SO?
>browse new for a tag up your alley
>9/10 questions are literal pajeets that can't into English
>by the time you read a legible question someone else already answered it
>browse featured
>already answered
>browse unanswered
>already answered

why would you want to

To prove I'm as smart as the pseudo intellectuals that lecture people for asking questions that are "too broad" or "poorly worded"

Welcome user, Lisp will be THE language for you.

Wtf do you even do in a "programming job" ?
Like, what tasks are needed from you?

A couple of uni students I know literally got a dev job just by having an extensive SO profile

No. Anyone who tells you otherwise is uninformed.

Do you know who pic related is?

Brand new programming brainlet here. Attempting to learn python.
while True:
for i in range(9):
print('word')

How do I make it so the for has it print 'word' a fixed amount of times while for is in a while True:? because that code right there loops forever unless I take out the while True, but I want to be able to use `for i in range(x)` inside of while True's.

what symbol does a clang plugin need to export on windows to register and for that matter what is it
i've figured out a way to get round windows being stupid by aliasing the demangled name to the llvm mangled name
but i need to know the name of the symbol and what that symbol actually is
tell me
tell me


how the fuck do you only learn up to c++11
how does that even happen
did you read one book and that's it?

It's great, but I feel vaguely uneasy about learning CL since everyone's using more modern languages.
The thing is, apart from some weirdness with hashtables and LOOP it doesn't feel old.

Attached: 1413153243437.jpg (430x318, 71K)

Well designed high level languages are timeless.

I've made it possible to mmap() the display framebuffer in my OS. I've also added some ioctl()'s so that userspace can do fast double buffering and change the resolution.

I'm getting real close to kicking WindowServer out of the kernel and into ring 3 where it belongs. :)

Attached: Screenshot at 2019-02-16 10-50-25.png (1920x1080, 959K)

I can't seem to grasp how I am supposed to deal with Maybe return values.

Why?
You either return something or Nothing.

>because that code right there loops forever unless I take out the while True
Well yeah. What else would you expect while true to do?

What does this code do?
It prints word 9 times, and then prints word 9 times, and then prints word 9 times... ad infinitum. Right?
What do you expect to be able to do by "using a for inside a while True"?

Returning the values are not a problem. It's what I'm supposed to do with the return values from the function call that I'm having blockage about.

what's the specific case you're struggling with right now?