RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.26.1 | 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
<FromGitter> <Blacksmoke16> @straight-shoota ayyy, nice
baweaver_away is now known as baweaver
<FromGitter> <codenoid> is that crystal syntax with camel-case style ?
<FromGitter> <codenoid> it's hurts my eyes
<FromGitter> <codenoid> ah, nvm
return0e has quit [Ping timeout: 244 seconds]
return0e has joined #crystal-lang
rohitpaulk has joined #crystal-lang
ua has quit [Ping timeout: 240 seconds]
Groogy1 has joined #crystal-lang
snapcase has joined #crystal-lang
moei has quit [Ping timeout: 252 seconds]
rohitpaulk has quit [Ping timeout: 264 seconds]
rohitpaulk has joined #crystal-lang
ua has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 250 seconds]
moei has joined #crystal-lang
JesseH has quit [Ping timeout: 245 seconds]
<FromGitter> <codenoid> so quiet here
<lvmbdv> chirp chirp
<lvmbdv> GoLang is ugly
<FromGitter> <codenoid> aggree for the syntax
<lvmbdv> it's dumbified to serve a very specific purpose and people using it like it's a solid general purpose language pisses me off
<FromGitter> <drum445> haha
<FromGitter> <drum445> Think I agree with that, used it for a year now and it still frustrates me
rohitpaulk has joined #crystal-lang
<lvmbdv> crystal would kick its ass if it gets multi-threading
<FromGitter> <codenoid> ✨
<lvmbdv> 👻
<lvmbdv> irccloud's mobile app is nice
<FromGitter> <girng> hello
<FromGitter> <codenoid> hi @girng
<FromGitter> <bararchy> @girng long time :)
<FromGitter> <bararchy> hows your game going?
rohitpaulk has quit [Ping timeout: 264 seconds]
ashirase has joined #crystal-lang
<FromGitter> <girng> good ty.
ua has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
return0e has quit [Ping timeout: 272 seconds]
rohitpaulk has quit [Ping timeout: 252 seconds]
return0e has joined #crystal-lang
<FromGitter> <vladfaust> Can I somehow DRY macros code extracting repeating macro into a separate method? E.g. this code isn't DRY: https://github.com/vladfaust/core/blob/317c60f6f76c6637077c985f843848549f379b03/src/core/query/set.cr#L90-L140. I tried to extract it like https://carc.in/#/r/50xo (pay no attention to details), no luck - looks like it's a macros scope problem: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ And passing
<FromGitter> ... `type` argument to `check_type` doesn't work as well. For some reason even resolved `TypeNode`s turn into `Path` or even `Expression` if passed as argument :/ Not hoping for a great help, but maybe there is some trick to include *exact* code into the program, so that code has the same scope as the wrapping one? [https://gitter.im/crystal-lang/crystal?at=5b9f9b22f4bd1056ac764b83]
<FromGitter> <vladfaust> One cannot define macro methods, right?
<FromGitter> <vladfaust> Is there a way to insert exact lines from external file? `run` doesn't make the trick
<FromGitter> <vladfaust> Yep, this code: ⏎ ⏎ ```{% cat `#{__DIR__}/dry.cr` %}``` ⏎ ⏎ Did the trick. TIL [https://gitter.im/crystal-lang/crystal?at=5b9f9ddfe5c2cc56ada10546]
<FromGitter> <bew> What about concat the CORE_REFERENCES & CORE_ATTRIBUTES array in a tmp array?
<FromGitter> <bew> Then loop over it once
<FromGitter> <vladfaust> Hey, @bew, there is a bigger context
<FromGitter> <vladfaust> Thanks for taking time though!
<FromGitter> <bew> Hmm about your carcin, you can pass `type` as a param of `check_type`
<FromGitter> <vladfaust> I store `TypeNode`s in the `type`, on passing they turn into `Path`s
<FromGitter> <vladfaust> Or `Expression`s if its a Union
<FromGitter> <bew> Oh
<FromGitter> <bew> For `Path` there is `Path.resolve`
<FromGitter> <vladfaust> There is none for `Expression` though
<FromGitter> <vladfaust> `ExpressionS` I mean
<FromGitter> <bararchy> This is really cool -> https://github.com/saitoha/libsixel
<FromGitter> <bararchy> not let's bind it XD
<FromGitter> <bew> Now*?
<FromGitter> <bew> Ooooh i always wondered how w3m was showing real images
<FromGitter> <bew> Thanks a lot for the link :)
<FromGitter> <codenoid> why this can be happen, https://twitter.com/pwnsdx/status/1041391873317904384
<FromGitter> <codenoid> is a buffer overflow or ?
<lvmbdv> it's literally just an infinite loop
<lvmbdv> sounds like clout chasing without any credible merit
<FromGitter> <bajro17> @bararchy it look so amazing. I like it so so so much
<FromGitter> <j8r> @bararchy wow impressive!
<FromGitter> <bararchy> @codenoid seems like a simple DOS that causes a Kernal Panic -> https://thehackernews.com/2018/09/iphone-crash-exploit.html
<FromGitter> <codenoid> yes, but i think browser should handle something like that
<FromGitter> <codenoid> somethink like (too many redirect)
<FromGitter> <fridgerator> probably, the guy is overreacting
<FromGitter> <codenoid> i'm going to watch video in my terminal
<lvmbdv> TIL sixels
<lvmbdv> yeah +1 for the guy is overreacting
<FromGitter> <codenoid> 👀
<FromGitter> <rishavs> what is the best way to extract the filename.ext from urls like "https://i.imgur.com/FvHh7EB.jpg". Now the filename may not always be there. In Ruby you could do `File.basename` to get the this.
<FromGitter> <Blacksmoke16> but i imagine you want to also get like `https://example.com/images/v1/foo/bar.jpg`? and you would want `bar.jpg`?
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/510j @rishavs
<FromGitter> <j8r> you can also use `File.basename` in Crystal
<FromGitter> <rishavs> @Blacksmoke16 , the urls may or may not have filenames in it. though i am likely to write my own function to do so where i have an array of known extensions and just split and check against that, I wanted to see if there are any inbuilt methods in the stdlib for it
<FromGitter> <rishavs> @j8r I did not know that. Couldn't find it in the URI docs
<FromGitter> <Blacksmoke16> could check if it contains `.`?
<FromGitter> <Blacksmoke16> its prob in the file docs
<FromGitter> <Blacksmoke16> hence the `File.`
<FromGitter> <rishavs> oh well, this sidn't work :/ ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5b9fc2c2f7e1580625e45b31]
<FromGitter> <rishavs> gave ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5b9fc310e5c2cc56ada1fda8]
<FromGitter> <j8r> @rishavs add `.to_s`, `.not_nil!` or a condition `if path = uri.path`
Groogy1 has quit [Ping timeout: 246 seconds]
<FromGitter> <rishavs> got it working! thanks for all the help.
DTZUZO has quit [Ping timeout: 244 seconds]
wontruefree has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 244 seconds]
wontruefree has quit [Quit: bye]
wontruefree has joined #crystal-lang
ua has joined #crystal-lang
ua has quit [Ping timeout: 272 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 246 seconds]
DTZUZO has joined #crystal-lang
<FromGitter> <cfsamson> Hello guys. Does anyone have any good idea of how to work with data from a MS SQL Server? As far as I know there's no driver yet for Crystal, thought about replicating the data to a postgres db, but looking for alternate ideas.
<FromGitter> <vladfaust> Writing a driver for MS SQL Server, kek
<FromGitter> <cfsamson> lol, ok, let's call that plan Z for now :)
<FromGitter> <cfsamson> @vladfaust or are you writing a driver? Maybe I misunderstood.
<FromGitter> <vladfaust> No, I'm not :)
<FromGitter> <vladfaust> That's fairly easy, though. Sockets + DB specs
DTZUZO has quit [Ping timeout: 272 seconds]
<FromGitter> <cfsamson> Ok, I've never done it before, I'm working on an excel shard so I'd better finish that first. Still writing a driver is not exactly a "quick fix" lol :)
DTZUZO has joined #crystal-lang
<FromGitter> <fridgerator> @cfsamson I just saw this, this morning : https://github.com/sourgrasses/crystal-mssql
<FromGitter> <fridgerator> I've never used it, so I cant speak to how well it works
<FromGitter> <fridgerator> From the readme, it sounds like its still pretty early in development
<FromGitter> <cfsamson> @fridgerator wow, thats cool! Looks early yes, but I'm not doing anything fancy so it might work.
DTZUZO has quit [Ping timeout: 240 seconds]
DTZUZO has joined #crystal-lang
DTZUZO_ has joined #crystal-lang
DTZUZO has quit [Ping timeout: 240 seconds]
DTZUZO_ has quit [Ping timeout: 244 seconds]