<FromGitter>
<Blacksmoke16> or maybe the navigator, metadata, and the value
<FromGitter>
<Blacksmoke16> i think i like that better
return0e has quit [Remote host closed the connection]
return0e has joined #crystal-lang
return0e has quit [Client Quit]
deavmi has quit [Read error: Connection reset by peer]
deavmi has joined #crystal-lang
rocx has quit [Ping timeout: 260 seconds]
rocx has joined #crystal-lang
return0e has joined #crystal-lang
return0e has quit [Read error: Connection reset by peer]
rocx has quit [Ping timeout: 260 seconds]
wakatara has joined #crystal-lang
_ht has joined #crystal-lang
<FromGitter>
<naqvis> passing navigator, do you plan to give option to user to navigate the navigator as well?
<FromGitter>
<naqvis> as annotation will be applied at field level, so thinking of benefit of passing navigator in this case
<FromGitter>
<naqvis> use-case of giving access to navigator at class level might make some benefit, as user can make some decisions
<FromGitter>
<naqvis> just few thoughts
<FromGitter>
<naqvis> ๐
sz0 has joined #crystal-lang
zorp has joined #crystal-lang
alexherbo2 has joined #crystal-lang
justinmcp_ has joined #crystal-lang
olbat has quit [*.net *.split]
justinmcp has quit [*.net *.split]
<FromGitter>
<bararchy> Hi everyone, just a small update on our Broken-crystals project, we got some nice UI going on and around 10 or more different vulnerability types working
sz0 has quit [Quit: Connection closed for inactivity]
<FromGitter>
<neutrinog> is there a way for a macro to know if an argument is an array of something?
<jhass>
I guess you could check .class_name == "ArrayLiteral" or something?
<FromGitter>
<neutrinog> I found a simpler way to accomplish what I wanted to do without macros.
<jhass>
that's always the best way :)
<FromGitter>
<neutrinog> on a different note.. โ occasionally I'll get errors like this. They aren't very helpful so tracking down the issue is painful. Am I supposed to understand this output? โ โ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5eb91b3f2baa1918546095e9]
<FromGitter>
<neutrinog> (not looking for help to debug this. Just asking a generic question)
<FromGitter>
<neutrinog> fyi. the output above is coming from a c library. but it sure would be helpful if crystal mentioned at least that much.
<FromGitter>
<naqvis> tbh I haven't seen any particular language which can provide detailed output when receiving a SIGSEGV
<jhass>
for things like this I usually make so to compile with --debug, maybe even recompile the library in question with debug symbols and then throw the binary into lldb. That often already gives a backtrace. Crystal 0.35 will also improve the default experience in lldb a lot by quite improved debug data and pretending we're C++ (you can get sensible data out of local variables often then for
<jhass>
example)
<jhass>
walking up the backtrace usually leads to a place that's close enough to the interaction point between crystal and the lib that you can set a breakpoint with just break set -l 123 (some line number before) and rerun with r
<FromGitter>
<Blacksmoke16> yea, would be able to get the default return value, then modify it further for example
<FromGitter>
<Blacksmoke16> navigator also exposes the context, which has some other stuff as well
<FromGitter>
<asterite> @neutrinog note the `0x0` in the error. That means the address zero, which is a null pointer. It's probably a null value that is being passed to C that shouldn't be null
rocx has joined #crystal-lang
<FromGitter>
<naqvis> then what about metadata param?
<FromGitter>
<naqvis> i was thinking of navigator in terms of object, which can be traversed for other vals
<FromGitter>
<Blacksmoke16> sorry, it would be `navigator, metadata, data`
<FromGitter>
<Blacksmoke16> where the navigator is thing used as an "entrypoint" for (de)serialization
<FromGitter>
<Blacksmoke16> metadata contains like the name, external name, type, etc related to an ivar,
<FromGitter>
<Blacksmoke16> and data is ofc the data do deserialize from
<FromGitter>
<naqvis> yeah that make sense
<FromGitter>
<naqvis> but i'm still confused on intention of passing the navigator?
<FromGitter>
<naqvis> i mean per annotation, that will be applied at field level
<FromGitter>
<naqvis> then what is the intention of passing the navigator?
<FromGitter>
<naqvis> metadata does make sense, as that provides the insights into name, external name etc as you mentioned
<FromGitter>
<naqvis> so giving access to navigator, does that mean code can navigate through other fields as well?
<FromGitter>
<Blacksmoke16> i.e. like get the value that would have been used w/o the converter, then do something else to it
<FromGitter>
<naqvis> aahh
<FromGitter>
<naqvis> make sense now
<FromGitter>
<naqvis> sorry i was thinking on the term `navigator` literally lol
<FromGitter>
<naqvis> thought that is something allowing navigating through the dataset
<FromGitter>
<Blacksmoke16> ah,naw
<FromGitter>
<Blacksmoke16> navigator in this context is what applies (de)serialization logic to objects, like disciminator maps or exclusion strategies etc
<FromGitter>
<naqvis> gotcha
<FromGitter>
<Blacksmoke16> or just passes the data to the visitor if its not an obj
<FromGitter>
<naqvis> thanks for the clarification
<FromGitter>
<rishavs> is vscode not showing problems/errors as you type in the code for anyone else? For me auto error checking is not working with the main crystal extension
<FromGitter>
<neutrinog> > @neutrinog note the `0x0` in the error. That means the address zero, which is a null pointer. It's probably a null value that is being passed to C that shouldn't be null โ โ thanks
<FromGitter>
<Blacksmoke16> take a string and encode it into what?
<FromGitter>
<llathasa-veleth> what's wrong with unicode chars?
<FromGitter>
<llathasa-veleth> > take a string and encode it into what? โ โ rot13
<FromGitter>
<Blacksmoke16> prob use more than one byte, where you're only selecting the first?
<FromGitter>
<llathasa-veleth> that's the code for code-marathon
<FromGitter>
<kinxer> Also, if you're using something as a namespace like that, you might as well use a `module` (just for future reference).
<FromGitter>
<llathasa-veleth> > prob use more than one byte, where you're only selecting the first? โ โ how should i do this
<oprypin>
dont do .bytes[0], do .ord
<FromGitter>
<llathasa-veleth> > Also, if you're using something as a namespace like that, you might as well use a `module` (just for future reference). โ โ thanks
<oprypin>
actually... just `encoded += char`
<FromGitter>
<Blacksmoke16> cant you just do `encoded += char + 13` or `encoded += char - 13`?
<FromGitter>
<llathasa-veleth> as for now, there's 5 members with 3 active ones
<FromGitter>
<kinxer> @llathasa-veleth Out of curiosity, why do you have differing encoding and decoding methods for ROT13? Wikipedia says that it's self-inverse, so I'd expect that you could have just one method or have the decoding method just call the encoding method.
<FromGitter>
<kinxer> (Not specifically in Crystal; I just glanced at the Rust implementation and noticed that.)
<FromGitter>
<llathasa-veleth> > @llathasa-veleth Out of curiosity, why do you have differing encoding and decoding methods for ROT13? Wikipedia says that it's self-inverse, so I'd expect that you could have just one method or have the decoding method just call the encoding method. โ โ i should ask my contributor
<FromGitter>
<llathasa-veleth> because that code is not mine, but his
<FromGitter>
<llathasa-veleth> didn't check it lol