jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.28.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
DTZUZU has quit [Ping timeout: 272 seconds]
DTZUZU has joined #crystal-lang
alex`` has quit [Ping timeout: 248 seconds]
alex`` has joined #crystal-lang
chemist69 has quit [Ping timeout: 252 seconds]
chemist69 has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
mistergibson has quit [Quit: Leaving]
mistergibson has joined #crystal-lang
<mistergibson> Greetings all
<mistergibson> Has anyone considered writing a Ruby-Interpreter Class in Crystal?
<mistergibson> I'm curious how the baked-in concurrency would affect the design.
<FromGitter> <watzon> I don't believe that anyone has tried. Could be a fun project though.
<mistergibson> Well Crystal is certainly FAST enough to pull it off I think
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
<FromGitter> <watzon> It definitely is. The question is, what would be the benefit other than having the interpreter written in a language with a similar syntax? It might have the speed, but it will probably never outpace MRI with it's C++ codebase.
<FromGitter> <watzon> It could be cool to have an interpreted version of Crystal though for scripting purposes. Crystal is slowly moving away from Ruby in a lot of ways and it would be nice if their was a scripting language that shared the same syntax, standard library, etc.
<FromGitter> <watzon> But idk
<FromGitter> <mistergibson> Well, I can think of a few use cases for it
<FromGitter> <mistergibson> For instance - it would be nice to have a crystal-based-vm to exec pure ruby libs/etc that would *also* run in say Opal
<FromGitter> <mistergibson> modular, portable
<FromGitter> <mistergibson> It wouldn't be for everyone, but I could see its uses
<FromGitter> <watzon> Yeah I didn't think about that side of it. That could be nice seeing as Ruby already has a huge package ecosystem.
<FromGitter> <watzon> I'm really not having a fun time trying to create a non-blocking gui loop
<FromGitter> <mistergibson> I had to settle upon a reactor-ish-pattern for my browser gui stuff (as JS has NO notion of a thread)
_whitelogger has joined #crystal-lang
DTZUZO has quit [Read error: Connection reset by peer]
DTZUZO has joined #crystal-lang
<FromGitter> <girng> "ruby-interpreter class in Crystal" wait what's that mean lol
<FromGitter> <girng> isn't crystal's syntax so ruby-like already??
<FromGitter> <alex-lairan> @girng today Crystal is far from Ruby. ⏎ ⏎ I think Java or C++ developers can enter easier in the language than Ruby developers.
<FromGitter> <girng> is it? i always thought it was similar (like extremely), but you say "today" so maybe Ruby has advanced further?
<FromGitter> <girng> i actually never used ruby before I got into Crystal, so i really don't know how far Ruby has come
<FromGitter> <girng> And how different it is compared to Crystal today
<FromGitter> <girng> *going to start reading about Ruby in 2019*
* FromGitter * girng test
<FromGitter> <watzon> Ruby is still pretty relevant in 2019
bougyman_ has quit [*.net *.split]
RX14 has quit [*.net *.split]
oz has quit [*.net *.split]
olbat[m] has quit [*.net *.split]
ua has quit [*.net *.split]
coderobe has quit [*.net *.split]
<FromGitter> <alex-lairan> The syntax look the same like `do ... end` etc. ⏎ ⏎ But principles, and logic is far away.
<livcd> Ruby is also getting a lot of goodies but one wonders if it will be enough. The thing is python has just won at this point albeit Ruby never had any real corporate backing
<FromGitter> <alex-lairan> @livcd Github and Shopify ? :D
<livcd> both are relatively small companies
<livcd> Python had/has FAANG and many parts of that ecosystem were born in those companies
ua has joined #crystal-lang
oz has joined #crystal-lang
coderobe has joined #crystal-lang
olbat[m] has joined #crystal-lang
RX14 has joined #crystal-lang
bougyman_ has joined #crystal-lang
<livcd> Ruby only really became popular in the west because of Rails and a lot of Ruby's design decisions / development etc is happening in Japan and also their companies have different needs
<FromGitter> <girng> I hope Kemal becomes more popular
<FromGitter> <girng> er.. I mean, helps Crystal become more popular
<FromGitter> <girng> @sdogruyol is a beast
<livcd> I keep an eye on crystal but for me it's too alpha atm
<FromGitter> <girng> oh really livcd?
<FromGitter> <girng> i've seen you around.. i thought you'd be using crystal
<livcd> yeah but I need windows so..
<FromGitter> <j8r> livcd on what language you code, so?
<livcd> mainly Go and sometimes Nim if I can make it work or there's a library for what I need
<FromGitter> <girng> @j8r your site is down btw :P
<FromGitter> <j8r> since a long time @girng , I will remove it
<FromGitter> <girng> @j8r hehe
<FromGitter> <girng> @livcd i've tried Go and spent a lot of time trying to learn it through yt tutorials, etc
<FromGitter> <j8r> It was a blog, but I posted uninteresting things
<FromGitter> <girng> but the syntax kills me, def not my forte lol
<FromGitter> <j8r> is Nim good? I heard it has some weird design decisions
<livcd> I do not have any strong opinions about anything :-)
<FromGitter> <yxhuvud> @alex-lairan Ruby also have backing from Salesforce (Heroku employs Matz, and Heroku is fully owned by Salesforce)
<FromGitter> <girng> very powerful. i heard about it from opyrpin and i tried it out
<FromGitter> <girng> @j8r
<livcd> you can add Stripe to the mix but it is not really a lot in comparison to Java/JavaScript/Python/C# etc
<FromGitter> <girng> Why doesn't Crystal have these "backings"
<FromGitter> <girng> When it's a faster language?
<livcd> why does python have these "backings" if it's a slower language ?
<FromGitter> <girng> more established in the industry / been around longer?
<FromGitter> <girng> is that the same for Ruby?
<FromGitter> <girng> What does Crystal need to get this kind of support??
<FromGitter> <girng> How can we make it happen, what do we need to do
<livcd> write an important service at Facebook in Crystal and make someone pay for it :P
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
<FromGitter> <yxhuvud> Or even better, build your own company of Facebook size in Crystal. (please don't copy facebook though, one is more than enough)
<FromGitter> <girng> Crystal deserves to be recognized more, I don't understand
<FromGitter> <girng> Now that I think of it, I said this almost a year ago. I don't think I'll ever understand
<livcd> girng: well look at many other examples of even polished products that kinda failed to gain traction.
<livcd> we the people are usually just leeching from what people build and maintain...this is what the OSS and freebies taught us
<livcd> why bother if Google pays for the development
<FromGitter> <j8r> because Google and Facebook needs may conflict with ours
<FromGitter> <watzon> golang is a perfect example that not all that google develops becomes a huge hit. It gained some traction, but it's nowhere near the popularity people thought it would be
<FromGitter> <j8r> that's not a good example
<FromGitter> <girng> how come?
<FromGitter> <j8r> grpc and AMP are a better
<FromGitter> <j8r> Google wants to impose standards that have huge drawbacks
<FromGitter> <girng> what is grpc and AMP i need to google them
<FromGitter> <girng> Accelerated Mobile Pages and https://grpc.io/?
<FromGitter> <watzon> AMP is kinda cool. Basically zero load time. Idk how it works though, haven't done enough research
<livcd> I would say Go is pretty popular
<FromGitter> <j8r> AMP is a disaster, do you know how it works? It loads fast because google CDNs are used
<FromGitter> <alex-lairan> But, why it is popular ? ⏎ ⏎ It doesn't have generics, there is a lot of code duplication, and strange naming convention. ⏎ ⏎ I've tried Go many times, and I cannot enter in. [https://gitter.im/crystal-lang/crystal?at=5cf4dff6cea8295279e47cad]
DTZUZO has quit [Ping timeout: 252 seconds]
<livcd> alex-lairan: because it just works
ashirase has quit [Ping timeout: 258 seconds]
<FromGitter> <alex-lairan> Rust works too, but it's no as popular as go
ashirase has joined #crystal-lang
<FromGitter> <mavu> I could not care less where crystal ranks on some language polularity contest. What matters is that it has people actively working on and with it.
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
<FromGitter> <watzon> @alex-lairan I'm right there with you. Go is good for one thing, I/O, but the weirdness of the language is not worth it to me
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter> <girng> I'm just trying to find ideas on how we could spread the word about Crystal
<mps> when I started to learn C (about 1986) all thought that I'm a little weird
<FromGitter> <girng> The lead devs and contributors deserve for this language to be huge, it's so amazing
<mps> when I installed Linux in about 1993 and used it as only system on workstation all told me that I'm weird
<mps> asking me something like 'who will in the world use that weird language' and later more weird OS (linux)
<mps> no companies or anything big was behind these two, only devoted and talented people with deep understand of the computers (not computer science)
<mps> best thing in the world are made or created by devoted and talented people
<mps> that is my hope for crystal
<FromGitter> <alex-lairan> 👍
<FromGitter> <girng> Nice MPS. I think time will tell
<FromGitter> <girng> Ty for sharing your little story
<mps> girng: thank you for supporting crystal with your work
<mps> big company made titanic which didn't arrived to American coast, Eric the Red and his friend made drakkar which arrived :)
<mps> s/friend/friends/
<mps> alex-lairan: thanks
<FromGitter> <girng> I eventually want to apply to a dev position at corporate with the company I work for. And then if I get it, see if I can incorporate Crystal somehow, that would be very cool. That's a long ways out though, like years (since the business is promote from within and positions are based on seniority). I live next to the corporate offices, so it would actually be worth it if I ever get that position. But this is wild
<FromGitter> ... speculation lmaooo, I still need to pass my probation period with this company. But just saying, it's definitely a possibility I'd like to ensue in the future
<mps> girng: long time ago I started programming as hobby but after some time companies started to offer me job. After that I never searched for job, jobs found me
<FromGitter> <girng> lol nice
<FromGitter> <girng> "jobs found me" :D
<mps> yes, I can always choose which one is best for me
<mps> I rejected 'dream' offer from famous company because it doesn't fit to my 'ideals'
<FromGitter> <girng> ic
<mps> I prefer small companies where people are like as in a family, hello Manas :)
<FromGitter> <j8r> you worked an this type of companies mps?
Liothen has quit [Ping timeout: 250 seconds]
Liothen has joined #crystal-lang
<mps> j8r: no, I mentioned Manas because it is not 'big' but it is big because they made crystal
<mps> nearly last two decade I am self employed, I'm owner of small firm (term company is not appropriate)
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
DTZUZO has joined #crystal-lang
<FromGitter> <j8r> I see, a one-man business, registered as company for legal purposes
<mps> actually two man with third person starting to work these days
<FromGitter> <j8r> good! and what do you do?
<mps> could I pm you?
<FromGitter> <j8r> I don't know how, I don't remember my IRC :/
<FromGitter> <Blacksmoke16> if you're on gitter just hover over his icon, and click `chat privately`
<FromGitter> <Blacksmoke16> er nvm, that would chat the bot
<mps> /query nick
<mps> I made rewrite rule in my irssi (irc client) and you all look like you are on irc
early has joined #crystal-lang
Yxhuvud has quit [Read error: Connection reset by peer]
DTZUZO has quit [Ping timeout: 272 seconds]
DTZUZO has joined #crystal-lang
<jokke> mps: that's cool
<jokke> i wonder how i can achieve the same with weechat
bougyman_ is now known as bougyman
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<mps> jokke: don't know for weechatm but for irssi it is perl trigger script with somewhat cumbersome regex
<jokke> ok :)
<jokke> mps: afaik gitter has an irc bridge too
oprypin has quit [Ping timeout: 250 seconds]
oprypin has joined #crystal-lang
<mps> yes, I'm on freenode irc and there is #crystal-lang channel
Yxhuvud has joined #crystal-lang
<oprypin> cc jokke
<FromGitter> <jwoertink> One thing I find myself running in to more often is when I try creating a model for some database association, and I run in to a conflict with something that exists in Crystal.
<FromGitter> <jwoertink> For example working on an app that let's you plan a party, or go to something like a concert.. I'd call this model `Event` where the table is `events`. But this exists in crystal already
<FromGitter> <jwoertink> How does everyone handle these situations?
<FromGitter> <Blacksmoke16> you defining them on top level or in a module?
<FromGitter> <jwoertink> top level
<FromGitter> <Blacksmoke16> there's your problem
<FromGitter> <jwoertink> lol
<FromGitter> <Blacksmoke16> modules allow you to namespace things
<FromGitter> <jwoertink> ok, so you do namespaces
<FromGitter> <Blacksmoke16> so it wont conflict with other stuff
<FromGitter> <Blacksmoke16> yea
<FromGitter> <kinxer> Yeah, that's generally my solution as well.
<FromGitter> <Blacksmoke16> is also a way to reference the top level type from within your module
<FromGitter> <Blacksmoke16> like `::Event`
<FromGitter> <jwoertink> Right now I'm just renaming the models to not conflict
<FromGitter> <jwoertink> I don't really run in to this issue with Ruby as often. So I'm not used to namespacing all of my objects I create.
<FromGitter> <jwoertink> I guess that's not horrible. Especially if the whole app is in the same namespace.
<FromGitter> <Blacksmoke16> it also helps with your docs
<FromGitter> <Blacksmoke16> vs everything being in one big list
<FromGitter> <Blacksmoke16> the main downside of this is longer names, like `Athena::Routing::Exceptions::PreconditionFailedException`, but @girng and i were talking about that and you could just do a `include Athena::Routing::Exceptions` then reference `PreconditionFailedException` as normal since its now included
<FromGitter> <Blacksmoke16> in your main module for example
<FromGitter> <jwoertink> Right. That's what I do for my libs and such. I just never do it for my main applications, guess it's time for that though
<FromGitter> <Blacksmoke16> prob wouldnt hurt
<FromGitter> <watzon> Yeah, generally a `Model::ModelName` pattern is what I go for. Simple and declarative.
laaron has quit [Remote host closed the connection]
RX14- has joined #crystal-lang
laaron has joined #crystal-lang
oprypin_ has joined #crystal-lang
bougyman_ has joined #crystal-lang
oprypin has quit [*.net *.split]
Yxhuvud has quit [*.net *.split]
bougyman has quit [*.net *.split]
RX14 has quit [*.net *.split]
<FromGitter> <mavu> Is there any way I can use the below output to debug what went wrong? ⏎ My logging didn't help, it must have crashed on some unexpected point. ⏎ ⏎ `````` [https://gitter.im/crystal-lang/crystal?at=5cf58042faac643934350db2]
<FromGitter> <Blacksmoke16> if possible try on master
<FromGitter> <Blacksmoke16> good amount of those got fixed
<FromGitter> <watzon> @mavu usually when that happens I comment out pieces of code until it doesn't happen then see what I did wrong
<FromGitter> <mavu> @watzon yes, but that's not going to be easy, currently I can't even make it crash again :(
mps has quit [Ping timeout: 248 seconds]
mps has joined #crystal-lang
<FromGitter> <Blacksmoke16> might be same issue?
rohitpaulk has joined #crystal-lang
<FromGitter> <mavu> @Blacksmoke16 that does look similar, I'll try reproducing tomorow, then I can test if the fixes help. (if I can reproduce..)
<FromGitter> <Blacksmoke16> 👍
rohitpaulk has quit [Ping timeout: 246 seconds]
<FromGitter> <watzon> Hey @Blacksmoke16, you know lots of JSON related things. How could I deserialize a JSON object that I don't know the base keys for? Basically ⏎ ⏎ ```{ ⏎ "key_i_dont_know": { ⏎ "keys_i_do_know": true ⏎ } ⏎ }``` [https://gitter.im/crystal-lang/crystal?at=5cf59a7fcea8295279e9a686]
<mps> oprypin_: I don't understand, how can I contrubite?
<FromGitter> <watzon> Wait I can just do `Hash(String, MyType).from_json` can't I? Haha
<FromGitter> <watzon> My brain isn't working
<FromGitter> <girng> yep
<FromGitter> <girng> if there are more than just one `keys_i_do_know` i personally would just do json.parse at that point, just me tho
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter> <Blacksmoke16> yea thats how you would have to do it @watzon
<alex``> are list supported for options?
<FromGitter> <Blacksmoke16> hm?
<alex``> $ command --cmd a b c
<FromGitter> <Blacksmoke16> mmm not automatically afaik