<hightower3>
Yes I mean, it doesn't exhibit in most plain examples, but the above effect is what it boils down to, when it does happen... trying to reproduce
<FromGitter>
<Blacksmoke16> you're prob passing `self` to another method/constructor within an initializer
<hightower3>
yes, all you say may be true
xaxisx has quit [Remote host closed the connection]
xaxisx has joined #crystal-lang
<hightower3>
shrug... can't reproduce
<hightower3>
(tried it a couple times in the past, but then ended up not reporting since I couldn't reproduce in a simple example)
ua has quit [Ping timeout: 264 seconds]
ua has joined #crystal-lang
deavmi has quit [Ping timeout: 272 seconds]
deavmi has joined #crystal-lang
deavmi has quit [Ping timeout: 260 seconds]
deavmi has joined #crystal-lang
ua is now known as ua_
<hightower3>
Hey if subclasses of a class need to accept some initialize arguments specific to them and also all the arguments of the parent's initialize (and there's many of them), what's my best bet repeating all these arguments in 20-30 subclasses?
<hightower3>
Can a macro do it, or some better solution?
<hightower3>
or I can do initialize(...specific options..., **args); super(**args)
<FromGitter>
<naqvis> Happy to share Playwright-cr (https://github.com/naqvis/playwright-cr) Crystal version of the Playwright testing and automation library. 😆
<FromGitter>
<Blacksmoke16> cant say i heard of that one. Thought everyone uses Cypress these days
<FromGitter>
<naqvis> this one is quite popular among M$ fans :P
xaxisx has quit [Quit: Leaving...]
<hightower3>
In this case: https://carc.in/#/r/a823 , how can I make sure that x2 calls the first version of x1 ?
<hightower3>
eh, yes but can't use previous_def... or in fact I could... in any case solved it in a slightly different way
<hightower3>
(some subclasses want to override the method from parent class... I guess previous_def would work, yes)
<FromGitter>
<Blacksmoke16> yes, just remove the redefinition of the method
<FromGitter>
<Blacksmoke16> well in that context it would be `super`
<FromGitter>
<Blacksmoke16> assuming you want to call the parent implementation then do something more with the response?
<hightower3>
mm right, didn't think of super in this context, thanks
HumanG33k has quit [Remote host closed the connection]
HumanG33k has joined #crystal-lang
Volk has quit [Quit: See you next time!]
<deimos_>
in reading about fibers, is it correct that crystal already has file and network i/o in a fiber?
HumanG33k has quit [Remote host closed the connection]
HumanG33k has joined #crystal-lang
_ht has quit [Remote host closed the connection]
<FromGitter>
<erdnaxeli:cervoi.se> Hi, in spec, is it possible to run some code before each test and get the result to use it in the test? (in my case I want to open a db connection with in memory sqlite and run the migrations)
<FromGitter>
<Blacksmoke16> can use helper methods within your specs
<FromGitter>
<Blacksmoke16> there are also hooks you can use, which you could store the value in some class var or something :shrug:
<FromGitter>
<erdnaxeli:cervoi.se> the helper seems good, I didn't think about that, thanks!
<hightower3>
is there not a way to cancel/kill a fiber from outside?
<FromGitter>
<Blacksmoke16> there is but not via the public API
<FromGitter>
<erdnaxeli:cervoi.se> ok now the tricky question, did someone succedeed to use an in memory sqlite db with a database pool? ⏎ I tried `sqlite3://%3Amemory%3A?cache=shared` but it does not seems to work.
<FromGitter>
<erdnaxeli:cervoi.se> the tables created withing a transaction are not visible to other transactions.
<FromGitter>
<Blacksmoke16> are you trying to run this once per group of specs? or once per `it` block?
<FromGitter>
<erdnaxeli:cervoi.se> once per it block. Yeah, that's terribly unefficient :p
<FromGitter>
<erdnaxeli:cervoi.se> "For backwards compatibility, shared cache is always disabled for in-memory databases if the unadorned name ":memory:" is used to open the database" I think that's my problem
<FromGitter>
<erdnaxeli:cervoi.se> it seems I need to use a URI filename
<FromGitter>
<erdnaxeli:cervoi.se> returning from a db.transaction block prevents it to commit?
<FromGitter>
<Blacksmoke16> Try using next instead
<FromGitter>
<erdnaxeli:cervoi.se> about my :memory: problem: crystal-sqlite3 does not enable Flag::URI, and does not supports "file:" scheme, so `?cache=shared` will never work. But, as I actually reuse the same connection from my pool, my tests run ok.
<FromGitter>
<Blacksmoke16> 👍
Volk has joined #crystal-lang
<raz>
halite or crest? hmmm
* raz
tries to remember why he preferred crest in the past
<FromGitter>
<watzon> I used to love Halite, but it's slow af compared to `HTTP::Client`. No clue how crest compares.
<FromGitter>
<Blacksmoke16> cant just use stdlib
<FromGitter>
<Blacksmoke16> raz use `Athena::HTTPClient` 😏
<FromGitter>
<jrei:matrix.org> yes, Halite has so much features