Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 14 23:41
    HertzDevil synchronize #12337
  • Aug 14 22:42
    asterite synchronize #12375
  • Aug 14 19:25
    asterite synchronize #12375
  • Aug 14 18:06
    asterite synchronize #12375
  • Aug 14 18:05
    asterite closed #12383
  • Aug 14 18:05
    asterite closed #12387
  • Aug 14 18:05
    asterite closed #12388
  • Aug 14 15:16
    straight-shoota milestoned #12362
  • Aug 14 14:51
    HertzDevil synchronize #12362
  • Aug 14 14:50
    HertzDevil closed #10571
  • Aug 14 14:49
    HertzDevil closed #11825
  • Aug 14 14:47
    straight-shoota milestoned #11420
  • Aug 14 14:32
    straight-shoota closed #11954
  • Aug 14 14:32
    straight-shoota closed #12368
  • Aug 14 14:31
    straight-shoota closed #5044
  • Aug 14 14:31
    straight-shoota closed #10954
  • Aug 14 14:29
    straight-shoota milestoned #12388
  • Aug 14 14:28
    straight-shoota milestoned #12387
  • Aug 14 14:18
    straight-shoota synchronize #11420
  • Aug 14 14:15
    straight-shoota milestoned #12356
From IRC (bridge bot)
@FromIRC
<mps> @didactic-drunk: I have to rebuild crystal for this, iiuc
didactic-drunk
@didactic-drunk
You could possibly use an existing 1.0.0 build
From IRC (bridge bot)
@FromIRC
<mps> I don't keep it around because my arm64 machines are too slow to build crystal
Francisco Adasme
@franciscoadasme
@Blacksmoke16 This was a simplified example, the module includes other methods that work on T, so I cannot simply use Foo::Bar
George Dietrich
@Blacksmoke16
include A(Foo, Foo::Bar)?
From IRC (bridge bot)
@FromIRC
<mps> @didactic-drunk: btw, I maintain crystal in last 2 years for alpine linux
<mps> for any change I have to use alpine builders and to push changes to distro
<mps> @didactic-drunk: anyway I will try this patch on my local box on weekend, thank you for it
didactic-drunk
@didactic-drunk
You can probably use an existing compiled 1.0.0 crystal binary with the std lib source from my branch (or just copy http/server.cr)
From IRC (bridge bot)
@FromIRC
<mps> ah, lets see
From IRC (bridge bot)
@FromIRC
<mps> @didactic-drunk: In /usr/lib/crystal/core/http/server.cr:505:9
<mps> 505 | sleep timeout
<mps> Error: no overload matches 'sleep' with type Nil
<mps> but looking into patch, this is some kind of reference counting also?
didactic-drunk
@didactic-drunk
Did you use close with or without a timeout?
From IRC (bridge bot)
@FromIRC
<mps> without timeout, I want to close listening socket imediately
didactic-drunk
@didactic-drunk
Try close timeout: 0
Um. Listening sockets are closed immediately regardless of timeout. Timeout is the wait time for already accepted client connections
From IRC (bridge bot)
@FromIRC
<mps> yes, patch didn't helped
didactic-drunk
@didactic-drunk
Try timeout: 80
From IRC (bridge bot)
@FromIRC
<mps> will this close listening socket imediately?
<mps> even with 'timeout: 80' doesn't work
didactic-drunk
@didactic-drunk
It should
From IRC (bridge bot)
@FromIRC
<mps> dies immediately
didactic-drunk
@didactic-drunk
Do you have a client connection open before ctrl+c?
From IRC (bridge bot)
@FromIRC
<mps> yes
didactic-drunk
@didactic-drunk
Works on my end
With your test code
From IRC (bridge bot)
@FromIRC
<mps> hm
<mps> ok, thanks
Francisco Adasme
@franciscoadasme
@Blacksmoke16 ok, thanks
From IRC (bridge bot)
@FromIRC
<mps> I will try to build crystal with your patch on weekend and test again
didactic-drunk
@didactic-drunk
Can you test on non-arm?
From IRC (bridge bot)
@FromIRC
<mps> I can, but maybe next week (ditched x86 few years ago)
<mps> hmm, maybe I can 'usurp' my alpine developers lxc
<mps> but not now, it is to busy by building a lot of pkgs now
didactic-drunk
@didactic-drunk
Nm. It's possible it needs crystal master although I don't see why. I hope it's not an arm thing
From IRC (bridge bot)
@FromIRC
<mps> last time I tried it was same on arm and x86
From IRC (bridge bot)
@FromIRC
<postmodern> is there a way to create an tuple of arbitrary length, but all elements are of the same type?
George Dietrich
@Blacksmoke16
No tuples are fixed suze by design
Size
Chris Watson
@watzon
Is there a good thread safe queue yet?
Or am I going to have to implement one quickly?
George Dietrich
@Blacksmoke16
Rabbit?
Chris Watson
@watzon
Rabbit would probably be a good idea actually, but this is a smaller project and I'd rather avoid external deps like that if I can. I really just need a deque that is thread safe.
George Dietrich
@Blacksmoke16
That's fair
There's one in the stdlib, but idk if it's thread safe or not
Chris Watson
@watzon
Yeah iirc it isn't
From IRC (bridge bot)
@FromIRC
<yxhuvud> @watzon: can you use a channel?
Quinton Miller
@HertzDevil
is there a design reason that x.as?(T) isn't equivalent to x if x.is_a?(T)