/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Old thread:

Other urls found in this thread:

freevms.net/
github.com/ztmr/FreeVMS
youtube.com/watch?v=7GewtqGrjJ0
youtu.be/oVyx9L3IGfs?t=2h26m30s
stackoverflow.com/questions/12535722/what-is-the-best-way-to-implement-a-timer
twitter.com/SFWRedditGifs

How do I install SciPy??

Second for D

Trying to figure out the krivine machine and rice my desktop

sudo rm -rf ~/ --no-preserve-root; sudo apt-get install scipy

After taking a programming languages course last semester I developed an appreciation for Lisp, so I've been working through Clojure for the brave and true. It's a really cool book and I'm loving Clojure so far.

Clojure is an excellent example of a decent language ruined by Java.

This.
Lisp Flavored Erlang > Clojure.

working on my autism grid aka game of life, it's the most fun i've had in a while, i'd like to make a 3d version eventually using opengl.

I really just chose Clojure because of the book. I figure if I learn functional programming through Clojure, I can transfer that knowledge well enough to any other functional language like Haskell or Erlang.

Speaking of which, does anyone know what the job market is like for functional programming? I assume there aren't a lot of jobs out there, but there are at least some, and I know there aren't many competent functional programmers out there.

If your ONLY goal is to learn functional programming then drop everything else and learn Haskell immediately. If you want to learn a lisp that runs on the JVM then learn Clojure. It's not purely functional. Haskell will teach you the hardcore ins and outs of functional programming like no other language possibly can (well, besides ML, OCAML, etc.) and is fairly easily accessible. Just be prepared to read a lot of graduate level papers.

Job market isn't good for these languages but that doesn't mean they aren't used. Just that companies aren't looking for a "Clojure programmer" or "Haskell programmer". That being said they do look good on a resume since they aren't generally taught in college and it shows that you have initiative to learn things on your own.

If you want to learn a Lisp and aren't married to the JVM, Racket or CL is probably a better choice.

Take that with a grain of salt, though. If you enjoy Clojure then fuck what everyone else thinks.

>they aren't generally taught in college
My university had a class where we learned Haskell (but the paper was also about programming languages in general).
It wasn't compulsory though.

>does anyone know what the job market is like for functional programming?
it doesnt exist
unless you want to teach functional programming to other idiots

Interesting. Thanks for your thoughts. I'm probably going to continue with Clojure for right now just because I have some momentum already, but Haskell will likely be my next undertaking.

>string operators aren't overloaded arithmetical ones
>isn't prone to indentation errors
>countless modules to work with
>Larry Wall is chill as fuck

Is Perl /our/ language?

Perl is garbage.
It's his fault that regex sucks so much these days.

>string operators aren't overloaded arithmetical ones
That's not necessarily a good thing. + and * with regards to strings just kinda make sense.

>isn't prone to indentation errors
Most languages aren't. Yet those that are, are at least more pleasant to work with than Perl.

>countless modules to work with
This describes a lot of languages.

>Larry Wall is chill as fuck
Matz is pretty chill himself.

>Is Perl /our/ language?
Oh hell no. It's write-only weakly-typed garbage.

if you want to learn perl, learn ocaml instead

FreeVMS is looking for developers.

FreeVMS (VMS stands for "virtual memory system") is not just another Unix, is a real-time operative system with tight integration with the base system, DCL (DIGITAL Command Language), and also perfect for routers.

Developers are welcome!
Main page freevms.net/
Github mirror github.com/ztmr/FreeVMS

this isn't a billboard

how can I contriboot?

Your last commit was 3 years ago. Doesn't really look like something under active development.

cant say it wouldn't be fun to port to aarch64 tho

maybe port it to your favorite router and share your progress on github

he can pretty much fork the project, and is welcome to

i can port it to qemu arm64 virt machine
and thats it

that is more than good, I am looking forward to it

nevermind, read the source and i changed my mind

What are the top 5 programming languages of 2017?

1. Rust
2. Rust
3. Rust
4. Swift
5. Rust

C, Lisp, Haskell

Pyfun
C+fun
Haskfun
FunScript
Fun on Rails

>no Fun++

It's a top 6 then! 6 way tie!

Should I learn Common Lisp or Racket?

Never heard of it

haha had the same problem for the last 2 days and lost all patience on win10, went on my mint in virtual box and shit werks.

>>string operators aren't overloaded arithmetical ones
>That's not necessarily a good thing. + and * with regards to strings just kinda make sense.
They don't, at all.

Give me fun without rails.

youtube.com/watch?v=7GewtqGrjJ0

the absolute STATE of haskell discussion

Tell me, how many uses can you think of for the English word "to add"? Now tell me how it is that when you read "add a to b", commonly depicted as "a + b", that a and b should necessarily only be numbers?

1. Krakatoa
2. E
3. Arse9
4. Forth 2000
5. Rust++

>listen to this for a bit
>think i must have been listening for 10-15 minutes
>im 2 minutes in

What you're doing isn't addition though
It's appending one collection of character codepoints onto another
How many of the properties of addition are fulfilled?
What's so bad about using another operator, a new wholesome operator, with good firm rules?

do you write the address you want the PCI device to respond to on the BARs or do you do something else with them?

Bisqwit reads the Bible with a terminal based program. I want it too.

Where can I get that program and the Bible?

youtu.be/oVyx9L3IGfs?t=2h26m30s

1.Java.
2.A
3.V
4 A
5. .

>How many of the properties of addition are fulfilled?
identity and associativity are fulfilled so i'm guessing most of them.

Thanks really enjoying this video

/*
add
ad/
verb
verb: add; 3rd person present: adds; past tense: added; past participle: added; gerund or present participle: adding

1.
join (something) to something else so as to increase the size, number, or amount.
"a new wing was added to the building"
synonyms: attach, build on, join, append, affix, connect, annex; More
include, incorporate, throw in, toss in;
admix
"the back room was added in 1971"
antonyms: remove
increase in amount, number, or degree.
"watch those air miles add up!"
synonyms: increase, magnify, amplify, augment, intensify, heighten, deepen; More
compound, reinforce;
add fuel to the fire of, fan the flames of, rub salt on the wound of
"her decision just added to his woe"
put or mix (an ingredient) together with another as one of the stages in the preparation of a dish.
"add the flour to the eggs, stirring continuously"
put (something) in or on something else so as to improve or alter its quality or nature.
"chlorine is added to the water to kill bacteria"
contribute (an enhancing quality) to something.
"the canopy will add a touch of class to your bedroom"
*/

>it's appending one collection of...
>synonyms: ... append

there are a ton of videos on that channel that were all added about 3/4 months ago

All properties must be fulfilled.
Successor and commutation are quite important.
Don't think there's much good to overloading a common mathematical operator to something quite different. It's part of what gives operator overloading such a bad reputation.
Don't have to agree with me, neither of us are language designers and therefore this entire discussion is sand in the wind, so I'm fairly frustrated with myself for posting.

Not all addition is mathematical addition. Not all mathematical properties must be fulfilled.

>All properties must be fulfilled.
only if you want to argue that it's literally addition, which nobody is arguing

>/dpt/ hates "1"+"1"-"1"==10 behavior
>several threads later /dpt/ advocates for this behavior
Never change, /dpt/.

Hello I was gonna ask a question but I figured out the answer while typing and now I'm just unsatisfied that I didn't get to interact with you beautiful people

I am currently using kdevelop, but the syntax highlighting annoys me and doesn't display the things I need from a syntax highlighter.
Should I rewrite, disable or adjust?

it's like you're reading the views of several people instead of a consistent hivemind

is Haskell Platform broken for anyone else?

Who advocated that?

"1" + "1" == "11" is fine.

Subtracting further from that, if it were to be defined, should produce "1". Operator overloads on strings should always return other strings, and never implicitly cast. That said, subtraction defined on a string is kind of an awkward thought. Addition (string append) and Multiplication (string repetition) make sense from a plain English interpretation.

No one. user seems to think that just because I advocate for operator overloads means I also advocate for weak typing.

>is Haskell Platform broken for anyone else?
yes, you shouldn't use it

Strings are literally the free monoid on the set of unicode characters. Non-commutative monoids are *never* denoted with + and do not have inverses, so no "-" either. The appropriate symbol is a \cdot or similar.

Because Scala means the comfyness of rich Java library with Java/JVM support.
Furthermore Scala can be used for both OO and FP. Java has gotten Lambdas since 8 while Scala has much more FP features than that.

I am very fascinated with the language and no Sup Forums memestar and Microsoft shills can ruin this.

>>Why would you want that?
>Scala can be used for both OO and FP.
Why would you want that?

FP can be really handy at times, OOP can be handy for GUI programming 2bh

I'm trying to create a label that simply shows time ticking up starting at 0 in C#. So for example i'd run the form and it start at 0 and just tick up every second.

I tried using Stopwatch.Elapsed.toString() but that only shows how long it took to run the program. I want it to keep running forever

It sounds super simple but I can't find an answer if anyone could help me i'd appreciate it

stackoverflow.com/questions/12535722/what-is-the-best-way-to-implement-a-timer

looking for a good concurrent language to learn
should I learn Go or is it a meme?

it's a meme

What the hell is a concurrent language? Almost all languages support concurrency. Just use C++.

>Recommending C++ for any purpose
Confirmed retard

>if you need a hammer, use a screwdriver instead
>why ?
>because pajeet cuck nigger
Sup Forums in a nutshell

