/dpt/ - Daily Programming Thread

Old thread:

Other urls found in this thread:

jimplush.com/talk/2015/12/19/moving-a-team-from-scala-to-golang/
scienceblog.com/40901/theoretical-breakthrough-generating-matter-and-antimatter-from-the-vacuum/
twitter.com/NSFWRedditGif

First for single threaded Javascript crap

Why does Sup Forums hate Scala?

Please do not create new threads before a post count of 310.

This is to avoid two /dpt/ threads being bumped and at the top of the catalog at the same time.

Also, consider adding a friendly phrase along the lines of "What are you working on, Sup Forums?"

This encourages anons to share and converse on code they are working on.

Thanks in advance for your cooperation!

Noted.

What are you working on, Sup Forums?

Also, please use an anime image next time.

You fucking dumbass

Saged

Sup Forums hates anything remotely related to mathematics, and thus deems functional programming to be of the Devil.

Counter-sage

because how it mixes imperative with functional is a mess.
jimplush.com/talk/2015/12/19/moving-a-team-from-scala-to-golang/

>Scala
>Java JVM OOP kitchen sink faggotry

>functional
>in either sense of the word

Is julia worth learning? I've heard good things about it, but its still in version 0.4

>Julia
is she pure?
is she cute?

If trying to get a dynamic abstract datatype running because the static one wasn't flexible enough.
I normally don't like to allocate dynamically, but I have no choice. On the bright side, I could switch to std::vector with only minor changes (but losses in speed) in case my garbage collection doesn't work as intended.

I'm writing a rapid miner clone for myself - and first of all without Java.

>she

>"""""""""""""""abstract"""""""""""""""

Why are you posting ugly people

Yep, that what you call it.

Scala is a functional programming language.

>because how it mixes imperative with functional is a mess
if you read that post he makes it very clear that their problem was abstruse functional monad gunk, which he says is an investment in learning that never pays off. he outright recommends java8 as an alternative because of its simpler functional streams

once again experience confirms that a simple library of higher-order functions such as fold/map covers 90% of what anyone wants from functional languages

>everyone is developing in these new hipster languages that die after 3 years
>Java is still the most tooled and stable language after 30 years
based

>Scala is a functional programming language.

Scala is a functional programming language.

what's super fucking funny is that whenever a hipster language manages to come up with a good idea, the big languages just implement it, and then hipsters complain about bloat

>a simple library of higher-order functions such as fold/map covers 90% of what anyone wants from functional languages

id add tco and well optimizied function calls, recursion, good lambdas

that's about it?

...

/dpt/-chan, daisuki~

Ask your much beloved programming literate anything (IAMA).

>Java JVM OOP kitchen sink faggotry
A programming language and its implementations are two different things. Functional programming languages have been implemented on imperative machines since ever.

That's not fucked up at all.

A Java app that fixes my marital issues.

>A programming language and its implementations are two different things.
What does this have to do with the post?
Oh, right, this is that line you have saved on your computer to copy paste in at random moments.

Why is there something rather than nothing?

>bloat
After years of browsing Sup Forums, and dealing with autists in the industry, I've realized that complaints about "bloat" is one of the easiest ways to avoid faggots and screen job applicants.

Refuse to use a full-featured language? Refuse to use an IDE of any sort, yet insist on managing 73 3rd-party add-ons to your text editor? Refuse to use anything proprietary?

Congratulations, you've weeded yourself out of 90%+ of all available programming jobs!

If you're making lots of money without doing any of these things, that's great. More power to you. But don't complain when a dev shop requires you to know how to version-control on scrum tasks/user stories with Visual Studio.

.global _start

_start:
addi x28, x0, 120
addi x29, x0, 3
addi x30, x0, 5
addi x9, x0, 10

loop:
addi x5, x5, 1
addi x6, x6, 1
addi x7, x7, 1

bne x29, x6, check_buzz - .
bne x30, x7, do_fizz - .
lui x11, %hi(fizzbuzz)
addi x11, x11, %lo(fizzbuzz)
addi x12, x0, 9
add x6, x0, x0
add x7, x0, x0
jal x0, write - .

do_fizz:
lui x11, %hi(fizz)
addi x11, x11, %lo(fizz)
addi x12, x0, 5
add x6, x0, x0
jal x0, write - .

check_buzz:
bne x30, x7, do_num - .
lui x11, %hi(buzz)
addi x11, x11, %lo(buzz)
addi x12, x0, 5
add x7, x0, x0
jal x0, write - .

do_num:
add x18, x0, x5
lui x11, %hi(num_end - 1)
addi x11, x11, %lo(num_end - 1)
addi x31, x0, 32
sb x31, 0(x11)
addi x12, x0, 1
tostr:
rem x31, x18, x9
div x18, x18, x9
addi x31, x31, 48
addi x11, x11, -1
sb x31, 0(x11)
addi x12, x12, 1
bne x18, x0, tostr - .

write:
addi x10, x0, 1
addi x17, x0, 64
ecall
bne x28, x5, loop - .

addi x10, x0, 1
lui x11, %hi(newline)
addi x11, x11, %lo(newline)
addi x12, x0, 1
addi x17, x0, 64
ecall

addi x10, x0, 0
addi x17, x0, 93
ecall

.data
newline:
.byte 10
fizzbuzz:
.string "fizzbuzz "
fizz:
.string "fizz "
buzz:
.string "buzz "
.fill 4
num_end:


pls r8,
...am I even doing it right?

