ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.31.0 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
jhass has quit [Ping timeout: 245 seconds]
asterite has quit [Ping timeout: 246 seconds]
DeBot has quit [Ping timeout: 276 seconds]
asterite has joined #crystal-lang
jhass has joined #crystal-lang
DTZUZU has quit [Quit: WeeChat 2.2]
DTZUZU has joined #crystal-lang
alex`` has quit [Ping timeout: 245 seconds]
<FromGitter> <wwselleck> Trying to get into crystal by writing a simple HTTP server using no 3rd party shards. Before I go writing this functionality myself, there's no built in path variable functionality, right? Something that matches `/foo/1/bar/2` to `/foo/:idFoo/bar/:idBar`?
<FromGitter> <wwselleck> Or anything like that
chemist69 has quit [Ping timeout: 250 seconds]
chemist69 has joined #crystal-lang
juturnas has joined #crystal-lang
ht_ has joined #crystal-lang
_whitelogger has joined #crystal-lang
gangstacat has joined #crystal-lang
_whitelogger has joined #crystal-lang
juturnas has quit [Remote host closed the connection]
ht_ has quit [Quit: ht_]
<FromGitter> <gdotdesign> Is there any reason why this works like it works? https://play.crystal-lang.org/#/r/7mr6
<FromGitter> <gdotdesign> found the issue for it https://github.com/crystal-lang/crystal/issues/6597
alex`` has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
alex`` has quit [Quit: WeeChat 2.6]
alex`` has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 268 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 245 seconds]
rohitpaulk has joined #crystal-lang
hypercore has quit [Ping timeout: 260 seconds]
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
hypercore has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 245 seconds]
rohitpaulk has joined #crystal-lang
f1refly has joined #crystal-lang
sorcus has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter> <Blacksmoke16> @wwselleck nothing built in. would have to write a router, or at least use a shard that handles the routing for you
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 245 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 276 seconds]
Welog has joined #crystal-lang
<Welog> hello I create objects and put them in an array. when I do not need one object anymore, I deleted it from the array. I guess the object is still allocated in memory but I didn't need it anymore... How can I deal with this point ? Should I use GC.free each time I deleted an object entry from my array of objects ? thanks for your tips/help :)
sorcus has quit [Ping timeout: 245 seconds]
<FromGitter> <Blacksmoke16> pretty sure the GC should handle it for you
Pistos has joined #crystal-lang
hypercore has quit [Ping timeout: 260 seconds]
<Pistos> (new to Crystal) Is there a centralized package repo? Or at least, an official(ish) list of the most popular decentralized packages? Or is there a lack on purpose?
<FromGitter> <Blacksmoke16> packages are just retrieved from github/gitlab
<FromGitter> <Blacksmoke16> http://crystalshards.xyz/
<FromGitter> <Blacksmoke16> or https://github.com/veelenga/awesome-crystal would be your best bet
<FromGitter> <Blacksmoke16> (awesome-crystal could use some cleaning up tho)
<FromGitter> <vlazar> there is also https://crystal.libhunt.com/categories
deavmi has joined #crystal-lang
<deavmi> Eyo all
<deavmi> Is there any place I can find out more about the type system internals of Crystal?
<deavmi> Other than the rudimentary GitBook book
<FromGitter> <j8r> the code itself
<Welog> thanks Blacksmoke16 :)
<FromGitter> <Blacksmoke16> np
alex`` has quit [Quit: WeeChat 2.6]
alex`` has joined #crystal-lang
<FromGitter> <Blacksmoke16> deavmi https://github.com/crystal-lang/crystal/wiki/Compiler-internals#type-inference has some stuff as well
HumanG33k has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <yxhuvud> Pistos: There is a lack on purpose as running and developing a package repository takes resources that could be used for other things. Might it be the case that someone at some points add a repo? Sure, but I don't see it happening unless we grow out of the current model. Which might not happen. I expect Go to show the way there as they (IIRC) have a similar model.
<FromGitter> <asterite> @Blacksmoke16 that wiki page is waaaaaaaaaaay outdated :-(
<FromGitter> <Blacksmoke16> 😬
<FromGitter> <asterite> actually, maybe not that outdated
<FromGitter> <asterite> just some names changed but the basic idea is the same
<FromGitter> <asterite> :-)
<FromGitter> <Blacksmoke16> thats good at least
rohitpaulk has quit [Ping timeout: 245 seconds]
rohitpaulk has joined #crystal-lang
<Pistos> yxhuvud: Okay, so it's by design. So, what does a typical Crystal developer do when they don't know if a given library exists, but want to search for the most popular one(s) that the Crystal community tends to use? Common stuff like DB interfacing, ORMs, networking (HTTP, REST), stuff like that. Just websearch?
<FromGitter> <Blacksmoke16> awesome-crystal, google, or ask here would prob be your best bet
<FromGitter> <Blacksmoke16> or search github
<Pistos> Blacksmoke16: Okay. Thanks for your responses, by the way.
<FromGitter> <Blacksmoke16> np, looking for anything in particular?
<Pistos> No, I'm just gauging the language and ecosystem as a whole.
<FromGitter> <Blacksmoke16> 👍
<FromGitter> <yxhuvud> TBH, I can't remember ever looking at the npm or rubygem websites for discovering libraries either. repositories have other upsides, but discovery seems a very limited part of that.
sorcus has joined #crystal-lang
<jhass> mh, rubygems.org I used a lot for that, pypi.org just the other day even
<Pistos> Hm. Well, what can I say; I use npm's site almost exclusively for module searches, and rubygems.org for occasional searching (in addition to plain websearching).
<FromGitter> <Blacksmoke16> another thing to take into consideration is there are prob much much much more npm modules than crystal shards
<FromGitter> <Blacksmoke16> so id imagine most people are aware of the more popular ones that still work
HumanG33k has joined #crystal-lang
HumanG33k has quit [Remote host closed the connection]
<FromGitter> <Blacksmoke16> on another note, did something change with fiber/http server works?
HumanG33k has joined #crystal-lang
<FromGitter> <Blacksmoke16> i used to have a method ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ that would run a server in a fiber, then test it using the yielded client, however now it errors with `Connection refused` [https://gitter.im/crystal-lang/crystal?at=5d8b84b7bae2907f6c363aec]
<FromGitter> <Blacksmoke16> the server is deff running, i can get the correct response via postman if i add in some more sleeps
<FromGitter> <alehander42> curl -sSL https://dist.crystal-lang.org/apt/setup.sh | sudo bash
<FromGitter> <alehander42> this doesnt work on my machine
<FromGitter> <alehander42> leads to "siganture not available"
<FromGitter> <alehander42> W: GPG error: https://dist.crystal-lang.org/apt crystal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 09617FD37CC06B54
rohitpaulk has quit [Ping timeout: 245 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <Blacksmoke16> were some issues about that but im not familiar with it enough to give an answer
<FromGitter> <Blacksmoke16> anyway i figured out my issue
<FromGitter> <Blacksmoke16> was due to https://github.com/crystal-lang/crystal/pull/8125
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d8b8a2bb6aa4d6c90def5d2]
<FromGitter> <Blacksmoke16> so guess ill just have to do the `run_server` within each it block vs having one globally available, or just make the client a constant or something
<FromGitter> <jwoertink> Anyone know if there's a way to fire a callback function when an HTTP::Server closes?
<FromGitter> <jwoertink> Or maybe there's a better way to do this....
<FromGitter> <jwoertink> Ok, so my issue is, I'm running specs on LuckyFlow which boots up a chromedriver instance. When the specs are done, chromedriver process is still active
<FromGitter> <jwoertink> I have a `at_exit { }` block in my spec_helper, but it seems that in crystal 0.31, that now runs before the specs are done
<FromGitter> <jwoertink> and `Spec` doesn't have any way to call when all specs are done running
<FromGitter> <jwoertink> My thought was that when the specs are done, the http server closes itself somehow. Maybe there's a way to hook in to that? But I'm not seeing anything
<FromGitter> <Blacksmoke16> Reopen close and add some code?
<FromGitter> <jwoertink> I tried reopening `Spec.run` so I could add it in there
<FromGitter> <jwoertink> but I get that `Module validation failed` bug
Pistos has left #crystal-lang ["WeeChat 2.4"]
<FromGitter> <jwoertink> unless I run specs with `--no-debug`
<FromGitter> <jwoertink> Is there a way to set that flag programatically? 😅
<FromGitter> <didactic-drunk> pistos: shards.info. It dependency info similar to rubygems.org.
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
alex`` has quit [Quit: WeeChat 2.6]
rohitpaulk has quit [Ping timeout: 240 seconds]
alex`` has joined #crystal-lang
rohitpaulk has joined #crystal-lang
Human_G33k has joined #crystal-lang
HumanG33k has quit [Ping timeout: 240 seconds]
alex`` has quit [Ping timeout: 245 seconds]
alex`` has joined #crystal-lang
<FromGitter> <bew> @jwoertink yes, it looks like that now specs are only gathered (not executed) when you define them, and they all execute from an at_exit handler (to make sure they are run after all spec it blocks are defined)..
<FromGitter> <bew> As a consequence, if your `require "spec"` (it installs its at_exit handler) then you add yours, they will be executed in reverse order, first yours then Spec's..
<FromGitter> <asterite> we need to add Spec.after(:suite) or something
<FromGitter> <jwoertink> ^ that for sure 😂
<FromGitter> <jwoertink> Anyone here have some experience using travis ci?
<FromGitter> <Blacksmoke16> a bit, been switching my stuff to GH actions tho
<FromGitter> <jwoertink> My specs fail because of "undefined method", but that method exists...
<FromGitter> <Blacksmoke16> link?
<FromGitter> <Blacksmoke16> is `--branch=jaw/v0.6.0` the right branch?
<FromGitter> <Blacksmoke16> seems to be what its checking out
<FromGitter> <jwoertink> yeah
<FromGitter> <Blacksmoke16> and im assuming it passes locally?
<FromGitter> <jwoertink> yup. Passes locally and even using docker locally
<FromGitter> <jwoertink> It says `Installing selenium (0.4.0)`
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter> <jwoertink> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d8ba9d586eddb6ea0d31a23]
rohitpaulk has joined #crystal-lang
<FromGitter> <bew> @jwoertink in selenium v0.4.0 there's no `window`... https://github.com/ysbaddaden/selenium-webdriver-crystal/blob/v0.4.0/src/webdriver/session.cr
<FromGitter> <bew> (there is on master though)
<FromGitter> <jwoertink> OMG
<FromGitter> <jwoertink> lol
<FromGitter> <jwoertink> thanks!
<FromGitter> <Blacksmoke16> its prob locked to something diff locally?
<FromGitter> <jwoertink> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d8baa4f5c966b58fb74eca1]
<FromGitter> <jwoertink> my local lock has this
<FromGitter> <bew> :shrug:
<FromGitter> <jwoertink> but my lib dir has the master branch
<FromGitter> <bew> ah
<FromGitter> <bew> version is incorrect
<FromGitter> <bew> should be `v0.4.0`
<FromGitter> <bew> wait
<FromGitter> <jwoertink> that's the lock file
<FromGitter> <jwoertink> also, did 0.31.0 not include shards 0.9?
<FromGitter> <jwoertink> again
hightower2 has joined #crystal-lang
<FromGitter> <bew> ah can you share the shard.yml ?
<FromGitter> <jwoertink> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d8bab6a14635d6b37ebde26]
<FromGitter> <jwoertink> that's what I was using. Just changed to branch master
<FromGitter> <bew> ok then forget what I said
<FromGitter> <jwoertink> 😄
<FromGitter> <jwoertink> Thanks for catching that. I've been staring at this for a while and didn't notice that master isn't the latest release
<FromGitter> <fridgerator> how long does a release normally take to end up on pacman?
<FromGitter> <bew> @fridgerator for arch, there's a little problem with the gc, see: https://github.com/crystal-lang/crystal/issues/8213
<FromGitter> <bew> but maybe the package is already updated? (just preview_mt won't work)
<FromGitter> <fridgerator> thanks @bew
<FromGitter> <bew> the time for release is quite short, the package maintainer needs to be notified and take some time to update the package
<FromGitter> <bew> (I guess)
<FromGitter> <bew> since arch is a rolling release, there is no "wait-6-month-for-another-release" :D
<FromGitter> <fridgerator> thats what I love and hate about it 😆
<FromGitter> <bew> hehe me too
ht_ has joined #crystal-lang
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
dannyAAM has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <didactic-drunk> Should this crash with -Dpreview_mt? ⏎ ⏎ ```fibers = 20.times.map do ⏎ spawn do ⏎ Fiber.current.enqueue ⏎ end ⏎ end.to_a``` [https://gitter.im/crystal-lang/crystal?at=5d8bb42f14635d6b37ec2850]
rohitpaulk has quit [Read error: Connection reset by peer]
rohitpaulk has joined #crystal-lang
<FromGitter> <bew> where would it crash?
<FromGitter> <didactic-drunk> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d8bb698a929c26bf4c82e45]
<FromGitter> <didactic-drunk> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d8bb6ce14635d6b37ec3bc0]
<mps> I asked straight_shoota about that but looks like he is busy or not online
<mps> I prepared build and everything is ready to upgrade to 0.31.0, just missing this commit hash for version
<jhass> I think having the commit there is rather optional, especially for release builds, it's easy to figure out from the version. So just setting it empty should be legit
<mps> jhass: I thought just that, but was not sure because straight_shoota posted that merge request
<jhass> also if you just not set it now it should no longer appear
<jhass> ah well nvm, you still invoke make of course
<mps> really, nice, then I will do just that, thanks for info
<jhass> but yeah, just keep it empty
<jhass> to override the make option basically
<mps> having commit hash in version for released version with proper version doesn't make sense, imo
<jhass> exactly
<jhass> it's really just a side effect of you building inside another git repo
<mps> we officially build from release tarballs, not git repo
<jhass> might make sense for you folks to set GIT_DIR to garbage generally to avoid such things, so git commands used by projects fail
<jhass> yeah but if I got the issue right the build is still running inside a git repo
<mps> but it takes hash from git commit in alpine aports
<mps> right ofc
<jhass> so I would experiment with setting GIT_DIR to garbage in the build env generally
<mps> ok, thanks for ideas
<jhass> but for now for crystal, just empty CRYSTAL_CONFIG_BUILD_COMMIT will do the trick :)
rohitpaulk has quit [Ping timeout: 240 seconds]
<mps> ok
rohitpaulk has joined #crystal-lang
<mps> hope straight_shoota will agree :)
gangstacat has quit [Ping timeout: 246 seconds]
rohitpaulk has quit [Ping timeout: 240 seconds]
gangstacat has joined #crystal-lang
<FromGitter> <j8r> Hi mps
<FromGitter> <j8r> jhass had answered better than I ever will
<jhass> oprypin: PRIVMSG #crystal-lang :\x02<j8r>\x0f why... :D
pdkl has joined #crystal-lang
ht_ has quit [Quit: ht_]
<mps> j8r: yes, I'm building again to see what I will get with 'crystal --version'. hope to push crystal to alpine aports this night
<FromGitter> <j8r> finger crossed :)
duane has joined #crystal-lang
<mps> I made mistake to setting source, have to repeat build again
<mps> but I tested build yesterday on aarch64 and it worked
<mps> just have to make proper APKBUILD to work on official builders
<FromGitter> <j8r> noice!
<FromGitter> <j8r> but llvm8 still broken?
<mps> yes, building with llvm5
<mps> llvm8 works on x86_64
<mps> not on aarch64
alex`` has quit [Ping timeout: 240 seconds]
alex`` has joined #crystal-lang
Human_G33k has quit [Remote host closed the connection]
<oprypin> jhass: why what? it's been like that for years. or is there a new problem?
<jhass> well I didn't know and confused me why the weechat gateway_rename wouldn't work is all
<oprypin> jhass: sounds like you have an entry to add to https://github.com/oprypin/critter/wiki/Client-integration ;)
<jhass> hah
<jhass> there you go
<FromGitter> <jwoertink> I feel like I run in to this all the time, but I always forget how to get around it
<FromGitter> <jwoertink> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d8beee434a7236bf5bf157b]
chachasmooth has quit [Ping timeout: 268 seconds]
chachasmooth_ has joined #crystal-lang
<FromGitter> <jwoertink> oh, `make clean`. Not sure why I can never remember that 😅
pdkl has quit [Quit: Leaving]
hypercore has joined #crystal-lang
<FromGitter> <bew> you didn't struggled enough 😄
<FromGitter> <bew> *huh that sounded weird* 😇
<FromGitter> <bew> this looks cool https://github.com/l3kn/raytracer
<FromGitter> <bew> (@barachy you found it first :P)
<FromGitter> <repromancer_gitlab> I’ve been reading up on `abstract def` and return type restrictions. Is there ⏎ any way I could achieve something like the following? E.g. Count would be ⏎ required to return Count::Output. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d8bfcfbf8b2736b3877be78]
<FromGitter> <Blacksmoke16> not if its a class method
<FromGitter> <Blacksmoke16> less you do some macro magic
<FromGitter> <Blacksmoke16> @repromancer_gitlab
<FromGitter> <repromancer_gitlab> @Blacksmoke16 yeah, I've been thinking it may require a macro, which smells like I probably should just do something else for now, lol
<FromGitter> <Blacksmoke16> abstract defs are only for instance methods, would be nice if you could define abstract class methods, or interface for them but :shrug:
<FromGitter> <repromancer_gitlab> oh, you can
<FromGitter> <Blacksmoke16> hm?
<FromGitter> <repromancer_gitlab> oh, I left the `self` in by accident
<FromGitter> <repromancer_gitlab> meant to have a simpler example with instance methods
<FromGitter> <repromancer_gitlab> @Blacksmoke16 https://stackoverflow.com/a/41965979
<FromGitter> <repromancer_gitlab> this isn't explicitly documented but I can verify that it works
<FromGitter> <Blacksmoke16> hmm
<FromGitter> <Blacksmoke16> neat