issyl0 has quit [Read error: Connection reset by peer]
issyl0 has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
dom96 has quit [Ping timeout: 256 seconds]
dom96 has joined #crystal-lang
_whitelogger has joined #crystal-lang
deavmi has quit [Ping timeout: 256 seconds]
deavmi has joined #crystal-lang
deavmi has quit [Ping timeout: 246 seconds]
deavmi has joined #crystal-lang
deavmi has quit [Ping timeout: 272 seconds]
_ht has joined #crystal-lang
DTZUZU has quit [Read error: Connection reset by peer]
deavmi has joined #crystal-lang
Vexatos has quit [Quit: ZNC Quit]
Vexatos has joined #crystal-lang
<FromGitter>
<rukkiddo> is there anything like layouts on ecr?
<FromGitter>
<rukkiddo> lets say I called <%= ECR.render "./src/views/my-page.ecr" %> can it first call layour.ecr and embed the template to layout
<FromGitter>
<Daniel-Worrall> Maybe you could put ECR.render in your ecr file
<Andriamanitra>
maybe it's just a kemal thing but i've used <%= content > and then "render my-page.ecr, layout.ecr"
<FromGitter>
<asterite> Yes, layout is an app thing, like in Ruby
<FromGitter>
<naqvis> @rukkiddo quick approach would be define custom method, which renders the subview, store that to some known variable and have that variable be accessed inside layout. ⏎ ⏎ *subview.ecr* ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=60043660fb85d46e04e9bfe9]
<FromGitter>
<rukkiddo> thanks everyone
<FromGitter>
<rukkiddo> I think I will use @naqvis solution
deavmi has quit [Quit: No Ping reply in 180 seconds.]
deavmi has joined #crystal-lang
deavmi has quit [Remote host closed the connection]
deavmi has joined #crystal-lang
deavmi has quit [Client Quit]
deavmi has joined #crystal-lang
deavmi has quit [Remote host closed the connection]
deavmi has joined #crystal-lang
deavmi has quit [Quit: No Ping reply in 180 seconds.]
deavmi has joined #crystal-lang
deavmi has quit [Remote host closed the connection]
<FromGitter>
<rukkiddo> @Blacksmoke16 I decided to go without any framework (took me around 3 weeks to quit amber and still I have some small stuff missing), but I will borrow parts from Athena or others in situations like this, thanks!
<FromGitter>
<Blacksmoke16> 😬 not sure rolling your own is the best option but 👍 gl
<FromGitter>
<Blacksmoke16> mainly now you have to maintain that and your actual app code
<FromGitter>
<Blacksmoke16> but probably doable if its simple enough
<FromGitter>
<rukkiddo> thanks, it is simple really so I think it won't be hard to maintain
<FromGitter>
<rukkiddo> my compilation time was 25 seconds, now it is around 3-4 seconds
<FromGitter>
<Blacksmoke16> 👍
<FromGitter>
<rukkiddo> I was also worried because crystal framework communities are not that active anymore
<FromGitter>
<Blacksmoke16> 25 sec, was that with amber or athena?
<FromGitter>
<rukkiddo> with amber
<FromGitter>
<Blacksmoke16> ah gotcha
<FromGitter>
<oprypin:matrix.org> @rukkiddo: make them active then lol
<FromGitter>
<rukkiddo> > @rukkiddo: make them active then lol ⏎ ⏎ I thought about it really, but it was only one of the problems that I have
<FromGitter>
<rukkiddo> and @Blacksmoke16 you helped me a lot in all other channels, thanks.
<FromGitter>
<rukkiddo> btw @Blacksmoke16 I told you my app was so much slower without amber, it turned out I forgot bcrypt code in the middle of the route lol, now it is much faster
<FromGitter>
<Blacksmoke16> nice one, that would do it
<FromGitter>
<Blacksmoke16> assuming the config cant be mutated at runtime after its been read
<FromGitter>
<anapsix> yeah.. already using YAML Serializable
<FromGitter>
<Blacksmoke16> then wheres the hash come into play?
<raz>
i've found https://app.quicktype.io/ quite convenient to quickly scribble up nested structures
<FromGitter>
<anapsix> after `from_yaml` getting parsed object, and saving it as `@data` ⏎ then from another method building hash with elements from `@data`
<FromGitter>
<Blacksmoke16> why?
<FromGitter>
<anapsix> :shug:
<FromGitter>
<Blacksmoke16> you already have the data as a typed obj, why do you need the hash in the first place?
<FromGitter>
<anapsix> cause some of the object variables are hashes.. and it gets weird when come I gotta access via `.variable` and nested ones as `.variable["key"]`
<FromGitter>
<Blacksmoke16> to be clear serializable works with nested structures
<FromGitter>
<Blacksmoke16> so you can define types for each structure then have like `getter sub_obj : SubObj`
<FromGitter>
<anapsix> yep yep.. just wanted to make it faster / easier
<FromGitter>
<anapsix> > like `Hash(String, Person)` or something ⏎ ⏎ ah.. right you are
<FromGitter>
<Blacksmoke16> `getter people Array(Person)`
<hightower2>
hey straight-shoota , regarding that discussion between you and asterite re --error-trace... did you think of reversing the trace order so that most-recent position is at the bottom? This way it wouldn't be of concern how long the trace is, since person can scroll up only as far as they need to, to see what they want.
<FromGitter>
<asterite> That's the way it always was
DTZUZU has joined #crystal-lang
<FromGitter>
<watzon> Sometimes while working on Crypto libraries I really wish there was a simpler way to pass around pointers than using `pointerof` and `Pointer#value`
<FromGitter>
<watzon> Or a way to pass objects by reference that normally aren't, like Ints
_ht_ has joined #crystal-lang
_ht has quit [Read error: Connection reset by peer]
<FromGitter>
<anapsix> > *<raz>* i've found https://app.quicktype.io/ quite convenient to quickly scribble up nested structures ⏎ ⏎ !!!!!
<FromGitter>
<anapsix> this is some kind of black magic
<FromGitter>
<Daniel-Worrall> I found quicktype a while ago and have been shilling it in here ever since
<raz>
anapsix: if you use vscode (or one of the supported editors) make sure to try the editor extension :) - in vscode it's pure bliss
<raz>
yea i discovered it only recently, might be from you daniel actually!
<raz>
🙇♂️
<raz>
(it's a godsent when integrating with some deeply nested JSON api, just paste in the json and bam, almost done)
<FromGitter>
<Daniel-Worrall> It can work with multiple files too if you have some variation to refine it
alexherbo26 has joined #crystal-lang
alexherbo2 has quit [Read error: Connection reset by peer]
alexherbo26 is now known as alexherbo2
alexherbo23 has joined #crystal-lang
alexherbo2 has quit [Read error: Connection reset by peer]
alexherbo23 is now known as alexherbo2
alexherbo22 has joined #crystal-lang
alexherbo2 has quit [Read error: Connection reset by peer]
alexherbo22 is now known as alexherbo2
alexherbo25 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 240 seconds]
alexherbo25 is now known as alexherbo2
<FromGitter>
<watzon> Man quicktype is like the json_to_crystal project I did years ago, but for all the languages
<FromGitter>
<RespiteSage> Quicktype is wonderful. I use it to generate C++ classes from JSON schemas so that I don't have to maintain a manually-written library as a counterpart to the Java one for the same schemas (which I think is actually generated via Jackson, but I don't maintain that).
<FromGitter>
<RespiteSage> Minimizing the C++ I have to write is *chefs kiss*.
<FromGitter>
<watzon> Now if they could add .tl files as a source
<FromGitter>
<watzon> I'd be stoked
<FromGitter>
<watzon> Although those are a bit more abstract than JSON
<FromGitter>
<RespiteSage> What's that extension?
<FromGitter>
<watzon> TypeLanguage. Telegram uses it for their definitions and I'm pretty sure it's been adopted by some other projects.
<FromGitter>
<Daniel-Worrall> I believe they also support json schema files
DTZUZU_ has joined #crystal-lang
DTZUZU has quit [Read error: Connection reset by peer]