Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Arcsech
Aug 5, 2008

Vanadium posted:

I'm not sure about the Sync/Send thing, I always get confused there.

On this note, if anyone has a link to a good explanation of Send & Sync besides the official docs, could you post it?

Like I get it in theory (Send means it's safe to transfer between threads, Sync means it's safe to access from multiple threads), but I haven't yet quite wrapped my head around it in practice. Like, I see the Arc<Mutex<ActualThing>> pattern a fair bit, but I'd like somewhere that does a deeper dive on an/a few examples.

My interpretation of that is that Mutex makes it Sync, and Arc makes it Send, but I'm still not confident I'd know how to use it myself (especially Arc). And I'm coming up on a point in the project I'm working on where that would be super helpful.

Adbot
ADBOT LOVES YOU

Arcsech
Aug 5, 2008
1.12 is out, and I am irrationally excited about the new compiler errors that are actually understandable:



Thanks Elm, for kicking all the other language maintainers in the butt about this.

Arcsech
Aug 5, 2008

TheCog posted:

I keep meaning to poke at rust but I don't have a good idea of what kinds of projects its well suited to. I've mostly only done webapps and web design like things, (ok and some automation scripts), are there any cool ideas for projects to build? I followed the tutorial in the docs a while back and built the guess checker, but that didn't really give me a good idea of what kinds of cool projects rust enables. Are there any really recommended tutorials or even just suggestions for things to build that people could recommend?

I built a packet parser (sort of tcpdump-ultralite with some extra mashing for couple particular types of packets) and I thought it worked fantastically well for that. It would also be good for the Matasano crypto challenges.

Arcsech
Aug 5, 2008

Beamed posted:

So am I missing something with the IntelliJ plugin? Tried it out again after everyone raved about it, but it still forces me to run cargo manually to see if I have any compiler errors. Do I accidentally have a setting that removes IntelliJ's underlining compiler/syntax errors or something?

VS Code is still pretty cool but I miss the heavy IDE stuff sometimes.

I only get some, but not all, errors showing up inside of IntelliJ. Like it’ll usually catch typos and most type mismatches, but I don’t think it’s ever caught borrow checker issues without invoking the compiler.

Arcsech
Aug 5, 2008

Dominoes posted:

Should I use a declarative macro, or a procedural one? Are they effectively equivalent, but with the former using regex-like syntax, and the latter using something more akin to a normal function? It seems like I could accomplish this in either.

I don't know much about macros, but I just saw earlier today that someone beat you to this, you might be able to take a look at what they do: https://github.com/bodil/typed-html

It looks like they're using procedural macros? I think? I haven't really touched macros at all, I really should.

Arcsech
Aug 5, 2008

Malcolm XML posted:

Not really. The rust type system is not that powerful modulo the borrow checker. Maybe with actual dependent types (cost generics and generalizations thereof) you could express more useful logic in types.

It is a hell of a lot better than a lot of more mainstream languages though.

And you don’t need a PhD in math to make sense of it, unlike Haskell

Adbot
ADBOT LOVES YOU

Arcsech
Aug 5, 2008

gonadic io posted:

how into trans shitposting are you

It’s possible to find interesting tech people to follow on Twitter that doesn’t include trans shitposting?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply