/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Last thread:

Attached: hs5.png (692x650, 408K)

Other urls found in this thread:

felixcloutier.com/x86/PMOVMSKB.html
twitter.com/NSFWRedditVideo

nth for nim!

Working on a bot that fropposts randomly in threads on all the boards throughout the day.

I want to write a rougelike in haskell
How do I make one of those sexy ascii interfaces in the cmd line?

fixed
struct string {
size_t len;
char str[];
}

Java got strings rights.

char value[];
int length;
int hash;

so simple.

ncurses for your roguelike. The sexy ASCII stuff is aalib/libcaca though, but is probably not needed for your game.

>hash
gtfo here, druggie.

Please keep the comment for clarification.

sexy how?
cogmind like?

programming is for indians

Java got everything wrong
>Scanner
>Runnable
>new BufferedReader(new FileReader(new File(name)))
>java.util.Arrays

>filter tripcode

>moving goalposts

>being retarded

dumb frogbotposter

>Pajeets furious at their god-language being insulted

No one insulted C++ or Javascript.

>t. POOjeet

Imagine being this insecure.

Lol, relax autismo, I'm just kidding. How do you not know what that other user meant?

This is why mom doesn't like you.

Is there a resource for the intel intrinsics, other than the reference guides from intel, to learn about them? This function confuses me greatly
_mm_maskmove_si64 (__m64 a, __m64 mask, char* mem_addr)

What's the point of this? No bully pls

Lisp is the most powerful programming language.

But that's why your mom loves me.

hash, just like, makes your programs faster man, you feel me. it's like they got their programs in their monkey suit and weighed down with like all that saturated animal fat toxicing up their bodies and here I am running up the Mississippi butt naked, just gliding on the aether. I mean, how can they like keep up? they just like go nowhere faster, I mean yeah, they get there faster, but they get nowhere. am I making sense?

What does Lisp have over Rust aside from being slow?

Rust is just another Lisp.

I get you, man. You're cool, bruh, you can kick with me anytime.

That's not true.

cogmind does not run in a console window; it uses its own graphics engine (and even its own bitmap fonts)

Lisp is the programmable programming language. Therefore, all programming languages are really just variants of Lisp.

brainlet

What part don't you get? Searching maskmove x86 brings up

felixcloutier.com/x86/PMOVMSKB.html

si64 I assume stands for signed integer 64, so it's operating on mem_addr as though it was int64_t*.

Why don't more people learn assembly?

It's fucking useless for any practical uses outside of very niche areas.

They're too busy writing software.

not an argument

xD

Assembly is the most overwhelming language for a project outside of a more capable esolang.
The sheer amount of work compared to other langs is immense. I do think ASM should be mandatory in all CS courses though.

I have an idea of what it does, but why would someone need this?

Which one? Also x64 is an awful pile of hacks which only compilers can make sense of.

You're reliant on hand-written assembly right now. Ungrateful twerps.

fuck off edgelord.

People barerly learn compute architecture let alone asm

It's meant to be used by compiler optmizations and low level code. I don't know about that specific one but it's basically the CPU can do thing very fast so if you need to generate code that does thing use the instruction.

>It's meant to be used by compiler optimizations and low level code.
Yeah, I'm aware of advance vector instructions, and SIMD.

> I don't know about that specific one
That's what I mean.

Making someone learn x86 is outright torture. The only experience you get out of it is why CISC sucks and should have been burned in water with the P4.

CS and programming has far too low a barrier now. It needs raised, and the shitters, filtered out.

>Making someone learn x86 is outright torture
What? You should know how x86 works.

>The only experience you get out of it is why CISC sucks
Do you prefer RISC? CISC is high level enough to program in.

Make them take a math course ;)

RISC is the superior architecture.

I don't know where that would be used, if you're really curious maybe try

find | objdump | grep

Most programmers would be better served writing a VM for a simple, made-up ISA than actually learning assembly for a real architecture (most of which are dogshit, especially x86). That way they can learn how a computer works (at the ISA level) without having to deal with the arcana of real hardware.

>RISC is the superior architecture.
>That's why ARM out-perfo-

>RISC is a superior architecture
>That's why every Intel chip for decades now have been RISC under the hood in the microcode

CISC is high level RISC*. This I don't deny.

*Close enough analogy

It's really simple. If you are still using C over Rust then you are retarded and have no room to talk or give any advice on programming. You are the reason why software is full of vulnerabilities and is shit. Have a pride badge, you deserve it for the billions of dollars you cost companies in exploits that go unpatched because C is maintainable mess. Don't even bother replying to me if you avatar post.

How do I make a powershell script that gets specific info about my computer and exports it to a csv file?

Attached: tumblr_oemr33kiUk1sg22dvo1_1280.jpg (460x604, 77K)

>Have a pride badge,
sasuga

get-info | export-csv ...

>powershell script
You don't.

If you love getting blacked, semen, and servicing men, you should program in Rust. Real men program in C, because they're not a bunch of scared pussies who are afraid to make a single mistake.

>still trying to shill your failed language here
just fuck off cultists.

...

...

>someone had the audacity to tell me the truth in my safe space

Attached: 1519794353734.gif (265x260, 1023K)

