ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.23.1 | 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
rkeene has quit [Quit: -.0) [EOF]
faustinoaq has joined #crystal-lang
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Creatornator has joined #crystal-lang
justicefries has joined #crystal-lang
<FromGitter> <codenoid> morning Crystaller
robacarp has quit [Ping timeout: 264 seconds]
<justicefries> o/
robacarp has joined #crystal-lang
vivus has quit [Quit: Leaving]
woodruffw has quit [Read error: Connection reset by peer]
woodruffw has joined #crystal-lang
woodruffw has quit [Changing host]
woodruffw has joined #crystal-lang
woodruffw has quit [Ping timeout: 240 seconds]
woodruffw has joined #crystal-lang
woodruffw has quit [Changing host]
woodruffw has joined #crystal-lang
woodruffw has quit [Read error: Connection reset by peer]
woodruffw has joined #crystal-lang
woodruffw has quit [Changing host]
woodruffw has joined #crystal-lang
woodruffw has quit [Ping timeout: 255 seconds]
woodruffw has joined #crystal-lang
woodruffw has quit [Changing host]
woodruffw has joined #crystal-lang
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
woodruffw has quit [Read error: Connection reset by peer]
woodruffw has joined #crystal-lang
woodruffw has quit [Changing host]
woodruffw has joined #crystal-lang
woodruffw has quit [Ping timeout: 276 seconds]
woodruffw has joined #crystal-lang
woodruffw has joined #crystal-lang
woodruffw has quit [Changing host]
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
justicefries has joined #crystal-lang
woodruffw has quit [Quit: And then he took off.]
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
justicefries has joined #crystal-lang
justicefries has quit [Client Quit]
justicefries has joined #crystal-lang
woodruffw has joined #crystal-lang
woodruffw has joined #crystal-lang
woodruffw has quit [Changing host]
justicefries has quit [Client Quit]
woodruffw has quit [Ping timeout: 248 seconds]
justicefries has joined #crystal-lang
justicefries has quit [Client Quit]
justicefries has joined #crystal-lang
woodruffw has joined #crystal-lang
woodruffw has quit [Changing host]
woodruffw has joined #crystal-lang
Creatornator has joined #crystal-lang
woodruffw has quit [Read error: Connection reset by peer]
woodruffw has joined #crystal-lang
woodruffw has quit [Changing host]
woodruffw has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 276 seconds]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
illyohs has quit [Remote host closed the connection]
justicefries has joined #crystal-lang
rohitpaulk has joined #crystal-lang
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aroaminggeek has joined #crystal-lang
aroaminggeek has quit [Quit: Textual IRC Client: www.textualapp.com]
aroaminggeek has joined #crystal-lang
<FromGitter> <bararchy> Morning guys
<aroaminggeek> o/
rohitpaulk has quit [Ping timeout: 268 seconds]
aroaminggeek has quit [Read error: Connection reset by peer]
aroaminggeek has joined #crystal-lang
rohitpaulk has joined #crystal-lang
aroaminggeek has quit [Quit: Textual IRC Client: www.textualapp.com]
aroaminggeek has joined #crystal-lang
aroaminggeek has quit [Client Quit]
<FromGitter> <Rinkana> Monring
<FromGitter> <Rinkana> Morning*
Papierkorb_ has joined #crystal-lang
<FromGitter> <codenoid> I have difficulties with crystal oauth (https://crystal-lang.org/api/latest/OAuth2.html) with google people api,
flaviodesousa has joined #crystal-lang
mark_66 has joined #crystal-lang
rohitpaulk has quit [Read error: Connection reset by peer]
rohitpaulk has joined #crystal-lang
<FromGitter> <bararchy> oprypin I'm playing around with your dbus bindings
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
ShalokShalom has quit [Remote host closed the connection]
alex`` has joined #crystal-lang
alex`` is now known as alexherbo2
alexherbo2 is now known as alex``
<jokke> coming back to my zeromq threading problem: i gather from the docs, that the function i'm using will always be run in the current thread and will be blocking until the whole context is terminated: http://api.zeromq.org/2-1:zmq-device
<jokke> what are my options?
<FromGitter> <bew> what method are you using which block the thread?
<FromGitter> <bew> nvm
<jokke> Device.create
<jokke> seems to me i need to fork
<FromGitter> <bew> https://github.com/crystal-community/zeromq-crystal/issues/11 seems that you'll have to do it your way
<jokke> mmh
<Papierkorb_> We already told you that implementing zmq is not only doable (simple protocol), but also the correct way to go about it if libzmq can't be integrated with libevent
<FromGitter> <bararchy> does someone has some experiance with gdbus?
<jokke> Papierkorb_: lol i'm not going to implement zmq
<Papierkorb_> Even when Crystal gains real threading, that solution will still block a whole thread
<Papierkorb_> It will *always be crap*
<Papierkorb_> Then integrate it with libevent. if it can't, then open an issue on their end.
<Papierkorb_> Even with threading, it will look like it works, but what actually happens is that you drastically degrade the performance of the whole application.
<jokke> how come?
<Papierkorb_> Scheduler et al.
<Papierkorb_> What I write won't change things anyway.
<FromGitter> <bew> jokke looks like someone did an integration: http://inerciatech.com/post/3442759929/zeromq-with-libevent but he didn't integrate the queue system (which you're trying to use..)
<jokke> ah
<jokke> interesting
<Papierkorb_> It's almost as if we already suggested integrating it with libevent
<Groogy> what us zeromq?
<Groogy> is*
<FromGitter> <bararchy> an Message Queue system like RabbitMQ, etc..
rohitpaulk has quit [Ping timeout: 260 seconds]
<Papierkorb_> much simpler (and less powerful) though. Many also used it as "stateful UDP" when it was hip
woodruffw has quit [Read error: Connection reset by peer]
<RX14> Calling zmq a message queue is kind of an insult lol
<RX14> Its a bad name
<Papierkorb_> oh dang, thunderbird has known vulns, patched in 52.5
<RX14> When I was looking at zmq I remember that its possible for zmq to give you a file descriptor which you might be able to use with libevent
<RX14> But I didn't try it
<Papierkorb_> Which isn't yet in the arch repository >_>
<RX14> And its still going to be way slower than just biting the bullet and implementing zmq
<RX14> Wow
<RX14> Looking at the thunderbird security history is depressing
<RX14> Makes me want to sandbox everything
<Papierkorb_> Well it's another one .. for mails using script?
<Papierkorb_> Why on earth are emails even capable of doing that
<Papierkorb_> So something you have to explicitly enable each time .. which has never happened
<Papierkorb_> RX14: The cake was still pdf.js in FF running in the system sandbox and it running JS embedded into PDF with full rights
<RX14> Haha
<RX14> Whyy
<Papierkorb_> You mean "Why did it run there in the first place?!" or "Why does PDF support JS?!"
<Papierkorb_> Both valid question
<Papierkorb_> s
<RX14> If you're going to have a js pdf viewer it surely should run as a user privileged script
<RX14> Otherwise you've just written a pdf viewer in a shit language for no reason
<Papierkorb_> And even sandboxing isn't a solution by itself. it's not good enough, and too error prone. Ask Chrome lul.
<FromGitter> <MrSorcus> https://github.com/crystal-lang/crystal/issues/5326 - Why JS-client doesn't receive binary? Only byte length without any payload.
<Papierkorb_> A text document meant for printing has simply no business to run logic
<RX14> Makes me want to start from scratch
<RX14> Like that templeos guy
<RX14> Except without the racism
<Groogy> "is a biblical-themed lightweight operating system created in the span of a decade by the American programmer "
<Papierkorb_> he's not racist, he's simply mentally ill (no joke)
<Groogy> ಠ_ಠ
<Papierkorb_> There was a decent writeup by a guy who took a look at it, it has quite a few interesting aspects
<Groogy> "The operating system was designed to be the Third Temple according to Davis and ..."
<Groogy> pretty sure that's pretty damned heretical
<Papierkorb_> He really has a mental disorder. forgot the english name.
<Groogy> read the history on the wikipage....
<Groogy> pretty much sums it up
<Groogy> also I kind of want to learn HolyC
<FromGitter> <bararchy> Groogy that was a WTF moment in wikipedia right now
<FromGitter> <bararchy> hahaha
<Groogy> "ou can run a program without compiling it, simply by using an #include statement from the command line. The program is then brought into the shell's current namespace, and from there you can execute individual functions directly just by issuing commands."
<Groogy> wtf?
<Groogy> that is super weird, scary and cool at the same time
<Papierkorb_> It's just a different paradigm
<Groogy> "It uses a non-standard text format which has support for hypertext links, images and 3D meshes to be embedded into what are otherwise regular ASCII files. A file can have, for example, a spinning 3D model of a tank as a comment in source code."
rohitpaulk has joined #crystal-lang
hightower2 has joined #crystal-lang
<Papierkorb_> Isn't that actually an interesting feature for a game dev?
<Papierkorb_> you're writing a physics simulation and can put a sample animation on top of it as 'comment'?
rohitpaulk has quit [Ping timeout: 240 seconds]
hightower3 has quit [Ping timeout: 268 seconds]
<Papierkorb_> It is different, but that's mainly cause we assume that our source files are pure plain-text. That they are is an implementation detail.
DTZUZO has quit [Read error: No route to host]
<Groogy> Yes I wsn't dissing it
<Groogy> I thought it was cool
<Groogy> I can also imagine all the 90's gif make a comeback in source comments
<Groogy> like there's some code with a comment "no idea why but have to do it like this or else it crashes" foillowed by this
<FromGitter> <bararchy> lol
<Groogy> more how think it would be used
jiriki has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 276 seconds]
rohitpaulk has joined #crystal-lang
woodruffw has joined #crystal-lang
woodruffw has quit [Changing host]
woodruffw has joined #crystal-lang
<jokke> RX14: why is calling zmq a message queue an insult?
<RX14> because it's not
<RX14> it's a complete messaging protocol with so many features
<jokke> well... you can use it like one
<RX14> it's not even a queue
<jokke> sure is
<RX14> you have to build a queue yourself with zmq
<travis-ci> crystal-lang/crystal#7033082 (master - Semantic: prevent infinite recursion by alias and generics combination (#5330)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/308443109
<DeBot_> https://github.com/crystal-lang/crystal/pull/5330 (Sementic: prevent infinity recursion by alias and generics combination)
<jokke> RX14: wat?
<jokke> you make a push and a pull socket. done
<RX14> with multiple producers and consumers?
<jokke> yes
<RX14> and work ack?
<jokke> well you will have to add a socket for that
<jokke> sure zmq is very simple but i find that one of the major benefits of zmw
<jokke> zmq
<RX14> sure
<jokke> if you only need a small subset of the features of a "fully featured" message queue, it's great
<RX14> so it's a bad message queue and it has loads of functions that isn't a message queue
<RX14> it's not a message queue
<RX14> its a bad name
<jokke> well they could call it libmq :D
<jokke> that's basically what it is. a library for building message queues
<RX14> it's a library for communication in general
<RX14> it's much more general and powerful than just message queues
justicefries has joined #crystal-lang
<jokke> yeah that's true
snsei has joined #crystal-lang
snsei has quit [Client Quit]
<jokke> anyhoo now i fork the zmq proxies :P
<jokke> works like a charm :P
snsei has joined #crystal-lang
<RX14> ouch
rohitpaulk has quit [Ping timeout: 240 seconds]
<jokke> hehe
<jokke> it's fine. the only thing the program does is just that: proxying zmq message
<jokke> s
<jokke> basically a little "broker" just so it can run on well known addresses so that clients can just connect to it instead of having to know whether they have to bind or to connect.
<FromGitter> <bew> finally!!! the build passes for #4056 :D
<DeBot_> https://github.com/crystal-lang/crystal/pull/4056 (Add abstract unix socket handling)
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<crystal-gh> [crystal] mverzilli closed pull request #5321: Add `Time.utc` (master...jm-time-utc) https://git.io/vFAFh
rohitpaulk has joined #crystal-lang
justicefries has joined #crystal-lang
Creatornator has joined #crystal-lang
<travis-ci> crystal-lang/crystal#1978c8b (master - Add `Time.utc` (#5321)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/308475512
aroaminggeek has joined #crystal-lang
aroaminggeek has quit [Client Quit]
<RX14> I took a dumber approach to a cross-platform IO::FileDescriptor: https://github.com/crystal-lang/crystal/commit/5cd64b0848350005e2e909b1b44d2e2c565b9eca
<RX14> cc oprypin if you're arround
<RX14> I still need to look at the FileDescriptor subclasses
aroaminggeek has joined #crystal-lang
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Creatornator has joined #crystal-lang
<oprypin> fine by me, i dont have much to say
<oprypin> bararchy, pls use qdbusviewer
<FromGitter> <bararchy> oprypin is it more informative ?
<oprypin> that's what i've always used. honestly it's probably about the same, i just have gtk-phobia
Papierkorb_ has quit [Quit: Konversation terminated!]
<oprypin> bararchy, getting a property seems to be the same as calling a method
<oprypin> judging from these being identical https://github.com/oprypin/crystal-dbus/blob/de1f39e0/src/introspect.cr#L112 and #L74
illyohs has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 268 seconds]
DTZUZO has joined #crystal-lang
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <bararchy> Hmmmm
<FromGitter> <bararchy> So I think I'm missing something else, I keep getting org.bluez is not part of any .service file as the reply for each call
<FromGitter> <bararchy> Does it make sense ? Or a bug on my end ?
<FromGitter> <bew> do you see it using a dbus viewer?
aroaminggeek has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<crystal-gh> [crystal] sdogruyol opened pull request #5331: Add 0.24.0 to CHANGELOG (master...master) https://git.io/vbUfu
<FromGitter> <bararchy> That's what's weird
<FromGitter> <bararchy> Also, using bluetoothctl works
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <bew> are you sure you connect to the system dbus?
<oprypin> definitely not
<oprypin> org.bluez.hci1 should be org.bluez
rohitpaulk has joined #crystal-lang
<FromGitter> <bararchy> Tried too , not working either
<FromGitter> <bew> it default to the session dbus
<FromGitter> <bararchy> Oh
<FromGitter> <bararchy> I need to specify system then I guess
<FromGitter> <bew> yep in ALL CAPS
<FromGitter> <bew> hmm no that in the lib, there's probably a wrapper
<FromGitter> <bew> nvm you'll find it
<FromGitter> <bararchy> Thanks @bew
justicefries has joined #crystal-lang
Creatornator has joined #crystal-lang
<FromGitter> <bararchy> Working ! awsome
<FromGitter> <bararchy> oprypin, it seems calling a method and getting a propertiy are not the same? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5a1d9f4e8b3a9e2c0c2aa9b3]
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <bararchy> http://screencloud.net/v/7uA21
<FromGitter> <bararchy> using qdebusviewer :)
justicefries has joined #crystal-lang
<FromGitter> <bararchy> maybe the "signiture" needs to be something else ?
snsei has quit [Remote host closed the connection]
mark_66 has quit [Remote host closed the connection]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <bararchy> ok, figured it out, properties are "read" using a different interface
<FromGitter> <bararchy> wow, I hate dbus
<FromGitter> <bararchy> :\
<FromGitter> <bararchy> too bad blueZ droped the C API
<FromGitter> <bew> What do you mean? How did you get the property? (In code)
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <bararchy> This is my code ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5a1da28fba39a53f1af5f1c5]
<FromGitter> <bew> Ah ok
<FromGitter> <bararchy> I don't see the logic there, but, well, it works
<FromGitter> <bararchy> it feels like writing Java :\
<FromGitter> <bew> X) write a little wrapper with macros for the boilerplate and you'll be happy again!
<Papierkorb> I mean dbus does interfaces, we support abstract modules - Close enough
<Papierkorb> you can generate a wrapper class out of that with macros
<Papierkorb> Or of course a simple macro def'ing a wrapper from a Call
flaviodesousa has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<FromGitter> <bew> exactly
<faustinoaq> Hi, Crystal has very good results on [TFB round 15](https://www.techempower.com/benchmarks/previews/round15), however we are slower than ruby on [Multiples queries test](https://www.techempower.com/benchmarks/previews/round15/#section=data-r15&hw=ph&test=query&l=zb28se) and [Data updates test](https://www.techempower.com/benchmarks/previews/round15/#section=data-r15&hw=ph&test=update&l=zb28se)
<faustinoaq> Somebody knows how we can make crystal faster on Data updates and multiples queries? @marksiemers @drujensen RX14? 🙂
<RX14> benchmark it
<RX14> dont do anything without benchmarking
<faustinoaq> 👍 Do You mean ruby db drivers vs crystal db drivers?
DTZUZO has quit [Read error: Connection reset by peer]
<RX14> i meant profile actually
DTZUZU has quit [Read error: Connection reset by peer]
<RX14> look at what's taking up the time
DTZUZO has joined #crystal-lang
DTZUZU has joined #crystal-lang
<faustinoaq> Oh, I understand, using something like instruments or valgrind 👍
claudiuinberlin has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 264 seconds]
faustinoaq has quit [Read error: Connection reset by peer]
Creatornator has joined #crystal-lang
faustinoaq has joined #crystal-lang
justicefries has joined #crystal-lang
watzon_ has joined #crystal-lang
faustinoaq has quit [Quit: IRC client terminated!]
<FromGitter> <johnjansen> anyone know if you can lock the T of a subclass of a Generic class ⏎ ⏎ ```class Dictionary < Set ⏎ end``` ⏎ ⏎ where Dictionary will only contain strings, but is essentially a Set on steroids [https://gitter.im/crystal-lang/crystal?at=5a1dc1c9540c78242d5d0f83]
<FromGitter> <bew> `class Dictionary < Set(String)`
<FromGitter> <johnjansen> lovely, thanks @bew
<FromGitter> <bew> not sure it's a good idea to subclass standards containers though (no argument, it's sth I've heard)
<FromGitter> <johnjansen> yeah, im not sure either … seems this is close but no cigar anyway `can't extend non-abstract struct Set(String)`
<FromGitter> <bew> ah then you can't subclass Set, because it's a struct, you should play with composition here not inheritance
<FromGitter> <johnjansen> yeah, dont think that will work either, but thats ok … just an experimental approach
<Papierkorb> bew, the issue by itself isn't that you're inheriting from a std class. The thing is OOP-y: A sub-class should augment and/or extend existing logic of the base-class. More often than not, that's not your actual intent when inheriting from a std class
<FromGitter> <johnjansen> this time it is … add a max_word_length to a set of only strings and some other dictionary stuff ;-)
<FromGitter> <bew> Better explanation here ^ :) thanks Papierkorb
<FromGitter> <johnjansen> of course there are 1000 ways to achieve this … just thought id have a hack at this one and see how it felt
<Papierkorb> johnjansen, I'm not sure on the name "Dictionary", but if you thought about it it's fine! Though if Set is a struct, then your 'class' has to be a struct too.
<FromGitter> <johnjansen> it didnt work even as `Struct Dictionary < Set(String)` … `can't extend non-abstract struct Set(String)`
<Papierkorb> Ah now I see. Yeah you can't inherit from a non-abstract struct, which Set is
<Papierkorb> You can easily build a Set-y thing from a Array or Hash yourself. Or you build a delegator class (I think the fancy name was Decorator Pattern)
<FromGitter> <johnjansen> ;-) … its a nice idea, seeing as my Dictionary needs most of Set and wouldnt be wrong with all of it
<FromGitter> <johnjansen> and yes Dictionary is a little ambiguous ;-)
<Yxhuvud> bew: then there are some standard classes, like String, that you really can't inherit from.
<oprypin> why is set a struct lol
<Yxhuvud> My guess? no reason to make it an object - it will contain a pointer to the underlying hash (which in turn is an object).
<Papierkorb> it's probably a wrapper around Hash? So an optimization?
<FromGitter> <johnjansen> internally it uses a `Hash` and essentially just uses the keys
<Papierkorb> I mean it's not expected, but that you don't even notice it until you want to do something kinda unusual, shows that it's viable
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
justicefries has joined #crystal-lang
<FromGitter> <bararchy> Can't belive this is actually working hahah https://github.com/NeuraLegion/blue_cr/blob/master/spec/blue_cr_spec.cr
Creatornator has joined #crystal-lang
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Creatornator has joined #crystal-lang
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
justicefries has joined #crystal-lang
Creatornator has joined #crystal-lang
vivus has joined #crystal-lang
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Creatornator has joined #crystal-lang
Creatornator has quit [Client Quit]
Creatornator has joined #crystal-lang
Creatornator has quit [Client Quit]
justicefries has quit [Quit: Textual IRC Client: www.textualapp.com]
Creatornator has joined #crystal-lang
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Creatornator has joined #crystal-lang
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Creatornator has joined #crystal-lang
Creatornator has quit [Quit: Textual IRC Client: www.textualapp.com]
faustinoaq has joined #crystal-lang
<crystal-gh> [crystal] RX14 opened pull request #5333: Move File and IO::FileDescriptor's platform-specific parts to Crystal::System (master...feature/io-crystal-system-2) https://git.io/vbU7t