/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Previous thread:

Other urls found in this thread:

github.com/simonster/StructsOfArrays.jl
pastebin.com/VQJxgm2F
playframework.com
phoenixframework.org
wiki.haskell.org/Haskell_in_industry
en.wikipedia.org/wiki/Kübler-Ross_model
twitter.com/SFWRedditImages

Nigger nigger nigger nigger nigger
Cia niggers

What's the best functional language for web applications?

F#

Linear types will save systems programming

Dynamic typing will save systems programming.

>>>/wdg/

Reflection is also slow. Really really slow.
It's probably part of the reason why many ENTERPRISE Java apps are so slow.

I think it's java.lang.Class instead of Foo in front of the foo1 and foo2 variables, but apart from that your code seems to compile. I might end up using this, especially if I can also do it from Kotlin.

Ah right. Visibility based on class instead of modules is the root of all evils.

Let's make up weird nomenclature to make ourselves feel smart.

Employed Idris programmer reporting in.

Nah, he's right about Foo instead of Class for those variables.

Widespread use of reflection is a sign of a too-limited language.

It's a type which always has a constant number of references to it, which typically is known at compile time.

It allows you to get rid of GC while keeping memory safety.

Most ARM hardware isn't a good choice for safety critical and mission critical designs. They're recently come out with some stuff that's pretty good, or at the very least a step in the right direction, but I don't think it'll become prevalent in Aeronautics/DoD/etc for at least a handful of years.

k brainlet

Better than abusing existing nomenclature, which has led to such atrocities as "Isomorphic JavaScript".

>Widespread use of reflection is a sign of a too-limited language.

Ah yes, it calls create on the class. My bad.

I don't necessarily agree, but I do agree that compile-time reflection is pretty much always better, and doable in a large range of cases if your type system is good enough.

>muh compile time
jit will save us

Elm is the most mature. It's the Golang of functional languages, but it is mature.

Have fun in your blublang, then.

I don't think so, you can do most of the required reflectionish tasks statically.
Enterprise architects and coders just meme themselves into it.

Yeah, that's one viable option. Julia does this really, really well:

github.com/simonster/StructsOfArrays.jl

You know that you have an interesting language when reflection is used to make code faster.

>when you refactor your code and it passes its unit test on the first attempt
i am extremely skeptical right now. but its 30 min till quittin' time on a friday so i don't feel like investigating it further.

You have to be seriously retarded to think that language X being able to do an entire class of things that are inherently impossible in language Y means language X is more limited.

So what I've gathered from diving into FP is that FP languages can't even launch missiles. Clearly the work of communists who want to see America be sitting ducks during an attack

>having "should" in all your tests
see me after class

ctrl+c, ctrl-v

How should (hehe) they be written then?

just remove should.
PASS: Triggers because a < 9000 and all == true

thanks senpai (not the guy who wrote the refactor) I learned something then.

>PASS: Triggers because a < 9000 and all == true
FAIL: Triggers because a < 9000 and all == true
Yeah, no.

Anyone use Spyder?

Doing some simple python shit, everything's in the same folder and it shows the folder as pointing to to folder with all the files.

But its not pulling functions from the other files.

dont break the test then faggot

why the homophobia?

Read my original post: >Widespread use of reflection is a sign of a too-limited language.
Nowhere did I say that a less limited language would not also support reflection.

>Verify some event
>PASS: when x > 20
>PASS: when y < 30
>FAIL: when z == 50
>etc.
That's saner to read.

Where were you when Perl was kill?

>testing
>not proving

I got rangeb& at work for some reason, so I'm posting this from what I remember of the sql I wrote: pastebin.com/VQJxgm2F
For some reason Sup Forums doesn't allow me to post the code here.

It was fun. Thanks.

>posting from work
Is that why /dpt/ is like a Java conference these days?

>Read my original post
I read your original post, and your conclusion is retarded. Nothing about widespread use of reflection indicates that a language is "too limited". If you're planning to follow up with "but muh memelang can accomplish X using feature Y instead of reflection", just shoot yourself.

>>Where were you during the last two decades.

It's mostly dead now, but it took a really long time to die.

Someone at your work is a shitposter extraordinaire. You need to find him.

imagine an alternate history where this didnt happen and we could throw the procedural imperative oop paradigm into the garbage

c++ is the greatest language of all time

what are some entry-level programs/scripts that a person with an emphasis on infosec can write? Is a basic port scanner in python good for a person with intermediate skills?

Working on a simple panic button with Arduino and LoRa. Want to make the communication secure wile using direct communication and nt over network.

#include
#include

int main() {
::std::aligned_union_t storage;
new(&storage) ::std::vector{true, false, false, true};
}

Imagine an alternate history where parallelism didn't happen and we could throw functional programming into the garbage.

t. failed fp class in college

t. failed oop class in college