How can I code an alcohol?

God

she's the official /dpt/ bot. most of the time she is accurate but shits happen

Because failure is invisible.
Nobody will see the nothings that failed, but the one something that worked resulted in this very human shitposting on FOURCHAN in the year 2010 + 6

Here's a nickel kid, buy yourself an x86

you can implement a functional programming language on the jvm, that one being imperative or not doesn't matters.

good lambdas obv and that's clearly mated with higher-order functions

tco and other call optimizations are compiler implementation details that don't require a functional programming style and have been kicking around in imperative compilers for decades

i also want a functional type system with HKTs and Concepts to replace this OOP inheritance garbage that we've got, but that's why i said 90%

Writing a lisp in C that only works on iOS.

I'm doing it without the usage of the N, I, and G keys with creative redefines.

>you can implement a functional programming language on the jvm

... what?

i want to write an elite/escape velocity clone

Clojure?

Working on a really cool brute force script :-)

>Brute Force

Niceme.me

tyitry

>Congratulations, you've weeded yourself out of 90%+ of all available programming jobs!
Let Pajeet do them, I am too important for this kind of crap.
>inb4 autism

>the cost of spinning up those 256 machines
Do you mean the cost of provisioning machines? Obviously that's amortized over the lifetime of the job or cluster. I'm not convinced it's much more expensive than provisioning one very beefy machine since it's all parallel.

And again, you can run 256 instances on one 256 core machine, and your cluster management software will already do that.

You can also run 2048 instances across 8 * 256 core machines or 32 * 64 core machines, which the single system program can not.

>Or, if you're using a cloud provider, the cost of absurdly high usage fees for the "convenience of cloud".
There's a crossover point as you know.

GPGPU cores do not work the same way as CPU cores.

So it converts tabs to spaces but then does not tabulate?
Thats embarrasing.
And on top of that it's four spaces.

I already said that I have respect for those who have managed to find gainful, rewarding jobs with these self-imposed constraints.

If you're important enough to dictate your shop's dev tech, then that's pretty cool.

anyone here ever tred Cilk +

My java professor is teaching us java applets but aren't they dead now? And one of the lecture notes he handed us says "Netscape navigator and internet explorer are some of the most popular browsers today" I'm passing the class with A but feel imnot learning much, what do

>java applets but aren't they dead?
Yes.

>Netscape
Is this bait?

Your professor hasn't updated his notes since 1998. Just think of it as a history class, pass it, detail the bullshit in a review, and get on with your life.

i always knew i hated xkcd op images, but i never knew why

Take a paper sheet. it's a representation of nothing.

cute a triangle from it.

the triangle is maters, the empty form of the triangle in the paper sheet is anti maters. you have something

put the triangle back in the empty form; both the triangle and the empty form have now disappeared. you again have nothing (this is how an anti maters bomb would work)

something is when you separate anti maters from maters.
nothing is when you assemble anti maters with maters.

what nothing is is still unknown and the subject of many researches.

Are you upset?
You seem upset

>Take a paper sheet. it's a representation of nothing.
you are meming, but people who use analogies should deconstruct their minds and start over

Well, it's a somewhat good eli5 but it doesn't explain why the laws of physics are here in the first place.

>but people who use analogies should deconstruct their minds and start over
I'll interpret that as a euphemism for shooting your brains out and hoping for resurrection in a better world.

>Python

scienceblog.com/40901/theoretical-breakthrough-generating-matter-and-antimatter-from-the-vacuum/

ITT: People who have zero fucking clue what they're talking about

Wait are you trying to say it's not what Sup Forums is supposed to be?

It gets old really quick after almost 10 years of the same shit.

I approve of this post

>don't want to write c++
>distributing java requires user to have jvm
>C's standard library is too limited and it's impossible to find portable libraries

Is D the only usable language for application development?

Then feel free to enlighten us

Ada's the way to go it seems senpai

Sure.
Here's your lesson for today: Knowing what you don't know is as important as knowing what you know. Otherwise, you might just make a fool of yourself online.

>What is anonymous imageboard
Baka.

standard ml my laddy

>impossible to find portable libs for C
this is false

Would these be considered refactors?

certainly not

>it's impossible to find portable libraries
A huge number of libraries are written with portability to Win32 and the *nixes in mind.

So guys, how to distinguish between someone really smarter than you or just spreading obscure memes?

Ask them if something is a refactor.

By being smart enough to know what they're talking about.

memes are power. if their memes are more obscure than yours, they are likely smarter than you

>Don't want to write c++
>c++ is the most fitting language
Seems like you should write it in c++ after all

sure why not

What if life is too short to filter out the substantial amount of memes? Are we doomed?

it's not

ok i trust u

C#, my man.

i have never seen haskell discussed anywhere as much as here

There are dozens of usable languages, why focus on those 4?

>if you read that post he makes it very clear that their problem was abstruse functional monad gunk
Only because Scala makes it horrible to write and read compared to e.g. Haskell.

Because it's a meme, not because a lot of people actually have good knowledge about it.

Is rust a meme language?

trying to finish my Fortran program and am getting this one little error preventing full compilation

It's got a meme community but I dunno if it's really a meme language. It's spawned the meme "fighting the borrow checker" but that doesn't have a whole lot of basis in reality.

did that asshole ever figure out how to get crisps from the machine

no

There you go: (

except i dont know what the hell its saying

>that color scheme
no wonder you're missing a bracket

whats your scheme?

MIT Scheme