Login
You're viewing the code4lib.social public feed.

Replies

  • Jul 28, 2025, 1:37 PM

    @edsu interested to hear where your Rust journey goes! It has some nice properties but it didn't sit well with me syntactically to warrant switching from Go + Python yet.

    💬 1🔄 0⭐ 0
  • Jul 29, 2025, 5:23 AM

    @edsu I’m surprised the interview didn’t mention Haskell. My rust journey has been very much eased by having used Haskell in a previous life: the (strict, polymorphic) type system and standard library have many features that I recognise from those days, even though the terminology used is quite different.

    💬 1🔄 0⭐ 0
  • Jul 29, 2025, 8:26 AM

    @gklyne yes, that's a good point. Just out of curiosity, what kinds of projects are you using rust for these days?

    💬 1🔄 0⭐ 0
  • Jul 29, 2025, 7:09 PM

    @edsu I’m doing some prototype work for a nascent startup in the area of cultural memory. Technically, it’s s fairly vanilla web service, backed by JSON-LD data, which I’ve been pursuing as my tutorial system for using #rust.

    The original choice of rust was a bit arbitrary (curiosity), but I’m now thinking that the possibility to create a very lightweight (low processor and memory requirements) web service could enable relatively cheap hosting of multiple instances.

    💬 1🔄 0⭐ 0
  • Jul 29, 2025, 7:11 PM

    @gklyne neato, thanks for sharing. are you storing the json-ld data in any kind of data store? I've recently been working a bit with ad-hoc json-ld being submitted to an API and have found the framing support in Python's pyld.jsonld to be pretty valuable. Have you needed to do anything like that from Rust?

    💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • Jul 30, 2025, 8:13 AM

    @gklyne @edsu thanks for sharing that @edsu - when it got to the discussion of anti-patterns I discovered a lot of places I could improve my code 😂

    💬 1🔄 0⭐ 0
  • Jul 30, 2025, 8:23 AM

    @edsu @paulwalk Ah, yes: he mentions (excessive) use of .unwrap() as one. I’ve found that using ‘?’ operator, which can be easy to overlook, helps keep the code concise without losing control of the possible errors. Also there are some interesting fluent operations (e.g. .and_then(…), IIRC) that allow handling of wrapped values (more ideas from the functional programming universe).

    💬 2🔄 0⭐ 0
  • Jul 30, 2025, 8:28 AM

    @gklyne @edsu yes - I have plenty of code snippets from online examples that I have copy pasted that use unwrap a lot. Revisiting these now. Also - I really haven’t mastered pointers (one of the things I like in Golang) so have been using clone() a lot, but reluctantly…

    💬 0🔄 0⭐ 0
  • Jul 30, 2025, 9:03 AM

    @gklyne @edsu Yes - once I understood the use of the error trait properly and started to use "?" to propagate errors I felt more comfortable. But like the podcast guy said, it's easy to reach for unwrap in trivial cases, and that can become a little too habitual I guess. So, I'm now "unwrapping" some of my "unwraps" :-)

    💬 1🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • Jul 29, 2025, 6:46 AM

    @edsu thanks - very timely for me - I’m in the process of trying Rust as an alternative to Go - quite enjoying it so far…

    💬 0🔄 0⭐ 0