<FromGitter>
<naqvis> Array related clarifications were added to TOML v0.5 and upward
<FromGitter>
<naqvis> so I would say Toml shard is doing what is says on its github page
<jhass>
updating it for the latest version is most likely welcome though
<FromGitter>
<naqvis> +1
<FromGitter>
<xmonader> @jhass I asumed it's a first class citzen in the language, but looks like my assumption was wrong
<jhass>
uhm yeah, it would be in stdlib otherwise
<jhass>
even then regression = something previously working broke
<jhass>
broken since forever is just called bug
<FromGitter>
<xmonader> > *<jhass>* even then regression = something previously working broke ⏎ ⏎ yeah, i assumed it's a regressionn because i did some toml before with crystal and this one seemed legit :)
<FromGitter>
<xmonader> but thank you for clarification indeed
<jhass>
fixing these kinds of things is usually faster than complaining :P
oddp has joined #crystal-lang
<FromGitter>
<grkek> I fucking hate the crystal subreddit
<jhass>
why?
<jhass>
also why wouldn't you just ignore it then
<raz>
i never quite understood why reddit got so popular. but i guess that may have to do with me not being 14 anymore :<
<jhass>
my guess is the lax content policies and good separation of different niches. Opposing viewpoints are just contained to different non-interacting parts of the site. In that sense reddit isn't one community or forum, but a platform for any number of them.
<raz>
yea, dunno. the S/N ratio seems to be about the same as twitter, with the only advantage being that the noise comes at you in chronological instead of randomized order
<jhass>
the difference is that discussions are separated by interest, not topic. While the same links are crossreferenced, you actively need to go to the discussion another community has about the topic, you don't see it right away and you're not even nudged to take a look
<jhass>
it creates a much stronger and thus more engaging echochamber
<jhass>
sorry, I'm not actually familar with the shard
<jhass>
I just went by the error message you posted for my initial suggestion
<FromGitter>
<xmonader> no worries I already asked manas to help too thank you so much
postmodern has quit [Quit: Leaving]
duane has quit [*.net *.split]
Human_G33k has quit [*.net *.split]
FromGitter has quit [*.net *.split]
duane has joined #crystal-lang
FromGitter has joined #crystal-lang
Human_G33k has joined #crystal-lang
<yxhuvud>
urgh. having to create Time::Span with the value measured in nanoseconds just to compare against a millisecond was a bit inconvenient. so many zeros :/
<FromGitter>
<asterite> jwaldrip: macro finished runs at the end of the program. It seems some misunderstanding that it runs when a class is closed is running around here, but that's not true
<jhass>
"at the end of the program" might not be the best description either :P
<raz>
ohhh, TIL
<raz>
agree "end of program" is confusing. would "end of macro processing" be more accurate?
<raz>
hmm, the docs say `finished is invoked after instance variable types for all classes are known.`
<yxhuvud>
I guess I can just make a float out of it, but it is quite silly to have a timespan class that isn't the most convenient way to actually compare time spans..
<jhass>
yxhuvud: you're aware of .seconds, .milliseconds etc?
<FromGitter>
<asterite> it's really at the end of the program, after the last expression
<raz>
jhass: hmm yep, that sounds clearer to me. perhaps could be extended to "after parsing and macro processing is finished"? (if that is even true)
<jhass>
is it true? No clue
<raz>
well, that's kinda the critical bit for me and i imagine for most people who look for this macro :D
<jhass>
asterite: I think "the program" is not clearly defined in this context. It could be the compiler finished running, it could the user program finished running or it could be what you mean, the parsing reached the end of the user code
<yxhuvud>
jhass: if I can do `sleep 0.005` I'd expect to be able to test that with `Time.measure {sleep 0.005}.should be > 0.005` or at least `.. .should be > Time.span.new(0.005)`
<jhass>
.should be > 5.milliseconds
<yxhuvud>
ok, better than the constructor but still an inconsistency.
<FromGitter>
<asterite> yeah... I wish I never introduced finished
<jhass>
yxhuvud: sleep 5.milliseconds is valid fwiw
<jhass>
asterite: yeah, I still believe the usecases could be (mostly better) solved with gradual hooks, the ones we already have like inherited/included/extended, method_added and some more like instance_var_added, constant_added, class_var_added etc
<jhass>
one for everything
<FromGitter>
<Blacksmoke16> finished has some usecases imo
<jhass>
but does it have any where we couldn't come up with a mechanism that's easier to reason about?
<FromGitter>
<Blacksmoke16> not sure, let me see if i can put together some example
<FromGitter>
<Blacksmoke16> meh, cant think of a good one atm
<jhass>
:P
<FromGitter>
<jwaldrip> I like the idea of finished. But it doesn't fire when I expect it to
<FromGitter>
<jwaldrip> Finished is powerful and allows for some post processing at compile time.
<FromGitter>
<jwaldrip> In Orion I use it to start the server if the user has not already done so manually already
<FromGitter>
<jwaldrip> When in app mode
<FromGitter>
<jwaldrip> And I was trying to use it again to create a view registry. The issue with layouts in orion is that they call yield to render the inner view which means they need to define a method. Unless procs can take blocks as an argument
<FromGitter>
<jwaldrip> or call yield themselves
<FromGitter>
<jwaldrip> My top level layout macro just defines the `render_layout` function which works if controllers has a single layout. But I wanted the ability to also have overridable inline layouts using a layout option on the render macro.
<FromGitter>
<jwaldrip> i guess I could do a toplevel `register_layout_function`
deavmi has quit [Ping timeout: 258 seconds]
<FromGitter>
<jwaldrip> I figured something out. I think i got it
deavmi has joined #crystal-lang
Human_G33k has quit [Read error: Connection reset by peer]
HumanG33k has joined #crystal-lang
HumanG33k has quit [Remote host closed the connection]
HumanG33k has joined #crystal-lang
<FromGitter>
<Blacksmoke16> that was quick
HumanG33k has quit [Remote host closed the connection]
HumanG33k has joined #crystal-lang
<raz>
hooks like finished save your bacon when you're dealing with other peoples code tho
<raz>
my use case is always "let this ORM do all its ormy things" and then i do my thing on top of that.
<raz>
because the alternative of patching up something like an ORM is usually a nightmare. patches can later evolve from the hooked-up version. but it's _way_ easier to start with such a hook-approach than finding all the correct spots that need to be patched up in the ORM itself.
<FromGitter>
<jwaldrip> So every view sits within a known folder... so I can just scan every file in that folder, tokenize it, and then use code generation to make my methods
<FromGitter>
<jwaldrip> using run to generate the code and then `{{ run "defs.cr" }}` to insert the code back into my main program
<FromGitter>
<jwaldrip> but of course `{{ run "../view/defs.cr", `date +%s%N` }}` to avoid caching
<FromGitter>
<jwaldrip> unless there is a better way to prevent macro caching?
<FromGitter>
<eliasjpr> @asterite hey I am giving a Crystal Workshop for my team at the New York Times, this is a talk to a potential 400+ engineers that we have my goal of the workshop/talk is to give an introduction to the language and build excitement around release of v1. I would like to get some ideas for the intro and hands on coding session (What can we build)
<FromGitter>
<eliasjpr> Community please chime in ☝️
<FromGitter>
<jwaldrip> Do we have a general timeline on v1?
<FromGitter>
<jwaldrip> @eliasjpr what does NYT use right now?
<FromGitter>
<jwaldrip> If possible. It would be awesome to do a remote workshop over zoom and have other teams join too.
<FromGitter>
<jwaldrip> @asterite it would also be great to organize a global zoom conference in the next few months. Much like the one we had in SF but much more available and unlimited from a space standpoint
<FromGitter>
<eliasjpr> @jwaldrip I can arrange for that. But this is more for internal NYT. In regards to stacks we use most of the main stacks, (Go, Java, Ruby, Python, Scala, PHP...) depending on the team youre on
<FromGitter>
<jwaldrip> Gotcha. Makes sense.
<FromGitter>
<eliasjpr> There is a big potential given all the tech that we use internally is a big pool of broad tech audience
<FromGitter>
<asterite> @eliasjpr nice!
alexherbo2 has quit [Ping timeout: 256 seconds]
<FromGitter>
<eliasjpr> Does anyone have a presentation deck for Crystal Language that would like to share? I will like to know what you think is important to present/demo about Crystal?
deavmi has quit [Read error: No route to host]
deavmi has joined #crystal-lang
<raz>
eliasjpr: planning to use crystal mostly for backend or web stuff, or both? (it might be interesting to look into the relevant/preferred frameworks for the respective tasks, lucky, amber, grip, etc.)