Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 20:54
    oprypin edited #12545
  • 17:04
    straight-shoota edited #12530
  • 16:06
    straight-shoota labeled #12550
  • 16:03
    straight-shoota milestoned #12549
  • 16:03
    straight-shoota milestoned #12549
  • 16:01
    Hadeweka opened #12550
  • 16:01
    Hadeweka labeled #12550
  • 14:12
    straight-shoota labeled #12549
  • 14:12
    straight-shoota labeled #12549
  • 14:12
    straight-shoota labeled #12549
  • 14:12
    straight-shoota opened #12549
  • 13:54
    straight-shoota closed #12282
  • 13:28
    straight-shoota labeled #12548
  • 13:28
    straight-shoota labeled #12548
  • 13:28
    straight-shoota opened #12548
  • 13:28
    straight-shoota labeled #12548
  • 11:06
    straight-shoota edited #12547
  • 11:05
    straight-shoota opened #12547
  • 11:05
    straight-shoota labeled #12547
  • 11:05
    straight-shoota labeled #12547
From IRC (bridge bot)
@FromIRC
<mps> have to dig old example on archive disk
<mps> but also have to finish irssi rewrite rules for this channel
<mps> perl greedy matches make me ... uff
From IRC (bridge bot)
@FromIRC
<mps> yes, it should close listening socket but not active ones
didactic-drunk
@didactic-drunk
@mps could you test #10884 and see if it fixes your problem?
Francisco Adasme
@franciscoadasme
hey everyone, is there a way to declare a subtype of a typevar (T::U) in a type restriction?, something like this:
struct Foo; end
struct Foo::Bar; end

module A(T)
  abstract def bar : T::Bar
end

class B
  include A(Foo)

  def bar : Foo::Bar
    Foo::Bar.new
  end
end
George Dietrich
@Blacksmoke16
include A(Foo::Bar)
and just use T
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?