dominikh changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.1.0
kludge` has quit [Ping timeout: 252 seconds]
kludge` has joined #cinch
jxport has joined #cinch
<jxport> is it possible to pass configs/params to plugins?
<leftylink> jxport: yeah, so in Bot#configure { |c| c.plugins.options[PluginClass] = { :foo => :bar } }, and then in the plugin it is accessible via config[:foo]
<ayonix> what's wrong with getting drunk in germany?
<jxport> leftylink: thank you
<dominikh> ayonix: over here nobody is offering to buy me drinks :-P
jxport has quit [Quit: leaving]
<ayonix> If you ever happen to come to Kaiserslautern I'd offer you a beer ;)
<dominikh> I'll keep that in mind ;-)
<Netfeed> well, it's not long until octoberfest, cheap beer for everyone :)
<dominikh> Netfeed: you clearly do not know how octoberfest works :P
<dominikh> it's the opposite of cheap
<Netfeed> i guess
<Netfeed> the SEK is strong now though so it will be cheap when i'm going to müncnhen
<Netfeed> meh
<dominikh> completely different end of Germany tho
<Netfeed> that doesn't suprise me
<Netfeed> i'm going to a wedding in wein in september and it's the weekend before oktoberfest starts, we thought that we could iht two birds with one rock
<dominikh> wien?
<Netfeed> yes?
<dominikh> you said wein, I was confused
<Netfeed> well, spelling
<dominikh> well, a wedding in wein would be a wedding in wine. probably an interesting, albeit a bit messy, event
<Netfeed> oh, yeah
<Netfeed> what does weiner mean then?
<Netfeed> oh, no, thats wiener, sigh
<dominikh> D
<dominikh> :D
<dominikh> you'll do great in germany and austria
<dominikh> "I'm thirsty, bring me your finest wiener!"
<Netfeed> ein grosse bier bitte!
<dominikh> grosses
<Netfeed> i'm kicking myself for choosing spanish instead of german for third language when i went to school
<dominikh> although the people around you won't get it right after a couple of beer anymore, either..
aclearman037 has joined #cinch
<FiXato> I wish I could've picked Spanish instead of French in highschool, but both French and German were obligatory
<dominikh> I learned English and Latin
<dominikh> so... I learned English.
<FiXato> Latin will give you a good basis for learning other related languages though
<dominikh> I tried to learn Japanese; Latin didn't help me :P
<Netfeed> well, we english as mandatory and french/german/spanish as third option
<FiXato> as a Dutch person, I got Dutch, English, German and French mandatory
<Netfeed> we had*
<FiXato> in college I also took a semester of Japanese for the fun of it, and a few years ago I took 3 'years' of Norwegian at a community college (though I took the 2nd and 3rd year course in the same year, since that was just 2 hours every other week), due to my migration to Norway.
<dominikh> how did that work out
<Netfeed> heh, you didn't learn danish at least, there's a useless language
<FiXato> Still don't speak the language fluently, and have a hard time following conversations, especially group-conversations, but at least it gave me a decent basis and taught me the most common grammar rules.
<dominikh> I tried learning Swedish in university. I walked out during the first class and never came back.
<Netfeed> what? swedish is soooo easy :P
<dominikh> the sound of it made me sick :P
<FiXato> Well, written Norwegian is very similar to written Danish. Spoken Danish however sounds like a Norwegian has a dozen golfballs stuck in his mouth
<dominikh> :D
<Netfeed> honestly, swedish sucks, some considers it one of ther hardest languages to learn due to fuckloads of our words mean more than one thing
<dominikh> yay
<FiXato> and the Danish number system feels like some 3-year old's invention. :P
<Netfeed> "en en" means "one juniper"
<dominikh> lol
<Netfeed> FiXato: the danish number sistem is completly retarded
<dominikh> yeah, keep your language
<Netfeed> "en" and "än" is pronunced the same way too
<Netfeed> and you can say "den enen" which means more or less "that juniper"
<dominikh> that reminded me of http://9gag.com/gag/aLKVVvW
<Netfeed> hehe
<Netfeed> the word "gång" is fantastic too, "det var en gång" can mean both "once upon a time" or "there where a walk way"
<dominikh> oO
<dominikh> I hate homophones... I suppose Swedish really isn't the language for me
<Netfeed> probably not
<dominikh> my thought was "hey, it's probably close to german, easy credits"
<Netfeed> yeah, no
<FiXato> French counting is just as retarded btw. 90: quatre-vingt-dix (40-20-10)
<Netfeed> how is that even 90? how do you know where you are supposed to multiply?
<FiXato> 80: quatre-vingts
<FiXato> 70: soixante-dix (60-10)
<dominikh> German counting is slightly annoying. 98: achtundneunzing (eight and ninety). it's bloody backwards
<FiXato> (s/40/4/)
<Netfeed> 98 - nittio-åtta (ninety-eight)
<FiXato> dominikh, Dutch shares the same system. It is kinda annoying when writing spoken numbers down
<dominikh> FiXato: I almost got it wrong while typing that example...
<FiXato> lol
<Netfeed> in danish: 60 = 3 * 20 = tres
<dominikh> I get it wrong almost every time because I use english more often.
<dominikh> heh
<FiXato> Netfeed, and 50 = 2,5 * 20
<Netfeed> 50 in danish is "almost 60" so it's "halvtres"
<dominikh> almost 60, lol
<dominikh> what's 30? :P
<Netfeed> i'm not sure what 40 is :)
<Netfeed> but probably "almost 40" :)
<dominikh> why not slightly more than 20 :P
<Netfeed> because i think you count with a factor of 20 or something
<dominikh> japanese is only slightly confusing because it's based on 1e4 instead of 1e3
<Netfeed> 20 = tyve, 30 = tredve, 40 = forr, 50 = halv tress, 60 = tress and so on
<Netfeed> really retarded
<Netfeed> heh, a japanese domain to explain how danish numbers work :)
<FiXato> anyway, gotta migrate some data over
<FiXato> see you later
<dominikh> good luck
Quintasan has joined #cinch
<Quintasan> Hi, my bot https://gist.github.com/Quintasan/962c23ba4ca19f53e522 google feature does not work with random strings, for example it works with "Kalisz" but does not work with "cebula" for some reason, the thread goes down with https://gist.github.com/Quintasan/663b23e5cdd8bc8498cd . in the log there is output of query.encoding and query.bytes
<Quintasan> If you want to test some queries then I can have bot join this channel
<catepillar> is that using the google example plugin?
<Quintasan> catepillar: I don't think so.
<catepillar> ah, just looked at the first link
<catepillar> it's not
<catepillar> the problem is that cebula is returning UTF-8 characters
<Quintasan> So it's me doing it wrong? It was working before normally until I decided to move hosts
<catepillar> ayonix: probably has it
<ayonix> tell nokogiri to use utf-8 maybe
<ayonix> Nokogiri::HTML(open(uri, nil, "UTF-8"))
<catepillar> i knew there was something with nokogiri, couldn't remember what exactly it was
<Quintasan> catepillar, ayonix: I'll give it a whirl
<Quintasan> I would have thought it uses utf-8 by default
<catepillar> it has something to do with the background library nokogiri uses, iirc
<ayonix> i though it did too. but i remember having some issues as well
<ayonix> at least i used it with the encoding somewhere
<ayonix> nokogiri.org states: "Strings are always stored as UTF-8 internally. Methods that return text values will always return UTF-8 encoded strings. Methods that return XML (like to_xml, to_html and inner_html) will return a string encoded like the source document."
<Quintasan> hmm
<ayonix> still not working?
<Quintasan> ayonix: Yup
<Quintasan> `gsub!': invalid byte sequence in UTF-8 (ArgumentError)
<ayonix> where is that gsub coming from
<Quintasan> maybe
<Quintasan> I guess CGI.escape
<Quintasan> wait, no
<Quintasan> it's cinch-2.1.0/lib/cinch/channel.rb:396
<Quintasan> text.gsub!(/[\x02\x1F\x16\x0F]|\x03\d{2}(,\d{2})?/, "")
<Quintasan> That apparently removes all colors
Spami has joined #cinch
<dominikh> if you claim that the contents of your string are in UTF-8 when they aren't, stuff will break.
<Quintasan> dominikh: It is UTF-8
<Quintasan> Unless Ruby itself lies
<dominikh> invalid byte sequence in UTF-8 says quite the opposite
<ayonix> hmm but it's the same error as before and there it wasn't specified that it should be utf8 so it should have used the encoding of the document, whatever that was
<Quintasan> I'm going to try to see what CGI.unescape_html "#{title} - http://#{url}" does with the string
<dominikh> "Cebula zwyczajna \x96 Wikipedia, wolna encyklopedia" ← that is not utf-8
<dominikh> that is iso-8859-1
<dominikh> \x96 is the en dash
<Quintasan> I have no idea how I'm supposed to handle that
<ayonix> convert the string to utf8 for example :P
<ayonix> but i have no idea if there is a better solution
<dominikh> if Google always delivers ISO-8859-1, then use String#force_encoding + String#encode
<Quintasan> bloody hell why would it use iso-8859-1
aclearman037 has quit [Ping timeout: 252 seconds]
<dominikh> I would suggest using the (deprecated) API at http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=cebula instead of trying to scrape their website
<dominikh> at least that one gives you consistent data
<Quintasan> dominikh: This looks like a problem with the Polish wikipedia
<Quintasan> :O
<Quintasan> dominikh, ayonix, catepillar: Thanks for helping me
<Quintasan> dominikh: Though I'm probably going to use the api now
<catepillar> google doesn't force an encoding on it's main page
<catepillar> it just throws out whatever the page itself has
<catepillar> so sometimes it will be utf-8
<catepillar> sometimes it will be another ISO
<catepillar> and it often happens on the same page
<Quintasan> This is apparently UTF-8
<dominikh> catepillar: google of all people should know better
<dominikh> the API, however, does seem to normalize and use UTF-8 exclusively
<catepillar> google is weird
<catepillar> im sure they have a reason for it
<catepillar> but it sure does make scraping their main page a challenge
<dominikh> they don't want you to do that, anyway :)
<dominikh> of course they don't want to provide a supported, stable API, either…
cout is now known as Teck1a
Spami has quit [Quit: This computer has gone to sleep]
hobo has joined #cinch
Teck1a is now known as cout
<dominikh> Paradox: so… existing methods in the Helpers module are just shims for other APIs. e.g. Format is Formatting.format – unformat fits in well with that, obviously. but where the heck do I put sanitize :)
<dominikh> I could put it directly in Helpers… I suppose sanitize is really just a helper, it's a plain gsub after all
xeviox|afk is now known as xeviox
xeviox is now known as xeviox|afk
irsol has quit [Ping timeout: 264 seconds]
irsol has joined #cinch
postmodern has quit [Quit: Leaving]
hobo has quit [Remote host closed the connection]
ColdBlooder has joined #cinch
postmodern has joined #cinch
<ColdBlooder> Hi guys. Im having a slight issue with Cinch.
<ColdBlooder> When a link/tweet that gets posted is displayed, some special characters dont appear correctly.
<ColdBlooder> For example !"§$%&/()=*'_:;,.-#+<> looks like -> !"§$%&amp;/()=*'_:;,.-#+&lt;&gt;
<ColdBlooder> Any way to fix that?
<onewheelskyward> Looks like something is creating html entities.
<onewheelskyward> Can you share the code?
thews has quit [Ping timeout: 250 seconds]
thews has joined #cinch
thews has quit [Changing host]
thews has joined #cinch