ChanServ changed the topic of #crystal-lang to: The Crystal programming language | | Fund Crystal's development: | GH: | Docs: | Gitter:
ur5us has quit [Ping timeout: 255 seconds]
ur5us has joined #crystal-lang
renich has quit [Read error: Connection reset by peer]
renich has joined #crystal-lang
<wmoxam> @Blacksmoke16 yeah, that way works. Thanks!
<FromGitter> <Blacksmoke16> 👍
renichbon has joined #crystal-lang
renich has quit [Read error: Connection reset by peer]
renichbon has quit [Quit: Leaving]
ur5us has quit [Ping timeout: 252 seconds]
jmdaemon has quit [Ping timeout: 258 seconds]
ur5us has joined #crystal-lang
<kevinsjoberg> What editor are people using for Crystal development?
<kevinsjoberg> I'm doing some research into editor popularity. Especially for Crystal. That's why I'm asking. :)
sagax has joined #crystal-lang
<FromGitter> <> I always use Emacs
<FromGitter> <> Vim and sometimes VSCode
ur5us has quit [Ping timeout: 250 seconds]
<hightower4> vim here
f1refly has quit [Quit: see ya in hell]
f1refly has joined #crystal-lang
<FromGitter> <riffraff169> vi
<FromGitter> <riffraff169> but i use vi for all my code, so...
Starfoxxes has quit [Ping timeout: 260 seconds]
Starfoxxes has joined #crystal-lang
_ht has joined #crystal-lang
<FromGitter> <RespiteSage> I used VSCode or rarely Vim if it's more convenient.
<FromGitter> <RespiteSage> *use
Sankalp has quit [Ping timeout: 246 seconds]
Sankalp has joined #crystal-lang
analogsalad has joined #crystal-lang
analog_salad has joined #crystal-lang
analogsalad has quit [Ping timeout: 240 seconds]
analog_salad is now known as analogsalad
analogsalad has quit [Quit: bye]
_ht has quit [Remote host closed the connection]
ur5us has joined #crystal-lang
jmdaemon has joined #crystal-lang
<FromGitter> <RespiteSage> Am I doing something wrong, or does it not work to use `ASTNode` type restrictions in macros?
<FromGitter> <RespiteSage> E.g.
<FromGitter> <Blacksmoke16> cant do that
<FromGitter> <Blacksmoke16> would have to check in the macr body
<FromGitter> <RespiteSage> Okay, gotcha.
<FromGitter> <RespiteSage> I guess this is what I was looking for:
<FromGitter> <Blacksmoke16> ye
<FromGitter> <Blacksmoke16> can have it raise a compile time error if thats what you want
<FromGitter> <RespiteSage> It's a bit clumsy for compile-time literal checking, which is what I want to be able to do, but I guess it works.
<FromGitter> <Blacksmoke16> `{% arr.raise "Only static arrays are allowed" unless arr.is_a? ArrayLiteral %}`
<FromGitter> <RespiteSage> Yeah, I know how to do that (e.g. for raising at compile-time when the generic type doesn't make sense). What I want is a "when you can" approach to compile-time checking. I need a minute to get another example of what I'm thinking about.
<FromGitter> <Blacksmoke16> 👍
<FromGitter> <RespiteSage>
<FromGitter> <RespiteSage> Except, ideally, the user wouldn't even know that there's a macro at work. Those cases would just be caught by the compiler with a small cost in compile time and no extra work for a user of a library or whatever.
<FromGitter> <Blacksmoke16> can you define a macro called `new`
<FromGitter> <RespiteSage> I hadn't tried yet. I was scared. :P
<FromGitter> <RespiteSage> It seems to have killed Lemme try it on my machine. I think what happened was I created a compile-time infinite recursion.
<FromGitter> <Blacksmoke16> :P
<FromGitter> <RespiteSage> ```code paste, see link``` []
<FromGitter> <RespiteSage> Yep!
<FromGitter> <RespiteSage> The gist (lowercase) of my RFC I started was to expose more concrete information about method arguments based on their instantiations in order to provide things like whether they're a literal, but I abandoned that line of thinking when considering just how much extra overhead it would probably have to add to the compiler.
renich has joined #crystal-lang
ur5us has quit [Quit: Leaving]