/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Old thread:

Other urls found in this thread:

wiki.c2.com/?MentalMasturbation
twitter.com/SFWRedditGifs

First for C(ute)

>off-topic image
No, thanks.

Real thread:

Welcome to the anime website.

...

What does each axis represent?

You decide

Burgers and soda

Wtf is up with the amount of shitposters lately?

spring break

They can't get enough people to make Rust popular

>implying Sup Forums isn't Shitposting:The Board

Dpt at least wasn't this unbearable.
Apart from the anime debates, it was relatively quiet...

Maybe theres a sort of brain drain between Sup Forums and Reddit, they get the posters who are worth conversing with, we get the edgy l33tists

Bulky computers like these are so sexy

I hope is right and they'll go away after a while, but with the recent Trump and "Meme magic" thing, it may actually be true...

>What are you working on, Sup Forums?
Writing a bot for the Official /dpt/ Discord™

It was inevitable, all the edgy pricks who think they're hardcore cause they can reveal an autofilled password by changing the input box type would naturally flock here due to 4chans perceived reputation. This could then put off some valuable posters who'll try another forum for a change, and so the cycle perpetuates

We need Sup Forums for guro!

the fuck are you even talking about

I pretty much only talk about programming on Discords these days.

The mods tend to allow funposting, but don't tolerate the shitposts that spam the same phrase there.

Every programming language is just a bug-ridden Lisp in disguise.

sepples question.
I have a string
I need to split it in multiple strings
delimiter char can either be ',' ';' ':'
what's the nicest way to do this?

What does this even mean?

I find myself talking about programming more on various articles, tutorials and the like nowadays as opposed to a forum or board, i tend to get better discussion and valuable information that way, and like you mentioned, mods for these tend to keep a tighter grip of the threads, shitposting gets dealt with quickly

Sane options:
>do it yourself in maybe 10 lines function
>strtok
>istringstream + getline

Insane options:
>use boost tokenizer

Unfortunately, the mods on Sup Forums are more concerned with deleting something mildly racist and on-topic, rather than an autist spamming the same catchphrase about OOP/C/FP for 40+ posts in one thread.

recommend me a good anime , my niggers

I've never watched any

Lisp is the greatest programming language humankind will ever discover. It can be reprogrammed to become any other language. People do this to turn Lisp into inferior programming languages, like Haskell and Malbolge.

Too bad it can't be reprogrammed to become a good language.

Doesn't sepples have an equivalent to this?

var inputArray = input.Split(new char[] { ',', ';', ':' });

Yeah, I don't mind reasonable discussion on any of those topics, I just can't be assed scrolling through 17 different flamewars to find a comment or a thread that looks interesting

Stop false flagging and go to

/dpt/'s discord, or other programming related ones?

Stop posting inane comment Richard.

Shit

Yes.

Akira, Ghost in the Shell

This is anime website, but not anime board, man.
Anime site means that everyone posts here anime pictures, but most of them are board related, like, on Sup Forums they post technology anime pictures.
Anyway, Serial Experiments Lain.

Serial Experiments Lain

I like golden boy and cowboy beboob

Neon Genesis Evangelion

thanks my dudes

here's a programming problem in return

Looks more like a math problem than a programming problem.

Wouldn't you just solve this the "math" way and then write it in whatever programming language's syntax?

I am at problem 18 or something :^)
maybe should go on with it

Simplest way:
check all values

Real way:
i don't know

It's a project euler problem

they're normally hard to solve just using the math

>they're normally hard to solve just using the math
They are usually written to be solvable with brute-force, but not in your lifetime. You are supposed to use math to optimize the search. Some of them are actually very easy to solve with pen and paper, I've done it for a few of them.

I really don't understand the purpose of Why would more than two people in the entire world ever need a program that does this efficiently?

What's stopping one person from just showing the other person how to do it once one of the two figure it out?

At this point, it just feels like attempting to complete this is metaphoric autofellatio.

>it just feels like attempting to complete this is metaphoric autofellatio
Wow, are you finally grasping the concept of hobbies and the need to fill the meaningless void of existence with masturbation. Good on you user.

I have been using Haskell for awhile now, and this is what I have found wrong with the language:
>horrid macro system
>modules are deficient compared to the module system of OCaml or the package system of Common Lisp
>partial functions pervade the language
>broken records (ugly hacks are needed to get around their deficiencies, leading to overengineered libraries like lens)
>most libraries are in alpha and look like a college student's summer project
>library authors tend to pepper their libraries with ugly, meaningless, custom operators, contributing to the overall ugliness of the ecosystem
>String as [Char]
>easily subverted type system with unsafe functions
>laziness makes it a chore even for experienced programmers to reason about algorithmic complexity
>in 30 years of existence, Haskell has yet to become a proven asset in industry

I guess I didn't really consider that some people could enjoy doing this, but I suppose there's a sense of achievement that comes with it. Fuck me; now that I program for a living, I don't want to do it for fun anymore.

