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
<FromGitter> <cevarief> How can i translate this ruby code to crystal? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=59a20c7f210ac26920c5ba09]
<FromGitter> <cevarief> We do need to use a macro?
<FromGitter> <picatz> You can't include/extend inside a `def`
<FromGitter> <picatz> ``````
<FromGitter> <picatz> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=59a20dc566c1c7c477e55a4d]
<FromGitter> <picatz> Something like that would be a way to compose something like what you'd like / the require being simulated with just the module being required, essentially.
<FromGitter> <picatz> Does that make sense?
<FromGitter> <cevarief> Ah alright
<FromGitter> <cevarief> make sense
<FromGitter> <picatz> 👍 cool beans
<FromGitter> <cevarief> thank you
<FromGitter> <picatz> anytime ( as long as I can actually help, that is 😅 )
ShalokShalom has joined #crystal-lang
<FromGitter> <ShalokShalom> someone already thought about a Ruby transpiler?
<FromGitter> <ShalokShalom> would help to bring Ruby projects to Crystal
<FromGitter> <ShalokShalom> full libs support
<FromGitter> <picatz> I'm sure it'd be pretty tricky if not a bit impossible. Though, maybe I'm wrong. I dunno.
<wmoxam> The problem is types, and metaprogramming
<wmoxam> I am interested in crystal transpilers though
<wmoxam> something like jsx for gui stuff
<Papierkorb> cevarief, see the included hook
<Papierkorb> ShalokShalom, even if doable, I'm not sure if that'd be desirable. Crystal ain't Ruby. Some patterns just don't translate well
<Papierkorb> The syntax of both languages may be (deliberatly) similar, but you're still jumping from dynamic typing to static typing. That alone renders many design patterns useless (or not doable, like using `send(:foo)`), and makes other patterns possible (Like using proper method overloading)
<FromGitter> <picatz> Crystal's method overloading is pretty cool 👍
snsei_ has quit [Remote host closed the connection]
sz0 has quit [Quit: Connection closed for inactivity]
snsei has joined #crystal-lang
<FromGitter> <cevarief> @picatz is it possible to include module X inside a class?
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
<FromGitter> <codenoid> hi, Where the location of the crystal folder on OS X ?
snsei has joined #crystal-lang
<FromGitter> <codenoid> o, `$ brew info crystal-lang`
snsei has quit [Remote host closed the connection]
<FromGitter> <cevarief> @picatz Solved. I have to use extend rather than include to avoid instantiating class. AnotherClass.hello.
<FromGitter> <fridgerator> Method overloading <3
<ShalokShalom> Papierkorb: how does Bucklescript this? Nim, Kotlin, Scala and all the others who compile from static typed languages into a dynamic one?
<ShalokShalom> wmoxam: hi there. how did you solve the issues with your port? you named issues with cases where hashes are the primary method of passing data around. did you come them by?
<ShalokShalom> the result can be something like 'interpret Crystal and compile Ruby', so one stack that works for both. :)
Disrecollection has joined #crystal-lang
<ShalokShalom> Papierkorb: What do you mean with: Sub-classing C++/Qt classes - Overriding virtual C++ methods
<ShalokShalom> I mean its clear enough for sure, i am simply a beginner. :)
maxpert has joined #crystal-lang
maxpert has quit [Remote host closed the connection]
Disrecollection has quit [Quit: Leaving.]
<FromGitter> <mgarciaisaia> What dynamic languages on top of the JVM do is to, well, target the JVM. It may be compared(ish) with creating another language that targets the LLVM and call it a dynamic crystal
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
<FromGitter> <codenoid> ```code paste, see link``` ⏎ ⏎ idk why but find() need query :( , i want get all the data, mongo.cr [https://gitter.im/crystal-lang/crystal?at=59a26fd2bc46472974c811b7]
alex`` has joined #crystal-lang
<vegai> RX14: whoa. Thanks for the review comments!
<vegai> some work ahead :P
<vegai> for a minute there, I thought it was almost done
<vegai> RX14: can you elaborate this comment a bit? https://github.com/crystal-lang/crystal/pull/4876#discussion_r135403885
<vegai> why shouldn't one prefer preventing the setting of these attributes from the outside?
<vegai> aren't these values immutable like this (from the outside)
<vegai> does crystal have a way to make these values immutable also internally?
<FromGitter> <krypton97> Anyone here using arch linux ove ubuntu? Looking to switch from solus since the packet manager is not that rich as pacman/apt
<FromGitter> <krypton97> over*
<FromGitter> <krypton97> Should I go back to ubuntu or use arch. I've had a bunch of issues with ubuntu back then..
<FromGitter> <krypton97> Mostly graphics and kernel issues
<FromGitter> <codenoid> nice, haha http://mongoc.org/libmongoc/current/tutorial.html
<vegai> try NixOS, krypton97 :P
<FromGitter> <codenoid> try utero OS, it's written in Crystal
<ShalokShalom> http://kaosx.us
<ShalokShalom> It use Pacman and is independent
<vegai> so many distros
<vegai> but seriously, I do prefer Arch Linux over almost everything
<vegai> although this NixOS is quite interesting
<Groogy> orning!
<Groogy> Morning* ops :P
<FromGitter> <codenoid> morning ~ groogy 😆
<ShalokShalom> vegai: you are the Habitat guy, right?
<ShalokShalom> NixOS and they are heavly influence, yeah?
<vegai> ShalokShalom: well not really. I find it interesting and have made a few contributions
<vegai> I find NixOS interesting for pretty much the same reasons
<ShalokShalom> i see
<ShalokShalom> wasnt it you with the high five some days ago?
<vegai> yes
<FromGitter> <codenoid> hi, what are faster way to define a string hash, `{} of String => String`
<Groogy> how do you mean faster as in performance or just typing it?
<Groogy> Because the language is compiled there's not going to be a "faster" way to define it in runtime performance
<FromGitter> <sdogruyol> Morning everyone
<FromGitter> <codenoid> typing it
<Groogy> don't think there is, I mean the compiler might be able to infer the type so then you might not have to type it out explicitly?
<FromGitter> <codenoid> idk
bmcginty has quit [Ping timeout: 248 seconds]
_whitelogger has joined #crystal-lang
ShalokShalom has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
bjz has joined #crystal-lang
<FromGitter> <bararchy> Morning @sdogruyol , cool thing you did with the recepies for Kemal
z64 has joined #crystal-lang
<z64> hey there ; any users of crystal-pg abouts?
bmcginty has joined #crystal-lang
ar1a has joined #crystal-lang
<ar1a> z64: sucks
<FromGitter> <cevarief> [ASK] How to make module method as private?
<z64> cevarief: https://carc.in/#/r/2lmb ?
<ar1a> psych
<FromGitter> <cevarief> Using private keyword. thanks <z64> 👌
<z64> no problem :)
<FromGitter> <sdogruyol> thanks @bararchy :)
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
renovo has joined #crystal-lang
<Papierkorb> ‎ShalokShalom‎, it allows you to sub-class C++ classes from Crystal, and also to override (reimplement) C++ virtual methods (Which are the only kind of method overridable in C++)
<FromGitter> <cevarief> In module, anything like initialize or class constructor?
<z64> no ; modules cannot be instanced
<z64> they are meant to act as namespaces and containers for methods to be mixed in to other classes via `include` or `extend`
<z64> you can see examples of their proper use and more info here: https://crystal-lang.org/docs/syntax_and_semantics/modules.html
<FromGitter> <cevarief> Actually i want to avoid instantiating class
<z64> read further on that page. `extend self` may be what you're looking for / `def self.foo`
<FromGitter> <cevarief> Can make it as singleton to store state?
<FromGitter> <cevarief> I should create a class or can it be used @@ in module?
<z64> you can use them in a module, yes
<FromGitter> <cevarief> great
renovo has quit []
<FromGitter> <schoening> Oh. Float64 is the same as JavaScripts number type? :D
<Papierkorb> if your JS engine defines its number type as 64bit floating point type, yes
<FromGitter> <schoening> I think they have to? I think thats defined in the standart?
bjz has joined #crystal-lang
<FromGitter> <schoening> I havent read it tho. I only got my info from mozilla developer network, and the number type there and crystals float64 both pointed to the same wiki link :p
<FromGitter> <bararchy> Papierkorb nice !! https://github.com/Papierkorb/qt5.cr
<FromGitter> <ShalokShalom> yeah, its awesome ^-^
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Papierkorb> And master-ready-to-use should work now™ without clang development stuff, you only require Qt libs+headers
<FromGitter> <codenoid> are you working on linux os @Papierkorb ?
<Papierkorb> codenoid, ArchLinux, yes
<FromGitter> <ShalokShalom> So ready for the Qt Wiki page?
<Papierkorb> Well, it's not prod ready. Next to weird crashes in some places (Which may have been fixed by recent bindgen updates), many crucial widgets are missing
<FromGitter> <ShalokShalom> did you spend a look on the generic libraries i shared with you?
<Papierkorb> I'll jump from TechPreview to Beta, and at that point, it'll be a "prod ready but it may eat your cat" state like Crystal is in
<Papierkorb> I didn't ShalokShalom, didn't see how much help it would get me considering that 99% of the Qt bindings and wrappers are auto-generated already
<Papierkorb> Even QML should feel right at home with probably a few custom converters here and there
<Papierkorb> ShalokShalom, or does it do something more than essentially providing a C wrapper?
<FromGitter> <ShalokShalom> I simply detect them at my evaluation for a Elixir binding, my experience as developer is currently still in its pre-alpha ;)
maxpert has joined #crystal-lang
<FromGitter> <bararchy> Papierkrob, why MPL license though ?
<Papierkorb> Why not?
<FromGitter> <ShalokShalom> https://github.com/filcuc/DOtherSide
<FromGitter> <ShalokShalom> Its already in usage for 3 different languages; Nim, D and Rust.
<FromGitter> <ShalokShalom> And are you interested into KDE bindings as well? Like for Kirigami, k18n and other stuff, that helps qt development?
<FromGitter> <ShalokShalom> They are Tier1, so without any other KDE bindings required. :)
<Papierkorb> bararchy I don't like MIT. I only request that people using it 1) contribute *to their users* if they make changes which is unlikely they have to 2) To note somewhere in their distributed product that they're using my bindings and where to acquire them. I'm giving you access to a huge framework, most likely enabling you do your project in the first place - All I ask for is that little recognition as payment. Sounds fair to me.
<Papierkorb> ShalokShalom, in the long term, sure
<FromGitter> <ShalokShalom> fine ^-^
<FromGitter> <ShalokShalom> Go developer the-recipe started already as well with them - next to C++ is there any other KDE binding you know of?
<FromGitter> <bararchy> Papierkorb I'm not against it, just wondering, I usually use MIT, my thinkning is that If I want to create an Opensource and free code, I should not bind my users to any "rules" regarding it, else, just make it free as in beer , But it's fine either way, I get your reasoning
<FromGitter> <ShalokShalom> CC Zero is also an option
ar1a has quit [Quit: WeeChat 1.9]
<Papierkorb> codenoid, make sure you're using the master-ready-to-use branch in your shard.yml, and then to rerun `crystal deps`. If it still doesn't work afterwards, please gist your shard.yml
<FromGitter> <codenoid> after your comment , https://gist.github.com/codenoid/a0d41216a60c26d2d24aba286020c433 ⏎ btw, again ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=59a2d2d58f4427b462a3e869]
<Papierkorb> Can you show me the output of `crystal deps`?
<FromGitter> <codenoid> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=59a2d339210ac26920c8412e]
<Papierkorb> Please try with `crystal deps`, not `shards`
<Papierkorb> They don't seem to be in sync
<FromGitter> <codenoid> same
<FromGitter> <codenoid> same result, btw when i use master, i got like `post, ext,`, etc process
<Papierkorb> the `master` branch is for development, it can't be used right away (this is intended). That's what the X-ready-to-use branch is for
<FromGitter> <bararchy> btw, `crystal deps update` is the command to use, I think .. I remmber something like that when deps will only install but wont update
<Papierkorb> codenoid, the commit hash in your output indicates you're on master. that won't work. Make sure you're at the HEAD of master-ready-to-use.
<FromGitter> <LuckyChicken91_twitter> is `loop` faster than `while true`?
<Papierkorb> Maybe even force a full update by removing .shards/ and lib/ in your project dir
<FromGitter> <codenoid> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=59a2d40cee5c9a4c5f04ee5a]
maxpert has quit [Remote host closed the connection]
<Papierkorb> that looks better
<FromGitter> <codenoid> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=59a2d440210ac26920c844e5]
<Papierkorb> codenoid, run `lib/qt5/ext/try_build.sh`. See if it succeeds.
<Papierkorb> If not, you don't have the necessary Qt development files (libs and headers) installed
<Papierkorb> The `postinstall` thing eats any output, even errors .. so yeah, that'll hopefully be fixed at some point
<FromGitter> <codenoid> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=59a2d4acba0f0f6e38eaa3b1]
<Papierkorb> Yup, please install qt development files on your system
maxpert has joined #crystal-lang
<FromGitter> <bararchy> @codenoid What OS are you using
<FromGitter> <bararchy> ?
<FromGitter> <codenoid> OS X @bararchy
<Papierkorb> The current build system relies entirely on Linux standard paths. I don't have a Mac to even begin testing.
<Papierkorb> Also, it's Qt5, *not* Qt4
<FromGitter> <codenoid> ok ^^
<FromGitter> <bararchy> Papierkorb and you need QT 5 and up no ?
<FromGitter> <bararchy> It seems @codenoid is using 4.8
<Papierkorb> It's baffling that OS X doesn't even ship with a usable `readlink` binary.
<FromGitter> <bararchy> Oh nvm
<FromGitter> <LuckyChicken91_twitter> is `loop` faster than `while true`?
<Papierkorb> bararchy, Yep, Qt5. And we're currently at Qt5.9, so it might be that qt5.cr will switch on to Qt6 before the "final" release
<FromGitter> <bararchy> @LuckyChicken91_twitter Not sure, but I know that it's a better thing to use loop do instead of while true
<FromGitter> <bararchy> Maybe while true will check if true is still true every iteration ?
<Papierkorb> A major release of Qt happens every 4-6 years, so I guess it makes more sense on the long run to get most users over the the latest before that point. Though a qt5 branch will stick around, as many distributions just love to ship with super outdated Qt libs >_>
<Papierkorb> codenoid, do you have Qt4 and/or Qt5 dev files installed?
<FromGitter> <codenoid> i have no qt, :O , *qt5 installation process
<FromGitter> <ShalokShalom> 'as many distributions just love to ship with super outdated Qt libs >_>'
<FromGitter> <ShalokShalom> @Papierkorb What, really? :D
<FromGitter> <ShalokShalom> Our distro is on stable Plasma5 without any KDE SC 4 libs since about 2 1/2 years.
<maxpert> I think I know the answer but, is there a way in crystal to explicitly hint a delete on some object? :P
<FromGitter> <codenoid> Is there any other way of installing qt apart from its official site?
<Papierkorb> It's not even funny anymore. Ask KDE the same question. Both Qt and KDE has to fight with numerous bug reports (partially angrily written) by people using Debian and such. Huge waste of everybodies time.
<Papierkorb> maxpert: The compiler doesn't track object lifetime. Rust does.
<maxpert> @Papierkorb hey :D you are here :D
<FromGitter> <ShalokShalom> Papierkorb: They prefer such outdated distros.
<FromGitter> <ShalokShalom> Especially Kubuntu and Neon.
<Papierkorb> They? "They" have no idea what they're doing mostly.
<FromGitter> <ShalokShalom> KDE release team, yeah.
<FromGitter> <ShalokShalom> Hnn, who is the leader?
<Papierkorb> The KDE releases for Arch have been fine for the most part
<FromGitter> <ShalokShalom> yeah, Arch used PKGBUILDs from KaOS for the transition
<FromGitter> <ShalokShalom> idk since how long they use their own, basement is still the same i guess
<FromGitter> <ShalokShalom> Arch was afaik also the only binary distro, which accepted - at least after some months of rejection - that mixing the libaries of old and new KDE becomes unhealthy.
<FromGitter> <ShalokShalom> Next to KaOS of course.
<Papierkorb> With the switch to Plasma5, KDE4 was *gone*
<Papierkorb> There was barely a grace period. May have been a few weeks at best.
<Papierkorb> That doesn't include KDE4 apps of course, as many of those were not (or are still not) ported to Qt5/KDE5 yet
<FromGitter> <ShalokShalom> The very most still packaged both together
<FromGitter> <ShalokShalom> And a lot of the apps are ready since a much longer as the official release.
<FromGitter> <ShalokShalom> Today, nearly everything is ported
<FromGitter> <ShalokShalom> Complete Qt4 removal in May 16: https://forum.kaosx.us/d/1469-qt-4-removal
<FromGitter> <codenoid> same ⏎ ☝️ August 27, 2017 9:16 PM (https://gitter.im/crystal-lang/crystal?at=59a2d440210ac26920c844e5)
<FromGitter> <ShalokShalom> What exactly?
<FromGitter> <codenoid> ```code paste, see link``` ⏎ ⏎ i'll try with my ubuntu [https://gitter.im/crystal-lang/crystal?at=59a2dbf476a757f808eb3889]
<Papierkorb> Ubuntu Artful (whatever version that is) seems to have Qt5.9.1, that might actually work
<FromGitter> <ShalokShalom> 1) 10, the current
<FromGitter> <codenoid> i'm in 16.04.
<FromGitter> <codenoid> Tomorrow I'll try ;)
<FromGitter> <ShalokShalom> I write a PKGBUILD for both
<FromGitter> <ShalokShalom> Is there an AUR account on your side?
<FromGitter> <codenoid> who ?
<FromGitter> <ShalokShalom> Anybody who is willing to upload them to this place. ⏎ I mean, configured with all the blabla they let you drop PKGBUILD who dont build at all, so long as a super secure connection configured. ^-^
ShalokShalom has joined #crystal-lang
ShalokShalom has quit [Read error: Connection reset by peer]
<FromGitter> <ShalokShalom> Papierkorb: Is the official name for the binding qt5.cr?
<FromGitter> <bararchy> @ShalokShalom are you making a PKGBUILD for qt5.cr ?
<Papierkorb> ShalokShalom, it is
<FromGitter> <ShalokShalom> and the bindgen, yes
<FromGitter> <ShalokShalom> thanks a lot
<FromGitter> <bararchy> What's the point in making a PKGBUILD ? as in it suppose to come as a shard
<FromGitter> <bararchy> or is it just for deps ?
<FromGitter> <ShalokShalom> because i am used to 😄
<FromGitter> <ShalokShalom> whenever i like to build something, is the direct way that one to a PKGBUILD for me
<FromGitter> <ShalokShalom> since others can use it then as well
<FromGitter> <ShalokShalom> i am simply not used to download and update packages with the inbuild package manager of programming languages
<FromGitter> <ShalokShalom> and a lot of people will simply look on this place(s)
<FromGitter> <ShalokShalom> Papierkorb: Why did you write a part in C++?
<Papierkorb> Because Clang
<FromGitter> <ShalokShalom> Ah i see.
<Papierkorb> libclang-c is not up to standards, it barely touches the interesting parts of the API. So the original C++ API it was.
<Papierkorb> I actually have a binding (not wrapper) generator written in Crystal using libclang-c, and while it worked to some degree, it wasn't pleasant
<Papierkorb> I wasted more time fighting with the C API wrapper than anything. So, for anyone else, can't recommend.
<FromGitter> <ShalokShalom> *notes that*
<FromGitter> <ShalokShalom> in the bathtube, i thought about a LLVM IR <> Erlang VM transcompiler :D
<Papierkorb> well that'd be "simply" a LLVM backend
<FromGitter> <ShalokShalom> ^-^
<FromGitter> <ShalokShalom> setter and getter are different by a '=', is this correct? https://github.com/Papierkorb/bindgen#name-rewriting-rules
<FromGitter> <ShalokShalom> i mean #window_title and #window_title=
<FromGitter> <ShalokShalom> hnn, is there another way to build this, next to the Crystal way?
<FromGitter> <ShalokShalom> i think i will get this chance and study the packaging structure in Crystal
<Papierkorb> ShalokShalom, @names: yes
<Papierkorb> That's the crystal naming convention for those, and I don't even bother also passing-through the original names ;)
<FromGitter> <ShalokShalom> ah i see
<FromGitter> <ShalokShalom> thats fine
<FromGitter> <ShalokShalom> I guess you prepare a blog post or something like that for the Crystal community?
<FromGitter> <ShalokShalom> to inform them about the project
<Papierkorb> Well it's out here, and I heard it'll be part of the next issue of `Crystal Weekly` too
<Papierkorb> I don't have a blog though. Well, not yet. May change in the following weeks.
<FromGitter> <ShalokShalom> ah, Crystal Weekly, thats what i mean
<FromGitter> <ShalokShalom> you might want to add qmlweb or so also, because its interesting for some Amber fans
<Papierkorb> qmlweb?
<Papierkorb> ah, finally someone did that. Doesn't support prerendered HTML. bummer
<FromGitter> <ShalokShalom> its on the table since a long
<FromGitter> <ShalokShalom> there is also an other project
<Papierkorb> looks to be pure JS, so nothing much for me to do
<FromGitter> <ShalokShalom> https://github.com/pureqml/qmlcore
<FromGitter> <ShalokShalom> yeah, i mean it in the sense: see people, this here is Qt: you can do sooo much with it ^-^
<FromGitter> <ShalokShalom> even web development
<Papierkorb> QML is simply superior over HTML for fancy desktop UIs
<FromGitter> <ShalokShalom> for the client side, this is a huge bones, since people think, Javascript is the only solution
<FromGitter> <ShalokShalom> see, you have nearly all the pros in the web as well
<FromGitter> <ShalokShalom> of course, who use HTML for the desktop?
<Papierkorb> It doesn't require a huge webbrowser, doesn't hog RAM, it's super powerful all things considered ..
<FromGitter> <ShalokShalom> oh yeah, these Node.js people, right?
<FromGitter> <ShalokShalom> so? 😄
<FromGitter> <ShalokShalom> i know
<FromGitter> <ShalokShalom> and love it for exact this reasons
<Papierkorb> Well I already said that QML will be part of the bindings at some point
<FromGitter> <ShalokShalom> hardware acceleration is the only difference to the web version, that i can see
<Papierkorb> Though I'm currently most interested in Widgets, as they're the definitive source of correct native look n' feel
<FromGitter> <ShalokShalom> i mean add qmlweb/pureqml to the announcement maybe
<FromGitter> <ShalokShalom> so people can see, its also useful in the web
<FromGitter> <ShalokShalom> everywhere
<FromGitter> <ShalokShalom> you cant get away from it 😄
<FromGitter> <ShalokShalom> qmlweb is native QML compatible
<FromGitter> <ShalokShalom> this article is nice, i showed it a web dev and he showed interest; https://en.wikipedia.org/wiki/QML
maxpert has quit [Remote host closed the connection]
bjz has joined #crystal-lang
<FromGitter> <LuckyChicken91_twitter> `Syntax error in crstal.cr:4: octal constants should be prefixed with 0o` ⏎ why is it not possible to have an int like `myint = 0137`?
<oprypin> LuckyChicken91_twitter, other programming languages abused leading zero to mean something entirely different. to avoid confusion, modern programming language explicitly disallow number literals with leading zeros, because you can always just write the number without that zero and get the same effect
maxpert has joined #crystal-lang
<FromGitter> <LuckyChicken91_twitter> aah okay thx
maxpert has quit [Ping timeout: 246 seconds]
DTZUZU has quit [Ping timeout: 240 seconds]
DTZUZU has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<FromGitter> <sdogruyol> nice explanation @oprypin 👍
<oprypin> thx
alex`` has quit [Ping timeout: 255 seconds]
balduin has joined #crystal-lang
maxpert has joined #crystal-lang
alex`` has joined #crystal-lang
<FromGitter> <G4BB3R> MYSQL = DB.open("mysql://root@localhost:3306/revistinha") ⏎ at_exit { MYSQL.close } ⏎ At production it gives an error: ⏎ "Client does not support authentication protocol requested by server; consider upgrading MySQL client (Exception)" [https://gitter.im/crystal-lang/crystal?at=59a30f70210ac26920c92109]
maxpert has quit [Remote host closed the connection]
<FromGitter> <picatz> @G4BB3R `mysql://user:password@server:port/database`?
<FromGitter> <picatz> Found that connection URI looking at: https://crystal-lang.org/docs/database/
<FromGitter> <G4BB3R> thx @picatz
<FromGitter> <picatz> 👍 No problem.
<FromGitter> <sdogruyol> @G4BB3R are you running crystal in prod?
balduin has quit [Remote host closed the connection]
maxpert has joined #crystal-lang
maxpert has quit [Ping timeout: 255 seconds]
alex`` has quit [Quit: WeeChat 1.9]
bjz has joined #crystal-lang
bjz has quit [Quit: Textual IRC Client: www.textualapp.com]
maxpert has joined #crystal-lang
Groogy has quit [Quit: WeeChat 1.9]
maxpert has quit [Ping timeout: 240 seconds]
baweaver is now known as baweaver_away
baweaver_away is now known as baweaver
baweaver is now known as baweaver_away
baweaver_away is now known as baweaver
<FromGitter> <wwselleck> Is there a node path.resolve equivalent in crystal? Like if I want the absolute path of Dir.current + '/build'
<FromGitter> <picatz> `File.expand_path`perhaps is what you're looking for?
<FromGitter> <wwselleck> I think what I was looking for is https://crystal-lang.org/api/0.23.1/File.html#join%28parts%3AArray%7CTuple%29%3AString-class-method
<FromGitter> <wwselleck> so I can do File.join("~", "dotfiles") and get back "~/dotfiles/~
xaxisx_ has quit [Quit: Leaving]
<FromGitter> <elorest> yes.
<FromGitter> <bitmappergit> yay
<FromGitter> <bitmappergit> i got my first discord bot in crystal working
<FromGitter> <crisward> congrats... done much crystal?
<FromGitter> <bitmappergit> nope
<FromGitter> <crisward> enjoying it so far?
<FromGitter> <bitmappergit> yes
Papierkorb has quit [Ping timeout: 246 seconds]
Papierko- has joined #crystal-lang
<FromGitter> <crisward> cool... so far not wore off for me...
<FromGitter> <crisward> Seems I've been messing with it for a year now. Found a few bugs, but nothing terrible
<FromGitter> <elorest> I love crystal and have been working with it extensively. Really need to find a 20 sided black glass polyhedron to sit next to my ruby.
<FromGitter> <bitmappergit> btw
<FromGitter> <bitmappergit> a 20 sided polyhedron is a isodecahedron
<FromGitter> <crisward> @elorest for one of your dramatic avatars?
<FromGitter> <elorest> @crisward Exactly. :)
<FromGitter> <crisward> Surely crystals are transparent? Though you get the diamond confusion...
<FromGitter> <bitmappergit> i know
<FromGitter> <bitmappergit> i said it was the closest i could find
<FromGitter> <elorest> Yeah but the crystal logo is black obsidian… @bitmappergit Yeah that actually is really close to what I want… Probably the closest I’ve seen.
<FromGitter> <elorest> I found an obsidian 20 sided die but it had numbers on it.
<FromGitter> <wwselleck> ive been using crystal for like 2 days but love it so far
<FromGitter> <wwselleck> only thing is the docs seem to assume u have a ruby background
<FromGitter> <wwselleck> i have a working ruby knowledge, but come from JS/python/go mostly
<FromGitter> <elorest> @wwselleck Ruby docs are really extensive at this point so if you can't solve something in crystal look it up in the ruby docs. And try to move the knowledge over.
<FromGitter> <crisward> I spent a lot of googling things like "replace in ruby", which is gsub, which it is in crystal, so it does work, most of the time.
<FromGitter> <crisward> Also from node background.
<FromGitter> <elorest> It’s probably best for the community if we fix the docs in scenarios like that as well and send a PR.
<FromGitter> <crisward> gsub is in the docs, it's just under strings. I could probably write a crystal for node devs post. Just have a feeling it may go on a bit, not sure where to start or end...
<FromGitter> <elorest> Yeah definitely in the case of gsub and a lot of things I’ve finally found just at a place that I didn’t expect. In some cases they really need to be added though.
<Papierko-> Wtf is that. Oh great I broke either Crystal or LLVM.
<Papierko-> Looks like g++ and/or Crystal or LLVM doesn't agree on how to pass many structures (not pointers) at once.
<Papierko-> Can someone dump these two files somewhere and then run `crystal foo.cr`? https://gist.github.com/Papierkorb/55c32f9ad3aa61e20eeec6e045b9b582
<Papierko-> The last line of output should show completely whacko data
Papierko- is now known as Papierkorb
<FromGitter> <crisward> Papierko- I get no output
<Papierkorb> ..huh?
<FromGitter> <crisward> just copied your two files, ran crystal foo.cr and nothing.
<FromGitter> <crisward> OSX - Crystal 0.23.1 (2017-07-13) LLVM 4.0.1
<Papierkorb> it uses bog standard printf().. Can you try adding a `fflush(stdout);` at the end of the C function?
mtcycler has joined #crystal-lang
mtcycler has quit [Client Quit]
<FromGitter> <codenoid> morning, ~
<FromGitter> <crisward> sorry, copied the gist from here, its a bit truncated. Output is ⏎ ⏎ ```eins: 0x0 ⏎ zwei: 4B @ 0x10c50c1dc ⏎ drei: 4B @ 0x10c50c1fc ⏎ vier: 1632B @ 0x100000004``` [https://gitter.im/crystal-lang/crystal?at=59a354538f4427b462a5d5ed]
<Papierkorb> Yep, that's broken too. Which is kinda good and bad at once
<Papierkorb> Thanks, so at least it's not my machine
maxpert has joined #crystal-lang
maxpert has quit [Ping timeout: 240 seconds]