ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.34.0 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
<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
<FromGitter> <bararchy> You can checkout the project at https://github.com/NeuraLegion/broken_crystals
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?
travis-ci has joined #crystal-lang
<travis-ci> crystal-lang/crystal#ffcb6dd (ci/update - Update distribution-scripts): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/685648580
travis-ci has left #crystal-lang [#crystal-lang]
<FromGitter> <Blacksmoke16> it would allow you to do like
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5eb95936f25ee478068d5c3f]
<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> <naqvis> this setup make sense now
<travis-ci> crystal-lang/crystal#73b5d93 (master - Add Experimental annotation and doc label (#9244)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/685679747
travis-ci has joined #crystal-lang
travis-ci has left #crystal-lang [#crystal-lang]
<DeBot> https://github.com/crystal-lang/crystal/pull/9244 (Add Experimental annotation and doc label)
HumanGeek has quit [Ping timeout: 258 seconds]
sz0 has joined #crystal-lang
ua has quit [Ping timeout: 240 seconds]
ua has joined #crystal-lang
travis-ci has joined #crystal-lang
travis-ci has left #crystal-lang [#crystal-lang]
<travis-ci> crystal-lang/crystal#edc261c (master - Implement host_flag? macro method, not affected by cross-compilation (#9049)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/685714492
<DeBot> https://github.com/crystal-lang/crystal/pull/9049 (Implement host_flag? macro method, not affected by cross-compilation)
travis-ci has joined #crystal-lang
<travis-ci> crystal-lang/crystal#b8d4ca0 (master - Prefer HTTP basic authentication in OAuth2 client (#9127)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/685715375
travis-ci has left #crystal-lang [#crystal-lang]
<DeBot> https://github.com/crystal-lang/crystal/pull/9127 (Prefer HTTP basic authentication in OAuth2 client)
travis-ci has joined #crystal-lang
<travis-ci> crystal-lang/crystal#90d89d0 (master - Change `HTTP::Request#remote_address` type to `Socket::Address?` (#9210)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/685715619
travis-ci has left #crystal-lang [#crystal-lang]
<DeBot> https://github.com/crystal-lang/crystal/pull/9210 (Change `HTTP::Request#remote_address` type to `Socket::Address?`)
f1reflyylmao has joined #crystal-lang
f1refly has quit [Ping timeout: 256 seconds]
<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
travis-ci has joined #crystal-lang
<travis-ci> crystal-lang/crystal#8e382d7 (master - HTTP::Server: defer request upgrade (aka: WebSockets) (#9243)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/685720702
travis-ci has left #crystal-lang [#crystal-lang]
<DeBot> https://github.com/crystal-lang/crystal/pull/9243 (HTTP::Server: defer request upgrade (aka: WebSockets))
<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
travis-ci has joined #crystal-lang
<travis-ci> crystal-lang/crystal#a2fa135 (master - Make `NamedTuple#sorted_keys` public (#9263)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/685723479
travis-ci has left #crystal-lang [#crystal-lang]
<DeBot> https://github.com/crystal-lang/crystal/pull/9263 (Make `NamedTuple#sorted_keys` public)
Sharcho has joined #crystal-lang
<straight-shoota> oooops
Sharcho has quit [Quit: Leaving]
<Stephie> %5 = icmp ult i64 %3, -2147483648, !dbg !11650
<Stephie> %6 = and i1 false, %5, !dbg !11650
<Stephie> ???
<Stephie> it checks if it's in bounds then ands the result with false
<Stephie> nice
<jhass> haha
<jhass> how did you even
<Stephie> how?
<jhass> find this one
<Stephie> i tried to make Slice#size UInt64
<Stephie> how did nobody else even *try*
<Stephie> thats my question
<Stephie> how has this not been found before
<Stephie> when it has a 1-line POC
<jhass> I'm asking myself for the whole bdwgc pthread mess
<jhass> * the same
<Stephie> minimal poc is literally -1 + 0u64
<Stephie> why do i always try something simple then run into an unbelievable compiler bug >_<
<jhass> it's okay, we just add -Ddisable_overflow back :D
<Stephie> okay no i dont get whats going on
<Stephie> right, it should be llvm.sadd.with.overflow
<FromGitter> <mattrberry> Is there a good method for generating flame graphs for crystal programs?
<Stephie> no
<Stephie> but there are methods
<Stephie> if you're on mac, I don't have a clue
<Stephie> i just dont use macs
<FromGitter> <mattrberry> Cool, not on a mac. I'll take a look. Thank you!
deavmi has quit [Read error: No route to host]
deavmi has joined #crystal-lang
alexherbo23 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 256 seconds]
alexherbo23 is now known as alexherbo2
<oprypin> Stephie: mmq
<Stephie> ?
<oprypin> that's some 1.0 quality right there
<Stephie> tell manas's sponsors that
<oprypin> oof
<oprypin> you shouldn't say that :D
<oprypin> Stephie: while you're here.. I have a feeling that something is wrong if i can't link to any external library build with default flags on Windows. always need these https://github.com/crystal-lang/crystal/blob/35c1f41f05144d9645c7bba83cd1b1deaea68fb0/.github/workflows/win.yml#L87
<Stephie> yeah
<Stephie> uhh
<Stephie> i think i picked the wrong flags
<Stephie> a long time ago
<Stephie> /MT vs /MD
<oprypin> it's the /MT thing, needs to be consistent i guess
<Stephie> yeah
<Stephie> someone should try /MD
<Stephie> it seems to be the "better option"
<oprypin> and MT is better/easier and I'm sure people will often want that
<Stephie> ehh
<Stephie> MD is dynamic linking
<Stephie> MT is static linking
<Stephie> I think that MD is fine
<Stephie> and honestly
<Stephie> MD is required to redistribute the binary
<Stephie> i think, actually, legally
<oprypin> yes but if u ship all the libs with MD than how can you link statically
<Stephie> but
<Stephie> what if
<Stephie> you dont
<oprypin> oh yea and having to carry around the DLLs is also fun
<Stephie> oprypin, i think /MT vs /MD is just about the stdlib
<Stephie> like
<Stephie> libc
<Stephie> you can dynamic link libc
<Stephie> static link everything else
<Stephie> i think
<Stephie> its a guess
<Stephie> go figure it out
travis-ci has left #crystal-lang [#crystal-lang]
<travis-ci> crystal-lang/crystal#70959cf (master - Add Log Metadata (#9227)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/685761091
travis-ci has joined #crystal-lang
travis-ci has joined #crystal-lang
travis-ci has left #crystal-lang [#crystal-lang]
<travis-ci> crystal-lang/crystal#35c1f41 (master - Add link to GitHub repo to README.md (#9163)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/685765550
<DeBot> https://github.com/crystal-lang/crystal/pull/9163 (Add link to GitHub repo to README.md)
f1reflyylmao has quit [Quit: -all]
f1refly has joined #crystal-lang
zorp has quit [Ping timeout: 260 seconds]
<oprypin> k
<FromGitter> <watzon> Almost ready to publish. Just have to refactor some things ๐Ÿ˜
<FromGitter> <naqvis> @watzon bravo ๐Ÿ‘
<FromGitter> <naqvis> would be good to have an option to provide a link to starter-template or sth similar for cli
<FromGitter> <naqvis> this way, one can have different starter-template and just point the cli to clone that
<FromGitter> <watzon> Well this isn't a real cli haha, just a test of a user input library
<FromGitter> <naqvis> aahh, seems I got excited too early lol
<FromGitter> <watzon> Haha, yeah xD. The goal is to make a CLI for Tourmaline though. That's most of the reason I decided to make this.
<FromGitter> <watzon> Or the thing that gave me the idea anyway.
<FromGitter> <naqvis> great work
<FromGitter> <naqvis> definitely useful for scaffolding stuff
<FromGitter> <naqvis> similar to `sbt`, `maven-archetype`, `yeoman` etc
zorp has joined #crystal-lang
<oprypin> Stephie, the main stumbling point was linking libcmt - just dont and it works. it's simple but easy to miss
<Stephie> oh yeah
<Stephie> i hardcoded that didn't i
<jhass> what would you expect a shard packaging up https://gist.github.com/jhass/53b56308b1d4013c32cf2325d800e130 to be called?
<FromGitter> <watzon> jhass: libgc is boehm isn't it?
<jhass> bdwgc, yes
<FromGitter> <watzon> I'd go with either "boehm.cr", "bdwgc", or just "libgc"
<jhass> boehm.cr comes with crystal, kinda https://github.com/crystal-lang/crystal/blob/master/src/gc/boehm.cr :D
<jhass> that entire thing is to workaround interoperability issues with third party libraries because Crystal includes it
<oprypin> jhass, anything with "shim"? "force-gc"?
<oprypin> (or any number of star wars puns relating to "force"?)
<FromGitter> <Blacksmoke16> `the-boehmenator`
<FromGitter> <Blacksmoke16> .cr
<jhass> :D
<jhass> oprypin: yeah the cr file name is my working title so far, in doubt I'll go for that
<FromGitter> <watzon> Yassss
<FromGitter> <watzon> Lmao
<oprypin> btw it's possible to push to gist.github.com using git. i think it could be useful here, jhass :>
<jhass> I know this for many years :)
<oprypin> oh yea? well did you know that you can also push image files and display them there
<jhass> or geojson :)
<jhass> apparently I know this for 6 years at least
<oprypin> wow.
<FromGitter> <Blacksmoke16> and so it begins
<oprypin> the heck
<FromGitter> <llathasa-veleth> hi lads
<FromGitter> <Blacksmoke16> o/
<FromGitter> <llathasa-veleth> i want to ask a question
<FromGitter> <Blacksmoke16> sure
<FromGitter> <llathasa-veleth> this is my code
<FromGitter> <Blacksmoke16> alright
<FromGitter> <Blacksmoke16> dont really need the `main` stuff, could just have the contents of your `encoder` method be whats in the file
<FromGitter> <llathasa-veleth> i know, i just want some OOP in this code
<FromGitter> <llathasa-veleth> this program not really works like it has to
<FromGitter> <Blacksmoke16> whats the goal of it?
<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> <Blacksmoke16> https://crystal-lang.org/api/master/Char.html#+(other:Int):Char-instance-method
<oprypin> >> 'a' + 13
<DeBot> oprypin: # => 'n' - https://carc.in/#/r/91sp
<oprypin> wow it works too, huh
_ht has quit [Quit: _ht]
<FromGitter> <kinxer> This is a fun little substitution cipher.
<FromGitter> <llathasa-veleth> > cant you just do `encoded += char + 13` or `encoded += char - 13`? โŽ โŽ thank u!!!
<FromGitter> <Blacksmoke16> ๐Ÿ‘
<FromGitter> <llathasa-veleth> by the way
<FromGitter> <llathasa-veleth> check out the marathon
<FromGitter> <llathasa-veleth> u can take part in it
<FromGitter> <llathasa-veleth> https://github.com/llathasa-veleth/rot13
<FromGitter> <Blacksmoke16> neat
<FromGitter> <kinxer> What marathon?
<FromGitter> <llathasa-veleth> > https://github.com/llathasa-veleth/rot13 โŽ โŽ this
<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
<FromGitter> <llathasa-veleth> simply accepted pull request
<FromGitter> <watzon> https://github.com/watzon/ROT26
<FromGitter> <watzon> Just gonna drop this here
<FromGitter> <llathasa-veleth> LMAO
<oprypin> ๐Ÿ‘
<jhass> it would be funner if the implementation the was actually just def encrypt(x); x; end; def decryrpt(x); encrypt(x); end; :P
<FromGitter> <llathasa-veleth> well, one day, i did base256
<FromGitter> <kinxer> How could you have done this.
<FromGitter> <kinxer> Though the access to any Caesar cipher is nice.
<FromGitter> <llathasa-veleth> i used base64 alphabet and 192 ascii + unicode chars
<FromGitter> <llathasa-veleth> and i made some more alphabets for it lmao
<FromGitter> <llathasa-veleth> lmao, i'm stupid
<FromGitter> <llathasa-veleth> not base256
<FromGitter> <llathasa-veleth> base128
<FromGitter> <llathasa-veleth> i used 64 other ascii and unicode chars
<FromGitter> <llathasa-veleth> and shuffled them
<FromGitter> <llathasa-veleth> [*GS_ยฒยฌยฑ5รŠ;+_FA]~~
<FromGitter> <llathasa-veleth> [๐ณŸ๐ฒ‡๐ณฒ๐ณ—๐ฒ…๐ฒจ๐ฒฒ๐ณ„๐ณ’๐ฒ–๐ฒ‘๐ณ—๐ณˆ.]~~ โŽ Another alphabet
<FromGitter> <llathasa-veleth> [ใกใ‹ใฏใ‚ชใƒกใ‚‹ใ‚ใ‚‡ใ‚„ใƒ’ใ‚ทใ‚ชใ›๏ผš]~~ โŽ and this one using japanese...
<FromGitter> <kinxer> https://carc.in/#/r/91sw
<FromGitter> <j8r> @llathasa-veleth you have a font with ligatures, which one?
<FromGitter> <j8r> Fira Sans I'd say
<FromGitter> <llathasa-veleth> Fira Code
<FromGitter> <j8r> (The `g` is very special)
<FromGitter> <llathasa-veleth> > https://carc.in/#/r/91sw โŽ LOL
<FromGitter> <llathasa-veleth> > (The `g` is very special) โŽ โŽ ye, i love it
<FromGitter> <j8r> I used it before, now I prefer classic monospace fonts
<FromGitter> <j8r> Because ligatures is not general purpose: markdown, rst, txt and ascii art will not look well
<FromGitter> <llathasa-veleth> that's true
<FromGitter> <j8r> lol in your screeshot you code like in 6 languages simultaneously
<FromGitter> <llathasa-veleth> XD
<FromGitter> <llathasa-veleth> i know many langs
<FromGitter> <j8r> omg
<FromGitter> <llathasa-veleth> APL plugin uses its own font, don't know its name, but it looks nice
<FromGitter> <llathasa-veleth> APL doesn't need ligatures tho
alexherbo2 has quit [Quit: The Lounge - https://thelounge.chat]
<FromGitter> <llathasa-veleth> this one was funny
<FromGitter> <llathasa-veleth> and this was hell
<jhass> do you have on in piet?
<FromGitter> <llathasa-veleth> > *<jhass>* do you have on in piet? โŽ โŽ nope
<FromGitter> <llathasa-veleth> that's too hard for me
<jhass> aww
<FromGitter> <llathasa-veleth> but everyone can do this and then pull request
<FromGitter> <llathasa-veleth> i've been trying to make rot13 in `BCPL`
<FromGitter> <llathasa-veleth> but i haven't meet a normal compiler for it
<FromGitter> <llathasa-veleth> but i've done already in `B`
<FromGitter> <llathasa-veleth> that was not easy tho
<FromGitter> <kinxer> I think I finished my dumb encoder: https://carc.in/#/r/91tl
<FromGitter> <kinxer> Not totally wasted time, though; I figured out the idiomatic way to get bytes from a numerical type in Crystal.
<jhass> no need for the rewind there btw
<jhass> aww common, not another one
<jhass> actually I think I saw it before
<jhass> just immediately forgot about it again
<FromGitter> <j8r> lol :(
<jhass> oprypin: don't forget about good ol' https://crystalshards.herokuapp.com/
<FromGitter> <llathasa-veleth> btw check out my app https://github.com/llathasa-veleth/encoder
<FromGitter> <kinxer> @jhass Yeah, I know. I was previously writing an Int32 to the IO, and that required a rewind.
<FromGitter> <kinxer> @llathasa-veleth That's a neat little app. Nice GUI, too.
<FromGitter> <llathasa-veleth> > @llathasa-veleth That's a neat little app. Nice GUI, too. โŽ โŽ Thanks!
<FromGitter> <watzon> What are the special vars that can be used in a macro? I know there's `@type`, but there's another one too isn't there?
<FromGitter> <Blacksmoke16> `@def`
<FromGitter> <kinxer> What is that? Is there any documentation on it yet?
<FromGitter> <watzon> Ahh yeah, that's it
<FromGitter> <kinxer> Cool. Thank you.
<FromGitter> <llathasa-veleth> i want to make some lang localized just for one, because there are only English based langs
<FromGitter> <llathasa-veleth> dunno what to choose
<FromGitter> <llathasa-veleth> too many languages
<FromGitter> <watzon> There are programming languages for other languages, but they're typically poorly developed and under used
<FromGitter> <watzon> I know of one some people started writing in Arabic
zorp has quit [Ping timeout: 260 seconds]