Don't get a job programming, anons. It's a trap.

What do you propose better?

wiki.c2.com/?MentalMasturbation

>Don't get a job programming, anons. It's a trap.
I write automation software at an engineering firm. I have no problem coming home to do something like that, or work on my processor. So maybe it's more specific than that.

Of course I'm usually too tired after work to do much of anything anymore. Living for other people is a terrible bore, but it's important. Fuck.

That's what you get for turning your hobby into your job.

hey traps what's the best source for learning python for someone that's already into programming? (if the source is good it's ok if it's for total newbies)

docs.python.org

I have to agree with everything. Still, it's a good language worth learning just to broaden your horizon.

I think people should learn to reason about abstract machines more than languages.

I tried but it takes forever to run so I either did something wrong or the challenge wants you to waste time, either way here's a broken solution :^).

LIMIT = pow(10, 9)

def f(n):
curr = 0
while curr < LIMIT:
chunk = pow(n, curr, LIMIT)
if chunk == curr:
return curr

curr += 1

return 0

def sum_fun(fun, a, b):
return sum([fun(n) for n in range(a, b)])

print('f(4) =', f(4))
print('f(10) =', f(10))
print('f(157) =', f(157))
print('Σf(n), 2 ≤ n ≤ 10^3 =', sum_fun(f, 2, pow(10, 3)))
print('Σf(n), 2 ≤ n ≤ 10^6 =', sum_fun(f, 2, pow(10, 6)))

Traps are degeneracy, jump into an oven you subhuman.

there is no traps so far

Yes, but learning without practicing is meaningless and you practice this kind of reasoning by writing programs, so the language you use influence the way you're reason about things profoundly.

OPs image is fag shinji dressed like a girl.

That's where you are wrong.
THIS is Shinji

It's not.
She's Maya Ibuki.

Forth reich can't come soon enough. Traps and animefags need the rope.

Japan was the ally of the Third Reich.
Anime is the art of ubermenschen.

>tfw no average k/g/f

look what i've found

roll

>Emacs
Don't wanna raise your hopes up user...

Enjoy your sine wave generator.

Until the degeneracy ends, the purging continues. Maybe japan needs another bomb dropped on them.

>reichfag
>american
/0

>japan gets dropped a bomb
>goes from good fun quality shit to the modern garbage
>retard thinks dropping another bomb will fix that
its a downward spiral not a fucking on off switch

rolling

rolling for terry davis

Then Japan has lost all hope. No longer are they proud warriors but degenerates who follow yid marxist brainwashing and become social diseases. More and more japs are letting their race decline.

give me the hello world

well that's Americas fault :))

rolling

What guides what should be put in the .h/.c file?

Are header file for the public interface?

>Visual Studio 2017 removed UML diagrams

They're finally learning.

Japs don't generally care about foreign opinions, they killed themselves from the inside.

>they killed themselves from the inside.
>all those american bases
>foreign ban of Japanese army

The jews ordered the bomb and the jews manipulated Japan. The jews are entirely responsible for Japan decline and now Japanese people are brainwashed enough to do it themselves as programmed.

I've fixed my fizzbuzz code in haskell. I forgot about fizz Right $ a ++ b I had to either use let instead of Integer -> String -> FizzBuzz
divBy num by fizzString = case num of
Right str -> Right str
Left a -> if a `rem` by == 0
then Right fizzString
else Left a
divByThree :: FizzBuzz -> FizzBuzz
divByThree num = divBy num 3 "Fizz"

divByFive :: FizzBuzz -> FizzBuzz
divByFive num = divBy num 5 "Buzz"

divByFiveAndThree :: FizzBuzz -> FizzBuzz
divByFiveAndThree num = do
let fizz = divByThree num
let buzz = divByFive num
case (fizz, buzz) of
(Right a, Right b) -> Right $ a ++ b
_ -> num

printFizz :: FizzBuzz -> IO ()
printFizz fizz = case fizz of
Right str -> putStrLn str
Left num -> putStrLn $ show num

main :: IO ()
main = do
mapM_ (\x -> printFizz $ (divByThree . divByFive . divByFiveAndThree) (Left x)) [1..100]

how do i source good papers for a given topic?
where should i go looking if i dont want to pay out the arse for papers?

might as well

I feel like Euler's Theorem might prove useful to solve this problem. It's an intuition, but it's the only thing my brainlet can think of a possible solution.

>The jews ordered the bomb
Are you aware that the same Jews run your country?

The jewish problem will be over soon. They know their days are up and they're scared.

>soon
>7000 years and no solution
good luck

>Vim

libgen or sci-hub

Whites are waking up, they are being redpilled as we speak. Problem before was it was too easy to control the flow of information. With internet the jews can't control it as easily.

Doesn't making a C++ destructor private prevent it from being called when the class goes out of scope? Somehow mine is called twice (even though I only call it once).

>Whites are waking up
Keep dreaming.

>can't control it as easily.
wew