<ukd1>
Blacksmoke16, no - i'm deliberatly holding it open; I need to know when the other end (client) disconnects from the server
<FromGitter>
<Blacksmoke16> hm im not sure
_whitelogger has joined #crystal-lang
<FromGitter>
<asterite> named tuple has a limit to avoid that infinite recursion. There's no real limit I think for defining a named tuple with more than 300 elements, but I can't see a use case for that. Named tuple represent argument methods and should be used like that. And I can't imagine passing 300 arguments to a method. Plus Hash will work equally fine, or the performance will be probably be negligible
<companion_cube>
asterite: why not have a recursion limit on the specializer instead?
<companion_cube>
or syntactic criteria (ie uniform or ground specialization)
alex`` has quit [Ping timeout: 245 seconds]
chemist69_ has joined #crystal-lang
chemist69 has quit [Ping timeout: 246 seconds]
<companion_cube>
did anyone consider enabling github sponsors for crystal
<companion_cube>
?
<FromGitter>
<galvertez> anybody know if `@[AlwaysInline]` works if the method yields? it seems like something that would be ignored if a method yields but i'm not sure and i'm curious
<FromGitter>
<galvertez> i don't figure there's any way to tell (easily)
ht_ has joined #crystal-lang
ht_ has quit [Remote host closed the connection]
absolutejam4 has joined #crystal-lang
absolutejam4 has quit [Ping timeout: 240 seconds]
absolutejam4 has joined #crystal-lang
gangstacat has joined #crystal-lang
<FromGitter>
<Daniel-Worrall> You've been able to sponsor Crystal on Github since its release.
absolutejam4 has quit [Ping timeout: 240 seconds]
absolutejam4 has joined #crystal-lang
gangstacat has quit [Quit: Ĝis!]
gangstacat has joined #crystal-lang
sorcus has joined #crystal-lang
absolutejam4 has quit [Ping timeout: 246 seconds]
absolutejam4 has joined #crystal-lang
<FromGitter>
<bew> @galvertez i think it should work too
alex`` has joined #crystal-lang
hightower2 has joined #crystal-lang
coderobe has joined #crystal-lang
coderobe has quit [Client Quit]
coderobe has joined #crystal-lang
<FromGitter>
<asterite> galvertez a method that yields is always inlined, that annotation has no effect in that case
DTZUZO has quit [Ping timeout: 258 seconds]
<FromGitter>
<mavu> If I want (read: have to) do HTTPS with crystal, what should be my first choice?
<FromGitter>
<mavu> Add a server in front of my software? (i.e. nginx handles ssl)
<FromGitter>
<mavu> or do it in cryatal "natively"?
<FromGitter>
<mavu> Or in other words: Is HTTPS in crystal nice, easy and secure enough, or is it something you use when you have no other options?
<FromGitter>
<straight-shoota> Crystal's `HTTP::Server` can do HTTPS but, it's not a very sophisticated webserver overall. It's designed to provide a framework for building an application server. For production apps, I'd recommend to always put it behind a reverse proxy like nginx . It offer way more features and greatly improves the performance and safety of your HTTP application.
<FromGitter>
<Daniel-Worrall> You
<FromGitter>
<Daniel-Worrall> Best practice is to build it behind a reverse proxy like nginx and if you need the security from the app passing it to
<FromGitter>
<Daniel-Worrall> (My thumb hates me)
<FromGitter>
<Daniel-Worrall> And if you need the security from app to proxy you can use https on the app too as Johannes said
<FromGitter>
<mavu> ok, thanks. ⏎ my webserver is just a tiny configuration UI tacked on a service, so thats why i'm undecided which way to go.
<FromGitter>
<mavu> nginx is not a problem, but an additional package to install and configure. ⏎ on the other hand that would require no rebuilding/new release of hte main serrvice.
<FromGitter>
<mavu> I think I'll toss a coin.
<FromGitter>
<mavu> Hmm. could someone point me to an example of a HTTPS server in crystal? ⏎ the documentation only lists the TCPServer variant, and I'm not sure how I start a HTTPserver on a existing TCPServer?
<FromGitter>
<Daniel-Worrall> pass the tls: true option
<FromGitter>
<Daniel-Worrall> I know Kemal uses http server and it just has the certs passed in from launch args but idk about Stalin
<FromGitter>
<Daniel-Worrall> Stdlib
<FromGitter>
<mavu> Ahhh. found it, I was looking in the wrong place. thankd
<FromGitter>
<bew> @asterite about inlining for methods that yields, I know the block is inlined in the method, but the method is always inlined too??
<companion_cube>
Daniel-Worrall: hmm it only redirects to external sites, I was thinking of the new sponsorship within github
<FromGitter>
<Daniel-Worrall> External sites are linked up with things and github sponsor handles providing the external links. /shrug
Raimondi has quit [Quit: WeeChat 2.5: ¡Chau!]
alex`` has quit [Ping timeout: 258 seconds]
alex`` has joined #crystal-lang
Raimondi has joined #crystal-lang
<FromGitter>
<asterite> @bew I'm not sure I understand the question. If you have a method that does `a = 1; yield a; puts a + 2` and you call that passing the block, that entire code, including the block, is inlined in the parent method
<FromGitter>
<asterite> that's why `5.times { ... }` is exactly equivalent to `i = 0; while i < 5; ...; i += 1; end`
<FromGitter>
<asterite> I guess you asked whether `i = 0; i < 5; etc.` isn't inlined, but it is. The block can `return` so the entire method that yields must be inlined in the caller
<FromGitter>
<Daniel-Worrall> Casting an Event(AllTypes) to Event(Specific) or the other way around, so I can integrate with EDA to emit an "all events" signal
<FromGitter>
<Daniel-Worrall> so AllTypes would be an alias union
<FromGitter>
<Blacksmoke16> what if you include a module into each and listen on that module
<FromGitter>
<Blacksmoke16> otherwise afaik no you cant since `Foo(Int32)` isnt the same thing as `Foo(String)`
<FromGitter>
<Daniel-Worrall> Well
<FromGitter>
<Daniel-Worrall> `Foo(String | Int32) to Foo(String)`
<FromGitter>
<Daniel-Worrall> or backwards
<FromGitter>
<Daniel-Worrall> is my use case
<FromGitter>
<Blacksmoke16> still dont think you could
<FromGitter>
<Daniel-Worrall> I don't think I *should* do including on each since then I'm registering on every specific class and removing it will be harder
<FromGitter>
<Daniel-Worrall> or impossible
<FromGitter>
<Blacksmoke16> im not sure i follow
<FromGitter>
<Blacksmoke16> if the goal is to emit something that all "children" will react to that would be idea no?
<FromGitter>
<Blacksmoke16> ideal
<FromGitter>
<Blacksmoke16> while still being able to emit single class events
<FromGitter>
<Daniel-Worrall> yes, but then there'd be the same proc for each, but with their own handler id
<FromGitter>
<Daniel-Worrall> which I'd have to store since I'm trying to abstract it away for the user
<FromGitter>
<Blacksmoke16> seems you cant subscribe to a parent type anyway
<FromGitter>
<Blacksmoke16> (it'll prob be a module in the end vs Object)
<FromGitter>
<Blacksmoke16> i think i like option 2 more, since its easier as you have access to the actual obj being serialized, i.e. ivars/annotations etc
<FromGitter>
<Blacksmoke16> plus can override it on a per obj basis as well
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
return0e_ has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
return0e has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
ua_ has quit [Ping timeout: 245 seconds]
ua_ has joined #crystal-lang
alex``` has joined #crystal-lang
alex`` has quit [Ping timeout: 246 seconds]
ht_ has quit [Quit: ht_]
livcd has quit [Remote host closed the connection]
absolutejam4 has quit [Ping timeout: 240 seconds]
absolutejam4 has joined #crystal-lang
<FromGitter>
<watzon> `previous_def` is supposed to call the original method right? So if I extend a class and override one of the methods, calling `previous_def` within that method should call the original?
<FromGitter>
<watzon> Maybe I'm misunderstanding what it's for
<FromGitter>
<absolutejam_gitlab> yeah
absolutejam has joined #crystal-lang
<FromGitter>
<watzon> Ahh right, it's for monkeypatching
<FromGitter>
<watzon> not extending
<FromGitter>
<absolutejam_gitlab> it's equivalent to `super` in other languages?
<FromGitter>
<absolutejam_gitlab> I'd say it's fine for extending