return0e has quit [Remote host closed the connection]
<FromGitter>
<fridgerator> crystal tshirts!! <3
<FromGitter>
<fridgerator> ..... and the check out is broken
<FromGitter>
<nickbclifford> can anyone familiar with JSON::PullParser help me out here? there's hardly any documentation and I can't for the life of my figure out why this is erroring https://carc.in/#/r/4rek
akaiiro has quit [Remote host closed the connection]
<FromGitter>
<bew> @nickbclifford in you case the simplest thing you can do is to use a tmp object like this: https://carc.in/#/r/4ren
<FromGitter>
<vladfaust> `(-∞..∞)` works too. That's beautiful
<FromGitter>
<bararchy> why not just `alias` ?
<FromGitter>
<vladfaust> Alias doesn't work expecting constant. That's a minor issue for me though because sometimes there are situations when I'd like to use UTF-8 symbols as constants, but Crystal doesn't allow to. E.g. `π = Math::PI` to beautifully use in formulas.
<RX14>
elorest hasnt had any activity on github since june, eliasjpr hasn't had any activity on amber since july 5th, etc
<FromGitter>
<rishavs> that would suck. I love Amber. :(
<FromGitter>
<rishavs> @faustinoaq has merge privileges and he is active on Github
hightower3 has joined #crystal-lang
<hightower3>
Hey, I have a getter for which I get: "instance variable '@path' of Fluence::Accessible was not initialized directly in all of the 'initialize' methods, rendering it nilable. Indirect initialization is not supported.". The line it is pointing me to is the line of the getter ("getter path : String") so I have no clue where the initialize() that I need to fix is.
<hightower3>
Any hints how to find that out?
<RX14>
you have to look at your code
<RX14>
unfortunatelt
<RX14>
unfortunately
<hightower3>
yeah, (unfortunately I have only one initialize(), and in it I do have an explicit @path = ... so really not sure what/where else to look...)
<hightower3>
the other initialize I suppose is coming from the objects YAML.mapping, but @path is defined as not-nil there
scott_tams has joined #crystal-lang
<RX14>
can I see the code?
<FromGitter>
<fridgerator> @yxhuvud But I can't check out, I just get an error
<FromGitter>
<j8r> How can I have utime and ctime of a file? I can use `File.utime` to set `atime` and `mtime`, but there is no longer File.stat
<hightower3>
RX14, there are a bunch of changes there which most likely don't compile because I was in the middle of larger changes, but the first error that pops up when you try to run src/fluence.cr is the one I mentioned
<RX14>
whats the type called
<RX14>
oh, nvm i see
<RX14>
hightower3, there's a mix of spaces and tabs everywhere in your code
<RX14>
please consider using crystal tool format --check as part of CI
<hightower3>
RX14, yeah, I use an editor which sets tabs to 2 spaces so it looks the same. (Personally I prefer tabs, but that's not where the general trend is going)
<RX14>
if you used tabs everywhere that'd be understandable but thats not what's happened :P
<hightower3>
Sure :) part of the code was inherited from another project, and I was delaying the unification until larger problems are solved :)
<RX14>
so Accessible is an abstract struct right?
<hightower3>
yes
<RX14>
so you basically have to look at all the inheritors and their constructoirs
<RX14>
what classes inherit it?
<hightower3>
yes, there is only one -- src/fluence/lib/page.cr
<hightower3>
oh wait, maybe another file is getting require-d due to a wildcard somewhere, let me check
<hightower3>
(hm, no)
<RX14>
well everything was getting required
<RX14>
but i removed Media and it didnt fix it
<hightower3>
yes, that's what I meant. I also noticed that the function used there (@path = Page.name_to_directory ...) doesn't exist, but also if you directly say @path = "test" the error still shows up
<hightower3>
ouch, ok great, thanks much for looking into it
<hightower3>
it definitely seems to me it should be "corrected"
<RX14>
you basically need to define an initialize in the abstract baseclass
<RX14>
and then have the initialize in the lower class call it with the appropriate values
<RX14>
which is just needlessly more verbose
<RX14>
it seems to work with YAML.mapping though
<hightower3>
RX14, hm, I tried following asterite's suggestion (the part where he said "Basically, write the code like this:"), but still the same error. (I've pushed it to the same branch)
<hightower3>
I've modified your carc paste and it seems to work, though
<RX14>
try not initializing 'toc and @intlinks before calling super
<RX14>
like assign them all to lcal vars
<RX14>
call super
<RX14>
than @toc = toc
<hightower3>
same thing (I thought this could be an issue so I just commented that whole block)
<RX14>
fuck
<RX14>
comment out the yaml stuff?
<RX14>
just the YAML mapping
<RX14>
just to see
<hightower3>
For now I commented the whole initialize and just put there: path, name, url, title = "1", "2", "3", "4"; super(path, name, url, title) ... Will try to remove the @slug now and then remove the YAML stuff
<hightower3>
RX14, yeah, without YAML.mapping() it works
<RX14>
fuck
<RX14>
the only thing I can think of is creating a new type with the YAML mapping
<RX14>
forwarding from_yaml to that type
<RX14>
then taking the values from that type and copying them to the new type
<RX14>
using a private constructor for every field
<RX14>
if you understand what i'm saying?
<hightower3>
sure, seems it could work. Ok I'll update that github issue with our findings and then change the code
<hightower3>
gonna check what's in them in more detail now
<RX14>
the compiler will commonly just give up if you mix too much abstract classes/modules/generics
<hightower3>
I thought the issue is that I reopen "struct Page < Accessible" in both of those includes. But even if I change their contents to "module Fluence::Page::InternalLinks; end" , it still fails if the includes are there.
<hightower3>
RX14, hehe yeah, was just working on doing that and updating the comment
<RX14>
thanks for the reproducible code, you should report that
<hightower3>
I did to that ticket. Do you judge it requires a separate issue, or a comment to that existing issue is related/relevant?
<RX14>
hmm
<FromGitter>
<j8r> I've also encounter this type of problem, ivars' type wasn't recognized when inheriting from an abstract, but I haven't be able to isolate it.
<FromGitter>
<j8r> Not sure it's exactly related though. I've workaround ed by using getters
flaviodesousa has joined #crystal-lang
ua has quit [Read error: Connection reset by peer]
ua has joined #crystal-lang
<FromGitter>
<vegai> should StringBuilder not say in its documentation that one should never use that class directly
<RX14>
it should really just be a standard IO interface I guess, just layed out in memory with the string header
<FromGitter>
<diegogub_gitlab> Hello! Is it possible to receive on a closed buffered channel? If the producer does not have more data, how should I notify the receiver?
<FromGitter>
<diegogub_gitlab> At the moment I'm doing :