/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Old thread:

Other urls found in this thread:

nuitka.net/
nuitka.net/gitweb/?p=Nuitka.git;a=shortlog
nuitka.net/gitweb/?p=Nuitka.git;a=blob;f=Changelog.rst;hb=HEAD
github.com/majestrate/XD
nuitka.net/pages/download.html
twitter.com/NSFWRedditImage

Threadly reminder that Rust is NOT restrictive. If something is disallowed, that means it causes race conditions and memory corruption. It's IMPOSSIBLE to write a correct program with more than one mutable reference to the same data. Only retarded C++ monkeys think otherwise, and nothing useful has ever been written in C++, unlike Rust.

>Rustkell
Rust is an impure joke that can't come close to Haskell

Friendly reminder that Rust is a fake project made by SJWs to push their SJW agenda.

Threadly reminder ot use #![feature(nll)].

Threadly reminder not to use Rust.

What compiler flags should I pass to gcc to let me compile my python programs? It keeps throwing weird "token" errors that shouldn't happen. I am really hating my career choices right now.

>comparing yourself with ancient, useless languages
Setting the bar low, huh rustlet?

>tfw no Haskell++

A language that combines the best of the imperative and functional paradigms

how to match pattern a function parameter by its parameters in haskell?

muhsort xs comparisonfunc

