Moon,
@Moon@shitposter.club avatar

I am not down on AI as a concept but I hate the AI SEO pretty bad. It reminds me of before I quit television. Ads extract just enough attention that it's hard to look away, but then it says nothing of value. Like eating a giant wad of cotton candy or something maybe?

Found an article "explaining" the tradeoffs of using Solidity vs. Rust for writing your blockchain smart contracts. Must have been written by AI because it can't clearly articulate that you can't write contracts in Rust on any except for a few platforms, so they are not a real "choice" you can make, it just talks about Rust type safety lol. okay, but I still can't use it.

Ukko,
@Ukko@akko.disqordia.space avatar

@Moon has nobody written a rust/llvm backend to solidity yet? :bunthink: tho I guess the answer might be "too bloated / requires too much gas"

Moon,
@Moon@shitposter.club avatar

@Ukko the article messes this up. evm is stack based and rust is heap based. you could implement solidity on top of a system that uses Rust but not vice versa.

Ukko,
@Ukko@akko.disqordia.space avatar

@Moon I can think of workarounds but those would definitely make gas go up (eg, allocating a block of memory to be used as heap)

Moon,
@Moon@shitposter.club avatar

@Ukko ethereum virtual machine is really primitive. there are some newer virtual machines that work using webassembly and you can compile rust to them and they are much more efficient than the EVM.

subtype,
@subtype@insufferable.tools avatar

@Ukko @Moon going with only core+alloc (not std, which needs an OS and a heap), then writing one's own allocators and using them for standard collections (like Vec etc) could work, but yeah, no idea how bad would it be for the gas costs.

Ukko,
@Ukko@akko.disqordia.space avatar

@subtype @Moon Would you even get any benefits from rust in EVM :thinking_cirno: familiarity with language is far outweighed by the performance hit here

subtype,
@subtype@insufferable.tools avatar

@Ukko @Moon no idea, the only time I've seen rust "ported" to a vm was gleam (rust on the erlang vm), and the language ended up only superficially similar, with no traits etc (which imo makes it worse than useless, statically typed lanugages with no generics suck)

Moon,
@Moon@shitposter.club avatar

@Ukko @subtype I can't imagine there is any benefit because it's not going to magically make more efficient code than the solidity compiler, the constraint is the EVM itself.

Moon,
@Moon@shitposter.club avatar

@Ukko @subtype On the other hand Arbitrum has a wasm vm as an experiment and it appears that writing contracts for it use a lot less gas. it's just a better vm at the end of the day I guess.

Ukko,
@Ukko@akko.disqordia.space avatar

@Moon @subtype Yea I'd say then you have to compare solidity compiled to wasm vs something-else to wasm. Maybe they have just valued wasm instructions less than corresponding EVM ones

Moon,
@Moon@shitposter.club avatar

@Ukko @subtype I think they did this because it does still have soldity support but I am not sure. I don't actually understand how it works because the EVM has necessary types that are non-native to webassembly

Moon,
@Moon@shitposter.club avatar

@Ukko @subtype I am actually baffled at how expensive smart contracts are to execute considering how very very little they "do". storage is different, of course

0,
@0@lab.nyanide.com avatar

@Moon @Ukko wonder if that's what happened to $whacked, and additionally if that could be re-ignited with some clever address funding.

Ukko,
@Ukko@akko.disqordia.space avatar

@Moon @subtype I'd guess it's some default imports / stdenv available by default to everything, haven't looked at the code but it's how I'd do it.

Moon,
@Moon@shitposter.club avatar

@Ukko @subtype there are 64, 128 and 256-bit unsigned ints basically

Ukko,
@Ukko@akko.disqordia.space avatar

@Moon @subtype alright then I'll say they have extended wasm with extra stuff or it's a boxed objet

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • Hentai
  • doujinshi
  • announcements
  • general
  • All magazines