Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 16:01
    HertzDevil opened #12390
  • 16:01
    HertzDevil labeled #12390
  • 16:01
    HertzDevil labeled #12390
  • 15:24
    straight-shoota milestoned #12389
  • 14:37
    HertzDevil synchronize #10973
  • 12:58
    asterite labeled #12389
  • 12:58
    asterite labeled #12389
  • 12:58
    asterite opened #12389
  • 11:35
    straight-shoota milestoned #10973
  • 11:34
    straight-shoota milestoned #12353
  • 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
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
there seems to be a bug in the ssl socket, not sure if this is related but i can't decode it: crystal-lang/crystal#5375
he (RX14) says call #flush... but the doc's don't say this...
i tried calling flush tho.. didn't write