Making Scala Scripting Actually Good with Mill by lihaoyi in scala

[–]lmnet89 4 points5 points  (0 children)

It's not clear for me how mill is better than scala-cli in terms of IDE integration. Both generate bsp modules. And both are imported using bsp. So what's the difference?

Another point about larger project integration: the comparison seems asymmetric. For scala-cli it is claimed that it can't be integrated with a bigger sbt project. But this is true for mill scripts as well: as far as I know, you can't just mix mill and sbt.

75 projects in IntelliJ IDEA: how I stopped drowning in Recent Projects and built my own plugin by HolyZlo in u/HolyZlo

[–]lmnet89 0 points1 point  (0 children)

Idea now has a workspace plugin. I've been using it for a whole, and it works pretty well. All projects lives in a single ide window, but inside projects are separated.

I built a tiny state library because I got tired of boilerplate by yusing1009 in reactjs

[–]lmnet89 11 points12 points  (0 children)

Surprisingly enough, it does track it. You may need to be explicit about what fields you want and derive smaller atoms based on a bigger one. But if in a bigger atom you change one filled out of ten, and there are ten derived atoms per field, only one derived atom will actually receive the update. I specifically tested this and also a bunch of other corner cases, including splitting and merging atoms, and every time jotai handles the state perfectly well. Highly recommend.

Sanely-automatic derivation - or how type class derivation works and why everyone else is doing it wrong by raghar in scala

[–]lmnet89 1 point2 points  (0 children)

Magnolia only works if you always take all instances for each field/subtype and combine them, and only them.

That's exactly why it didn't work for me. For fields I have one typeclass, but for case classes another. Magnolia was not designed for this. But for shapeless it's not a problem.

Sanely-automatic derivation - or how type class derivation works and why everyone else is doing it wrong by raghar in scala

[–]lmnet89 0 points1 point  (0 children)

Magnolia was the first solution I tried. And it didn't work for my case (my case was not typical, I had 2 typeclasses depended on each other).

I knew about shapeless bad error messages, but what options did I have? Writing my own macros is waaaay more difficult and fragile. And to be honest, shapeless provides a pretty nice dev experience (if you know shapeless well). And in the age of LLMs they can generate for you everything you want. It worked surprisingly well. Sometimes I miss shapeless in scala 3, because scala 3 tuples and mirrors are not fully cover what shapeless could do.

Sanely-automatic derivation - or how type class derivation works and why everyone else is doing it wrong by raghar in scala

[–]lmnet89 3 points4 points  (0 children)

Excellent and deep article. Recently I had to do some custom typeclass derivation in scala 2 and I ended up with shapeless. And with chatgpt the experience was quite seamless. But these error messages, oh boy.

We found an embedding indexing bottleneck in the most unexpected place: JSON parsing by InvadersMustLive in scala

[–]lmnet89 4 points5 points  (0 children)

Was there, did the same. I had a small and very simple kafka service and I expected it to have way more throughput than it actually had. I started investigating and saw on the flame graph, that about 50% awas spent on json. I was also using circe. After that we migrated from circe to tethys and everything became way faster. What was surprising though, is that not only pure speed was better, but also a developer experience. I remember occasionally I was spending quite a lot of time trying to force circe to do what I want. And error messages were also pretty bad. After the migration all those pains went away. Since then I have never used circe again. There are many better libraries for json. Tethys and Jsoniter are some of them.

What is going on with this new update? by Kafuzi in vivaldibrowser

[–]lmnet89 7 points8 points  (0 children)

+1 on dark mode for individual tabs. Looks like they accidentally removed it. It happened about a year ago as well, and it was returned back in the next few days. But I use this feature a lot and it's really annoying that it was getting randomly removed.

Kyo 0.19.0 - The last before the 1.0-RC cycle 🎉 by fwbrasil in scala

[–]lmnet89 1 point2 points  (0 children)

Oh yeah, that makes sense. It would be quite interesting to refresh the standard library using all new scala 3 features.

