/dpt/ - Daily Programming Thread

old thread: What are you working on, Sup Forums?

Other urls found in this thread:

mbebenita.github.io/WasmExplorer/
github.com/fchollet/keras/blob/master/examples/cifar10_cnn.py
github.com/bagnalla/holyc_mal
en.wikipedia.org/wiki/List_of_programming_languages
robmiles.com/c-yellow-book/
twitter.com/NSFWRedditGif

pi calculus is imperative because message passing is imperative

Added support for textures in the Glass BRDF of my c++ path-tracer, pic related is the result so far

Is wasm performance really comparable to c++? I'd like to port this project to the browser but I'm using multiple threads to render and I've always heard webworkers are awful/incompatible

whatever

Advent of Code day 3 part 1 in O(1)

def hamiltonOfSpiral(number):
print ((1 + int((int(sqrt(number - 0.5)) + ((int(sqrt(number - 0.5)) % 2) - 1)) / 2)) + abs(((2 * (1 + int((int(sqrt(number - 0.5)) + ((int(sqrt(number - 0.5)) % 2) - 1)) / 2)))/2) - ((number - (int((int(sqrt(number - 0.5)) + ((int(sqrt(number - 0.5)) % 2) - 1))) * int((int(sqrt(number - 0.5)) + ((int(sqrt(number - 0.5)) % 2) - 1)))) - 1) % (2 * (1 + int((int(sqrt(number - 0.5)) + ((int(sqrt(number - 0.5)) % 2) - 1)) / 2))) + 1)))

>Is wasm performance really comparable to c++?

No, and especially not when it comes to threaded applications.

please keep your cs101 shit in the /aocg/ general

yes, the generated code is the same. you can verify with mbebenita.github.io/WasmExplorer/

Are threaded applications in wasm still using webworkers under the hood?

Idris is imperative, heck, all languages are.

I'm trying to implement a shitty subset if scheme in seples
I know that the environment should be a map where the keys are the strings of the symbols, but what do they map to? a std::function?

>generate your VAO
Bingo. Iirc OpenGL Core requires creating a VAO unlike older OpenGL which has one created by default. I wasn't creating any. Will try that.

WTF is a "Full Stack" Developer?
i keep seeing this in job postings

sexp

Knowledge of an entire tech stack.

So I'm at my first day of an IT contact job and I finished all my work in the first two hours. It fucking sucks but there's a learning perl 3rd edition at my cubicle. So is perl still used? Would I be wasting my time reading it instead of browsing Sup Forums?

It means you can build every single part of a system, from user interface to backend.

"Full stack" used to mean someone who's familiar with both serverside and clientside development, but it's starting to mean a magical unicorn that can do literally everything in computer science. Basically, just say you're a full stack developer and play along. The worst that will happen is you'll get rejected.

Read it, you might as well.

CIFAR-10 classification using TensorFlow shouldn't be this hard.

because /dpt/ is the pinnacle of CS right?

spank you very much

Do people still use Perl?

kek
oh my sides!

web developer who isn't just some kid who picked up javascript in a week

Oh hey, I'm actually using a CIFAR-10 example program as a means to familiarize myself with the API for my research.

github.com/fchollet/keras/blob/master/examples/cifar10_cnn.py

ty

That's Keras though. Granted, Keras is the patrician choice, but OP was using Tensorflow.
Also, what research are you doing? It's always good to see some fellow ML researchers on /dpt/.

>muh pi calculus
No one gives a shit about pi calculus. Message passing is conceptually imperative. No amount of mindless droning about FP concepts is ever going to change this.

Keras is a wrapper library around Tensorflow. Same fucking shit.

Anyways, I'm doing some intrusion detection research. Security + ML = fun :3

$cat FuckX.h
>Fuck Python
>Fuck Bash
>Fuck Java
>Fuck C
>Fuck C#
>Fuck C++
>Fuck D
>Fuck Rust
>Fuck Lua
>Fuck Lisp
>Fuck Pascal
>Fuck JS
>Fuck Fortran
>Fuck COBOL
>Fuck R
>Fuck Go

