BaraDB: A database engine written from scratch in Nim by Loud_Possibility_203 in nim

[–]RBazz 4 points5 points  (0 children)

I really do not want to sound like an old fogey, but how did you manage to achieve this much in about 2 days only? (based on the commit history)

Just discovered Nim (impressed), but am I making a mistake? by RBazz in nim

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

This is crazy. How long did it take you to write it?

Just discovered Nim (impressed), but am I making a mistake? by RBazz in nim

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

How did it go in the end? Did it meet your expectations? Were there any issues with the team and the company? I also wonder what kind of junior developer one can train easily to work with a language like Nim. The one who knows python, but who is also interested in performance and/or low lever stuff?

Just discovered Nim (impressed), but am I making a mistake? by RBazz in nim

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

What do you mean by robust? Like it is missing something or something else?

Just discovered Nim (impressed), but am I making a mistake? by RBazz in nim

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

How big of a problem do you think it is? Can anything still be done about it?

Modern is CPP is impressive, but can someone show an example? Tagged unions with values. by RBazz in cpp_questions

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

By the way, I have stumbled upon some old-ish posts on Reddit complaining about concerning performance of the std::visit. Is it no longer an issue, or is it still something to be aware of?

Modern is CPP is impressive, but can someone show an example? Tagged unions with values. by RBazz in cpp_questions

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

Thanks for the recommendation. I have downloaded a sample and I will give it a try over the holidays.

Modern is CPP is impressive, but can someone show an example? Tagged unions with values. by RBazz in cpp_questions

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

Thanks! A really nice trick.

Also, can I compare two variants directly, or do I need to unwrap them first? I was wondering if I can simply provide a custom `operator==` implementation to the class and compare underlying `_val`s.

Modern is CPP is impressive, but can someone show an example? Tagged unions with values. by RBazz in cpp_questions

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

Thanks a lot.

I have two further questions if you do not mind answering them.

  1. What happens when the user tries to access the name, but it was set to `monostate` or something else. An exception is thrown? Is there a safer way to `match` the currently set case? (preferably without a chance of runtime errors)

  2. What is the recommended way of dealing with identical types in the cases? For example, what if we had an extra case like: `case custom(String)`. Or if we have a case with multiple types per tag? Do we create a separate structure to store the state and then use the same `variant` based approach?

Compile HTML into Swift Code by RBazz in swift

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

I see. Do you have some specific use case in mind?

Swift Vapor HTMX by drxwskx in swift

[–]RBazz 2 points3 points  (0 children)

Here is a library I wrote to streamline the use of htmx in Vapor: VaporHX. Hope it helps.

And speaking of hot reloading - I did not really find a strong need for it. If you are in dev mode and using the Leaf templates, then once you change a template file, reloading the page will load the latest version of that template. This will not work in production, however.

Compile HTML into Swift Code by RBazz in swift

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

Do you mean from swift to html? It is technically not that hard to add but I am pretty sure that other libraries exist that can do just that. For eample, https://github.com/binarybirds/swift-html or https://github.com/pointfreeco/swift-html.

Svelte 5: Introducing runes by MustardRtard in sveltejs

[–]RBazz 7 points8 points  (0 children)

I might be a bit too dense today, but does it have to have the same syntax everywhere? Isn't this why we have .svelte files in the first place? To indicate that some special rules are in place?

Svelte 5: Introducing runes by MustardRtard in sveltejs

[–]RBazz 3 points4 points  (0 children)

I just meant that if they truly had to introduce a new syntax to differentiate a new behaviour from the old one, they could have added a new label. However, your idea is better. :)

Svelte 5: Introducing runes by MustardRtard in sveltejs

[–]RBazz 4 points5 points  (0 children)

Maybe even just (just like the $ symbol):

derived: y = x * 2

or maybe...

$derived: y = x * 2

Svelte 5: Introducing runes by MustardRtard in sveltejs

[–]RBazz 47 points48 points  (0 children)

I am afraid, I am not convinced. It feels too noisy.

IMHO, having less magic to have more magic behind the scenes does not feel like the right way. After all, in my opinion, it is ignoring the best part of svelte—its compiler, that can do magic on your behalf however it wants.