so say I pass in muhsort [1,2,3] (

I'm not sure who's falseflagging whom anymore.

reposting from previous thread

Piss off, funclet. C++ is borderline useless, but your FP memery is on a league of its own.

you can't pattern match on a function parameter
also (

use lenses :^)

>falseflagging
lol... why do you guys keep saying that only to then make the same claims that the "false flaggers" do?

every time i read this as "nil" until now
i imagined it was a flag to disable language features and transform it into better c or shit like that

>make the same claims
There's actually a subtle difference. I'm not saying it's impossible for a program that would work as intended to fail to compile in Rust. I'm just saying what the programmer intended is irrelevant.

you can do that with
#![feature(break-compiler)]
which stops your rust code from compiling and forces you to use a better language

>needing a compiler flag to stop your rust code from compiling
There's an easier way: just write efficient, correct and intuitive code that does something non-trivial.

>efficient, correct and intuitive code that does something non-trivial
not possible in rust

>not possible in rust
That's the point, user. If you were to do so, it wouldn't compile.

Install the Python front-end and do
gcc-python /path/to/file.py

what if the developer used unsafe blocks?

*coughs*

>too retarded to understand polynomial rings

nuitka.net/

Rust is alright

go to the programming conference tomorrow

What conference?

rustkell? more like rustle

...

>what if the developer used unsafe blocks?
Almost always a bad idea. If you're gonna spam your program with unsafe blocks, fuck off back to C. There's almost never any reason to use unsafe blocks, except for micro-optimizations. "Unsafe" is NOT for circumventing the borrow checker.

I'd like to point out that only 7% of Redox's kernel code is actually `unsafe`,

Sooo I got this LUT which needs to be part of a code that emulates HID keyboard input.

I never worked with LUT's before, and the table is 200ish entries long. Its format is as follows:

const char lookupTable[][2] = {
['a'] = {0, 0x04},
['b'] = {0, 0x05},
['c'] = {0, 0x06},
['d'] = {0, 0x07},
['e'] = {0, 0x08},
['f'] = {0, 0x09},
...

How do I acces items inside it? It's the first time I see syntax like this...

>I'd like to point out that only 7% of Redox's kernel code is actually `unsafe`,
7%. In kernel code. How much unsafe code do you think a properly constructed user-space program needs?

~0%, that's my point.

>rustafarian moving goalposts again

why does icu force me to use utf-16 as intermediate encoding? that's shit
i'd rather use either of the 2 other ones

It still checks array bounds with no way to disable it.
I'm sure this a certain hash function will be within this range, but the language decided for you that it will check. So much for low level control.

Aside from that, I want my SIMD, and compile time computations.

>~0%, that's my point.
Exactly, and the fact that the Redux kernel is full of bugs that cause crashes and security issues, even though it was written by expert Rust programmers in a safe language, clearly shows the flaws in C and C++, and serves as a cautionary tale against using ANY unsafe blocks.

lookupTable['a'][0]
lookupTable['a'][1]

if it's that regular, why not auto-generate it?

You are alright

> dat pic

No.
Nonononono!
NOOOO!!11!

>security issues
>bad
government actors have hardware backdoors in everything anyways

Wooosh.

Is the poor bastard still working on it? Even Guido bullied him about Nuitka. Each optimization is done manually, he's pour tons of time into making some 3rd party library work.

tf is wrong with your background
>utf-16
thank windows for that one
look at the ICU cunts lying through their teeth to defend their shit design choices
> The Unicode standard defines a default encoding based on 16-bit code units

Why have there been so many duplicate threads recently ffs

but what about my whataboutism?
weak shit, rustlet

>0% unsafe code in userspace progs means they're safe
>from the last "do it for free" bug bounty:
>Privilege escalation in su.
>EOF at password prompt returns root shell.
wow, so this is the power of rust

Not true sadly. For example if you use 3rd party libraries and need to manipulate objects which their functions output, you often have to dig deep into the library and find out what kind of type the parameterized type of the function you're calling resolves to given the specific parameters you're putting in just so you can declare your function. That's not something that should be needed, hugely restrictive.
Not to mention patterns like hooks, trees and caching, despite being easy to implement in obviously safe ways, cannot be expressed without unsafe in rust (depending on specifics).

I guess windows must be really the reason behind this. And also behind 16 bit string representations of other languages (Java, C#). The worst of both worlds.What a cancer.

backward compatibility
same reason "electricity" flows in the opposite direction of actual electrons (charge carriers in 99% of use cases)

I had a program that wouldn't compile and asked on irc if anyone had an idea how to make it work without unsafe. Solution? "Just use unsafe :)". That was purely to circumvent the borrow checker.

nuitka.net/gitweb/?p=Nuitka.git;a=shortlog
nuitka.net/gitweb/?p=Nuitka.git;a=blob;f=Changelog.rst;hb=HEAD

please don't

literally read the wiki page multiple times slowly

working on a buttorrent client for i2p

github.com/majestrate/XD

Thanks, doc

>webui
into the trash it goes

>nothing useful has ever been written in C++
>now u don fked up son
i was with you until then

comes with a cli tool too m8

>i2p
>google chrome

Oh shit, i get it now

mah nigga

>security
>gecko
funny joek

Hello Jeff. Post feet, please.

at least install chromium

>Nuitka Release 0.5.24
>2016-11-15
>currant yahr
hmm

are you retarded or something? the last version is 0.5.28 (October 2017), not 0.5.24.

I see what you have done and I will report you to the github police

>nuitka.net/
>Nuitka Release 0.5.24

but ima good boi that dindu nuffin :c
I even have a CoC :>

nuitka.net/pages/download.html
>The current release is Nuitka 0.5.28.2
please don't be this retarded.

OP image.

Monads are not monoids FFS. They are monoid *objects* in the category of endofunctors. I constantly get annoyed by how this quote abuses the word "monoid".

>home page is 14 months out of date
>this is somehow the users' fault
autism

This. Pythons semantics forbid fast executions. Even PyPy is barely more than one of those experimental JITs like Dynamo that aren't worth it in real world applications.

That just shows one more time that mathematicians are totally shit at naming things. Good on OP for triggering them.

>life without types

>life without type errors

What's the difference anyway

It's clear from context that it's a monoid object because the category of endofunctors is a monoidal category.
I've never heard anyone call them monoid _objects_ when talking in a CT context other than when defining them.

TYPESCRIPT
Y
P
E
SCRIPT

BANDAID
ANDAIDB
NDAIDBA
DAIDBAN
AIDBAND
IDBANDA
DBANDAI

>the only alternative to strong static typing is weak dynamic typing
nice false dichotomy, dumb type cultist

SBCL objects are strongly typed (() + {} makes no sense) but not statically typed.

if it m/.*script$/i it's shit

Smell that? That smells like microsoft

He never said that. How dumb do you feel now, retard?

hey everyone. I'm a PHP/JS/Python brainlet here who's trying to get a better grasp on CS fundamentals and good programming style. For this reason I'm trying to look for a new language to learn that hopefully I can use for server side scripting as well.

I'm looking at Go and Rust as potential candidates. Opinions? Thanks.

>ad hominem
already ran out of arguments? I see...

Not dumb enough apparently.

>life without types
Javascript values have types. It's just life with retroactively-standardized retarded implicit conversions. Most dynamically typed languages don't do that.

Avoid Go at all costs == Success.

>Angular uses typescript
Why didn't you warn them it was by Microshit. Now their framework will die when M$ kills it.

Go is a lot more popular than Rust

>Go and Rust
Both terrible choices.

But Avoid rust at all costs == success too.

What's left? D?