<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>
<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> 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
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]
<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>
<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 π°