<wwalker>
Looking for an ORM recommendation. I did some looking and ended up at Granite, but it's README starts with "Looking for Maintainers"... I only need the simplest of ORMs, but with sqlite support. I might not even need an ORM.
<FromGitter>
<naqvis> > Dumb, quick question: anyone know of a relatively loose date/time string parser that allows a whole lot of common patterns? Like `2022-05-02 06:07:08` and `5/2/2022 6pm` and such? ⏎ ⏎ you can use `Time::Format` with some extra cleanup to try parse String to `Time` ⏎ https://carc.in/#/r/d4wj [https://gitter.im/crystal-lang/crystal?at=6274cfaf46495f47cfc9a46e]
analogsalad has joined #crystal-lang
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #crystal-lang
jmdaemon has quit [Ping timeout: 248 seconds]
analogsalad has quit [Quit: bye]
debayer has quit [Quit: if you can't play with it, why bother?]
analogsalad has joined #crystal-lang
analogsalad has quit [Quit: bye]
ua_ has quit [Excess Flood]
ua_ has joined #crystal-lang
SamantazFox has quit [Ping timeout: 248 seconds]
jrayhawk has quit [Ping timeout: 252 seconds]
jrayhawk has joined #crystal-lang
<FromGitter>
<plambert> > > Dumb, quick question: anyone know of a relatively loose date/time string parser that allows a whole lot of common patterns? Like `2022-05-02 06:07:08` and `5/2/2022 6pm` and such? ⏎ > ⏎ > you can use `Time::Format` with some extra cleanup to try parse String to `Time` ⏎ > https://carc.in/#/r/d4wj ⏎ ... [https://gitter.im/crystal-lang/crystal?at=62755f32cd938f6ea233fac4]
notzmv has quit [Ping timeout: 248 seconds]
jmdaemon has joined #crystal-lang
SamantazFox has joined #crystal-lang
notzmv has joined #crystal-lang
ur5us has joined #crystal-lang
analogsalad has joined #crystal-lang
analogsalad has quit [Client Quit]
<wwalker>
if I have multiple source files to build a single binary, what does my shard.yml targets section look like?
Guest86 has joined #crystal-lang
<FromGitter>
<Blacksmoke16> youd prob require all the required files within 1 file and use that as your target in `shard.yml`
<wwalker>
Every example I see has main: src/main.cr
<FromGitter>
<Blacksmoke16> i.e. you dont specify all your source files as targets
<FromGitter>
<plambert> Can I do string manipulation inside a macro?
<FromGitter>
<plambert> For example, the equivalent of `"foo".gsub(/o/) {|m| "x"}`
<FromGitter>
<Blacksmoke16> yes, but depends on what exactly you want to do id say, as it only has a subset of the API
<FromGitter>
<plambert> Specifically, I am defining classes, and want to define methods with the class names changed from `FooBarBaz` to `foo_bar_baz`
<FromGitter>
<Blacksmoke16> `{{ pp "foo".gsub /o/, "x" }}`
<FromGitter>
<Blacksmoke16> `.underscore`?
<FromGitter>
<plambert> Wow! Thanks. :)
<FromGitter>
<plambert> I never thought to search for that. :)
<FromGitter>
<plambert> OK, while I'm here, a question I've had for a while…
<FromGitter>
<plambert> I'd love to be able to create a macro that defines a class
<FromGitter>
<plambert> But also adds it to a list, and later populate a case statement and an enum
<FromGitter>
<plambert> I think this is possible, and if it's possible, it's surely been done... so if anyone has an idea where I might find an example to look at and learn from, I'd love to know!
<FromGitter>
<Blacksmoke16> im sure its possible
<FromGitter>
<Blacksmoke16> can you put together a quick playground link of what you want to do and what it should generate?
<FromGitter>
<Blacksmoke16> can prob fill in the blanks from ther
<FromGitter>
<plambert> playground link?
<FromGitter>
<plambert> the play.crystal-lang.org site?