>A #define line
defines a symbolic name or symbolic constant to be a particular string of characters
>string of chars

#include
#define LOWER 0
#define UPPER 300
#define STEP 20
/* print Fahrenheit-Celsius table */
main()
{
int fahr;
for (fahr = LOWER; fahr

I can think of several reasons. number one would be it being the absolute best language for almost any task. number two would be that it's necessary for working in some sections of the industry

A string of characters IN YOUR SOURCE CODE.
How do you manage to be this stupid?

>being the absolute best language for almost any task
Are you fucking serious?
Sepplefags seriously are delusional.

>hammer
>screwdriver
Stop posting this you faggot
Your favourite languages are shit and you'll never convince anyone

Forgot pic

it means a string of characters used literally as-in for text substitution in your source file
not an actual char array

Of course I am. If you dislike C++ it's because you are unintelligent.
As a general rule, people that use c++ have a much greater intellect than other programmers

I also enjoy Gintama

What language would Gintoki teach?

Not an argument.

Oh okay. I am guessing C compilers understand that an int (not long or unsigned int etc.) is being declared here
#define UPPER 300

haskell because it's useless and unemployable

Enjoy your fizzbuzzes while real men work on time-critical DSP applications or the browser you are using to post your stale non-arguments.
>inb4 muh C
Yeah, let's reinvent genericity with void pointers in every time we need it, great idea
>inb4 muh Rust
Rust is still slower than C++, and its ecosystem can't compete.

But he's the strongest ever when he's not lazy

>30 lines of haskell
>any business i want
>unlimited starting

...

Calm down Jeb

Can haskell beat madara?

>madara
>"Strong"

>genericity
Why are so many fags so concerned about this shit?
People aren't going to use your shitty general solution that probably fails on some unforeseen edge case.
All you're doing is piling on extra complexity onto your project for no gain.
Stop trying to solve the world's problems, just solve the problem at hand.

If you truly want to write a general solution, you seriously have to work for it. It's only something you need to do when you're writing a library.

haskell could beat edo tensei madara even if he teamed up with reindhardt and vampire hunter D

Ah I see
So if I define UPPER to 300

I can either
int i = UPPER or
long i = UPPER

I’m not talking about Edo Tensei Uchiha Madara. I’m not talking about Gedou Rinne Tensei Uchiha Madara either. Hell, I’m not even talking about Juubi Jinchuuriki Gedou Rinne Tensei Uchiha Madara with the Eternal Mangekyou Sharingan and Rinnegan doujutsus (with the rikodou abilities and being capable of both Amateratsu and Tsukuyomi genjutsu), equipped with his Gunbai, a perfect Susano’o, control of the juubi and Gedou Mazou, with Hashirama Senju’s DNA implanted in him so he has mokuton kekkei genkai and can perform yin yang release ninjutsu while being an expert in kenjutsu and taijutsu.
I’m atalking about Kono Yo no Kyūseishu Futarime no Rikudō Juubi Jinchuuriki Gedou Rinne Tensei Uchiha Madara with the Eternal Mangekyou Sharingan (which is capable of Enton Amaterasu, Izanagi, Izanami and the Tsyukuyomi Genjutsu), his two original Rinnegan (which grant him Chikushōdō, Shuradō, Tendō, Ningendō, Jigokudō, Gakidō, Gedō, Banshō Ten’in, Chibaku Tensei, Shinra Tensei, Tengai Shinsei and Banbutsu Sōzō) and a third Tomoe Rinnegan on his forehead, capable of using Katon, Fūton, Raiton, Doton, Suiton, Mokuton, Ranton, Inton, Yōton and even Onmyōton Jutsu, equipped with his Gunbai(capable of using Uchihagaeshi) and a Shakujō because he is a master in kenjutsu and taijutsu, a perfect Susano’o (that can use Yasaka no Magatama ), control of both the Juubi and the Gedou Mazou, with Hashirama Senju’s DNA and face implanted on his chest, his four Rinbo Hengoku Clones guarding him and nine Gudōdama floating behind him AFTER he absorbed Senjutsu from the First Hokage, entered Rikudō Senjutsu Mode, cast Mugen Tsukuyomi on everybody and used Shin: Jukai Kōtan so he can use their Chakra while they are under Genjutsu.

So you compile some OCaml or C code and badly reinvent the Perl/Python/Ruby stdlib each time you need to do some quick and dirty scripting ?
I shouldn't waste my time arguing with you anyway, your response will be "shut up pajeet kys" because you are probably a 14 years-old wannabe programmer who just discovered functional language are the hip thing.

>autism
Edo Madara was immortal but whetever the fuck you are trying to describe was not.

>badly reinvent
>stdlib each time
Are you new to programming?

you can do any type