jhass changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Crystal 0.35.1 | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
<FromGitter> <Blacksmoke16> https://athena-framework.github.io/athena/Athena/Routing/Listeners/View.html can define a view listener to do that. An example of that would be the default one that JSON serializes the data: https://github.com/athena-framework/athena/blob/479b3c372e9f42fa124555d0d56f0760826736b4/src/listeners/view_listener.cr#L10 the first listener to set the response, i.e. `event.response = ...` is the response that'll
<FromGitter> ... be used
<FromGitter> <Blacksmoke16> can have your runs with a higher priority so it runs before the default implementation, which could either always handle it, or like check if its a specific type/interface first, or `Accept` header or whatever
<FromGitter> <Blacksmoke16> https://athena-framework.github.io/athena/Athena/Routing/Events/View.html should have linked this too
<oprypin> Blacksmoke16, thanks! can my controller `yield`?
<FromGitter> <Blacksmoke16> yield what?
<oprypin> instead of `return`, `yield`
<FromGitter> <Blacksmoke16> neg
<oprypin> egh too much python nevermind
<FromGitter> <Blacksmoke16> 👍
<oprypin> Blacksmoke16, sorry for another super lazy one.. any way to get a URL back from a controller name?
<oprypin> and args
<FromGitter> <Blacksmoke16> not atm, but will be working on something to enable that coming up
<oprypin> oof
<oprypin> thanks
<FromGitter> <Blacksmoke16> prob could hack together a workaround for now
<oprypin> easier to just write them out
<FromGitter> <Blacksmoke16> 👍
<FromGitter> <Blacksmoke16> tl;dr need to decuple some things internally to expose the routes
<FromGitter> <Blacksmoke16> decouple*
<FromGitter> <Blacksmoke16> its next up after the query param enhancements
duane has quit [Ping timeout: 240 seconds]
duane has joined #crystal-lang
<oprypin> Blacksmoke16, am i going crazy or does the getting started guide not show how to return html?
<oprypin> also actually i didnt understand the view stuff. seems like im supposed to register it globally but i want just for one controller
<FromGitter> <Blacksmoke16> one controller, or one controller method?
<oprypin> one controller actually in this case
<oprypin> this "listeners" stuff is not clear how to approach at all
<FromGitter> <Blacksmoke16> in that case id argue you dont really need the view stuff, just a private helper method that each action can use, passing the object to that helper method
<FromGitter> <Blacksmoke16> https://athena-framework.github.io/athena/Athena/Routing.html#error-handling would want to do something like the example above the error handling section, ofc returning HTML instead of CSS
<oprypin> Blacksmoke16, but wait, what's the deal with the mention `view` and stuff? do you suggest i merge view into the controller?
<oprypin> no i see, https://athena-framework.github.io/athena/Athena/Routing.html#middleware is the place that i need to look at
<FromGitter> <Blacksmoke16> the view listener/event is a global construct. It would be something that you could setup to handle a specific way to return a response. Like you could have one that checks if the request accepts HTML and somehow renders the returned value as html
<oprypin> so hear me out
<FromGitter> <Blacksmoke16> if you dont need something at that high of a level, having a private helper method to handle the creation of the `ART::Response` would also be valid
<oprypin> just as a shorthand, make some functionality that wraps all responses within a controller into a new class, and then also registers a listener for that class, with the passed block
<FromGitter> <Blacksmoke16> i guess a good question to ask is what are you wanting to do the data returned by each of the actions in this controller?
<oprypin> turn it into html
<FromGitter> <Blacksmoke16> like rendering a template based on some data or something like that?
<oprypin> yea. like the view for the controller, u know
<FromGitter> <Blacksmoke16> is the view using ECR?
<oprypin> not using anything atm. raw crystal or ecr is fine
<FromGitter> <Blacksmoke16> because you could just have a helper method that abstracts some of this
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5fbc5d25477a8b480c130150]
<oprypin> nah screw that, i want my controllers to return data
<oprypin> i actually have a reason for that but i'll get into that later
<oprypin> anyway i think i solved it
<FromGitter> <Blacksmoke16> yea in that case you'd need a view listener, as thats whats responsible for converting the non `ART::Response` into an `ART::Response` object
<FromGitter> <Blacksmoke16> which would essentially be doing the same thing tbh
<FromGitter> <Blacksmoke16> but ofc be more generic/reusable
<oprypin> figured out the html stuff
<oprypin> (right before you sent the example, but thanks :p)
<FromGitter> <Blacksmoke16> :p np
<oprypin> i think you should just switch out .css to .html in the example
<FromGitter> <Blacksmoke16> prob wouldnt hurt adding a little section about it
<FromGitter> <Blacksmoke16> point was to show that it can be used to return whatever raw data you want
<FromGitter> <Blacksmoke16> but HTML would show that point just as well and prob be more common
<FromGitter> <Blacksmoke16> of a use case*
<oprypin> mm there's QueryParam but no FormParam :D
<FromGitter> <Blacksmoke16> theres a branch/commit that you could use that has that, its functionally done just working on specs/docs atm
<FromGitter> <Blacksmoke16> example of some of it
<oprypin> whats this chat, maybe i should go there?
<FromGitter> <Blacksmoke16> the athena gitter https://gitter.im/athena-frameworkcr/community
<oprypin> why isnt mentioned anywhere https://github.com/athena-framework/athena
<FromGitter> <Blacksmoke16> well shit, good point
<FromGitter> <Blacksmoke16> i should prob put that in all the readmes
<oprypin> athena is gonna be big. this is next level stuff
<FromGitter> <Blacksmoke16> ❤️ i like to think its pretty slick :p
<oprypin> omg i've done the view thing finally
<FromGitter> <Blacksmoke16> \o/ howd it turn out?
<oprypin> not amazing
<FromGitter> <Blacksmoke16> got a paste?
deavmi has quit [Read error: Connection reset by peer]
deavmi has joined #crystal-lang
<FromGitter> <Blacksmoke16> could prob look into a param convert for that particular controller
<FromGitter> <Blacksmoke16> er nvm, not really. Still need the raw data it looks like
<oprypin> thats what im saying
<oprypin> without this mechanism, each individual method would have to have its "raw" twin
<FromGitter> <Blacksmoke16> and oo, you're calling the other routes from the one route? :thinking:
<oprypin> thats the kicker
<oprypin> [02:09:23] <oprypin> i actually have a reason for that but i'll get into that later
<oprypin> also really unsure about the parts `ART::Events::View => 25` and `if (result = event.action_result.as?(Result))` [else do nothing at all]
<FromGitter> <Blacksmoke16> i think youd want to make it more than 25 so it runs before the default one, then prob do like `return unless (result = event.action_result).is_a? Result`?
<oprypin> *more*? reverse priority again 😩
<FromGitter> <Blacksmoke16> higher value == higher priority no?
duane has quit [Ping timeout: 240 seconds]
<oprypin> actually nevermind, this one is probably more common
<oprypin> i was gonna say that this one has the opposite https://python-markdown.github.io/extensions/api/#registries but actually it matches yours :D
<FromGitter> <Blacksmoke16> :P
<FromGitter> <Blacksmoke16> thoughts on maybe extracting the links logic to another type? then your actions would be like `@link_provider.by_branch` etc
<FromGitter> <Blacksmoke16> i feel like that would be less of a hack, and easier to test
<oprypin> sure. but then whats the point of a controller
<oprypin> like seriously, why are we putting those methods into separate classes
<FromGitter> <Blacksmoke16> makes things more testable and removes the need to directly invoke other controller actions
<oprypin> mm i'm getting `undefined constant Result` if I use it without fully writing out `ArtifactsController::Result`, even though this is inside `ArtifactsController`
<FromGitter> <Blacksmoke16> prob since the type itself isnt instantiated directly in that namespace, so it doesnt know about it
<oprypin> Blacksmoke16, i mean i literally don't understand for the purpose of Athena, if i have 5 methods, why would I not put them into 5 separate classes / why would I not put them into 1 class ?
<FromGitter> <Blacksmoke16> no no, sorry if i wasn't clear. I was proposing you have 1 class that has methods like `by_branch`, `by_run`, `by_artifact`, then the related controller actions calls the related method, which internally could call the other methods in a less hacky way
<FromGitter> <Blacksmoke16> it just feels strange to directly invoke other action methods like that
<oprypin> i get this but my question stands
<oprypin> i could have those methods *at top level*
<oprypin> then i could have controller methods also at top level, if athena didnt require putting them into a class
<oprypin> what does having a class accomplish here?
<FromGitter> <Blacksmoke16> ability to inject other services via DI
<FromGitter> <Blacksmoke16> which makes testing and reuse easier
<oprypin> are instance variables ever useful?
<FromGitter> <Blacksmoke16> when used with DI yes, as the injected services would be instance vars
<FromGitter> <Blacksmoke16> which allows you to base the functionality of the controller on a public interface API (that could be mocked for testing). While also making it easier to test the logic that generates these links objects in isolation
<oprypin> 👍
<FromGitter> <Blacksmoke16> im not disagreeing that it adds some complexity/different ways of thinking compared to other frameworks, but i try to nudge people to keeping SOLID principles in mind
<FromGitter> <Blacksmoke16> in the end it'll make maintaining, testing, and reading the code much easier in the long run
<FromGitter> <Blacksmoke16> also fwiw, the `Result` type doesn't need to inherit from the `Event` type since you're not using it as an event
<FromGitter> <Blacksmoke16> its just a domain type
<oprypin> ah yes. i was bound to miss something with how much scrambling i had there
<oprypin> Blacksmoke16, mostly i just literally have no idea what is possible with athena
<oprypin> really needs a "book" style doc
<FromGitter> <Blacksmoke16> now that would really be a book ha
<FromGitter> <Blacksmoke16> i think theres also just different programming styles at play, when comparing Ruby, and Crystal by extension, compared to like Java/PHP
<FromGitter> <Blacksmoke16> like at work the DI and single responsibility principles are quite well know and we always try to design things following those patterns
<oprypin> did u just say that php has better practices than ruby
<oprypin> well i suppose it does
<FromGitter> <Blacksmoke16> while in Ruby land those concepts dont seem to be as pronounced
<FromGitter> <Blacksmoke16> PHP as an OOP lang is pretty good, PHP as a lang itself not so much
<oprypin> im aware of those, of course, but in this context i'm 1) not at work, intentionally having _fun_ 2) dont know about them in the context of athena
<FromGitter> <Blacksmoke16> yea its all good, point i was trying to make is i think theres some overlap in needing to explain/demonstrate these concepts versus assuming everyone is aware of them. Mainly for those coming from Ruby land
<FromGitter> <Blacksmoke16> which is deff where some docs going over that higher level introduction might be helpful
f1reflyylmao has joined #crystal-lang
f1refly has quit [Ping timeout: 264 seconds]
duane has joined #crystal-lang
_whitelogger has joined #crystal-lang
duane has quit [Ping timeout: 240 seconds]
avane has quit [Quit: ZNC - https://znc.in]
avane has joined #crystal-lang
Vexatoast has joined #crystal-lang
Stephie has joined #crystal-lang
Stephanie has quit [Ping timeout: 240 seconds]
Vexatos has quit [Ping timeout: 240 seconds]
duane has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
<FromGitter> <ImAHopelessDev_gitlab> hi
<FromGitter> <YusufCakan> What would be the easiest way to automatically put parenthesis around all the function call sites (or at least identify the function) in a piece of code.
<FromGitter> <YusufCakan> I meant to say "or at least identify the call sites in a piece of code"
daemonwrangler has quit [Ping timeout: 246 seconds]
* raz sigh of relief
<raz> achhh.... coming back to crystal after a day of go-lang is like a warm bath
<FromGitter> <naqvis> go-lang isn't that bad :P
<raz> yes it is.
<jhass> maybe you should do javascript for a day before going back to Go :D
<raz> honestly, i can tolerate javascript better than go nowadays. at least it let's you write relatively straightforward code (just gotta watch out for all the footguns). and with typescript it's actually becoming somewhat bearable.
<raz> the sheer uglyness of go still repels me from the first keystroke to the last :<
<jhass> ah, I'm sure we can find something where Go becomes the relief :D
<jhass> PHP? VisualBasic?
<raz> heh... try harder :p
<raz> PHP is bad but at least practical...
<jhass> implementing TLS with OpenSSL rather than whatever Go's package is called
<jhass> Oh, I know, a day of ABAP
<raz> well yea people use Go for all kinds of system tools and the results tend to be not bad. the two things it has going for it is that it's fast and doesn't leak
<raz> i've never used ABAP but heard ppl say it's actually not *that* terrible for what it is
<raz> syntax-wise it looks sql'ish to me hmmm
<raz> and really aesthetics-wise i find that still more pleasant than the go line noise
<jhass> hey, the scenario is you have to do it for a day and then you can go back to doing Go and how you feel. Not whatever people say :P
<raz> like who on earth decided that public stuff should be uppercase
<raz> well, i heard SAP coders are paid quite well
<raz> that could offset some of the pain :D
<jhass> well, Dart uses "prefix with _" to make methods private. Gotta have quirks everywhere
<raz> at least that limits the uglyness to the rare parts where it's actually needed
<FromGitter> <naqvis> and Nim uses `*` to mark things public :P
<jhass> I tend to have more private than public methods, in Flutter code at least
<raz> whereas go smears it in your face in every line
<erdnaxeli> go works, but it is boring
<jhass> that's quite its intend as I understood it, to be boring
<raz> naqvis: yes but only at declaration. you don't have to include it in every call i think?
<erdnaxeli> jhass: indeed
<raz> i'm fine with boring. but not with tedious and ugly.
<erdnaxeli> the thing that really blocked me when doing go is not having union types
<raz> well, they're adding generics now. but the syntax is... yet more line noise of course
<FromGitter> <naqvis> generics got added after whole lot of wars and debates
<FromGitter> <naqvis> but yeah there is always never-ending wars on languages, tools ....
<FromGitter> <naqvis> a vs b, vim vs emacs
<FromGitter> <naqvis> and people really get religious on such wars :P
<raz> yup and all that even tho the answer is so simple. vim is obviously right and emacs just wrong. ¯\_(ツ)_/¯
<straight-shoota> amen
<yxhuvud> shrug. both are great.
<yxhuvud> (in very different ways)
kreyren has quit [Remote host closed the connection]
kreyren has joined #crystal-lang
kreyren has quit [Remote host closed the connection]
<FromGitter> <tenebrousedge> @ImAHopelessDev_gitlab o/
duane has joined #crystal-lang
duane has quit [Ping timeout: 240 seconds]
duane has joined #crystal-lang
<FromGitter> <Blacksmoke16> @YusufCakan i dont think you can as the formatter would remove them assuming the method doesn't have any args
<FromGitter> <ImAHopelessDev_gitlab> i use notepad, so i can't complain about vim or emacs
* FromGitter * tenebrousedge twitches
xaxisx has joined #crystal-lang
<FromGitter> <j8r> @ImAHopelessDev_gitlab have you tried Geany?
<FromGitter> <ImAHopelessDev_gitlab> nah
<FromGitter> <j8r> it's fast and light, it's an IDE that think it is an Editor, as the opposite of VS Code/Atom that are the opposite
<FromGitter> <j8r> performance/memory wise
kreyren has joined #crystal-lang
<kreyren> How can i use regex in if statement's expression?
<kreyren> e.g. comparing string to match regex i.e. .*\.onion$
<FromGitter> <ImAHopelessDev_gitlab> @j8r i'll take a look, ty
* kreyren created if current_host = %r|*.\.onion$| and is pretty sure it's wrong
_ht has joined #crystal-lang
<FromGitter> <j8r> @ImAHopelessDev_gitlab for Crystal support: https://github.com/crystal-lang-tools/geany-crystal
<FromGitter> <tenebrousedge> I think `match?` got merged, so `if(str.match? regex)`
<FromGitter> <j8r> there is also `=~`
<FromGitter> <tenebrousedge> doesn't that also set various globals?
* kreyren was already reading through regex.html
<FromGitter> <tenebrousedge> I'mma have to read how `match?` was implemented
<FromGitter> <j8r> `#match` odes it too
* kreyren is confused
<kreyren> so
<kreyren> if current_host =~ *.\.onion
<kreyren> ?
<FromGitter> <j8r> ...
<kreyren> or match
<kreyren> O.o
<FromGitter> <j8r> samez
<FromGitter> <j8r> look at the example, and put this in your `if`
<FromGitter> <j8r> From the docs: ⏎ ⏎ ```/hay/ =~ "haystack" # => 0 ⏎ /y/.match("haystack") # => Regex::MatchData("y")``` [https://gitter.im/crystal-lang/crystal?at=5fbd3487ba69631c7499e19c]
<FromGitter> <j8r> depends of what you want
<FromGitter> <j8r> /prefer
<FromGitter> <Blacksmoke16> to @tenebrousedge theres also `.matches?` which returns a `Bool`
<kreyren> return true if variable env.request.host contains onion URL >.>
<FromGitter> <tenebrousedge> yeah `matches?` not `match?`
<kreyren> o.o
<FromGitter> <j8r> also for the onion thing, why not just using `#ends_with? ".onion"`?
<FromGitter> <j8r> `URI` may also be useful
<FromGitter> <tenebrousedge> `matches?` does not assign `$~`
<FromGitter> <tenebrousedge> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5fbd3510f5849839adef3581]
<FromGitter> <j8r> yep, was talking for `#match`
<FromGitter> <tenebrousedge> k
<FromGitter> <j8r> I thought that was you were talking 😅
<FromGitter> <j8r> good to know!
<erdnaxeli> i don't really like those magic variables, the match data is enough
<FromGitter> <tenebrousedge> nah for `if` I always prefer using the predicate method
<kreyren> How would ends_with worked in this scenario?
* kreyren is confused about the '#'
<FromGitter> <tenebrousedge> `if (str.ends_with? ".onion")`
<straight-shoota> no need for parenthesis ^
<kreyren> that looks ok, thanku
<straight-shoota> >> "foobar.onion".ends_with?(".onion")
<DeBot> straight-shoota: # => true - https://carc.in/#/r/9zuv
<FromGitter> <tenebrousedge> neat bot
<FromGitter> <j8r> kreyren in the API docs, you can see `#some_instance_method` and `.some_class_method`
<FromGitter> <j8r> that's a Crystal convention
<kreyren> noted ^-^
<FromGitter> <j8r> why it is called DeBot? Deutsch Bot, or like a aristocrat Jean-Charles De Bot ;)
<oprypin> j8r, want to be even more puzzled? https://github.com/jhass/debot#cebot
<FromGitter> <tenebrousedge> now I'm very confused
<FromGitter> <domgetter> Are there any resource on how to use `Compress::Zlib`? The docs don't show any examples, and I don't even know what to `require` to try and use it.
<jhass> DeBot was the Ruby version. I don't pretend I remember the reason for the name...
<FromGitter> <tenebrousedge> @domgetter there does seem to be some missing docs there. However, there seems to be a lot of specs covering compression
<FromGitter> <domgetter> Can you point me to those specsa?
<FromGitter> <j8r> oprypin jhass the only logic I can think of is, AeBot, BeBot, CeBot, DeBot, etc
<FromGitter> <domgetter> thank you, @tenebrousedge
<FromGitter> <j8r> oprypin oh yes, there is a typo in the Readme
<FromGitter> <tenebrousedge> @domgetter docs seem to be under `Compress` https://crystal-lang.org/api/master/Compress/Zlib/Writer.html
xaxisx has quit [Quit: Leaving...]
<kreyren> Are there any The Onion Router (Tor) bindings in crystal?
<kreyren> so that i could set up invidious to deploy hidden service without depending on tor service~
<FromGitter> <tenebrousedge> I mean it's not usually super hard to write bindings
<raz> if it exists it would prob be on crystalshards.xyz
<kreyren> thanku
<kreyren> crystalshards only has torrent_client x.x
f1reflyylmao has quit [Ping timeout: 246 seconds]
<kreyren> The suggested variable 'env.request.host' does not expand in HTTP header on my end.. Pair programming on: https://go.codetogether.com/#/c1149271-a681-47e9-8ae1-bdd79a136d7f/iZR68DodUAyOMr8BRyzM7V
<kreyren> Error: undefined local variable or method 'env' for top-level
f1refly has joined #crystal-lang
<FromGitter> <Blacksmoke16> might also be called `context`
<kreyren> context.request.host?
<FromGitter> <Blacksmoke16> or `ctx`, or whatever the block argument in your route is
<FromGitter> <Blacksmoke16> assuming you're using kemal
<kreyren> yep kemal on invidious
<FromGitter> <Blacksmoke16> `get "/opensearch.xml" do |env|`
<FromGitter> <Blacksmoke16> its whatever the block arg is, in this case `env`
<FromGitter> <Blacksmoke16> assuming you're doing this in a route
* kreyren is confused
<kreyren> It's not my source code so unable to tell if it's in the route, relevant enough to verify?
<FromGitter> <Blacksmoke16> got a diff/link to the specific file you're editing?
<kreyren> Line 277
<kreyren> def make_host_url
<kreyren> (pretty shitty code so far.. will work on it)
<FromGitter> <Blacksmoke16> doenst look like you're ever calling that method?
<FromGitter> <Blacksmoke16> nor using `env` in that method
<kreyren> method called from src/invidious.cr http://ix.io/2Fle
<kreyren> it's complex project that's why i provided pair programming x.x
<FromGitter> <Blacksmoke16> ah yea this method happens outside of the request lifecycle, i.e. its only provided static/global config
<kreyren> alternatively github.com/iv-org/invidious whe i've changed deployment and utils.cr in src/invidious/helpers
<kreyren> Blacksmoke16 So calling file outside of the main file causes the variable to not be available?
<FromGitter> <Blacksmoke16> no let me be more clear, this method executes when invidious runs to set the `HOST_URL`
<FromGitter> <Blacksmoke16> i.e. it doesnt happen when you make a request to invidious
<FromGitter> <Blacksmoke16> thus, you dont have access to `env` since your not in a request context
<kreyren> ah i though it would be available during that runtime x.x what do you suggest then assuming https://github.com/iv-org/invidious/issues/1421 being the issue that i am trying to fix?
<FromGitter> <Blacksmoke16> based on the discussion i read yesterday there is a solution, you cant rely on `HOST_URL` constant and need to determine what it is on a per request basis
<kreyren> The issue with that is that this is expcted to be provided on clearweb and Tor so the HOST_URL is expected to expand accordingly.. but thinking about it i think that relative paths would be better solution here?
<FromGitter> <Blacksmoke16> im not sure, i only skimmed the discussion/that issue
<kreyren> i see O.o well let me try to see what happens then
<FromGitter> <Blacksmoke16> maybe go back and go thru the discussion again
<jhass> you're still trying to preserve HOST_URL. It has to die. Entirely.
<FromGitter> <Blacksmoke16> ^
<FromGitter> <j8r> arf oprypin: https://carc.in/#/r/9zvf
<oprypin> O_o
<FromGitter> <j8r> that's the proc approach of last night :/ ⏎ going to file a bug
<FromGitter> <j8r> may be the same as https://github.com/crystal-lang/crystal/issues/7577
<oprypin> j8r, slightly less syntactically busy repro https://carc.in/#/r/9zvh
<FromGitter> <j8r> you just changed FLoat32 to Int32 :)
<FromGitter> <j8r> same bug, indeed
<FromGitter> <RespiteSage> It also uses `#to_s` instead of `#<`, which is a little bit easier to read.
<FromGitter> <RespiteSage> That is, `#to_s` is easier.
<FromGitter> <j8r> to_s can take an Int32?
<oprypin> >> 255.to_s(16)
<DeBot> oprypin: # => "ff" - https://carc.in/#/r/9zvi
<FromGitter> <j8r> I thought it was an IO
<FromGitter> <j8r> ha yes, right
<straight-shoota> works with IO, too
<straight-shoota> >> String.build { |io| 255.to_s(io, 16) }
<DeBot> straight-shoota: # => "ff" - https://carc.in/#/r/9zvj
<FromGitter> <j8r> both of this methods have a lot of overloads
<FromGitter> <j8r> could be related to the issue :shrug:
<FromGitter> <j8r> I'll try a "simple" one
<oprypin> right
<oprypin> but i think it's specific to integer
<jhass> guys, F5 your github :D
<FromGitter> <j8r> works in master...
<FromGitter> <j8r> It does!
<oprypin> j8r, wha why
<oprypin> oops i mean jhass, wha why
<jhass> Ary already fixed it
<oprypin> oh loooool
<FromGitter> <j8r> I will double check if it behaves as intended on my use-case
<FromGitter> <j8r> ha, hum I expanded manually like in https://github.com/crystal-lang/crystal/pull/9824#issue-502493811
<FromGitter> <j8r> so, I should be good
kreyren has quit [Remote host closed the connection]
kreyren has joined #crystal-lang
_ht has quit [Quit: quit!]
<FromGitter> <j8r> hum... https://carc.in/#/r/9zw3
<FromGitter> <j8r> I have to use #dup
<FromGitter> <j8r> logic, that's because the Slice is a view of the buffer
<FromGitter> <j8r> I shouldn't have problems if I don't use multi-threading and each client has its own buffer
<FromGitter> <j8r> or, maybe using a mutex...
<FromGitter> <j8r> a pool is also an option; for now, going to add a log to warn if the buffer is not empty
<FromGitter> <HertzDevil> is there a formal grammar of crystal yet
<FromGitter> <Blacksmoke16> Hm?
<FromGitter> <tenebrousedge> there isn't a formal grammar, to my knowledge
<FromGitter> <Blacksmoke16> what for docs or?
<FromGitter> <tenebrousedge> no, for making statements about correctness, I think
<FromGitter> <Blacksmoke16> ah gotcha
<FromGitter> <tenebrousedge> I don't *think* a lot of the grammar is changing at this point
<FromGitter> <tenebrousedge> the API is evolving
<FromGitter> <tenebrousedge> but Crystal probably has too much Ruby influence to be a lot of fun trying to define a grammar for it
<FromGitter> <j8r> probably an RFC repo like Nim or Rust
<FromGitter> <j8r> more related to design choices in general