ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.24.2 | 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
akaiiro has joined #crystal-lang
<FromGitter> <j8r> Yeah that's the syntax of union of types
TCZ has joined #crystal-lang
pabs has quit [Ping timeout: 264 seconds]
pabs has joined #crystal-lang
pabs has quit [Ping timeout: 240 seconds]
pabs has joined #crystal-lang
<FromGitter> <galvertez> anybody ever seen where `Hash#[]?` tricks the compiler to thinking it should be a ternary operator?
<FromGitter> <galvertez> it went away when i added `;` after the `?` just wondering if anyone's ever seen that
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
TCZ has quit [Quit: Leaving]
snsei has quit [Ping timeout: 276 seconds]
pabs has quit [Ping timeout: 245 seconds]
pabs has joined #crystal-lang
akaiiro has quit [Remote host closed the connection]
akaiiro has joined #crystal-lang
return0e has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
return0e has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
return0e_ has joined #crystal-lang
return0e has quit [Ping timeout: 245 seconds]
return0e_ has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
That_Guy_Anon1 has joined #crystal-lang
That_Guy_Anon has quit [Ping timeout: 255 seconds]
<FromGitter> <bew> Huh no, do you have an example?
<FromGitter> <Qwerp-Derp> How can I convert from a `Hash(String, String)` to `Hash(String, Int32 | String)`?
<FromGitter> <Qwerp-Derp> Currently I have this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5b1c99b4ffd8896fe91893de]
<FromGitter> <Qwerp-Derp> Is there an easier way to do this? I can't do `a.as(Hash(String, Int32 | String))`, which is weird
<FromGitter> <Blacksmoke16> probably could declare a as a hash of String, Int32 | String then set your values
<FromGitter> <Blacksmoke16> like ⏎ ⏎ ```a = {} of String => String | Int32 ⏎ a["foo"] = "bar"``` [https://gitter.im/crystal-lang/crystal?at=5b1c9caf0b75bc7d5af91fb0]
<FromGitter> <Blacksmoke16> or if you declare a as a hash with both strings and ints it'll know
<FromGitter> <Qwerp-Derp> The thing is I have a function that interacts with the user, it's cumbersome if the user declares the hash as `{} of String => String | Int32`
<FromGitter> <Blacksmoke16> like ⏎ ⏎ ```a = {"foo" => "bar", "baz" => 3}``` [https://gitter.im/crystal-lang/crystal?at=5b1c9cd9ffd8896fe9189ada]
<FromGitter> <Qwerp-Derp> I need the hash to be declared literally
<FromGitter> <Blacksmoke16> .as might be best bet then
<FromGitter> <Blacksmoke16> if you dont declare the hash with a values of both Int32 and String it wont know that you want anything other than what you give it
<FromGitter> <Blacksmoke16> hmm sec
<FromGitter> <Blacksmoke16> im thinking if you dont declare the type that you want the hash before hand and/or dont provide it all types that will be in the hash (i.e. omitting the Int32 value) you would have to declare it before hand as the type you want
<FromGitter> <faustinoaq> Would be possible to use crystal (LLVM) with GraalVM https://www.graalvm.org/ ?
akaiiro has quit [Ping timeout: 256 seconds]
That_Guy_Anon1 has quit [Quit: Leaving]
akaiiro has joined #crystal-lang
<FromGitter> <fgimian> hey there guys, is there a way that I can avoid calling `add_arguments` in subclasses in this example: https://play.crystal-lang.org/#/r/49bt
<FromGitter> <fgimian> 😄
<FromGitter> <fgimian> also any suggested improvements are absolutely welcome
<FromGitter> <S-YOU> suggestions: NamedTuple.new just works - https://play.crystal-lang.org/#/r/49bu
<FromGitter> <fgimian> oooh good one! thanks
<FromGitter> <fgimian> are you aware of any way that I can automatically generate that method without having to call `add_arguments` on subclasses at all?
<FromGitter> <fgimian> the problem is really timing, the inherited hook runs before the arguments are added
<FromGitter> <bew> With the `inherited` hook you can add a `finished` hook
<FromGitter> <fgimian> I checked out the finished hook, although that seemed to be triggered after all classes were completed just once
<FromGitter> <fgimian> I'll try it again though
<FromGitter> <fgimian> 😄
<FromGitter> <fgimian> thanks heaps guys!!!
<FromGitter> <fgimian> also @S-YOU that is a much nicer solution for NamedTuple, just tested it on my codebase too and it's beautiful
<FromGitter> <S-YOU> Thats right, it should be doable with inhertied, I forgot about that, while I am using on my projects xD
<FromGitter> <fgimian> interesting, I'll definitely play more with it guys
<FromGitter> <fgimian> perhaps what I can do is use finished to then iterate over all the subclasses created
<FromGitter> <fgimian> I'll try it out and post the result shortly
akaiiro has quit [Remote host closed the connection]
<FromGitter> <S-YOU> one more suggestion, instead of using `ARGUMENT_NAMES = [] of String` in inherited, ⏎ you can just use `ARGUMENT_NAMES << {{name.var.stringify}}` in argument I think.
<FromGitter> <S-YOU> doing ` ARGUMENT_NAMES = [] of String` twice is not very correct to me.
<FromGitter> <fgimian> actually, that was a problem for me sadly
<FromGitter> <fgimian> because the inherited class doesn't define its own constant
<FromGitter> <fgimian> so what would happen is all the values would be added to the superclass and everything would break
<FromGitter> <fgimian> this took me a while to figure out too, and I agree it's not so elegant but I'm not aware of a better way atm
<FromGitter> <fgimian> try remove it and you'll see things go pretty bad 😃
<FromGitter> <S-YOU> hmm, really. I see
<FromGitter> <fgimian> yeah, surprised me too
<FromGitter> <fgimian> this happens
<FromGitter> <fgimian> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5b1cb875d7b4f6288cbc8db8]
<FromGitter> <fgimian> because it essentially tries to add the values to the Action::ARGUMENT_NAMES instead of the respective class
<FromGitter> <fgimian> once again though, if we can find a better way, I'd love to know 😄
<FromGitter> <fgimian> the abstract class really doesn't need them, so I could remove those in the Action class definition
<FromGitter> <fgimian> in fact, I will 😄
<FromGitter> <S-YOU> I see. Tried using Hash too?
<FromGitter> <fgimian> actually I didn't tbh
<FromGitter> <fgimian> do you think it could help?
greengriminal has joined #crystal-lang
<FromGitter> <fgimian> would it still be a class constant?
<FromGitter> <S-YOU> Thinking, not sure about your use case.
<FromGitter> <fgimian> nah it's a good idea
<FromGitter> <fgimian> perhaps the key of the hash could be the class name or something like that
<FromGitter> <fgimian> i'll try it soon
<FromGitter> <fgimian> I'm just glad to have something working for now 😆
<FromGitter> <fgimian> do you know a way to make `with <something> yield` optional?
<FromGitter> <fgimian> do I have to pass in `&block` and check if it has content?
<FromGitter> <S-YOU> hee, I never used with yield syntax before
<FromGitter> <fgimian> no worries 😄
<FromGitter> <fgimian> thanks so so much for your time and help
<FromGitter> <S-YOU> btw `argument name : String` can call many times in side inherited class?
<FromGitter> <fgimian> it can call argument multiple times, but the argument must be different
<FromGitter> <fgimian> e.g. you can't have two arguments named `name`
<FromGitter> <fgimian> e.g.
<FromGitter> <fgimian> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5b1cb9e9ddd61d08e54376c2]
<FromGitter> <fgimian> the example I provided was a bit simplified
<FromGitter> <S-YOU> I see. final type of ARGUMENT_NAMES is like Any.
<FromGitter> <fgimian> well actually, the ARGUMENT_NAMES is just a Array(String)
<FromGitter> <fgimian> it only contains the names of each argument
<FromGitter> <fgimian> e.g. in the case above => `["name", "state", "options"]`
<FromGitter> <S-YOU> ah, right. dynamic one was NameTuple
<FromGitter> <fgimian> yeah
<FromGitter> <fgimian> exactly
<FromGitter> <fgimian> 😄
<FromGitter> <fgimian> the namudetuple values can be of many types
<FromGitter> <fgimian> this is why I preferred a namedtuple, it was easier than something else
<FromGitter> <fgimian> I now have the code actually doing stuff
<FromGitter> <fgimian> e.g. you can now call
<FromGitter> <fgimian> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5b1cba7fffd8896fe918d88b]
<FromGitter> <fgimian> and it will install the Python Homebrew package and the Cog music player using Homebrew Cask
<FromGitter> <S-YOU> great
<FromGitter> <fgimian> now just working on more actions 😄
<FromGitter> <fgimian> are you a Mac user?
<FromGitter> <S-YOU> yes
<FromGitter> <fgimian> awesome! 😄
<FromGitter> <S-YOU> xD
<FromGitter> <fgimian> I'll add YAML config soon too, but slowly slowly
<FromGitter> <fgimian> there's so much to do hahaha
<FromGitter> <fgimian> it's coming along nicely though, and I'm really really enjoying Crystal
<FromGitter> <S-YOU> Nice
<FromGitter> <fgimian> 😄
return0e has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
<FromGitter> <S-YOU> not sure what you want, different approach with Hash - https://play.crystal-lang.org/#/r/49dw
<FromGitter> <S-YOU> I guess you still need to create Hash dynamically for non default though.
<FromGitter> <fgimian> yeah
greengriminal has quit [Quit: This computer has gone to sleep]
snsei has joined #crystal-lang
greengriminal has joined #crystal-lang
greengriminal has quit [Client Quit]
snsei has quit [Remote host closed the connection]
baweaver_away is now known as baweaver
Vexatos has quit [Quit: ZNC Quit]
<FromGitter> <Qwerp-Derp> :( Why does casting from `Hash(String, String)` to `Hash(String, Int32 | String)` not work
<FromGitter> <Qwerp-Derp> It works for `Array`...
RX14 has quit [Quit: Fuck this shit, I'm out!]
<FromGitter> <bew> What works for array?
<FromGitter> <Qwerp-Derp> Pretty sure casting from `Array(String)` to `Array(Int32 | String)` works with `as`
<FromGitter> <Qwerp-Derp> nevermind it doesn't
<FromGitter> <Qwerp-Derp> why not, though?
<FromGitter> <bew> It doesn't work because Array(X) and Array(X | Y) does not have the same binary representation
<FromGitter> <bew> So you can't just cast it
<FromGitter> <bew> Either you make a new one and copy the values
RX14 has joined #crystal-lang
RX14 has quit [Excess Flood]
<FromGitter> <Qwerp-Derp> Fair enough
<FromGitter> <bew> Or you make the correct type frol the beginning
<FromGitter> <bew> From*
RX14 has joined #crystal-lang
RX14 has quit [Excess Flood]
Guest1399 has joined #crystal-lang
Guest1399 has quit [Excess Flood]
<FromGitter> <Qwerp-Derp> Why does this work, then? https://carc.in/#/r/49e4
Vexatos has joined #crystal-lang
<FromGitter> <bew> @fgimian note: to debug things in macros, you can use `{% puts something %} `
RX14- has joined #crystal-lang
<FromGitter> <Qwerp-Derp> The Crystal compiler knows that `Array(String)` can be an `Array(Foo)`, but somehow you can't cast it
<FromGitter> <bew> The `: X` in a method signature is a type restriction, not a type assertion
snsei has joined #crystal-lang
<FromGitter> <bew> It restricts the possible types allowed to be passed to the method
<FromGitter> <Qwerp-Derp> I see
<FromGitter> <bew> It's quite different
<FromGitter> <bew> And that's why you can restrict on things that are not representable by themselves, like `Enumerable`
<FromGitter> <fgimian> @bew thanks so much, appreciate the tip 😄
<FromGitter> <bew> You're welcome ;)
snsei has quit [Ping timeout: 260 seconds]
<FromGitter> <fgimian> I just used that in fact and it helped me greatly, so great timing 😄
pabs has quit [Ping timeout: 268 seconds]
pabs has joined #crystal-lang
<FromGitter> <bendietze_twitter> Hey guys :) in crystal docs - while - at the and: ... or use "loop"
<FromGitter> <bendietze_twitter> found in stdlib - but i cannot find it?
<FromGitter> <bendietze_twitter> Where can i find loop?
<FromGitter> <bararchy> you mean ⏎ ⏎ ```loop do ⏎ # code here ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5b1cdc8d3516592752f99158]
<FromGitter> <bararchy> @bendietze_twitter https://crystal-lang.org/api/master/toplevel.html#loop(&block)-class-method
<FromGitter> <bendietze_twitter> Yes, its written a
<FromGitter> <bendietze_twitter> Sorry, gitter via browser sends while switching app
<FromGitter> <Qwerp-Derp> I made a new pull request to Hedron, any suggestions are greatly appreciated
<FromGitter> <Qwerp-Derp> https://github.com/Qwerp-Derp/hedron
<FromGitter> <bendietze_twitter> Yes, ok, i just looked in content table and search - but ok, top level namespace - thank you @bararchy
tzekid has joined #crystal-lang
tzekid has left #crystal-lang [#crystal-lang]
<FromGitter> <bendietze_twitter> I want to print the API for better reading, but i cannot because i am waiting for release 25 😄 😄
<FromGitter> <bendietze_twitter> Hmm ... devdocs.io shows loop everywhere ... Thought we have a improved search engine in stdlib, but, that isn't... Ok, next time i better look at both ;)
<FromGitter> <bararchy> The search for non-master branch is really bad, it will become much better in the next release
<FromGitter> <bararchy> :)
<FromGitter> <bendietze_twitter> Oh, yes? Nice :)
snsei has joined #crystal-lang
That_Guy_Anon has joined #crystal-lang
snsei has quit [Ping timeout: 255 seconds]
<Groogy> yo I've been trying to so something like this: https://gist.github.com/Groogy/2a27d84fb5e2702310f8675c3aa8d708
<Groogy> i.e you give in a type, it finds object of that type and returns that (or nil if not found)
<Groogy> though it needs the type to be compile time CONST for the .as method. so I tried using forall U etc, to make it work but I can't :/
<Groogy> anyone got any ideas on how to do it?
<Yxhuvud> objects.each do |obj|; case obj; when SomeClass; obj; else; nil; end; end
<Yxhuvud> well, map, not each.
<Groogy> well the method doesn't know the class, it's given it but it is known in compile time :/
<Groogy> when given as an argument
<Groogy> it's more like how do I pass it that's the problem
<Groogy> I tried get_component?(val : U.class) forall U as well
<Yxhuvud> I added a comment to your gist
Raimondii has joined #crystal-lang
<Groogy> yeah but will #foo when instantiated have return type of String?
<Groogy> that's what I'm aiming for
Raimondi has quit [Ping timeout: 244 seconds]
Raimondii is now known as Raimondi
<Yxhuvud> it is possible to make a makro that does that, but all invokations of the macro has to know the actual type and not have it be a variable.
<Groogy> yeah I want a variant which accepts type as a variable and one which just does the conversion to the type I want for me :/
<Groogy> though maybe... eh maybe just better deal with the .as manually, prevent future headaches potentially maybe by not overcomplicating the api
TCZ has joined #crystal-lang
pabs has quit [Ping timeout: 264 seconds]
pabs has joined #crystal-lang
RX14- is now known as RX14
<crystal-gh> [crystal] bcardiff pushed 1 new commit to master: https://git.io/vh2x0
<crystal-gh> crystal/master 36647c8 Johannes Müller: Add custom time format implementations (#5123)...
<crystal-gh> [crystal] bcardiff closed pull request #5382: Ensure time parser raises if timezone is missing (master...jm-time-parser-raise) https://git.io/vbVJw
TCZ has quit [Quit: Leaving]
faustinoaq has quit [Ping timeout: 264 seconds]
<FromGitter> <faustinoaq> @S-YOU Yeah, Crystal running on GraalVM! ^^
<FromGitter> <faustinoaq> @S-YOU Like you said, GraalVM has a `lli` (LLVM bytecode interpreter) 😄
<FromGitter> <faustinoaq> I had to use `--prelude="empty"` with `LibC` because standard prelude was giving me this error: ⏎ ⏎ ```Global variable @pcre_malloc is declared but not defined.``` [https://gitter.im/crystal-lang/crystal?at=5b1cfee2e36e0e7d3f637fbf]
<FromGitter> <faustinoaq> I think crystal do some extra stuff to get working binaries with standard lib (maybe because external dependencies, pcre, lievent, bwdgc, etc)
<FromGitter> <faustinoaq> Well, maybe https://github.com/kubo39/syscall.cr is enough to use `--prelude="empty"`
<travis-ci> crystal-lang/crystal#36647c8 (master - Add custom time format implementations (#5123)): The build was broken. https://travis-ci.org/crystal-lang/crystal/builds/390347702
<DeBot> https://github.com/crystal-lang/crystal/pull/5123 (Add custom time format implementations)
<FromGitter> <faustinoaq> I think an mini alternative to stdlib (without Fiber, GC or stdlib in general) would be nice to use with `--prelude="minimal"` (lighting fast compilation, lowest level, smallest binaries, unsafe as hell) 😅
pabs has quit [Ping timeout: 264 seconds]
pabs has joined #crystal-lang
That_Guy_Anon has quit [Remote host closed the connection]
<Groogy> is there a delete method on arrays that takes a block?
<Groogy> if block true, remove element
<FromGitter> <faustinoaq> Oh, I just realize GraalVM can load external libs ⏎ ⏎ Now I'm getting a different error 😅 ⏎ ⏎ `org.graalvm.polyglot.PolyglotException: java.lang.AssertionError: [256 x i8]` ... [https://gitter.im/crystal-lang/crystal?at=5b1d08d06023754a31807735]
TCZ has joined #crystal-lang
<FromGitter> <fgimian> Hey guys, is there a way to center justify text in Crystal? I've written the following function in the meantime 😄
<FromGitter> <fgimian> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5b1d0c143516592752fa0455]
<FromGitter> <fgimian> but was just wondering if there was another way
<FromGitter> <faustinoaq> Hey @/all I fixed wrong redirection on GitBook, I just renamed Amber Users to Amber In Production ⏎ ⏎ Take a look!: https://amberframework.gitbook.io/amber/in-production 😄
_whitelogger has joined #crystal-lang
<FromGitter> <faustinoaq> Hey, something is wrong with `docker-compose.yml` and `@wait_for` command 😅 https://github.com/amberframework/amber/issues/841
<Yxhuvud> groogy: #reject
<FromGitter> <S-YOU> Regarding, pcre_malloc, you need following I think ⏎ ⏎ ```LibPCRE.pcre_malloc = ->GC.malloc(LibC::SizeT) ⏎ LibPCRE.pcre_free = ->GC.free(Void*)``` [https://gitter.im/crystal-lang/crystal?at=5b1d149eddd61d08e5444cec]
<FromGitter> <S-YOU> I actually have custom prelude without fiber, gc, and few mores, but not as standalone shard.
<Yxhuvud> groogy: there is also #reject! if you want a destructive version
<FromGitter> <j8r> @fgimian AFAIK not really because to center we need to know the terminal size, and thus bindings to terminfo
<FromGitter> <j8r> I'm working with https://github.com/andrewsuzuki/termbox-crystal, but https://github.com/bew/unibilium.cr can better fit your case
<FromGitter> <fgimian> just to clarify, I'm not referring to a center across the entire terminal width
<FromGitter> <fgimian> this is a center with a width provided
<FromGitter> <j8r> hum ok
<FromGitter> <fgimian> e.g. in Ruby
<FromGitter> <fgimian> ```[1] pry(main)> "hello".center(20) ⏎ => " hello " ⏎ [2] pry(main)> ``` [https://gitter.im/crystal-lang/crystal?at=5b1d160d144c8c6fea859e58]
<FromGitter> <j8r> `width / 2`?
<FromGitter> <j8r> I'm kidding :)
<FromGitter> <fgimian> lol
<FromGitter> <fgimian> here's how it looks in Python
<FromGitter> <fgimian> ```In [1]: '{:^10}'.format('hello') ⏎ Out[1]: ' hello '`````` [https://gitter.im/crystal-lang/crystal?at=5b1d163be36e0e7d3f63b935]
<FromGitter> <fgimian> my little function does the trick
<FromGitter> <fgimian> and I double checked the stdlib and only see left and right justify, so I don't believe it's possible out of the box
<FromGitter> <j8r> I don't think it exists in Crystal. Maybe a shard?
<FromGitter> <fgimian> yeah possible! 😄
<FromGitter> <j8r> BTW that's not really complicated to do it manually 😏
<FromGitter> <fgimian> nah it's not
<FromGitter> <fgimian> as you see my code above, it's just a few lines
<FromGitter> <fgimian> I think it would be neat if it was integrated into `printf` though 😉
<FromGitter> <j8r> also you canuse `' '` instead of `" "`
<FromGitter> <fgimian> oh true, thanks
<FromGitter> <faustinoaq> > Hey, something is wrong with `docker-compose.yml` and `@wait_for` command 😅 https://github.com/amberframework/amber/issues/841 ⏎ ⏎ Oh, wrong room, My bad 😅
<FromGitter> <fgimian> hahaha @faustinoaq I wondered if you were intending to post that in the Amber room
<FromGitter> <fgimian> 🐹
<FromGitter> <faustinoaq> Yeah, I have so many rooms in my gitter account 😅
<FromGitter> <S-YOU> Great, you read all xD I have most of them with green circle, heh
<FromGitter> <faustinoaq> hehe XD
<Groogy> YxHuvud ah thx exactly what I wanted
snsei has joined #crystal-lang
<FromGitter> <fgimian> wow you're a busy guy @faustinoaq 😄
<FromGitter> <fgimian> do you mind me asking, what are your thoughts on Nim?
snsei has quit [Ping timeout: 260 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
<FromGitter> <faustinoaq> @fgimian Hehe, Nim is a very nice language 👍
<FromGitter> <faustinoaq> I'm using https://narimiran.github.io/nim-basics/ to learn it form scratch 😉
<crystal-gh> [crystal] RX14 closed pull request #6167: Add Time#at_{beginning,end}_of_second (master...jm/feature/time-at-second) https://git.io/vhu9S
<dom96> Nim is awesome! But I am pretty biased :P
miran has joined #crystal-lang
<FromGitter> <narimiran> @faustinoaq hi there, the author of that tutorial here :) it's nice to hear somebody is using it, after just a day from publishing it :)
<FromGitter> <narimiran> if you spot any errors or if you have improvement advice, please let me know, as the tutorial is still in the early phase (i have published it only on the nim channel, i plan to fix the mistakes before advertising it more widely)
<FromGitter> <fgimian> sweet @faustinoaq, will check it out 😄
<FromGitter> <fgimian> oh wow, great to have you all here guys
snsei has joined #crystal-lang
<FromGitter> <fgimian> sorry for the late reply too, I was / am trying to get some code working 😄
<FromGitter> <S-YOU> Thanks, just read that. Basically it is python :)
sz0 has joined #crystal-lang
<FromGitter> <fgimian> yeah
<FromGitter> <fgimian> Nim looks very much like Python
<travis-ci> crystal-lang/crystal#844792e (master - Add Time#at_{beginning,end}_of_second (#6167)): The build was fixed. https://travis-ci.org/crystal-lang/crystal/builds/390386898
<DeBot> https://github.com/crystal-lang/crystal/pull/6167 (Add Time#at_{beginning,end}_of_second)
<FromGitter> <eliasjpr> One more time, may I ask why Crystal is not 1.0v?
<FromGitter> <narimiran> @S-YOU @fgimian i'm coming from the python world and that "basically python" thingy was why i even started with nim. but as you go deeper, you find out it is more than that - it is a much newer language so it corrects some python mistakes and introduces some new cool stuff
<FromGitter> <S-YOU> Because, Windows version is not ready?
faustinoaq has joined #crystal-lang
<FromGitter> <j8r> @eliasjpr because the API still change
<FromGitter> <fgimian> @narimiran Ah yes, it's much like Crystal too. On the surface it looks like Ruby, but as soon as you start digging deeper, you realise it is quite different to Ruby under the covers.
<FromGitter> <eliasjpr> I just need a refresher, cause I have been meeting with some Startups in NYC and talking to CTOs and VP of Engineering team and have experessed a high interest on Crystal and what has kept them from using it in production is that is not yet V1 after years of development. They experessed willingnes to invest in the language with either dedicated developers, money and/or sponsorship
snsei has quit [Ping timeout: 276 seconds]
<FromGitter> <eliasjpr> Windows support sounds more like a feature than a v1 release need
<FromGitter> <narimiran> you can "write python" in nim, and it will be ok. but when you leave python behind and start writing idiomatic nim - don't be surprised to see a significant performance/speed improvement (this happened to me)
<FromGitter> <fgimian> @narimiran cool! will try it out sometime
<FromGitter> <S-YOU> @narimiran, thanks. I wish I could find more use cases about Nim. I tried to use for Web application once, but it was a bit hard for me.
<FromGitter> <eliasjpr> @j8r @S-YOU I got the sense from those meetings is that the fact that Crystal is not V1 has been holding adoption tremendously. The CTO of SimpleReach expressed to me that he was very very tempted to use Crystal in production (Cluster of 15 Nodes)
<FromGitter> <j8r> @eliasjpr That's nice! Note that "production ready" is more a marketing term than a technical one. If the devs do functional/load tests, there will likely less problems than an untested application written for RedHat Wildfly or Oracle Java
<FromGitter> <eliasjpr> So he went with GO Lang
<FromGitter> <j8r> But the marketing matters :/
<FromGitter> <faustinoaq> @narimiran Yeah, no problem, Thank you! 😄
<FromGitter> <eliasjpr> Exactly it matters
<FromGitter> <eliasjpr> I hope that the conversation the Core team will have on tuesday sheds some light on this
<dom96> @S-YOU feel free to pop into the Nim gitter chat, we'll happily help you write web apps :)
<FromGitter> <eliasjpr> And I somehow believe that is holding back adoption and adoption is important since it will prompt people to build libraries and other tooling that will just make the language more adoptable and stronger
<FromGitter> <j8r> what I don't understand is that startup matters about production ready, but their new product they build aren't even production ready haha 😃
<FromGitter> <eliasjpr> Their product generates 20 million in revenue
<FromGitter> <eliasjpr> a year
<FromGitter> <faustinoaq> @eliasjpr BTW, @sdogruyol just updated Crystal status in README: https://github.com/crystal-lang/crystal#project-status
<FromGitter> <S-YOU> @dom96, thanks.
<FromGitter> <faustinoaq> Not "alpha" anymore
<FromGitter> <eliasjpr> So while we Crystal, wait for a version 1, other languages are iterating faster and getting tooling and libs, by the time Crystal is V1 is going to be awesome but then people will start deciding which language to use is going to be measure by libraries and general adoption
<FromGitter> <j8r> @eliasjpr anyway it will take time. If they invest on Crystal this will speed up the release of v1.0
<FromGitter> <S-YOU> rust release cycle is good one, imo
<FromGitter> <S-YOU> just release even when you don't have outstanding features :)
<FromGitter> <eliasjpr> small iteration cycles is IMO good
<FromGitter> <faustinoaq> Relevant comment here: https://groups.google.com/d/msg/crystal-lang/BEQSAUAZ_pE/8pXqIZMwAAAJ
<dom96> eliasjpr: can you share the name of this startup?
<FromGitter> <eliasjpr> SimpleReach is one of them
<FromGitter> <eliasjpr> a lot of GO lang shops have considered Crystal or at least looked into Crystal at some point
<FromGitter> <eliasjpr> which is very very interesting
<FromGitter> <fgimian> sadly (for what it's worth), our organisation is the same at work
<FromGitter> <fgimian> Crystal isn't even on their radar sadly, it's just C++, Golang, Python really
<FromGitter> <S-YOU> I am the only Crystal user at my company xD
<FromGitter> <fgimian> another part of my team is using Elixir
<FromGitter> <fgimian> yeah, same here
<FromGitter> <eliasjpr> I spoke to a couple of FinTech startups that expressed the same deal
<FromGitter> <S-YOU> my company pretty much use Elixir too
<FromGitter> <fgimian> Ultimately, the backwards compatibility is going to be a big thing
<FromGitter> <fgimian> e.g. from the last release until now, there have been breaking changes
<FromGitter> <faustinoaq> I'm using PHP because my boss thinks Crystal looks good but is "not ready" yet 😅
<FromGitter> <eliasjpr> the only thing I can say Adoption is more important than we think for the Language
<FromGitter> <fgimian> I'm using the master branch for all my dev work
<FromGitter> <fgimian> @faustinoaq our legacy code is all PHP / Perl too, hehe
<FromGitter> <faustinoaq> Same here (PHP 5) lol XD
<FromGitter> <S-YOU> Good, we don't have php xD
<FromGitter> <fgimian> hahaha yup, likewise
<FromGitter> <fgimian> we have around 50k of frontend code in it, in all sorts of styles (HTML mixed with logic, templating .etc .etc)
<FromGitter> <fgimian> it's a very old codebase
<FromGitter> <fgimian> I'm so glad I don't work on that anymore hehehe
<FromGitter> <fgimian> on the current project I'm working on, it's Python on AWS
<FromGitter> <fgimian> it's a VERY VERY high traffic API (> 100 million hits per day) that could really use more speed
<FromGitter> <fgimian> but if they move to anything, it'll be C++ or Golang, I doubt I could convince them to go with Crystal :(
<FromGitter> <j8r> In python for hight traffic omg
<FromGitter> <faustinoaq> Oh, nice! I also worked with Python in some projects before. Django is a nice framework 😄
<FromGitter> <eliasjpr> I know that the Crystal Core team wants to build things right a solidly and the implication of breaking changes is well understood in our world. I would like to know what the Core Crystal team thinks
<FromGitter> <S-YOU> Great, you can run python on such traffic. My group also use Python, and struggling with performance with Mysql.
<FromGitter> <fgimian> @S-YOU we are too, but AWS scales it so you barely notice ... until you get the bill 😆
<FromGitter> <eliasjpr> @S-YOU most likely is MySQL
<FromGitter> <fgimian> if you look at something like AWS Lambda, they offer Python, Golang, JS, C#, Java as their runtimes, Golang was only added this year
<FromGitter> <S-YOU> Yeah, indeed my sql. they start writing 200 lines stored procedures xD. Glad I was not directly involved.
<FromGitter> <fgimian> getting support for Crystal in Lambda would be a huge win, but I think the API would have to be stable before that happens
<FromGitter> <j8r> Why they can't just add LLVM?
<FromGitter> <eliasjpr> i started to learn GO Lang and is a damn well build language
<FromGitter> <S-YOU> you can run binary on lambda right?
<FromGitter> <fgimian> @S-YOU possibly with some fiddling, but that's not the supported config I'm afraid
<FromGitter> <eliasjpr> GO lang is going to propel
<FromGitter> <fgimian> you would have to use ECS or something like that
<FromGitter> <S-YOU> True about go lang, as long as I are ok with the syntax.
<FromGitter> <faustinoaq> @eliasjpr C# is also very well designed :-P
<FromGitter> <fgimian> yea, tbh ... I just don't understand how anyone can live with Golang as a language
ua has joined #crystal-lang
<FromGitter> <fgimian> would rather just use C++ if it came down to that hehehe
<FromGitter> <S-YOU> C 2.0 :)
<FromGitter> <j8r> and don't mind about generics, OOP and like dealing with nils :)
<FromGitter> <fgimian> @S-YOU exactly
<FromGitter> <S-YOU> I am using Crystal because I dont want to write C++
<FromGitter> <eliasjpr> @fgimian have you done GO?
<FromGitter> <fgimian> @eliasjpr I have attempted to for a project at work and honestly ... the lack of keyword arguments alone was a dealbreaker for me
<FromGitter> <fgimian> I tried all the fun workarounds with structs .etc, but it's a terrible situation
<FromGitter> <j8r> on the system side, why `$GOPATH` this dependency hell
<FromGitter> <fgimian> how about yourself Elias?
ua_ has quit [Ping timeout: 248 seconds]
<FromGitter> <eliasjpr> dependency, the language has not external dependency
<FromGitter> <eliasjpr> I am playing with it and IMO is truly well designed. I can understand that you miss keyword args
<FromGitter> <fgimian> @eliasjpr yeah, but I'm glad you are enjoying it
<FromGitter> <fgimian> clearly, many people have built great projects with Golang, so it's definitely capable
<FromGitter> <faustinoaq> I am using Crystal because I dont want to write PHP
<FromGitter> <faustinoaq> (still using PHP XD)
<FromGitter> <eliasjpr> but it is a structured language thats certaing paradigm
<FromGitter> <j8r> I was talking about dealing with package dependency, like vendoring or `godeps
<FromGitter> <fgimian> @eliasjpr yeah, it truly is more like C than anything I've seen; I don't understand why some people say it's the next Python, it is absolutely nothing like Python
<FromGitter> <S-YOU> Regarding networking programming, there is not much choice except C/C++. Crystal was hackable for that.
<FromGitter> <eliasjpr> thats something I am finding interesting, yes, like the fact that all libs live in a repo and the way you have to define the full paths
<FromGitter> <faustinoaq> @eliasjpr Have you tried https://goby-lang.org/ ?
<FromGitter> <eliasjpr> no
<FromGitter> <eliasjpr> 👀 :
<FromGitter> <faustinoaq> Goby is very simple Ruby-Like
<FromGitter> <faustinoaq> that compiles to go 😄
<FromGitter> <S-YOU> haha, nice though.
<FromGitter> <j8r> like nim, a python-like that compile to c?
<FromGitter> <j8r> self-hosted languages like Crystal rocks :D
<FromGitter> <fgimian> but it seems that Golang libs must be adapted to Goby?
<FromGitter> <faustinoaq> I tried goby and seems it runs very fast :)
<FromGitter> <faustinoaq> @fgimian Yeah, something like that
<FromGitter> <S-YOU> same sense to nim I guess
<FromGitter> <fgimian> @faustinoaq that's going to hurt the language heaps I think, most people will just use Go in that case I think
<FromGitter> <j8r> or ruby with mruby
<FromGitter> <faustinoaq> @j8r Well, Nim is a different story, Nim has multiples backends and is self-hosted as well 😉
<FromGitter> <fgimian> Is Nim closer to 1.0 than Crystal in your opinion?
<FromGitter> <fgimian> e.g. is the API more stable?
<FromGitter> <fgimian> it's still not technically at 1.0 either according to the releases I can see
<FromGitter> <faustinoaq> Oh, so many languages 😆
<FromGitter> <eliasjpr> People want ruby syntax expressiveness so bad
<FromGitter> <eliasjpr> but with the performance of C :thinking_face:
<FromGitter> <fgimian> hehehe
<FromGitter> <fgimian> indeed there are so many languages, but no languages do what Crystal does
<FromGitter> <fgimian> I don't know of another language that has the Ruby style, with full OO support and compiled down to a single binary.
<FromGitter> <eliasjpr> im telling you is like the Holy Grail
<FromGitter> <faustinoaq> Well, I guess we enjoy to learn new stuff everyday :) ⏎ ⏎ I know some developers that actually doesn't like programming and they are stuck on C#/VB, Java, JS and PHP (period)
<FromGitter> <eliasjpr> the Crystal Core team is sitting on top of a Gold mine and still looking at the horizon
<FromGitter> <S-YOU> 😄
<FromGitter> <S-YOU> I guess it is too early
<FromGitter> <faustinoaq> @eliasjpr lol
<FromGitter> <S-YOU> What if after 5 years and same situation :)
<FromGitter> <faustinoaq> @bcardiff We need your opinion here 👀
<FromGitter> <faustinoaq> @S-YOU We create a new language XD
<FromGitter> <faustinoaq> lol
<FromGitter> <S-YOU> And starts another 5 years xD
<FromGitter> <eliasjpr> My big question for the Core team would be. What is good enough for v1, and is “good enough” enough for V1 Crystal?
* FromGitter * fgimian better get to bed, but will be reading the conversation that eventuates in the morning
<FromGitter> <fgimian> 👋
<FromGitter> <eliasjpr> 🐃
<FromGitter> <eliasjpr> :)
<FromGitter> <fgimian> hahahaha
<FromGitter> <fgimian> seeya guys 😄
<FromGitter> <faustinoaq> > If you have any questions, please ask on this thread. We'll try to answer them in the live session :)
<FromGitter> <faustinoaq> I think you should publish your question here ^^
TCZ has joined #crystal-lang
akaiiro has joined #crystal-lang
miran has quit [Ping timeout: 248 seconds]
faustinoaq has quit [Ping timeout: 276 seconds]
GoldenBear has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 240 seconds]
pabs has quit [Ping timeout: 256 seconds]
pabs has joined #crystal-lang
bmcginty has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
TCZ has quit [Quit: Leaving]
<FromGitter> <Blacksmoke16> @faustinoaq whats the status of your scry thing for Intellij?
snsei has joined #crystal-lang
Philpax has quit [Ping timeout: 240 seconds]
<mech422> Is there a 'recommended' library for parsing sub-command style command lines? so far clim, admiral, and commander are the ones I've looked at...
rohitpaulk has quit [Ping timeout: 260 seconds]
pabs has quit [Ping timeout: 240 seconds]
pabs has joined #crystal-lang
rohitpaulk has joined #crystal-lang
miran has joined #crystal-lang
<FromGitter> <Blacksmoke16> is it possible to compile a binary on Linux to run on mac/windows?
<FromGitter> <Blacksmoke16> i know you can do --cross-compile --target but not super familiar with how that works
pabs has quit [Ping timeout: 245 seconds]
pabs has joined #crystal-lang
<FromGitter> <Blacksmoke16> nvm i re read the docs and found part i was missing
<FromGitter> <Blacksmoke16> for mac at least
bmcginty has joined #crystal-lang
<FromGitter> <reiswindy> I don't think there's a "recommended" one, but Clim worked well enough for me.
<mech422> FromGitter: actually - that's what I ended up going with - still seems to be developed, and the configuration was straightforward
<FromGitter> mech422, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/crystal-lang/crystal
<mech422> reiswindy: actually - that's what I ended up going with - still seems to be developed, and the configuration was straightforward
<mech422> reiswindy: it also supports a 'required' flag for options, which the others didn't seem to
<FromGitter> <bcardiff> @faustinoaq @eliasjpr , I like how you feel about a gold mine. 😄 . About what is good enough, for me is about reaching a stable point in the semantics of the syntax. But also there is a lot of intereset in the parallism story. Feel free to ask some questions for tuesday Q&A so we can have some follow ups on this.
pabs has quit [Ping timeout: 265 seconds]
pabs has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 245 seconds]
<FromGitter> <j8r> mech42: you can look at my project https://github.com/j8r/clicr :)
greengriminal has joined #crystal-lang
faustinoaq has joined #crystal-lang
<mech422> j8r: interesting...
faustinoaq has quit [Read error: Connection reset by peer]
faustinoaq has joined #crystal-lang
akaiiro has quit [Remote host closed the connection]
greengriminal has quit [Quit: Leaving]
kgautreaux has joined #crystal-lang
sz0 has quit [Quit: Connection closed for inactivity]
Nik736 has joined #crystal-lang
Nik736 has quit [Client Quit]
That_Guy_Anon has joined #crystal-lang
greengriminal has joined #crystal-lang
<FromGitter> <j8r> https://github.com/j8r/cride 🎉
miran has quit [Quit: Konversation terminated!]
kgautreaux has quit [Quit: Connection closed for inactivity]
That_Guy_Anon has quit [Quit: Leaving]
hightower2 has joined #crystal-lang
greengriminal has quit [Quit: Leaving]
<FromGitter> <sdogruyol> > the Crystal Core team is sitting on top of a Gold mine and still looking at the horizon ⏎ I really agree with you. Currently, we're building the foundations to dig up the gold :)
pabs has quit [Ping timeout: 256 seconds]
pabs has joined #crystal-lang
faustinoaq has quit [Ping timeout: 260 seconds]
akaiiro has joined #crystal-lang
faustinoaq has joined #crystal-lang