RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.27.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
laaron has joined #crystal-lang
laaron- has quit [Remote host closed the connection]
<FromGitter> <kingsleyh> @dscottboggs_gitlab yay! Awesome work!
<FromGitter> <dscottboggs_gitlab> thanks!
<FromGitter> <dscottboggs_gitlab> There's still a problem with how bindgen interprets macro constant unsigned integers but basically the qt library is usable again as far as I can tell
* FromGitter * dscottboggs_gitlab is so excited
non-aristotelian has quit [Quit: non-aristotelian]
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron- has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron- has quit [Client Quit]
laaron has joined #crystal-lang
<FromGitter> <girng> @dscottboggs_gitlab wow O_O
<FromGitter> <girng> @dscottboggs_gitlab so basically, instead of using c++ in qt 5 we use crystal instead?
<FromGitter> <dscottboggs_gitlab> that's the idea. Bindgen doesn't appear to have a way to pull the docs from the C++ code or to write them in the YAML configs for the bindings, so you'll have to refernce the C++ documentation, but the APIs should be largely similar.
<FromGitter> <girng> @kingsleyh nice cutscene!
Raimondi has quit [Ping timeout: 240 seconds]
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron- has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron- has quit [Remote host closed the connection]
Raimondi has joined #crystal-lang
<FromGitter> <domgetter> I realize this may be a dumb question, but if I happen to know that every string in an array will match, is there a way to force the match to return type Regex::MatchData and not (Regex::MatchData | Nil) ? If I must do the nil check afterward, that's fine. Just wanted to know if there was a way to do that.
_whitelogger has joined #crystal-lang
laaron has joined #crystal-lang
<FromGitter> <proyb6> @dscottboggs_gitlab wow, I hope it could be useful for the Crystal community other than using Electron
Raimondi has quit [Ping timeout: 240 seconds]
<FromGitter> <sam0x17> if I send to a channel that doesn't have a receive set up anywhere yet, the sends will just queue up until receive is called later? yes?
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
ska has quit [Remote host closed the connection]
Renich has joined #crystal-lang
laaron has quit [Remote host closed the connection]
_whitelogger has joined #crystal-lang
Renich has quit [Read error: Connection reset by peer]
laaron has joined #crystal-lang
azuri5 has joined #crystal-lang
return0e_ has joined #crystal-lang
return0e has quit [Ping timeout: 268 seconds]
azuri5 has quit [Quit: azuri5]
<FromGitter> <bararchy> @CImrie you here?
<FromGitter> <bararchy> Great work @dscottboggs_gitlab
azuri5 has joined #crystal-lang
<FromGitter> <bararchy> you should open a PR to the main repo, and, maybe create an issue there saying the working version sits at ..
<woodruffw> @domgetter you should be able to use `.as()`, like so: https://play.crystal-lang.org/#/r/5v33
<woodruffw> that doesn't do any static inference though, it just does the nil check implicitly and throws an exception if nil
<woodruffw> alternatively (if you don't want to reference the type): https://play.crystal-lang.org/#/r/5v34
<FromGitter> <bew> @sam0x17 yes, or it depends on the type of channel, is it buffered or unbuffered?
laaron has quit [Remote host closed the connection]
laaron- has joined #crystal-lang
<FromGitter> <domgetter> @woodruffw awesome, thanks for the tip
<woodruffw> no problem!
<FromGitter> <bararchy> it seems that every week someone else need more SSL bindings, I think it's time to decide wheter `crystal/openssl` github should be created and the shard be extended via PRs
<FromGitter> <bararchy> @kingsleyh I know find myself also doing OpenSSL work on adding more X509 features
<FromGitter> <bararchy> RX14, @bcardiff wtdy?
azuri5 has quit [Quit: azuri5]
azuri5 has joined #crystal-lang
return0e has joined #crystal-lang
azuri5 has quit [Quit: azuri5]
return0e_ has quit [Ping timeout: 272 seconds]
<FromGitter> <kingsleyh> @bararchy I’m happy to contribute my OpenSSL work to a larger shard
<FromGitter> <bararchy> So would I, I just don't want antoher `datanoise/openssl.cr` or `randomstate/openssl_ext`, I want the core team to open a `crystal/openssl` so that we can PR to it and make sure it's stay up to date with current releases
azuri5 has joined #crystal-lang
<FromGitter> <bararchy> for starters so that we won't need to wait for "someone" to extract all of OpenSSL from compiler, I think just adding this repo so we can `extend` uppon the OpenSSL lib is best
<FromGitter> <kingsleyh> I don’t know how others feel about this but for convenience I switched my bindings to support the lower versions of OpenSSL because those versions are the defaults on all my computers and upgrading all them to 1.1.1 was very inconvenient
<FromGitter> <bararchy> XD ⏎ ⏎ ```openssl version ⏎ OpenSSL 1.1.1a 20 Nov 2018``` [https://gitter.im/crystal-lang/crystal?at=5c2494a5f241b2022eb963ea]
<FromGitter> <kingsleyh> So we should also discuss which of the 3 main versions to support and how to support them
<FromGitter> <bararchy> We have 3 main dev types here ⏎ ⏎ 1) Ubuntu 18:04 - openssl version? ⏎ 2) MacOS - openssl version? ⏎ 3) Arch Linux - `1.1.1a` [https://gitter.im/crystal-lang/crystal?at=5c2494ebcc024f49653444ae]
<FromGitter> <kingsleyh> MacOS has its own libre ssl thing
<FromGitter> <bararchy> oh no
laaron- has quit [Remote host closed the connection]
<FromGitter> <bararchy> I already see where this is going hahah
<FromGitter> <spTorin> ```Ubuntu 18.04 ⏎ ⏎ $ openssl version ⏎ OpenSSL 1.1.0g 2 Nov 2017``` [https://gitter.im/crystal-lang/crystal?at=5c249553db5b5c68831301a3]
<FromGitter> <kingsleyh> Also I’ve heard talk of Crystal implementing the embedded tls instead of OpenSSL. Don’t know how true that is
<FromGitter> <bararchy> embedded tls ?
<FromGitter> <kingsleyh> Also since Manas and Sikoba did a blockchain deal - I assumed together they would implement some kind of SSL
laaron has joined #crystal-lang
<FromGitter> <kingsleyh> This I think - https://en.m.wikipedia.org/wiki/Mbed_TLS
<FromGitter> <bararchy> @kingsleyh they might, it makes sense, I just want to make sure the things I need are included XD and if not, I want a place to push them to because currently STDlib OpenSSL is not being extended because "it will be moved to external shard"
<FromGitter> <kingsleyh> Yeah I totally agree with you @bararchy - about getting a core tram supported OpenSSL shard that will accept PRs
<FromGitter> <bararchy> maybe ping @asterite
<FromGitter> <kingsleyh> I’m right now also extending my ecdsa shard to include ecdh and EC curve encryption and I can see myself adding several more things too - so it definitely makes sense to pool our code
<FromGitter> <kingsleyh> We could perhaps start a new shard and port over all the existing Crystal ssl code as a start
<FromGitter> <kingsleyh> And then we can transfer it to the core team if they agree
<FromGitter> <kingsleyh> And if not - it’s still better to have it all in one shard
<FromGitter> <kingsleyh> As a side note - It’s far safer to write bindings to a well supported and battle hardened ssl lib than to write our own in Crystal - I’ve come to appreciate this with the blockchain work I’ve been doing
<FromGitter> <bararchy> that's for sure
<FromGitter> <bararchy> We can also see if `randomstate/openssl_ext` will accept PRs, this way we can use it as main shard until we get a crystal-lang/openssl repo ready
<FromGitter> <kingsleyh> Sounds good - but we should create our own if we have to wait months for PRs to be merged
<FromGitter> <kingsleyh> Also would be nice to have BN bindings in one place
<FromGitter> <kingsleyh> So some re-organisation of the code would be required
sagax has quit [Ping timeout: 246 seconds]
<FromGitter> <kingsleyh> Also should we do direct bindings or make something more similar to the Ruby API
<FromGitter> <kingsleyh> Usually I like to get the structure of the code agreed and build a skeleton into which the details can be built by contributors and us
<FromGitter> <bararchy> I personally hate `OpenSSL::SSL::SSL::OMFG::WHYSOLONG::Socket::Client` style bindings, but, it's the standard so a ruby like is best I guess
azuri5 has quit [Quit: azuri5]
laaron has quit [Remote host closed the connection]
ashirase has quit [Ping timeout: 246 seconds]
laaron has joined #crystal-lang
ashirase has joined #crystal-lang
azuri5 has joined #crystal-lang
<FromGitter> <bararchy> @omarroth you did some work also on OpenSSL in Crystal, would you join in?
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter> <bararchy> wow I hate OpenSSL @kingsleyh I feel your pain
azuri5 has quit [Ping timeout: 268 seconds]
<FromGitter> <vladfaust> Hey boys, check out the fancy README I've added to https://github.com/onyxframework/background
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter> <bararchy> "Performance" section is gold
<FromGitter> <asterite> @kingsleyh I haven't heard anything about implementing something like openssl in pure Crystal
<FromGitter> <bararchy> ( Nither did I, and it's good I didn't hahaha )
<FromGitter> <bararchy> TBH RX14, would you accept OpenSSL PRs to the STDlib until we "move" to external shard? because right now lot's of code is wasted on litle projects with no maintainrs
<FromGitter> <proyb6> Crystal 0.27.1 milestone is nearly done, I thought if it could be release on the New Year? Maybe not
<mps> bararchy: IIRC, RX14 told once he is thinking to add mbed-tls to crystal
_whitelogger has joined #crystal-lang
<FromGitter> <asterite> why would OpenSSL be moved to an external shard? How would HTTP::Client work then without it?
laaron has quit [Remote host closed the connection]
laaron- has joined #crystal-lang
<FromGitter> <bararchy> @asterite there has been a LONGGGGGGG discussion about it in multiple threads, it was decided that openssl will remain as minimal as possible in STDlib, and all other functionality will be added via external shard
<FromGitter> <asterite> Oooh... I see
<FromGitter> <j8r> The same problem is for all other bindings
<FromGitter> <asterite> I think it would make sense to have a complete openssl binding instead of a fragmented one
<FromGitter> <bararchy> I'm with you @asterite
<FromGitter> <j8r> LibC also
<FromGitter> <asterite> The only problem is that at least I don't know anything about openssl, so if PRs arrive I won't be able to review them
<FromGitter> <bararchy> That's the issue with OpenSSL, few actually know what they are doing aside from trial and error
<FromGitter> <asterite> but you know openssl, right?
<FromGitter> <bararchy> lol no
<RX14> @asterite I think the stdlib needs a tls module with an abstract api, and all the openssl raw bindings should go in a shard
<FromGitter> <bararchy> I fiddle and try a
<FromGitter> <asterite> you and kingsleyh
<RX14> So when openssl finally dies we can remove it from crystal
<FromGitter> <asterite> what's a replacement for openssl? libressl?
<RX14> Tying crystal's stdlib stability to the api of an external library which is known for making breaking abi changes is pretty bad
<FromGitter> <bararchy> @asterite no no I think I can talk for both of me and @kingsleyh when I say "we know almost nothing about it, but we play with it alot, so we learn what works"
<FromGitter> <j8r> But there isn't only OpenSSL in this case: LLVM, LibC, GMP...
<RX14> @asterite openssl, libressl, libtls, mbedtls
<RX14> There's lots of libs
<FromGitter> <asterite> but which one comes with Crystal? you'll need one
<RX14> Whatever the system uses
<RX14> On most Linux distros that's openssl
<FromGitter> <asterite> Right, but then you'll need to include an external shard for this?
<RX14> On some others that's libressl
<RX14> No
<RX14> Why?
<FromGitter> <asterite> I thought you said we'll remove openssl from the std?
<RX14> Remove the openssl modulr
<RX14> Not all openssl bindings
<RX14> Just make them private and hide them behind a cleaner api
<FromGitter> <asterite> Oh, I think I got it
<FromGitter> <asterite> the name OpenSSL won't be public
<RX14> So we have the option to switch api later
<FromGitter> <asterite> you'll have an abstraction on top of that
<RX14> Yep
<FromGitter> <asterite> Is that it?
<FromGitter> <asterite> Cool, I like that
<RX14> Good future proofing
<RX14> As I said, openssl changes api a fair bit
<RX14> And post1.0 we can't make changes to the openssl module
<RX14> So that doesn't make sense
<RX14> Tls is common, basic digests are common
<RX14> Those should be in the stdlib
<RX14> All the rsa and hmac stuff should be in shards
<RX14> Hmac is debatable
<FromGitter> <bararchy> What about X509 RX14 ?
<RX14> Obviously shards
<FromGitter> <bararchy> 👍
<RX14> But for now we need to accept everything into the stdlib
<FromGitter> <bararchy> In that regard, could we open a `crystal-lang/openssl` that will host incoming PRs ?
<RX14> So that we have all the openssl stuff in one place so we can tip it out the stdlib in one piece
<RX14> Refusing adding features to openssl because we're going to make it a shard is the worst of both worlds
<FromGitter> <bararchy> @kingsleyh I think based on what RX14 said we can PR directly to crystal repo
<FromGitter> <asterite> yes
<FromGitter> <j8r> In shard, you mean an external library? It can integrated with git submodule /subtree like Rust or vendoring like Go
<FromGitter> <straight-shoota> The layout of stdlib's abstract TLS API could already be discussed
<FromGitter> <straight-shoota> RX14 ⏎ ⏎ > we all agree that sockets being sync by default is a good idea ⏎ ⏎ ...wasn't it the other way? [https://gitter.im/crystal-lang/crystal?at=5c24d6ba93cce97d3ba568dd]
<RX14> No? I don't think so
<RX14> In that issue we did
<RX14> Then everyone changed their mind in a different issue
<RX14> @straight-shoota I'd appreciate an issue being opened on the tls api.
<FromGitter> <straight-shoota> Okay, so it reflects context outside this issue
<FromGitter> <straight-shoota> It would probably be worth referencing the discussion
<FromGitter> <straight-shoota> I'm not sure which issue, though
laaron- has quit [Remote host closed the connection]
laaron has joined #crystal-lang
gangstacat has quit [Quit: Ĝis!]
gangstacat has joined #crystal-lang
<FromGitter> <asterite> I'm running some kostya's benchmarks using the overflow branch, and so far performance remains the same. LLVM is so good :-) (or processors and predictions? I have no idea :-P)
<FromGitter> <asterite> Someone should try writing a magic number type that's either an Int64 or BigInt under the hood, depending on the value (like Ruby), and then benchmark it against regular numbers... I wonder if there would be any noticeable performance difference. Because if not, having just one integer type would be sooo cool
<FromGitter> <j8r> I've noticed too that comparing numbers and booleans are CPU cheap
<FromGitter> <j8r> some operations like additions too
Raimondi has joined #crystal-lang
gangstacat has quit [Quit: Ĝis!]
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
gangstacat has joined #crystal-lang
Raimondi has quit [Ping timeout: 240 seconds]
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter> <Sija> @asterite any idea what’s happening in #6997?
<DeBot> https://github.com/crystal-lang/crystal/issues/6997 (Module validation failed: Function return type does not match operand type of return inst)
laaron has quit [Remote host closed the connection]
Raimondi has joined #crystal-lang
DTZUZO has joined #crystal-lang
<oprypin> kingsleyh, with all this talk about splitting openssl -- maybe u should mention the problems you ran into with that, about not being able to choose the lib and being careful not to conflict
<FromGitter> <kingsleyh> Oprypin good idea! I will summarise it and attach it to an issue
<FromGitter> <kingsleyh> @dscottboggs_gitlab I know you are trying to use QT but I've recently been playing with Nuklear and I'm considering writing a wallet GUI for SushiChain using Nuklear - so in the process creating some Crystal bindings for it: https://github.com/vurtun/nuklear
<FromGitter> <kingsleyh> if you have a look at the screenshots on the README it's quite nice looking
<oprypin> kingsleyh, uh it doesnt actually draw anything by itself. have u seen usage examples? https://github.com/vurtun/nuklear/blob/master/example/file_browser.c
<FromGitter> <kingsleyh> yeah - it's just the UI part
non-aristotelian has joined #crystal-lang
Raimondi has quit [Ping timeout: 240 seconds]
Renich has joined #crystal-lang
Renich has quit [Quit: Renich]
<FromGitter> <Willyboar> there is a nice conversation in both amber and lucky channels about how much gitter
<FromGitter> <Willyboar> what do you think?
<FromGitter> <bararchy> I hate discord, I hate Gitter too TBH but discord is not developer friendly at all
<FromGitter> <Willyboar> personally i find gitter very bad. especially mobile app
<FromGitter> <bararchy> yeha, totally agree
<FromGitter> <bararchy> I play D&D with a group on discord, it's perfect because of VOIP and gaming bot integration, but for a dev community? seems meha
<FromGitter> <Willyboar> well to be honest i didn’t try discord yet.
<FromGitter> <kingsleyh> None of the chat clients I’ve used are that great
<FromGitter> <kingsleyh> They each have their own issues
<FromGitter> <Willyboar> No one is perfect.
Raimondi has joined #crystal-lang
<FromGitter> <sam0x17> @bew how do I specify buffered vs unbuffered for a channel ?
_whitelogger has joined #crystal-lang
<FromGitter> <j8r> Gitter has at least GitHub/GitLab integration
<FromGitter> <j8r> @Willyboar you can use an IRC client for this channel
<FromGitter> <j8r> Furthermore I found the future of Discord is more uncertain than Gitter, owned by GitLab. Discord isn't
<FromGitter> <j8r> ...still profitable
<FromGitter> <j8r> Only solution I can see is Matrix
blassin has quit [Ping timeout: 245 seconds]
<FromGitter> <anamba> matrix would be interesting. i've been wanting to put together a crystal client for that.
blassin has joined #crystal-lang
<FromGitter> <Willyboar> @j8r I think you can create webhook for github.
<FromGitter> <Willyboar> I suppose you can do the same for girls
moei has quit [Quit: Leaving...]
<FromGitter> <dscottboggs_gitlab> @kingsleyh I'm actually just trying to get any sort of simple desktop graphics system working at all. I don't have any particular desktop project in mind at the moment. That said, Nuklear looks rather nice but equally if not more verbose and hard to use for simple UI elements than Qt.
<FromGitter> <kingsleyh> Getting QT working with Crystal is very cool and I will certainly use it
<FromGitter> <j8r> @Willyboar Didn't know, but I doubr the integration goes as far as Gitter (right panel with PR/issues, people's GitHub profile etc). They are not mandatory at all, just a little plus
<FromGitter> <j8r> :)
<FromGitter> <j8r> The best: https://matrix.org/blog/home/
<FromGitter> <j8r> It would be a great project to implement a server in Crystal 😀
<FromGitter> <j8r> @anamba yeah it would be cool! :o
<FromGitter> <anamba> @j8r as i understand it, the existing implementations are pretty resource hungry. so a crystal version could be popular
<FromGitter> <bew> @sam0x17 if you don't know then it's unbuffered, and the behavior you describe earlier is what'll happen (receive will block)
<FromGitter> <bew> Huh no, send will block (iirc that was your example)
<FromGitter> <zbaylin> quick question -- are fibers not supposed to spawn when running crystal spec?
<FromGitter> <bew> why would not they spawn? (& what's your real question/issue?)
<FromGitter> <bew> (maybe your fibers doesn't execute because you don't let them execute?)