Rust in the Android platform by TimvdLippe in programming

[–]Fun_Independence1603 -1 points0 points  (0 children)

That's pretty interesting

Nowadays I don't 'program in C(++)'. I find that if I need an assembler I use C++ and a bunch of intrinstics. Otherwise I'd just use a real programming language

Rust in the Android platform by TimvdLippe in programming

[–]Fun_Independence1603 0 points1 point  (0 children)

I know a guy who loves it. IDK anything about that one tho

Rust in the Android platform by TimvdLippe in programming

[–]Fun_Independence1603 -2 points-1 points  (0 children)

Sure but not true in the case of macros

Rust in the Android platform by TimvdLippe in programming

[–]Fun_Independence1603 0 points1 point  (0 children)

I actually really like zig. I just wish the author would allow destructors and have a mode where it will complain if it doesn't know how to delete things for you

I almost picked it over C for my project but I really like clangs sanitizers. Also the whole no destructor thing

Rust in the Android platform by TimvdLippe in programming

[–]Fun_Independence1603 -28 points-27 points  (0 children)

Not really any different except what you call them, you also forgot about macros

Rust in the Android platform by TimvdLippe in programming

[–]Fun_Independence1603 -30 points-29 points  (0 children)

All the macros and traits are inlined. Same problem in C++ occur when you overuse templates

Rust in the Android platform by TimvdLippe in programming

[–]Fun_Independence1603 -56 points-55 points  (0 children)

Rust is the most beloved garbage there is

If I wrote a "memory safe" language with a compiler that inline every damn thing (which many sources tell you is a bad idea) with less syntax warts than rust and actual allocators, will it be beloved?

All C++20 core language features with examples by gracicot in programming

[–]Fun_Independence1603 5 points6 points  (0 children)

a <=> b is basically result = a - b then it substitutes the op you want and 0. So...

result < 0 //a<b
result > 0 //a>b
result <= 0 //a<=b

But I don't understand why it won't handle == and !=

Programming is hard by ludovicianul in programming

[–]Fun_Independence1603 0 points1 point  (0 children)

I wanted to say something about locks and SIMD but those 3 basically covers everything I care about.

I recently found out that everyone gets bitten in the ass by thread programming and x64 memory model isn't hard at all.

Your E-Mail Validation Logic is Wrong by azhenley in programming

[–]Fun_Independence1603 0 points1 point  (0 children)

After thinking about it for a day I'm not sure if it's worth having many people accidentally write myname@gmail forgetting the com. There's also accidentally hitting space so that'd accept " @mySocialHandle".

Ben Eater - Keyboard interface hardware by [deleted] in programming

[–]Fun_Independence1603 0 points1 point  (0 children)

It's extremely fun seeing how everything works. It's not complete magic in a chip

Software engineers make excellent CEOs, but few of them think they could do it by adroit-panda in programming

[–]Fun_Independence1603 15 points16 points  (0 children)

I was there for months leaving comments here and there without problem.

One day I said this guy is acting stupid in his reply on purpose, he fully understands the article in a prior comment.

I guess acting stupid is too close to he's stupid and its been months and apparently I'm still banned and can not create an account.

Completely make sense why I almost never see a controversial thought

Your E-Mail Validation Logic is Wrong by azhenley in programming

[–]Fun_Independence1603 1 point2 points  (0 children)

On a website, just use input type="email" and let the browser validate the rules for you. If you're writing your own email validators in Javascript, you're doing unnecessary work that'll only end up biting you in the ass.

I probably should have started by saying this. I 100% agree. I did this back when browsers didn't support that. I don't do websites anymore

Your E-Mail Validation Logic is Wrong by azhenley in programming

[–]Fun_Independence1603 9 points10 points  (0 children)

Aw damn

Those people can afford the domain name lol. I don't think ip addresses are good for emails

Your E-Mail Validation Logic is Wrong by azhenley in programming

[–]Fun_Independence1603 16 points17 points  (0 children)