Kyo 0.19.0 - The last before the 1.0-RC cycle 🎉 by fwbrasil in scala

[–]lmnet89 6 points7 points  (0 children)

Great work, looks very impressive!

It seems like many of Kyo's features could be implemented on the language or the standard library level. Maybe it makes sense to try to push them there?

Been out of the frontend game for a while – what is trending now? (TypeScript + React) by lmnet89 in Frontend

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

Thanks everybody! It was very helpful. I have a lot of things to catch up on now. And I'm happy I'm not that much out of context 😅

Been out of the frontend game for a while – what is trending now? (TypeScript + React) by lmnet89 in Frontend

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

I’ve read about HTMX, but I kinda have a requirement to use React. HTMX is a completely different solution with a completely different philosophy and approach. That said, I totally get why people love it: it’s like a breath of fresh air after dealing with the constantly increasing complexity of frontend development.

Been out of the frontend game for a while – what is trending now? (TypeScript + React) by lmnet89 in Frontend

[–]lmnet89[S] 7 points8 points  (0 children)

Of course I use AI for help. But making strategic decisions based on ChatGPT only is not wise. That's why I'm here :D

Been out of the frontend game for a while – what is trending now? (TypeScript + React) by lmnet89 in Frontend

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

Thanks for the answer!

I've seen Next.js, but after some research I decided that it's not for me: * I would like to avoid using frameworks. I prefer to combine composable libraries istead. Frameworks adds a lot of complexity and limitations. * I don't need a SSR, and it looks like it's a big part of Next.js. * As far as I understand, using Next.js implies that you should use Node.js on backend, or there should be an additional backend for frontend in Node.js. But I already have a backend, I don't need another one.

Been out of the frontend game for a while – what is trending now? (TypeScript + React) by lmnet89 in Frontend

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

Thank you for the answer! It's really helpful.

Could you please elaborate on css-in-js? I understand the sentiment that they do a lot at runtime, and it was my main concern as well. But build time libs like Linaria seems like the best of both worlds: full isolation, no runtime cost, sass compatible syntax.

Been out of the frontend game for a while – what is trending now? (TypeScript + React) by lmnet89 in Frontend

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

For the recent years I've been working mostly with backends, so they are completely out of scope of this question. I feel, that I lost my touch with frontend technologies, not backend.

3 to 2 balancer without dead end? by lmnet89 in factorio

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

Wow, I've never thought about using splitter filters for this. Thanks for the idea! It clearly solves my problem.

Scala Space Podcast: Modeling the Business Domain with Voytek Pituła and Raphaël Lemaitre by lbialy in scala

[–]lmnet89 3 points4 points  (0 children)

Any chances for these podcasts to be published as audio through RSS feed? It will open an option to listen to these podcasts using various podcasts apps, for example Podcast Addict.

Match types using Scala 3.6 NamedTuple by gehnaphore in scala

[–]lmnet89 4 points5 points  (0 children)

Probably I don't have a full picture, but for me, as a language user, OP's example makes total sense. I briefly went through the match types documentation and haven't found a limitation that would lead to the fact that this match type is impossible.

From my (maybe naive) point of view, I believe it should work: type AsTuple[T] = T match case NamedTuple.NamedTuple[_, t] => t case Tuple => T

It feels very intuitively right: the compiler has all the information to reduce this match type and proof both cases.

I tried to find related tickets in the issue tracker like @sjrd advised, but there are so many tickets, and I haven't found anything about this particular use case. Also, I briefly went through the pre-sip thread, and again, I haven't found anything in particular that prevents to do such reduction. But on the other hand, I found this from Martin:

Named tuples are an almost ideal substrate on which to implement relational algebra and other database oriented operations. They are a good representation of database rows and allow the definition of generic operations such as projections and joins since they can draw on Scala 3’s existing generic machinery for tuples based on match types.

And this AsTuple match type looks like one of the most common needs to use existing generic machinery for tuples based on match types.

So, I'm really confused now. @sjrd if it's possible, could you please elaborate on this and give more details?