<FromGitter>
<kevinelliott> I just removed the logger lines.
<FromGitter>
<kevinelliott> Fingers crossed...
<FromGitter>
<kevinelliott> No still has `2019-01-08T01:45:35.944299+00:00 app[web.1]: Unhandled exception: Unsupported cipher algorithm "aes-256-cbc" (ArgumentError)`
<FromGitter>
<Blacksmoke16> well thats coming from crystal
<FromGitter>
<kevinelliott> Well it’s Amber’s default MessageEncryptor valu
<FromGitter>
<kevinelliott> It might just be that the packge is too old.
<FromGitter>
<kevinelliott> 1) 0.2g
<FromGitter>
<Blacksmoke16> Probably
<FromGitter>
<kevinelliott> Jumped up to using heroku-18 stack, but now it’s missing libevent. What a mess.
<FromGitter>
<kevinelliott> `libevent-dev is already the newest version (2.1.8-stable-4build1).`
<FromGitter>
<kevinelliott> Yet, `bin/amber: error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory`
<FromGitter>
<kevinelliott> Ahh, looking for 2.0. *shakes fist*
<FromGitter>
<kevinelliott> I’m not sure why it’s looking for 2.0.
<FromGitter>
<kevinelliott> Progress… I set `settings.host = “0.0.0.0”`
<FromGitter>
<kevinelliott> Now it starts. But it’s serving `no driver was registered for the schema "", did you maybe forget to require the database driver?`
<FromGitter>
<kevinelliott> I believe this is your territory @Blacksmoke16 :)
<FromGitter>
<Blacksmoke16> gotta register an adapter
<FromGitter>
<kevinelliott> Yeah i have this in my initializer
<FromGitter>
<eliasjpr> @kevinelliott you can sent the db in application.cr
<FromGitter>
<kevinelliott> Yeah, I have it in the intializer instead.
<FromGitter>
<eliasjpr> kk
<FromGitter>
<eliasjpr> `settings.database_url = ENV["DATABASE_URL"] if ENV["DATABASE_URL"]?` thats how it looks in application cr
<FromGitter>
<kevinelliott> Yeah, that’s what I had
<FromGitter>
<kevinelliott> But for some reason it was empty sometimes
<FromGitter>
<eliasjpr> mmm
<FromGitter>
<eliasjpr> interesting
<FromGitter>
<eliasjpr> how is amber treating you?
<FromGitter>
<kevinelliott> Good!
<FromGitter>
<eliasjpr> enjoying it?
<FromGitter>
<eliasjpr> nice! look forward to see the things you build with amber
<FromGitter>
<kevinelliott> Definitely. I’m using it for www.cry.st and plan to use it for www.crystal.sh and quite likely for shards db UI that I’m going to be working with @straight-shooter on (though will need to discuss that with him).
<FromGitter>
<kevinelliott> After that, my hope is that I’m contributing back to Amber and related crystal shards so that I can start using it in a more professional capacity and help grow the community at the same time.
<FromGitter>
<eliasjpr> sweet!
<FromGitter>
<eliasjpr> PRs welcome!
<FromGitter>
<kevinelliott> Great, will do.
<FromGitter>
<Blacksmoke16> i need to get more people using athena, feedback would be nice
<FromGitter>
<Blacksmoke16> any progress on your schema thing @eliasjpr ?
<FromGitter>
<kevinelliott> @Blacksmoke16 I’ll probably give athena a whirl soon
<FromGitter>
<Blacksmoke16> ayy, thanks. appreciate it
<FromGitter>
<Blacksmoke16> should be fairly easy to get going
<FromGitter>
<kevinelliott> What do you guys think? http://www.cry.st
<FromGitter>
<kevinelliott> Good god crystal and amber is fast.
<FromGitter>
<Blacksmoke16> fancy
<FromGitter>
<Blacksmoke16> ikr? got my api running athena and response time locally is like 4ms, with 2 db queries as well
<FromGitter>
<Blacksmoke16> is insane
<FromGitter>
<Blacksmoke16> i use same router as amber so id imagine response time would be similar
<FromGitter>
<Blacksmoke16> ruby took like 150 or something
<FromGitter>
<Blacksmoke16> anyway, glad you got it working, is a good start. imma get to bed, catch you later o/
<FromGitter>
<kevinelliott> Thanks @Blacksmoke16 me too. Sounds good man, see ya later!
<FromGitter>
<vifreefly> It looks like there is already Sequel-inspired ORM in Crystal (https://github.com/anykeyh/clear). ⏎ Looks nike, I love that virtual blocks style, example: `User.query.find{ email =~ /yacine/i }`
<FromGitter>
<vifreefly> I think author did the right thing trying to concentrate only on the one ORM - Postgres (instead of supporting all 3). Do less but better :)
_whitelogger has joined #amber
feepbot has quit [Ping timeout: 268 seconds]
feepbot has joined #amber
<FromGitter>
<Blacksmoke16> I used that for a while
<FromGitter>
<Blacksmoke16> Yea, worked quite well
<FromGitter>
<eliasjpr> I’m still working, I actually had to use the JSON and Yaml annotations
<FromGitter>
<Blacksmoke16> vs the mapping?
<FromGitter>
<eliasjpr> yes
<FromGitter>
<eliasjpr> the nesting and the JSON.mapping do not work well with eachother
<FromGitter>
<Blacksmoke16> as if each child obj has a "validator" or something can just iterate over them
<FromGitter>
<Blacksmoke16> there's also nothing stopping you from adding additional fields to the `JSON::Field` to read off of, wouldnt work with standard crystal `to_json` tho
<FromGitter>
<eliasjpr> I am fining myself to have to override the to_json and to_yaml
<FromGitter>
<eliasjpr> thanks for the snippets, definitely helpful
<FromGitter>
<Blacksmoke16> id have rather not either, but unless some functionality gets added to stdlib, its just not possible
<FromGitter>
<Blacksmoke16> such as the groups
<FromGitter>
<eliasjpr> I feel the same way
<FromGitter>
<eliasjpr> I do not want to override the `to_json`
<FromGitter>
<Blacksmoke16> more of a chance of developing them if they get split out into their own shards imo
<FromGitter>
<eliasjpr> Puff, was able to add the nested json without needing to change the Crystal implementation
<FromGitter>
<eliasjpr> 😅
<FromGitter>
<Blacksmoke16> \o/
<FromGitter>
<Blacksmoke16> nice one
deadalnix has joined #amber
deadalnix has quit [Remote host closed the connection]
deadalnix has joined #amber
<FromGitter>
<kevinelliott> @Blacksmoke16 @eliasjpr Why don’t the two of you submit a crystal PR to augment it?
<FromGitter>
<Blacksmoke16> should already be a thing, can just call to_json on a parent and it just works (assuming you are using serializable) in each
<FromGitter>
<Blacksmoke16> but would be a question for core team if stuff like serialization groups should be added in
<FromGitter>
<kevinelliott> Yeah that’s what I’m referring to (the earlier talk)
<FromGitter>
<kevinelliott> Not overriding
<FromGitter>
<Blacksmoke16> having groups and since/when would be super nice, would pretty much be able to just wrap to/from_json at that point
<FromGitter>
<Blacksmoke16> ideally imo, id like for my shard to be obsolete if stdlib supports it all at some point
<FromGitter>
<Blacksmoke16> but see how it goes
<FromGitter>
<kevinelliott> Semi-unrelated: Ruby 2.6’s new `then` exception handling is pretty dope.
<FromGitter>
<Blacksmoke16> i always thought it would be cool to have a parm field on the json annotation, that is like `set this ivar to the value at the end of this path`
<FromGitter>
<Blacksmoke16> i.e. to extract a value from a json obj/nested json obj w/o building out a bunch more structs or something
<FromGitter>
<eliasjpr> With the hook method I was able to need to store the params payload in each of the schemas
<FromGitter>
<eliasjpr> > i always thought it would be cool to have a parm field on the json annotation, that is like `set this ivar to the value at the end of this path` ⏎ ⏎ I thought that was exactly why the annotation was needed
<FromGitter>
<Blacksmoke16> it would allow you do to something like `@[JSON::Field(path: ["path", "to","var"])]`
<FromGitter>
<Blacksmoke16> but you cant implement it w/o overriding `from_json`, or if that gets added to `from_json`
<FromGitter>
<eliasjpr> I see
<FromGitter>
<eliasjpr> Yeah that would pretty cool
<FromGitter>
<eliasjpr> it does have a key and root argument
<FromGitter>
<eliasjpr> I think thats the intention
<FromGitter>
<Blacksmoke16> root is good but only goes one level deep, plus key does more than you think
<FromGitter>
<Blacksmoke16> key also changes that propertie's key name on to_json
<FromGitter>
<Blacksmoke16> which kinda makes sense now, but id rather it be split, like serialize_key and deserialize_key
<FromGitter>
<eliasjpr> got it
<FromGitter>
<Blacksmoke16> plus another thing root does is like
<FromGitter>
<Blacksmoke16> let me make an exampe...
<FromGitter>
<eliasjpr> With the schema you should be able to represent the json as it is nested