ChanServ changed the topic of #crystal-lang to: The Crystal programming language | | Crystal 0.36.0 | Fund Crystal's development: | GH: | Docs: | Gitter:
oddp has quit [Ping timeout: 272 seconds]
hightower2 has quit [Ping timeout: 260 seconds]
deavmi has quit [Ping timeout: 265 seconds]
deavmi has joined #crystal-lang
<FromGitter> <Blacksmoke16> is the argument the same type for each?
f1reflyylmao has joined #crystal-lang
f1refly has quit [Ping timeout: 260 seconds]
chachasmooth has quit [Ping timeout: 272 seconds]
chachasmooth has joined #crystal-lang
avane has quit [Quit: ZNC -]
avane has joined #crystal-lang
<FromGitter> <HertzDevil> how do you have a `Hash(String, Proc)` though
<FromGitter> <HertzDevil> you can have a union of proc instances but never `Proc` alone
_whitelogger has joined #crystal-lang
<FromGitter> <watzon> Yeah it would have to be a union, and rather than checking arity you would probably have to match on the explicit type. So `Proc(Nil) | Proc(String, Nil)` or even `Proc(Nil, Nil)` if you don't mind always providing an argument.
deavmi has quit [Ping timeout: 265 seconds]
deavmi has joined #crystal-lang
ua has quit [Ping timeout: 260 seconds]
postmodern has quit [Quit: Leaving]
ua has joined #crystal-lang
_ht has joined #crystal-lang
oddp has joined #crystal-lang
<FromGitter> <Groogy> Yo! Long time no see!
<FromGitter> <Groogy> @yxhuvud I see that Crystal now properly complains when you forget to define an abstract method xD
<yxhuvud> haha, guess it was a bug then :)
<FromGitter> <Groogy> Ah yeah prob, because I thought I remembered that it would nag at you before
<FromGitter> <Groogy> also boy last update caused a lot of errors to popup in my framework. I've been real lazy it seems
<yxhuvud> Yeah, my monkeypatched event loop is also in shambles.
<FromGitter> <Groogy> I do like though the compiler enforcing me to put more types since it will help with making it compile faster. Would love some flags here that let's me set at what level I want it at
<yxhuvud> If you are referring to return types I'm not certain it will improve performance. one would think so but apparently it still has to be computed (and then validated against the given type)
<FromGitter> <Groogy> :/ oh well
<FromGitter> <Groogy> yeah was literally what I was thinking
<FromGitter> <m_a_j_ch_rz_a_k_twitter> Hello. Is there any possibility to make crystal compilation a little bit faster?
<straight-shoota> Which compilation times do you experience and with what kind of program?
<FromGitter> <m_a_j_ch_rz_a_k_twitter> I have a kemal webserver and I would like to make "crystal run" a little bit faster. I am still writing it and each time when I would like to check something I have to wait a long time.
<straight-shoota> What is "a long time"?
<Andriamanitra> --no-debug flag might make it little bit faster i guess
<FromGitter> <m_a_j_ch_rz_a_k_twitter> over 20 - 30 seconds is a "long time" for me.
<yxhuvud> That does sound long. I wonder what you (or Kemal) could be doing that triggers that (assuming the server isn't all that big)
<yxhuvud> perhaps it is the dwarf loading some other people have reported?
<FromGitter> <m_a_j_ch_rz_a_k_twitter> This is a really simple "almost hello world".
<straight-shoota> are you running crystal 0.36.0?
<yxhuvud> seems should fix it. Apparently there will be a 0.36.1 soon fixing it
<straight-shoota> there are some known performance issues with the latest release
<straight-shoota> 0.36.1 should be released with fixes next week
<FromGitter> <Dan-Do> > over 20 - 30 seconds is a "long time" for me. ⏎ ⏎ My kemal compile time is also 20-30s, with all crystal versions
deavmi has quit [Ping timeout: 264 seconds]
deavmi has joined #crystal-lang
<FromGitter> <m_a_j_ch_rz_a_k_twitter> thank you. Are there any other Crystal web frameworks which could be compiled faster?
willamin has joined #crystal-lang
skrzyp has quit [Remote host closed the connection]
<straight-shoota> probably none would be significantly faster
skrzyp has joined #crystal-lang
deavmi has quit [Quit: Eish! Load shedding.]
deavmi has joined #crystal-lang
<raz> my webapps tend to land in the 5-8s ballpark for dev builds
<raz> some type of incremental/modular compilation would be nice to have in the future
<Andriamanitra> it is on the roadmap at least so there's hope
<raz> yup, it has been discussed in here before, too. but thus far it hasn't been a major issue to me, overall it doesn't feel much slower than go in my usage
<FromGitter> <asterite> Hm? It's not on the roadmap. Or at least if it is, it should be removed
<FromGitter> <Daniel-Worrall> There was a GH Issue with an example incremental compilation integration, but it was closed due to the author not seeing any substantial benefits
<Andriamanitra> woops, i put extra Y in the link, but it's there
<FromGitter> <asterite> Maybe the roadmap is just some nice to have things
<FromGitter> <Daniel-Worrall> Something to work towards, with no deadline or version milestone
<FromGitter> <HertzDevil> the roadmap has not received any substantial updates for over 3 years
<FromGitter> <HertzDevil> it still mentions `Logger` for example
<FromGitter> <Daniel-Worrall> which was only recently removed
<FromGitter> <oceanfish81_twitter> Hi
<FromGitter> <oceanfish81_twitter> I got a bug, on RISC-V:
<FromGitter> <Blacksmoke16> idt thats a supported architecture, so that kinda makes sense
<FromGitter> <asterite> Yes, I think we should remove that wiki page or say it's outdated
deavmi has quit [Ping timeout: 265 seconds]
Stephanie has quit [Quit: Fuck this shit, I'm out!]
Vexatoast has quit [Quit: ZNC Quit]
Vexatos has joined #crystal-lang
<straight-shoota> I've already said that three years ago
Stephie has joined #crystal-lang
<straight-shoota> but I think now the page is at least somewhat up to date, actually.
deavmi has joined #crystal-lang
<straight-shoota> I've just updated a few things that were out of sync
HumanG33k has quit [Read error: Connection reset by peer]
<straight-shoota> But we should really go through that roadmap and make a real one for the path after 1.0
HumanG33k has joined #crystal-lang
jrayhawk has quit [Remote host closed the connection]
jrayhawk has joined #crystal-lang
<FromGitter> <HertzDevil> can we have a roadmap of things that will be removed in 2.0
<FromGitter> <> @HertzDevil: AFAIK that has not been evaluated at all, only passing remarks by asterite what he personally wishes to remove (without any specific references to 2.0)
deavmi has quit [Ping timeout: 272 seconds]
deavmi has joined #crystal-lang
<FromGitter> <asterite> What do you wish to remove? :-)
<FromGitter> <Blacksmoke16> symbols :0
<FromGitter> <Blacksmoke16> make em dedicated to enum autocasting
<oprypin> oh yea that's a good one
<FromGitter> <asterite> Could be. The parser/lexer use symbols, I think I once tried to remove that but the code ended up being worse. Like, instead of :":" to represent a colon token you need an enum with Colon. You have to come up with names for :"+", :"&+", etc. But it's possible, of course, just a bit more cumbersome
<FromGitter> <> what was the (possibly new) way to flatten only one level of arrays?
issyl0 has quit [Ping timeout: 272 seconds]
Liothen has quit [Read error: Connection reset by peer]
issyl0 has joined #crystal-lang
Liothen has joined #crystal-lang
oddp has quit [Quit: quit]
<FromGitter> <> Removing Ruby syntax haha (kidding)
<FromGitter> <> I hope for 2.0 reshape the File, Dir and FileUtils object, to be more OOP like Java and C#
dom96 has quit [Changing host]
dom96 has joined #crystal-lang
avane has quit [Ping timeout: 246 seconds]
<FromGitter> <mattrberry> Writing code like this makes me feel like a bad person, even if it *did* compile :p Any clue how to make this compile, or any suggestions for a less trashy approach? ;p ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Fails because it doesn't like the `type*` []
avane has joined #crystal-lang
<FromGitter> <Blacksmoke16> dont suppose this would help?
<FromGitter> <mattrberry> Oh that's a fun method I didn't know existed, but I don't think it helps in this case :/ That'll definitely clean up one part of my codebase though
<FromGitter> <Blacksmoke16> is there not something on `Pointer` you can use?
<FromGitter> <mattrberry> I've messed around with it a little bit, but I'm not sure
<FromGitter> <Blacksmoke16> normally `to_unsafe` returns a (offset)-instance-method
postmodern has joined #crystal-lang
<postmodern> so what is the difference between Digest::MD5, etc and Crystal::Digest::MD5, etc. The Crystal::Digest classes seem to inherit from ::Digest, but the things within ::Digest do not?
teardown has quit [Remote host closed the connection]
teardown has joined #crystal-lang
<FromGitter> <Blacksmoke16> where do you see `Crystal::Digest::MD5`?
<straight-shoota> Crystal::Digest is not public API
<straight-shoota> Digest::MD5 also inherits Digest through OpenSSL::DIgest
<FromGitter> <Blacksmoke16> `::Digest` is acting as both a namespace, and a base type for digest implementations
_ht has quit [Remote host closed the connection]
<postmodern> kind of odd that ::Digest is used in the Private API, but not the public one. Should I submit a bug pointing out this inconsistency?
<FromGitter> <Blacksmoke16> But it is used in the public API no?
<postmodern> doesn't appear to be. Only used as a namespace, which is odd given it's an abstract class not a module.
<FromGitter> <Blacksmoke16> OpenSSL::Digest inherits from it
<postmodern> ah ha
<postmodern> guess that just leaves Digest::Adler32 and Digest::CRC32 which do not use ::Digest.
<straight-shoota> Digest::MD5 < OpenSSL::Digest < Digest < Reference < Object
<straight-shoota> yeah Adler and CRC have a different interface
<straight-shoota> I guess that could be refactored to Digest
<postmodern> hmm looking at the docs, it doesn't look like OpenSSL::MD5 inherits from OpenSSL::Digest or ::Digest.
<FromGitter> <Blacksmoke16> Yea it doesn't use that api. Looks like it just wraps libcrypto
<FromGitter> <> not directly related but i was kinda disgruntled when it became impossible to take an md5 hash without linking openssl
<straight-shoota> postmodern, OpenSSL::MD5 is kind of openssl internal API. You should just use Digest::MD5 which is currently backed by the opennssl implementation
<straight-shoota> but that can change in the future
<straight-shoota> @oprypin IIRC the native MD5 implementation never got a proper security review
<straight-shoota> it's also not very performant
<straight-shoota> it's only used by the compiler's playground where security considerations don't really matter
<FromGitter> <> in the playground, how?
<FromGitter> <> yea i dont see anything either
<FromGitter> <> It should even be possible to not use MD5 at all
<straight-shoota> indeed
<FromGitter> <> Maybe using `Crystal::Hasher`
<straight-shoota> it seems only Crystal::Digest::SHA1 is really necessary
<FromGitter> <> hm? i dont see even that
<oprypin> oh nice
<oprypin> tbh that place that's using md5 could be switched to sha1
<oprypin> if one really just wanted to get rid of md5
<straight-shoota> or do any other hash
<straight-shoota> it's just for disambiguation