<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>
<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>
<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>
<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 :)