<strcmp1>
but open an issue if you think it should be removed :)
<daneb>
I think I will just add a comment, thanks for the feedback guys
<daneb>
or ladies ;)
<strcmp1>
np
<daneb>
dammit, it's closed. ok going to open an issue to ask if we are intending to ignore "for" as a design decision. It's going to impact the documentation of stdlib hence the verification needed
daneb has quit [Remote host closed the connection]
daneb has joined #crystal-lang
the_asterite has joined #crystal-lang
havenwood has joined #crystal-lang
<the_asterite>
daneb: there is for in macros
<the_asterite>
it's intentionally left out outside macros
<daneb>
the_asterite: ah! so how would I go about using it then? would I have to write my own macro or is it just a require?
<the_asterite>
you can't, there's no for
<the_asterite>
use each
<the_asterite>
I'll reply later in the issue :)
the_asterite has quit [Quit: qicr for android: faster and better]
jonahR has joined #crystal-lang
waj has joined #crystal-lang
Ven has joined #crystal-lang
NeverDie has joined #crystal-lang
waj has quit [Quit: waj]
datanoise has joined #crystal-lang
datanoise has quit [Ping timeout: 276 seconds]
asterite has joined #crystal-lang
<asterite>
jhass: I don't know where did you get the "gives a better visual distinction between the macro language and the code it generates" from, but you are absolutely correct :-P
<jhass>
because it's obvious? :P
daneb has quit [Remote host closed the connection]
<asterite>
:-P
<asterite>
I actually like how "for" looks, pretty clean, but I guess we should keep things simple
daneb has joined #crystal-lang
<asterite>
there's also the thing that for in macros feels a bit more dynamic (like macros), where you always can get the index of the iteration, but a regular for wouldn't do that
<jhass>
I don't like for :P
asterite has quit [Ping timeout: 246 seconds]
<crystal-gh>
[crystal] asterite pushed 1 new commit to master: http://git.io/vLwpW
<crystal-gh>
crystal/master 4e60e2e Ary Borenszweig: Say to use double quotes for strings in the "unterminated char literal" error
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
wuehlmaus has quit [Quit: Lost terminal]
<daneb>
jhass: I am trying to create a PR for my change to benchmark.cr in gh-pages (documentaiton added). But when I push the commit it's got all the prior commits in it as well instead of just my change?
<crystal-gh>
[crystal] daneb opened pull request #831: Documenting of benchmark (master...db_benchmark_doc) http://git.io/vLrLk
<daneb>
*bam* done, thanks
<jhass>
daneb: in the future if you want to contribute to the standard library or the API docs, do git fetch upstream; git checkout -b my_awesome_thing upstream/master; if you want to contribute to stuff in crystal-lang.org/doc/ do git fetch upstream; git checkout -b blub upstream/gh-pages
<jhass>
and in the latter case make sure to select gh-pages as target when opening a pull request
NeverDie has joined #crystal-lang
<daneb>
right!
waj has joined #crystal-lang
<daneb>
so that's where I went wrong, I used gh-pages
<unshadow>
Ok.. so I got it, but I think it is becuase I used instance veriable inside a class, I remmber Ary saying those are not supported or something ?
<unshadow>
changing the veriable to @@ from @ fixed the issue
<unshadow>
should I still open a bug ?
<jhass>
that might be but crystal should inform you of that fact instead of crashing
<unshadow>
Ok
wuehlmaus has joined #crystal-lang
<daneb>
jhass: I notice there is functionality missing from benchmark.cr that ruby has, functions -> benchmark.bmbm (used for minimizing affects of GC overheads) and benchmark.bm(7) label width for reporting. Are we looking to introduce this functionality, as I am considering it?
<thor77>
is there some advise available how to structure a libary the right away?
<thor77>
and is there smth like PythonPackageIndex to share libs?
<jhass>
daneb: can never hurt
<jhass>
crystal is very open to including stuff into stdlib
<jhass>
daneb: I think shipping something like benchmark-ips would be nice too
<jhass>
thor77: run crystal init lib foo
<thor77>
yeah, but the libs included in your bot have their files in src/<libname>/.cr-files
<jhass>
both works
<thor77>
but init creates src/<libname>.cr src/<libname>/version.cr
<thor77>
i'm very confused
<jhass>
require "foo" searches relative to the load path for foo.cr and foo/foo.cr
<jhass>
also keep in mind that my bot predates crystal init :P
<thor77>
and whats the right way to link my lib to other projects?
<thor77>
create a libs folder and link src/ to that?
<jhass>
create a Projectfile and add a github or path entry and then run crystal deps
<BlaXpirit>
probably not possible to implement this in userland
shadeslayer has quit [Ping timeout: 264 seconds]
<crystal-gh>
[crystal] kostya opened pull request #832: Little faster base64 encode (master...faster_encode) http://git.io/vLoAO
shadeslayer has joined #crystal-lang
BlaXpirit has quit [Quit: Quit Konversation]
BlaXpirit has joined #crystal-lang
benjreinhart has joined #crystal-lang
nietzschette has left #crystal-lang ["Leaving"]
<asterite>
thor77: waj was doing marshal the other day
waj_ has joined #crystal-lang
waj has quit [Ping timeout: 276 seconds]
waj_ is now known as waj
daneb has quit [Remote host closed the connection]
daneb has joined #crystal-lang
veelenga has quit [Ping timeout: 246 seconds]
daneb has quit [Remote host closed the connection]
daneb has joined #crystal-lang
<thor77>
i'm trying to rewrite my ai-bot in crystal => i need some kind of data-storage. i choose json. https://github.com/Thor77/CryAI/blob/master/src/cryai.cr#L6-L34 but the compiler still thinks f could be "Nil", which test do i have to add to prevent that?
<jhass>
a plain if f should suffice
<jhass>
but actually File.read isn't even nilable, no?
<jhass>
>> x = File.read("/etc/passwd"); typeof(x)
<Codcore>
Good evening! Is there a way how to determine namespace that class is in? For example, if I have Foo::BarClass, how BarClass can figure out that it is inside a Foo:: ?
veelenga has joined #crystal-lang
flaviu has quit [Read error: Connection reset by peer]
BlaXpirit has quit [Quit: Quit Konversation]
BlaXpirit has joined #crystal-lang
<thor77>
jhass: thank you very much, it looks awful <3 but i will use it anyway ;)
<jhass>
heh
<jhass>
Codcore: Ruby has nesting, but I don't think we got something like that yet