/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Old thread:

I wanna die

>zero isn't in ℕ
Math grad here just stopping by the zoo to feel better about myself. Whew, stinky in here!

me too thanks

Commas are thousands separators
Periods are decimal markers

Non-English speakers: when in Rome, etc.

You can use your weird notation when using a non-English programming language

So what do you think? Is it or is it not in N? Because mathematicians themselves are not clear on the issue, and sometimes say that N includes 0, whereas N* does not.

>he thinks zero is in ℕ

programming is actually one of the best treatments for depression, so press Ctrl+W, surf github and start contributing and arguing, you negroes

>Math grad here
With the quality of most colleges as low as it is these days that's not saying much

ƒ

>1.21 MB for a stupid gif with a few frames
It's no wonder you kids don't care about memory.

>he needs static typing

.ancy

I can't, all I have is a laptop, the whole screeen is crunched and i don't have a mouse, I can't be productive

If you're worried about downloading a 1.21 MB image, then perhaps you should get a job and get a better internet service

>Is it or is it not in N?
The usual construction includes it.
Also see the Peano axioms, even CS monkeys should know about this.
>N includes 0, whereas N* does not
That's what usually happens.

I didn't mention my country.

>he likes doing work the compiler could do for him

see:

I don't like reading code with dynamic typing, it forces me to deduce types myself

>all I have is a laptop
Buy a real computer.

Confirmed for never having worked in a team.

>I didn't mention my country.
It doesn't matter, average college quality is worryingly low across all countries. (Although the US fares better than most.)

I'm not worried about it, I just think it's a waste.

Then don't download it. Just leave it as a thumbnail.

You must have the impulse control of a 3 year old.

>haskell productive
consider me triggered

see Also, don't directly reply to my posts. I don't want to be associated with you.

Reminder: you may only post in /dpt/ if you have a CS degree that contained mandatory use of Scheme, ML, or Haskell.

Does mandatory choice count

>Undefined.
>Undefined.
>Undefined.
I don't have to define every term I use. That's not how communication works in any human language. These are words you should know on your own.
>Indeed. And someone who thinks the symbol (the name) "1" should be the identity for "+" deserved to be ridiculed.
No one thinks that. In fact, that's impossible. However, it's unnecessary for the smallest natural number to be the additive identity. Much like whether or not 0 is a natural number, it's undecided whether or not the natural numbers are defined as a sequence whose smallest element is the additive identity.
>I don't know your retarded definition of those words. You seem to keep using non-standard definitions.
You don't need to know any definitions of those words except your own.
>Are those the only "integers"? Are they "equal"?
You already know this.
>"x + 1 = x" or "x + 0 = x". The choice is entirely up to you.
See above.

What were the available choices? Which did you choose?

Any programming language

He's obviously a moron if he thinks defining N = {1, 2, 3, ...} means that 1 must be the additive identity.

>He's obviously a moron
This is true but irrelevant.

Which programming language did you choose?

We are making a web browser

one o

Okay.

@60944330
>However, it's unnecessary for the smallest natural number to be the additive identity.
It's necessary for N to be a semiring. Fortunately most mathematicians aren't as retarded as you and they include 0 in the natural numbers.
>it's undecided whether or not the natural numbers are defined as a
The natural numbers are usually defined as the least set which contains zero and is closed under the successor function.

If you're not lying (and I'm suspicious of any degree program that would let you choose any programming language) then you may post in /dpt/.

Thank you Gatekeeper

>It's necessary for N to be a semiring.
It's not necessary for N to be anything.

>I'm suspicious of any degree program that would let you choose any programming language
uc berkeley

You are welcome.

Mine is a thankless task, but necessary in order to preserve the high quality and standards of /dpt/.

>berkeley
Exactly, user.

Do you have trouble with the English language? An additive identity is a requirement for being a semiring.
The Peano axioms are pretty standard and they blatantly and explicitly include 0 in the first axiom.

