/dpt/ - Daily Programming Thread

Old thread: What are you working on, Jow Forums?

Attached: 1568386125639.jpg (1144x1920, 573K)

Other urls found in this thread:

github.com/gtk-rs/gtk/issues/892
esolangs.org/wiki/Category:Non-textual
esolangs.org/wiki/Efghij
bitchute.com/channel/3B3BuIU1Bejn/
twitter.com/NSFWRedditGif

Rewriting the GNU+Linux colonel in Haskell.

ruby is nice

you've been working on this for a long time, user.

f x = x*(x+1)`div`2

Well, there is more than one. ;_;

Reminder that this is real.

Attached: 1568236739441.jpg (1200x900, 263K)

working on my alarms app. Noticed a method is missing in the Gtk-rs binding, reported the issue. Seems like they will be working on it :)
github.com/gtk-rs/gtk/issues/892

>defining integer types in a file called "io.h"
Jesus christ and i thought void.h was a dumb idea.

if i dont wear one of these will no one talk to me?

I'm struggling a lot because I'm not sure of what software is beginner friendly enough for what I'm trying to make.
I was using Ren'Py since I was inspired by Katawa Shoujo at first to make a simple VN, but now the idea has evolved a bit beyond that and I'm trying to make a point and click adventure game. I've not heard of one like that made using Ren'Py, so I'm not sure if I should switch to something else, like Unreal, for example, since I've been told you don't even need to know how to code to use it because of its blueprints system.
Has anyone had an experience like this?
I've programmed simple things in Java and C++ before, and Ren'Py AFAIK is just a modified version of Python, so its not like coding is specially hard for me or anything like that.

Attached: have a comfy picture anon.jpg (2048x1365, 566K)

>having an ugly "type.h" at the top of every file
No

You are disgusting.

>doesn't apply pronoun sticker
>rustie at door bars your way
>"PERSON WHOSE PRONOUN I WILL NOT ASSUME, you forgot your pronoun sticker"
>you say you don't want one
>rustie calls the police
>SWAT team fill your car full of bullets as you're leaving conf in disgust, without admittance

This is the patrician's choice
#include "nigger.c"

I'm gonna macro all the C keywords

Attached: 1566315229974.jpg (1280x720, 99K)

>#including them
very inclusive thinking, user!
I can see that you're trying very hard to be a good ally.

if you're going to be insane please just use a language for insane people, like Forth or Lisp or Smalltalk.

Imagine so buttflustered by the mere existence of a language that you feel the necessity to go to a thread on a forum and repeatedly post over and over again as if you were doing some sort of duty.

Rent free, I say.

Attached: 1566782592157.png (3062x1098, 400K)

Use Ada!

>Forth or Lisp or Smalltalk
You know me well

Attached: kona-ok.png (401x494, 211K)

the problem is that there's no Greek myth for this, so I can't understand it.
Why is innovation - historically, and globally, and now - found alongside degeneracy and crime and disease? The cities were always places humans went to die, vs. rural areas. San Francisco has only more *obviously* become a pit of filth over time; it's been exactly that for ages. The West as a whole is Sodom and Gomorrah compared to the lives led by stone-age tribes that still stick around.
Obviously, this is like saying that you only find golden dildos in the houses of rich people. Only rich people can afford golden dildos, and poor people couldn't even if they wanted them. The relationship is one of parasitism and a strong enough host, rather than golden dildos making people rich.
But if people can't reduce it to Charybdis vs. Hydra then it's still very confusing, so they'll continue to talk about it.

But user those are the most interesting languages.

What does Ada have to do with a desire to macro all the keywords of a language?
Ada doesn't discourage that shit.
Ada is a serious girl.

Unreal is insanely complicated and takes literally forever to boot and do anything with. It's incredible overkill for something like a point and click adventure. I've never understood the appeal of these massive bloated engines that advertise "make an entire game without writing a line of code!" That just means that instead of spending time learning to code, you will spend time learning a retardedly convoluted system that is equally if not more difficult than the equivalent code, while simultaneously being less abstract and flexible. And it will go out of fashion in a year or two and you'll have to learn a new dumbshit tool. The essence of programming is defining something in great detail; the amount of detail needed to define say a video game is not going to change regardless of how you do it, so there can never be a system that's "easier" than programming, the same amount of work still has to be done whether it's through typing or clicking and dragging elements on some gay flowchart UI.

Attached: 1535090705718.jpg (1131x1132, 351K)

Thanks user, that somehow cheered me up a bit. I struggle a lot with keeping concentration with this one project, but I really want to see it through.
Have a great weekend man.

Attached: ty.jpg (1920x1200, 297K)

Unreal is WAY overkill for a point and click adventure game. Unreal is for 3D games with high poly counts and top of the line graphical effects.

