faustinoaq changed the topic of #amber to: Welcome to Amber Framework community! | https://amberframework.org | Developer happiness, productivity and bare metal performance | GH: https://github.com/amberframework | Docs: https://docs.amberframework.org | Gitter: https://gitter.im/amberframework/amber | IRC Logger: https://irclog.whitequark.org/amber | Amber::Server.start
<FromGitter> <elorest> Is there anyway to create a constant size char array? `Array(Char)[20]` Obviously that syntax won't work but is there something that would?
<FromGitter> <Blacksmoke16> `chars = uninitialized Char[20]`?
<FromGitter> <Blacksmoke16> ofc uninitialized is unsafe, id advise for a constructor method instead
<FromGitter> <elorest> @Blacksmoke16 That's exactly what I'm looking for.
<FromGitter> <elorest> Thanks.
<FromGitter> <Blacksmoke16> 👍
<FromGitter> <Blacksmoke16> another way would be using a slice storing the bytes of each char
<FromGitter> <elorest> That's what I have been doing but even that doesn't seem to be a locked size.
<FromGitter> <Blacksmoke16> `A Slice is a Pointer with an associated size.` it should be
<FromGitter> <elorest> https://carc.in/#/r/8vih
<FromGitter> <Blacksmoke16> ah, prob related to the amount of memory it allocates then?
<FromGitter> <elorest> The object has an associated but I can't lock the instance var to that size so someone would just reasign it.
<FromGitter> <elorest> Someone is sending me a packed struct accross UART and I need to read it in. Other than one struct which has a char array it's really easy because it's a fixed byte size
<FromGitter> <elorest> I think that `StaticArray` is what I need. Though so thanks.
<FromGitter> <Blacksmoke16> np
<FromGitter> <elorest> Might just have to use Clib. Somehow this is ending up being 96 Bytes intead of 32. ⏎ https://carc.in/#/r/8vj5
<FromGitter> <elorest> Exactly 3 times the byte size it should be.
<FromGitter> <Blacksmoke16> :shrug: a bit out of my area of expertise
<FromGitter> <elorest> That's fine. How are you surviving the apocalypse?
<FromGitter> <Blacksmoke16> not so much changed for me tbh
<FromGitter> <Blacksmoke16> just my commute is a bit shorter 😉
<FromGitter> <elorest> Yeah I'm enjoying getting to work from home.
<FromGitter> <elorest> Just got the new Dell XPS 13 Frost. The webcam is finally in the right place and the screen is 16x10 so takes up the whole lid. Laptop Nirvana.
<FromGitter> <elorest> Fingerprint is supposed to work in Linux finally too
<FromGitter> <Blacksmoke16> \o/ things are looking up
<FromGitter> <elorest> Yep. :)
<FromGitter> <drujensen> @elorest probably utf8 encoding.
<FromGitter> <drujensen> Not sure how to allocate ASCII Chars for 1 byte per char
<FromGitter> <damianham> @elorest slice = Slice(UInt8).new(20)
<FromGitter> <damianham> @drujensen on the subject of websocket propagation in a production cluster from a controller action rather than a connected websocket client - I have it working - I had to publish directly to a Redis connection for the channel topic. But that wasn't all that was needed. I also had to send a 'hello' message from each client after joining the channel to get the pubsub adapter connected up.
<FromGitter> <damianham> I am now trying to get email delivery working via a TLS connection. Is anyone on this channel successfully sending out emails from an Amber instance via an SMTA other than sendgrid ?
<FromGitter> <damianham> Well a bit of progress. Getting email delivered over TLS now but my html template is in raw text so still need to fix that. However I had to make some changes to the Email client to get it to work and also to *config/initializers/mailer.cr* ⏎ ⏎ ```c.helo_domain = "somedomainname.com"``` ⏎ ⏎ Otherwise it throws an exception on a cast [https://gitter.im/amberframework/amber?at=5e934d543a85536c43259905]
<FromGitter> <drujensen> @damianham Glad to hear you figured it out.
<FromGitter> <drujensen> I’m a little surprised you needed to send a hello for the client to connect
<FromGitter> <drujensen> Did you try the ‘dispatch’ method in the channel? That didn’t propagate to redis
<FromGitter> <drujensen> ?
<FromGitter> <elorest> Thanks @drujensen that's what I ended up doing lastnight.
<FromGitter> <elorest> @damianham I had originally tried just intializing it with a fixed length slice like you suggested above. Unfortunately that still doesn't lock in the size so the size of the containing structure can vary dramatically. I ended up going with this approach as suggested by @Blacksmoke16. ⏎ ⏎ https://carc.in/#/r/8vnz
<FromGitter> <Brodan> does granite orm have support for unique constraints? i dont see anything in the docs unless im missing something gsuper obvious
<FromGitter> <Blacksmoke16> that would be on the DB side of things tho
<FromGitter> <Blacksmoke16> otherwise you could use some validation method to handle that
<FromGitter> <Brodan> yea true. I keep confusing myself with django where that stuff can be generated via field attributes on the model
<FromGitter> <drujensen> Released Amber 0.34.0 https://github.com/amberframework/amber/releases/tag/v0.34.0
<FromGitter> <drujensen> updated homebrew and docker image
<FromGitter> <elorest> Thanks @drujensen I was just going through the PR, and I got sidetracked by singing tesla coils. https://www.youtube.com/watch?v=tFZe28aBa7E
<FromGitter> <drujensen> wow, lol
<FromGitter> <drujensen> been playing rust and was wondering why they had tesla coils in it
<FromGitter> <elorest> Apparently plasma arcs are really good at producing high frequencies.
<FromGitter> <elorest> Game, programming language, band?
<FromGitter> <drujensen> gam
<FromGitter> <drujensen> they have electronics and you can find a tesla coil but haven’t figured out what they are used for yet
<FromGitter> <drujensen> don’t tell me if you know. i like trying to figure this stuff out. ;-)
<FromGitter> <elorest> No worries.
<FromGitter> <Blacksmoke16> factorio?
<FromGitter> <elorest> Was supposed to be playing borderlands last night with coworkers but ended up working on the binary messaging protocol for communicating between Vehicle Head Unit and Can Gateway. It's crazy how efficient some of Crystal's low level stuff is. I accomplished in like 76 lines of code what the controls team wrote over 1200 on.
<FromGitter> <drujensen> nice!
<FromGitter> <drujensen> you should write up a blog post about it
<FromGitter> <drujensen> although you might not be able to share the code
<FromGitter> <elorest> I could technically share it in concept at least if not the actual protocol. Did you see the Manas post on Nikola Motor?
<FromGitter> <drujensen> yes, that was very cool
<FromGitter> <drujensen> sounds like you are pushing crystal to 1.0
<FromGitter> <elorest> That's the plan.
<FromGitter> <drujensen> thanks for getting Nikola behind it
<FromGitter> <drujensen> makes a huge difference
<FromGitter> <elorest> Definitely. I pushed really hard to get it in the budget for the last couple years and finally managed for 2020. :)
<FromGitter> <drujensen> Goodbye node and elixir, hello crystal!
<FromGitter> <elorest> It will be hard to esc node these days, but crystal is amazing. I've converted some pretty old school C guys at my work and turned them into evangalists.