<FromGitter>
<naqvis> this supports `Include` annotation
woodruffw has quit [Ping timeout: 265 seconds]
woodruffw has joined #crystal-lang
deavmi has quit [Ping timeout: 246 seconds]
deavmi has joined #crystal-lang
lunarkitty has quit [Ping timeout: 246 seconds]
lunarkitty has joined #crystal-lang
deavmi has quit [Ping timeout: 240 seconds]
deavmi has joined #crystal-lang
_whitelogger has joined #crystal-lang
<FromGitter>
<acoolstraw> hey there
deavmi has quit [Quit: Eish! Load shedding.]
alexherbo2 has joined #crystal-lang
<FromGitter>
<naqvis> \o
deavmi has joined #crystal-lang
<FromGitter>
<asterite> So it seems a few folks at Manas are on vacation, that's why there are no recent commits. Plus they have some other work to do. All of this just to say: don't worry, Crystal isn't going to disappear
fifr has quit [Ping timeout: 272 seconds]
fifr has joined #crystal-lang
<FromGitter>
<aravindavk> @asterite Good to know, Thanks for the update.
alexherbo2 has quit [Ping timeout: 240 seconds]
duane has joined #crystal-lang
xyhuvud has quit [Read error: Connection reset by peer]
<FromGitter>
<dscottboggs_gitlab> good find @Blacksmoke16
<FromGitter>
<Blacksmoke16> thought i saw something about it 😆
<FromGitter>
<alexherbo2> for my implem, is is better to stay with string or create a path obj?
<FromGitter>
<dscottboggs_gitlab> yeah, alexherbo2, I see the advantage for a language with lots of top-level functions like in the JS example in your link, but not in languages with idiomatic method-chaining
<FromGitter>
<dscottboggs_gitlab> @alexherbo2 up to you
<FromGitter>
<dscottboggs_gitlab> Path gives you `#/` if you need to traverse paths a lot, and improves cross-platform compat so if you need those then use it and if not then don't
alexherbo21 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 240 seconds]
alexherbo21 is now known as alexherbo2
<FromGitter>
<alexherbo2> what is the cleanest way to separate the leading path (the snippets paths, before the glob)?
<FromGitter>
<jwoertink> I'm trying to copy this ruby code over to crystal dealing with OpenSSL::Cipher, and there's this line `c.update(plaintext) + c.final`
<FromGitter>
<jwoertink> `Error: no overload matches 'Slice(UInt8)#+' with type Slice(UInt8)`
<FromGitter>
<jwoertink> I'm assuming in ruby it's just concatenating these strings. Do I need to convert them to string and do the same for crystal?
<FromGitter>
<dscottboggs_gitlab> I don't think you *should* convert it to a string in this context but you can concatenate two slices, if no other way than by creating a new slice from the values of the other two
<FromGitter>
<dscottboggs_gitlab> lemme work something up, this looks like fun 😉
<FromGitter>
<jwoertink> haha ok
<FromGitter>
<alexherbo2> hm
<FromGitter>
<alexherbo2> I think I need something like "walk", not `Dir.glob` actually
<FromGitter>
<jwoertink> that's neat, but looks a lot more complicated than `String.new(a) + String.new(b)`. Is there major benefits over that?
<FromGitter>
<dscottboggs_gitlab> yes, Slice is a pretty low-level type and doesn't really come with any niceties like that. In this case, you have more control over how the slices work. Would `Bytes#+(Bytes)` reuse the left-hand buffer like I did in my example, or create a new buffer to avoid side-effects? ⏎ ⏎ Additionally, the String struct contains data other than the bytes of the text, so I'm not sure if that would have an
<FromGitter>
... impact when working with a cryptographic library
<FromGitter>
<jwoertink> Ah, I see.
<FromGitter>
<jwoertink> I guess I only have to write this once 😂 thanks!
<FromGitter>
<jwoertink> hmm... I have to encrypt this string in my rails app, then decrypt it in Lucky and vice versa. I got it to encrypt in crystal, but when I decrypt in ruby, it tells me I have to set the auth_tag
<FromGitter>
<jwoertink> Where it's doing `tag = c.auth_tag(96 / 8)`
<FromGitter>
<dscottboggs_gitlab> oof
<FromGitter>
<jwoertink> But using your example did work
<oprypin>
how can i json-serializable `{"foo": [1, 2, 3], "bar": [2, 3, 4]}` as `@name : String; @values : Array(Int32)`
<oprypin>
or rather as an array of that
<oprypin>
so far im thinking `class Thing < Array(Int32); property! name : String; end` and manually popualte them
zorp has quit [Ping timeout: 264 seconds]
<FromGitter>
<Blacksmoke16> what would an example of the values be in the type?
<FromGitter>
<Blacksmoke16> wouldnt that just be like `Hash(String, Array(Int32)).from_json json_str`?
<oprypin>
Blacksmoke16, i just want crystal to pretend that `{"foo": [1, 2, 3], "bar": [2, 3, 4]}` is actually `[{"name": "foo", "values": [1, 2, 3]}, {"name": "bar", "values": [2, 3, 4]}]` and deserialize that
<FromGitter>
<Blacksmoke16> ohh i see
<FromGitter>
<Daniel-Worrall> You want a custom converter
<oprypin>
just how custom would this be
<FromGitter>
<Blacksmoke16> yea prob would be the best approach
<oprypin>
as it's acting at the very top level, it seems
<FromGitter>
<Blacksmoke16> iterate with the pull parser directly