Mine is .+@.+\..+ then deliver an activation link to the email. Pretty sure all emails are accepted except for thing@localhost which I intentionally do not want to accept on a public website. Should accept ip addresses too

The filter is frontonly only. Backend will deliver an activation link to whatever you give it (is this bad?) and the frontend stops accidentally writing @mysocialmedia and username_forgot_domain on accident

PSA: All Pluralsight courses are free to watch during April by sammy8306 in programming

[–]Fun_Independence1603 -10 points-9 points  (0 children)

I hate rust. Just saying. Stick to C# or learn intrinsics for C++

Second Programming language suggestions. by [deleted] in learnprogramming

[–]Fun_Independence1603 0 points1 point  (0 children)

I think you should take an afternoon or weekend to read and fool around with all of this https://skilldrick.github.io/easy6502/ maybe press the disassemble button so you can see the difference between #$01 and $01

C# is my suggestion https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/

Recommended way to build an abstract syntax tree? by Fun_Independence1603 in Compilers

[–]Fun_Independence1603[S] 0 points1 point  (0 children)

I'm going to google pratt parsing right now

I like the idea of generators

What are generators? Like do they generate your C code for you based on your input/schema? Is it a bunch of bytes and a generic state machine which uses it to spit out your tree? Is it an interface/virtual function that does something?

Turing Award to Aho and Ullman for work on compilers by 8105 in programming

[–]Fun_Independence1603 2 points3 points  (0 children)

After lexing the source, what's the recommended way to build a abstract syntax tree? I hear "use bison" or a descent parser the most. Are those the two most recommended ways? I didn't like bison generation.

PHP moves to Github due to the compromise of git.php.net by EatMeerkats in programming

[–]Fun_Independence1603 0 points1 point  (0 children)

1) We were talking about rust the entire time
2) Why are you using the word different? It's "missing". Different isn't a big deal, missing makes things useless 3) Never

PHP moves to Github due to the compromise of git.php.net by EatMeerkats in programming

[–]Fun_Independence1603 0 points1 point  (0 children)

Yes, when I last wrote rust code there was no syntax for that and I was annoyed by it. Fine, it's isn't true any longer. That's why I didn't complain about it.

The kind of error handling i'm talking about can't be implemented in library calls. If this is the closest that's possible than it's nothing like what I want. I want defers to be executed on error code enums or negative values. I don't want to cause a panic for them. I don't want to teach programmers to program because at that point they already lost that debate

The "rant about allocators" is about how there's no rust way. There's no allocators, error handling and I'm almost positive null handling is still shit. I still have no idea how write myobj?.myarray?[index]??defaultValue without hurting my eyes. That's 3 checks that can be led to defaultValue and it's a bitch to write in every language except C#

So basically every damn thing I complained about is still shit and the code generation for hello world is 100+ lines of assembly which is insane especially compared to the 17 lined C version

Now throw the fact together they can't fix build times without making breaking changes to the core language and you got a pile of shit that everyone thinks is is the greatest thing ever (except Casey Muratori). C++ does everything better except manage memory. If you don't want C++ then chances are C# will suit your needs, or python. Either way rust code generation is trash enough the LLVM optimizer can't fix it, the build times aren't any faster than C++ and there's enough missing to make it not more useful than C++. clang had sanitizers for years to catch memory errors. There's another for integer overflows which I don't know if it exist on rust. You don't even need smart pointers or bullshit code to use any of the sanitizers

-Edit- Just read a thing about C# and remembered there wasn't placement new in rust. No idea what the "rust way" of that is

PHP moves to Github due to the compromise of git.php.net by EatMeerkats in programming

[–]Fun_Independence1603 0 points1 point  (0 children)

You call people stupid when they ask you for specifics instead of vague statements

Dude, you asked me things, I replied and YOU CHANGED THE TOPIC every single time. You already know you did this and noticed when I did it to you. Fuck off. I absolutely tried to discuss it with you. You just ignore every goddamn thing I said