If a human held a gun to your head and told you to decide between Go and Kotlin, which one would you pick?

You will like SDL

JavaScript

>which one would you pick?
Death.

You JavaScript project performed really well, Anone! Here, you get a caramel apple!

Attached: d4a45517dccb0bc0be78c7a0637ac324.jpg (1365x2048, 336K)

You still read at the beach, right?

Attached: 76183594_p0_haskell.png (1084x771, 1.01M)

Imagine how fat, smelly, and greasy this guy is

>too dumb to think of my own code
>go on github to try and copy other people's code
>too dumb to understand other people's code

Attached: 1540687798076.jpg (350x524, 68K)

I miss FV

>traveling across the universe
>spending a ton of money
>to go to a beach
>to read
I can read at home dammit

>>SWAT team fill your car full of bullets as you're leaving conf in disgust, without admittance
>I thank the SWAT team for the ammunition and begin loading my magazines
>I then proceed to make the Pulse shooting look like a joke

>JavaScript project performed really well
oxymoron

*performed well relative to zoydev js

Dumb renchon poster.

Attached: renge.png (594x500, 143K)

no

Attached: 1537188113725.jpg (1065x797, 166K)

Attached: ren.jpg (1023x575, 53K)

Do you guys think niggers actually program? If so what language would a nigger use?

Fuck you, you gay doll. Hahahahaha

Visual Basic 6.0

a memory-unsafe language with vague ownership rules, for obvious reasons.
one of these: esolangs.org/wiki/Category:Non-textual

DarkBasic

Ya, I am going to shoot myself in the head now. esolangs.org/wiki/Efghij

>esolangs.org/wiki/Efghij
kek

name a better JS framework ... I'll wait

Attached: images.png (554x554, 8K)

>this is what dynamiclets really believe
ISHYGDDT

Is this serious? How are you using C# for webshit?

Emulating a Turing machine and running c on it

Lisp is the most powerful programming language.

based

Every language can be written as a DSL in Common Lisp. Therefore Common Lisp is the most powerful programming language.

Blazor works kinda OK I guess. Personally I like Vue more regardless.

Is ATS a meme or should I just use Haskell?

Attached: 1024px-The_ATS_Logo.svg.png (1024x1024, 17K)

ATS is more powerful than hasklel and it compiles to C.
Go for it

ATS is a research language that's currently getting its third complete revision. It's really cool though, and learning it and then not using it (or using it with no chance of collaboration and then having to rewrite your code for version 3) is still better than using Haskell.
But stubbing your toe or having someone hammer your funny bone is better than Haskell. Don't be lazy.
If you want a non-research dependent-type language... there isn't one. Probably Ada is the best you can get.

ATS was designed so only the creator could possibly use it. It has some of the worst syntax I've ever seen in a programming language.

Attached: 1561806032716.png (533x526, 352K)

bitchute.com/channel/3B3BuIU1Bejn/ has a bunch of videos with code not written by the creator. The syntax isn't that bad - some parts are *ugly*, but it's not a horrible experience to read.
The author's own code is a horrible experience to read, but that's due to his formatting.

fun
fibats{n:nat}
(n: int (n))
: [r:int] (FIB (n, r) | int r) = let
//
fun
loop
{i:nat | i 0)
then
loop{i+1}
(
pf1, FIB2(pf0, pf1) | n_i-1, r1, r0+r1
) (* then *)
else (pf0 | r0)
// end of [if]
) (* end of [loop] *)
in
loop{0}(FIB0(*void*), FIB1(*void*) | n, 0, 1)
end // end of [fibats]


*small anime girl covering eyes*

>there isn't one.
Ada with C syntax when?

its call Rust and i'm almost positive its type system is just as good as Ada's.

no, you don't even have nominative typing in Rust.
Rust draws from FP languages. Zero inspiration from Ada.

And formatted halfway reasonably:
fun fibats{n:nat}(n: int (n)): [r:int] (FIB (n, r) | int r) =
let
fun loop {i:nat | i 0) then
loop{i+1}(pf1, FIB2(pf0, pf1) | n_i-1, r1, r0+r1)
else
(pf0 | r0)
)
in
loop{0}(FIB0(), FIB1() | n, 0, 1)
end

Having filter and map doesn't make a language functional or "functional-like".

Rust has ML datatypes.

>no, you don't even have nominative typing in Rust
Yes you do dumbass.
struct Foo;
struct Bar;

let x: Foo = Bar; // error

I always dabble with different langs for various reasons but I'd like to pick a language to really let myself get comfortable and proficient in. What's a fun general purpose language to learn and play around with? I like Clojure a lot but it's pretty much purely functional unless you use the java api which defeats the purpose, and while scripting langs like JS and python are easy to use they obviously have their flaws. I hear Rust is the new hotness but I don't know why, same for Haskell.

