/dpt/ - daily programming thread

/dpt/ daily programming thread

What are you working on, Sup Forums?


Previous Thread:

Other urls found in this thread:

lemire.me/blog/2016/05/23/the-surprising-cleverness-of-modern-compilers/
openai.com/blog/openai-technical-goals/
twitter.com/NSFWRedditImage

First for D

>Created before the bump limit
Report this thread.
Do not post in this thread.

Types aren't good enough
Are refinement types good enough?

Bump because fuck the shitty trap meme

Fuck off you degenerate sack of shit

What's the best programming language you've ever worked with?

PHP

Javascript by far. There isn't even a real contender.

C

C

MAKE UP YOUR FUCKING MINDS

C#

Python, versatile and quick to develop in, even if it's just a PoC or prototype.

Also, piss easy to learn.

void bait_loop(bait_type x) {
bait_type old = x;
while (old == x--) {
x--;
}
}

compiles to
bait_loop:
.L2:
jmp .L2

why is this allowed, Sup Forums?

C is the only programming language

I've never really encountered prototyping.

I was just told my JS array is a pseudo array and I dont understand. Where can I read about this?

Is it similar to polymorphism / inheritance in OO languages?

JS is a pseudo programming language, therefore anything you make in it is a pseudothing

Because they are semantically equivalent.

Actually, this is a common misconception.
A language is defined as "the method of human communication, either spoken or written, consisting of the use of words in a structured and conventional way."
Javascript is neither structured nor conventional.
Javascript is a programming pseudo-language.

C# for large scale shit
python for small stuff
c++ when i need to do shit cross platform without forcing the user to download a python interpreter or similiar

Lua

How the fuck are those equivalent?

Hoon or bust.

lemire.me/blog/2016/05/23/the-surprising-cleverness-of-modern-compilers/

Fuck you trapfag

>mfw

openai.com/blog/openai-technical-goals/

Kill yourself.

Both don't do anything at all in the end, so they are pretty much equivalent.

Why are you even angry, plebe ?

>don't do anything
>loop forever

Refinement types are just types with constraints.

How does it loop forever?

...

overloaded == or -- operator

>C
>overloaded operators

You never said it was C
What type is bait_type

>You never said
>I can't follow a reply chain

>I can't follow a reply chain
Maybe you should learn then

>never said it was C

For a beginner, is any sufficiently-large project useful for a portfolio to get out of NEETdom?

I really want to make a simple 2D platformer in C++. Assuming it's not complete garbage, is it enough to get hired for an undergrad job?

>damage control

>overloaded
webshits everyone

Name a web language with overloading you stupid cunt.
You're that twerp (I believe that's the correct pronoun for people under the age of 12) that loves Java but calls other people Pajeet, aren't you? And now you're calling people webshits, people that don't do web. Do you even speak English you daft indian twat?

is there still a market for perl?

Do you even need to ask?

>2016

>He writes dumbware that doesn't learn from experience

>under the age of 12
You shouldn't be here then.

>quote mining

>pretending not to be a webshit
we know tho

>C
>overloaded operator
wew laddie

bump for interest, tell me if you find an answer user

in Python is it worth it as an exercise to attempt to write your own version of some existing functions?

#define == ||

how does something like the linux kernel prevent naming conflicts without namespaces?

by not using the same function names

yea, but how do you know some other asshole didn't already take the name you are about to use?

>== is an identifier
you can't be this retarded

grep

Why is C so shit?

>I'm a confirmed retard
>C is shit tho
webcuck, please

>webcuck is a subtype of valid arguments

>weeaboo shit
You're not entitled to an opinion.

>everytime I write a function, I need to run grep

Cshits pls

>use a weeaboo site
>call others weeaboo

pseudo-code
def func(arg1):
def func1(arg2):
/* */
return;
return func1

>everytime I write a function, I need to run grep
sounds like you're retarded

In python should I use
def func(*args):
/* */
return

func("arg1", "arg2")


or

def func(args):
/* */
return

func(["arg1", "arg2"])


?

Does anyone here have a pdf of "Fundamental 2D Game Programming with Java by Timothy Wright? I live in a shit-tier country so buying it hard since I won't find it Paperback and Shipping it from somewhere will be expensive as fuck.

>I'm mentally ill
>this site is full of us tho

This site was invented for anime loving autists, and by coming here you've proven yourself to be an anime loving autist. Congratulations.

Depends what structure your argument requires.

I just use same defaults style

def func(arg1, arg2=False):
print(arg1, arg2)

func(["data"], arg2=2)

Python is able to overload operands to my knowledge. You specified web languages and python is becoming quite prominent in the web scene.

Sure if you want to get acclimated to the idioms of Python.

I didn't know that because I'm not a webshit

Who /oop/ here?

>not a webshit
>Name a web language
user...

>admitting to be mentally ill

Woah there. I'm just a random guy chiming in on your conversation. I don't touch web, to much shit going on for me to break.

I didn't name it

Maybe you should've listened when >55189526 said you can't follow a reply chain

So you don't disagree?

I was just getting back at the other guy

There's no need to lie on the internet.

Best free tool to make graph from database?
Something where you can easily see the relations and filter tables interactively

>doesn't know C
>not a webshit tho
please

I use C++ because it's not the 1980s any more, it's current year

>can't follow a reply chain
Maybe you should learn then

>don't know C
>I use C++ tho
webshits everyone

>I use C++
Are you mentally ill?

You're right, maybe you should learn

C++ isn't a web language

I use it as little as possible

This is like asking dpt to average 2 numbers.

I thought we were done talking about unsolvable problems

>You're right
I know

they don't care about games

they want applications that interact with databases, database designs, maybe through in some RESTful server as well

also learn Javascript shit like angular, express, etc.

>unsolvable
webshits actually believe this

You're welcome user

Average 2 integers.
Do it faggot.

Oh boy here we go

>teach me how
>I'm mentally ill tho
would be pointless

done

Are linked lists better than arrays?

So, I'm learning Python. It's my first programming language.

I'm having a hard time understanding everything.

Any advice? Tips? Stuff I can do to get it down better?

No, and they never will be.

I am trying to slim down and gain a the trust and love of a cumslut.
That said, I am a bit stumped.
I have a solid diagram for separating numbers by their digits and calculate their middlenumbers (?)
So 987 is 9+8+7=24
Problem is the following:
How can I make Java calculate the modulo and division of any number I enter and save it?
Do I use arrays for that?

That is my step for step algorithm:
Enter a number (use scanner)

Check if positive, if not break

If positive, calculate length with string.valueof (entered number).length.
Assign it to int digits

Loop:

Int exponent = 10^(--digits) Ex: 10^(--3)

Divide entered number by exponent Ex: 987/100 =9
Save 9 for middlenumbers.

Modulo by 100 Ex: 987%100=87
Save 87 for loop calculations

Repeat until digits is less than 0.


System.out.println (9+8+7)

How do I achieve that?