ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.33.0 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
_whitelogger has joined #crystal-lang
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5e6edb769442097b254c0fe4]
<FromGitter> <Blacksmoke16> well thats a start, phew
<FromGitter> <Blacksmoke16> (fixed root/validator values)
_whitelogger has joined #crystal-lang
dostoyevsky has quit [Ping timeout: 268 seconds]
dostoyevsky has joined #crystal-lang
dostoyevsky has quit [Ping timeout: 256 seconds]
<FromGitter> <smalls12> thanks again @stronny I was able to move to a new design where I move the C data structure into a crystallized structure ⏎ I actually like it better, even with the additional layer(s)
<FromGitter> <stronny> hey, glad to help!
<FromGitter> <smalls12> found bugs in the process with the C data structs anyways lol
ur5us has quit [Ping timeout: 246 seconds]
_whitelogger has joined #crystal-lang
dostoyevsky has joined #crystal-lang
_ht has joined #crystal-lang
_whitelogger has joined #crystal-lang
alexherbo2 has joined #crystal-lang
tdog has joined #crystal-lang
ur5us has joined #crystal-lang
<FromGitter> <grkek> Took the default JSON mapping macro and turned it into a thing, it might be useful for model serialization with fields which are supposed to be hidden
_ht has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 246 seconds]
_ht has joined #crystal-lang
repo1 is now known as repo
alexherbo2 has quit [Read error: Connection reset by peer]
alexherbo2 has joined #crystal-lang
alexherbo2 has quit [Quit: The Lounge - https://thelounge.chat]
alexherbo2 has joined #crystal-lang
<FromGitter> <stronny> should Crystal add generic overloads? basically what I need is (absurd example): ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5e6f6e64f55af7524418bb45]
<FromGitter> <stronny> Currently I can do the same with either overloading on a type passed to a method, or polluting global namespace with my method
<FromGitter> <stronny> both seem uncomfortable
<FromGitter> <j8r> a macro can also be used
<FromGitter> <j8r> it is done on the stdlib
<FromGitter> <stronny> macro isn't extendable
<FromGitter> <j8r> you can also use `T.is_a? String` inside the method
<FromGitter> <j8r> Why using generics, if the class isn't?
<FromGitter> <j8r> A given class can be created for String, then `include Generic(String)` inside it
<FromGitter> <stronny> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5e6f718f2e5bb1702b50f491]
<FromGitter> <konovod> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5e6f7282034f6b7b24e64d78]
<FromGitter> <konovod> https://carc.in/#/r/8q4o
<FromGitter> <konovod> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5e6f731df55af7524418d3ac]
<FromGitter> <j8r> yep, macros
<FromGitter> <j8r> @stronny then `if (value = @value).is_a? String`
<FromGitter> <stronny> there is no @value yet
<FromGitter> <stronny> `{% if %}` didn't work for me yesterday hmmm
<FromGitter> <Blacksmoke16> has to be inside a method
<FromGitter> <stronny> yes yes
<FromGitter> <Blacksmoke16> otherwise `T` doesnt exist
<FromGitter> <stronny> hm, interesting, so if @value is outside it works, but
<FromGitter> <stronny> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5e6f74698245036ed2572e4b]
<FromGitter> <Blacksmoke16> do like
<FromGitter> <j8r> @stronny or you can use `as T`
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5e6f749cde52695245d99169]
MasterdonX has quit [Ping timeout: 268 seconds]
<FromGitter> <stronny> right
<FromGitter> <stronny> either way it isn't really extendable
<FromGitter> <stronny> if later I would need to do another special case there is no easy way to extend the macro method
<FromGitter> <Blacksmoke16> prob would be a way with that macro PR
MasterdonX has joined #crystal-lang
<FromGitter> <j8r> @stronny ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5e6f75dcc5c6b744e216f796]
<FromGitter> <stronny> so now I would like to also do `when Enum.class then t.parse s` without editing existing files
<FromGitter> <j8r> it must be written somewhere, don't get it
<FromGitter> <j8r> or use a block
<FromGitter> <stronny> with generics specializations I would just add another class like `Gen(T : Enum)`
<FromGitter> <j8r> here you'll have to create a method, instead of a class - sounds similar
<FromGitter> <j8r> the downside is the use of `T.class` with `forall T`
<FromGitter> <j8r> quite agree, it's meh
<FromGitter> <j8r> Sorry, no need the forall here
<FromGitter> <Blacksmoke16> cant you just overload `#initialize`?
<FromGitter> <j8r> no, `s` is always a string
<FromGitter> <Blacksmoke16> ah right
<FromGitter> <j8r> Another option: https://carc.in/#/r/8q4q
<FromGitter> <stronny> I was able to come up with this https://play.crystal-lang.org/#/r/8q4r
<FromGitter> <stronny> but it looks hacky
<FromGitter> <j8r> It's ok, IMO
<FromGitter> <j8r> I have seen far worse.
<FromGitter> <stronny> I'm just never sure overloading would work as expected
<FromGitter> <stronny> maybe it's unfair but I'm cautions around complex cases
travis-ci has joined #crystal-lang
<travis-ci> crystal-lang/crystal#6be2a4e (master - Rename YAML::Builder.new to YAML::Builder.build (#8896)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/663093189
travis-ci has left #crystal-lang [#crystal-lang]
<DeBot> https://github.com/crystal-lang/crystal/pull/8896 (Rename YAML::Builder.new with block to YAML::Builder.build)
<FromGitter> <stronny> is there a good syntax file for `micro` editor?
<FromGitter> <watzon> Doesn't seem like it
<FromGitter> <stronny> maybe gonna try converting existing syntaxes for other ides later then
<FromGitter> <watzon> It looks like there is Crystal syntax highlighting https://github.com/zyedidia/highlight/blob/master/syntax_files/crystal.yaml
<FromGitter> <stronny> it's very basic
sagax has quit [Ping timeout: 255 seconds]
alexherbo25 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 256 seconds]
alexherbo25 is now known as alexherbo2
<FromGitter> <oz> Could we add back the "matrixbot" user to Gitter, to bridge back Matrix.org's room here? 🙏
alexherbo21 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 246 seconds]
alexherbo21 is now known as alexherbo2
wmoxam has quit [*.net *.split]
wmoxam has joined #crystal-lang
<oprypin> oz, matrix has direct IRC support
<oprypin> people should be using this irc channel not a new matrix room
<FromGitter> <watzon> Matrix does have a bit better support for things like code blocks and images than IRC does
<FromGitter> <oz> True: both exist on Matrix.org, but people get kicked from the "irc bridge" room.
DTZUZU has quit [Ping timeout: 265 seconds]
<FromGitter> <oz> The Gitter-bridge room seems healthier.
<FromGitter> <oz> These days, matrix.org has support for both IRC and Gitter, btw. Even if both are beta/alpha quality, it tends to just work in practice.
DTZUZU has joined #crystal-lang
alexherbo23 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 265 seconds]
alexherbo23 is now known as alexherbo2
alexherbo23 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 250 seconds]
alexherbo23 is now known as alexherbo2
alexherbo20 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 246 seconds]
alexherbo20 is now known as alexherbo2
tdog has quit [Ping timeout: 256 seconds]
ur5us has joined #crystal-lang
sagax has joined #crystal-lang
travis-ci has joined #crystal-lang
<travis-ci> crystal-lang/crystal#5cf185d (master - Fix File.dirname with unicode chars (#8911)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/663244165
travis-ci has left #crystal-lang [#crystal-lang]
<DeBot> https://github.com/crystal-lang/crystal/pull/8911 (Fix File.dirname with unicode chars)
_ht has quit [Quit: _ht]
alexherbo2 has quit [Ping timeout: 264 seconds]
ua has quit [Ping timeout: 258 seconds]