<FromGitter>
<naqvis> @didactic-drunk That's an awesome work 👍
ua has quit [Ping timeout: 246 seconds]
_ht has joined #crystal-lang
ua has joined #crystal-lang
<FromGitter>
<erdnaxeli:cervoi.se> Nice!
johnny101 has quit [Ping timeout: 240 seconds]
johnny101 has joined #crystal-lang
<FromGitter>
<confact> I think I am tired but I seem to not find any Array.rand method? I want it to random pick a value in the array.
<FromGitter>
<confact> I was tired, found `sample` now. ^^
hendursaga has quit [Ping timeout: 240 seconds]
hendursaga has joined #crystal-lang
<yxhuvud>
pricemight: it will be a long while before uring can be expected to exist in a good enough way on the kernel versions crystal support.
<yxhuvud>
also it is not obvious that the core team want the additional maintenance burden of doing a special solution by themselves instead of relying on libevent.
<FromGitter>
<riffraff169> if i could get some debug output of actual macro stage, i could troubleshoot why `ACTIVITIES` `Activity()` parts are empty, but `STYLES` `Style()` has data
<FromGitter>
<naqvis> did you try adding `{{debug}}` ?
<FromGitter>
<riffraff169> where would i add that...is that in the documentation somewhere?
<FromGitter>
<naqvis> from/to will follow the annotation key value (if present)
<FromGitter>
<riffraff169> im doing data conversion (basically copying data from java to crystal), so im writing the yaml by hand to begin with...so i can just change the fields to have underscores
<FromGitter>
<naqvis> if there are multiple yaml files, you better write a simple script to read yaml and generate crystal code for you
<FromGitter>
<naqvis> but if very few, then it won't hurt doing that manually
<FromGitter>
<riffraff169> yeah, no, no yaml at all....hardcoded as enums in java code...
<FromGitter>
<riffraff169> which is fine for my crystal program because it is static data, doesnt change...but loading in from yaml in build makes it easy
<FromGitter>
<riffraff169> so i do have to manually create the yaml files anyway
mipmip has joined #crystal-lang
<FromGitter>
<riffraff169> so it appears that `def initialize(@name : String)` is equivalent (maybe) to `getter name : String; def initialize(name : String); @name = name; end` ??
<FromGitter>
<Blacksmoke16> yes, but minus the `getter`
<FromGitter>
<Blacksmoke16> as it just assigns the ivar, not providing a getter to access it outside of the type
<FromGitter>
<riffraff169> so if i want to be able to access it, i would have to add `getter name` also...so the only thing it does it enable you to initialize it without having a statement inside the method
<FromGitter>
<Blacksmoke16> right
<FromGitter>
<riffraff169> ok, thanks
Dreamer3 has quit [Quit: Leaving...]
<FromGitter>
<rsk700> Hello, what is the purpose of /lib folder in new "crystal init" project? I started using, because it allows absolute paths in `require`, but find out it is by default in gitignore
<FromGitter>
<Blacksmoke16> external dependencies, e.g. other shards
<FromGitter>
<Blacksmoke16> i.e. not source code
<FromGitter>
<rsk700> is it possible to use absolute `require` for my code, which is in /src? or only relative import can be used inside project
<FromGitter>
<Blacksmoke16> > By default the require path is the location of the standard library that comes with the compiler, and the "lib" directory relative to the current working directory (given by pwd in a Unix shell). These are the only places that are looked up. ⏎ ⏎ So no, doesn't look like it. I suppose you *could* modify the require path, but thats prob a bad idea as then it wouldnt work for others
<FromGitter>
<rsk700> ok, thanks, I was hoping there is proper way
oprypin has quit [Remote host closed the connection]
oprypin has joined #crystal-lang
<FromGitter>
<djberg96> is there something like `IO.foreach` in Crystal? Or is it at the instance method only?
<FromGitter>
<Blacksmoke16> what would that do?
<straight-shoota>
File.each_line
<straight-shoota>
or IO#each_line
<FromGitter>
<confact> How do I handle this error: ⏎ ⏎ ```Unhandled exception: Missing hash key: "ceb" (KeyError)``` ⏎ ⏎ I guess it comes inside Crystal somewhere as I don't have any key called ceb in my code. [https://gitter.im/crystal-lang/crystal?at=60897d502c5b9d392f3a2c1f]
<straight-shoota>
context?
<FromGitter>
<confact> Never mind, I was able to get down to what the error came from, a Cadmium shard.