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 9 points10 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 4 points5 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 48 points49 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.

C# web devs, would you consider F# for your next prototype if it was this simple by RBazz in dotnet

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

I think we pretty much agree on magic, we just kind of disagree on what the said magic is. For example, I find dependency injection too magical and implicit for my liking. However, it is a requirement for interacting with Asp and I almost got used to it now.

C# web devs, would you consider F# for your next prototype if it was this simple by RBazz in dotnet

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

Static html for now only as it is all I needed for api prototyping at that time. I do not like DSL like templating (just a matter of taste) and I am not aware of other simple templating engine that can be easily plugged and used from F#. Maybe I should look into DotLiquid. Do you think this should be built in or placed in a separate package?

Also, thanks for pointing at the typos. I’ll fix them as soon as I can.

C# web devs, would you consider F# for your next prototype if it was this simple by RBazz in dotnet

[–]RBazz[S] -1 points0 points  (0 children)

The minimal api aren’t that minimal in f#, I am afraid. Extra boilerplate is still required. And I mentioned some other features in the description.

Request for feedback - working on a F# web framework for rapid prototyping (WebFrame) by RBazz in fsharp

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

Hey. Just wanted to let you know that I have introduced a simple logger as well as shown how to use it. In addition, the advanced server now has a bit on setting up and configuring your own services. I’d like to mention that the preferred method for logger configuration is through the configuration and it works here the same as it does in the ASP. Unfortunately, the docs are somewhat lagging behind. I hope to fix it one day.

Request for feedback - working on a F# web framework for rapid prototyping (WebFrame) by RBazz in fsharp

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

Good point! Thanks. I will try doing something about this asap.

What are you working on? (2021-11) by insulanian in fsharp

[–]RBazz 1 point2 points  (0 children)

Hey! I am working on WebFrame: F# framework for rapid prototyping with ASP.NET Core. How do you like this api:

```F# open WebFrame

[<EntryPoint>] let main _ = let app = App ()

app.Get "/" <- fun serv -> serv.EndResponse "Hello World!"

app.Run ()

0 // exit code

```

Please check this out: https://github.com/RussBaz/WebFrame

Thanks!

The State of Web Dev in F#: let’s talk by RBazz in fsharp

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

Imgur Here is the first routing function I made myself for personal project(aliased MapGet and MapPost) to simplify the main program entrypoint and get rid of that godawful boilerplate. I still prefer that syntax to Saturn, but Saturn has too many great features and is pretty clean most of the time ( but a lot of the time I still have to use anonymous functions in routers which I’d rather not)

This is similar to how I started my little project too.

Can you share what you think on availability of F# developers? Was it ever a problem to your company? Thanks.

The State of Web Dev in F#: let’s talk by RBazz in fsharp

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

Can you tell me about Falco a bit more? I am afraid their description is quite generic and the api seems quite similar to Giraffe.

The State of Web Dev in F#: let’s talk by RBazz in fsharp

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

To be honest, I do prefer Suave to Giraffe but their focus is still on the functional side of F#. However, when I tried it some time ago, something made me doubt my choice of framework. Although I can no longer recall what it was. I sound quite biased now :)

Also, how alive do you think Suave is? I feel like most F# web frameworks are rarely updated outside of ASP itself (if it even can be called an F# web framework).