hahuang65 has quit [Quit: Computer has gone to sleep.]
msaffitz has quit [Quit: Computer has gone to sleep.]
havenn has quit [Remote host closed the connection]
hahuang65 has joined #ruby-lang
saLOUt has quit [Quit: Konversation terminated!]
bryanl has quit [Ping timeout: 252 seconds]
sora_h is now known as s0ra_h
hagabaka has joined #ruby-lang
kyrylo has quit [Quit: WeeChat 0.3.7]
neocoin has joined #ruby-lang
fserb has quit [Quit: ttyl]
flowerpot has joined #ruby-lang
bryanl has joined #ruby-lang
<apeiros_>
hm, any good name/symbol to indicate that an attribute is allowed to be nil? :nilable? (AR uses {allow_nil: true}, I'd prefer a flag instead of a switch)
tintin has joined #ruby-lang
<tintin>
Will ruby 2 be a new version of ruby or will it be a new program?
<tintin>
Will ruby2 be backward compatible with ruby 1.9.3 ?
macmartine has joined #ruby-lang
dreieins has quit [Ping timeout: 246 seconds]
tintin has left #ruby-lang [#ruby-lang]
dreieins has joined #ruby-lang
<seanstickle>
Yup.
<drbrain>
well… some things have been removed, like iconv, so it won't be perfectly compatible
<apeiros_>
can still be made available, e.g. via gem
<seanstickle>
More compatible than Python 3 -> Python 2, or Perl 6 -> Perl 5, though
<apeiros_>
so the removal from stdlib should not be a deal breaker
<dominikh>
fyi, tintin already left
fgomez has quit [Ping timeout: 244 seconds]
<dominikh>
another fyi, tintin is a troll.
<apeiros_>
how do you figure?
<dominikh>
I've seen him in at least one other channel :)
<dominikh>
and his behaviour there
wpaulson has joined #ruby-lang
<apeiros_>
ah
dreieins has quit [Ping timeout: 240 seconds]
<apeiros_>
you mean my question whether he's a troll was not subtle enough? :)
<dominikh>
well, and wrt #r-l, he's just a cross poster
<drbrain>
tintin seems to be a help vampire
<dominikh>
the thing I do remember is that I banned him in my channel in advance…
<apeiros_>
your channel?
<dominikh>
the one of my main project (cinch), yeah
<apeiros_>
ah
<apeiros_>
I wished I had such a thing…
<dominikh>
well...
<dominikh>
you'd only have to actually finish one of your projects ;)
<apeiros_>
I did!
<apeiros_>
for varying degrees of "finish" :)
bhrgunatha has joined #ruby-lang
bryancp has joined #ruby-lang
<dominikh>
heh
savage- has quit [Remote host closed the connection]
kvirani has joined #ruby-lang
dreieins has joined #ruby-lang
K0rnflake has joined #ruby-lang
postmodern has joined #ruby-lang
bhrgunatha has quit [Quit: ChatZilla 0.9.88.2 [Firefox 16.0a1/20120614030534]]
kvirani has quit [Remote host closed the connection]
wallerdev has joined #ruby-lang
igotnolegs has joined #ruby-lang
dreieins has quit [Ping timeout: 265 seconds]
qpingu has joined #ruby-lang
andrewhl has joined #ruby-lang
sailias has joined #ruby-lang
robotmay has joined #ruby-lang
rmascarenhas has joined #ruby-lang
ironcamel has quit [Quit: leaving]
ironcamel has joined #ruby-lang
dgs has quit [Ping timeout: 245 seconds]
hinbody has joined #ruby-lang
Z33K|Lux has joined #ruby-lang
Z33K|Lux has quit [Client Quit]
neoesque has joined #ruby-lang
sailias has quit [Quit: Leaving.]
hahuang65 has quit [Quit: Computer has gone to sleep.]
robotmay has quit [Remote host closed the connection]
<youngin>
wish i knew how y'all felt, aint nothing but tag clouds over here
<youngin>
sunshine and app dev in the tropics
umttumt has quit [Remote host closed the connection]
yugui_zzz is now known as yugui
K0rnflake has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
dhruvasagar has joined #ruby-lang
srbartlett has joined #ruby-lang
tommyvyo has joined #ruby-lang
gix has quit [Ping timeout: 240 seconds]
CCD has quit [Remote host closed the connection]
umttumt has joined #ruby-lang
bastiaan has joined #ruby-lang
gix has joined #ruby-lang
yugui is now known as yugui_zzz
yugui_zzz is now known as yugui
rmascarenhas has quit [Ping timeout: 244 seconds]
CCD has joined #ruby-lang
CCD has quit [Client Quit]
rmascarenhas has joined #ruby-lang
gouthamvel has quit [Ping timeout: 244 seconds]
gouthamvel has joined #ruby-lang
Guedes has quit [Read error: Connection reset by peer]
Swimming_Bird has joined #ruby-lang
yugui is now known as yugui_zzz
jxie has quit [Quit: leaving]
carloslopes has joined #ruby-lang
vaelen has quit [Remote host closed the connection]
vaelen has joined #ruby-lang
srbartlett has quit [Remote host closed the connection]
hynkle has joined #ruby-lang
cek has joined #ruby-lang
cek has left #ruby-lang [#ruby-lang]
the-newsman has joined #ruby-lang
cek has joined #ruby-lang
yugui_zzz is now known as yugui
digitalbane has joined #ruby-lang
the-newsman has left #ruby-lang [#ruby-lang]
bryancp has quit [Remote host closed the connection]
dv310p3r has joined #ruby-lang
mistym has quit [Remote host closed the connection]
tcopp has joined #ruby-lang
kaiwren has quit [Quit: kaiwren]
mark_locklear has joined #ruby-lang
Jake232 has joined #ruby-lang
bglusman has joined #ruby-lang
denysonique has quit []
yugui is now known as yugui_zzz
denysonique has joined #ruby-lang
bglusman has quit [Ping timeout: 244 seconds]
bryancp has joined #ruby-lang
neoesque has quit [Quit: Bye!]
slyphon has joined #ruby-lang
stamina has joined #ruby-lang
sandbags has joined #ruby-lang
sandbags has quit [Changing host]
sandbags has joined #ruby-lang
yugui_zzz is now known as yugui
enebo has joined #ruby-lang
charliesome has quit [Read error: Connection reset by peer]
ttilley has joined #ruby-lang
ttilley has quit [Changing host]
ttilley has joined #ruby-lang
__viktor__ has joined #ruby-lang
ioga_wrk has quit [Ping timeout: 244 seconds]
rippa has joined #ruby-lang
yugui is now known as yugui_zzz
sailias has joined #ruby-lang
mistym has joined #ruby-lang
ruurd_ has quit [Quit: Leaving...]
yugui_zzz is now known as yugui
Boohbah has quit [Remote host closed the connection]
Boohbah has joined #ruby-lang
soahccc` is now known as soahccc
bastiaan has quit [Quit: Konversation terminated!]
countdigi has quit [Ping timeout: 244 seconds]
ruby-lang872 has joined #ruby-lang
ioga_wrk has joined #ruby-lang
ruby-lang872 has quit [Client Quit]
outoftime has joined #ruby-lang
heftig has joined #ruby-lang
jkprg has joined #ruby-lang
umttumt has quit [Remote host closed the connection]
<Defusal>
i have found this post in many different places, including the nginx forums, but there are no responses... http://www.ruby-forum.com/topic/3252231
<Defusal>
anyone know how to enable deflate or gzip for files served from nginx using x-accel-redirect?
Facefox has quit [Ping timeout: 248 seconds]
<apeiros_>
Defusal: I'd guess #nginx exists
mytrile has quit [Remote host closed the connection]
<Defusal>
apeiros_, sure does, but just as no one has responded to the post on nginx forums since december last year, no one has responded to my question over there
<Defusal>
so i thought maybe someone here knows, since x-accel-redirect is real useful for ruby web apps
<apeiros_>
…
<apeiros_>
I'd try taking it on to #computers, maybe someone there knows…
<Defusal>
...
<apeiros_>
on a more serious note - escalating to e.g. stackoverflow makes more sense.
<apeiros_>
put out a bounty if necessary
<Defusal>
rack has a x-accel-redirect implementation, maybe i over estimated the amount of ruby developers that use x-accel-redirect
ttilley has quit []
outsmartin has joined #ruby-lang
Facefox has joined #ruby-lang
sockmonk has joined #ruby-lang
ttilley_off is now known as ttilley
msaffitz has joined #ruby-lang
bglusman has joined #ruby-lang
dv310p3r has quit [Quit: Leaving]
Jake232 has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 265 seconds]
apeiros_ is now known as apeiros
apeiros is now known as apeiros__
apeiros__ is now known as shisohan
shisohan is now known as apeiros
apeiros has left #ruby-lang [#ruby-lang]
apeiros_ has joined #ruby-lang
msaffitz has quit [Quit: Computer has gone to sleep.]
andrewhl has joined #ruby-lang
heftig has quit [Quit: leaving]
yugui is now known as yugui_zzz
Facefox has quit [Ping timeout: 260 seconds]
kaiwren has joined #ruby-lang
Facefox has joined #ruby-lang
Facefox has quit [Max SendQ exceeded]
Facefox has joined #ruby-lang
Facefox has quit [Max SendQ exceeded]
Facefox has joined #ruby-lang
jayne_ is now known as jayne
rolfb has quit [Quit: crawling]
__viktor__ has quit [Quit: __viktor__]
wallerdev has joined #ruby-lang
akira989 has joined #ruby-lang
havenn has joined #ruby-lang
Constant_ has joined #ruby-lang
ConstantineXVI has quit [Read error: No route to host]
kaiwren has quit [Quit: kaiwren]
wpaulson has quit [Ping timeout: 244 seconds]
bfreeman has quit [Quit: bfreeman]
dreieins has quit [Ping timeout: 252 seconds]
gouthamvel has quit [Remote host closed the connection]
wpaulson has joined #ruby-lang
gouthamvel has joined #ruby-lang
andrewhl has quit [Remote host closed the connection]
adambeynon has joined #ruby-lang
cek has quit [Quit: жопа диридай диридиридай]
dreieins has joined #ruby-lang
carloslopes has quit [Ping timeout: 265 seconds]
yugui_zzz is now known as yugui
thone has joined #ruby-lang
cldwalker has joined #ruby-lang
jacobwg has joined #ruby-lang
thone_ has quit [Ping timeout: 265 seconds]
riffraff has quit [Quit: This computer has gone to sleep]
markborcherding has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
tr-808 has quit [Remote host closed the connection]
pbjorklu1d has quit [Quit: leaving]
asahi has joined #ruby-lang
tr-808 has joined #ruby-lang
pbjorklund has joined #ruby-lang
tr-808_ has joined #ruby-lang
kitallis has quit [Quit: Computer has gone to sleep.]
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
<asahi>
anyone know how to get the text (without the html) of a Mechanize::Page object
ttilley is now known as ttilley_off
VGoff is now known as VGoff_afk
<asahi>
or do I have to do something like Nokogiri::HTML(page.content).text
robotmay has quit [Remote host closed the connection]
macmartine has joined #ruby-lang
tr-808_ has quit [Ping timeout: 244 seconds]
tr-808 has quit [Ping timeout: 244 seconds]
tr-808 has joined #ruby-lang
Carnage\ has joined #ruby-lang
macmartine has quit [Read error: Connection reset by peer]
wpaulson has quit [Ping timeout: 265 seconds]
tr-808_ has joined #ruby-lang
VGoff_afk is now known as VGoff
macmartine has joined #ruby-lang
dfr|mac has joined #ruby-lang
macmartine has quit [Remote host closed the connection]
jkprg has quit [Quit: jkprg]
macmartine has joined #ruby-lang
imperator has joined #ruby-lang
tr-808 has quit [Ping timeout: 246 seconds]
<imperator>
you can't use BEGIN inside a module now?
<imperator>
module Process; BEGIN{ puts "hello" }; end => works in 1.8, fails in 1.9
tr-808 has joined #ruby-lang
tr-808_ has quit [Ping timeout: 252 seconds]
tr-808_ has joined #ruby-lang
mistym_ has joined #ruby-lang
flowerpot has joined #ruby-lang
tr-808 has quit [Ping timeout: 244 seconds]
msaffitz has joined #ruby-lang
tr-808 has joined #ruby-lang
tr-808_ has quit [Ping timeout: 245 seconds]
tr-808_ has joined #ruby-lang
msaffitz has quit [Client Quit]
nofxx has joined #ruby-lang
nofxx has quit [Changing host]
nofxx has joined #ruby-lang
tr-808 has quit [Ping timeout: 248 seconds]
toretore has quit [Read error: Connection reset by peer]
rippa has quit [Read error: Connection reset by peer]
rippa has joined #ruby-lang
havenn has quit [Remote host closed the connection]
yugui is now known as yugui_zzz
umttumt has joined #ruby-lang
tr-808_ has quit [Ping timeout: 248 seconds]
tr-808_ has joined #ruby-lang
tr-808 has quit [Ping timeout: 240 seconds]
sora_h is now known as s0ra_h
jperry has joined #ruby-lang
tr-808 has joined #ruby-lang
tomb_ has quit [Quit: Computer has gone to sleep.]
jperry has left #ruby-lang [#ruby-lang]
Facefox has joined #ruby-lang
nevynxxx has joined #ruby-lang
jperry2 has quit [Quit: Leaving.]
tr-808_ has quit [Ping timeout: 252 seconds]
tr-808 has quit [Ping timeout: 244 seconds]
brianpWins has quit [Quit: brianpWins]
nevynxxx has quit [Client Quit]
tr-808 has joined #ruby-lang
msaffitz has joined #ruby-lang
tr-808_ has joined #ruby-lang
jperry2 has joined #ruby-lang
fayimora has quit [Ping timeout: 248 seconds]
msaffitz has quit [Client Quit]
tr-808 has quit [Ping timeout: 265 seconds]
tr-808 has joined #ruby-lang
tr-808_ has quit [Ping timeout: 244 seconds]
tr-808_ has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
ruurd has quit [Quit: Leaving...]
tr-808 has quit [Ping timeout: 244 seconds]
tr-808 has joined #ruby-lang
tr-808_ has quit [Ping timeout: 248 seconds]
tr-808_ has joined #ruby-lang
Facefox has quit [Ping timeout: 272 seconds]
fayimora has joined #ruby-lang
Facefox has joined #ruby-lang
<Where_Is_Void>
can anyone tell me why I can't change the values in my struct? - http://pastie.org/4093336
tr-808 has quit [Ping timeout: 252 seconds]
<Where_Is_Void>
I'm trying to insert a new node intp what will be a tree type thing
wmoxam has quit [Quit: leaving]
tr-808 has joined #ruby-lang
tr-808 has quit [Changing host]
tr-808 has joined #ruby-lang
tr-808_ has quit [Ping timeout: 244 seconds]
<apeiros_>
Where_Is_Void: you should paste the error too
<Mon_Ouie>
You used == instead of =
<Mon_Ouie>
s['children'] == ['array with stuff in it', 'lost of stuf I want to put here']
<Where_Is_Void>
oh I'm an idiot
<Where_Is_Void>
I was staring at that for ages
<erikh>
sometimes a fresh pair of eyes is all that's required
d3vic3 has quit [Quit: leaving]
<erikh>
(I missed it too, fwiw)
tr-808_ has joined #ruby-lang
<Where_Is_Void>
that makes me feel better hhaha
wmoxam has joined #ruby-lang
jtoy has joined #ruby-lang
slyphon has quit [Quit: WeeChat 0.3.7]
tr-808 has quit [Ping timeout: 246 seconds]
havenn has joined #ruby-lang
tr-808 has joined #ruby-lang
tr-808_ has quit [Ping timeout: 245 seconds]
tr-808_ has joined #ruby-lang
Facefox has quit [Remote host closed the connection]
havenn has quit [Read error: Connection reset by peer]
Facefox has joined #ruby-lang
Facefox has quit [Max SendQ exceeded]
havenn has joined #ruby-lang
brianpWins has joined #ruby-lang
tomb_ has joined #ruby-lang
Facefox has joined #ruby-lang
Facefox has quit [Max SendQ exceeded]
Hakon|mbp has quit [Quit: Leaving...]
tr-808 has quit [Ping timeout: 245 seconds]
tcopp has quit [Quit: Lost terminal]
tr-808 has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
tr-808_ has quit [Ping timeout: 244 seconds]
tr-808_ has joined #ruby-lang
Swimming_Bird has quit [Quit: Computer has gone to sleep.]
Facefox has joined #ruby-lang
sailias has quit [Ping timeout: 245 seconds]
tr-808 has quit [Ping timeout: 246 seconds]
heftig has joined #ruby-lang
tr-808 has joined #ruby-lang
dreieins has quit [Ping timeout: 245 seconds]
benanne has joined #ruby-lang
workmad3 has quit [Ping timeout: 248 seconds]
qwerxy has quit [Ping timeout: 244 seconds]
francisfish has joined #ruby-lang
dfr|mac has quit [Remote host closed the connection]
digitalbane has left #ruby-lang [#ruby-lang]
<Where_Is_Void>
OK this problem is much stranger. My search method won't return true even when the condition evaluates to true - http://pastie.org/4093485
<Where_Is_Void>
when I do the first search for sam it works
brianpWins has quit [Quit: brianpWins]
brianpWins has joined #ruby-lang
dreieins has joined #ruby-lang
brianpWins has quit [Remote host closed the connection]
carloslopes has joined #ruby-lang
brianpWins has joined #ruby-lang
<erikh>
Where_Is_Void: brenda is a child of sam which is a child of jim
<erikh>
you're not searching deeply enough.
<erikh>
and then you return false if the search succeeds on your recursive searches.
<erikh>
indent your code properly and you'd see that. :)
<Where_Is_Void>
Yea I don't really understand recursion
<Where_Is_Void>
I get the idea but it never works for me in practice
<erikh>
well, you need to practice.
<erikh>
start with something simpler.
<erikh>
and having us debug your code for you is a horrible way to learn, if I may be so frank.
<Where_Is_Void>
Sorry I don't mean to bug you guys
<Where_Is_Void>
I did like factorials and simple recursion exersises
<erikh>
you're not, i'm simply trying to teach you to fish instead of feeding them to you
<Where_Is_Void>
haha fair enough
dreieins has quit [Ping timeout: 244 seconds]
<apeiros_>
proper indentation++
<apeiros_>
you can even get ruby to tell you about improper indents
<apeiros_>
(don't ask me how, I always forget, I think with -W)
<erikh>
I don't think it does it where $-w is true, but maybe on a specific integer
Swimming_Bird has joined #ruby-lang
<Where_Is_Void>
Ok I cleaned up the code, but it still won't return true. I put a puts statement in after testing the names match and it excecutes, but if I try to return true it never works - http://pastie.org/4093535
tcopp has joined #ruby-lang
<Where_Is_Void>
It goes through all the children and prints their names so recursion must be working
<erikh>
ok, well, practice a bit.
<erikh>
like I said, try something smaller/simpler.
lsegal has joined #ruby-lang
<erikh>
work up to that.
<Where_Is_Void>
ok no worries, back to the drawing board :)
<erikh>
try to separate yourself from the goal. it may seem silly, but sometimes it's the best way to learn.
<asahi>
I've got a string that looks like "\xCA" that has the encoding utf8. However, when I call downcase on it, I get ArgumentError: invalid byte sequence in UTF-8. can someone tell me why this is happening?
<asahi>
or rather, what could cause this?
mrgreenfur has joined #ruby-lang
<erikh>
\xCA is a continuation byte
<erikh>
which IIRC is called a code point
<erikh>
but don't hold me to that
<erikh>
either way, you need more bytes yo
<erikh>
for it to be valid utf8
<erikh>
basically anything between \xC0 and \xFF is gonna require extra bytes in UTF8
<erikh>
I may be off by a few bytes but that's close enough for horseshoes
<asahi>
is there a way to strip invalid bytes from a string?
dreieins has joined #ruby-lang
<apeiros_>
erikh: a codepoint is the integer representation of a character
<erikh>
apeiros_: thanks. I wasn't sure about that.
<apeiros_>
asahi: the proper way is to start out not having invalid sequences in your string in the first place. so how come you have them?
<erikh>
asahi: there should be a slurp+rescue pattern you can use to gobble up the bytes and skip over any invalid utf8
pablo_ has joined #ruby-lang
<erikh>
BUT
<erikh>
I don't know what that is, and the other way is much harder.
<apeiros_>
and yes, there are ways. encode accepts additional options to remove them.
<erikh>
oh
<erikh>
well shit
<erikh>
apeiros_++
mattonrails has joined #ruby-lang
<asahi>
apeiros_: I got the string from fetching a website
<apeiros_>
s = "\xCA".force_encoding('binary'); s.encode('utf-8', replace: '') # => ""
<apeiros_>
asahi: then you're probably doing it wrong.
Hakon|mbp has joined #ruby-lang
jtoy has quit [Ping timeout: 246 seconds]
<apeiros_>
if your string contains invalid utf-8 sequences, then maybe it isn't encoded in utf-8 to begin with…
<erikh>
this is the web we're talking about
<erikh>
but I concur
M4g1c5t0rM has joined #ruby-lang
lopac1029 has joined #ruby-lang
jtoy has joined #ruby-lang
<apeiros_>
erikh: true. there's far too many coders who utterly fail at encodings and the result is horribly broken output…
<erikh>
eh, it was my job for the better part of a year to sort out encodings at a very large company
<erikh>
two words: dream weaver
Hakon|mbp has quit [Read error: Connection reset by peer]
Boohbah has quit [Ping timeout: 276 seconds]
<apeiros_>
two words: oh my god!
<erikh>
hahaha
<erikh>
I still don't get a lot of the encoding stuff.
Hakon|mbp has joined #ruby-lang
<apeiros_>
o0
umttumt has quit [Remote host closed the connection]
<erikh>
but yeah, these guys would use the charmap tool in windows and just paste in whatever
<apeiros_>
I don't get why people don't get encodings. it's simply "byte sequence X represents character Y".
<erikh>
well I get that
<erikh>
but all the semantics around it, BOMs, etc
<apeiros_>
BOM is only for utf-16 and higher
<erikh>
right, but they are technically a part of encodings
Boohbah has joined #ruby-lang
<erikh>
utf8 I have a pretty good grip on
<apeiros_>
because then it matters whether "a" is represented by "\x00a" or "a\x00"
<erikh>
but here's a doozy
<asahi>
this is how I'm getting the invalid byte sequence
<erikh>
given an arbitrary string of text, determine if it's us-ascii or cp1251
<apeiros_>
wtf is that uvx param? the picture encoded in the url?
<apeiros_>
erikh: impossible to do reliably
dfr|mac has joined #ruby-lang
<erikh>
apeiros_: you can cheat a little because cp1251 has more printables than us-ascii does
<apeiros_>
erikh: though if cp1251 is a proper extension to ascii, you can just always assume cp1251
<apeiros_>
since then it is a superset
<apeiros_>
erikh: for the fun of it, it's what I did last week
<apeiros_>
write an importer for csv and excel files
<erikh>
ah, you are a masochist
<asahi>
oh, the web page is encoding SHIFT-JIS, which wasn't getting detected I guess
<apeiros_>
and since our users are pretty much computer illiterates, I have to provide a guessing algorithm
<erikh>
asahi: it's not going to
<erikh>
see, your open-uri call isn't going to communicate the encoding to nokogiri
<erikh>
*likely* because it's set in headers.
<asahi>
erikh: guess I need to use something like Mechanize to detect the encoding
<erikh>
right, something like that.
<apeiros_>
erikh: I wanted to use chardet, but first I was hold up by 3 versions/forks of the gem not working, and then by it not being well suited for my task.
<erikh>
Net::HTTP or RestClient would probably work flawlessly here too
<erikh>
(and would probably be a lot simpler)
<erikh>
unless you need to walk a ton of pages
<erikh>
that's what mechanize is good at.
<apeiros_>
erikh: for the moment I employ a very simplistic algorithm. I rule out charsets by spotting unmapped characters (macroman has all 256 possible values occupied, win1252 doesn't)
<apeiros_>
and then I do a simple count on a couple of specific chars. simply because I know their likeliness to occur is higher than those of the others.
<apeiros_>
but I have an easier game as only 3 charsets are to be expected - utf-8, win1252 and macroman.
<erikh>
what do you need macroman for?
<apeiros_>
our mac users
<erikh>
er? are you on system 7 or something?
<apeiros_>
stupid excel for mac defaults to macroman on csv exports
<apeiros_>
seriously, m$ are fucktards about encodings
<apeiros_>
also consider vcards - the standard *mandates* utf-8. but allows other encodings to be specified. yet outlook only, and only accepts win1252, no matter what.
<apeiros_>
fucktards, really.
<erikh>
eh it's years of being told nobody can touch you that fostered that
<erikh>
there's some good tech in there still.
<apeiros_>
also their "comma separated values" are separated by semicolons…
dfr|mac has quit [Read error: Connection reset by peer]
dfr|mac has joined #ruby-lang
<apeiros_>
"The ource string for which the client wants to detect the code page." - never trust docs with typos :-p
Swimming_Bird has quit [Quit: Computer has gone to sleep.]
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
<erikh>
couldn't sleep last night, got up at 3am, it's 11am now
<apeiros_>
erikh: I'm really curious as to how well my approach will work out for our use-case…
<erikh>
I'm pretty sleepy, and will be at work until 3-4pm
<apeiros_>
I mean I'm auto-detecting pretty much everything
<erikh>
you should push to standardize
<apeiros_>
and our "customers" sadly do about everything that nobody would ever think of…
<apeiros_>
impossibru!
<erikh>
oh, outside
<erikh>
yeah
<apeiros_>
I mean we do provide them with templates and tell them what's mandatory
<erikh>
couldn't you set the encoding in the templates?
<apeiros_>
not for csv. and for excel it's luckily part of the metadata.
<erikh>
ah yeah.
<apeiros_>
but I'm fully prepared that at max. 70% will follow that and will be utterly upset if their stuff can't be imported :)
futurechimp has quit [Quit: Leaving]
butchanton has joined #ruby-lang
<apeiros_>
you should see our database… I mean they manage to put *notes* into fields for phone numbers
<apeiros_>
or gender into the name field
<apeiros_>
it's seriously incredibly how much they're capable to fuck up data entry.
<apeiros_>
*incredible
<apeiros_>
(those input forms are not from us, I'm working on a more advanced way for data entry, which *hopefully* helps reduce the bullshit level)
<erikh>
datatables.net? :)
<zzak>
erikh: have any ec2 running in N.Virginia?
gouthamvel has joined #ruby-lang
gouthamvel has left #ruby-lang [#ruby-lang]
macmartine has quit [Quit: macmartine]
<asahi>
so I have a Mechanize::Page and when I call page.content, the resulting string doesn't have the same encoding as page. Guess I need to check the encoding and then force it?
carloslopes has quit [Ping timeout: 240 seconds]
<asahi>
it seems that page.content is getting the encoded incorrectly as ASCII
<darix>
asahi: which ruby version?
<asahi>
1.9.3
jarred has joined #ruby-lang
<asahi>
darix: ^^
<erikh>
zzak: tons
<erikh>
we weren't affected though
<apeiros_>
erikh: we actually use a widget like that
<apeiros_>
but I meant data entry
<erikh>
aye
<apeiros_>
like where it tells you that you probably chose the wrong gender. that the first name is probably misspelled etc.
<erikh>
you could probably make datatables do it
<erikh>
but it might not be worth the effort.
<apeiros_>
that the phone number is not valid, the email address etc. etc. (the current input form does very very little validation)
<erikh>
it can do ajax callbacks on form input and so forth
<apeiros_>
mine is more sophisticated :-p
<apeiros_>
still want to opensource it :-(
Swimming_Bird has joined #ruby-lang
djinni`_ has joined #ruby-lang
schroedinbug has joined #ruby-lang
tr-808 has quit [Quit: leaving]
saLOUt has joined #ruby-lang
<zzak>
erikh: i cant get unicorn to boot now, but everything else is okay
<erikh>
zzak: sorry :(
qpingu has joined #ruby-lang
<zzak>
i can get thin/mongrel/webrick to boot but not proxy through nginx
<zzak>
same problem on a few instances
imperator has quit [Ping timeout: 244 seconds]
tr-808_ is now known as tr-808
dfr|mac has quit [Remote host closed the connection]
achiu has joined #ruby-lang
fgomez has joined #ruby-lang
<zzak>
pretty pissed off about it
zmack has quit [Remote host closed the connection]
<drbrain>
to match Mechanize::File and Mechanize::Download, #content will always be ASCII-8BIT
<drbrain>
pabs: ironically, this page is full of replacement characters for me
<apeiros_>
pabs: haha, got to love that. they state it was utf-8 and yet have invalid sequences in tha tpage
<pabs>
drbrain: same
<apeiros_>
anyway, it says it's outdated and from the archive
<pabs>
it's not technically bayesian, but it is a classification scheme based on the content
<pabs>
(in addition to the declared content type)
<apeiros_>
I think the chardet gems use that algorithm
yxhuvud has quit [Ping timeout: 245 seconds]
andrewhl has quit [Remote host closed the connection]
<imperator>
dang, somehow this facebook game doesn't like programmatic get requests via mechanize
<imperator>
or rather, it seems to ignore them
<erikh>
try spoofing the user agent yet?
bglusman_ has quit [Remote host closed the connection]
<imperator>
maybe i need to do that
<erikh>
likely.
<drbrain>
mech.user_agent_alias = 'Mac Safari'
bglusman has joined #ruby-lang
sockmonk has quit [Ping timeout: 264 seconds]
<imperator>
damn, that didn't do it
<drbrain>
zzak: ping
stamina has joined #ruby-lang
<imperator>
they must be checking for something else
soahccc is now known as soahccc`
<apeiros_>
imperator: see whether the game works in a browser with js turned off
<imperator>
apeiros_, it's just a get request
<apeiros_>
imperator: programmatically maybe…
<imperator>
basically, if i put a url in the browser manually i add a friend to my "elite guard"
sailias has joined #ruby-lang
<imperator>
(this is Castle Age, btw)
sailias has quit [Client Quit]
<apeiros_>
did you check what it does? it may well do more than just that get request in the browser…
<apeiros_>
but anyway, just copy all the headers that your browser sent
bglusman has quit [Ping timeout: 265 seconds]
<apeiros_>
(safari lets you view them, I'd bet chrome and ff do too)
<imperator>
hm, looking at the dev pane on safari, not sure how to tell what headers i sent
<apeiros_>
imperator: in the newer ones they hid it, also you need to redo the request :-S
<apeiros_>
moment…
<apeiros_>
it's in the network pane
<apeiros_>
you click on one of the items
<apeiros_>
you then get a different view, where you see request and response headers
<apeiros_>
(that's as of safari 5.1 iirc, in 5.0 it was better IMO)
<apeiros_>
it's two tabs, it might default on the content tab instead of the headers tab
<imperator>
ok, looking, tons of stuff on left hand side
qpingu has quit [Quit: Leaving.]
<apeiros_>
you can filter
<apeiros_>
on the bottom
akira989 has quit [Remote host closed the connection]
<apeiros_>
you likely want 'documents' (I'm on a german system, so I may miss-guess the translated labels)
qpingu has joined #ruby-lang
<asahi>
drbrain: I may be confused but Mechanize::Page#encoding seemed to call the encoding correctly. However, if I did Mechanize::Page.content, I got a string that was not of the same encoding.
<drbrain>
asahi: correct
<drbrain>
use page.parser.to_s to get a string of the correct encoding