/dpt/ - Daily Programming Thread

Fortran Edition

PROGRAM Run
USE Demo
IMPLICIT NONE
TYPE(My_complex) :: one = My_complex(123, 456), &
two = My_complex(432, 876), three, four

three = one
four%imaginary = two%real
four%real = two%imaginary
WRITE (*, '("( ", I0, " , ", I0, " )")') &
add(one,add(two,add(three,four)))
END PROGRAM Run

Previous thread:

Other urls found in this thread:

coursera.org/specializations/data-structures-algorithms
youtube.com/watch?v=csjfLTt6-io
sdleffler.github.io/RustTypeSystemTuringComplete/
youtube.com/user/thenewboston/playlists?disable_polymer=1
github.com/Efrit/str_switch/blob/master/str_switch.h
youtube.com/watch?v=GnLbxEZX3gU
twitter.com/SFWRedditGifs

There is nothing wrong with JavaScript

Part time job's killing me, 40+ hours a week and I hardly have any time to devote to programming.

> WRITE (*, '("( ", I0, " , ", I0, " )")')
for what reason?

>Part time
>40+ hours a week
user...

40 hours a week is full time m8

wtf chad boss is scamming me

What if you went full time?

Recommend me a good functional programming language (please no Scheme, LISP or any meme languages like that)

~50 hrs, extra pay and a lot more work politics, stress. Absolutely not worth it

Everything is wrong with JS

Elixir, F#

Holy shit, 50 hours?

Even the part time is not worth it. 40 hours a week is NOT part time.

>recommend me a good functional programming language (excluding all the decent ones, of course. memes only, please!)
Why did he mean by this?

hasklel

I said non-meme.

A non meme language is multi paradigm, not exclusively functional

Scala

>meme language
not gonna waste time with a kid

what other professions immaturely argue about their tools like programmers

Why are self-taught programmers so much worse than CS graduates? Does formal education really make that much of a difference?

musicians

Dwarf miners did that in Arcanum

The amount of CS shitters that post here is worse than any mt. stupid neet post

Its ok my CS friend, one day you'll be as skilled and independent as self taught programmers, keep practicing.

Should I enroll?
coursera.org/specializations/data-structures-algorithms

I want to learn about red black trees, ropes and graphs

>CS shitters
You sound unreasonably upset.

There's a reason Google and Facebook only hire programmers with degrees: It guarantees that the applicant has a broad range of programming knowledge. The self-taught ones tend to have unacceptable gaps in their knowledge, making them unemployable. It's just a basic fact.

Stanford's algorithm courses are better.

>Fortran
It's probably a requirement or some shit. I mean they don't even have a complex conjugate function. They had to assign each part of four like the savages.

>google
ah yes, the mark of quality.
>The key point here is our programmers are Googlers, they’re not researchers. They’re typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They’re not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt.

Reminder that Rust is an irrelevant programming language and that "rustaceans" all have schizophrenia

>threads were "invented", so multiple "coroutines" can share same address space, and be scheduled by os. so it can save on expensive IPC and context switches.
>modern software creates cloned processes of itself to do each assigned task, and uses IPC extensively (for supposed stability)

It's either
[ ] a: All rust users are schhizos
[x] b: You are a schizo.

Where did Rust touch you?

>Compiler complaining about vtables again

youtube.com/watch?v=csjfLTt6-io

What do you think? Did he define [this] properly?

>38
wtf

>Fortran
Based.

PROGRAM EUCLID
PRINT *, 'A?'
READ *, NA
IF (NA.LE.0) THEN
PRINT *, 'A must be a positive integer.'
STOP
END IF
PRINT *, 'B?'
READ *, NB
IF (NB.LE.0) THEN
PRINT *, 'B must be a positive integer.'
STOP
END IF
PRINT *, 'The GCD of', NA, ' and', NB, ' is', NGCD(NA, NB), '.'
STOP
END

FUNCTION NGCD(NA, NB)
IA = NA
IB = NB
1 IF (IB.NE.0) THEN
ITEMP = IA
IA = IB
IB = MOD(ITEMP, IB)
GOTO 1
END IF
NGCD = IA
RETURN
END

So we have a group programming assignment know which will last six weeks, and will involve making a proto-forum website. We have to use heruko for hosting.

What language/technology should I shill to my group? I checked the selection suggested on the heruko homepage and wow, everything is either utter shit or utter meme.

just go with flask and sqlalchemy, doesn't get as simple as this and you get have it done in under a week even if you're new

>heruko
Use python

I was actually thinking about trying out Go. I'll probably never use it again but it would be interesting to see what the meme is all about.

Is there any reason this would be a bad idea? "Go is a meme" doesn't count, since the entire point of this exercise would be for me to gauge for myself just how much of a meme it is. Unless you can make a compelling case as to why I should never even touch Go at all. "Go is botnet" doesn't count either since it's a uni assignment and we're using stuff like heruko and github anyway.

rust is the most turing complete programming language

>Unless you can make a compelling case as to why I should never even touch Go at all.
I'm not willing to maky ane, use whatever you want, you posted what people would suggest and I suggested a simple and quick solution, you're free to ignore this suggestion and I didn't suggest against Go either.

Quite the opposite: it cant perform mutable aliasing, thus it's not TC at all.

Why so defensive?

>I didn't suggest against Go either
That's basically what I was asking, thanks

This.

