/dpt/ - Daily Programming Thread

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

Other urls found in this thread:

youtube.com/watch?v=3U3lV5VPmOU
groklaw.net/pdf/Comes-3096.pdf
twitter.com/SFWRedditGifs

First for C.

Pycharm is bloated for the same serious Norton or McAfee is bloated. They are filled with shit so they can sell it to you.

Third for marbles, slides, strings, levers, weights, and whacky household items.

I ignore experience with Python that people put on their resumes

>function
>that prints out
What did you mean by this?

Daily Programming Challenge!

Write a program that prints out the sum of the first 2 million perfect square numbers!

Rust shills need to die and stop promoting social justice

haskell is a joke

Messing around with neural nets in tenserflow. Kinda wish I could afford to rent a server that could crawl larger data sets to do something more interesting with them.

Not programming.

writing programs is programming

Trying to wrap my head our the js ecosystem. Need to get babel + webpack + react + electron build working.

It's pretty overwhelming. especially when all the tutorials are already out of date after a few months.

Wrong thread, fuck off back to

>electron
Don't. Electron is morally wrong.

FAG
EVEN WORSE FAG

Javascript is programming :)

Is learning MIPS architecture relevant in current year?

>all these autists redirecting people to other threads and having a little baby tantrum

Go take your meds.

Interesting video about types: youtube.com/watch?v=3U3lV5VPmOU

@60107355
It's not. Your kind needs to fuck off.

print (2 * n^3 + 3 * n^2 + n) / 6

>define gcd(a,b)
>define Mobius function mu(x) by summing over all elements of order k of the n-cyclotomic field where gcd(k,n) = 1
>sum over all numbers x less than N such that mu(x) = 0

I have to. Client requested this as both a webapp + desktop app. Easiest way is just to refactor the current webapp into electron.

Please calm yourself

Did somebody say this?

Do it properly or drop the client. A quick payout now is not worth your eternal soul.

>working joe
>talks about clients
>web used in a sentence

Get out, /dpt/ is for autists and neets only.

Isn't this video using Haskell? What does it have to do with "types"?

not at all

what to read to learn about this stuff?

He goes on to use Agda later.

It's not a large app at all, so I'm not too worried about having to maintain a huge amount code.

Have you developed with electron before? What were the pain points?

You get out, normie ;)

Then why is it so popular?
What's the way to go instead?

>;)
Your kind is not welcome here.
Also, why the hell do you space your posts like that, redditor?

MOTHERFUCKER DID YOU JUST WINKY FACE AT ME

What spaces?


:^)

>Then why is it so popular?
maybe in school because it's simple and easy to learn but not in the real world

>It's not a large app at all
And it was just one little apple that damned humanity for all eternity.

>:^)
I don't want reddit stink nearby. Fuck off.

@60107402
>"""developed"""
>electron

Then it's good as baby's first steps in microprocessor architecture?

yes

deserves a lol

My teacher said using static classes / methods / variables is as bad as using global classes / methods / variables and they are an anti-pattern.

Is this true? If you have a class you're certain you won't have multiple instances of why can't you set it to static?

this thread is off to a great start

Your teacher is simplifying things.

statefulness in general should be avoided if it reasonably can. and that's what static means, it means the variables stay alive

they should almost always be avoided

>classes / methods
Wrong thread.

Want to hear a sad story?
The codebase at work is almost entirely composed of static classes.
Coworkers question if you use a non-static class/method...like its abnormal to write code that is "Object Oriented" with an OO language...

>The codebase at work is almost entirely composed of classes.
Sad story indeed.

That's because OOP is trash.

Write and use referentially transparent functions as much as possible.

lol they sound like C tards who were cucked into using java/C#

There's nothing in C that encourages you to use static initialization.

favorite book on ruby?

>referentially transparent functions
A function is by definition referentially transparent.

Not the way most programming languages let you define functions...

i hear the well grounded rubyist is good but i've yet to even start. i'm so fucking swamped. ready for classes to be over.

i say this while playing shadowverse instead of studying lul

I don't know of a single language which doesn't let you define functions (assuming it lets you define procedures).

Learn x86, arm and risc-v.

As long as all the static stuff cointains no state, it's probably fine. In that case, the static classes are just glorified namespaces.
If your codebase includes state everywhere you might want to look for a job in some place that doesn't encourage shooting yourself in the foot.

That's exactly what they are. My guy.
It's almost like functional programming in C#

What are some valid uses of "static"?

static final
static native

i'm partial to static const char *const volatile register arr[]

This week I've been busy with installing Arch Linux on a Samsung CB+

At work, I'm building a java library csv -> db. db -> csv exists, but apparently I've got to build the other way round myself. Tried dbunit, but that sucked.

Anything that is "static const" is fine.

>2016
>still using Turing complete languages

>2017
>not using quantum Turing complete languages

sounds like a waste of time

Get good.
static volatile const signed long long *register restrict volatile const arr[static register restrict volatile const];

you can't instantiate a static class, for classes you dont want to have multiple instances of that would be a singleton which is a real concern (a class to handle a connection to a DB or a settings object or something that handles read/write for example would something you dont want 500 of)

using static class methods a lot turns into a sort of a poor mans way of using namespaces but in general i guess yeah don't use a lot of static class methods / variables frequently and question why it would even need to be static as it just exposes the potential for the state of that class to be changed somewhere else

you got discord or something user

Oh?

What thread should it be in?

>Is this true?
No. You're teacher is retarded.

>2017
>Still writing useless programs

ja rule scammed a bunch of spoiled rich kids with a bogus music festival in the bahamas lmfao

why do people dislike java so much? I prefer it to C++ for sure

working on seeing if I can hook credit card magnetic head reader to arduino, and read cards, without the cc IC hooked up to the arduino.

Why don't you compare it to a language that isn't also garbage?

it's fine it's just shilling by C# tards and memeing by brainlets who were traumatized in school when they had to "learn" it in programming101

>memeing

There just shills. They get paid by C++ to come shill their language every thread

whats wrong with C#

i want to connect to my vpn client on my raspberry pi with python, is there a way to do this?

Yes. Don't use python

Yes, even with python.

groklaw.net/pdf/Comes-3096.pdf

a = a++ + ++a;

???

...

Yes, it's true that static classes are as bad as globals. But it's false that globals are inherently evil.

My college CS undergrad program started us with C/C++ in my CS 101 class and every single class I've had to take has used C++ for examples since then. I'm two years deep and haven't seen a single line of Java except for comparison.

Is this a good thing? I know everyone hates Java on this board but I legitimately don't know anything about Java.

it's easy as shit, shouldn't take long to learn Java if you're good at C++

what is this suppose to do? both add 1 to a right? im lost

it's fine. C++ and java are the best programming languages.

...

i prefer java to c++ despite all the shilling c++ gets. If your good at one, then the other is easy. You should definitely learn java as well.

++i++;

Where is your god now?

Thanks bros, I guess I'll look at Java in my own time, but right now one of my classes is making me learn Assembly, and then next semester I have to build my own compiler from scratch for my term project, so it's gonna have to wait till after that.

Just got a book about Clojure

What ppl used it for?

>Prefix increment on something that isn't an lvalue
Dumbass.

no, java is trash, redditor. leave. just fucking leave and spare yourself from further embarrassment.