/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Last thread:

Attached: 1496148822323.jpg (1920x3272, 2.01M)

Other urls found in this thread:

benchmarksgame-team.pages.debian.net/benchmarksgame/faster/haskell.html
streamable.com/o73zy
emacswiki.org/emacs/AutoSave
twitter.com/NSFWRedditGif

First for C

Attached: seaman.png (376x341, 102K)

Window manager in electron

C++

JavaScript rocks!

Attached: js-rocks.png (1000x494, 286K)

Haskell doesn't have monads.

>in electron

Why?

DOM rendering engine using

I don't care to know it
Also I seriously doubt java is as slow as haskell

no

Attached: 1447689083155.jpg (784x776, 206K)

why the fuck did I learn rust? it looks nice in my cv but finding a job that even considers using it in south america is impossible.

Attached: 1547656513196.jpg (1024x576, 28K)

Working on some stuff on my raspberry pi in node.js as some fun, but I can't get my linter to work. Using the SSH-FS plugin to edit with Visual Studio Code, anyone know what I should do it get it workin?

Move out of the third world then.

did you seriously think you can find a job using rust.

how bad did your school scare you away from using rust

the only company that uses rust in practice is mozilla, otherwise it is a legitimate meme language for github weekend projects

90% of rust libraries are just wrappers around C or C++ libraries even. It's just an un-necessary middle-ware at this point

Attached: ao2wD6n_700b.jpg (700x483, 39K)

>how bad did your school scare you away from using rust
how bad did your school scare you away from using C or C++ I mean

>linter

Who cares lmao?

>using C++ at work
>using Rust at home

feelsgoodman

Nice to have, no reason not to.

>Final boss approaches

Attached: 19BF8EDA-996F-4E0A-A5FE-6AED837B97BA.jpg (750x572, 56K)

I love C, I just didn't think the rust scene would be so empty, there's absolutely nothing. I even tried convincing my team to use rust for a project that doesn't matter too much but they kept telling me that it's a waste of effort.

JavaScript rocks!

Attached: javascript rocks.png (1000x494, 134K)

>making a shitty meme about your own shitty post from half an hour ago
Utterly pathetic.

>I even tried convincing my team to use rust for a project that doesn't matter too much but they kept telling me that it's a waste of effort.
you are legit the "why not re-write it in rust? Lets do it all in rust. p-please use rust" task-force that everyone hates the language for

Rust is a hype-driven viral nu-programmer language. It's a C and C++ world and rust has to wrap nearly everything in "unsafe" to do any serious work with the C/C++ libraries that it has to wrangle together anyways.

try asking people who know rust next time

imagine someone would randomly ask you to make a project in a language you don't know and what your answer would be

>I even tried convincing my team to use rust for a project
jesus you're just like the rest of Jow Forumsrust

epic meme bro