You're a retarded shitpost Cnile that as predicted can't even give out good advice and was immediately wrong about

>using windows powershit
>programming advice
>too autistic for jokes
wew lad

Attached: 1519528052641.gif (220x258, 195K)

im using powershell for a class

That's fine, I was just teasing you for using wangblows.

Why did Algol die? It basically had all the concepts you find in modern languages, yet it died off.

Leetcode or Hackerrank for interview prep?

Attached: 714F5GrOpdL._SY717_.jpg (477x717, 98K)

because it was a shitlang

Learn Lisp.

C, Java and ADA killed it.

What anime is your avatar from? She looks so cool.

Attached: YOU_KNOW_2.gif (450x478, 587K)

Noice.

Attached: pirate pepe plus.jpg (499x499, 93K)

BANG, one less haskell neet in the world.

Attached: .png (2048x1536, 2.63M)

I hate you guys

>taking a dumb coding class as a senior in college to satisfy a credit
>know absolutely nothing about coding and hate it so much
>half asleep I hear the foreign professor mention "Jow Forums" in the middle of the lecture and asks if anyone knows about it
>then edgy looking kid in the back smirks and raises hand and started talking code bullshit about it
>shit, looks like this guy it a Jow Forums man, awesome
>want to talk about Jow Forums but don't know anything about code so I am quiet
>next class sit by the Jow Forums kid
>ask him how long he has been browsing Jow Forums
>"browsing what?"
>Jow Forums, the website you and the professor were talking code shit about yesterday
>I think you mean "fortran", user.
>turns out there is a coding language called "fortran"
>oh fuck, nvm

Attached: 1512285215494.png (600x600, 275K)

Audibly kek'd.

>t. brainlet

Attached: alex.jpg (1920x1080, 150K)

what's your major anyway?

Is D with betterC the most beautiful programming language or what? I don't think I'll be spending much more time with Rust now

>That one person who has been shilling D on Jow Forums for nearly a decade now

What kind of job will allow me to finish my work in the first 4 hours and dick around for the last 4/5?

Attached: joe-gato-gallery-impractical-jokers-tru-tv-325.jpg (325x400, 59K)

Environmental Science. Had to complete a Java class as a pre-req for Remote Sensing and also GIS for some retarded reason. I pressed my advisors about it and everyone agreed it is an irrelevant pre-req.
I probably hated that class more than any other I have taken.

How will LISPfags ever recover.

Attached: .png (816x603, 271K)

Cniles will never know the joy of UFCS ard parenless function calls.

ALGOL 60 had major portability issues, there were multiple official dialects and many unofficial ones, as well. So, ALGOL 68 came along, but it was just a shit language:
It had half a dozen different ways to represent "nothingness," including skip, (), nil, void, and empty, all of which meant different things.
The standards manual used this ridiculous notation for describing syntax and logic called Van Wijngaarden grammars.
It has a 6-tier system for type coercion. 5 of them have side effects.
Essentially, the US DoD didn't like ALGOL 68, so they made Ada for their own purposes, and then C came along and gradually took over the American private sector.

I hope we're not talking about Rust's (misnamed) take on UFCS.

There's atleast 4 of us here now.
We're growing stronger.

No, D.

>It has a 6-tier system for type coercion. 5 of them have side effects.
good lord. Thank god atleast one shitlang died.

I don't think the hash should be copied around like this. Stick it just before the actual string.

I don't know where I would ask this besides sqt but where do I go or what should I do to start learning programming?
A couple months back I started doing "learning python the hard way" but it got way too repetitive with the whole "COMMENT EVERY SINGLE LINE AND NEVER USE AUTOCLOSING OR AUTO COMPLETION OR ANYTHING ELSE THAT AN IDE OFFERS EXCEPT FOR WRITING TEXT OR ELSE YOULL NEVER LEARN" was really discouraging. also the "DO EVERYTHING EXACTLY AS I SAY AND NEVER COPY PASTE ANYTHING DESPITE LOOPS NOT BEING INTRODUCED YET AND HAVING TO WRITE EVERYTHING OUT 10 TIMES" wasn't fun either. I'm pretty sure I remember him saying that you couldn't use syntax highlighting either. I suppose that's why it was called "the hard way" but I got burned out on it really quickly.
So last week I found "C programming: an absolute beginners guide." So I downloaded it and started setting everything up but for the fucking life of me code::blocks just wouldn't work, and compiling C in atom or vs was way more work than I wanted to do every time I wanted to compile.
So yesterday I stumbled upon the python crash course book by eric matthes. It seems like a good book thus far for learning programming but the chapters are long as balls seeing as how you have to do all the practices, and 2 days later I'm barely started on sorting lists despite doing it for 6 hours so far
Maybe I'm just being too picky for an absolute beginner but certainly there's a better way. How did you guys learn? Nobody ever really talks about this despite there being a million different books on it.

How do you have side effects during type coercion?

From what? Lispfags have CLOS, the most powerful object system. It's the C and Haskell programmers that sperg about OOP.

C/Haskell developer here, can confirm that OOP is the devil

I primarily use C, but if you think OOP is trash, what are you doing with your life? How do you implement abstract data types?

>abstract data types
please leave shit to the pajeets.