>It's necessary for N to be a semiring.
No it's not. If N includes 0, it's a semiring. If not, it doesn't have an additive identity. But there's not actually anything wrong with that, because anyone who wants to use N to do something like, for example, define other sets, would obviously define it as including 0 anyway. But what if you don't have any need to do such things? Such as is the case when, for example, you are a programmer.
>The natural numbers are usually defined as the least set which contains zero and is closed under the successor function.
The particular "usually" in question is not close enough to "always" for that to be the actual, authoritative, unquestionable definition.

Do a C learning curve

I think you may be having trouble with the English language and/or basic logic.

The definition of a semiring is irrelevant to the definition of N if N is not required to be a semiring.

>The Peano axioms are pretty standard
There's no such thing as "pretty standard." They're either standard or they aren't. In this case, they aren't. You might mean "pretty widely accepted." And I'll grant you that they're pretty widely accepted. But "pretty widely accepted" still falls short of "standard."

>mandatory
>CS degree
lol thats the only way anyone has every used any of those languages.

wrong

>@
Go back to Twitter.

Don't burst his protective bubble, he's a "pragmatic programmer", he doesn't need advanced programming language features when he can just use brute force, it's the "practical", "real-world" approach.

>false sharing
How do I deal with this shit? Feels awful. Do I just allocate chunks of memory with this in mind and have my non-parallel algorithms account for the gaps I've made? It feels like an awful solution.

Not him but everything you intended as sarcastic in that post is actually true. Brute force is the way to go tbqfhfamalamadinglyfuckingdonglydoogle.

>Also see the Peano axioms, even CS monkeys should know about this.
Indeed, considering that it's in a second year basic math logic class and I'm doing CompE (Europe though).

----60944471
>No it's not.
Do you have trouble with the English language? An additive identity is a requirement for being a semiring.
>But what if you don't have any need to do such things?
You trying to argue with commonly accepted definitions without actually having a use for it just shows your retardation.
>actual, authoritative, unquestionable definition.
You don't seem to understand that there can't possibly be any unless you can control every single person.

----60944495
>However, it's unnecessary for the smallest natural number to be the additive identity
I replied with
>It's necessary for N to be a semiring.
It's obvious to any non-retard what I meant.

>They're either standard or they aren't.
They are axioms. Most people accept them.
>You might mean "pretty widely accepted."
Yes, that's what I should have said.

You've made me afraid to look for another job, user. At my current company I would be mocked if I posted that and it were not clearly in jest.

>It's necessary for N to be a semiring
It's not though. If N's smallest element is 0, then the fact that it's a semiring is helpful for defining other sets. If N's smallest element is 1, then, generally speaking, the set of all whole numbers has a smallest element of 0 instead, and so it instead is the set which is helpful for defining other sets. It's the same set either way, there's no practical difference between calling it "natural" or calling it "whole."

>It's necessary for N to be a semiring.
It is not. I don't understand your queer, fanciful notion that it is. Is it the result of a poor education?

@-0------
@-0------
Do you have trouble with the English language? An additive identity is a requirement for being a semiring.

>"whole numbers"
Nobody actually uses that, not even CS monkeys.

Every once in a while we get these really stupid debates about mathematical concepts ITT, like is 0 a natural number or are integers real numbers.

That's a pretty stupid thing to say.

>are integers real numbers
What did he mean by this?

>An additive identity is a requirement for being a semiring.
That has no bearing on the definition of N, because it is not necessary that N be a semiring.

>confusing natural numbers with the whole numbers
Retards

Another flustered continental European? Come one, come all, I suppose.