we would use functional programming anyway because of all the other benefits

My college didn't actually teach OOP, it wasn't considered important.

>we would use functional programming anyway
We wouldn't, because none of its supposed benefits negates it being a uselessly inefficient way to do things.

My college didn't actually teach FP, it wasn't considered important.

shitty college

Hearing a lot about smalltalk from some friends. What exactly makes it so good

Looks like my college was right and your college was wrong.

Hardly. There was simply no time for shitty, academically uninteresting material requested only by industry.

sorry but your college is shit.

no need to be mad

more advanced compilers and hardware will always be pushing more advanced langs closer to cshit forever as a rule; you're lucky there are still microcontrollers left in use to program for minimum wage

>college doesn't prepare you for industry
sounds like a great one (I know you're talking about a community "college")

>Looks like my college was right and your college was wrong.
Looks like your college was producing welfare recipients while mine was producing productive members of society.

Scala or Elixir solid web framework and DB connectors.

playframework.com
phoenixframework.org

how the fuck do i find the best side to put the edges of the lines?

My college prepared its students for doing research. Yours sound like they prepared their students for crud app wage slavery.

In any case, I was able to glide effortlessly into industry after tiring of academia. Being taught strong foundations and theory enabled that.

>muh sufficiently smart compiler
This is a meme. No amount of compiler optimizations will ever make your Haskell meme "quicksort" usable.

>muh better hardware
While your shitty software eats up cycles to make Haskell work and satisfy your autism, the competition will be using the extra computing power to deliver more impressive results.

>after amassing 200k in debt I was able to glide into a job
lel at ur life Ill be swimming in my millions

>My college prepared its students for doing research.
Show me your research, user. inb4 you're too afraid to get doxxed. You never even went to college, you dumb NEET, and everyone here knows it.

>muh academia
>muh research

Ur/Web. Or OCaml cause ReasonML is fucking everywhere now.

ideally talking about a hypothetical shift in hardware where the memory-cpu gap goes away.

apart from that, normal hardware advancement pushes C more and more into the territory of diminishing returns

>talking about a hypothetical shift
Okay. Call me back when Haskell suddenly becomes practical. I'm sure it'll happen any day now, just like FP shills have been claiming for decades.

>normal hardware advancement pushes C more and more into the territory of diminishing returns
And yet you can't provide a single shred of evidence for this, while modern practical programming languages still jump through various hoops and make sacrifices in their semantics trying to approach C performance.

>are you paid for what you're working on?
>are you doing std 8 hours?
>how much of those are actual productive time?

yes
no
some 5hrs/day on average

I've got a sort of creative freedom and I tried to run 8hrs/day for like 2 months and couldn't manage more than ~5hrs/day or so.

I'd burn out at hour 3 and force myself to 5.

...

>how much of those
many of*

Haskell is already practical, and is used in industry.

>and is used in industry.

>how the fuck do i find the best side to put the edges of the lines?
Use path-finding on a grid, simplify the path to remove redundant points, draw a spline through the remaining points.

>Haskell is already practical

This is finding the edge with the shortest distance to the center of the target.

I like it except for the diagonals.

It was the second language to have dynamic dispatch.

see

wiki.haskell.org/Haskell_in_industry

en.wikipedia.org/wiki/Kübler-Ross_model

yes haskell and other pure functional memes are used in industry in significant roles

I dont understand why functional langauges make you angry to start with; that seems to be the main barrier from you seeing simple facts

interesting

so, what have you done with Haskell ?

>I like it except for the diagonals.
Then use a Manhattan distance, and draw your lines accordingly.

Hey guys, I'm having trouble deciding wether or not to enroll in this data structures with java class at uni. I took programming classes in c++, but I'm not sure if the transition to java will be too difficult seeing how I've never touched the language. Also, missed 1 week of classes so I'm adding in on the last day to do so. Thoughts? I was ok at c++

fintech stuff

Daily reminder that OCaml's oop system is better than Java's. It just happens to be built on top of a language which is even better when used as a functional language.

i'm using manhatthan distance, but this is not a* or dijkstra. i just check the manhatthan distance from to and pick the edges with teh smallest distance then "lineTo()".

Even APL is more widely used than Haskell in the industry. You people are outright delusional.

Java is easier so you may have a better time understanding concepts without having to write garbage looking code

>I dont understand why functional langauges make you angry to start with
Let's drop the charade. We all know they make him angry because he doesn't understand them and they're growing in use.

>i'm using manhatthan distance,
I told you, just draw the lines accordingly, i.e. only horizontal and a vertical ones.

like what?

>Java is easier
I strongly dispute that. Java is one of the most difficult programming languages in existence.

>everyone who ridicules me is just angry because they don't understand
This is literally the reasoning of every fan of every marginal and irrelevant language in the history of programming languages.

After learning java for 3 years I wanted to blow my brains out when I learned C