<FromGitter>
<jwoertink> `undefined local variable or method 'a`
<FromGitter>
<jwoertink> which would make sense here, and I understand why
<FromGitter>
<jwoertink> but this is the most simple way I can show "call one macro from another"
<Papierkorb>
If you understand why, why don't you post working code?
<FromGitter>
<jwoertink> lol. because If I had working code, I wouldn't be asking the question
<Papierkorb>
`::Thing.a` in b.
<FromGitter>
<jwoertink> ah!
<FromGitter>
<jwoertink> awesome! Thanks.
<Papierkorb>
macros are *expanded*. They work on the AST. They're expanded locally where you "call" them (hence we say macros are expanded, not called or invoked).
<Papierkorb>
Thus, in a macro body, you have to take into account that your code is actually living in the scope of the users code, and not in your class
<FromGitter>
<jwoertink> oh, ok. Yeah, that makes sense.
shankar has joined #crystal-lang
vivus has quit [Quit: Leaving]
shankar has quit [Remote host closed the connection]
shankar has joined #crystal-lang
shankar has quit [Quit: Leaving]
aroaminggeek has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
watzon_ has quit [Remote host closed the connection]
watzon_ has joined #crystal-lang
<FromGitter>
<codenoid> morning crystaller
sz0 has quit [Quit: Connection closed for inactivity]
<bmcginty>
I was just going through some of the crystal code, trying to modernize txe's crystal-win branch to get Crystal to run with the current commit. However, I see there are all these crystal::system changes. I'd like to assist with the windows porting, but don't want to do work that's going to just be scrapped as others have partiall done it already. Anyone have suggestions?
DTZUZO has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 260 seconds]
snsei has joined #crystal-lang
PixeLInc has quit [Ping timeout: 246 seconds]
claudiuinberlin has joined #crystal-lang
rohitpaulk has joined #crystal-lang
olbat has quit [Ping timeout: 268 seconds]
snsei has quit [Remote host closed the connection]
<FromGitter>
<extremety1989> hope someone will help me =)
alex`` has joined #crystal-lang
alex`` is now known as alexherbo2
alexherbo2 is now known as alex``
alex`` is now known as alexherbo2
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 255 seconds]
alexherbo2 is now known as alex``
faustinoaq has quit [Ping timeout: 255 seconds]
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 250 seconds]
faustinoaq has joined #crystal-lang
rohitpaulk has joined #crystal-lang
aroaminggeek has joined #crystal-lang
aroaminggeek has quit [Ping timeout: 260 seconds]
maxpert has joined #crystal-lang
<maxpert>
hmmm
maxpert has quit [Remote host closed the connection]
maxpert has joined #crystal-lang
<FromGitter>
<lwakefield> Hey, I am sure I am going about this the wrong way, but what is the easiest way to create a `JSON::Any` from a hash literal: ex. `JSON::Any.new({"foo": "bar"})`
<FromGitter>
<extremety1989> @lwakefield have you tried it on postgres ?
maxpert has quit [Ping timeout: 250 seconds]
<FromGitter>
<lwakefield> No, but unless I am missing something @extremety1989, I don't see how that is related?
<FromGitter>
<extremety1989> @lwakefield well
<FromGitter>
<extremety1989> im trying to insert json data to postgres
<FromGitter>
<extremety1989> using token field as jsnb
maxpert_ has quit [Remote host closed the connection]
<FromGitter>
<lwakefield> @bew bummer. Ideally it would be a convenience thing, for testing some framework code.
<FromGitter>
<lwakefield> I suppose serializing & deserializing isn't that big of a deal if it is just testing code.
<Papierkorb>
lwakefield, there's a convenient thing to do it: Simply `JSON.parse` a json document. For testing I this may be fine.
<Papierkorb>
Note that you can use `%<...>` instead of double-quotes, so you don't have to unescape them in the document when writing it manually.
maxpert has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter>
<lwakefield> Oh nice, that makes much more sense than having the overhead of serializing.
<FromGitter>
<lwakefield> Thanks @Papierkorb!
sz0 has quit [Quit: Connection closed for inactivity]
rohitpaulk has joined #crystal-lang
maxpert has quit [Remote host closed the connection]
faustinoaq has quit [Quit: IRC client terminated!]
maxpert has joined #crystal-lang
maxpert has quit [Ping timeout: 248 seconds]
maxpert has joined #crystal-lang
maxpert has quit [Remote host closed the connection]
hightower2 has joined #crystal-lang
hightower2 has quit [Client Quit]
hightower3 has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
<hightower3>
Is it expected that 0.24.0 prerelease reports "Crystal 0.23.0+313 [ea4187c57] (2017-10-27)" in crystal -v ?
<FromGitter>
<straight-shoota> hightower3, yes
<FromGitter>
<straight-shoota> but I think this could be improved
maxpert has joined #crystal-lang
maxpert has quit [Remote host closed the connection]
maxpert has joined #crystal-lang
maxpert has quit [Remote host closed the connection]
aroaminggeek has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 248 seconds]
aroaminggeek has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
faustinoaq has joined #crystal-lang
faustinoaq has quit [Ping timeout: 246 seconds]
<FromGitter>
<MrSorcus> https://github.com/crystal-community/leveldb - why here PR doesn't accepted? This shard failed when building, but in PR available fix. (unexpected token: as) change line 9 to `@err_ptr = pointerof(@err_address).as(Pointer(UInt64))`
<oprypin>
I don't understand what you're saying
<oprypin>
MrSorcus, perhaps your version of Crystal is outdated?
<oprypin>
MrSorcus, it's likely that your download of the shard doesnt have the latest code
<oprypin>
because the released version is old
<oprypin>
do you use shard.yml ? maybe specify branch: master for the dependency
<bmcginty>
I'm going through the windows code that txe and others have written, and just planning on working on everything until specs pass. Is that a good plan, or is someone else working on any part of it currently?
snsei has joined #crystal-lang
<oprypin>
bmcginty, well there's the opinion that this should be planned and done gradually and that the fork is messy,
<oprypin>
but nobody's actually doing the work
<oprypin>
i'd love to merge any such fork but i dont have a say
<bmcginty>
oprypin: Okay. I couldn't eve figure out which way the crystal::system thing is headed, or I'd pull all my changes to the latest commit.
<FromGitter>
<MrSorcus> > **<oprypin>** do you use shard.yml ? maybe specify branch: master for the dependency ⏎ ⏎ Oh, you right. Thank you.
<oprypin>
well it's staying in, unfortunately, and not really moving anywhere, like everything else
<bmcginty>
I'll try to get all this working as quick as I can and maybe that'll be enough to push things forward a bit. Though contributers to the original windows PR have done the difficult bits with stacks and the like.
<oprypin>
bmcginty, well you can keep doing the work, just don't expect it to be merged ¯\_(ツ)_/¯