<FromGitter>
<bararchy> Seems like there is already a request for it
<FromGitter>
<r3bo0t> yes, given aws sdk is a huge piece in itself
rohitpaulk has joined #crystal-lang
<FromGitter>
<bararchy> So if you are interested in that, It would sure be great if you would collaborate on that Thread (even just telling you usecase needs, etc..)
<FromGitter>
<r3bo0t> sure @bararchy, thanks.
<FromGitter>
<bararchy> :)
<FromGitter>
<bararchy> Happy Crystalling
<FromGitter>
<skunkworker> Hi is there a compile macro way to check to make sure a property is set on an object? taking a Symbol as input and doing a check
<FromGitter>
<skunkworker> I tried something like `self.responds_to?(:{{variable}})`
<FromGitter>
<skunkworker> isn't working when I'm inputting a `Symbol` into `variable`
mark_66 has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 255 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 268 seconds]
<FromGitter>
<bew> @skunkworker use `{{variable.id}}`, you'll get `symbol` from a `:symbol` node
<FromGitter>
<skunkworker> I’m still getting the variable name, not what is inside the variable
rohitpaulk has joined #crystal-lang
<FromGitter>
<bew> macros won't get variables content, as variable content is a run-time information, not compile-time
txdv has quit [Ping timeout: 268 seconds]
txdv has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 260 seconds]
Kug3lis has joined #crystal-lang
<oprypin>
skunkworker, why make a wrapper for functionality that already exists?
yogg-saron has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<oprypin>
i feel like you're expecting some magic from macros, to make this thing work in more cases than it already does, but that sure ain't happening
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 255 seconds]
rohitpaulk has joined #crystal-lang
pduncan has quit [Ping timeout: 246 seconds]
pduncan has joined #crystal-lang
yogg-saron has joined #crystal-lang
pduncan has quit [Ping timeout: 255 seconds]
pduncan has joined #crystal-lang
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
snsei has joined #crystal-lang
<FromGitter>
<molovo> Howdy
<FromGitter>
<straight-shoota> hey
<FromGitter>
<straight-shoota> I've been experimenting with coverage testing with kcov and it really worked like a charm, you just need to create an all_spec file to compile all specs into one binary.
<FromGitter>
<akzhan> Great :)
<FromGitter>
<straight-shoota> Right now kcov seems to run into an infinite loop without any error message...
<FromGitter>
<straight-shoota> Did anyone notice something like this?
<FromGitter>
<molovo> @straight-shoota Yeah, I remember something like that happening when I tried it - I didn’t try compiling specs into a binary though, I just passed `crystal spec` straight to kcov. Maybe that’s where I was going wrong, but I never did get to the bottom of it.
<FromGitter>
<straight-shoota> Yesterday it worked fine, and it does not really be connected to code changes...
<FromGitter>
<straight-shoota> Unfortunately Ubuntu xenial has a very outdated version 25 of kcov and I didn't manage to compile a newer version myself
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
<FromGitter>
<drujensen> Question for the Core Team: Is there any plans to add Mail -> Client and Mail -> Server to the standard library?
kodo[m] has left #crystal-lang ["Kicked by @appservice-irc:matrix.org"]
<FromGitter>
<drujensen> @oprypin sounds good. just checking to make sure i’m not duplicating effort
<FromGitter>
<drujensen> I found a couple shards that are doing some Mail Client stuff so hopefully I can leverage them.
rohitpaulk has quit [Ping timeout: 246 seconds]
rohitpaulk has joined #crystal-lang
LastWhisper____ has joined #crystal-lang
<FromGitter>
<schovi> Hello guys. I just reached some issue (or maybe misunderstanding) of macros and using `run` in them. There is simple example app with README where is short infor about problem. Can anybody give me hint what is wrong, or how to do it correctly? https://github.com/schovi/macro_run_example
<RX14>
@schovi call_load_runner is a function not a macro
<RX14>
so the value of "value" is set at runtime
<RX14>
you can't pass normal variables to macros because they only exist at runtime
<RX14>
otherwise it just passes the name of the variable
<FromGitter>
<schovi> @RX14 Oh got it. I was thinking, that because I call it directly it would work.
<FromGitter>
<schovi> Thanks
<RX14>
think for example if you tried to call that function with ARGV[0]
<RX14>
the macro is at compile time
<RX14>
argv is at runtime
<RX14>
it's impossible
<FromGitter>
<schovi> Thank you. When you use it rarely it is so confusing! :)
<FromGitter>
<drosehn> https://media.pragprog.com/newsletters/2017-06-07.html -- in the middle of this email you'll see that the June issue of PragPub Magazine includes an article on crystal, and the same author will have a second article in the next issue. I haven't picked up the issue yet, so I don't know what the article is like. But this will give some more visibility to crystal.
<FromGitter>
<sdogruyol> that's cool
<FromGitter>
<lucas-wade> anyone used Metascraper shard?
mark_66 has quit [Quit: Leaving.]
yogg-saron has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter>
<lucas-wade> or any other scraper lib?
yogg-saron has joined #crystal-lang
yogg-saron has quit [Client Quit]
snsei has quit [Remote host closed the connection]
<FromGitter>
<fridgerator> @drosehn wow
dostoyesvky has quit [Ping timeout: 246 seconds]
dostoyesvky has joined #crystal-lang
Philpax_ has quit [Ping timeout: 255 seconds]
yogg-saron has joined #crystal-lang
yogg-saron has quit [Client Quit]
<FromGitter>
<forbes_kris_twitter> anyone using OpenCV with Crystal?
<greenbigfrog>
(I meant to ask ^ a while ago, fergot then though)
rohitpaulk has quit [Ping timeout: 260 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 255 seconds]
<FromGitter>
<Mil0dV> Hi guys&gals! I have a very noob question: how do I reference a classless method from my spec file? I tried `methodname`, `modulename::methodname` and `modulename.methodname`, but none of those work
<FromGitter>
<faultyserver> what does your code look like?
Kug3lis has quit [Remote host closed the connection]
<FromGitter>
<bew> You can use `{% p var.class_name %}` but it's not the same..
Kug3lis has joined #crystal-lang
<FromGitter>
<bew> `typeof(var)` can't work in macros, because a macro only knows about text (AST nodes), not semantic informations (about possible types)
<FromGitter>
<paulcsmith> @akzhan Thanks. That fixes that particular example, but what I really want to do is something like this, which I don't believe is possible without `typeof` in macros https://play.crystal-lang.org/#/r/25ft
<FromGitter>
<paulcsmith> And it seems odd considering you can do something like this, which gets the type at compile time. I don't understand why it won't work in a macro https://play.crystal-lang.org/#/r/25fu
<FromGitter>
<bew> but now I get "can't use typeof here" :(
<FromGitter>
<paulcsmith> Yeah compiler doesn't like typeof for defining instance vars, which makes sense since it'd need to analyze every call to get the type. Maybe that's the same reason it can't do it in macros 🤷♂️
<FromGitter>
<bew> yeah I think that sth like that :/
<FromGitter>
<bew> aaaand why not use something like `lazy` or `future` ?
<FromGitter>
<straight-shoota> @paulcsmith unless their type can be directly inferred
<FromGitter>
<paulcsmith> Yeah I didn't think it could infer that. So I guess it infers that it's nilable from that automatically
<FromGitter>
<paulcsmith> I didn't know the compiler was so smart :D
<FromGitter>
<paulcsmith> That makes the memoize macro useless since that's so easy
<FromGitter>
<straight-shoota> :laughing:
<FromGitter>
<straight-shoota> Yeah, well, but using `||=` for memoization has its probles... if `nil` is a valid return value, this value will not be memoized
<FromGitter>
<paulcsmith> Hmm it can infer simple literals but fails for a lot of other stuff. So the macro may still be useful. This doesn't work for example https://play.crystal-lang.org/#/r/25gs
<FromGitter>
<paulcsmith> Yeah inference seems to only be able to infer really simple literals otherwise you need to define it yourself
<FromGitter>
<bew> like you said @straight-shoota, it works only for literals, wich infer directly it's types, but doesn't works for indirect type inferance..
<FromGitter>
<straight-shoota> @akzhan I'd rather consider a special uninitialized value similar to `Iterator::Stop` instead of an additional instance var to track memoization
<FromGitter>
<paulcsmith> Cool idea @straight-shoota
<FromGitter>
<akzhan> Yep!
<FromGitter>
<akzhan> anyway there is crystal tool expand or something like it
<FromGitter>
<straight-shoota> @paulcsmith using TypeDeclaration is also great ;)
<FromGitter>
<akzhan> @paulcsmith your solution is great one :) we are the masters :)
<FromGitter>
<paulcsmith> Thanks for all the ideas. That was fun to work though with you guys
<FromGitter>
<bew> for the typedeclaration one you'll need the `begin ... end` to make multiline blocks work as @akzhan suggested https://play.crystal-lang.org/#/r/25hh
pleiosau1 has joined #crystal-lang
<FromGitter>
<straight-shoota> Things come together... ;)
<FromGitter>
<straight-shoota> I can't think of a really nice way to add method arguments...
Liothen- has joined #crystal-lang
DeBot has quit [Ping timeout: 240 seconds]
Liothen has quit [Ping timeout: 240 seconds]
pleiosaur has quit [Ping timeout: 240 seconds]
Disrecollection has quit [Ping timeout: 240 seconds]
<crystal-gh>
[crystal] Sija opened pull request #4528: Remove OSX from Travis CI (master...remove-osx-from-travis-ci) https://git.io/vHiZH
<Disrecollection>
Anyone willing to help out a newb? I'm currently working on a basic web scraper with Crystagiri, but I feel my understanding of Syntax and core concepts is lacking. I've done some Ruby coding in the past, but mainly my background has been C. I'm doing this proj to learn more about Crystal, because it seems super cool.
<FromGitter>
<bew> feel free to expose your problems!
<Disrecollection>
Alright! I'm almost done with this draft, and then I'll shoot it on over.
<FromGitter>
<bew> I don't know about crystagiri, so I won't be able to help you with it
<FromGitter>
<bew> I didn't change a lot, but you should get the idea
<Disrecollection>
NP, I'm sorta figuring everything out via trial error and ref anyway. Syntax is one of my bigger issues. The gitbook didn't really say exactly how whitespace worked, etc.
<Disrecollection>
Thanks for the help regardless of the crystagiri exp. tho, I really do appreciate it.
<FromGitter>
<bew> the best way for you to learn the syntax, is to read ohers code
<FromGitter>
<bew> others*
<Disrecollection>
Any reccomendations?
<FromGitter>
<bew> the compiler? :P
<Disrecollection>
I think the compiler code was little too dense for me last I checked
<FromGitter>
<bew> I'm sure you'll find one that's not too dense :)
<Disrecollection>
I dunno. I was really tired when I started getting into the project, so some of the stuff is just sorta fever dreams. I'll take another look at the compiler and a new look at that link, see if I can puzzle it out.