RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.24.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
maattdd_ has quit [Ping timeout: 240 seconds]
<travis-ci> crystal-lang/crystal#224d489 (master - Return early in Time#add_span if arguments are zero (#5787)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/351082975
<DeBot> https://github.com/crystal-lang/crystal/pull/5787 (Return early in Time#add_span if arguments are zero)
<travis-ci> crystal-lang/crystal#f0bd6b6 (master - Update readline.cr (#5791)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/351086632
maattdd_ has joined #crystal-lang
Yxhuvud has quit [Ping timeout: 265 seconds]
Yxhuvud has joined #crystal-lang
maattdd_ has quit [Ping timeout: 256 seconds]
<FromGitter> <faustinoaq> > crystal is in the chart : https://redmonk.com/sogrady/2018/03/07/language-rankings-1-18/
<FromGitter> <faustinoaq> πŸŽ‰ @fridgerator
<FromGitter> <fridgerator> πŸ‘
<FromGitter> <faustinoaq> I always wanted to see crystal in redmonk rank
<FromGitter> <faustinoaq> Looks like is pretty accurate
<RX14> looks way more accurate than the tiobe ones
<FromGitter> <faustinoaq> Yeah, I think same πŸ‘
<FromGitter> <faustinoaq> The funny thing is than Tiobe helped us to gain a lot of newcomers πŸ˜… ⏎ ⏎ I stiil see some "engineers" and "speakers" referencing Tiobe a lot πŸ˜…
<FromGitter> <faustinoaq> Well, crystal is nice, so we are nice ✨
maattdd_ has joined #crystal-lang
maattdd_ has quit [Ping timeout: 256 seconds]
return0e has quit [Ping timeout: 252 seconds]
return0e_ has joined #crystal-lang
maattdd_ has joined #crystal-lang
maattdd_ has quit [Ping timeout: 252 seconds]
maattdd_ has joined #crystal-lang
maattdd_ has quit [Ping timeout: 240 seconds]
maattdd_ has joined #crystal-lang
maattdd_ has quit [Ping timeout: 240 seconds]
sz0 has joined #crystal-lang
hightower3 has joined #crystal-lang
hightower2 has quit [Ping timeout: 245 seconds]
maattdd_ has joined #crystal-lang
maattdd_ has quit [Ping timeout: 268 seconds]
vikaton has quit [Quit: Connection closed for inactivity]
maattdd_ has joined #crystal-lang
maattdd_ has quit [Ping timeout: 240 seconds]
andrewzah has quit [Quit: ""]
maattdd_ has joined #crystal-lang
maattdd_ has quit [Ping timeout: 260 seconds]
andrewzah has joined #crystal-lang
andrewzah has quit [Client Quit]
sz0 has quit [Quit: Connection closed for inactivity]
andrewzah has joined #crystal-lang
andrewzah has quit [Client Quit]
andrewzah has joined #crystal-lang
andrewzah has quit [Client Quit]
maattdd_ has joined #crystal-lang
andrewzah has joined #crystal-lang
andrewzah has quit [Client Quit]
maattdd_ has quit [Ping timeout: 248 seconds]
andrewzah has joined #crystal-lang
andrewzah has quit [Remote host closed the connection]
andrewzah has joined #crystal-lang
andrewzah has quit [Client Quit]
andrewzah has joined #crystal-lang
andrewzah has quit [Quit: ""]
maattdd_ has joined #crystal-lang
andrewzah has joined #crystal-lang
qard has joined #crystal-lang
maattdd_ has quit [Ping timeout: 248 seconds]
qard has quit [Quit: qard]
qard has joined #crystal-lang
qard has quit [Remote host closed the connection]
qard has joined #crystal-lang
qard has quit [Ping timeout: 240 seconds]
maattdd_ has joined #crystal-lang
maattdd_ has quit [Ping timeout: 248 seconds]
rohitpaulk has joined #crystal-lang
olbat has quit [Ping timeout: 240 seconds]
maattdd_ has joined #crystal-lang
maattdd_ has quit [Ping timeout: 252 seconds]
maattdd_ has joined #crystal-lang
maattdd_ has quit [Ping timeout: 256 seconds]
<livcd> Crystal more popular than haxe ? hmmm
Ven`` has joined #crystal-lang
flaviodesousa has joined #crystal-lang
maattdd_ has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 256 seconds]
maattdd_ has quit [Ping timeout: 256 seconds]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rohitpaulk has joined #crystal-lang
bonemind has joined #crystal-lang
Ven`` has joined #crystal-lang
maattdd_ has joined #crystal-lang
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
maattdd_ has quit [Ping timeout: 240 seconds]
<FromGitter> <alex-lairan> No, he have more projects than Haxe :) ⏎ ⏎ But Haxe have move SO questions
<FromGitter> <alex-lairan> I think # of projects on Github is not relevant. ⏎ ⏎ Old languages will stay on top
Ven`` has joined #crystal-lang
<livcd> yeah true
maattdd_ has joined #crystal-lang
maattdd_ has quit [Ping timeout: 240 seconds]
<FromGitter> <codenoid> hi
<FromGitter> <codenoid> long time no see
maattdd_ has joined #crystal-lang
DTZUZO has quit [Ping timeout: 260 seconds]
maattdd_ has quit [Ping timeout: 256 seconds]
maattdd_ has joined #crystal-lang
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <yxhuvud> unless you only compare with number of commits created and new questions created
Ven`` has joined #crystal-lang
bonemind has quit [Ping timeout: 240 seconds]
rohitpaulk has quit [Ping timeout: 268 seconds]
<RX14> or amount of code written
<FromGitter> <alex-lairan> amount of code? C win πŸ˜‰
<crystal-gh> [crystal] straight-shoota opened pull request #5794: Improve #inspect format for Time types (master...jm/fix/time-to_s) https://git.io/vApcF
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <yxhuvud> negative with amount of code is that people often include large javascript libraries or whatever and vendor the code
<RX14> yeah
<RX14> i'd probably do number of commits
alex`` has joined #crystal-lang
wojnar has joined #crystal-lang
<FromGitter> <yxhuvud> (also I'm not certain java is denser than C. More error prone in many ways, definitely, but so much boilerplate crap)
Ven`` has joined #crystal-lang
alex`` has quit [Quit: WeeChat 2.0.1]
maattdd_ has quit [Ping timeout: 240 seconds]
bonemind has joined #crystal-lang
DTZUZO has joined #crystal-lang
snsei has quit [Remote host closed the connection]
alex`` has joined #crystal-lang
alex`` is now known as alexherbo2
alexherbo2 is now known as alex``
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
return0e_ has quit [Read error: No route to host]
return0e has joined #crystal-lang
duane has joined #crystal-lang
Ven`` has joined #crystal-lang
maattdd_ has joined #crystal-lang
Papierkorb has joined #crystal-lang
andrewzah has quit [Quit: ""]
andrewzah has joined #crystal-lang
wojnar has quit [Quit: Leaving]
Ven`` has quit [Read error: Connection reset by peer]
Ven`` has joined #crystal-lang
maattdd_ has quit [Ping timeout: 252 seconds]
maattdd_ has joined #crystal-lang
wojnar has joined #crystal-lang
<crystal-gh> [crystal] ysbaddaden closed pull request #5790: Fixed File.extname edge case for '.' in path with no extension (master...fix/file.extname) https://git.io/vAAEy
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 276 seconds]
Papierkorb has left #crystal-lang ["Konversation terminated!"]
<travis-ci> crystal-lang/crystal#5a189cb (master - Fix: File.extname edge case for dot in path with no extension (#5790)): The build was broken. https://travis-ci.org/crystal-lang/crystal/builds/351317668
<DeBot> https://github.com/crystal-lang/crystal/pull/5790 (Fixed File.extname edge case for '.' in path with no extension)
maattdd_ has quit [Ping timeout: 268 seconds]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 255 seconds]
maattdd_ has joined #crystal-lang
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven`` has joined #crystal-lang
<crystal-gh> [crystal] RX14 pushed 1 new commit to master: https://git.io/vApS4
<crystal-gh> crystal/master 4ef9167 TSUYUSATO Kitsune: Improve String#pretty_print output by splitting newline (#5750)...
<FromGitter> <Jens0512> I went ahead and suggested something insane https://github.com/Homebrew/brew/issues/3901
<RX14> you see how people got annoyed when people went around suggesting everything got written in rust?
<RX14> I don't want that kind of reputation as a community
<RX14> also I think going up to another project and suggesting they rewrite everything *as an outsider* is never going to work
<FromGitter> <Jens0512> I thought it was worth a try, and never heard of this rust-reputation
<RX14> it's just going to get you ridiculed
<FromGitter> <Jens0512> Yes i know
<RX14> because it's unlikely unless you contribute that you know how much work it is to rewrite
<RX14> and how well a language suits
<RX14> "Homebrew is slow, that is because Ruby is slow, there are no arguments against this."
<RX14> I wouldn't be so sure about that either
<FromGitter> <straight-shoota> `at least a 100 times faster` is a bold statement for an application that's using IO operations as a central tool
<RX14> that's doing LINEAR IO operations
<RX14> it has to do x then y then z
<RX14> it can't do them all at the same time
<RX14> there's little that eventing gains you with such a workload
<RX14> and as for how much time is spent waiting on IO and how much is spent in the ruby interpreter is something I would have benchmarked a lot before even considering a rewrite
<RX14> because without that you have no idea why you're slow
<FromGitter> <bararchy> Does MacOS always comes with Ruby installed ?
<FromGitter> <Jens0512> Yes
<FromGitter> <Jens0512> Ok. I am stupid. But I will not just go ahead and close the issue, I really think something at least has to be done about the speed.
<FromGitter> <bararchy> Even most Linux dist don't have it pre-installed
<FromGitter> <straight-shoota> and you would need to come up with a practical solution for including dynamic formulas
<FromGitter> <Jens0512> That sounds easy enough
<FromGitter> <straight-shoota> how?
<FromGitter> <bararchy> Can you translate then to JSON format ?
<FromGitter> <straight-shoota> "practical solution"
<FromGitter> <bararchy> HahH
<RX14> you'd end up writing all your furmulas in shell scripts
<RX14> like most distros do
<RX14> the package manager is in C but the pkage build scripts are in shell
<RX14> building a package is slow (because you need to compile shit) but installing it is fast
<RX14> which is ideal for 99% of users
bonemind has quit [Quit: WeeChat 2.0.1]
<travis-ci> crystal-lang/crystal#4ef9167 (master - Improve String#pretty_print output by splitting newline (#5750)): The build was fixed. https://travis-ci.org/crystal-lang/crystal/builds/351360367
<DeBot> https://github.com/crystal-lang/crystal/pull/5750 (Improve String#pretty_print output by splitting newline)
flaviodesousa has quit [Ping timeout: 248 seconds]
maattdd_ has quit [Ping timeout: 240 seconds]
andrewzah has quit [Quit: ""]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andrewzah has joined #crystal-lang
Ven`` has joined #crystal-lang
Ven`` has quit [Client Quit]
wojnar has quit [Remote host closed the connection]
<crystal-gh> [crystal] straight-shoota opened pull request #5795: Add highlight to code tag in generated API docs (master...jm/feature/docs-highlight-code) https://git.io/vAhJw
<FromGitter> <bararchy> Trying to call this from Crystal fails ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ It shows me that this isn't a function in the binded lib, an educated guess from my end tells me this is somekind of macro? is this why I can't call it? [https://gitter.im/crystal-lang/crystal?at=5aa2c99c6fba1a703ae9feeb]
<FromGitter> <bararchy> I never actually developed in C\C++ so I'm sorry if this sounds like a stupid question
<FromGitter> <yxhuvud> Memset is part of libc, no?
<FromGitter> <yxhuvud> But it is inlined. Is it declared in a .h file?
<FromGitter> <bararchy> yes
<FromGitter> <bararchy> it's in an .h file
<RX14> @bararchy inline functions are basically macros
<RX14> well i'm sure you get the idea
<RX14> they're directly included into the calling function by the C compiler
<RX14> instead of being exported as symbols by the linker
<FromGitter> <bararchy> I see, so to handle them in crystal I should just see what it actually do and copy the logic , as there is now way to call it from Crystal
<FromGitter> <bararchy> Right?
<RX14> yes
<FromGitter> <bararchy> Cool, thanks :)
<RX14> @bararchy btw, i'm working on getting back to you
<RX14> was unexpectedly busy yesterday
<FromGitter> <bararchy> πŸ‘ its OK, take your time :)
<RX14> thanks
<FromGitter> <greenbigfrog> Hi. it's me again... ⏎ I pull my config from a json file, so my config class looks sth like: ⏎ ⏎ ```code paste, see link``` ⏎ ... [https://gitter.im/crystal-lang/crystal?at=5aa2d61e6f8b4b99460aeaf7]
<FromGitter> <straight-shoota> you can either define `SomeOtherClass.from_json` to do that for you or configure a converter
<FromGitter> <greenbigfrog> how would my from_json have to look like for example?
<FromGitter> <greenbigfrog> Right now I
<FromGitter> <greenbigfrog> Right now I've got following: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5aa2dd71c3c5f8b90d52b486]
<FromGitter> <straight-shoota> it needs to be a class method
snsei has joined #crystal-lang
<FromGitter> <straight-shoota> Ah, sorry. from_json was wrong
<FromGitter> <straight-shoota> You need to define `SomeOtherClass.new(JSON::PullParser)`
<FromGitter> <greenbigfrog> Ah. ok.
snsei has quit [Ping timeout: 252 seconds]
<FromGitter> <faustinoaq> I saw RubyVMs written in C, Java, Javascript (Opal), LLVM (rubinius), others like Trufle, etc, etc ⏎ ⏎ Should be possible to writte a RubyVM in crystal as well? πŸ˜…
<FromGitter> <bew> Yes, but why ? Λ†Λ†
<FromGitter> <faustinoaq> > Does MacOS always comes with Ruby installed ? ⏎ > Even most Linux dist don't have it pre-installed ⏎ ⏎ @bararchy Its depends, In Manjaro by example ruby come installed by default, along side with other lenguages like perl, python, lua, tcl, mono, gcc, java and shell. (Yes, I know, so many languages installed by default), I think is mainly because program dependencies, Manjaro comes with a bunch of
<FromGitter> ... software by default (I uninstall all of them, though πŸ˜… ) [https://gitter.im/crystal-lang/crystal?at=5aa2e56953c1dbb743c3499a]
<FromGitter> <faustinoaq> > Yes, but why ? Λ†Λ† ⏎ ⏎ for fun? πŸ˜…
<FromGitter> <faustinoaq> @bew ^
<FromGitter> <bew> Then yeah sure
<FromGitter> <faustinoaq> Manjaro Linux is quite popular these days πŸ˜„
<FromGitter> <bew> Wow that's nice
<FromGitter> <faustinoaq> Yeahm When I began to use it, Manjaro was not even in top 20 πŸ˜…
<FromGitter> <faustinoaq> There are so many distros as well
<FromGitter> <faustinoaq> The thing why I like Manjaro so much is because is rolling release and is easy to maintain, I have almost 2 years using it without reinstalling, just usual updates, always running latest stable software πŸ˜„
snsei has joined #crystal-lang
<FromGitter> <faustinoaq> Antergos and KaOS look very good as well
snsei has quit [Ping timeout: 245 seconds]
<FromGitter> <bew> I'm use Arch since ~3 years now, it's pretty much the same (just little breakage from time to time, but nothing serious) I never really used anything else and I'll probably just stick to Arch, for some more time..
elisaado has left #crystal-lang ["I went to the store to get more FIRE to start the war"]
<FromGitter> <straight-shoota> yes Arch is great... though I haven't used it for a while.
<FromGitter> <straight-shoota> stuck with windows
<FromGitter> <greenbigfrog> anyone got an example on how I'd use the pullparser?
<FromGitter> <faustinoaq> Hi @veelenga we're discussing some things about ameba on scry roon πŸ‘‰ https://gitter.im/crystal-scry/Lobby ⏎ ⏎ Please, take a look! πŸ˜…
<FromGitter> <bew> hum, the pull parser is not documented in the API doc.. For you usecase, either you do aparser, or a converter. For example if you only want a String, but add some parsing on it, you can use a converter.
<FromGitter> <bew> @greenbigfrog https://crystal-lang.org/api/0.24.1/JSON.html#mapping(_properties_%2Cstrict%3Dfalse)-macro look at the `converter` param
<FromGitter> <greenbigfrog> yeah.... I totally don't understand how to use it though
<FromGitter> <bew> here is an example converter https://crystal-lang.org/api/0.24.1/Time/EpochConverter.html
<FromGitter> <faustinoaq> > yes Arch is great... though I haven't used it for a while. ⏎ ⏎ @straight-shoota @bew Yeah, Arch is awesome, although is a pretty different story on a production server πŸ˜… ⏎ ⏎ I always use debian, ubuntu or centos on servers, sometimes I try alpine with docker [https://gitter.im/crystal-lang/crystal?at=5aa2ecdee4ff28713a1392b4]
<FromGitter> <elorest> I love pacman and aur but my installations do seem to break a lot more than when I'm using ubuntu desktop.
<FromGitter> <elorest> Tried going back to ubuntu for dev though and really missed arch.
<FromGitter> <straight-shoota> sure, rolling releases is not great for production servers
<FromGitter> <elorest> Finally got my ruby colored Model 3. they didn't really have a crystal color unless you count black.
<FromGitter> <bew> wow
<RX14> super nice
<RX14> lol with the nikola motors jacket
<FromGitter> <greenbigfrog> Thanks for the help @bew and @straight-shoota
<crystal-gh> [crystal] bcardiff merged merge/0.24 into master: https://git.io/vAhEX
<crystal-gh> [crystal] bcardiff closed pull request #5642: (WIP) Crystal 0.24.2 (master...release/0.24) https://git.io/vNPll
Disrecollection has quit [Quit: Leaving.]
snsei has joined #crystal-lang
<FromGitter> <bararchy> How would I go to translate this to Crystal? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5aa2fa278f1c77ef3aa1c885]
<FromGitter> <bararchy> I mean the internal part
<FromGitter> <bararchy> ```*((uint32_t *) addr + (nr >> 5)) |= (1 << (nr & 31));```
<FromGitter> <bew> not sure why it's doing a `nr >> 5`..
<FromGitter> <bararchy> I'm not sure what the hell is the * in the start means
<FromGitter> <bararchy> > is a bit swap no?
<FromGitter> <bararchy> oh..
<FromGitter> <bararchy> ```>> means a bit swipe no? ⏎ ``` [https://gitter.im/crystal-lang/crystal?at=5aa2fb2ae4d1c63604e0b9d6]
<FromGitter> <bew> the `*(expr)` it's a pointer dereference => accessing the value at the pointer `expr` in my example
<FromGitter> <bew> bit shift
snsei has quit [Ping timeout: 240 seconds]
<FromGitter> <bararchy> ^ this
<FromGitter> <bararchy> so in Crystal is like calling `Pointer.value` ?
<FromGitter> <bew> yes, that's the logic (not sure it is needed in this case)
<RX14> no
<RX14> there's no pointer defererences here
<RX14> oh nvm
<RX14> there's one
<FromGitter> <bew> ^^
<RX14> on the outside
<RX14> I missed that
<FromGitter> <bew> yes, to set the value at the specified addr
<RX14> I thought you were referring to the uint32_t* cast
<RX14> but there is one on the result of the whole expr
<FromGitter> <bararchy> I really hate C :\ nothing makes sense haha
<RX14> I mean it's not that bad
<RX14> you just do addr = addr_ptr.value
<RX14> ptr = Pointer.new(addr + (nr >> 5))
<RX14> ptr.value |= (1 << (nr & 31))
<RX14> there
<RX14> oh shit
<RX14> addr_ptr.value.to_u32
<RX14> but yes that's an uuugly expression
<FromGitter> <bararchy> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5aa2fde835dd17022e3fb1d8]
<FromGitter> <mjago> Don't blame C ~ blame the obfuscation meister who wrote that line πŸ˜‰ Written literately it would have been optimised to the same thing πŸ˜™
<FromGitter> <bararchy> @mjago That's the damn guys at Bluez
<RX14> yeah I think that's right @bararchy
<RX14> about 95% sure
<FromGitter> <bararchy> no docs, no clear API. ⏎ you wanna use it? good, read the source code
<FromGitter> <bararchy> ffs
<RX14> sounds fun :)
<FromGitter> <bararchy> cool, thanks RX14 :)
<travis-ci> crystal-lang/crystal#731e9c0 (master - Merge changes from 0.24.2 with master): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/351496453
<FromGitter> <straight-shoota> deobufscating C code will become an olympic discipline some day
<FromGitter> <pr-yemibedu> or people will just use tools like c2nim more often to understand intent over ritual.
<RX14> I mean that one's not too bad
<RX14> I've seen way worse in C
duane has quit [Ping timeout: 240 seconds]
<FromGitter> <bew> @bararchy the cr code is not right
<FromGitter> <mjago> @bararchy oh the Bluetooth stuff ~ I'll be sorted next week so will help out of I can.
<FromGitter> <mjago> Of/if
<FromGitter> <bew> I think it should be `ptr = addr + (nr >> 5)`
<FromGitter> <bew> ah no
<FromGitter> <bararchy> @mjago Awsome :) i'm still working on the bindings but it's going to be an OS project MIT licensed etc...
<FromGitter> <bararchy> I finished the dbus-bluez bindings
<FromGitter> <bararchy> not the best work I done but good enough I guess
<FromGitter> <bararchy> and now I needed something more low-level
<FromGitter> <bararchy> so binding Bluez-Clib
<FromGitter> <bararchy> @bew ?
<FromGitter> <bew> `ptr = addr.as(UInt32*) + (nr >> 5)`
<FromGitter> <bew> sth like that
<FromGitter> <bararchy> @bew so this? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5aa301510a1614b71200cd66]
<RX14> oh derp
<RX14> you are correct
<RX14> no not that
<FromGitter> <bararchy> without the pointer new then?
<RX14> ptr = addr.as(UInt32*) + (nr >> 5)
<RX14> yep
<FromGitter> <mjago> @bararchy πŸ‘ cool. I've been in transition a few weeks but settles next week. My last project was ble in C, prototyped in Crystal - but not bluez. Anyway in pub so signing off 🍺
<FromGitter> <bararchy> @mjago Sounds cool! enjoy your beer
alex`` has quit [Ping timeout: 240 seconds]
<FromGitter> <bararchy> btw, if someone want to play around, the specs already allow you to scan for non BLE bluetooth from Crystal :) ⏎ https://github.com/bararchy/bluetooth
andrewzah has quit [Quit: ""]
<RX14> needs documentation haha
<FromGitter> <bararchy> yeha lol
<FromGitter> <bararchy> I'm trying to get a basic end2end working
andrewzah has joined #crystal-lang
<FromGitter> <bararchy> RX14 this is what actually works now https://github.com/bararchy/bluetooth/blob/master/spec/local_device_spec.cr
<RX14> I feel like trying lol
<FromGitter> <bararchy> and when I get BLE working I'll work on binding the connect, send command,etc..
<FromGitter> <bararchy> go for it, it's really cool !
<RX14> is it bluetooth or BLE or both?
<FromGitter> <bararchy> Only bluetooth right now, the things you helped me work on is the BLE part
<FromGitter> <elorest> <RX14> ⏎ ⏎ > **<RX14>** lol with the nikola motors jacket ⏎ ⏎ That was unintentional although I do wear that jacket a lot. I took delivery of the Model 3 wearing it too. [https://gitter.im/crystal-lang/crystal?at=5aa30452c3c5f8b90d537738]
<FromGitter> <bararchy> RX14 for BLE scan to work this part need to work too https://github.com/bararchy/bluetooth/blob/master/spec/hci_spec.cr#L102-L103 ⏎ using the above C example for referance, and lots of lokking into bluetooth.h and hci.h
<RX14> yeah it looks nice
<FromGitter> <bararchy> XD
<FromGitter> <elorest> @bararchy I was under the impression that HCI was deprecated...
<FromGitter> <bararchy> well, they want to, they want all functionality to move over to DBUS, the thing is DBUS does not have full support for GATT and other stuff, (experimental state)
<FromGitter> <bararchy> also, DBUS is annoying
<FromGitter> <bararchy> I personally hate XML
<FromGitter> <bararchy> hahah
<FromGitter> <CImrie> Don't anything more to input other than eugh... xml.
<FromGitter> <bararchy> ^ this XD
<RX14> indeed
<FromGitter> <bararchy> if DBUS would have supported JSON i might have more love toword it, but it also screws up working with binery data, and forces you to follow Python, so binding the DBUS-Bluez in Crystal was like ⏎ ⏎ Crystal -> XML -> Python -> C > Python > XML -> Crystal
<FromGitter> <bararchy> so I figured, lets bind directly to C
<FromGitter> <bararchy> and be done with this insanity
<RX14> why python?
<FromGitter> <bew> Note: I'm working on pure dbus for crystal, I already have the authentication working, I'm working on the protocol for messages r8t now
<FromGitter> <bararchy> RX14, it seems DBUS is using `python` or `python like` languge as it's "DSL" or whatnot, I actually had a need to send it `__import__('dbus').Boolean(0, variant_level=1)` for reasons unkwon
<FromGitter> <pr-yemibedu> that sounds so nice without python
<FromGitter> <bew> Cool a new blog post ;)
<FromGitter> <bararchy> RX14 Awsome !!!!
<FromGitter> <bararchy> cool blog
<FromGitter> <bararchy> this means we have nightly bineries ?
<FromGitter> <bararchy> @bew That's cool!
<FromGitter> <straight-shoota> yeay
<FromGitter> <bararchy> I might change by dbus-bluez to use your solution
<RX14> yeah nightly binaries
<FromGitter> <faustinoaq> Wow, I didn't know I can do this: `def bar(*{String, String}.from(arr))` ⏎ ⏎ I knew `Tuple#from` method but I didn't know about using it with splat parameters πŸ˜… ⏎ ⏎ https://stackoverflow.com/a/49169004/7450793 [https://gitter.im/crystal-lang/crystal?at=5aa308b9458cbde557176b11]
<FromGitter> <greenbigfrog> if I want a method to once compare if sth is bigger and the next time if it's smaller, what's the best way to pass in a `<` or `>`?
<RX14> you sure you don't want <=>
<RX14> also usually a block with a and b and then you use a > b or a < b is the most flexible
<RX14> but otherwise just use an enum or symbols or sth
<FromGitter> <greenbigfrog> hm... ok... thanks
<FromGitter> <bew> @faustinoaq I love this example: https://crystal-lang.org/api/0.24.2/NamedTuple.html#from%28hash%3AHash%29-instance-method
<FromGitter> <bew> @bararchy what is GATT ? I tried to search quickely but don't understand the use
Disrecollection has joined #crystal-lang
<FromGitter> <CImrie> @bew "Generic Attribute Profile" - basically a specification to say that BLE devices use things called services and each service has characteristics. ⏎ You can 'discover' services and characteristics, and listen for characteristic notifications etc. So if you subscribed to a button-press characteristic for example, you'd be notified when the button was pressed on the peripheral. Though AFAIK which
<FromGitter> ... characteristic does that is up to the manufacturer, even though there are common ones in use for compatibility.
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 256 seconds]
<FromGitter> <bew> Oh ok, I see what you mean, thank you
<crystal-gh> [crystal] RX14 closed pull request #5576: Fix unexpected h1 in CHANGELOG.md (master...fix/changelog) https://git.io/vNs8a
<crystal-gh> [crystal] RX14 pushed 1 new commit to master: https://git.io/vAhyQ
<crystal-gh> crystal/master 34b1101 Johannes MΓΌller: Add highlight to code tag in generated API docs (#5795)