<watzon>
You have to require `crystal/bcrypt/password`
<vivus>
watzon: where? in seeds.cr ?
<watzon>
In user.cr probably
<vivus>
aah yes you are right watzon . I missed that
<vivus>
thank you
ruby_ has joined #crystal-lang
<watzon>
No problem
csk157 has joined #crystal-lang
ruby_ has joined #crystal-lang
ruby_ has quit [Client Quit]
csk157 has quit [Ping timeout: 240 seconds]
<FromGitter>
<marksiemers> @vivus Can you report that as an issue?
<FromGitter>
<marksiemers> Oh, nm, you are following the docs. You can also `amber g auth User` and see what it does for you.
<vivus>
@marksiemers that was my fault for not including the bcrypt. However, the code doesn't compile after doing the `crystal db/seeds.cr` and running `amber w`
<FromGitter>
<marksiemers> I don't want to pollute the group chat with debugging, but if you jump on gitter directly, we can direct message
<vivus>
I just spun up a new amber project and ran `amber g auth User` . probably something wrong I did.
<FromGitter>
<marksiemers> No, the docs for that are out of date - I had the same issue last week, I just don't remember the resolution
<FromGitter>
<marksiemers> In general, the generators will be more up-to-date than the docs - from my experience so far
<vivus>
is this syntax familiar to Ruby users? I am looking through it and it is somewhat confusing
DTZUZO has quit [Ping timeout: 248 seconds]
<vivus>
@marksiemers yeah I noticed that the docs and code in the current app are not the same. quite a few differences
<FromGitter>
<marksiemers> Crystal has a lot of similarities to Ruby, Amber has some similarities to Rails, but also Phoenix and other frameworks/libs - so there will be some divergence.
<FromGitter>
<marksiemers> I would say the biggest place is in the routes and the ORM
<FromGitter>
<marksiemers> ecr ~= erb and slang ~= slim and the controllers should look similar
<vivus>
@marksiemers do I run `amber g auth User` before or after creating the database? `amber db create`
<FromGitter>
<marksiemers> If you join the amber channel, you can ask away and get probably better advice/answers from the core team.
<vivus>
ill need a gitter account. or I think I have one...
<FromGitter>
<marksiemers> I don't know if that will matter, but you will have to run `amber db migrate` after you generate the auth
<FromGitter>
<marksiemers> `amber db create && amber g auth User && amber db migrate seed` - that's probably the safest
<vivus>
yeah I got some odd errors doing g auth User first
<FromGitter>
<faustinoaq> @marksiemers On sqlite `amber db migrate` give an error, I have to use `amber migrate up` instead
<FromGitter>
<faustinoaq> On postgres and mysql `amber db create` works as expected
<FromGitter>
<faustinoaq> @marksiemers Maybe we can create an amber topic on IRC and create a binding to amber gitter room, just like crystal does here
<vivus>
this room only has 111 people. Unless the gitter channel has a lot more
sz0 has joined #crystal-lang
<FromGitter>
<marksiemers> @faustinoaq - That sounds like a good idea
<FromGitter>
<marksiemers> @vivus - If you do want to join gitter - it just uses your GitHub credentials
<vivus>
this generator is awesome. it creates a user, login and logout without writing any code
<FromGitter>
<marksiemers> Yeah, it is one of the advantages (aka tradoffs) of using amber vs kemal.
alex`` has quit [Ping timeout: 258 seconds]
<vivus>
@marksiemers I am working backwards and seeing if I can 'cheat' and create a reddit/twitter clone using a rails tutorial
<FromGitter>
<marksiemers> That's a fun experiment - I just started contributing to Amber last week - there is a lot to address, but it looks pretty promising as a Rails replacement with Crystal speed.
<FromGitter>
<marksiemers> I'm sure the core team would like to hear how it goes for you (I would too).
<vivus>
@marksiemers I assume switching languages for you is a lot easier than a non-Rubyist
<FromGitter>
<marksiemers> Yeah, knowing thing the "ruby way" is helpful, but if someone only has Ruby (and JS) experience then they may not immediately appreciate strong typing, compilation, and method overloading (sorely missed)
<vivus>
or if they aren't used to verbose syntax either :P
<FromGitter>
<marksiemers> That would be for the non-rubyist, yes, very verbose. Are you coming from go-lang?
<vivus>
Python (eek)
<FromGitter>
<marksiemers> Oh, yeah, there is more than one way to solve a problem here...
<vivus>
and lots of `::` everywhere XD
<FromGitter>
<marksiemers> And I don't think there is a benevolent dictator
<vivus>
Ruby has a BDFL :P
<Papierkorb>
reminds me we had people who requested crystal to use a indention-code-block thing like python. "Reject, NEXT."
<vivus>
a difficult thing to implement for a compiler
<Papierkorb>
and an awful thing to read as human
<vivus>
indentation makes code more readable IMO
<Papierkorb>
indention? Yes, sure
<Papierkorb>
but not in the way python uses it
<Papierkorb>
no one is saying anything against indenting code properly. just that relying on that for code blocks makes it insanely hard to read
<FromGitter>
<marksiemers> Hopefully someone can look into it - right now the priority is coding > tutorials. ⏎ But that and the Hartl Tutorial would be good to replicate (his is a twitter clone)
<vivus>
link to Hartl tutorial?
<FromGitter>
<marksiemers> `get "/", PostController, :index` - for the root route
<FromGitter>
<faustinoaq> @marksiemers Have you been able to use `redirect_to :PostController, :index` on amber ? instead of `redirect_to "/posts"` ?
<FromGitter>
<faustinoaq> I tried, but I'm getting `Nil Assertion` error
<vivus>
do I need to create a PostController via amber? `amber generate controller Post ...` ?
<FromGitter>
<faustinoaq> `Nil` never die 😆
<FromGitter>
<marksiemers> @vivus - You don't "need" to use the amber generator for anything, but it will save you from typing a lot of code - particularly while learning
<vivus>
true that
<FromGitter>
<marksiemers> I would recommend you scaffold one thing, just to see all the files it creates and updates
<FromGitter>
<marksiemers> `amber g scaffold Post title:string body:text` for instance
<vivus>
I ran `amber generate model Post title:string url:string body:text` is this the same as `amber generate scaffold ...` ?
<vivus>
I see it isn't
notdaniel has quit [Quit: Leaving]
<FromGitter>
<faustinoaq> No, scaffolding is a bit more complex
<FromGitter>
<faustinoaq> It generates views, spec and controllers too
<FromGitter>
<marksiemers> And modifies the routes - it does quite a bit
<vivus>
yep I see it now. it added the routes for me
<vivus>
very powerful framework
<FromGitter>
<faustinoaq> Yeah, we just need a better documentation 😅
<vivus>
this is insane. I haven't written 1 line of code and I have a reddit clone with authentication :/
<FromGitter>
<faustinoaq> Wow, can you share us the commands you used ? ⏎ ⏎ I want to try too 😄
<FromGitter>
<faustinoaq> Hey guys, What is your favorite programming font? I love Consolas, but isn't avaliable on Linux :( I have to copy from Windows machine, exist some good programming font on Linux, I used to use Inconsolate, but looks really bad in normal DPI screens. Also Ubuntu modo seems good but I don't like the "m" 😅
<vivus>
I now see why people have used Rails for prototyping. Amber is awesome!
<vivus>
I shall catch up tomorrow. ciao!
<vivus>
and thanks @marksiemers and others
vivus has quit [Quit: Leaving]
<FromGitter>
<marksiemers> np ciao
<FromGitter>
<pnloyd> @faustinoaq I tried some fonts recently and decided on roboto mono medium. Roboto scales well to small sizes, combined with the medium thickness makes it really easy to read smaller fonts. So you can fit more code on your screen 😄
<FromGitter>
<faustinoaq> @pnloyd Thanks you! good recommendation, Is Roboto the same font Crystal uses in his home page code examples?
<FromGitter>
<pnloyd> Looks like it ya
<FromGitter>
<pnloyd> It uses roboto mono
<FromGitter>
<faustinoaq> 👍
<FromGitter>
<pnloyd> I think roboto is the most popular font on fonts.google.com
<FromGitter>
<marksiemers> based just on the description, certain routes don't use the heap at all, probably enables a lot of low level caching by the hardware.
sz0 has quit [Quit: Connection closed for inactivity]
<watzon>
I'm running into one of those issues where the type system kinda gets in the way
buggs has quit [Quit: WeeChat 1.5]
<FromGitter>
<yxhuvud> No, you would have to figure out what the block returns and create the new hash using that type. Does it allow you to put typeof(yield(keys.first)) into the hash definition?
<watzon>
I actually figured out kind of a hacky workaround
<FromGitter>
<yxhuvud> not certain what happens if it would be empty though.
tdc has joined #crystal-lang
<watzon>
Hmm good question
<FromGitter>
<bew> It will work the same
<FromGitter>
<bew> typeof(method) will not actually run the method (and raise in this case), it's used to retrieve only the type that the method returns
<FromGitter>
<bew> And as this one raises when it's empty, if it works ot will always return sth with the type you're looking for
<FromGitter>
<unreadable> Morning all
<FromGitter>
<unreadable> :)
<watzon>
Hmm... any way to do a dynamic `responds_to?`
<watzon>
Since it only takes a symbol as a parameter I seem to be running in to a problem
<watzon>
Oh wait, nvm. I didn't realize you could do `responds_to?(:"word")`
shankar has joined #crystal-lang
shankar has quit [Quit: Leaving]
shankar has joined #crystal-lang
<FromGitter>
<hugoabonizio> morning 😃
shankar has quit [Quit: Leaving]
<watzon>
I know the decision was made to remove aliases, but you know where they are really useful? For making human readable DSLs
literal has quit [Read error: Connection reset by peer]
<watzon>
For instance, the Duration module in ActiveSupport which allows you to do `1.month.ago` which is the same as `1.month.before`, but makes more sense in most contexts
literal has joined #crystal-lang
csk157 has joined #crystal-lang
csk157 has quit [Ping timeout: 248 seconds]
shiro` has joined #crystal-lang
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter>
<sdogruyol> @watzon that's not a good example
<watzon>
You're right lol, but aliases are good for DSLs
<watzon>
Sometimes things just make more sense or are easier to understand with a different word
<FromGitter>
<sdogruyol> IMHO that depends
alex`` has quit [Quit: WeeChat 1.9.1]
<FromGitter>
<sdogruyol> if there's too much aliases that's not good
<watzon>
Oh of course, but sometimes aliases are a benefit
<FromGitter>
<sdogruyol> I tend to like them %30 of the time :P
<FromGitter>
<exts> does crystal support static methods?
stephenwithav has quit [Ping timeout: 240 seconds]
gcds has joined #crystal-lang
notdaniel has quit [Quit: Leaving]
Guest37250 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<gcds>
Hi, how hard do you think will be to make Crystal run on embedded cpus like Cortex M4 and etc? Of course without GC or small version similar to what other ported languages uses
<RX14>
@asterite since you can *build* a standard library from that base
<RX14>
@asterite you can build a much better uc stdlib in crystal thanh you can in C
<RX14>
since crystal has better tools for abstraction
<gcds>
RX14 exactly why I want crystal
<RX14>
but it'll always be a pain and not "real crystal" because it won't be the "real" stdlib
<RX14>
the best bet for crystal on uc is to write a stdlib from scratch
<RX14>
something with an arduino-like abstraction would be cool
<gcds>
RX14 but what will limit stdlib
<Papierkorb>
gcds: Do you know Rust? How half of their type system revolves around memory management? With those funny suffixes like ' ? They don't do it because it's fun, but because it's needed. Language design-wise, "automatic non-GC memory management" comes at a big price. Rust wanted to pay it. We didn't.
<gcds>
Papierkorb I know
<FromGitter>
<sdogruyol> and Rust is hard..
<FromGitter>
<sdogruyol> the learning curve is not that easy
<gcds>
sdogruyol: exactly
<RX14>
and writing a crystal stdlib from scratch is easier?
<Papierkorb>
why rewrite it?
<RX14>
we depend on virtual memory
<RX14>
hard depend
<Papierkorb>
mh?
<RX14>
microcontrolers dont have a MMU
<RX14>
spawn
<RX14>
mmap
<shiro`>
maybe write a virtual machine that implements crystal
<FromGitter>
<sdogruyol> no please, no VM :/
<Papierkorb>
Ever heard of LLVM?
<shiro`>
no no no
<shiro`>
that's not virtual enough
<shiro`>
it has to be at least as virtual as the jvm
<Papierkorb>
RX14: Why does spawn need VM though?
<RX14>
you'd at least need major patches
<RX14>
well we have a hardcoded stack size of 8MiB
<shiro`>
basically you need to write a crystal compiler
<shiro`>
wtf
<RX14>
no shiro`
<shiro`>
a hardcoded stack size of 8MiB?
<RX14>
not at all
Ven has joined #crystal-lang
<RX14>
it's possible to compile crystal code for an arm microcontroller (without the stdlib) today
Ven is now known as Guest67908
<crystal-gh>
[crystal] asterite opened pull request #5226: Syntax: check Expressions#keyword in to_s (master...bug/5219-fix-parser-to_s-parens) https://git.io/vFOyY
<RX14>
i heard someone did it
<crystal-gh>
[crystal] asterite closed pull request #5222: Fix ASTNode#to_s to wrap with parenthesis as needed (master...fix/crystal/ast-to-s-wrap-parenthesis-as-needed) https://git.io/vFOvJ
<RX14>
Papierkorb, honestly unless it runs an OS with a FS the current stdlib is just not going to play with it
<RX14>
im sure of it
<RX14>
the assumptions we make
<Papierkorb>
Yeah I/O is the biggest issue
<Papierkorb>
But he's using ucLinux
<Papierkorb>
So if that thing doesn't have a VFS, I don't know
<gcds>
RX14 what if I go ucLinux way and create pseudo file system
<FromGitter>
<exts> woo, coding at 7am makes me overlook spelling bugs -_- dsn != dns
<FromGitter>
<sdogruyol> @exts have some coffee and you'll be good to go
<RX14>
gcds, might work
<RX14>
would need to absolutely not use fibers though
<RX14>
oh wait
<RX14>
we spawn them on init for libevent
<RX14>
so now you have to rip livevent from the scheduler
<FromGitter>
<exts> @sdogruyol :) *sips* someone mad a pot of some stuff I don't drink lol, need to make a new pot because this stuff isn't doing the trick
<FromGitter>
<exts> made *
<RX14>
it's major patches Papierkorb
<gcds>
libevent is just event loop I think you can create something similar in microway
<RX14>
the problem is you've now lost the benefits of a microcontroller: latency and power use
<RX14>
you have an OS
<RX14>
just get a raspi at this point
<crystal-gh>
[crystal] asterite pushed 2 new commits to master: https://git.io/vFOyi
<crystal-gh>
crystal/master 81a4c29 Stefan Merettig: ENV#[]=: Disallow null bytes in key and value...
shankar has quit [Read error: Connection reset by peer]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<crystal-gh>
[crystal] MakeNowJust opened pull request #5227: Can't use `self` in toplevel method (master...fix/crystal/no-self-in-toplevel-method) https://git.io/vFOAt
<gcds>
ok so problem is that libunwind is missing :D
csk157_1 has quit [Ping timeout: 260 seconds]
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<gcds>
OMG IT WORKS :D
<gcds>
nope false alarm :D
Poeticorpse is now known as Poeticode
claudiuinberlin has joined #crystal-lang
Ven has joined #crystal-lang
Ven is now known as Guest82369
TheGillies has quit [Ping timeout: 240 seconds]
tybee[m] has quit [Ping timeout: 240 seconds]
weston_[m] has quit [Ping timeout: 276 seconds]
weston_[m] has joined #crystal-lang
tybee[m] has joined #crystal-lang
csk157_1 has joined #crystal-lang
TheGillies has joined #crystal-lang
csk157_1 has quit [Ping timeout: 260 seconds]
mbarbar has joined #crystal-lang
mbarbar_ has joined #crystal-lang
mbarbar__ has joined #crystal-lang
<crystal-gh>
[crystal] straight-shoota opened pull request #5228: Fix: Added missing name field to constant doc json (master...jm-json-docs--fix-constant-name) https://git.io/vF3TQ
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter>
<crisward> is there a nice way to see if a `nil|string` object property has a size without first copying it to a local var. eg. user.password.size > 8, maybe using try or something??
<FromGitter>
<imcrazytwkr> Hi, folks. Sorry for going straight to the point but is there any recommended way to pass the info down middleware chain in Crystal? I saw that Kemal extends `HTTP::Context` and `HTTP::Request` but I wanted to avoid monkey patching.
<FromGitter>
<crisward> `user. password.try(&.size).try(&.> 5)` works, but gawd it's ugly
<FromGitter>
<imcrazytwkr> @crisward not sure if it is the best solution but maybe `return false unless user.password.responds_to?(:size)`?
<FromGitter>
<crisward> Think I'll wrap my ugly method in a util and call that. At least I don't have to look at it, and can fix it in the future if a nicer solution occurs. @imcrazytwkr thanks.
<Papierkorb>
crisward, either `stuff.try(&.size.> 5)` or `(stuff.try(&.size) || 0) > 5`
<Papierkorb>
I'd prefer the former
<Papierkorb>
... Please don't use responds_to for that.
<crystal-gh>
[crystal] jhass pushed 2 new commits to master: https://git.io/vF3mI
<crystal-gh>
crystal/master b16b851 Johannes Müller: Fix: Added missing name field to constant doc json
<crystal-gh>
crystal/master ef117af Jonne Haß: Merge pull request #5228 from straight-shoota/jm-json-docs--fix-constant-name...
<FromGitter>
<crisward> Yeah, I prefer your former one too. didn't know you could do that. Still going to create a util with it though. Thanks.
snsei has quit [Remote host closed the connection]
mark_66 has quit [Remote host closed the connection]
<FromGitter>
<faustinoaq> @crisward Why not more explicit option ? ⏎ ⏎ ```if password = user.password ⏎ password.size > 5 ⏎ end``` ⏎ ⏎ If I were a programmer without knowledge about crystal nor ruby, `.try(&` would look very strange to me ... [https://gitter.im/crystal-lang/crystal?at=59f9eedee44c43700aa4f6f1]
<Papierkorb>
We don't advance by not doing insane things
<Papierkorb>
Building a machine that does your math homework for you cause you're too lazy?
<Papierkorb>
Yeah sure
<crystal-gh>
[crystal] straight-shoota opened pull request #5229: Improved search feature for API docs (master...jm-docs-search) https://git.io/vF3lH
<gcds>
P.S. by doing machine which does ur homework u need to understand ur homework to write a algo... I think this way u learn way more than just doing homework :D
<FromGitter>
<faustinoaq> Well, I'm wrong, He was agree ⏎ ⏎ > Crystal without a GC and without a prelude is just almost C with a different syntax ⏎ >> If writing C with a different syntax is fun, go ahead :) ⏎ ... [https://gitter.im/crystal-lang/crystal?at=59f9fc41f7299e8f535ce33d]
csk157_1 has joined #crystal-lang
csk157_1 has quit [Ping timeout: 252 seconds]
<FromGitter>
<faustinoaq> @sdogruyol How many years since you discovered Crystal? I'm here since Jun, 2016. Also I see you met almost all core team 😄
<FromGitter>
<sdogruyol> hmm let me think
<FromGitter>
<sdogruyol> ~2.5 years
<gcds>
I think if written HAL and then nice interface on top of it with style of Crystal this would be sick for developing embedded :D
<FromGitter>
<Shalmezad> Since I've only known crystal for 2 days now, is there a list of ~~gems~~ shards available somewhere? Or would one just have to dig through github to find them (if there is one for whatever you're working on).
Guest11104 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Papierkorb>
crystalshards.xyz/
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #crystal-lang
<FromGitter>
<Shalmezad> Thanks!
rohitpaulk has quit [Ping timeout: 260 seconds]
Creatornator has joined #crystal-lang
<FromGitter>
<salzig> Hi there. ⏎ i would like to build a crystal app and provide it as a statically linked binary. As far as i understand i can provide `--link-flags="-static"`, which will embed almost everything. Is there an easy way to also embed libc? ⏎ Background: Would love to distribute the app as statically linked docker image without the need of a "distribution" base image.
Ven has joined #crystal-lang
Ven is now known as Guest15573
illyohs has quit [Read error: Connection reset by peer]
<FromGitter>
<faustinoaq> Yeah, sure you can but needs to do inside Alpine, it uses Musl instead of LibC, so is easier to link. http://public.portalier.com/alpine/
<FromGitter>
<salzig> @faustinoaq Musl-libc is just another implementation of libc. I would love to embed it into the final binary without the need of a distribution like base docker image. As in -> i would like to use `FROM scratch\nCOPY my_app .\nCMD ["/my_app"]`
<FromGitter>
<salzig> sadly `--link-flags="-static"` seems to still require a libc.so, so libc (being gnulibc or musllibc) is not embeded. ⏎ Or did i miss something important?
<FromGitter>
<salzig> yeah, he is copying all necessary shared objects. Thought there would be an easier way.
<FromGitter>
<watzon> I just realized that if I type `Thread.current` into icr I actually get the current thread. Is that part of the experimental thread support?
<FromGitter>
<salzig> something like i know from go-lang, where you can build using cgo and have a single binary that contains everything
qard has joined #crystal-lang
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter>
<mgarciaisaia> Static binaries, using muscl, is something we definitely want to achieve - but don't think we'll have that soon
Creatornator has joined #crystal-lang
<FromGitter>
<salzig> oh btw, could it be that glibc is embed, but dependencies used by glibc are loaded dynamically (e.g dns resolving)?
<FromGitter>
<salzig> (sry, i'm kinda new to linking and compiling. #rubyist)
<FromGitter>
<salzig> @mgarciaisaia is there an problem using musl?
<FromGitter>
<mgarciaisaia> I think statically linking glibc is a Bad Thing To Do™, but I'm not really sure about that - or why
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
csk157_2 has joined #crystal-lang
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
csk157_1 has quit [Ping timeout: 260 seconds]
tdc has quit [Ping timeout: 260 seconds]
claudiuinberlin has joined #crystal-lang
<FromGitter>
<salzig> thanks @faustinoaq @bew @mgarciaisaia for some hints. Too bad there is no easy solution right now.
<FromGitter>
<mgarciaisaia> What's the issue with the blogpost's solution?
<FromGitter>
<mgarciaisaia> Size?
<Papierkorb>
the semantics are practically the same (the container image is consistent), but if need ever arises (It's IT, it will), you can still rip it apart in 15 years and update completely broken libraries in it without rebuilding the program you've lost the source code when that last guy left the company
<Papierkorb>
Can't say the same about static linking
<FromGitter>
<yxhuvud> Glibc doesnt support static linking. Xlib is the same thing, they break.
sz0 has joined #crystal-lang
csk157_2 has quit [Quit: WeeChat 1.9.1]
Creatornator has joined #crystal-lang
<FromGitter>
<unreadable> I've been using musl with Rust with no problems, some may says that is not as fast as libc, but it uses less memory from what I've seen
alex`` has quit [Ping timeout: 248 seconds]
<FromGitter>
<unreadable> btw, can assembly be wrapped in a crystal module? I'm trying to read a file and wrap it up
<Papierkorb>
what kind of assembly?
<Papierkorb>
inline assembler?
<FromGitter>
<unreadable> Linux x86_64 assembly
<FromGitter>
<unreadable> Maybe something like `asm(mov etc)`
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Creatornator has joined #crystal-lang
Ven has joined #crystal-lang
Ven is now known as Guest26819
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Creatornator has joined #crystal-lang
Creatornator has quit [Client Quit]
Guest26819 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<robacarp>
In a macro, I used TupleLiteral#map and #join to create a StringLiteral of the code being generated but I'm unclear how to get the macro to emit that StringLiteral as code instead of wrapped in "". If that's unclear, I'll extract out the pattern and make an paste
<FromGitter>
<bew> Add #id
<FromGitter>
<bew> {{bla.id}}
<FromGitter>
<bew> Instead of {{bla}}
<robacarp>
ah, why was I thinking #name? Thanks bew
<FromGitter>
<watzon> So what's the best way to type a Hash who's value can either be a Hash or a String, but recursively? For instance : `{ "hello" => "world", "languages" => { "es" => "spanish" }}`
<FromGitter>
<watzon> Is there any way to do that? Or would I have to just leave the type off?