<FromGitter>
<Sija> clever trick for setting instance properties btw
<FromGitter>
<elorest> Yeah it seems like it will be useful.
<FromGitter>
<elorest> Do you know if there’s a way to get the asm output from crystal play like you can in rust?
<FromGitter>
<Sija> nope
<FromGitter>
<elorest> k
<FromGitter>
<elorest> have a good night.
<FromGitter>
<elorest> or whatever time it is there lol
<FromGitter>
<Sija> it’s 8am but nevertheless its my night time ;)
unshadow has joined #crystal-lang
<unshadow>
After allocation memory for IO.read (mem = Slice.new(size)), should I discard it (=nil) or something when I'm done with it ? or would the GC handle it ?
<FromGitter>
<Sija> GC will handle it
gewo has quit [Quit: WeeChat 1.5]
gewo has joined #crystal-lang
Frites has joined #crystal-lang
mark_66 has joined #crystal-lang
<FromGitter>
<schoening> Aw gee.. now I have to learn asp net. I sure wish company would use crystal. :smile:
txdv has quit [Ping timeout: 240 seconds]
bjz has joined #crystal-lang
<FromGitter>
<bew> One dayyy (_I strongly hope_)
<vegai>
looked at some macro code in Artanis
<vegai>
saw {{
<vegai>
... escaped. Is it so that { needs to be escaped?
<vegai>
that seems to make sense, since it's used in macro definition code. But why don't we need to escape }?
<vegai>
not sure if it's more clear that the parser figures it out
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
Ven is now known as Guest80741
Aytan72 has quit []
p0p0pr37 has quit [Remote host closed the connection]
p0p0pr37 has joined #crystal-lang
p0p0pr37 has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Philpax has quit [Ping timeout: 255 seconds]
zipR4ND has left #crystal-lang [#crystal-lang]
zipR4ND has joined #crystal-lang
yogg-saron has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<crystal-gh>
[crystal] Sija opened pull request #4369: Pass Severity instead of String to Logger::Formatter (master...fix-logger-formatter-severity) https://git.io/v90Xy
mark_66 has quit [Remote host closed the connection]
<RX14>
i should be able to use Kemal.config.server.bind(reuse_port: true) though
<FromGitter>
<fridgerator> would be nice, I offered this suggestion before
<FromGitter>
<fridgerator> does that work?
balduin has quit [Remote host closed the connection]
<RX14>
i havent tried it
<RX14>
but it should
<FromGitter>
<fridgerator> I didn't think about that
<FromGitter>
<fridgerator> i was using `sed` to replace the line before building, lol
<RX14>
eyy segfault
<RX14>
god damnit
<RX14>
@fridgerator the bind line I just tried segfaulted somehow :/
<FromGitter>
<fridgerator> hrm
<RX14>
which makes little sense
<FromGitter>
<sdogruyol> @RX14 how can I help
<RX14>
@sdogruyol pass through reuse_port from kemal.run :)
<RX14>
but it makes no sense why calling bind would segfault though...
<FromGitter>
<sdogruyol> Do we really need that
<unshadow>
kemel.run(reuseport: true)
<unshadow>
or something
<RX14>
@sdogruyol if you want crystal to run on more than 1 core in the techempower benchmarks; yes
<unshadow>
Yeha, then a script can just run the process x times where x is the number of cores
<RX14>
reuse_port is the best way to implement parallelism right now
<unshadow>
and via Linux kernel magic it will load balance the work on the processes
<FromGitter>
<sdogruyol> That's correct but how about we wait for parallelism
<RX14>
and it may even prove to have better performance after it's in the stdlib
<RX14>
since the connections will be distributed in the kernel
<RX14>
@sdogruyol why *not* add it? It'll still be around and useful after parallelism
<RX14>
oh i see why it segfaults
<unshadow>
TechPower is really visable, I had my boss ask me about should we re-write something in crystal even though it shows poor performance and I had to show him different results manually , so this little work can give Crystal quite a big boost
<FromGitter>
<bew> don't think so, why do you want that?
<FromGitter>
<fridgerator> you can send it like `name: "isaac"`, and `**args` the initialize method will be a named tuple
<FromGitter>
<elorest> so **args is namedtuple but *args is just tuple?
<FromGitter>
<elorest> thanks
<FromGitter>
<fridgerator> :+1:
<FromGitter>
<elorest> If it takes a named tuple I wouldn’t alternatively be able to pass it a hash? Currect?
<oprypin>
elorest, correct. keys can't be dynamic.
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 260 seconds]
Raimondii is now known as Raimondi
<FromGitter>
<luislavena> @elorest when using `#[]` on a NamedTuple, the checks are done at compile time if the key is a Symbol, if you assign the symbol to a variable, the check is done at runtime. You can also use `#fetch`
<FromGitter>
<luislavena> You can also turn the named tuple into a Hash with `to_h`
<FromGitter>
<luislavena> That is how I use it, if direct usage from the middleware stack, need to do `ctx.beryl.something`, from by class, have access to it.
[spoiler] has quit [Ping timeout: 240 seconds]
kellabyte_ has joined #crystal-lang
dannyAAM_ has joined #crystal-lang
[spoiler] has joined #crystal-lang
Lex[m]1 has joined #crystal-lang
maxpowa_ has joined #crystal-lang
maxpowa has quit [Ping timeout: 240 seconds]
kellabyte has quit [Ping timeout: 240 seconds]
Lex[m] has quit [Ping timeout: 240 seconds]
dannyAAM has quit [Ping timeout: 240 seconds]
maxpowa_ is now known as maxpowa
kellabyte_ is now known as kellabyte
Aytan72 has quit [Remote host closed the connection]
Aytan72 has joined #crystal-lang
Aytan72 has quit [Ping timeout: 260 seconds]
<RX14>
aha, got the kemal bug
<FromGitter>
<Sija> what was it?
<RX14>
using a before_all ahndler
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Aytan72 has joined #crystal-lang
Guest48770 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]