Kotlin best lang confirmed

Wait until you have to write code in VBA

Kotlin = Java

in your opinion what makes a language a programming language? turing completeness?

Ive got this SQL statement
SELECT DISTINCT mapSolarSystems.regionID,solarSystemID,solarSystemName,x,z,security FROM mapSolarSystems,transactions WHERE mapSolarSystems.regionID

a language that you use to describe a program. English could be used as a programming language.

Is it me or is anime just glorified porn now?
Anyways, I'm trying to come up with a calculus library in C, maybe C++.

>now

>a language that you use to describe a program. English could be used as a programming language.
Your example actually demonstrates why your definition is flawed: most constructs in the English language don't have any operational semantics associated with them. You could define a programming language using a subset of English, but English as a whole is not a programming language.

Read the fucking sticky and format your shit so we can actually read it

Yes it is. You could program other people in English to write your program

>most constructs in the English language don't have any operational semantics
First time I see someone else use that term in /dpt/

what does the sticky have to do with this?

code tags
use them

>tfw caught up with C++17
Time to rewrite all my personal projects with concepts!

Getting triggered by not having code tags for one SQL statement? Get a fucking life.

it is. why are we using 'if' as a keyword for control flow statement and not something new? because of the definition given to if by the English language.

maximal retard

I made a stupid thing.

>you could program other people in English to write your program
No, you could ask other people to write a program for you using an actual programming language. Or you could ask other people to "execute" some algorithm, and (depending on the precision of your wording) observe how different people produce different outputs, because for the most part, the English fucking language doesn't have precise operational semantics. It's not a programming language.

Try it with a join

>there is still no gui libary that exports C API and works on pc/mobile platforms
Meanwhile retards are using bloated shit like kivy, javafx or qt. FUCK

>why are we using 'if' as a keyword for control flow statement and not something new? because of the definition given to if by the English language.
It's like you retards can't read... I said "most constructs", and even then, your example is shit. For instance, I can say "if you respond to me again, you're a confirmed retard" - what does that `if` mean programming-wise?

Where were you when templeos got lisp?
github.com/bagnalla/holyc_mal

Sauce?

Just wget this page:
en.wikipedia.org/wiki/List_of_programming_languages

Filter for everything in the alphabetized list, and prepend the word "fuck" to everything. No need to manually type out every language you hate.

>yfw you use kotlin

i was referring to using English as a programming language, you are not describing a program here.

>circular dependency in C++
what do?

Remove the circular dependency.

>you could ask other people
Program : Verb, cause (a person or animal) to behave in a predetermined way.

>i was referring to using English as a programming language
>you are not describing a program here
It's perfectly good English. How do you know this English doesn't describe a program? You mean it doesn't describe a program in your imaginary subjective variant of programming-English?

>what do?
really nigga?

kill self

>to behave in a predetermined way
Go tell random people to program for you and see if they react "in a predetermined way". Heck, hire 10 different programmers and ask them to write a program for you using the exact same wording. See if they produce exactly the same program. You people are enormously fucking stupid..,

>be ignorant
>insist on debating when you clearly have no clue
Classic /dpt/

why is every programming books i read written as if someone already knows programming?

is there any good books that simply lays out the core concepts so an utter noob can grasp it?

>be a sub-90-IQ retard
>get completely BTFO
>too stupid to realize it
You didn't answer the question. How do you know it wasn't a description of a program?

What are the best modern languages and why should everyone switch to them?

I've started Elixir coming from a Haskell background and found it to be much easier to get things working first time without much effort. OTP makes things much easier than what seems to be "invent a new monad" of haskell.

Idris seems like HaskellNext in that it provides more safety and at the same time less pain through a better base design. Dependent types are a heaven for library writers as we can finally remove user abuse plus have idris guide the user to learning the library properly.

