jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.10.1 | Fund Crystals development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/manastech/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
<crystal-gh> [crystal] MakeNowJust closed pull request #1950: Add a new compiler option `--path PATH` (master...feature/path-option) https://github.com/manastech/crystal/pull/1950
<crystal-gh> [crystal] MakeNowJust closed pull request #1949: Please respect user's CRYSTAL_PATH (second challenge) (master...fix/respect-env) https://github.com/manastech/crystal/pull/1949
akwiatkowski has quit [Ping timeout: 246 seconds]
stary-101 has joined #crystal-lang
<stary-101> hey there
pawnbox has joined #crystal-lang
<stary-101> should i worry about memory pointers in crystal?
pawnbox has quit [Ping timeout: 272 seconds]
apotheon has quit [Ping timeout: 246 seconds]
apotheon has joined #crystal-lang
waterlink has quit [Ping timeout: 240 seconds]
x0f has joined #crystal-lang
stary-101 has quit []
dylanmei has quit [Ping timeout: 255 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
dylanmei has joined #crystal-lang
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
dylanmei has quit [Quit: ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
ponga has joined #crystal-lang
sadin has quit [Quit: Leaving]
Ven has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Ven has quit [Ping timeout: 265 seconds]
Ven has joined #crystal-lang
bjz has joined #crystal-lang
irclogger_______ has quit [Ping timeout: 246 seconds]
irclogger_______ has joined #crystal-lang
akwiatkowski has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
pawnbox has joined #crystal-lang
trapped has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
<crystal-gh> [crystal] MakeNowJust opened pull request #2011: Run crystal script without extension (master...fix/run-without-extension) https://github.com/manastech/crystal/pull/2011
<travis-ci> MakeNowJust/crystal#30f393b (master - Merge pull request #2004 from ysbaddaden/std-ecr-comments-and-escapes): The build passed. https://travis-ci.org/MakeNowJust/crystal/builds/102053104
<DeBot> https://github.com/manastech/crystal/pull/2004 (ECR: support comments (<%# %>) and escapes (<%% %>))
pawnbox has joined #crystal-lang
akwiatkowski has quit [Ping timeout: 246 seconds]
akwiatkowski has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has joined #crystal-lang
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
justinmcp has quit [Quit: No Ping reply in 180 seconds.]
RX14 has quit [Ping timeout: 256 seconds]
justinmcp has joined #crystal-lang
RX14 has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
trapped has joined #crystal-lang
Philpax has joined #crystal-lang
Philpax__ has quit [Ping timeout: 260 seconds]
pawnbox has quit [Remote host closed the connection]
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has joined #crystal-lang
ponga has quit []
pawnbox has quit [Ping timeout: 264 seconds]
pawnbox has joined #crystal-lang
pawnbox_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
trapped has joined #crystal-lang
thelatewizard has joined #crystal-lang
Ven has joined #crystal-lang
bjz has quit [Ping timeout: 260 seconds]
bjz has joined #crystal-lang
dylanmei has joined #crystal-lang
sardaukar has quit [Ping timeout: 255 seconds]
jokke has quit [Quit: WeeChat 1.3]
jokke has joined #crystal-lang
jokke has quit [Client Quit]
jokke has joined #crystal-lang
sardaukar has joined #crystal-lang
jokke has quit [Client Quit]
jokke has joined #crystal-lang
Philpax has quit [Ping timeout: 245 seconds]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vuperpride has joined #crystal-lang
<vuperpride> hey anyone there?
<vuperpride> is anybody there???
vuperpride has quit [Client Quit]
<thelatewizard> I'm here
<jhass> they had 80 seconds of patience
akwiatkowski has quit [Ping timeout: 246 seconds]
koka has joined #crystal-lang
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
renews has joined #crystal-lang
renews has quit [Client Quit]
<thelatewizard> Not that I'm any help anyway
<jhass> explaining people that IRC is asynchronous, especially in small channels can be very helpful ;)
<thelatewizard> Asynchronous as in, messages may appear in a different order in time than they were sent? even by the same user?
<jhass> no, as in people may read and answer much much later
<thelatewizard> oh lol
<thelatewizard> if that is not blatantly apparent I am quite new to irc
trapped has joined #crystal-lang
akwiatkowski has joined #crystal-lang
pawnbox_ has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
askn has joined #crystal-lang
<askn> hi everyone, how can i solve this problem :( https://carc.in/#/r/psd
<BlaXpirit> well the error message sounds very wrong
askn has quit [Ping timeout: 252 seconds]
<BlaXpirit> askn, actually it makes sen
<BlaXpirit> oh nevermind -_-
dylanmei has quit [Quit: ZZZzzz…]
sadin has joined #crystal-lang
dylanmei has joined #crystal-lang
thelatewizard has quit [Quit: Page closed]
dylanmei has quit [Ping timeout: 256 seconds]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://github.com/manastech/crystal/commit/5d0bd6eec916dbc9a1336ba6569b42c15821a72d
<crystal-gh> crystal/master 5d0bd6e Ary Borenszweig: Merge branch '0.10'
askn has joined #crystal-lang
shama has joined #crystal-lang
<asterite> askn: Data's value depends on Data's value
<asterite> I mean, "city": "#{Name.name}"...
<askn> yes
<asterite> Name.name being Data["name"]...
<asterite> it's recursive, it won't work
<asterite> My solution would be to copy the value into Data, without any calls to it
<askn> but i have a big data and i want to get data randomly
shadeslayer has quit [Ping timeout: 240 seconds]
shadeslayer has joined #crystal-lang
askn has quit [Ping timeout: 252 seconds]
jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.10.2 | Fund Crystals development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/manastech/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
askn has joined #crystal-lang
<askn> i write to string parser with regex
<jhass> askn: yes, you pass a Call there
<askn> but i can't eval string
<jhass> or https://carc.in/#/r/psi actually
<jhass> yes, you can't
<jhass> Crystal is a compiler after all
<askn> yes i understand :(
<travis-ci> manastech/crystal#5d0bd6e (master - Merge branch '0.10'): The build passed. https://travis-ci.org/manastech/crystal/builds/102146565
<pawnbox> I have config var that hash type (compile-time type is (Nil | String | Hash(String, String) | Hash(YAML::Type, YAML::Type) | Array(YAML::Type)))
<pawnbox> I am not iterate over it.
<pawnbox> *able
<pawnbox> even if I check that iterate if config is a Hash
<BlaXpirit> ugh
<BlaXpirit> doesn't just YAML::Type work?
<pawnbox> I am expecting to to be Hash mostly
<BlaXpirit> this makes no sense to me
<pawnbox> Well actually that is because Yaml.load return a hash.
<pawnbox> and config is result of that.
askn has quit [Ping timeout: 252 seconds]
<pawnbox> Lemme rephrase.
<pawnbox> how do i iterate over a var which has compile-time type is (Nil | String | Hash(String, String) | Hash(YAML::Type, YAML::Type) | Array(YAML::Type)).
<pawnbox> ?
<pawnbox> config.each {...} if config.is_a?(Hash) doesn't work for me.
askn has joined #crystal-lang
<pawnbox> it says undefined method 'each' for Nil.
<BlaXpirit> pawnbox, well normally you don't deal with such monstrosity
<askn> Do you have any suggestions jhass
<BlaXpirit> you should go further and elaborate on the use case
<jhass> askn: make a hash to lookup at compile time or generate a case when dispatcher with a macro
<BlaXpirit> pawnbox, hmm first of all use config.not_nil!.each
<BlaXpirit> or better see why it might be Nil
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://github.com/manastech/crystal/commit/9152dc7d9e791646b69e517cc92de23593577269
<crystal-gh> crystal/master 9152dc7 Ary Borenszweig: Added specs for HTTP::StaticFileHandler
<pawnbox> then it says undefined method 'each' for String
<pawnbox> I hoped @config.is_a?(Hash) would work
<asterite> pawnbox: it should work if you assign @config to a local variable first: `config = @config; if config.is_a?(Hash); config.each ...
<pawnbox> Oh i remeber.
<pawnbox> asterite: i saw a discussion about this somewhere. I don't remember where.
<pawnbox> Thanks asterite
<pawnbox> What exactly doesn't is_a? work with instance variable?
<pawnbox> asterite:
<pawnbox> *Why
<asterite> Because if you do `if @a.is_a?(Hash)` and before executing the next line the program halts that thread and goes to another one and changes the value of @a, your program will behave in a wrong way
askn has quit [Ping timeout: 252 seconds]
<pawnbox> Goes to another thread? Why?
<jhass> in case it's multithreaded?
<jhass> context switches can happen anywhere then
<pawnbox> What i don't understand why would if @a.is_a?(X) cause a context switch?
wminor has quit [K-Lined]
mroth has quit [K-Lined]
iamstef has quit [K-Lined]
avdi has quit [K-Lined]
joshcarter has quit [K-Lined]
aemadrid has quit [K-Lined]
emmanueloga has quit [K-Lined]
danzilio has quit [K-Lined]
guilleiguaran__ has quit [K-Lined]
chrisseaton has quit [K-Lined]
victor_lowther has quit [K-Lined]
jwaldrip has quit [K-Lined]
<jhass> they're not caused, they happen
<pawnbox> ok. Guess i need to read up more on is_a?.
waj has joined #crystal-lang
chrisseaton has joined #crystal-lang
iamstef has joined #crystal-lang
emmanueloga has joined #crystal-lang
avdi has joined #crystal-lang
victor_lowther has joined #crystal-lang
mroth has joined #crystal-lang
wminor has joined #crystal-lang
koka has quit [Quit: Page closed]
aemadrid has joined #crystal-lang
nulpunkt has quit [Ping timeout: 245 seconds]
danzilio has joined #crystal-lang
guilleiguaran__ has joined #crystal-lang
joshcarter has joined #crystal-lang
jwaldrip has joined #crystal-lang
akwiatkowski has quit [Ping timeout: 246 seconds]
nulpunkt has joined #crystal-lang
Philpax has joined #crystal-lang
Philpax has quit [Ping timeout: 245 seconds]
waterlink has joined #crystal-lang
<asterite> pawnbox: it's not something related to is_a?, it's how operating systems work. They schedule some time to one thread, once that time is up they go to the next thread and so on. It's out of our control to know *when* the OS decides to switch threads, so it can happen just after the is_a? check completed
sadin is now known as Sadin
<robacarp> that is a fascinating constraint
<robacarp> I hadn't considered that instance variables meant they could be volatile
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
shama has quit [Remote host closed the connection]
shama has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 264 seconds]
trapped has joined #crystal-lang
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diner has joined #crystal-lang
trapped has joined #crystal-lang
akwiatkowski has joined #crystal-lang
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
tomchapin has joined #crystal-lang
diner has quit [Quit: Page closed]
Philpax has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 265 seconds]
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 256 seconds]
trapped has quit [Quit: Textual IRC Client: www.textualapp.com]
pawnbox has joined #crystal-lang