/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Previous:

Other urls found in this thread:

code.visualstudio.com/docs/setup/linux
twitter.com/SFWRedditVideos

,.,∘⍉

Flattened zip.

Tell me about the project you aren't working on right now, /dpt/.

I'm working on an image segmentation app for Android. It's probably going to be the next Snapchat. :>)

Honestly, before Kotlin, I wanted to kill myself whenever I did Android dev. It was horrible. But after based Kotlin came, it made me super productive and now I'm probably going to make like $20M in a few months.

A systems programming language based on classical logic and sequent calculus.

You mean the type system or the actual language? If the latter, is it proofs-as-programs?

Really vortexed my cortex tbqh.

For now, no, the type system is classical but not sound for reasoning. In the future I want to explore linear logic, dependent types, totality, etc.

>ASM on there at all
this is fake

>curly brace shitlang

>begin .. end shitlang

He's a lisplet lad.

I really can't take these niggers seriously at all. The survey respondents should all be shot, and SO should be shut down forever.

>Stackoverflow users are retarded
Wow nothing new

>Smalltalk
>Elixer
>Scala
>JS

I don't understand

>being a curly bracelet
>literally lowest on the food chain
>trying to let-ify someone else

how to binary cast float to int without using union in C?

wait wait wait
Smalltalk? I mean, yeah, it's sorta cute but second place

It's because most CS students learn Smalltalk in their Programming Languages class, and enjoy its simplicity.

Is it worse to have to use a language without a particular feature or a language with an infuriatingly crippled/broken implementation of that feature?

Clearly I won't be using the feature either way so it depends on the rest of the language.

A language with infuriatingly broken/crippled features is worse than just simpler language.

Is there a pic with an anime girl holding a book about Kotlin?

>is it better to not have a bridge, or a bridge that could break at any second and you fall to your death

...

>Coq above Scheme
B T F O
T
F
O

how does std::vector::swap respect scoping?

