<FromGitter>
<woodgear> hi, everybody. i just write a tiny tool use crystal,which will call xdotool according a json config,if you feel interesting check it out xdotool-ext (https://github.com/woodgear/xdotool-ext)
<FromGitter>
<woodgear> cool,thanks again.
<FromGitter>
<erdnaxeli:cervoi.se> nice
<FromGitter>
<erdnaxeli:cervoi.se> with JSON::Serializable when the field name and the attribute name are the same, the JSON::Field annotation is not necessary
Xeago has joined #crystal-lang
Xeago has quit [Client Quit]
Xeago has joined #crystal-lang
Xeago has quit [Quit: Xeago]
Xeago has joined #crystal-lang
HumanG33k has quit [Quit: Leaving]
<FromGitter>
<linkyndy> Hey! 👋 I've tried rebuilding my Docker image and it failed: `Outdated shard.lock (radix requirements changed). Please run shards update instead.` ⏎ ⏎ I did not change anything for some time, so I'm wondering what's the issue. I believe `shard.lock` should dictate what should be installed, however `shards install` outputs `Installing kemal (1.0.0)` whereas my lockfile states `version: 0.26.1` 🤔 What
<straight-shoota>
Crystal 0.32.1 ships with an equally old shards release that might have issues with more recent configs.
<straight-shoota>
This is hard to figure out for such old versions. At this point it would be very recommended to update to Crystal 1.0
DTZUZU has quit [Read error: Connection reset by peer]
DTZUZU has joined #crystal-lang
postmodern has quit [Remote host closed the connection]
deavmi has quit [Ping timeout: 240 seconds]
<FromGitter>
<linkyndy> I see. But since the configs didn't change at all, wouldn't it make sense for the lockfile dependencies to be satisfied? It feels like they are ignored when running `shard install`
<straight-shoota>
Technically, yes
<straight-shoota>
But this is shards 0.8.1, which was released 3 years ago. A lot has changed since then. No idea what, but it's not a huge surprise
deavmi has joined #crystal-lang
<FromGitter>
<linkyndy> I understand. I will look into upgrading this, then. Thank you
<FromGitter>
<roduquen> Hi everyone, I am a bit stuck and dont find a solution to migrate from bintray.. Can anyone help, I use travis and Docker
<FromGitter>
<Blacksmoke16> are you using it for anymore more than just running specs?
vasanth has joined #crystal-lang
vasanth has quit [Ping timeout: 260 seconds]
<FromGitter>
<roduquen> In travis no, but in my dockers it s for running shards and the crystal install
<FromGitter>
<Blacksmoke16> docker images should be up to date to handle it. what exactly is the problem you're having?
<frojnd>
I am gonna parse json file to strings and insert the into db. I see sqlite3 actually supports json: https://www.sqlite.org/json1.html
<frojnd>
On a long run this will be better to modify specific json objects
<FromGitter>
<roduquen> I use the docker from bintray
<FromGitter>
<roduquen> Directly bintray dockers
<FromGitter>
<Blacksmoke16> was that a thing? i thought all docker images were on dockerhub
<FromGitter>
<riffraff169> just out of curiosity, say you were trying to create your own linux build, that there were no crystal packages for, how would you go about building crystal for it? you have llvm
<FromGitter>
<riffraff169> i know, not likely, but just say
<straight-shoota>
you just grab the generic linux tarball
<straight-shoota>
it has a statically linked binary that runs on any linux system
<straight-shoota>
don't even need llvm to build anything
<FromGitter>
<riffraff169> and go from there, ok......
<FromGitter>
<riffraff169> what process do you guys go through to build on a new system that doesnt currently have support, but it does have a c compiler....or is that way to complex to describe here
<straight-shoota>
cross-compiling
<straight-shoota>
so you start from a supported system, build the compiler with `--cross-compile --target=$TARGET_ARCH` and link it on the target system
<FromGitter>
<riffraff169> ok
<FromGitter>
<riffraff169> just out of curiosity, at what verion did it get self-compiled?
<FromGitter>
<erdnaxeli:cervoi.se> hmm, there is a commit "removed all ruby code" from 29/10/2013
<FromGitter>
<erdnaxeli:cervoi.se> but I can't find the version
<FromGitter>
<erdnaxeli:cervoi.se> I think it was 0.1.0
<FromGitter>
<erdnaxeli:cervoi.se> the only version before (on github) is named just "ruby"
<straight-shoota>
so you could start with the ruby implementation, wait a couple of hours and should get a revent Crystal compiler build
<FromGitter>
<riffraff169> cool....im interested in language design...ive created several languages over the past 20 years, but never got to the point of it self-hosting
<FromGitter>
<erdnaxeli:cervoi.se> oooh this boostrap script is amazing
vasanth has joined #crystal-lang
vasanth has quit [Ping timeout: 246 seconds]
vasanth has joined #crystal-lang
vasanth has quit [Ping timeout: 240 seconds]
vasanth has joined #crystal-lang
vasanth has quit [Ping timeout: 240 seconds]
hendursaga has quit [Remote host closed the connection]
hendursaga has joined #crystal-lang
<FromGitter>
<spaceaardvark> just wanted to drop in a give a big high five to the crystal team. you have combined 1) approachability 2) static typing 3) compilation/speed 4) simplicity better than any other language out there
<straight-shoota>
thanks =) Working hard to get even better.
<FromGitter>
<spaceaardvark> straight-shoota do you have a roadmap? i couldn't find one. or is the roadmap "everything, quit asking" :)
<straight-shoota>
there, is but it's a bit hidden and not super specific on anything
<FromGitter>
<RespiteSage> > A Value is passed by value: when you pass it to methods, return it from methods or assign it to variables, a copy of the value is actually passed. This is not important for nil, bools, integers, floats, symbols, pointers and tuples, because they are immutable, but with a mutable Struct or with a StaticArray you have to be careful.
<postmodern>
ah ha
<postmodern>
can you call `delegate each, to: @...` twice on multiple ivars, such that the method signatures have different block types based on what type the @ivar contains?
<postmodern>
`delegate each, to: @chars` followed by `delegate each, to: @bytes`. Or would the second delegate override the first one?
<FromGitter>
<RespiteSage> I have no clue about that one.
<FromGitter>
<Blacksmoke16> easy enough to just try it
<postmodern>
to test.cr we go
<postmodern>
actually, how does one specify the type of the yield argument you want in return?
<FromGitter>
<Blacksmoke16> `& : String -> Int32`
<FromGitter>
<Blacksmoke16> yields a string and returns an int32
<postmodern>
what if you had to overloaded methods with different block type definitions, how would the caller request "i want to call the method that yields an Int32 not a Char"?
<postmodern>
`do |i : Int32|` doesn't seem to work
<FromGitter>
<Blacksmoke16> idt thats a thing?
<straight-shoota>
block arguments can't be overloaded
<postmodern>
ah thought as much
oddp has joined #crystal-lang
<FromGitter>
<Blacksmoke16> would be nice if the exception backtrace had the option of being an array of like `Exception::Frame`
<FromGitter>
<Blacksmoke16> E.g. https://github.com/Sija/backtracer.cr, but in the stdlib. Is a cool lib but debating if its worth the extra dependency just for 1 context
<FromGitter>
<Blacksmoke16> esp since in the stdlib i imagine it has that data on hand versus needing to parse it from the line