I'm new to databases and are doing some exercises in mysql to get better. How do I get a value from a tuple based on another value without using subquerys? Basically, I want to write:
>select x, y from table1 where x in (select x from table1 where z > (select z from table1 where x = 1));
without using the nested subquerys, somehow getting z where x is 1 and then filtering based on that.

Mutable aliasing is required for Turing completeness?

wtf?

>it cant perform mutable aliasing,
Wrong
> thus it's not TC at all.
This has nothing in determining turing completeness

Stupid brainlet

...

>can't switch over std::string
I WANT TO FUCKING KILL ISO C++ COMMITTEE RIGHT NOW

>sql
>/wdg/

Java is good

You cannot write any of the infinitely many programs that compute 2 mutable references, thus you cannot write all possible programs in Rust. A Turing complete language is by definition one in which you can write any possible program. Therefore, Rust ain't TC. Simple, no?

Why can't we all just get along?

I'm not into web but I guess they might have a good grasp on databases, thanks.

Man you're dumb, reread the definition of TC

>You cannot write any of the infinitely many programs that compute 2 mutable references,
You can use multiple mutable references in unsafe rust
> A Turing complete language is by definition one in which you can write any possible program.
That's not the definition of turing completeness, otherwise C is not turing complete. You cannot write a C program that allocates exactly 1 bit memory.

>dumb
Yeah or no. Pretty sure he's not educated enough, which is mostly all the Rust haters(2) ITT. These are "self taught" programmers of Sup Forums that learnt programming from the popular memes in Sup Forums

Even Rust's type system is turing complete
sdleffler.github.io/RustTypeSystemTuringComplete/

Find another FUD, autist.

I guess this text has something to do with them creating Go? But then what a "brilliant" language will be? Certainly not C, C++ and Python.

>switch over
I am genuinely curious what did you mean by this?

Good webm

>GOTO 1
What for? Fortran has loops.

switch (A) {} means switching over A

Fact: C++ is the most brilliant language in the world.

That's Fortran 77.

>What do you think?
Why do you even ask? The fact that 400k people try to learn from this delusional retard is a disaster.

Look at all this material he covers:

youtube.com/user/thenewboston/playlists?disable_polymer=1

I think it's safe to say he's pretty intelligent.

>view count == viewer count

Since C++11 you can use this macro
github.com/Efrit/str_switch/blob/master/str_switch.h
It will work fine on finite set of string constants and will track duplicated cases and such, not much different from real switch.
Author's example
std::string month;
std::string days;

std::cout > month;

SWITCH (month)
{
CASE("february"):
days = "28 or 29";
break;

CASE("april"):
CASE("june"):
CASE("september"):
CASE("november"):
days = "30";
break;

CASE("january"):
CASE("march"):
CASE("may"):
CASE("july"):
CASE("august"):
CASE("october"):
CASE("december"):
days = "31";
break;

DEFAULT:
days = "?";
break;
}

>arguing with a schizophrenic rustlet
Learn to recognize a fellow Rust false-flagger. It will save you some typing effort.

>js
>js
>js
>how to install adobe reader
Fuck no, it's the opposite.

>An external dependency
>in C/C++

It's header only so it's fine.
I'm not posting that to encourage someone to switch over str, but if he really needs it there's a way. It's actually safe because it translates into real switch over hash values and if something goes wrong it simply won't compile.

let me see your youtube tutorial then, pajeet

Rust wins again

thenewboston is meme-tier, not a good resource.

If I want to put stuff on my github to show employers, is there any value in the kind of projects that are recommended for learning?
Or does it have to be shit that someone would actually use?

studying for uber and facebook interviews I have scheduled for a month from now. I'm going to make it bros.

>Being this butthurt over someone insulting random uneducated switcher
Perhaps it's not random after all.

You're learning Fortran 77, right dpt?

youtube.com/watch?v=GnLbxEZX3gU

Better in terms of what?

>C++ doesn't even have pattern matching

>that awfull lighting
Enjoy your eyecancer
Also
>selling your soul to (((facebook)))

>worked hard on my cs degree
>completely burned out now
>don't want to touch computers ever again
:^)

Why did you chose CS if you don't like it? Do you hate yourself?

>literal kid making youtube tutorials for an ancient language
How am I supposed to feel about this?

>worked hard on my cs degree
If you work hard in CS, you are doing it wrong.

looks /comfy/, wish i had a whiteboard

good luck on your interview next month user :-)

...

How does one even program in Rust? Is there any serious IDE?

>tfw struggling with babbys first project
fuck man

One time someone was tellin me something was coded in fortran, and I just kept he thought saying Sup Forums wrong

intellij

>muh IDEs

/dpt/ I need design advice. I am writing a module in C/C++ for an OS, the module will not be unloaded from memory but I still wish to have the ability to patch it without forcing the user to reboot, or have administrative privileges.

The idea I have come up with is to have the module be an interface, that itself calls a library that can be loaded and unloaded.

With this approach, I need to decide on what the interface will be like, the only thing that I have thought about, is having a single function with a message parameter ,that is passed to a parser in the remote library,
Something like this:
module.Send(msg) -> dynamic-library.Receive(msg) { ...}

This feels like a bad design but I can't think of a better way to really handle updates if I can't be unloaded and will only have 1 instance.

Any advice?

>who needs usability? all i need is klabnik's cock up my ass
Rust: The Absolute State