<erdnaxeli>
hmm, I think "krabby" is more fun, because a krabby typing on a keyboard is… well… funny ^^
<alexherbo2>
I’ll change to Krabby
<alexherbo2>
it is more cute than Krabboss too
<alexherbo2>
go for Krabby :p
<erdnaxeli>
btw I didn't know about kakoune, it looks cool, i will give it a try
<alexherbo2>
erdnaxeli you think krabby is a good name overall?
<alexherbo2>
or you chose because of the suggestions
<alexherbo2>
I'm on the Rename button with krabby but I fear to regret after :p
<erdnaxeli>
I choose from the suggestions, but I don't think it's a bad name
<erdnaxeli>
ofc you will have to accept typing krabby on google returns a pokemon and not your project :p
<FromGitter>
<tenebrousedge> or spongebob
Nekka has quit [Ping timeout: 265 seconds]
Nekka has joined #crystal-lang
<FromGitter>
<tenebrousedge> I'd go with something that was more unique and targeted towards what the program does
<alexherbo2>
erdnaxeli you think it's better to rename the project "chrome-configuration" → "krabby" or start a new project?
<alexherbo2>
tenebrousedge I don't want spongebob XD
<repo>
hm
<repo>
Error: instance variable '@read_event' of ZMQ::Socket must be (Crystal::Event | Nil), not (Crystal::Event | Crystal::ThreadLocalValue(Crystal::Event) | Nil)
<repo>
this is a 0.31.x issue i assume?
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #crystal-lang
<FromGitter>
<absolutejam_gitlab> I'd really love to see that talk in English
<FromGitter>
<absolutejam_gitlab> but I'm *really* enjoying the Google Translate
<alexherbo2>
what is better between renaming and start over a new repo?
<FromGitter>
<tenebrousedge> renaming keeps history
<alexherbo2>
fair
<alexherbo2>
tenebrousedge I'm still waiting a good occasion to start the devil's backbone
Yxhuvud has quit [Remote host closed the connection]
<FromGitter>
<tenebrousedge> it's coming up on Halloween/All Saint's Day
Yxhuvud has joined #crystal-lang
<FromGitter>
<ilanpillemer> K is Kotlin
<FromGitter>
<tenebrousedge> K is a derivative of APL
<FromGitter>
<firejox> @lbarasti It should raise because it fails on send
absolutejam2 has quit [Ping timeout: 240 seconds]
DTZUZO has joined #crystal-lang
absolutejam2 has joined #crystal-lang
ht__ has joined #crystal-lang
alexherbo24 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 245 seconds]
absolutejam2 has quit [Ping timeout: 268 seconds]
<FromGitter>
<bajro17> @sdogruyol surprise me all time I dont know he talk that good Japanese :D
<FromGitter>
<naqvis> just published brotli.cr (https://github.com/naqvis/brotli.cr) - Crystal bindings and wrapper around google `brotli` compression library.
DTZUZU has joined #crystal-lang
alexherbo24 has quit [Ping timeout: 240 seconds]
alexherbo24 has joined #crystal-lang
<FromGitter>
<vlazar> ❤️
<FromGitter>
<bbaragar> Is there a way to get a pointer to struct member ```p_data = &p_struct->DATA```
<FromGitter>
<bbaragar> Is there a way to get a pointer to a Struct member. I tried pointerof and get an error? ⏎ I know it can be done in C ⏎ ```p_data = &p_struct->DATA```
<FromGitter>
<Blacksmoke16> pointer to an ivar of a struct?
<FromGitter>
<lbarasti> Sounds like the most natural behaviour to me, too @firejox. I'd like to make some time to document the behaviour with some tests over the weekend 🤞
<FromGitter>
<absolutejam_gitlab> I really like aliasing anything that's more than two or so types
<FromGitter>
<repromancer_gitlab> Makes me happy. I thought I was restricted to `Proc(Arg,Arg,Return)` in Crystal, which I don't think is as clear to the uninitiated.
<FromGitter>
<absolutejam_gitlab> feel like it makes it so much more succinct
<FromGitter>
<repromancer_gitlab> @tenebrousedge @absolutejam_gitlab Right, in many cases that'd be preferable.
<FromGitter>
<repromancer_gitlab> Oh, speaking of things that make me happy, I found that Crystal has a lazy `Array.each_product` in the standard library
<FromGitter>
<tenebrousedge> :plus1:
<FromGitter>
<didactic-drunk> Nada. Maybe he dittn't like the furry comment.
<FromGitter>
<repromancer_gitlab> For my job, I needed to do a calculation which required (as the intuitive solution, at least) iterating over (3^19)*2 permutations, which is just over two-billion. Ruby standard library was not up to the task, and neither would I be able to write one from scratch without wasting a lot of company time. Was really great to find the exact thing I needed, already usable.
<FromGitter>
<absolutejam_gitlab> Say I had a class with a bool property that can be set, eg. `Foo.consumed`
<FromGitter>
<absolutejam_gitlab> What's the idiomatic way of approaching this? Really I'd want `Foo.consumed?` and would I keep `Foo.consumed=` as the setter?
<FromGitter>
<absolutejam_gitlab> This is what got me thinking about it
<FromGitter>
<absolutejam_gitlab> Or Python's `raises`
<FromGitter>
<Blacksmoke16> questions are like 1) can this be auto generated, 2) should it be, 3) how to display it otherwise
<FromGitter>
<Blacksmoke16> was thinking like `RAISES: UserNotFoundError If a user with the given *id* could not be found`
<FromGitter>
<absolutejam_gitlab> I wrote a method that performed a number of validations and raised a type of exception based on the failure if it didn't pass, but I didn't know how idiomatic that was
<FromGitter>
<Blacksmoke16> in a section that would be added after a method desc, but before the `view source`
<FromGitter>
<absolutejam_gitlab> or do I do the Elixir thing/Golang(ish) and return an error and value
<FromGitter>
<absolutejam_gitlab> I love Elixir's pattern matching, and it's idiomatic to return something like `{:error, :not_found}` or something
<FromGitter>
<absolutejam_gitlab> there's still exceptions obviously
<FromGitter>
<absolutejam_gitlab> wasn't sure what the best way to approach it is, especially in the case that the user of a lib should handle it
<FromGitter>
<Blacksmoke16> well i was more so thinking from a doc perspective, like if im using a lib i would like to see what the possible exceptions that could happen when using a given method
<FromGitter>
<absolutejam_gitlab> oh yeah, I meant starting with that instantly makes it a favourable option
<FromGitter>
<Blacksmoke16> w/o having to read the source
<FromGitter>
<absolutejam_gitlab> but if I start raising 10 different exception types and expect the user to catch each one, it gets stupid
<FromGitter>
<absolutejam_gitlab> especially if I have to manually update the docs or there are no set doc formats
<FromGitter>
<Blacksmoke16> well the user could catch `ValidationError`
<FromGitter>
<Blacksmoke16> where each specific type inherits from that
<FromGitter>
<Blacksmoke16> gives them the option of catching specific ones first, or fallback on the catch all
<FromGitter>
<absolutejam_gitlab> I think the original example I had was actually within the internals of a library that escaped based on the type of exception then returned a message to the end user
<FromGitter>
<absolutejam_gitlab> and I wanted to catch each one explicitly
<FromGitter>
<absolutejam_gitlab> granted, this could have been the worst way to approach it
<FromGitter>
<Blacksmoke16> would be nice if you could use enum with string values
<FromGitter>
<absolutejam_gitlab> I've quite liked treating errors as values in Go and Elixir
<FromGitter>
<absolutejam_gitlab> for matching and handling purposes
<FromGitter>
<tenebrousedge> > _< golang
<FromGitter>
<absolutejam_gitlab> It's just interesting to see how other languages do it. I feel like small, distinct functions based on a pattern match or type def really works well for me
<FromGitter>
<absolutejam_gitlab> Find myself trying to move away from case and towards functions more and more
<FromGitter>
<tenebrousedge> I'mma post a writeup at some point, but I think that there's a good replacement for Ruby's ability to do `an_object.extend(SomeModule)`
<FromGitter>
<tenebrousedge> i.e. adding methods to just a single instance of an object