I haven't used Kotlin but form what I've heard it's much better than java and seems to be gaining within the mobile development field.

Rust? I haven't heard much apart from mozilla using it.

That's what I have so far when it comes to next gen programming, FP seems to be working it's way into all new languages, compilers try to catch logic errors and other higher level issues rather than just type errors, and much more.

>no formal syntax
>no operational semantics
You truly believe you're smart don't you?

blendS

>Haskell

Elixir in Action might be easier for you to grasp alongside the github documentation. The underlying EVM is also easy to understand if you understand the basics of physics (how things interact).

>literally parrots back to me my explanation for why English is not a programming language
>thinks it proves that English is a programming language
Simply subhuman.

>the best modern languages
Depends on your domain
>why should everyone switch to them
"everyone" shouldn't switch to modern languages because even the union of every modern language doesn't fit every purpose.

This is good for absolute beginners. It's free.
robmiles.com/c-yellow-book/

>can't read nor write in english
Explains much.

>implying other people always means "random people from random place"

>hire 10 different programmers and ask them to write a program for you using the exact same wording. See if they produce exactly the same program
Try to compile a same source code with 10 different compilers and see if they produce the same ASM / binary code.

thanks, user!
C# is what i was aiming for anyway :)

Better C when?

pls r8

Do the same for Windows/10

>continues to act like a complete subhuman
>unable to provide any argument besides the one that proves him wrong and isn't even his own
My fucking sides... no wonder so many of you whine about not being able to find a programming job.

>the one that proves him wrong
It literally proves my point, subhuman.

Meant in your domain, for me it's been Elixir due to the ease of developing a service quickly.
The "everyone" part was meant to get it going, there are valid cases for not moving over to a new language but I'm not as interested in those cases as new language developers usually make those cases clear.

but the english language can't be executed. It can't run on a machine. It can't be interpreted or compiled. even punch cards which are just holes in a paper do better because they tell a computer how to run

>Try to compile a same source code with 10 different compilers and see if they produce the same ASM / binary code.
Irrelevant. If they are standard-compliant and you provide valid code, you will get programs with identical semantics. You won't get programs with identical semantics from programmers by telling them what you want the program to do in normal English.

>runs out of arguments
>starts calling people subhuman
>no knowledge of computing nor formal languages
>shitposts on Sup Forums because he knows his life is worthless
Keep posting I enjoy seeing retards try to make sense on /dpt/

>not being able to tell what program a piece of english is supposed to describe because english has no operational semantics proves that english is a programming language
Simply. Subhuman.

Even if I knew how, it would be a waste of time since the Windows command prompt already has that feature.

I literally never said that, which you'd have realized by now if you weren't borderline single-digit.

>gets destroyed
>unable to offer any counter-arguments
>simply repeats my argument and pretends he was arguing my position and i was arguing his
>gets called out
>begins to samefag
Simply subhuman.

same as in previous thread

I've been hearing about Nim lately. It appears that their GC is thread local and can allocate on the stack. They rely on message passing between threads. What does this mean? Can't Nim data structures be operated parallely? Can I create an array of 30 items with 3 threads (each thread computing 10 items)?

>you will get programs with identical semantics
>implying all compiler have identical optimization methode

>You won't get programs with identical semantics from programmers by telling them what you want the program to do in normal English
If all of the programmer is industry standard compliant, then their program will have identical semantics, even trough having different wording, similar to compiler have different way to mangle your code but have similar usage.

>too autistic to understand a post's content
>gets defensive
>starts calling people names
The typical /dpt/ard, ladies (male) and gentlemen!

that's neat user. it's like a pseudo cheat engine. what are you hoping to accomplish?

>I literally never said that
This was your post, though, you literal drooling moron:
Maybe you should go back and read what you responded to by screeching that I'm wrong, because it was an illustration of why English is NOT a programming language.

The second post you quoted literally doesn't say anything about
>screeching that I'm wrong
I know mental illness makes it hard for you to understand that. Or maybe it comes from watching too much anime.