shawn42 has quit [Quit: Connection closed for inactivity]
woodruffw has joined #crystal-lang
woodruffw has quit [Changing host]
woodruffw has joined #crystal-lang
echosystm has left #crystal-lang [#crystal-lang]
ssvb has quit [Quit: Leaving]
woodruffw has quit [Ping timeout: 260 seconds]
woodruffw has joined #crystal-lang
DeBot has quit [Ping timeout: 260 seconds]
CompanionCube has quit [Ping timeout: 250 seconds]
optikfluffel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
CompanionCube has joined #crystal-lang
matp has quit [Remote host closed the connection]
matp has joined #crystal-lang
mgarciaisaia has quit [Quit: Leaving.]
woodruffw has quit [Remote host closed the connection]
<FromGitter>
<maiha_twitter> I'm trying 0.20.0 to my existing lib. It works when both `libs` and `lib` exist after `shards update`. But it fails after removing old `libs`. We need more info about using shards-0.7.0, I think. ⏎ `while requiring "toml": can't find file 'toml' relative to ...`
<FromGitter>
<jwoertink> I got that same error with pool after upgrading to 0.20
<FromGitter>
<jwoertink> I just removed both dirs, and the shards.lock, and then ran `shards install` and it all worked again
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter>
<ysbaddaden> you must upgrade shards to v0.7 too (or use the bundled one)
<FromGitter>
<ysbaddaden> sadly, there is easy way to transform libs to lib, because it's not just a rename, we now extract the whole shard, no just the contents of the src folder.
<FromGitter>
<splattael> @ysbaddaden Reverting `libs:lib` (prefering `lib` over `libs`) in `CRYSTAL_PATH` would work for me
<FromGitter>
<splattael> I'm trying to push a repro
<FromGitter>
<splattael> @ysbaddaden Damn, I cannot reproduce it on a fresh lib :/
<FromGitter>
<splattael> @ysbaddaden it's "broken" on an existing lib where `minitest.cr 0.3.4` was installed with 0.19.4. I've upgraded to `minitest.cr 0.3.5` with 0.20.0 so both `libs` and `lib` exist. Running specs gives an error: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Setting `CRYSTAL_PATH` like `export CRYSTAL_PATH=$CRYSTAL_ROOT/src:lib:libs` (`libs`<-> `lib`) helps. [https://gitter.im/crystal-lang/crystal?at=58357277b07a1fd3482fc5c3]
<FromGitter>
<ysbaddaden> please upgrade to minitest v0.3.5 and *drop* `libs`
<FromGitter>
<splattael> So crystal prefers `lib` instead of `libs`. No need to remove `libs`.
<FromGitter>
<ysbaddaden> it's not supposed to be working anymore
<FromGitter>
<ysbaddaden> it may work by change, but will most likely break in unexpected ways
<FromGitter>
<splattael> @ysbaddaden yes, dropping `libs` is seems strange on CI... but ok I'll do it. Thanks!
optikfluffel has joined #crystal-lang
optikfluffel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter>
<splattael> @ysbaddaden Should be `libs` then removed from `CRYSTAL_PATH`?
<FromGitter>
<ysbaddaden> yes, it was removed in 0.20
<FromGitter>
<ysbaddaden> official builds don't have `libs` anymore in `CRYSTAL_PATH`
<FromGitter>
<splattael> *THAT* was my point. If only adding `lib` was intended then reversing the both would be upgrading.
<FromGitter>
<splattael> *help
optikfluffel has quit [Client Quit]
optikfluffel has joined #crystal-lang
optikfluffel has quit [Client Quit]
optikfluffel has joined #crystal-lang
optikfluffel has quit [Client Quit]
optikfluffel has joined #crystal-lang
optikfluffel has quit [Client Quit]
<FromGitter>
<ysbaddaden> I guess I understand the issue now
<FromGitter>
<splattael> :D text is hard, sorry :/
<FromGitter>
<ysbaddaden> `libs` is taking precedence over `lib`, but upgrading dependencies will install them into `lib` but an older version is being picked.
<FromGitter>
<splattael> :+1:
<FromGitter>
<splattael> So either remove `libs` from path (and .gitignore.ecr too!) and swap `lib` <-> `libs` in path.
<FromGitter>
<ysbaddaden> workaround: get rid of the `libs` folder altogether; solution: get rid of `libs` from the CRYSTAL_PATH definition, or at least have `lib` take precedence in 0.20.x
<FromGitter>
<splattael> yes, removing seems the cleaner solution won't break in unexpected ways as you mentioned.
soveran has quit [Remote host closed the connection]
<FromGitter>
<yxhuvud> Are there any examples of using zlib around? From reading the code, it seems I have to wrap my Slice(uint8) in an IO object of some kind. That seems like more ceremony than I expected.
Philpax has quit [Ping timeout: 260 seconds]
<crystal-gh>
[crystal] asterite pushed 3 new commits to master: https://git.io/v1e4M
<crystal-gh>
crystal/master e0ac47c Ary Borenszweig: Fixed #3567: crystal init generates old version in shard.yml
<crystal-gh>
crystal/master 69c8ee4 Ary Borenszweig: Fixed #3570: formatter bug related to binary op inside block inside assign
<crystal-gh>
crystal/master b8602fb Ary Borenszweig: Fixed #3568: incorrect links for `::T` paths in comments
Fichtenstein has quit [Read error: Connection reset by peer]
<FromGitter>
<asterite> @yxhuvud what do you need to do?
<FromGitter>
<yxhuvud> But I've managed to inflate it, so now I am trying to figure out how to cast a slice of 4 bytes to an integer
<FromGitter>
<asterite> Yeah... I think that's missing. There's a method to decode it from an IO, but not from a slice. I think I'll add methods for that
emancu has joined #crystal-lang
<FromGitter>
<yxhuvud> ok I'll get by with macro convert(type, slice);{{type}}.from_io(MemoryIO.new({{slice}}), IO::ByteFormat::BigEndian); end meanwhile, even if it is a bit horrible ;)
<FromGitter>
<sdogruyol> Nice
<FromGitter>
<asterite> @yxhuvud I managed to write this: https://gist.github.com/asterite/719e478f6f3dfd30a59405897d37dcd7 . It of course depends on decoding directly from a slice, but I'll commit that soon. Decoding is a bit verbose because you need to type the whole byte format, but it can be hidden behind a method or two
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter>
<sdogruyol> @yxhuvud :heart:
<FromGitter>
<sdogruyol> Oops @asterite :heart:
<FromGitter>
<yxhuvud> wow, thanks. That is a lot more than I asked for :)
<crystal-gh>
[crystal] asterite pushed 1 new commit to master: https://git.io/v1egg
<crystal-gh>
crystal/master d7b4bd3 Ary Borenszweig: ByteFormat: added methods to read/write from/to a slice
<FromGitter>
<asterite> Committed! I just wanted to see how easy/hard it was to write that in Crystal, and, well, something was missing...
Ven_ has joined #crystal-lang
emancu has quit []
<crystal-gh>
[crystal] asterite pushed 1 new commit to master: https://git.io/v1e2N
<crystal-gh>
crystal/master c758737 Ary Borenszweig: MemoryIO -> IO::Memory in some doc comments
pduncan has quit [Ping timeout: 240 seconds]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<FromGitter>
<luislavena> @asterite a quick design question if you have a minute. I'm migrating some old code to latest Crystal
<FromGitter>
<luislavena> and wondered if will be good to *extend* `HTTP::Server::Context` with extra elements (eg. session, instrumentation) as part of some of the HTTP handlers
<FromGitter>
<luislavena> so when you require them, they add that extra element to the Context and is available. Does that sound intrusive or would you say will be expected?
pduncan has joined #crystal-lang
ponga has quit []
<FromGitter>
<asterite> @luislavena We actually talked about that with @waj in the past and we like that pattern. It's type safe and efficient. The only "problem" could happen if two extensions use the same name, but it's the same issue with class names, etc., so maybe not a big deal
pduncan has quit [Ping timeout: 258 seconds]
<FromGitter>
<luislavena> :thumbsup:
<FromGitter>
<luislavena> was wondering the scenario when the handler is required for the helper method on the context to work, if not added to the chain, then invoke the helper will blow :tongue:
<FromGitter>
<luislavena> s/blow/blow up
hako_ has quit [Ping timeout: 260 seconds]
hako_ has joined #crystal-lang
<FromGitter>
<luislavena> (that you forgot to add the handler to the chain when building the server, but you invoked the method anyway)
<FromGitter>
<asterite> Ah, yes, but that can be fixed easily, I guess :-)
<FromGitter>
<spalladino> It's just a PoC, but it shows that it should be possible; we are wrapping Crystal objects as Ruby values, and using Ruby's `free` callbacks to have them collected by the Crystal GC.
<FromGitter>
<spalladino> The main thing to look out for are mulithreaded invocations from Ruby
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven_ has joined #crystal-lang
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pduncan has quit [Ping timeout: 256 seconds]
pawnbox has joined #crystal-lang
kulelu88 has joined #crystal-lang
w400z has joined #crystal-lang
mark_66 has quit [Remote host closed the connection]
Raimondi has quit [Remote host closed the connection]
Raimondii has joined #crystal-lang
<FromGitter>
<xdougx> how it works?
optikfluffel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Raimondii is now known as Raimondi
gloscombe has quit [Read error: Connection reset by peer]
<FromGitter>
<phoffer> @spalladino are you guys considering further work on that?
<FromGitter>
<sdogruyol> @luislavena i extensively use that pattern also :)
<FromGitter>
<kbrock> @spalladino thanks so much
mati_urunda has joined #crystal-lang
<FromGitter>
<spalladino> @phoffer eventually yes, Crystal sounds like a much better choice than C for a Ruby developer to write a native extension; but I guess we'll be focusing on parallelism first
gloscombe has quit [Quit: Lost terminal]
<FromGitter>
<sdogruyol> :+1:
<FromGitter>
<spalladino> @kbrock a pleasure! And thank *you* for bringing up to front this usage for Crystal
<FromGitter>
<sdogruyol> Parallelism <3
<FromGitter>
<sdogruyol> @spalladino please don't forget crystal-db it's awesome and needs more love :)
gloscombe has joined #crystal-lang
<FromGitter>
<phoffer> Whenever you get there, would you be open to some collaboration? I’ve done a lot of work for that, but don’t enough low level knowledge to get it production worthy
<FromGitter>
<drosehn> I have a few projects where I'd like to try using LLDB from crystal, FWIW. But as always, I can dream up new projects much faster than I can write them.
<FromGitter>
<spalladino> @phoffer absolutely! I've just seen https://github.com/phoffer/crystalized_ruby and it has some truly awesome work. We'll reach out to you as soon as we start tackling this to join our efforts :-)
<FromGitter>
<spalladino> @sdogruyol yep, especially having a "blessed" crystal-db compatible postgresql adapter. I know will was doing some work in that direction, but I'm not sure about the status. @bcardiff was working heavily on crystal-db, though he's off during this week. I'll make sure to coordinate with him to speed things up.
<FromGitter>
<xdougx> it will be able to write ruby and transport to crystal and inverse of?
<FromGitter>
<sdogruyol> @spalladino that'd be awesome, because i've used pg and crystal-db
<FromGitter>
<sdogruyol> and i can say that crystal-db is really great
<FromGitter>
<sdogruyol> we should definitely make this defacto
<FromGitter>
<phoffer> @spalladino That would be amazing. I’ve been hoping somebody smarter than myself would get interested in the concept :) Not everything works yet, but I do have a part of Ruby’s ActiveSupport fully replaced using a Crystal ext, so a non-trivial example
<FromGitter>
<spalladino> That's the idea. It's actually inspired in Go's SQL package https://golang.org/pkg/database/sql/, which defines a standard interface for sql-like libs.
<FromGitter>
<sdogruyol> @spalladino yeah it's really great api
mgarciaisaia has joined #crystal-lang
optikfluffel has joined #crystal-lang
<FromGitter>
<spalladino> @phoffer that's great. I guess the first step would be to define a friendly API to writing these extensions, and then start working on useful extensions to Ruby, such as the ones you've got. We'll stay in touch ;-)
<FromGitter>
<sdogruyol> Yeah it's probably related to io
<FromGitter>
<sdogruyol> :)
<FromGitter>
<raydf> As a side note @sdogruyol, IMHO i believe that the kemal docs should have this excellent routing scheme as an example: https://gist.github.com/cjgajard/b36ffed8070afc53f682b418ebf5476e, For noobs like myself this helped me a lot for a big future project.
<FromGitter>
<sdogruyol> @raydf yeah yesterday I was saying the same that Kemal needs a cookbook for great stuff like this
<FromGitter>
<raydf> :+1:
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
akwiatkowski has joined #crystal-lang
FromGitter has quit [Remote host closed the connection]
BlaXpirit has quit [Quit: Bye]
FromGitter has joined #crystal-lang
BlaXpirit has joined #crystal-lang
mati_urunda has quit [Ping timeout: 260 seconds]
A124 has quit [Remote host closed the connection]
A124 has joined #crystal-lang
<FromGitter>
<raydf> Found my problem
<FromGitter>
<raydf> just for full diclosure i was reading from io in a filter and later read again from the io and there where no more data to get, so an empty string returned and there's no rewind method implemented.
<FromGitter>
<raydf> *disclosure
Philpax has joined #crystal-lang
<FromGitter>
<drosehn> Ugh. Well, to correct a typo in an earlier message of mine: I have a few projects where I'd like to try using *LMDB* from crystal. As seen in https://github.com/LMDB/lmdb
soveran has quit [Remote host closed the connection]