dominikh changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.1.0
apt-get_ has quit [Quit: Quitte]
jackdempsey has joined #cinch
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
jackdempsey has quit [Ping timeout: 250 seconds]
djbkd has joined #cinch
jackdempsey has joined #cinch
v0n has quit [Ping timeout: 240 seconds]
Netfeed has quit [Changing host]
Netfeed has joined #cinch
v0n has joined #cinch
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
djbkd has quit [Ping timeout: 255 seconds]
jackdempsey has quit [Ping timeout: 250 seconds]
jackdempsey has joined #cinch
sarkyniin has joined #cinch
sarkyniin has quit [Quit: Quitte]
sarkyniin has joined #cinch
sarkyniin has quit [Quit: Quitte]
sarkyniin has joined #cinch
<sarkyniin> hey
<sarkyniin> for some reason, when I try to use eval() on a string
<sarkyniin> it finishes the thread
<sarkyniin> for that plugin
<dominikh> unless the eval raises an exception, or the eval'd string instructs the thread to return/be killed, I find that unlikely
<sarkyniin> <dominikh> unless the eval raises an exception, or the eval'd stri
<sarkyniin> wait
<sarkyniin> oh sry
<sarkyniin> I meant to paste this
<sarkyniin> it has the code and the error below
<dominikh> that thing has probably 10 times the amount of code that is required to actually demonstrate the issue, so reduce it to a minimal example :)
<sarkyniin> yeah
<sarkyniin> lemme demonstrate it
<sarkyniin> dominikh: here's the code
<dominikh> We seem to have missed the gist of that gist you were looking for
<sarkyniin> hue
<sarkyniin> anyway
<sarkyniin> here's the log
<sarkyniin> here it is
<sarkyniin> nothing wrong with the code, as you can see
<sarkyniin> but it still stops
<dominikh> odd :)
<sarkyniin> I ran this off a fresh file
<sarkyniin> btw
<sarkyniin> so there's nothing else than that test trigger
<dominikh> yes, I can reproduce it
<dominikh> fwiw, that string you're evaling isn't valid ruby, and as such, the eval raises an exception. the only weird bit is that cinch's exception handling isn't printing that exception
<dominikh> irb(main):002:0> eval(s)
<dominikh> SyntaxError: (eval):1: Invalid octal digit
<dominikh> ...apt-get", "created_at"=>2014-08-19 13:41:14 +0100, "deleted"...
<dominikh> ... ^
<sarkyniin> oh
<sarkyniin> so THAT'S the error
<dominikh> (also, you really shouldn't be using eval as a way to marshal/unmarshal data, use a proper format for that, such as json or yaml)
<dominikh> (preferably json…)
<sarkyniin> the original version of the script was using yaml
<sarkyniin> I guess I should re-use that
<sarkyniin> and just use an URL instead of directly sending the data in ruby format
<dominikh> oh and as for why cinch didn't print that exception: we only rescue StandardError and subclasses thereof, and print stacktraces for those. a syntax error isn't a StandardError, and so we don't rescue it; and Ruby just makes threads die on exceptions in the default settings, it doesn't tell you about it :)
<dominikh> (Thread.abort_on_exception = true should catch it)
<sarkyniin> dominikh: is it possible to remove the "require 'cinch'" in plugins
<sarkyniin> if the plugin is in an external file
<dominikh> what would you gain from doing that?
<sarkyniin> and just put it in the main bot file
<dominikh> you could, but I don't see why you would
jackdempsey has quit [Ping timeout: 250 seconds]
<sarkyniin> dominikh: uh, remove all requires from my plugins?
<sarkyniin> when it wasn't necessary
<sarkyniin> Since I was putting "require 'cinch'" in all of my plugins
<dominikh> it is necessary if you do not want to depend on the order in which requires happened.
sarkyniin has quit [Quit: Quitte]
<dominikh> generally, a file should require the things it needs, not expect someone else to have required the things before
sarkyniin has joined #cinch
<dominikh> generally, a file should require the things it needs, not expect someone else to have required the things before
apt-get_ has joined #cinch
sarkyniin has quit [Ping timeout: 272 seconds]
<Netfeed> especially if you distribute it
CM-Punk has quit [*.net *.split]
CM-Punk has joined #cinch
postmodern has joined #cinch
apt-get__ has joined #cinch
apt-get_ has quit [Ping timeout: 245 seconds]
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
_djbkd has joined #cinch
djbkd has quit [Ping timeout: 246 seconds]
<IotaSpencer> back when I was talking about match and on, doesn't the message opject allow match to have a type?
<dominikh> what do you mean?
_djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
jackdempsey has joined #cinch
apt-get__ has quit [Ping timeout: 240 seconds]
postmodern has quit [Quit: Leaving]