return0e has quit [Remote host closed the connection]
return0e has joined #crystal-lang
<FromGitter>
<AZanellato> @paulcsmith I kinda get why the compile times are slow (checking every type in the stack trace), but why can't this be much improved in the subsequent times?
moei has joined #crystal-lang
<FromGitter>
<paulcsmith> I think it can be, it’s just difficult to get right. The core team knows about it and is thinking about how to cache stuff and so incremental compilation. It’s tricky though
<FromGitter>
<paulcsmith> Elixir does a pretty good job but still sometimes requires clearing the cache manually. I hope it can be done sometime soon but it’s hard to do so I bet it’ll take a bit
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 244 seconds]
Raimondii is now known as Raimondi
Groogy has quit [Read error: Connection reset by peer]
duane has quit [Ping timeout: 268 seconds]
raz has quit [Ping timeout: 276 seconds]
raz has joined #crystal-lang
vikaton has quit [Quit: Connection closed for inactivity]
<FromGitter>
<aisrael> How can I wrap an `IO::Memory` as an `IO::Buffered`?
<FromGitter>
<aisrael> Oh, nvm. I think I don't need it 🐑
<FromGitter>
<bararchy> one for FileDesc, the other for IO::Mem
<FromGitter>
<bararchy> this works
<FromGitter>
<syrm> i need to put an overload for each subclass of IO ?!
<FromGitter>
<syrm> it's not very clean...
<FromGitter>
<bararchy> else you have not control what goes where
<FromGitter>
<syrm> i only want an IO :p
<FromGitter>
<bararchy> but IO can be anything from File to Socket to Memory, do you really want to put 4 `if` statments everywhere or just make overloads?
<FromGitter>
<E-stein> Hello, I wrote a tap formatter for crystal spec but I'm not sure it's perfect, can I still make a merge request?
<FromGitter>
<syrm> I only need to handle FileDescriptor case @bararchy i don't understand wy my previous example don't work
<FromGitter>
<bararchy> because it tells you the `@input` might be of the type `IO::ARGF` which has no `.raw!` method. ⏎ because you allow `@input` to be any type of `IO` and as such lose grained control of `@input` type.
<FromGitter>
<syrm> i typed input to be IO::FileDescriptor in initialize where i use raw in other i typed to IO but i don't use raw
<FromGitter>
<bararchy> when a var is an instance var (`@var`) it's type is checked thourghout the whole class, and so the type is `IO+` which means multiple types of `IO`
<FromGitter>
<syrm> ok
<FromGitter>
<straight-shoota> @E-stein there is already #6286
<FromGitter>
<syrm> I fixed it :)
<FromGitter>
<straight-shoota> I think it's a pretty solid implementation of the basics, but please take a look if you find things to improve.
<FromGitter>
<straight-shoota> And if your implementation is better, don't hesitate from opening a new PR, I won't mind ;)
<FromGitter>
<bararchy> I hope you and dev will know what you're doing, this is one of the hardest standards to implement, and most prone to security issues
<FromGitter>
<alex-kampa> @bararchy re ECDSA "I hope you and dev will know what you're doing..." - yup we want to be sure there are no mistakes. I used the ECDSA functions of SushiChain as the basis, and then modified to make it more generic. But yes we'll need very thorough reviews and lots of testing.
<FromGitter>
<bararchy> That's cool, will you let the @tbrand and @kingsleyh use the changes? it would benifit the project greatly to have a stronger and more secure encryption
<FromGitter>
<alex-kampa> Sure, but before that I need to do more testing and also some code cleanup - which is where a more experienced crystal dev will be useful.
<FromGitter>
<alex-kampa> Later on we could make a standalone shard out of it, many projects use ECDSA these days...
vegai has joined #crystal-lang
vegai has left #crystal-lang [#crystal-lang]
<FromGitter>
<fridgerator> @alex-kampa is your upwork post limited by country?
<FromGitter>
<fridgerator> I have no blockchain experience, I just wanted to look at it 😆
<FromGitter>
<fridgerator> I think its cool crystal has something on Upwork
<FromGitter>
<alex-kampa> @fridgerator - no blockchain experience needed for the project :-) Re "is your upwork post limited by country?" why, can't you see it?
<FromGitter>
<vegai> String not having to_a is a concious design choice, right?
<FromGitter>
<fridgerator> I see "You are not authorized to access this page"
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
moei has joined #crystal-lang
wontruefree has joined #crystal-lang
wontruefree has quit [Client Quit]
DTZUZU has joined #crystal-lang
wontruefree has joined #crystal-lang
hgost has joined #crystal-lang
alex`` has quit [Quit: WeeChat 2.2]
hgost has quit [Quit: leaving]
Jenz has quit [Disconnected by services]
ua_ has quit [Ping timeout: 268 seconds]
wontruefree has quit [Quit: bye]
ua has joined #crystal-lang
wontruefree has joined #crystal-lang
Yxhuvud has quit [Remote host closed the connection]
Yxhuvud has joined #crystal-lang
hightower4 has quit [Ping timeout: 265 seconds]
<wontruefree>
I has a script that `spawn` 10 time and then has a `Fiber.yield` after the spawns to wait for them all to finish. Will that work
vikaton has quit [Quit: Connection closed for inactivity]
ma has joined #crystal-lang
<wontruefree>
it seems to just exit immediately. I can use sleeps to see the spawns will work if given time
<FromGitter>
<straight-shoota> `Fiber.yield` is just `sleep(0)` that means, it yields execution to be resumed by a different fiber, but the main fiber will immediately be enqueued in the scheduler. It will probably be resumed before the spawned fibers are finished and exits the program.
<FromGitter>
<straight-shoota> In order to wait for all fibers and only resume execution afterwards, you'd need some kind of wait group. This can be implemented using a channel which receives the a value once each fiber has finished.
ma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wontruefree has quit [Quit: bye]
duane has quit [Ping timeout: 256 seconds]
duane has joined #crystal-lang
<FromGitter>
<Timbus> I have used all of these and, at certain times, all of them feel like the worst.
<FromGitter>
<Timbus> @straight-shoota neat. So a spindle is sorta like a local scheduler? Do you attach handlers to it for when threads end/die/etc? Does it have any other features beyond thread waiting? Like I dunno, messaging
<FromGitter>
<Timbus> I assume not, since there are already channels.
alex`` has joined #crystal-lang
ma has joined #crystal-lang
ma has quit [Client Quit]
alex`` has quit [Ping timeout: 248 seconds]
Ven` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ma has joined #crystal-lang
<FromGitter>
<straight-shoota> It's not a scheduler. Scheduler is still global. It's a context for encapsulating fibers.
<FromGitter>
<straight-shoota> Channels are for messaging, and the implementation actually uses channels. But a spindle can be used for collecting return values of the fibers.
duane has quit [Ping timeout: 256 seconds]
<FromGitter>
<Timbus> Yup, that's what I guess I meant by 'local scheduler'. I guess I was also thinking it might be extended for things like 'actor' threads (send message to spindle -> all threads react). Guess that's out of scope though.
<FromGitter>
<Timbus> probably handled better by some kinda supply/fanout type channely thing