RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.27.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
muffindrake has joined #crystal-lang
<muffindrake> The standard library docs state that GMP is used to implement Big* types - which will abort on memory allocation failure. What was the rationale for picking that and what's the way that Crystal handles this condition?
<FromGitter> <girng> i tried nim pretty cool but at this point i'm too deep in crystal. i never want to switch, i want to use crystal for the rest of my life
<FromGitter> <girng> the crystal's community is invaluable, which has played a big role in my success of learning the language. obvious nim and others prob have great communities too, but just saying i don't want to throw it all away. if you know what i mean
<FromGitter> <Blacksmoke16> πŸ’―
fifr has quit [Ping timeout: 246 seconds]
<FromGitter> <HarrisonB> <3
muffindrake has quit [Quit: muffindrake]
muffindrake has joined #crystal-lang
_whitelogger has joined #crystal-lang
muffindrake has quit [Ping timeout: 240 seconds]
muffindrake has joined #crystal-lang
<FromGitter> <spTorin> How to read a large file by chunks in the correct way (fast buffered reading, small memory allocate)? Like this pseudocode: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5c57b8e37b68f9410269b407]
<FromGitter> <sergiotapia> Hello, I'm using the amber framework and I just added a file to `src/crawlers/mysite.cr` and in my file: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ But I'm getting undefined constant error when running `amber exec` - `amber exec "Mysite.import_latest"` [https://gitter.im/crystal-lang/crystal?at=5c57bcccf04ef00644d6b326]
<FromGitter> <sergiotapia> Is there some funky file placement thing I need to handle in order for Crystal to detect this file?
<FromGitter> <Blacksmoke16> require it outside of your class
<FromGitter> <Blacksmoke16> also with your other requires, make sure the const that is used is defined before the file that needs it
<FromGitter> <sergiotapia> I moved the require up, but still getting the same `undefined constant Mysite` error.
<FromGitter> <sergiotapia> Because it's in a `crawlers` folder, do I need to do something like `Crawlers::Mysite` in the class name?
<FromGitter> <Blacksmoke16> if you're requiring files in that directory like `require "./crawlers/*` then things are required in abc order, just keep that in mind
<FromGitter> <Blacksmoke16> im not actually familiar with amber, but im sure its some issue with where/how you're requiring the file
<FromGitter> <sergiotapia> I just want to run the function in this class I made in my `/src/crawlers/` folder. I'm not requiring it manually at all.
<FromGitter> <Blacksmoke16> thats prob the issue then?
<FromGitter> <sergiotapia> They have this amber.yml file: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5c57be3f8aa5ca5abf7ea652]
<FromGitter> <sergiotapia> Shouldn't this sniff out my custom file in the crawlers folder?
<FromGitter> <Blacksmoke16> yea
<FromGitter> <Blacksmoke16> maybe bring it up in the amber gitter chat? am sure someone there would have a better idea
<FromGitter> <sergiotapia> `require "../src/crawlers/**"` I had to add that `config/application.cr` - not really intuitive but I'm making notes to update their docs
jemc has quit [Ping timeout: 245 seconds]
Jenz has joined #crystal-lang
<Jenz> Is this by any chance a compiler bug?: https://travis-ci.org/myst-lang/myst/jobs/487864236#L479
<Jenz> Or what am I missing
Jenz has quit [Ping timeout: 268 seconds]
muffindrake has left #crystal-lang [#crystal-lang]
<FromGitter> <j8r> @sergiotapia that's why I don't use `**`, this can hide modularization problems
<FromGitter> <j8r> It import the world behind it in alphabetical order. Better to have require inside the subfiles, this way you know which file depends on which one
Groogy has quit [Read error: Connection reset by peer]
DeBot has quit [Quit: Crystal IRC]
jhass has quit [Read error: Connection reset by peer]
asterite has quit [Read error: Connection reset by peer]
DeBot has joined #crystal-lang
DeBot has quit [Client Quit]
DeBot has joined #crystal-lang
asterite has joined #crystal-lang
jhass has joined #crystal-lang
fifr has joined #crystal-lang
ashirase has quit [Ping timeout: 246 seconds]
ashirase has joined #crystal-lang
fifr has quit [Ping timeout: 272 seconds]
fifr has joined #crystal-lang
<FromGitter> <PlayLights_twitter> Hello guys do you any way to send execute a class method by its name in as a string something like array.send("size")?
<FromGitter> <j8r> no
<FromGitter> <j8r> you can use a case/when
<FromGitter> <vladfaust> I've noticed that neither `crystal build` nor `crystal tool format` print a error column number in text output. That is a problem when working with tools like sublime
<FromGitter> <j8r> it may be seen as a limitation, but at the end it's safer
<FromGitter> <yxhuvud> @PlayLights_twitter You can do it if you have the whole string available at compile time, but it is not possible otherwise.
<FromGitter> <j8r> How can i do multi-line operation when assigning to a constant?
<FromGitter> <PlayLights_twitter> @yxhuvud I see, I was doing `object.{{method}}`, I was looking for a runtime way to do the same, anyways, thanks
<FromGitter> <j8r> nvm begin/end
<FromGitter> <j8r> @PlayLights_twitter you can also use a macro if you have a lot of methods
<FromGitter> <j8r> I don't, is it possible to use the macro interpreter in this case?
mjanssen has left #crystal-lang [#crystal-lang]
ashirase has quit [Ping timeout: 246 seconds]
ashirase has joined #crystal-lang
jemc has joined #crystal-lang
Jenz has joined #crystal-lang
jemc has quit [Ping timeout: 268 seconds]
jemc has joined #crystal-lang
Jenz has quit [Ping timeout: 245 seconds]
<FromGitter> <girng> good morning
<FromGitter> <j8r> Good day
<FromGitter> <j8r> Still hopelessly hopeless @girng ?
<FromGitter> <drum445> ```If the variable was declared in a macro it's not visible outside it``` ⏎ ⏎ is there anyway to allow this to be possible? [https://gitter.im/crystal-lang/crystal?at=5c588ab813a2814df61cc45f]
<FromGitter> <drum445> ```code paste, see link``` ⏎ ⏎ Ideally want to be able to do that for my kemal routes [https://gitter.im/crystal-lang/crystal?at=5c588b0aca428b064554c064]
<FromGitter> <Blacksmoke16> if you wrap your routes in a class could maybe use an ivar? https://play.crystal-lang.org/#/r/6624
<FromGitter> <Blacksmoke16> or some config class class var
jemc has quit [Ping timeout: 240 seconds]
<FromGitter> <drum445> ah nice, not sure I want to wrap them all in a class though :(
<FromGitter> <Blacksmoke16> prob easier to do the `person_id = env.session.string("person_id")` in each route :/
<FromGitter> <drum445> yeah think that's what I'm going to do, no big deal I guess
<FromGitter> <drum445> Cheers though mate
jemc has joined #crystal-lang
<FromGitter> <Blacksmoke16> nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnpnp
<FromGitter> <Blacksmoke16> np
<FromGitter> <j8r> I don't get why there is a wrapper sh script, that calls the crystal binary. Can't this be done in pure Crystal, or is it a limitation of the language?
<FromGitter> <j8r> Or we can set up the env vars in our .bashrc/.zshrc or whatever
<jemc> that wrapper script is the bane of my existence when I need to run `lldb` - I always give up and use print debugging instead of figuring out how to invoke without the wrapper so I can use lldb
<FromGitter> <amigrave> Hi there! ⏎ I'm interested into crystal in order to add a fast compiled language to my toolbelt. ⏎ I was testing the file lines counting example showcasing the channels, then I've wrote a roughly python translation but not using gevent or any concurrent method, just serial processing. ⏎ As the python version was faster I converted the crystal channel version to a serial version in order to match the
<FromGitter> ... python test and the python version was still faster. Could you help me understand the reason ? (Note: I run the programs in my /usr/bin folder and I drop the linux cache before every test in `/proc/sys/vm/drop_caches` sending the values `3`, `2`, `1` successively ). ⏎ ... [https://gitter.im/crystal-lang/crystal?at=5c58a708ceb5a2264f943c53]
<jemc> somebody is probably aware of a workaround for using `lldb` on crystal, and it may even be documented somewhere, but I didn't see it and whenever I'm in the moment it always feels faster to debug in another way than ask around
<FromGitter> <r00ster91> @amigrave did you compile using `--release`?
<FromGitter> <amigrave> @r00ster91 Ouch ! :) no I didn't, let me do that ...
<FromGitter> <r00ster91> you should do `crystal build file.cr --release` and then run `./file` manually because you probably have the compile-time in these 4.30s
<FromGitter> <amigrave> @r00ster91 Much better ! Thanks a lot and really sorry for the noise. Here's the result by the way: ⏎ ⏎ ```/tmp/1/test-sync 0.31s user 0.31s system 35% cpu 1.743 total``` [https://gitter.im/crystal-lang/crystal?at=5c58a7f654f21a71a1fb5697]
<FromGitter> <r00ster91> ah it's faster, nice
<FromGitter> <amigrave> thanks again and please accept my apologize for my silliness :)
<FromGitter> <r00ster91> no worries, you're welcome
<FromGitter> <j8r> Good point jemc. I think it's worth opening an issue on this
<FromGitter> <j8r> That's also counter intuitive if we want to copy the compiler – we copy the wrapper instead :/
<FromGitter> <j8r> And what about Windows?
<FromGitter> <Sija> seems like GH integration for Gitter is broke again :/
<FromGitter> <Sija> /summoning @bcardiff
<FromGitter> <bcardiff> The GH integration seems to relay on GitHub Services which is deprecated, and I don't find how to setup it via webhooks
<FromGitter> <j8r> @bcardiff and in the `integration` menu in settings?
<FromGitter> <bcardiff> And we are back online
<FromGitter> <Sija> @bcardiff πŸŽ‰
<FromGitter> <j8r> Good!
<FromGitter> <bcardiff> I muted some of the events. Probably like they were before.
<FromGitter> <bcardiff> now i need to tackle this lemon pie 🍰
<FromGitter> <Sija> mmm, Bon AppΓ©tit :)
<FromGitter> <Sija> @bcardiff Since we’re at it, how about turning on Travis/CircleCI integration too?