ChanServ changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
<FromGitter> <Blacksmoke16> why does `HTTP::Cookie.new` raise an `IO::Error` if the name/value is invalid? i would have thought that should be `ArgumentError` no?
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #crystal-lang
andremedeiros has quit [Read error: Connection reset by peer]
andremedeiros has joined #crystal-lang
m_antis has joined #crystal-lang
m_antis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
postmodern has joined #crystal-lang
<FromGitter> <grkek> Yrah
<postmodern> wow wait, how does `foo.@bar` work? Are you supposed to be able to access the ivars within objects from outside?
skrzyp has quit [Ping timeout: 250 seconds]
postmodern has quit [Quit: Leaving]
_ht has joined #crystal-lang
ua has quit [Ping timeout: 252 seconds]
ua has joined #crystal-lang
sagax has quit [Remote host closed the connection]
<yxhuvud> yes though I'd recommend only (ab)using it for debugging purposes.
<FromGitter> <Daniel-Worrall> You can do similar things in ruby too
<FromGitter> <erdnaxeli:cervoi.se> ahah, ivar are actually public, yep :p
<FromGitter> <erdnaxeli:cervoi.se> but you should never use them directly
hendursa1 has joined #crystal-lang
hendursaga has quit [Ping timeout: 240 seconds]
alexherbo2 has joined #crystal-lang
Vexatos has quit [Quit: ZNC Quit]
Vexatos has joined #crystal-lang
<FromGitter> <confact> Does it exist some way to go a bit deeper on the JSON::Field keys? Like: @[JSON::Field(key: ["first"]["second"])] ? Want to reduce complexity with a lot of classes.
<FromGitter> <erdnaxeli:cervoi.se> not possible with the stdlib
<FromGitter> <confact> Anyway to solve it in a different way? =/
<FromGitter> <erdnaxeli:cervoi.se> I would write an object which represent exactly the model you receive, then I would add it a method to transform it to your less-complex model
<FromGitter> <confact> Yea, that was what I was thinking but was hoping to be able to avoid that ^^ Oh well, hopefully that will be supported later.
<FromGitter> <erdnaxeli:cervoi.se> something like that: https://carc.in/#/r/axrg
<FromGitter> <Blacksmoke16> might be a bit overkill, but athena's serializer has https://athenaframework.org/Serializer/Annotations/Accessor/#Athena::Serializer::Annotations::Accessor--path
<FromGitter> <confact> @Blacksmoke16 Why do everything that solves my issues have you as author? <3
<FromGitter> <Blacksmoke16> :P
<FromGitter> <erdnaxeli:cervoi.se> nice
<FromGitter> <confact> @Blacksmoke16 a bit off topic from this chat, but how can I convert unix timestamps to Time with your amazing serializer?
<FromGitter> <Blacksmoke16> prob use a converter
<FromGitter> <confact> @Blacksmoke16 does it already exists one or can you link to a example/tutorial?
<FromGitter> <Blacksmoke16> theres an example above the path one. prob be something like: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=607edd7946a93d4a19da5e06]
<FromGitter> <confact> Worked! Thanks @Blacksmoke16 - really appreciate it! I could remove 3 structs thanks to your serializer.
<FromGitter> <Blacksmoke16> 👍 np good to hear :)
m_antis has joined #crystal-lang
djuber has joined #crystal-lang
m_antis has quit [Read error: Connection reset by peer]
m_antis has joined #crystal-lang
m_antis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <oprypin:matrix.org> hm wow, i only now realize that https://crystal-lang.org/api/1.0.0/index.json is a 10 MB download.
<straight-shoota> yeah, it's huge
<straight-shoota> totall not optimized
<yxhuvud> What is it used for?
<straight-shoota> search
<straight-shoota> on-site search in the sidebar
<FromGitter> <oprypin:matrix.org> i was going to start using it to get a list of what's available on the site for the purpose of linking across different doc sites
<FromGitter> <oprypin:matrix.org> i can see that caching works well on that file, but hard to figure out whether gzip is applied
postmodern has joined #crystal-lang
m_antis has joined #crystal-lang
<FromGitter> <oprypin:matrix.org> ok, gzip is definitely not applied
<straight-shoota> nope
<FromGitter> <oprypin:matrix.org> > Potential Savings: 90.9%
m_antis has quit [Quit: Textual IRC Client: www.textualapp.com]
<FromGitter> <oprypin:matrix.org> straight-shoota, seems like someone could just enable gzip there. who can look into that?
<FromGitter> <oprypin:matrix.org> woopsie. it's a regression of sorts, and i made it happen earlier than it would've by adding more stuff into that file :D :D ⏎ ⏎ `curl -v -H 'Accept-encoding: gzip' https://crystal-lang.org/api/0.35.1/index.json | wc -c` -> gzipped from 9094767 to 853921 ⏎ `curl -v -H 'Accept-encoding: gzip' https://crystal-lang.org/api/0.36.0/index.json | wc -c` -> not gzipped because size is 10345005
<FromGitter> <oprypin:matrix.org> https://ithoughthecamewithyou.com/post/enable-gzip-compression-for-amazon-s3-hosted-website-in-cloudfront ⏎ ⏎ > CloudFront will only compress files between 1,000 and 10,000,000 bytes
<straight-shoota> so we'll have to compress the file manually
<FromGitter> <oprypin:matrix.org> in what sense
<straight-shoota> pipe it through gz before uploading to s3
<oprypin> i dont think that would work
<oprypin> it would return that gibberish without announcing that it's been compressed
<straight-shoota> yeah and set the Content-Encoding header in s3
_ht has quit [Remote host closed the connection]
deavmi has quit [Quit: No Ping reply in 180 seconds.]
deavmi has joined #crystal-lang
ua has quit [Ping timeout: 246 seconds]
ua_ has joined #crystal-lang
<FromGitter> <erdnaxeli:cervoi.se> hi, is it possible with Process to wait for the process to end but still read the error output?
<FromGitter> <erdnaxeli:cervoi.se> I can do the opposite: read the error output until the stream is closed, but it feels weird
<FromGitter> <Blacksmoke16> I think there's a block version of .run that may be helpful
<FromGitter> <oprypin:matrix.org> > I can do the opposite: read the error output until the stream is closed, but it feels weird ⏎ ⏎ it's fine, not weird
<FromGitter> <oprypin:matrix.org> block version of run is indeed helpful
alexherbo2 has quit [Ping timeout: 260 seconds]
andremedeiros has quit [Read error: Connection reset by peer]
andremedeiros has joined #crystal-lang
hendursa1 has quit [Remote host closed the connection]
hendursa1 has joined #crystal-lang
hendursa1 has quit [Remote host closed the connection]
hendursa1 has joined #crystal-lang