Go with Haskell. Lots of libraries (and they're actually good quality), and a much better type system than Rust.

>hey guys I read a forth tutorial!

Haskell has too much syntactic sugar. Unironically a diabetic language.

Attached: C3352203-7F6B-4ABB-B688-DB210D78DB06.gif (500x600, 386K)

>
>
benchmarksgame-team.pages.debian.net/benchmarksgame/faster/haskell.html

Attached: afasdf.png (498x494, 162K)

Haskell is the C++ of functional programming. Time to move to Idris.

y u mad?

Attached: power of haskell.png (819x206, 14K)

Oh look. Haskell is faster in some cases. Anti-Haskell shills BTFO

(and let's face it, the Haskell code probably wasn't even optimized well)

>GHC Haskell is twice as slow on half the benchmarks
What is this supposed to show?

>I don't care to know it
and I'm not going to try to evangelize you, but maybe don't make remarks about it being "slow mental masturbation" then?
>Also I seriously doubt java is as slow as haskell
You know that Haskell is a compiled language, right? If you know what you're doing you'll get close performance.

Reminder that most of /dpt/ thinks HKTs are memes and that cons takes linear time in functional programming. The average /sqt/ poster is better at programming than the average /dpt/ poster.

Is it possible to “declare” that your project is a fork of another on github after you’ve uploaded files? Do fork statistics include private repositories?

Also is it possible to fork only a few files from an existing project?

The amount of FUD that is spread about Haskell and FP is incredible. That so many mediocre programmers don't want to have to learn something new and will expend this much effort trying to prevent its adoption is completely pathetic.

Reminder that Idris 2 will probably be a better Rust than Rust is. Absolutely comical.

Megaman X in HolyC

Video w/ sound: streamable.com/o73zy

Attached: mmx.webm (852x656, 2.37M)

Hey if I learn python and R on Coursera will I get jobs?

@Produces
@SomethingStupid
public Optional produceSomethingStupid(@Something boolean mode){}

imperative man bad

Attached: YFwBkVK.jpg (1063x1137, 139K)

Let's say I have something like this in c++:
class a
{
a m(int);
}

auto lambda = [](a item){return a.m(5);};

b = lambda(a);

Is there a way I can edit it so it looks something like:

auto lambda = [](){return a::m(5);};

b = a.lambda();

there's not ufcs

just make it a member if you have to

Isn't Haskell except for the first two cases always slower?

So there's no way to call the lambda with the member function call if it's not defined inside the class?

Correct. Member function call syntax occurs exclusively for member functions. This feature (known often as Universal Function Call Syntax) is present in some languages like D and (sorta) Rust, but not C++.

Jekyll, YAML, and Bootstrap

>Rust

Attached: stf,small,600x600-c,0,0,1000,1000.jpg (1000x1000, 178K)

you're looking for Nim

Is there 1 functional language that you can write an OS in?

FORTH, the gentleman's language

Ooh that sucks, since I was able to call method function pointers I thought there was a way to use lambdas like that too, well thanks pal.

>i-it isn't always faster than Java! Java is still relevant for one more year!!

>java

Attached: yeah-0programin-java-ust-athisenterprisedevjob-forthe-past5-years-and-um-slowly-26653900.png (500x610, 93K)

Julia is the best language

Attached: wM8M4PL.jpg (480x141, 12K)

Does forth even have functions?

Does anyone in here use spacemacs?
I can't for the life of me get auto save to work. I've tried like 3 different things and it's getting real annoying. I started dreaming of :w

I use Spacemacs but I don't use autosave unfortunately. That sounds like a nice feature tho so thanks for the advice.

I could share with you some abhorrent code.
template
constexpr
auto ufcs(Ret (*fptr)(Obj*, Args...))
{
// relies specifically on Itanium ABI ccs
union Pun
{
struct
{
Ret (*fptr)(Obj*, Args...);
size_t fixup;
};
Ret (Obj::*as_mem)(Args...);
};

Pun p{{fptr, 0}};
return p.as_mem;
}

struct Foo
{};

void bar(Foo*);

void demo()
{
Foo f;
(f.*ufcs(bar))();
}

>That sounds like a nice feature tho so thanks for the advice.
I am constantly surprised that this doesn't seem to be default for many editors.
I am so used to it yesterday I was trying to find a bug for an hour, just to finally realize that I fixed the bug the first time I looked at the problem I just forgot to save the file.

Yes, rip lisp

Attached: 040ACCFC-6D67-4685-A273-F1054BAD9F88.jpg (768x1024, 438K)

I can code a language that is better than Rust. Something like Cyclone. But just like Cyclone, I highly doubt there would be any adoption.

>tfw not a fan of web or web programming at all but pretty much forced to learn it

if any of you have done freelance work, how do you make sure you get paid?

how do you program a programming language

Attached: 1494719619461.png (645x773, 10K)

Any code will be better than Rust.

do a project in it

emacswiki.org/emacs/AutoSave
I don’t use auto save because years of vim usage has made :w an automatic reflex

There are several steps to code a programming language. First there is the lexer than comes the parser and so on.

Anyone else afraid they'll be obsolete when they hit their 40s/50s? Will ageism still be a thing when we hit that age? I'm afraid I'll only be a programmer for a short time and then I'll have no idea what to do when I hit 40+.

i bet that sounded clever before you typed it out

Break into tokens with a regex and then use a for loop on the tokens to print assembly based on an if else chain.

you are supposed to die of cancer by that age
that's how the system works

Read SICP

Yeah but what if we don't?

After you defined everything on paper, you write a compiler that translates it into assembler

Make a tool because you find it useful.

Hopefully you find something more fulfilling than working on crud. Tech doesn’t change fast outside of the FAANG bubble.

die homeless
or if you were a responsible american and ate your big mac quota you could have had a heart attack by now

Kys stupid faggot.

? What are you made about

no because I'm not a wagecuck

work as sysadmin at some backwater firm and manage the microsoft office based IT infrastructure

you ask for money in increments after you've completed each step
if they stop paying you stop working
I've had people make up an excuse and not pay the final milestone after I'd finished but I still got most of the money

>codemonkey a does first step for free
>codemonkey b does second step for free
>codemonkey c does third step for free

Attached: 32538377.jpg (349x356, 76K)

If you have the prowess to actually make that work you probably could have coded it yourself

But by that time almost everything will be automated or in a public cloud somewhere. I guess I'll just die homeless or be a Lyft driver or something.

Rust is choice of braindead people. Thoughts?

Holy shit guys. Com sci 1 student here. I managed to make a Bash program that didn’t segfault. That was a close one.
print ‘hello world’

Attached: 16C00472-706B-43D9-933F-CCC34E3DB96F.jpg (650x650, 42K)

True, maybe at that point independent work or consultation would be a better option.

I think you shouldn’t trust anything you read on Jow Forums.

Nice

I decided to think that two months ago when i saw core dev team. This language is a joke.

You just have to make your Microsoft Azure Cloud MSXX whatever bullshit certificate™ and you can work somewhere as a "consultant"

After reading and running a bunch of C projects I found on github I managed to make my own. What’d’ya think?
printf(“Segmentation fault\n”);