Attached: 1568269388847.jpg (580x580, 139K)

Congrats, even C will error on that.

>fun general purpose language
you can have fun with anything, and 'general purpose' is either almost meaningless or the name of an empty set. And you go on to object to Clojure being "purely functional" ... what does that have to do with fun or general purpose?
Clojure and Rust are decent as languages. Haskell is lazy and laziness is bad.
I'd give Nim as a solid answer to "fun general purpose language" but if you're using Clojure and not *completely* ignoring the Java bits then Scala might be something more that you could sink C++ levels of time into.

If your language relies on transpiling to C you may as well not exist.

if you take a language that works and gets good results, and then put in tons of effort, and then the result is that basically nothing changed, then you might be a retard who's replaced a 'transpiling' backend with LLVM.

Ah yes the LLVM tard.

That's nominal typing, and yes, C has it, just like Rust.
>If your language relies on transpiling to IR you may as well not exist.

no I wouldn't say that everyone who likes LLVM is a complete retard, so I'd reject "the LLVM tard" as a name for such a person.
More like, "no-economic-sense tard" or "boy I sure do love huge investments and minimal gain tard" or "please hire me so that I can rewrite all your software without improving it tard".

Transpiling to IR is easier. Transpiling to C is a wasted step, you're not going to do any good optimizations and you're only doing it so you can advertise your shitty language as "As fast as C since we transpile to C!!!"

If your language relies on compiling to machine code you may as well not exist.

>Transpiling to IR is easier.
So what?
You have a train with train tracks. Building a car would be easier, but YOU HAVE A TRAIN. Roads are easier to lay than train tracks, but YOU HAVE TRAINTRACKS.
You're talking about languages that have already put in the work to do the harder thing and to get performance from the result despite "not doing any good optimizations".

Why doesn't Nim have a godbolt equivalent?

Why aren't you using Nim yet anons?

Attached: file.png (752x452, 68K)

ATS, Mercury, and Nim are all languages with a lot of transpiled backends.
The only one that's "as fast as C" is ATS, although it easily beats C since it emits C that C compilers have an easier time optimization than C that humans write.
ATS also has literally Perl, PHP, Scheme, JS, and other backends.
Mercury gets good performance but doesn't at all advertise itself as "as fast as C", however the excellent FFI it gets for free from transpiling means that the Python myth of "just write the fast stuff in C" is actually practical.
Mercury also compiles to C#, Java, and literally Erlang.
Nim gets good performance but doesn't advertise itself as "as fast as C". How does it advertise itself? From the webpage:
>Support for various backends: it compiles to C, C++ or JavaScript so that Nim can be used for all backend and frontend needs.
And yep, it compiles to C, C++, and JS.
And yep, it has a really stellar FFI.

Conclusion: if your language emits a high level language for its code generation, then it's relatively easy and natural for you to emit *other* high level languages, and the natural benefits are to your FFI and to stuff like "writing a library once and using it on the frontend and the backend".
If instead you generate something for GCC or LLVM, you get other benefits. This alternate path might be a lot easier, but, uh, the languages above already exist and already work fine and they all get good performance. If it would be completely pointless or even harmful to rip out what they have and replace it with something you don't scorn, then your scorn is stupid. As are you.

there's a guy working on it.

Because nobody cares

ATS is about as useful as a wrench for a screwdriver job

Success and wealth attracts the bottom of the barrel
The culture of degeneracy then infects everything

>you BTFO'd me
>so so I'm going to hope you'll be hurt by this random-ass insult
You would've done better without the metaphor. Programming isn't so developed a field that it can have finely engineered tools that are good for specific tasks. Programming mostly has shit that's just particularly bad at most tasks.

godbolt's wonderful'; everyone should care about working with it. And godboltguy seems pretty accepting of code if you do all the work. The guy working on the Nim godbolt stuff is just taking his time.

What should I use instead of a switch statement since Python doesn't have it?

Ruby :^)

Haha upvoted :^)

I miss ruby poster

Is this bitching justified in Python 3.7?

Attached: Multithreading in Python.png (897x731, 595K)

Common Lisp

Elif or a dictionary of lambdas.

if-elif chains, normally.
If you have a ton of comparisons to make, you can index a dict of values or functions, although this is probably never worthwhile for small values (e.g. numbers, booleans, chars, etc.)

Javeet POOgrammers are so smelly from all their POO that did not go in LOO that when one of them made a time machine in Java and went back to ancient grease (not misspelled) and tried to explain computers and software to Archimedes Archimedes said "Eureka, you-reek'a"