>You don't seem to understand that there can't possibly be any unless you can control every single person.
No, that's what *you* don't seem to understand. This whole argument started because I didn't count 0 as a natural number and you didn't like it. However, I was justified in not counting 0 as a natural number, because there's no standard definition of the term "natural number." The fact that there's a widely accepted definition is irrelevant, because that widely accepted definition is not standard.
>They are axioms. Most people accept them.
Are you trying to suggest those two statements are related? Because they aren't. You can define any self-consistent system of axioms you want. Are they true? Yes, within their own system. But people don't have to accept their truth if they don't even accept your system as a whole at all. I could define a system of axioms that only has one axiom: "Let metal be defined as bad, where bad is unspecified." Metal fans would be pretty mad about that.

;-0------
>because it is not necessary that N be a semiring
Keep reading the post this originally came up in until you understand what I said.

Sorry, I'm not subhuman.

A while ago some anons were confusing the concept of programming language types with the concept of numbers in mathematics, and one of them started arguing that ``integers are not real numbers'' and shit like that.

Quit spamming.

>haskell productivity

But people don't have to accept their truth if they don't even accept your system as a whole at all
Most people accept the Peano axioms. They are the closest thing possible to a "standard". You being retarded doesn't somehow make this untrue.

>a nigger
You're probably the kind of person who thinks N doesn't include 0. Leave.

>person
What were you going to mean by this?

N isn't a number, it's a letter

>Most people accept the Peano axioms. They are the closest thing possible to a "standard".
Yeah but they're not standard though. My choice to omit 0 from N means I didn't accept them. (I do, however, accept them as relating to w instead of to N.) Since they're not standard, there's nothing wrong with that.

By the way, I sometimes also define N as including 0, in which case I do accept the Peano axioms. Depends on the day of the week really.

Also, stop spamming.

You mean this?

>It's necessary for N to be a semiring.

You have provided no supporting evidence of that claim.

The truth is that most """programmers""" are better classified as computer niggers.

"Programming is one of the most difficult branches of applied mathematics; the poorer mathematicians had better remain pure mathematicians."

@60944753
>eggy.jpg
I can't say I'm surprised a retard such as yourself would think 0 isn't in N.

>kek

It isn't, though, at least not when I don't feel like deciding it is. It is when I do. How is this so difficult for you to understand?

@60944779
@60944786
>kek
>doobmcfroob.jpg
>ggegygye.jpg
I still don't think you can count to four.

It's simple, he is incapable of it.

dumb frogposter

dumb frogposter
what the fuck are you lumping me in with the dumb frogposter for

It would be weird if that was a number... Numbers don't contain other numbers... or do they now?

>implying Python isn't the best language

#!/usr/bin/python
import numpy as np
import sys
N = int(sys.argv[1])

primesum = 0
for i in range(2, N + 1):
prime = True
for o in range(2, int(np.sqrt(i)) + 1):
if i % o == 0:
prime = False
if prime:
primesum += i
print primesum

primesum = 0
nums = np.array(range(2, N + 1))
for i in range(2, int(np.sqrt(N)) + 1):
nums[np.where(np.logical_and(nums % i == 0, nums != i))] = 0
primesum = np.sum(nums)
print primesum

@60944809
>ygge.jpg
You aren't any better.

>Numbers don't contain other numbers...
>calls himself a programmer
>rejects the basic principle of a RAM device
leave

So how much RAM does RAM contain?

I want to make a method in Python that has the user pass in words and numbers, converts all the inputs to strings while using ";" to denote breaks between inputs, append those to a list and then randomly output one item.

>.choose word; 14; word2; word3; 55
>append each one as a string to the list
>return list[randomnumber]

Right now it's only appending every individual character and including the semicolons and then returning a random one.

How is RAM defined mathematically? Sorry, must have missed a few lessons.

>calls himself a programmer
"programmer" these days means the same thing as "code monkey". Why would you call yourself that?

ok then explain why in Java you have to use synchronization mechanisms despite having a garbage collector

>@
Quit spamming.
Pic related: you

Dumb animeposter

@60944753
@60944779
@60944786
@60944809
@60944851
I want to see the reasoning why you're not from tumblr, which you obviously are.