<FromGitter>
<Timbus> If it's a string zone like 'Luna/Copernecus', you'll have to parse the location out first, then use `Time::Location.load` and pass it as a third argument to `Time.parse`
<FromGitter>
<Timbus> I guess =/
DTZUZO has joined #crystal-lang
tilpner_ has joined #crystal-lang
tilpner has quit [Ping timeout: 264 seconds]
tilpner_ is now known as tilpner
Groogy has quit [Ping timeout: 240 seconds]
Jenz has joined #crystal-lang
<Jenz>
Is something wrong with crystalshards.xyz?
<Jenz>
I just get loads of errors
<Jenz>
Oh there it works again, nvm
alex`` has joined #crystal-lang
<hightower4>
Jenz, you can also always use crystalshards.org
<Jenz>
Oh I didn't know, thanks
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 244 seconds]
Raimondii is now known as Raimondi
Jenz has quit [Ping timeout: 244 seconds]
Jenz has joined #crystal-lang
Jenz has quit [Ping timeout: 240 seconds]
Groogy has joined #crystal-lang
Ven`` has joined #crystal-lang
alex`` has quit [Quit: WeeChat 2.1]
alex`` has joined #crystal-lang
alex`` has quit [Ping timeout: 244 seconds]
alex`` has joined #crystal-lang
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Groogy>
I don't get why it is telling me gui.remove_root window on line 10 that the type can be nil?
<Groogy>
I tried adding the unless gui.nil? but it still says that
<Yxhuvud>
strange. What happens if you cahnge it to `if gui` ?
<Groogy>
same
<Groogy>
I am working around it by just passing a method for it to call
<Groogy>
but yeah this is a very unexpected behaviour
<Groogy>
unless I'm missing something
<Yxhuvud>
right, the if statement in the block shouldn't be necessary as you check it outside
<Groogy>
yepp, and the type shouldn't magically disappear if @gui is set to nil for instance
<Groogy>
and the context shouldn't be collected by the gc as logn as I have a reference so I am a bit puzzled as of why
Ven`` has joined #crystal-lang
<crystal-gh>
[crystal] j8r closed pull request #6423: Create an abstract Any for JSON/YAML (master...any_abstract_struct) https://git.io/fNWXs
<Groogy>
if I have a @type.subclasses in a macro, is there a way to check if one of the subclasses are abstract and skip it?
<Groogy>
just .abstract?
<crystal-gh>
[crystal] ysbaddaden opened pull request #6426: Fix: fork and signal child handlers (master...fix-fork-and-signal-child-handlers) https://git.io/fNlmO
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<crystal-gh>
[crystal] r00ster91 opened pull request #6427: Add :default to colorize and document ColorRGB, Color256 (master...patch-3) https://git.io/fNlm8
<literal>
kind of strange because that spec passes just fine if I do "bin/crystal spec/std/file_spec.cr"
<crystal-gh>
[crystal] Exilor opened pull request #6428: Fix Atomic#swap with reference types (master...master) https://git.io/fNlGp
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Jenz has joined #crystal-lang
Jenz has left #crystal-lang [#crystal-lang]
<crystal-gh>
[crystal] hinrik opened pull request #6429: JSON: Handle non-standard UTF-8 string escapes (master...json_utf8_escapes) https://git.io/fNln0
hightower4 has quit [Ping timeout: 268 seconds]
hightower4 has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 276 seconds]
rohitpaulk has joined #crystal-lang
akaiiro has joined #crystal-lang
<FromGitter>
<bew> Groogy still there?
<Groogy>
yepp
<FromGitter>
<bew> Because the block is captured, the captured variable `gui` gets referenced for this block, and currently the compiler will keep all the types of the var (without current type restriction/simplification) when it's passed to a captured block.
<Groogy>
but the type should not have nil? right? @gui is the one that has nil
<Groogy>
and even if I did test for nil inside the block it didn't work
DTZUZO has quit [Ping timeout: 240 seconds]
<FromGitter>
<bew> @literal that looks weird.. I think the explanation is that some other spec uses a `base` variable, and the compiler thinks that you're trying to use it..
<FromGitter>
<bew> Groogy because you have a reference inside the block to the variable, you have the handle it like an ivar, so assign it to a local var first
<Groogy>
so if I do gui = gui it would work?
<Groogy>
that's... weird
<FromGitter>
<bew> And `if gui = @gui` is basically rewitten as `gui = @gui` and `if gui` so the full type has Nil too, but we never see it in the if
<FromGitter>
<bew> Groogy yeah should work (maybe, with another local var name though), I agree it's weird.. I know there's an open issue to fix this but it's not for now..
<Groogy>
ah okay, it's not by design at least
<Groogy>
I needed the code to be in a method anyway because it needed to be used by other stuff anyway
<Groogy>
so it solved itself
<FromGitter>
<bew> Ahah nice
<FromGitter>
<bew> Not sure now if it's by design or not..
<FromGitter>
<bew> Groogy looks like a bug, it should be supported I think
<FromGitter>
<bew> @rishavs you forgot to call `new` for the hash
<Groogy>
yeah, you are assigning the type to the tree variable
<FromGitter>
<rishavs> @bew thanks, as always
<FromGitter>
<bew> Yw :)
alex`` has quit [Ping timeout: 276 seconds]
alex`` has joined #crystal-lang
Groogy has quit [Ping timeout: 240 seconds]
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 264 seconds]
Raimondii is now known as Raimondi
alex`` has quit [Ping timeout: 240 seconds]
alex`` has joined #crystal-lang
rohitpaulk has joined #crystal-lang
<FromGitter>
<DanilaFe> Hi! I've got a question about C bindings in Crystal. What would be the best way to bind C code that isn't installed system-wide? Say, I have a git submodule with a C library in it, how should I proceed with linking it to Crystal?
<oprypin>
for cross platform: compile a shared library and always add it to LIBRARY_PATH when compiling and LD_LIBRARY_PATH when using
<oprypin>
well my first message is also posix-specific, i guess, but that's just because on Windows you don't need to do this, current directory is in library path
<oprypin>
also windows is not really supported lol
<FromGitter>
<DanilaFe> Not yet, anyway
<FromGitter>
<DanilaFe> hopefully Crystal gets there
rohitpaulk has quit [Ping timeout: 244 seconds]
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 244 seconds]
Raimondii is now known as Raimondi
<FromGitter>
<DanilaFe> hold on, inside lib, i can't create a struct with a lowercase name?
<crystal-gh>
[crystal] asterite opened pull request #6432: Fix: private aliases at top-level not considered private (master...bug/5752-private-alias-top-level) https://git.io/fNlgo