ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.21.1 | Fund Crystal's development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
<cerulean> who's doing gui in crystal? whats the best option
<FromGitter> <redcodefinal> Dont know if we have a GUI option right now but you can always check crystalshards.xyz. Alternatively you can use a webpage to do basic GUI if needed. I use that style for an app I use to control my hydroponic buckets in ruby.
eliasjpr has joined #crystal-lang
<eliasjpr> cerulean
eliasjpr has quit [Client Quit]
<cerulean> hey
<cerulean> sorry @eliasjpr i was AFK
<cerulean> what's going on?
<cerulean> nice
<cerulean> hydroponic like weed? nice lol
<wmoxam> There are X11 bindings :D
<wmoxam> And there was a GTK example way back (nothing close to complete though)
<cerulean> i "guess" i like qt
<cerulean> lol
<wmoxam> QT bindings would be tough I think
<cerulean> should i make a crystal IDE with it's own GUI library. well someone should
<cerulean> i agree wmoxan
<cerulean> moxam
<cerulean> native crystal gui library, support focused on linux and mac
<wmoxam> QML might be easier
<wmoxam> Ruby has QML bindings
<cerulean> ive heard QML hate. do you understand the trollish blackmagic of QML?
<cerulean> didnt know that
<cerulean> what's so good/bad about QML?
<cerulean> my friend was annoyed it was like javascript yet called a markup language
<cerulean> or something
<wmoxam> I don't know much about it
<cerulean> me either
<wmoxam> on the surface it looks a bit like Electron
<wmoxam> but a bit more of a hybrid
<cerulean> yea
<cerulean> i'd some how prefer qml to electronic without knowing
<cerulean> not sure
<cerulean> the best decisions are made without knowing with a blindfold sometimes
<cerulean> jk
<cerulean> since it uses html
<cerulean> POINT COUNTER POINT!
<cerulean> qml dont seem bad
<cerulean> im reading the qml gem page
<wmoxam> I noticed that Motif is now OSS
<cerulean> i think Qml is something we probably want
<wmoxam> That would be a fun binding 😭
<cerulean> require a few files, define a .qml file, load it, done
<cerulean> seems to be the process
<cerulean> no need of lowlevel binding to qt
<wmoxam> yeah, lol
<wmoxam> it's ancient
<cerulean> lol
<cerulean> i think qt is a better option here but that is still cool
<cerulean> qml i mean
<wmoxam> yeah for sure
pduncan has quit [Ping timeout: 240 seconds]
<FromGitter> <phoffer> I missed the web convo earlier, but I agree with RX14 on hoping to not have any Rails clones. Rails is trapped in a lot of decisions made long ago, leads to very bloated and convoluted apps, and should not be the goal of any new web framework (plus all the other problems it brings, i.e. ActiveSupport bloat/laziness, ActiveRecord being a mess, etc). If people want a Ruby web framework to imitate in terms of app arch
<FromGitter> ... would be Hanami. I like cerulean’s point of 5 clones with 1/5 the features, I’ve had that thought about ORMs in Crystal (although there is some awesome work with Crecto and Jennifer that is lessening those feelings). I am excited to see what people bring to the Crystal ecosystem, and think that the people ... [https://gitter.im/crystal-lang/crystal?at=58f5681edddd87f332d321a5]
<wmoxam> +1 to Hanami
<FromGitter> <fridgerator> :thumbsup:
<FromGitter> <eliasjpr> +1
<FromGitter> <eliasjpr> :thumbsup:
<FromGitter> <eliasjpr> We are looking for contributors to join us to start an initiative and consolidate the community thoughts on what should be built https://github.com/Amber-Crystal/amber
Liothen has quit [Quit: The Dogmatic Law of Shadowsong]
Liothen has joined #crystal-lang
<FromGitter> <phoffer> I wonder if it would be beneficial to have another Gitter room under Crystal org for ecosystem discussion? It feels better if it didn’t clog this room up (since there would be a ton of discussion). That also removes potential pressure and concern if it was hosted by an org (nothing against Amber/Elias, it looks really cool. I just seen enough of Rails team to think it may be better for all parties involved, inclu
<FromGitter> ... host)
LastWhisper____ has joined #crystal-lang
<FromGitter> <phoffer> And lastly, most importantly, we should also make a concerted effort towards non-web projects for Crystal. Crystal team is clear that it’s not targeted for the web, and I would hate for it to suffer any false perception like Ruby has (about being mainly for the web).
<FromGitter> <phoffer> (Sorry for so much posting, I just have lots of thoughts about big picture, especially learning from the full Ruby ecosystem, and how it could be such improved if given a clean slate, which is close to what Crystal has. Especially when combined with people’s experience w/ Elixir and other technologies. My specialty just happens to be Ruby land)
<FromGitter> <fridgerator> I don't dissagree
<FromGitter> <eliasjpr> @phoffer just created a separate channel and also detached myself the project and created an org for it. Just thought that this was the best channel to get people interested
<FromGitter> <eliasjpr> I agree with that
<FromGitter> <phoffer> I agree on web attracting people too, I guess I just don't want to forget about everything else. Let's have the best of everything :)
<FromGitter> <fridgerator> :thumbsup:
greenbigfrog has quit [Ping timeout: 240 seconds]
MatrixTraveler[m has quit [Ping timeout: 255 seconds]
greenbigfrog has joined #crystal-lang
MatrixTraveler[m has joined #crystal-lang
vdmo has joined #crystal-lang
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<FromGitter> <codingphasedotcom> What's wrong with web development?
<FromGitter> <phoffer> Nothing, but Crystal is a general purpose language, and shouldn’t be perceived as web only like Ruby widely is
LastWhisper____ has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 268 seconds]
Raimondii is now known as Raimondi
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<FromGitter> <bew> For guis there is a gobject (from gtk) experiment from @jhass
<FromGitter> <bew> But it's a poc..
<FromGitter> <elorest> Amber looks really clean. Is it completely agnostic to controllers, orms though?
<FromGitter> <elorest> Ruby is used for many none web tasks. Foreman, puppet, chef, and capistrano are a few large projects that come to mind.
<cerulean> im on the amber team now, full disclosure
<cerulean> :D
<cerulean> crystal is the language of 2060
<FromGitter> <sdogruyol> Lol
mark_66 has joined #crystal-lang
<vegai> has anyone tried Crystal on that Bash-On-Windows thingie?
<FromGitter> <sdogruyol> yeah
<FromGitter> <sdogruyol> it works pretty good
<vegai> cool
asfetacter has joined #crystal-lang
asfetacter has quit [Quit: Page closed]
Qchmqs has joined #crystal-lang
Qchmqs has quit [Quit: Konversation terminated!]
Qchmqs has joined #crystal-lang
unshadow has joined #crystal-lang
gloscombe has joined #crystal-lang
bjz has joined #crystal-lang
vdmo has quit [Read error: Connection reset by peer]
bjz has quit [Max SendQ exceeded]
bjz has joined #crystal-lang
unshadow has quit [Quit: leaving]
<FromGitter> <drosehn> Among my friends, there are some who hate ruby mainly because they've had to support some large sites which use Rails, and they hate Rails (especially how it works on large sites).
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vSbQg
<crystal-gh> crystal/master ee30684 Benoit de Chezelles: Fix String#each_line documentation
<FromGitter> <drosehn> I also get the feeling that the main crystal developers will move away from "as slick as ruby" as a slogan, simply because they're tired of issues which sound like "here's something where crystal is not like ruby", and they do not want to be boxed in to being a clone of ruby.
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vSbQb
<crystal-gh> crystal/master f92bd1f Luis Lavena: Fully honor no color option when running specs...
<FromGitter> <drosehn> I became interested in ruby back when there were only two books written in english for it, and one of those was more like a very terse reference. Rails came along, and it was pretty dramatic how many more people became interested in ruby. I liked rails just because it fueled that interest in ruby, but I've never tried to work with it. I'm just not a web-developer at heart.
<crystal-gh> [crystal] asterite closed pull request #4285: p: not display if no object is given (master...fix/p/empty-display) https://git.io/vSSFM
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vSb7Z
<crystal-gh> crystal/master 8ad21bc TSUYUSATO Kitsune: pp: fixed to return value like 'p'...
<cerulean> i almost hated rails for that reason then wrote a really good app on my own in rails 5 so im happy again
<cerulean> they need some way to communicate its a ruby-like or its a missed connection
<FromGitter> <sdogruyol> well most of the rails developers dont care about ruby
<cerulean> i remember the 2 book days in ruby
<FromGitter> <sdogruyol> "get shit done"
<FromGitter> <sdogruyol> TM
<cerulean> i was a web developer for a long time still am. kill me
<cerulean> lol
<FromGitter> <sdogruyol> i am web dev too
<FromGitter> <sdogruyol> but i love Ruby, not Rails
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vSb5d
<crystal-gh> crystal/master c49cf61 Ary Borenszweig: Removed '\1' (and other) invalid escape sequences from chars. Fixes #4309
j2k has joined #crystal-lang
<FromGitter> <yxhuvud> I like most of rails. It is big enough to fit some parts that isn't very nice despite that. I wish I had a time machine and could go back 10 years and convince DHH to not include callbacks into AR though..
<FromGitter> <chuckremes> @yxhuvud If Ruby had core (or stdlib) support for futures, callbacks would have never been necessary. Maybe some day...
<FromGitter> <yxhuvud> that is still solving the wrong problem. People need to learn to not write callback spaghetti, not have other ways to create it.
<FromGitter> <sdogruyol> agreed
<FromGitter> <sdogruyol> our mind is not meant to handle callback hells lol
<FromGitter> <fridgerator> haha
<FromGitter> <sdogruyol> at least not in this world lol :D
<FromGitter> <chuckremes> Not sure I follow how futures make callback spaghetti. With a future, you write code as though it is all executing synchronously.
<FromGitter> <sdogruyol> the execution flow is still async
<FromGitter> <fridgerator> when callbacks become sentient
<FromGitter> <sdogruyol> you jump from stack to stack
<FromGitter> <chuckremes> so what? it’s hidden from the application programmer for the most part.
<FromGitter> <sdogruyol> BTW i've done a lot of node.js to learn this hard way :/
<FromGitter> <sdogruyol> IMHO CSP solves this
<FromGitter> <sdogruyol> spawn e.g
<FromGitter> <chuckremes> that kind of contradicts your futures complaint though. `spawn` creates async execution flow.
<FromGitter> <yxhuvud> like the problem is not that people do things later, it is that they start to create other records etc in after_create or whatever. side effects galore and hard to reason about.
<FromGitter> <chuckremes> @yxhuvud That I can agree with.
LastWhisper____ has joined #crystal-lang
<FromGitter> <stereosteve> regarding crystal UI... I saw this earlier: https://github.com/Fusion/libui.cr ⏎ haven't tried it out yet, but looks cool.
NIk-- has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Philpax_ has joined #crystal-lang
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Philpax__ has joined #crystal-lang
Philpax has quit [Ping timeout: 255 seconds]
mark_66 has quit [Quit: Leaving.]
Philpax_ has quit [Ping timeout: 240 seconds]
Qchmqs has quit [Ping timeout: 255 seconds]
<FromGitter> <schoening> Oh gee.. gotta wait that long :< ?
gloscombe has quit [Remote host closed the connection]
<FromGitter> <redcodefinal> @phoffer I actually really hate that Ruby is thought of as a "web only" language. Most of my work with Ruby has been non-web stuff like serialport work and etc. I actually really like Ruby's (and Crystal's) IO for doing low level work. Although I think Crystal has a huge leg up on Ruby when it comes to throughput for web servers, I mean when you can serve 12 people instead of just 1 why wouldn't you?
<FromGitter> <redcodefinal> @phoffer I also think that moving the ecosystem chat out of here would be good, however, since Crystal is still so new and the chat is still fledgling, it might be a good idea to keep everyone in the same place for now. Especially since there are tools out there right now that I'd like to see move into the main package, like crystal-icr or a debugger of some kind, and the sharing of ideas in here is actually p
<BlaXpirit> redcodefinal, icr is a hack; a better tool is built in
<FromGitter> <bew> builtin?
<BlaXpirit> $ crystal play
<FromGitter> <bew> ah yeah, it's not in the terminal but you're right, it's better
<FromGitter> <bew> oh idea, a crystal for the terminal :P
<BlaXpirit> what
<FromGitter> <bew> crystal play*
<BlaXpirit> ugh waste of time
<FromGitter> <bew> well if you don't recode the editor, not really
j2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<RX14> yeah you could totally just launch $EDITOR
<RX14> although I think that the better solution there is to plug into the editor
<RX14> makes it a load more seamless
<BlaXpirit> ah yes, THE editor
<FromGitter> <bew> yes @RX14 that's what I was thinking, but the plugins are not in crystal *too bad*
<FromGitter> <bew> let's write an editor in crystal, so we can write plugins in crystal *I'm already out*
<FromGitter> <bew> In fact, for neovim users we could just have a plugin host, so plugins could be written in crystal :)
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 268 seconds]
Raimondii is now known as Raimondi
LastWhisper____ has joined #crystal-lang
NIk-- is now known as Nik736
<FromGitter> <schoening> I'm a webdev from next month on hehe
<FromGitter> <schoening> oi
<FromGitter> <sdogruyol> @schoening good luck with that
<FromGitter> <schoening> what
<FromGitter> <schoening> the text moves so weird haha
<FromGitter> <schoening> thanks :p
<FromGitter> <sdogruyol> Ruby?
<FromGitter> <schoening> Javascript sadly. I like it but damn.. crystal and ruby look so nice. Never done ruby before
<FromGitter> <sdogruyol> oh js :(
<FromGitter> <sdogruyol> good luck then
<FromGitter> <schoening> Haha
<FromGitter> <sdogruyol> the new php
<FromGitter> <schoening> Hey now
<FromGitter> <sdogruyol> :D
<FromGitter> <schoening> Thats not nice. I am never ever in my life gonna touch a line of php
<FromGitter> <sdogruyol> jk
<vegai> typescript is quite nice though, if you turn on every single check there is in it :P
<FromGitter> <schoening> 2 years of school with it made me seriously consider just doing dishes the rest of my life :p
<vegai> I recently figured out that their "Control flow based type analysis" is close to what Crystal is doing
<vegai> it's very much javascript though, unfortunately :-/
<FromGitter> <schoening> Idk..
<FromGitter> <schoening> So much compiling / transpiling.. tools.. This article hit way to close home: https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f
<BlaXpirit> it's bad so it needs tools to be bearable
<FromGitter> <schoening> But anyways. Now that I am actually going to have a job I am considering to... buy a license for sublime text 3. Gasp!!!
<FromGitter> <schoening> Kinda sick of the "Hey thanks for trying" popup for the last 3 or 4 years :p what ide / editor are people here using?
<FromGitter> <elorest> Seriously vim is easy and anyone who says to learn the hard way is just trying to prove they’re supperior to you. :(
<FromGitter> <elorest> On my team everyone has become just as effective with vim in like 2 days and better in a week or something.
<FromGitter> <schoening> I have to use visual studio where I start working afaik. Gonna have to use windows again :(
<FromGitter> <ltran> @schoening I bounce between vim and atom
<FromGitter> <eliasjpr> vscode with vim pluggin is nice
<FromGitter> <elorest> yeah. it works quite well. I really like how panes work in vim though.
<FromGitter> <elorest> I’ve tried spacemacs and visual studio for a few weeks.
<FromGitter> <elorest> vim works fine but the flow isn’t the same with panes
<FromGitter> <eliasjpr> yes you cant do the tabs switching either
<FromGitter> <elorest> speaking of vim for some reason crystal-vim plugin default formatting is off. Probably it should interface with `crystal tool format`
<Papierkorb> BlaXpirit: Frankly, JS ES6 (!) doesn't need tools to be bearable for many things. The JS community just loves huge libraries with large tools around it for no reason whatsoever. ES6 isn't a great language, but it's acceptable. It's the other way around, all those tools and oversized libraries makes it way too hard to do proper modern JS
<Papierkorb> A more back-to-the-roots approach helps. Let the browser do browserthings, don't implement parts of a webserver and webbrowser in JS on the users machine. Then you actually have readable code that's actually running with great performance on any device featuring a modern browser
<RX14> I just use vbuild... it seems to keep all the tooling shite out the way
<FromGitter> <schoening> @Papierkorb the more languages and tools I learn the more I agree with that sentiment. Before I knew anything but JS I wanted to use it for everything.
<FromGitter> <schoening> And I still want that silver bullet.. Just want it to be faster than js :p
<Papierkorb> There is no silver bullet, but to obtain a golden bullet you only need a few bronze ones ;)
<FromGitter> <sdogruyol> @fridgerator are you here
<FromGitter> <fridgerator> I am
<FromGitter> <sdogruyol> great :)
<FromGitter> <sdogruyol> first of all thanks for `crecto` i like it
<FromGitter> <sdogruyol> trying to use it for a project, however i am seeing some strange behaviour under heavy load
<FromGitter> <sdogruyol> it always gets into `if crecto_db.nil?` condition and reopens a connection again
<FromGitter> <fridgerator> hmmm, how much load?
<FromGitter> <sdogruyol> using `wrk` to benchmark it actually for a poc
<FromGitter> <fridgerator> I've done a test inserting 10,000 records
<FromGitter> <fridgerator> ah ok, so probably more than that?
<FromGitter> <sdogruyol> it's getting stuck at 150 rps for a simple `SELECT * LIMIT 1`
<FromGitter> <fridgerator> so somehow the connection is being closed
<FromGitter> <sdogruyol> yeah after the request is finished i guess
<FromGitter> <sdogruyol> but for each request it's opening a new connection
<FromGitter> <sdogruyol> instead of using the pool
<FromGitter> <fridgerator> ok, i'll have to look into this
<FromGitter> <sdogruyol> how about making `crecto_db` a singleton?
<FromGitter> <fridgerator> in 0.5.0 I made the `Repo` change, maybe something is being garbage collected and closing the connection
<FromGitter> <fridgerator> is your repo defined in global scope?
<FromGitter> <sdogruyol> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=58f67dc68e4b63533ddf7f35]
<FromGitter> <fridgerator> yeah thats riht
<FromGitter> <sdogruyol> and this is the query
<FromGitter> <sdogruyol> ```CrystalDemo::Repo.get_by(CrystalDemo::Name, md5sum: token)```
<FromGitter> <fridgerator> right now when `Crecto::Repo` is extended it creates a new instance of `Crecto::Repo::Config` which has the instance variable `crecto_db`. You're suggesting move `crecto_db` variable somewhere else?
<FromGitter> <sdogruyol> i'm suggestin that it should be a singleton-ish
<FromGitter> <sdogruyol> and shouldn't be instantiated again
<FromGitter> <fridgerator> its different for every Repo though
<FromGitter> <sdogruyol> oh
<FromGitter> <sdogruyol> didnt know that
<FromGitter> <fridgerator> an application can use multiple databases by defining more than 1 repo
<FromGitter> <sdogruyol> but why does it set to `nil` for each request
<FromGitter> <sdogruyol> that's the problem iho
<FromGitter> <sdogruyol> imho
<FromGitter> <fridgerator> ok i'll have to do some tests and figure out whats going on when I get home tonight
<FromGitter> <sdogruyol> cheers, thank you
<FromGitter> <sdogruyol> i'll debug a bit more
<FromGitter> <fridgerator> yes, thank you for the feedback
<FromGitter> <fridgerator> pretty critical bug
<FromGitter> <sdogruyol> :+1:
<FromGitter> <sdogruyol> thanks again for crecto
<FromGitter> <fridgerator> np, :thumbsup:
<FromGitter> <elorest> @fridgerator is mass assignment currently possible with crecto? I’m not seeing anything about it in the docs.
<FromGitter> <stereosteve> @sdogruyol when digging for perormance problems, do you use any fancy profiling tools? How do you measure where crystal program spends time?
<FromGitter> <sdogruyol> guts and intruments on os x :P
fryguy9 has joined #crystal-lang
fryguy9 has quit [Client Quit]
<FromGitter> <stereosteve> haha yeah instruments looks quite cool, need to learn how to use it
<FromGitter> <stereosteve> based on dtrace I learned
<FromGitter> <sdogruyol> it's simple
<FromGitter> <sdogruyol> just start recording and type process name. BAM!
<FromGitter> <stereosteve> ugh osx is so awesome I wish apple hardware wasn’t pushing me to linux
<FromGitter> <sdogruyol> :D
<FromGitter> <stereosteve> where the laptops are worse but cheap!
<FromGitter> <elorest> 99% of the people who buy macs don’t know any of the awesome parts of osx.
<FromGitter> <stereosteve> this book is collecting dust on my shelf: https://www.amazon.com/Mac-OS-Internals-Systems-Approach/dp/0321278542
<FromGitter> <stereosteve> dated but quite cool… really only made it 3 chapters in
<FromGitter> <elorest> I’m really glad that apple adopted usb-c but everything else about their new MBP sucks.
<FromGitter> <fridgerator> @elorest like `update_all` ?
<FromGitter> <fridgerator> http://docs.crecto.com/Crecto/Repo.html#update_all%28queryable%2Cquery%2Cupdate_hash%3ANamedTuple%29-instance-method
<FromGitter> <elorest> yeah probably. excuse the rails but what is the equi
<FromGitter> <fridgerator> `Repo.update_all(User, {name: 'test'})`
<FromGitter> <elorest> Cool.
<FromGitter> <fridgerator> Inserting into the database takes an instance of your model, or a changeset. So you would have to build the new user object `user = User.new;user.email = "me@example.com";user.name = "Isaac"` then insert the object using the repo, `Repo.insert(user)`
<FromGitter> <elorest> So could you build the changeset from a hash instead of manually setting each field?
<FromGitter> <fridgerator> Some people I work with were asking about the benefits of using a repository insatead of just `.create` or `.new` like active record. Hanami docs actually explain ir really well: http://hanamirb.org/guides/models/repositories/
<FromGitter> <fridgerator> no right now I don't have any conenience methods for creating a new Model instance with a hash, but could probably be added easily
<FromGitter> <elorest> Ok. Thanks.
<FromGitter> <elorest> Also it seems to me that with a macro we could easily have our models autoload the schema similar to active record. Is there a good reason not to do this?
<FromGitter> <fridgerator> what does AR do, read from the database on startup?
<FromGitter> <fridgerator> or read from the schema.rb file?
<FromGitter> <elorest> yeah on load it connects to the database and pulls the columns and types and creates accessors for them.
<FromGitter> <elorest> Pretty much every other ORM i’ve ever seen just defines them all manually. It doesn’t seem super dry though since we also define them in migrations.
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<FromGitter> <eliasjpr> It's interesting how things fluctuate in engineering back in 2007 I remember using hibernate orm and everyone hate it because you had to pass the object to the repo instead of calling obj.save now in this day people seems to incline with the repo pattern
A124 has quit [Ping timeout: 240 seconds]
Nik736 has quit [Quit: Textual IRC Client: www.textualapp.com]
bjz has joined #crystal-lang
<FromGitter> <fridgerator> @elorest It wouldn't be possible, because the model doesn't know how to connect to the database
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
justinmcp has quit [Ping timeout: 240 seconds]
justinmcp has joined #crystal-lang