Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 06 21:20
    HertzDevil synchronize #10805
  • Jul 06 21:14
    straight-shoota edited #5430
  • Jul 06 20:20
    beta-ziliani closed #12146
  • Jul 06 20:20
    beta-ziliani synchronize #12146
  • Jul 06 20:02
    HertzDevil review_requested #12089
  • Jul 06 19:41
    HertzDevil synchronize #11647
  • Jul 06 19:19
    HertzDevil synchronize #11647
  • Jul 06 19:18
    HertzDevil labeled #12213
  • Jul 06 19:18
    HertzDevil labeled #12213
  • Jul 06 19:18
    HertzDevil labeled #12213
  • Jul 06 19:18
    HertzDevil opened #12213
  • Jul 06 18:24
    beta-ziliani synchronize #12146
  • Jul 06 17:38
    HertzDevil synchronize #12212
  • Jul 06 17:02
    HertzDevil labeled #12212
  • Jul 06 17:02
    HertzDevil labeled #12212
  • Jul 06 17:02
    HertzDevil labeled #12212
  • Jul 06 17:02
    HertzDevil opened #12212
  • Jul 06 13:42
    beta-ziliani ready_for_review #12146
  • Jul 06 13:41
    beta-ziliani milestoned #12146
  • Jul 06 13:38
    beta-ziliani synchronize #12146
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
George Dietrich
@Blacksmoke16
ah right, and it's not HTTP based i take it?
Jonathan Silverman
@mixflame
nope, non http
George Dietrich
@Blacksmoke16
gotcha
Jonathan Silverman
@mixflame
this part is usually simple
and not hard
and i had it working before