-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Which libraries? #1
Comments
Since we're here, why not decline-effect? I prefer to do not have to reimplement CommandIOApp. |
Heh, my bad. Sure! |
@lolgab made me notice that w/o importing epollcat the native flavour of the toolkit is quite useless atm. |
Well, not for writing a native app that uses networking. But it's perfectly fine for file-based scripting. The thing is, the toolkit can never be sufficient for this usecase, because the user also needs to install and configure s2n-tls anyway. So for Native, additional involvement will always be required, and as you point out it will get easier in the near future. I almost considered not publishing for Native yet, but the file-scripting aspect seemed valuable. |
May I suggest:
Because configs and parsing CSVs happen frequently enough (for me) to have them in the toolkit. However I very much understand the fact that it might be overkill. |
Ah, but the catch with fs2-data is that everything is in a separate module. So ... should we bring in all the modules? 😂 That might be overkill. |
IMO, the The |
IMHO, if we have to pick just one module, I'll pick the csv one. cbor might be funny to have since the VirtusLab toolkit has uPickle as a tiny serialization format, but it's probably a bit overkill too. If this toolkit is supposed to be a pack of dependencies meant to be used for scripting purposes I think fs2-csv is a perfect fit, otoh I can't imagine the need for Ciris in a script-ish group of dependencies (unless at a certain point you do want to promote the script to a "beefier" application). What do you think? |
I think that for now, only using the
Not really related to this issue but, I think it's a good idea to state the goal of typelevels toolkit more explicitly in the Thinking it through and seeing the nature of |
I agree with what has been said, in the context of scripting, fs2-data CSV (potentially the generic one even though it brings shapeless) would be a good fit here. |
I'm working on the site, and I was thinking about that. Probably claiming that it's MEANT to be used for scripting it's a strong claim. I mean it's a meta lib that brings in CE, fs2, an http client, a json parser, a command line argument parser and a testing lib. It contains more features than most of the languages' standard lib have. |
True! And I can get behind this, but if this is a bikeshedding issue then I just felt obliged to do it :P. Also is it okay if I open up the PR for |
Totally! go on :D |
@zetashift the site is live @ https://typelevel.org/toolkit, if you add a fs2-data-csv example we can hit the 0.0.3 release :) |
On it! |
A discord question from @lenguyenthanh made me realize: shall we add Kittens? Automatic typeclass derivation sounds toolkitty to me :) at the very least for basic stuff like |
A yes for me, I started using it and definitely love it. It made me want to use type class more :D |
A couple ideas:
|
|
To be fair I don't use it that much, so I'm not sure which is the correct thing to do. [EDIT] Now that I'm thinking about it I'll prefer to add small utility libs like mouse, but again, that's just my view :)
🤣 |
Yep we are rapidly converging to this 😂 |
maybe this is a stupid idea, but how about a typelevel toolkit and typelevel fat toolkit (which includes everything lol)? |
I have the name: typewholevel |
I am okay with libraries like Also a vote for https://github.com/typelevel/squants but this is more because F# has units of measures and I've found it very nice for small "business logic" focused applications. I, personally, wouldn't like to have 2 versions of the toolkit. It just seems like more options, while one of it's nice properties is that it's just 1 import and it's just there. No need to think more about it unless you need some specific functionality. I'd much rather have a "too big or too small" toolkit with endless bike shedding than having to explain when to use what. I want to think as little as possible when using toolkit. -- How about some project templates (using giter8 or something) that includes a |
What's the motivation behind using |
Arbitrary decisions :) we're considering changing to weaver, see discussion here. |
Can't hurt to include MUnit + Weaver in the test artifact no? Atleast to start? |
@zetashift @ppurang there is a proposal to make Weaver an official Typelevel project, once that goes through I propose we add it / swap it out. |
Here are 2 spicey suggestions:
Go, Zig and Node.js(Bun/Deno as well) all have a http server included in their standard library. So atleast it's worth bikeshedding about :P. And |
Yeah, ember-server. But then probably we'd need to bring in the http4s DSL as well, and that's opening cans and cans of worms :)
Actually you don't need it on Scala 3, |
🥲 life can be tough.
Huh gotta revisit my scripts then, I had to pull in |
Maybe someone knowledgeable could add a section to the README with a list of the likeliest things people might want that aren't included, with links? This would mitigate the inconvenience/confusion factor in cases where including something seemed at least halfway plausible but a decision was made to leave it out. At minimum, such a list would certainly include "http server". Not sure what else it would/should include. After the list, there could even be a link to this ticket. If there is some concise, beginner-friendly guide/map to the Typelevel ecosystem out there, linking to that, that'd be amazing too. Or to whatever the best available thing is, such as https://typelevel.org/projects/ |
This seems like a spontaneous application for writing a auto derived json converting example |
Just need the right inspiration for a runnable example! |
It seems to only work for |
//> using toolkit typelevel::latest
//> using scala 3.3.1
import io.circe.*
import io.circe.syntax.*
case class Foo(bar: String) derives Codec.AsObject
object Main extends App:
println(Foo("hello").asJson.noSpaces)
|
ahh makes sense, I completely overlooked that |
I was playing around with Scala CLI today, for some simple HTTP client scripting. I was very surprised no XML library was included. I added |
The current choices mirror what's in the official Scala Toolkit (sttp, upickle, oslib). I also added Decline :)
toolkit/build.sbt
Lines 17 to 25 in e644ae5
But ... it's all bikesheddable :)
The text was updated successfully, but these errors were encountered: