ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.33.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
ur5us has quit [Ping timeout: 256 seconds]
ur5us has joined #crystal-lang
jrayhawk has quit [Ping timeout: 268 seconds]
antoszka_ has joined #crystal-lang
f1reflyylmao has joined #crystal-lang
f1refly has quit [Ping timeout: 240 seconds]
antoszka has quit [Ping timeout: 240 seconds]
DTZUZU has quit [Ping timeout: 240 seconds]
DTZUZU has joined #crystal-lang
_whitelogger has joined #crystal-lang
f1reflyylmao has quit [Quit: bye fags]
f1refly has joined #crystal-lang
f1refly has quit [Remote host closed the connection]
f1refly has joined #crystal-lang
<FromGitter> <watzon> Has anyone messed around with Vala?
Vexatos has quit [Quit: ZNC Quit]
Vexatos has joined #crystal-lang
ur5us has quit [Ping timeout: 256 seconds]
darkstardev13 has joined #crystal-lang
HumanGeek has joined #crystal-lang
sorcus1 has joined #crystal-lang
dostoyev1ky has joined #crystal-lang
repo1 has joined #crystal-lang
Human_G33k has quit [*.net *.split]
ravenx has quit [*.net *.split]
sorcus has quit [*.net *.split]
repo has quit [*.net *.split]
dostoyevsky has quit [*.net *.split]
Stephie has quit [Quit: Fuck this shit, I'm out!]
Stephie has joined #crystal-lang
Vexatos has quit [Quit: ZNC Quit]
Vexatos has joined #crystal-lang
<FromGitter> <kiti-nomad> Therefore, there is no need for a type declaration and you can re-reference to any type
_whitelogger has joined #crystal-lang
dostoyev1ky has quit [Quit: leaving]
dostoyevsky has joined #crystal-lang
_whitelogger has joined #crystal-lang
Human_G33k has joined #crystal-lang
ur5us has joined #crystal-lang
HumanGeek has quit [Ping timeout: 265 seconds]
_ht has joined #crystal-lang
_whitelogger has joined #crystal-lang
alexherbo2 has joined #crystal-lang
ur5us has quit [Ping timeout: 256 seconds]
sorcus1 has quit [Quit: WeeChat 2.7.1]
sorcus has joined #crystal-lang
antoszka_ is now known as antoszka
Stephie has quit [Quit: Fuck this shit, I'm out!]
Stephie has joined #crystal-lang
tdc has joined #crystal-lang
Vexatos has quit [Quit: ZNC Quit]
Stephie has quit [Quit: Fuck this shit, I'm out!]
Stephie has joined #crystal-lang
Vexatos has joined #crystal-lang
Vexatos has quit [Quit: ZNC Quit]
Stephie has quit [Quit: Fuck this shit, I'm out!]
Stephie has joined #crystal-lang
Vexatos has joined #crystal-lang
tdc has quit [Remote host closed the connection]
tdc has joined #crystal-lang
alexherbo27 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 258 seconds]
alexherbo27 is now known as alexherbo2
alexherbo2 has quit [Quit: The Lounge - https://thelounge.chat]
sz0 has joined #crystal-lang
<FromGitter> <j8r> I'm making a proxy, any simple/efficient way to map a `HTTP::Client::Response` to a `HTTP::Server::Response`?
return0e has quit [Remote host closed the connection]
return0e has joined #crystal-lang
alexherbo2 has joined #crystal-lang
teardown has quit [Read error: Connection reset by peer]
teardown has joined #crystal-lang
<FromGitter> <jwoertink> Is there a way to expand the `~` to whatever the system has?
<FromGitter> <jwoertink> for like if you're doing `Dir.cd("~/Projects")`
<FromGitter> <Blacksmoke16> https://crystal-lang.org/api/master/File.html#expand_path(path,dir=nil,*,home=false):String-class-method
<FromGitter> <jwoertink> ah
yxhuvud has quit [Read error: Connection reset by peer]
<FromGitter> <jwoertink> nice
<FromGitter> <jwoertink> thansk
yxhuvud has joined #crystal-lang
postmodern has quit [Read error: Connection reset by peer]
postmodern has joined #crystal-lang
<FromGitter> <dscottboggs_gitlab> @j8r, does the reponse need to be modified on the way to the server?
<FromGitter> <jwoertink> Question on this benchmark deal here
<FromGitter> <jwoertink> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5e6d384d17d3e742347cc07f]
<FromGitter> <jwoertink> it says returns the number of Bytes.... The first one returns 64, and the second returns 0
<FromGitter> <jwoertink> Does that mean that the second one is returning less than 1 Byte, but since it's an Int you don't see the float numbers?
alexherbo27 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 258 seconds]
alexherbo27 is now known as alexherbo2
<FromGitter> <Blacksmoke16> 2nd is a tuple so it doesn't allocate
<FromGitter> <Blacksmoke16> Since it's in the stack
<FromGitter> <jwoertink> Gotcha. Ok, that makes sense
postmodern has quit [Quit: Leaving]
alexherbo2 has quit [Ping timeout: 265 seconds]
ur5us has joined #crystal-lang
<FromGitter> <jwoertink> If I have a macro that makes a method, is it possible to call the macro `{% @def %}` from that method?
<FromGitter> <jwoertink> Nice!
<FromGitter> <jwoertink> Thanks 😄
<FromGitter> <stronny> np
<FromGitter> <j8r> @dscottboggs_gitlab No, the response is transferred as-is
<FromGitter> <j8r> Only headers are changed
<FromGitter> <stronny> probs be better off not even bothering wih L7 then, transform bytes at TCP level
<FromGitter> <j8r> A part could be streamed
<FromGitter> <stronny> do you need your own proxy? just use haproxy?
<FromGitter> <j8r> I prefer to do it in Crystal than developing a plugin in Lua
<FromGitter> <dscottboggs_gitlab> > transform bytes at TCP level ⏎ ⏎ that'
<FromGitter> <stronny> doing what? change headers?
<FromGitter> <stronny> you don't need lua for that
<FromGitter> <j8r> I know HAProxy, but that's not only that
<FromGitter> <j8r> it's a OAuth proxy
<FromGitter> <dscottboggs_gitlab> but.... @stronny .... haproxy isn't *_written in Crysal_*
<FromGitter> <j8r> I will launch the project, and will optimize this later - I think this would be a good optimization
<FromGitter> <stronny> joking aside I would be very careful with production daemons in Crystal
<FromGitter> <stronny> in my opinion the language is ill suited for this usecase
<FromGitter> <j8r> production daemons?
<FromGitter> <dscottboggs_gitlab> what makes you say that?
<FromGitter> <stronny> first and foremost broken concurrency
<FromGitter> <j8r> broken? I let `HTTP::Server` handler this
<FromGitter> <stronny> good luck debugging then
<FromGitter> <dscottboggs_gitlab> yeah Idk what the advantage is of shipping a super broken and honestly unsound concurrency implementation over just not having it and occasionally using `fork` when you need it
<FromGitter> <stronny> I'm not talking preview_mt, that's a separate can of worms
_ht has quit [Quit: _ht]
<FromGitter> <dscottboggs_gitlab> (I'm basing this off the blog post that came out when the concurrency release happened like 3 versions ago so feel free to tell me I'm wrong)
<FromGitter> <dscottboggs_gitlab> oh?
<FromGitter> <stronny> I'm talking harebrained half cooked CSP just because G O L A N G
<FromGitter> <j8r> I'll see, that's a simple project with no money involved - for now
<FromGitter> <j8r> golang is also kind of broken too, not thread safe - as I know
<FromGitter> <stronny> nevermind threads
<FromGitter> <stronny> you can't control fibers
<FromGitter> <dscottboggs_gitlab> are you referring to the `select` macros or...?
tdc has quit [Ping timeout: 260 seconds]
<FromGitter> <stronny> select is not enough
<FromGitter> <dscottboggs_gitlab> like what's so half-cooked about crystal's CSP?
<FromGitter> <j8r> have you an example @stronny ?
<FromGitter> <stronny> yes I do
<FromGitter> <stronny> basically you need something like a `kill` to work with async events
<FromGitter> <stronny> you also need a parent-child structure and a way to control the spawn-exit events
<FromGitter> <stronny> vanilla Crystal does not have this
<FromGitter> <stronny> no amount of channels will help, that's my conclusion
<FromGitter> <j8r> Anyway, I doubt it will be a big deal for me
<FromGitter> <stronny> hey, don't let me stop you. I'm just sharing my thoughts, not a universal thruth
<FromGitter> <dscottboggs_gitlab> > you need something like a kill to work with async events ⏎ ⏎ why? ⏎ ⏎ > you also need a parent-child structure ... [https://gitter.im/crystal-lang/crystal?at=5e6d542f391cb312fadbe825]
<FromGitter> <stronny> imagine a posix OS without PPID, kill and wait
<FromGitter> <stronny> just processes exiting when they're done
<FromGitter> <dscottboggs_gitlab> posix has a different concurrency model
<FromGitter> <stronny> no? posix is CSP through and through
<FromGitter> <dscottboggs_gitlab> I kinda see what you mean about the need for the ability to free deadlocked fibers
<FromGitter> <dscottboggs_gitlab> we have wait thoguh
<FromGitter> <stronny> where?
<FromGitter> <dscottboggs_gitlab> select?
<FromGitter> <stronny> what you have is a pipe.read, not wait
<FromGitter> <dscottboggs_gitlab> fair
<FromGitter> <dscottboggs_gitlab> but channels do solve that
<FromGitter> <stronny> i beg to disagree
<FromGitter> <dscottboggs_gitlab> regardless, I'm mainly curious as to your suggestions for concurrency and how you would implement them
<FromGitter> <stronny> okay, I'm hesitant to plug this once again, but here is a code dump that I was able to put together https://github.com/stronny/crystal-concurrency-whatever
<FromGitter> <stronny> it's a mess, so you would need to make an effort to sort through =)
<FromGitter> <stronny> I would be glad to comment though
<FromGitter> <dscottboggs_gitlab> looking through the examples....
<FromGitter> <stronny> tcp-latency is the meaningful one
<FromGitter> <stronny> others may not even work
<FromGitter> <dscottboggs_gitlab> I'm sorry dude I'm too tired to get this right now. I'll take another look tomorrow.
<FromGitter> <stronny> yeah, it's complex
ur5us has quit [Ping timeout: 240 seconds]
<FromGitter> <stronny> basically it offers some hints along those lines: ⏎ ⏎ 1) no shared state: a job exists only in a fiber's stack by default ⏎ 2) trap/kill-like event processing ⏎ 3) parent-child relationships and wait-like behaviours [https://gitter.im/crystal-lang/crystal?at=5e6d59119f25f2238b8138f1]