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?
<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"
<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)
<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
<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 -> !"§$%&/()=*'_:;,.-#+<>
<ColdBlooder>
Any way to fix that?
<onewheelskyward>
Looks like something is creating html entities.