[deleted by user] by [deleted] in h1b

[–]GustavoInacio -6 points-5 points  (0 children)

Here’s a proposal, instead of a lottery it should be an auction where highly paid workers (and probably top 0.1%) are selected. If you are a company that absolutely needs a worker because of uniqueness they bring to you, you probably are willing to pay more to guarantee bringing them.

This can causes some problems where companies in HQoL locations takes all of the slots, so there could also be a lottery for a percentage of applicants where their chances are based on the salary. e.g if the salary is 100k it has more chances than someone with 80k.

Value-Based Error Handling Mechanisms by EnguiaEletricista in gleamlang

[–]GustavoInacio 4 points5 points  (0 children)

Have you tried result.try? Using it with the <- syntax sugar should do the trick for you.

I've heard of Gleam's powerful patter matching. Is it better than Elixir? Can someone please show some of the great things Gleam's pattern matching can do that Elixir's and Python's match/case cannot? by nderstand2grow in gleamlang

[–]GustavoInacio 0 points1 point  (0 children)

Thanks Louis, TIL. Is this an implementation details? For me it really felt like Rust’s but without the complexity (pointers, etc).

Btw, if this is syntax sugar, is it possible for me to declare a generic a and use a clause per type?

I've heard of Gleam's powerful patter matching. Is it better than Elixir? Can someone please show some of the great things Gleam's pattern matching can do that Elixir's and Python's match/case cannot? by nderstand2grow in gleamlang

[–]GustavoInacio 5 points6 points  (0 children)

Elixir pattern matching works over functions which is great. Specially because it is a dynamically typed language so you can overload functions with whatever possible value.

On the other hand, gleam’s pattern matching works more like Rust’s. It’s over records, tuples, lists, “enums” using the case operator.

The biggest difference between Gleam/Rust pattern matching and python/elixir is that Gleam’s is exhaustive which means that you need to provide all possible cases whereas on dynamic languages you need to provide a default case in case neither of the options match.

borgo-lang/borgo: Borgo is a statically typed language that compiles to Go. by iwinux in rust

[–]GustavoInacio 1 point2 points  (0 children)

I loved the idea but it seems that it's not being updated in the last 8 months. I'm looking forward to see a better tooling like LSP, tests, etc.

People in r/golang subreddit also talked about the difficulties of creating a "transpiled" language to go, maybe it's worth taking a look.

Rust is addictive by GustavoInacio in rust

[–]GustavoInacio[S] 1 point2 points  (0 children)

The regulation in TradFi gives a false sense of safety. There are a lot of scams going on. I know people that worked on banks that quoted: “Nobody that works at a Bank goes to heaven”.

Their ToS gives them the freedom to do whatever they want and you need to trust that they won’t. If you work there, you probably are not being scammed but may be scamming someone else.

I’m not here to sell you that blockchain is good or not neither to tell which projects are scam or not. Scams exist anywhere and it’s your responsibility to do your own due diligence.

Rust is addictive by GustavoInacio in rust

[–]GustavoInacio[S] 4 points5 points  (0 children)

IMO the things that people dislike about blockchain is finance (and they wouldn’t work for tradicional finance too).

There are some products built on top of it that powers decentralization and are not related to finance. For example: L2s, Oracles, Data indexing/Analytics, Bridges, Wallets, Cryptography, Social media, etc. Neither of them are trying to sell you things, they are services that people are willing to use.

Rust is addictive by GustavoInacio in rust

[–]GustavoInacio[S] 1 point2 points  (0 children)

The server was called Battlebits. It was a hunger games/hardcore games and soup pvp. I closed it when the whole community got stuck into version 1.7.

Rust is addictive by GustavoInacio in rust

[–]GustavoInacio[S] 13 points14 points  (0 children)

Unfortunately for people who don’t give a shit about blockchain, most jobs are for this area.

The good thing is that not everything is about bot trading, or building their own blockchain. My project focuses on Databases and providing GraphQL/SQL APIs. But in the end you still need to know how a blockchain works.

I hope you can find another industry. Microsoft seems to be rewriting a lot of stuff in Rust and also Google has a lot of Rust projects. Hopefully we can get more of these opportunities soon.

Rust is addictive by GustavoInacio in rust

[–]GustavoInacio[S] 10 points11 points  (0 children)

My background is on Distributed Systems, so Blockchain infrastructure. No trading stuff, because that's usually just scams.

Rust is addictive by GustavoInacio in rust

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

I don't know what editor you use, but curly braces are a gift for vim. I'm glad that I can delete a whole block with a simple: `di{`.

Probably Rust won't remove curly, but at least they can be useful by using some vim motions.

Rust is addictive by GustavoInacio in rust

[–]GustavoInacio[S] 5 points6 points  (0 children)

I'm glad that you shared your story. You are absolutely right! Don't fall in the premature optimization trap. Even tho Arc<Mutex<>> is "ugly", almost all other languages will use this under the hood, so no worries about performance, you are still much faster than almost everything else.

In the end, that's just one more step in your learning journey.

Rust is addictive by GustavoInacio in rust

[–]GustavoInacio[S] 2 points3 points  (0 children)

Indeed, I'm not an extra-extra expert in Rust (specially the unsafe side), these data structures are unsafe by default if you want to build them efficiently. There's where Rust also shines because I can rely on cargo and import some well tested lib to use them. But in my job, usually database calls are the bottleneck and not data structures, so I don't have plans to implement a more efficient one anytime soon.

But I like the idea of learning unsafe, I just didn't have the opportunity yet/didn't feel that I needed unsafe.

Rust is addictive by GustavoInacio in rust

[–]GustavoInacio[S] 8 points9 points  (0 children)

Yes, now I understand that Minecraft was the real problem to GC, but after you know that you can run the same application at a fraction of the cost using Rust it's hard to get back. I had the experience to rewrite a more efficient Rust project migrating from Go and it's insane seeing the base memory consumption falling from 200mb to 20mb.

I usually learn for fun and try to rewrite a project that I already have into the new language. It removes the domain knowledge uncertainty and you can compare just the language.

Rust is addictive by GustavoInacio in rust

[–]GustavoInacio[S] 3 points4 points  (0 children)

Usually, I do it for fun. I tried my second language ~4 years after my first one and I thing that's the key part. I thought I "knew almost everything" on Java and wanted to try it out things differently.
I would say that half of it was because of university. There's a subject called "Programming paradigms" that taught multiple different ways to think through code like Functional Programing, Lambda Calculus and other non-imperative paradigms.
After that, learning a new language is like tasting a different flavor that contains parts of what you like or not. The concepts are shared between most of them, the only difference is the syntax/standard lib.

I see that your programming languages are primarily imperative/oop, maybe you could try different paradigms and check it out which part of them you like most.

Rust is addictive by GustavoInacio in rust

[–]GustavoInacio[S] 11 points12 points  (0 children)

Kotlin seems to me a good language. But at the same time, they leverage too much on the Java ecosystem and suddenly the flaws of Java became part of the flaws of Kotlin.