is this code generate an UB?
void swp(std::vector &in)
{
std::vector foo = {2, 3, 4, 5, 6};
foo.swap(in);
}
int main()
{
std::vector bar = {1, 2, 3, 4};
swp(bar);
std::cout

Constructors make data. Pattern matching makes codata. Computation is cut reduction.

fuck I messed up the formatting
the last line should be outside the code tag
>if the value of bar after swap() is {2, 3, 4, 5, 6}, then is the initial value of bar got discarded?

define cut reduction

I find it amusing that people decry Turing-incomplete languages as useless when C is Turing-incomplete unless you use file I/O and has definitely proved its usefulness.

Wasn't meant as a reply to , but have two free (You)s anyway

C gets a pass for everything, what else is new.

That moment when you realized the most "Turing-complete" language is brainfuck, since brainfuck's specification explicitly state that the memory tape should be infinite lenght

There should be.

So how come /wdg/ and other generals have their own irc, but we don't?

>I find it amusing that people decry Turing-incomplete languages as useless when C is Turing-incomplete
How is C Turing-incomplete? If has if, it has while, it can read/write memory.

No, I don't need a (You)
I need an answer

size_t is finite

x = recv c; K | send c a; M = K[a/x] | M
case c { inl -> K, inr -> L } | inl c; M = K | M
case c { inl -> K, inr -> L } | inr c; M = L | M

ungrateful desu

>The brainfuck language uses a simple machine model consisting of the program and instruction pointer, as well as an array of at least 30,000 byte cells initialized to zero

>size_t is finite
At that point, you might as well argue that computers aren't Turing-complete because they have finite memory. The distinction between "Turing-complete" and "technically not Turing-complete because size_t is finite" is a meaningless one.

You have 34 days to learn Kotlin. After that, it's the rope with y'all.

>computers aren't Turing-complete because they have finite memory
This is true. I expect /dpt/ never to slag off a language for not being Turing-complete again, because real computers aren't Turing-complete.

Kotlin is garbage for people who can't learn Scala, with a huge amount of paid or unpaid shills.

They are somehow even more cancerous than us. /wdg/ even has a Discord.

Languages may or may not be Turing complete. An implementation for a Turing complete language may or may not be Turing complete.

Kotlin is neo-Scala spec ops edition.

Scala is trash.

>neo-Scala spec ops edition
Did that sound cool in your head?

>computers aren't Turing-complete
They're BSMs, but that's beyond the point. The point, which was discussed a few threads ago, is that the standard, being made by reasonable beings, makes some involuntary assumptions (mainly required for sane systems programming) that imply that memory size is finite, though as big as needed.
In other words, C is Chomsky-1.

Java or Python may be more appropriate for you.

>I expect /dpt/ never to slag off a language for not being Turing-complete again, because real computers aren't Turing-complete.
If you want to be a pointlessly pedantic. You know people implicitly ignore these trivial limitations when they say X is Turing complete and Y isn't.

t. blubber

Nope. I don't think Scala is the most powerful or best language, only that it is better than Kotlin.

>The point, which was discussed a few threads ago, is that the standard, being made by reasonable beings, makes some involuntary assumptions (mainly required for sane systems programming) that imply that memory size is finite
I don't see how this is a "point". It's just pointless pedantry.

I said nothing about Kotlin.

Is the universe turing complete?

Nobody uses Scala.

It in relation to Scala was clearly the subject of conversation.

technically, no.

Well, of course. Nobody cares in real life. The context was that functional languages don't pose such restrictions, and the pros/cons of that.

Does it allow for infinitely many states?

A blatant lie. Please leave, shill.

I'm a big, dumb, Sup Forumsfaggot. Haha, I said the nigger word! xD

Regardless, Scala is trash.

...

You can't (really) use it on Android. And the big hurrah it had has died off. Honestly, Kotlin is going to replace Scala and Groovy. You're going to be seeing Scala only used to support legacy code soon.

what's a good Haskell IDE?

>Does it allow for infinitely many states?
Yes, but it doesn't allow for anything to observe infinitely many states.

vim

Scala is pretty neat. It definitely handles functional programming better than Kotlin.

*that isn't vim

VS Code

*that is for linux

Then allow me to clarify for the context-unaware among us. If you think Scala is trash compared to Kotlin, then Java or Python may be more appropriate for you.

>You can't (really) use it on Android.
Note the weasel word. Scala on Android is perfectly possible. Scala in the browser too.
>And the big hurrah it had has died off.
That's because it's moving into mature language territory. There isn't a big hurrah about it now for the same reason there isn't a big hurrah about C# now.
>Honestly, Kotlin is going to replace Scala and Groovy.
Nice claim, but I see no evidence attached to it.
>You're going to be seeing Scala only used to support legacy code soon.
Another nice claim.

Scala has an active ecosystem, with version 3 in development, conference talks happening regularly, and many libraries being worked on. Only this month the proposed implementation of IO for Scalaz 8 was published which is set to be a game-changer for pure functional programming in Scala.

retard

I am writing a small multithreaded C program that generates buddha brot images.
I love fractals

Do you get paid to shill? Be honest please.
I have no problem with paid interns posting stupid shit on the internet, a man's gotta eat after all.
If you don't get paid though, that's a clear sign of a mental illness of sorts.

pmod ← {(1↓⊢≠≢↑(⍺⍺∧1∘↑))⍣((≢⍺⍺)>⊢∘≢)⍵}

Polynomial remainder in the Galois field GF(2^n). On the left goes the characteristic polynomial, on the right the input.

SBT does not play nice with gradle and other plugins, and you know it.

for(int x = 1; x

>Do you get paid to shill? Be honest please.
I genuinely like the language. Its integration into existing Java code is very useful, syntax makes it very accessible, and its acceptance into the Android ecosystem (via Google's support) solidifies its position. Kotlin is the first time I've ever felt like I got shit done on the JVM and Android environments.

VS Code != VS
code.visualstudio.com/docs/setup/linux

what do you use for android development?

Android Studio.

>I genuinely like the language. Its integration into existing Java code is very useful, syntax makes it very accessible, and its acceptance into the Android ecosystem (via Google's support) solidifies its position. Kotlin is the first time I've ever felt like I got shit done on the JVM and Android environments.
Nice spiel, almost looks authentic.

I literally couldn't touch Android before because Java is gross. Then Kotlin started getting traction and I found myself actually appreciating developing on it.

It's the "Better Java" effect. Similarly, C# feels good because it's a better Java.

>because Java is gross
why?

Yeah C# is nice.

Boiler plate, getters and setters, no null safety.

>Boiler plate, getters and setters, no null safety.
Quite sad that this is the limit of mainstream imagination.

Honestly, when every class starts with boilerplate bullshit and when every third line is this ugly getter and setter, it gets tiring. It just kills productivity. The null safety was, more or less, just to make that list more than 2 members.

What's a good site to find jobs that isn't full of California and webshit?

Daily snapshot of the absolute state of /dpt/:
>doubles are a subset of ints
>arrays are pointers
>int const* points to a const int
>i'm not talking about "a static type system". i literally never said that. i'm talking about static typing
>bits do exist on the physical level
>numbers exist on the physical level
>GHC is written in C++

move to where the jobs are, dumbfuck flyover

...

nice assumptions user

Swap (or move constructors more generally) would not generate undefined behavior.

move'ing from a value leaves it in a valid but unspecified state.

One way to think about this is that at the start of swp foo is a pointer to a heap allocated array {2, 3, 4, 5, 6} and in is a pointer to a heap allocated {1, 2, 3, 4}. The pointers swap: foo points to {1, 2, 3, 4} and in points to {2, 3, 4, 5, 6}.
foo destructs, so {1, 2, 3, 4} is freed.
At printing, 2 will get printed out. I don't see any subtleties about scoping here.

Hey guys, I need a bit of help. I am wondering what is a good book for someone who has no basic knowledge of programming? Is The C Programming Language a good place to start or should I start with another book?