<FromGitter>
<fridgerator> I think if the community gets bigger, they willl have to change something
<raz>
yep, it's not a big deal anyway. just a tiny pebble in my shoe. i agree so much with where crystal is headed, all their choices and prios seem to be spot on. but gitter for chat? maybe i'm getting old... ;)
<FromGitter>
<fridgerator> what brought you to crystal?
<FromGitter>
<proyb6> Is it a good idea if we could hardcode module with versioning to know which API came from which modules? ⏎ ⏎ 1) A bit verbose namespace help coders to identify accurately than assuming the API came from other modules or core libraries (Ruby vs RoR api) ⏎ 2) Test both old and new modules to ensure it generate exact results ⏎ 3) We could quickly upgrade our existing code without breaking the old API ...
<raz>
fridgerator don't remember how i initially discovered crystal, but it immediately stuck. apart from the basic premise ('high speed ruby') crystal gets so many auxiliary things right, it's pure bliss. e.g. in this day and age it should be a no-brainer that having a solid packaging system (shards) is essential. but as we all now, many other languages still haven't gotten the memo...
<raz>
i also love how the compiler spits out tutorials instead of error messages. i don't think i have seen a compiler be _this_ helpful before (most don't even try)
<FromGitter>
<proyb6> In an analogy, I could change/add many small parts rather than change the large parts of the machine
return0xe has joined #crystal-lang
return0e has quit [Ping timeout: 252 seconds]
<FromGitter>
<fusillicode_twitter> > @FromIRC ⏎ *<raz>* fridgerator don't remember how i initially discovered crystal, but it immediately stuck. apart from the basic premise ('high speed ruby') crystal gets so many auxiliary things right, it's pure bliss. e.g. in this day and age it should be a no-brainer that having a solid packaging system (shards) is essential. but as we all now, many other languages still haven't gotten the
<FromGitter>
... memo... ⏎ *<raz>* i also love how the compiler spits out tutorials instead of error messages. i don't think i have seen a compiler be *this* helpful before (most don't even try) ⏎ ⏎ True stories...the 2nd part in particular...ಠ_ಠ Scala [https://gitter.im/crystal-lang/crystal?at=5bc19d4a271506518d042db8]
<FromGitter>
<fusillicode_twitter> thanks @FromIRC I got it...
<FromGitter>
<aboeglin> @vladfaust what's the app about ?
raz has left #crystal-lang ["*fump*"]
rohitpaulk has joined #crystal-lang
return0xe has quit [Remote host closed the connection]
<FromGitter>
<ljuti> I have a `Array(Int32 | Nil)` and I want to compare the elements when they’re both `Int32`. Doing `a[index] <=> b[index]` doesn’t work because Int32 doesn’t have ‘<=>(Int32 | Nil)` method. How do I avoid polluting the Int32 class?
<FromGitter>
<fusillicode_twitter> Wrap it 🤔
<FromGitter>
<fusillicode_twitter> I mean with a new custom type :)
<FromGitter>
<ljuti> I’m very tempted to just do .to_s.to_i :)
<FromGitter>
<chussenot> `Array(Int32?)` ?
<FromGitter>
<fusillicode_twitter> > I’m very tempted to just do `.to_s.to_i` :) ⏎ ⏎ well...I'll be tempted too XD
<FromGitter>
<j8r> @ljuti if there is a Nil, there is a reason why – handle it
<FromGitter>
<ljuti> @j8r I’m handling it beforehand, but then I want to know which one of them integers is bigger
<FromGitter>
<fusillicode_twitter> > @ljuti if there is a Nil, there is a reason why – handle it ⏎ ⏎ wise words :)
<FromGitter>
<ljuti> Once I know both of them are integers
<FromGitter>
<kingsleyh> do I need to install some library?
<FromGitter>
<girng> did you compile with --static?
<FromGitter>
<asterite> Ugh, writing Go gets the job done but it's so painful. Every time has me writing lots of boilerplate code. And when parsing JSON... there's no way to have required fields, everything is optional. wtf?
Yxhuvud has joined #crystal-lang
jhass has quit [Ping timeout: 252 seconds]
jhass has joined #crystal-lang
<FromGitter>
<S-YOU> protobuf3 is like that too
<FromGitter>
<S-YOU> I am also doing Go(/gRPC) at work recently
<FromGitter>
<S-YOU> And I gave up DRY
<FromGitter>
<fusillicode_twitter> I just want to share my brief experience with HTTP clients in Crystal land :) ⏎ ⏎ 1) stdlib HTTP::Client: rich of features but still pretty bare bones. As should it be! ;) ⏎ 2) Halite: a beast...tons of features but didn't found a way to properly construct an "independent" request object, execute it and get back a response object. Moreover I may have found a bug pertaining the JSON
<FromGitter>
<fusillicode_twitter> Btw all the shards are pretty well written and I really loved to deep dive in their sources!
<FromGitter>
<j8r> @fusillicode_twitter thanks for the detailed feed-back!
<FromGitter>
<fusillicode_twitter> @j8r @chussenot thanks you guys for all your support in this channel! 🤗 ⏎ Btw I feel that the feedback could have been much more detailed but unfortunately I'm still a noob with Crystal and in the end didn't had so much time to play around with the mentioned shards 😅
<FromGitter>
<chussenot> a sharing `Crest` ;)
<FromGitter>
<fusillicode_twitter> I still hope that it may helps :)
<FromGitter>
<chussenot> cool shard
<FromGitter>
<j8r> sadly Crest has a bit too Rubyism for me
<FromGitter>
<fusillicode_twitter> I think I may also be biased by that XD
<livcd>
asterite: yeah writing go is not a thrilling experience
<livcd>
just make Crystal usable for the rest of us :33
<FromGitter>
<aboeglin> Well, the 0 are in a String already no ? In the float world it comes down to precision, but the 0 aren't coded. 1.45 will always have the same binary representation.
<FromGitter>
<aboeglin> So here, whetever you do, if you want to hold 1.45, you won't change the bytes. So it's about how you represent it on a String from my understanding.
<FromGitter>
<fenicks> With precision, If the number is 1.45600 I want 1.456 and not 1.46. The best way is probably to use the string representation. Ok.
<FromGitter>
<fenicks> @Blacksmoke16 round or trunc remove the decimal part
<FromGitter>
<Blacksmoke16> pretty fancy if i say so myself ;P
<FromGitter>
<girng> no idea but i starred it
ashirase has joined #crystal-lang
<FromGitter>
<Blacksmoke16> main benefits of it are like if you are building/working with JSON apis
<FromGitter>
<girng> interesting, yeah anything to make json easier for dev i like
<FromGitter>
<Blacksmoke16> esp helps with JSON api in crystal and like some frontend js framework, so you can easily validate the json data coming to crystal api while also deserializing it into an obj
<FromGitter>
<Blacksmoke16> can also catch the exception and call `to_json` on it and it'll return json string like `{"code": 400, "message":"Validation tests failed", "errors': ["`username` should not be blank", "The size of `password` should be between 8 and 25"]}`
<FromGitter>
<fridgerator> @Blacksmoke16 nice, I like it
<FromGitter>
<Blacksmoke16> thanks :)
ashirase has quit [Ping timeout: 252 seconds]
<FromGitter>
<Blacksmoke16> got everything tested fairly well, but any issues feel free to make one
<FromGitter>
<Blacksmoke16> still some docs to do and such but core is there