Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 13:02
    Blacksmoke16 labeled #12185
  • 10:45
    asterite edited #12185
  • 10:20
    straight-shoota milestoned #12184
  • 10:20
    straight-shoota labeled #12184
  • 10:18
    straight-shoota labeled #12185
  • 09:38
    asterite synchronize #12183
  • 09:06
    HertzDevil labeled #12184
  • 09:05
    HertzDevil labeled #12183
  • 09:05
    HertzDevil labeled #12183
  • 07:41
    syalon opened #12185
  • 07:41
    syalon labeled #12185
  • 04:47
    elebow opened #12184
  • 00:07
    asterite opened #12183
  • Jul 01 22:41
    straight-shoota milestoned #12167
  • Jul 01 22:36
    beta-ziliani labeled #12180
  • Jul 01 22:35
    beta-ziliani milestoned #12182
  • Jul 01 22:32
    beta-ziliani milestoned #12169
  • Jul 01 22:11
    beta-ziliani milestoned #12179
  • Jul 01 18:44
    Blacksmoke16 labeled #12182
  • Jul 01 18:44
    Blacksmoke16 labeled #12182
Gabor Szabo
@szabgab
When I run "crystal spec" is there a way to tell it to stop on the first error?
From IRC (bridge bot)
@FromIRC
<straight-shoota> @szabgab Yes --fail-fast
<straight-shoota> In 1.1 this will actually be in the output of crystal spec --help. Because it's a runtime option, you currently only get the help by building and runnning the spec (crystal spec -- --help)
From IRC (bridge bot)
@FromIRC
<hightower2> Are there some articles on multitenant http-based apps with Crystal?
Gabor Szabo
@szabgab
@straight-shoota thanks
Gabor Szabo
@szabgab
Is there a web site collecting videos about Crystal? Similar (or not) to https://pyvideo.org/ ?
George Dietrich
@Blacksmoke16
i doubt it
Taupiqueur
@alexherbo2
is there an equivalent to File.fnmatch from Ruby?
I want to test a glob string matches a file
Taupiqueur
@alexherbo2
thanks o/
George Dietrich
@Blacksmoke16
is there a way to call a parent classes implementation of a method from a different method and when that parent method is also redefined in the child?
i.e. cant just do self.parent_method and super wont work because its not the same method
maybe ::parent_method would do it?
George Dietrich
@Blacksmoke16
nope
super.parent_method doesnt work either
George Dietrich
@Blacksmoke16
Jonathan Silverman
@mixflame
I have a problem with a bridge bot i'm trying to add SSL to
```
one sec
```
Unhandled exception in spawn: Closed stream (IO::Error)
  from /home/jonathan/.asdf/installs/crystal/1.0.0/share/crystal/src/io.cr:118:5 in 'check_open'
  from /home/jonathan/.asdf/installs/crystal/1.0.0/share/crystal/src/io/buffered.cr:100:5 in 'peek'
  from /home/jonathan/.asdf/installs/crystal/1.0.0/share/crystal/src/io.cr:622:37 in 'gets'
  from /home/jonathan/.asdf/installs/crystal/1.0.0/share/crystal/src/io.cr:595:5 in 'gets'
  from /home/jonathan/.asdf/installs/crystal/1.0.0/share/crystal/src/io.cr:565:5 in 'gets'
  from /home/jonathan/.asdf/installs/crystal/1.0.0/share/crystal/src/io.cr:564:3 in 'gets'
  from src/lib/irc.cr:160:5 in 'get_response'
  from src/lib/irc.cr:33:9 in 'initialize'
  from src/lib/irc.cr:22:3 in 'new'
  from config/application.cr:83:3 in '->'
  from /home/jonathan/.asdf/installs/crystal/1.0.0/share/crystal/src/primitives.cr:255:3 in 'run'
  from /home/jonathan/.asdf/installs/crystal/1.0.0/share/crystal/src/fiber.cr:92:34 in '->'
  from ???
any ideas would be appreciated
George Dietrich
@Blacksmoke16
looks like you're trying to read from a closed IO
Jonathan Silverman
@mixflame
before, it was nil errors
alright, i got it to connect, now im just back to the refusal to send bug
Jonathan Silverman
@mixflame
ERROR :Closing link: (97KAAAAEC@c-107-2-145-228.hsd1.co.comcast.net) [Registration timeout]
something to do with flush()?
George Dietrich
@Blacksmoke16
https://gist.github.com/mixflame/4e81d9083a02c9859ccc59c623b4d3c9#file-irc-cr-L79 is prob closing the socket so that when the other fibers execute it's closed
would be my guess without actually trying it
Chris Watson
@watzon
Seems likely. The code inside of the spawn is going to run asynchronously, so the .close is going to happen while the socket is still being accessed.
Jonathan Silverman
@mixflame
whoa thx
George Dietrich
@Blacksmoke16
looks like you got some non-ideal concurrency code going on
Jonathan Silverman
@mixflame
sorry guys even with that close disable the server still closes the link, there's a fail to write... i'll show the current code
the code has worked fine before without the SSL stuff bolted on...
trying to get it onto my irc network
George Dietrich
@Blacksmoke16
whats the error exactly again?
Jonathan Silverman
@mixflame
i'm back to this IRC based error, "ERROR :Closing link: (97KAAAAEC@c-107-2-145-228.hsd1.co.comcast.net) [Registration timeout]"
it happens when you don't do this fast enough:
```
  def login
    return unless @response_count == 3
    ssl_socket.as(OpenSSL::SSL::Socket::Client).unbuffered_write "PASS #{password}\r\n".to_slice
    ssl_socket.as(OpenSSL::SSL::Socket::Client).unbuffered_write "NICK #{nick}\r\n".to_slice
    ssl_socket.as(OpenSSL::SSL::Socket::Client).unbuffered_write "USER #{user} 8 * :#{user}\r\n".to_slice
    @logged_in = true
  end
George Dietrich
@Blacksmoke16
so at this point it sounds like it's a logic problem
Jonathan Silverman
@mixflame
surely
but the SSL socket simply isn't sending, i ran into this before
George Dietrich
@Blacksmoke16
do you need to use that socket directly versus just like HTTP::Client with tls enabled?
Jonathan Silverman
@mixflame
there's no TLS enable IRC socket in the crystal lang lib
it's speaking the Internet Relay Chat protocol