apeiros changed the topic of #ruby-lang to: Nick registration required to talk || Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com
Raynes_ has left #ruby-lang [#ruby-lang]
jiuweigui has quit [Quit: iQuit!]
joonty has joined #ruby-lang
enebo has quit [Quit: enebo]
supfoo has joined #ruby-lang
ldnunes has joined #ruby-lang
imperator has quit [Quit: Valete!]
tylersmith has quit [Remote host closed the connection]
enmand has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<drbrain>
because in ruby @ has a different meaning
charlespeach has joined #ruby-lang
<zzak>
its like caller, right?
sevvie has joined #ruby-lang
<drbrain>
in perl? I don't know
<drbrain>
in ruby it's just another instance variable
<drbrain>
$@ is the exception backtrace
<zenspider>
zzak: perl doesn't have $_ and @_ either... it has _
<zzak>
@_ are like arguments in perl
<zenspider>
no...
<zenspider>
the sigils just say what context to use the variable in
<zzak>
oh right, @ is just the sigil
<zenspider>
scalar is $_ and array is @_
<zenspider>
terribly messy
<zzak>
so `shift` is the same as $_?
<zzak>
sub foo { my $bar = shift; } is the same as sub foo { my $bar = $_; }
<zenspider>
in perl? I think shift defaults to @_ as its arg... or something
anjen has joined #ruby-lang
<zenspider>
fuck. how do I tell whether I'm getting my newly built racc C ext, or if I'm picking up the one in ruby? source_location is nil for C shit
<drbrain>
$".grep(/bundle/)
Profeit has quit [Quit: Page closed]
<zenspider>
there's a C constant for the version... I'm picking up the built in... :(
<anjen>
Hi folks, are there any Firefox "gotchas" asscoiated with form.selects? We have a customer who's seeing the select value revert to its default upon form submission. I've googled, but either am not using the right search or it's a new ?bug? (v25 Firefox)
<zzak>
zenspider: there are 2
<zenspider>
this REALLY sucks. I wish ruby would actually embrace rubygems instead of this bullshit clusterfuck
<drbrain>
anjen: try #ror
<zzak>
i think one in ext/cparse and one in lib/somewhere
<anjen>
ty drbrain
<r0bglees0n>
zenspider: it's only nil for internal MRI functions, or all C functions?
<drbrain>
r0bglees0n: all C functions
<r0bglees0n>
ah
tkuchiki has joined #ruby-lang
<zzak>
zenspider: yeah lib/racc/info.rb and cparse
<zzak>
why there are 2 i hnfc
ledestin has quit [Ping timeout: 264 seconds]
<zenspider>
hrm... hoe isn't setting up the pathing correctly for the build extension I guess
mannyt has joined #ruby-lang
<zenspider>
no. fuck. it is.
<zenspider>
it's in lib/racc/racc.bundle, no?
<drbrain>
that's where rake-compiler should be installing it
thepumpkin has quit [Remote host closed the connection]
<zenspider>
why am I not picking it up?
<zenspider>
grrr
<zzak>
its in the Manifest right?
<zenspider>
heh. no... the ruby code was requiring racc/cparse. which we just renamed. :P
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
mistym has quit [Remote host closed the connection]
jackhammer2022 has quit [Quit: Computer has gone to sleep.]
anjen has quit [Quit: anjen]
<zzak>
lol
<zenspider>
aaand the Init_ function needs ranaming...
<zenspider>
this rename part might be a fucking mistake
<drbrain>
ooooh right
<zenspider>
/Users/ryan/Work/git/racc/lib/racc/parser.rb:200:in `initialize': no implicit conversion from nil to integer (TypeError)
pothibo has joined #ruby-lang
<zenspider>
not even sure what that is... but the backtrace is worthless
cnivolle_ has quit [Remote host closed the connection]
<zenspider>
prolly one fo the NUM2LONGs
bzalasky has quit [Ping timeout: 246 seconds]
<zzak>
it uses this weird intern
sonne has quit [Quit: Leaving]
<zzak>
VALUE Racc, Parser; ID id_racc = rb_intern("Racc");
kitak has quit [Remote host closed the connection]
<drbrain>
you mean the constant Racc? it's defined by the file that requires the C extension
outoftime has joined #ruby-lang
<drbrain>
heh, that should probably just be lines 841 and 842
<zzak>
its required before the constant is defined in the ruby lib
jsullivandigs has quit [Remote host closed the connection]
<zzak>
yes
kitak has joined #ruby-lang
jsullivandigs has joined #ruby-lang
<drbrain>
rb_define_module will DTRT for you
<zzak>
i would submit a patch, but i dont want zenspider to asplode
<zenspider>
some of this code is ancient and indecipherable
thepumpkin has quit [Ping timeout: 240 seconds]
ecnalyr has joined #ruby-lang
<zenspider>
I wonder if they were working on it being built into ruby at one point? otherwise the first half of the if stmt doesn't make sense, right?
bastilian has joined #ruby-lang
GaelanAintAround is now known as Gaelan
mark06 has joined #ruby-lang
Gaelan is now known as GaelanAintAround
<Technodrome>
can self.something be used on instance variables?
jsullivandigs has quit [Ping timeout: 245 seconds]
<zzak>
zenspider: most of it is between 10-15 years old
lun__ has joined #ruby-lang
<zenspider>
yup
<zzak>
i want to redo part of my stdlib talk and use it
<zenspider>
Technodrome: self.something is always a method call... if there is an attr_accessor then it'll access the ivar
<zzak>
maybe in australia
stardiviner has joined #ruby-lang
ecnalyr has quit [Ping timeout: 245 seconds]
kek has joined #ruby-lang
kek has quit [Read error: Connection reset by peer]
<mark06>
can anyone help achieving the following? given a specific date/time, location and timezone I want to know if the timezone is correct. In other words, I want to generalize a bash script for mingw msys, and since msys does not have timezone data, I'm willing to port the script to ruby.
kek has joined #ruby-lang
<zenspider>
god I'm stale on the C side... what's the safe num2long?
lun__ has quit [Ping timeout: 272 seconds]
earthquake has quit [Quit: earthquake]
<drbrain>
NUM2LONG raises an exception if the value won't fit in a long
<yorickpeterse>
whitequark: and how does that work with multi-threaded servers?
niknvg has joined #ruby-lang
niknvg has quit [Excess Flood]
<whitequark>
yorickpeterse: well, it does?
cored has quit [Ping timeout: 240 seconds]
<yorickpeterse>
hmm
<yorickpeterse>
Hm, I guess if you set it before a request that should be ok
<yorickpeterse>
since one thread can only do one req at once
<whitequark>
before a request?
<whitequark>
are you dumb?
<yorickpeterse>
errr, using one of dem before filters
bastilian has quit [Quit: Leaving...]
<whitequark>
I just said it is hthread-localsafe
<whitequark>
argh, thread-safe.
elia has joined #ruby-lang
<yorickpeterse>
are you dumb? :>
<yorickpeterse>
either way, ta
lele|w has joined #ruby-lang
soba has quit [Ping timeout: 272 seconds]
mikecmpbll has quit [Ping timeout: 245 seconds]
mdedetrich has quit [Quit: Computer has gone to sleep.]
kurko_ has joined #ruby-lang
mikecmpbll has joined #ruby-lang
Johz has joined #ruby-lang
Technodrome has quit [Quit: Technodrome]
GaelanAintAround is now known as Gaelan
bastilian has joined #ruby-lang
sjltaylo_ has joined #ruby-lang
scampbell has joined #ruby-lang
jsullivandigs has joined #ruby-lang
julweber has joined #ruby-lang
_AJ has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
peterc has quit [Read error: Connection reset by peer]
peterc has joined #ruby-lang
peterc has quit [Remote host closed the connection]
jsullivandigs has quit [Ping timeout: 248 seconds]
dingus_khan has quit [Remote host closed the connection]
dingus_khan has joined #ruby-lang
_AJ has quit [Client Quit]
hogeo has quit [Remote host closed the connection]
Technodrome has joined #ruby-lang
hogeo has joined #ruby-lang
dingus_khan has quit [Ping timeout: 264 seconds]
hogeo has quit [Ping timeout: 272 seconds]
apeiros has joined #ruby-lang
outoftime has joined #ruby-lang
michael_mbp is now known as zz_michael_mbp
x0f has quit [Ping timeout: 245 seconds]
ikrima has quit [Quit: Computer has gone to sleep.]
outoftime has left #ruby-lang [#ruby-lang]
x0f has joined #ruby-lang
michd is now known as MichD
x0f has quit [Ping timeout: 240 seconds]
sjltaylo_ has quit [Remote host closed the connection]
x0f has joined #ruby-lang
hotpancakes has joined #ruby-lang
enebo has joined #ruby-lang
lun__ has joined #ruby-lang
jithu_ has quit [Ping timeout: 240 seconds]
hotpancakes has quit [Ping timeout: 240 seconds]
enmand has quit [Ping timeout: 272 seconds]
Gaelan is now known as GaelanAintAround
lun__ has quit [Ping timeout: 246 seconds]
enmand has joined #ruby-lang
jithu has joined #ruby-lang
symm- has quit [Ping timeout: 246 seconds]
yfeldblum has joined #ruby-lang
zz_michael_mbp is now known as michael_mbp
* imperator
tries to get clang installed on winders
postmodern has quit [Quit: Leaving]
retro|cz has quit [Ping timeout: 248 seconds]
benlovell has quit [Ping timeout: 246 seconds]
Technodrome has quit [Quit: Technodrome]
[spoiler] has quit [Ping timeout: 246 seconds]
flip_digits has joined #ruby-lang
blackcoffee89 has joined #ruby-lang
Pupeno_ has joined #ruby-lang
MaddinXx has quit [Remote host closed the connection]
MaddinXx_ has joined #ruby-lang
mikecmpbll has quit [Ping timeout: 240 seconds]
Pupeno has quit [Ping timeout: 245 seconds]
Pupeno_ has quit [Ping timeout: 248 seconds]
mikecmpbll has joined #ruby-lang
Vendethi_ has quit [Remote host closed the connection]
benlovell has joined #ruby-lang
<maloik>
where's inkjet ::<
<yorickpeterse>
in a printer
thepumpkin has joined #ruby-lang
Vendethi_ has joined #ruby-lang
cnivolle has joined #ruby-lang
mannyt has joined #ruby-lang
h_kon has quit [Remote host closed the connection]
<imperator>
he got a new nick ;)
<lianj>
yorickpeterse: wanted to say it gets old, but doesn't
h_kon has joined #ruby-lang
<yorickpeterse>
he recently got a firmware update
hotpancakes has joined #ruby-lang
lacrosse_ has joined #ruby-lang
h_kon has quit [Ping timeout: 240 seconds]
lacrosse has quit [Ping timeout: 256 seconds]
jithu has quit [Quit: Mother, did it need to be so high?]
slyphon has joined #ruby-lang
hotpancakes has quit [Ping timeout: 246 seconds]
<fbernier>
Is there a way to .map on a colelction and compare the current item against the resulting collection of the .map as of now
nigerianceo has joined #ruby-lang
kurko_ has quit [Ping timeout: 272 seconds]
blackcoffee89 has quit [Ping timeout: 248 seconds]
kurko_ has joined #ruby-lang
<lianj>
fbernier: if map doesn't fit just use each and build what you want
<canton7>
inject ?
dennus has quit []
<lianj>
inject([]) you mean?
<fbernier>
yeah most likely inject([]). Looking into it. Thanks.
<lianj>
fbernier: i would do each instead of raping inject
<canton7>
or each_with_object, which may be more suited
GaelanAintAround is now known as Gaelan
blackcoffee89 has joined #ruby-lang
fuhgeddaboudit has joined #ruby-lang
blackcoffee89 has quit [Client Quit]
yfeldblum has quit [Read error: Connection reset by peer]
nathanstitt has joined #ruby-lang
jsullivandigs has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 240 seconds]
Vendethi_ has quit [Remote host closed the connection]
Gaelan is now known as GaelanAintAround
lacrosse_ has quit [Ping timeout: 256 seconds]
yalue has joined #ruby-lang
ledestin has quit [Quit: ledestin]
VTLob has joined #ruby-lang
micalexander has quit [Remote host closed the connection]
jsullivandigs has quit [Ping timeout: 264 seconds]
micalexander has joined #ruby-lang
smashwilson has joined #ruby-lang
bantic has joined #ruby-lang
datanoise has joined #ruby-lang
deception has joined #ruby-lang
micalexander has quit [Ping timeout: 248 seconds]
retro|cz has joined #ruby-lang
smashwilson1 has joined #ruby-lang
slyphon has quit [Ping timeout: 245 seconds]
elia has quit [Quit: Computer has gone to sleep.]
tomzx_mac has quit [Ping timeout: 264 seconds]
smashwilson has quit [Ping timeout: 246 seconds]
bf4 has joined #ruby-lang
jg has quit [Quit: Leaving]
Pupeno has joined #ruby-lang
Pupeno has joined #ruby-lang
Pupeno has quit [Changing host]
slyphon has joined #ruby-lang
ebetancourt has joined #ruby-lang
smashwilson1 has quit [Read error: Connection reset by peer]
_mjenkins has joined #ruby-lang
<maloik>
imperator: what where who :o
snarfmason has quit [Ping timeout: 265 seconds]
<imperator>
maloik, the artist formerly known as injekt is now lianj
ikrima has joined #ruby-lang
smashwilson has joined #ruby-lang
<imperator>
slyphon, 'sup
<maloik>
lianj: WHATS WITH THE DECEPTION
<deception>
you called
<maloik>
rofl!
<maloik>
wait, is there someone here who's named that or did you just change your nickname.... i need to sort out which messages im showing in irssi clearly
Pupeno has quit [Ping timeout: 264 seconds]
<deception>
nah that's my name and I got a pop up notification, thought I'd say hey :)
enmand has quit [Ping timeout: 272 seconds]
<maloik>
hahaha good stuff
<maloik>
there should have my settings in orde
<maloik>
I hope
enmand has joined #ruby-lang
ikrima has quit [Quit: Computer has gone to sleep.]
lun__ has joined #ruby-lang
elia has joined #ruby-lang
ccc has joined #ruby-lang
jsullivandigs has joined #ruby-lang
CaptainJet has joined #ruby-lang
jsullivandigs has quit [Remote host closed the connection]
|jemc| has joined #ruby-lang
jsullivandigs has joined #ruby-lang
hotpancakes has joined #ruby-lang
bastilian has quit [Remote host closed the connection]
slyphon has quit [Ping timeout: 245 seconds]
digs has joined #ruby-lang
dddtest_2f250 has joined #ruby-lang
MaddinXx_ has quit [Read error: Connection reset by peer]
digs is now known as Guest38265
Guest38265 has quit [Remote host closed the connection]
MaddinXx_ has joined #ruby-lang
MaddinXx_ has quit [Remote host closed the connection]
slyphon has joined #ruby-lang
jsullivandigs has quit [Read error: Connection reset by peer]
Vendethi_ has joined #ruby-lang
jsullivandigs has joined #ruby-lang
davidae_ has quit [Remote host closed the connection]
hotpancakes has quit [Ping timeout: 264 seconds]
michael_mbp is now known as zz_michael_mbp
snarfmason has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Remote host closed the connection]
ikrima has joined #ruby-lang
<zzak>
lianj is not lee
<lianj>
ofc not
shinnya has joined #ruby-lang
rippa has joined #ruby-lang
<maloik>
oh
<maloik>
more confusion wat wat
slyphon has quit [Ping timeout: 245 seconds]
TheMoonMaster has quit [Excess Flood]
1JTAA6DSK has joined #ruby-lang
TheMoonMaster has joined #ruby-lang
1JTAA6DSK has quit [K-Lined]
verto has quit [Ping timeout: 272 seconds]
vpretzel has joined #ruby-lang
ikrima has quit [Quit: Computer has gone to sleep.]
<[spoiler]>
I'm such a maverick. I am outside the cycle
<[spoiler]>
or, stuck in it, depends how you look at it
tylersmith has quit [Remote host closed the connection]
michael_mbp is now known as zz_michael_mbp
<coca_rails>
l
tylersmith has joined #ruby-lang
MrZYX|off is now known as MrZYX
<coca_rails>
Hello room, I'm new to ruby and would love to just chat with someone who's interested lol. (Kinda new to IRC as well, so pardon any newbie stuff i do)
<imperator>
welcome to ruby coca_rails
hotpancakes has joined #ruby-lang
<imperator>
(btw, if you're looking for a rails channel, it's #rubyonrails)
<whitequark>
imperator: lol, three top comments are about his footer
symm- has joined #ruby-lang
<coca_rails>
Thank you havenwood
<coca_rails>
thank you imperator
<[spoiler]>
Yee, welcome coca_rails :D
natevick has quit [Quit: natevick]
<coca_rails>
Lol
<coca_rails>
my last username was lizard_ick and before that it was slurpee_poo
metus_violarium has joined #ruby-lang
<[spoiler]>
imperator: it sounds to me like that person is just bad at javascript. I know that some fo these things /can/ be annoying, but if you don't like the language don't fucking use it. It's like you keept eating food you don't like and keep complaining about it. Why? Just *why*
stunthamster has quit [Ping timeout: 245 seconds]
<[spoiler]>
coca_rails: lizard_ick is giving me odd mental imagery
<[spoiler]>
why did I use /can/ i meant *can*
a1ph4g33k has joined #ruby-lang
<imperator>
[spoiler], maybe you wanted to avoid too much backtracking ;)
cnivolle_ has quit [Remote host closed the connection]
<imperator>
regex humor is best humor
<[spoiler]>
LOL
<coca_rails>
LOL
<imperator>
[spoiler], yeah, not really sure why people get so worked up about it; maybe he was forced to use it against his will?
<imperator>
i can speak from experience, that willl make you hate just about any language that you don't know
MaddinXx_ has joined #ruby-lang
rickhull has joined #ruby-lang
<[spoiler]>
imperator: Oh I know that feeling, but I try not to judge a language
<[spoiler]>
imperator: I mean, sometimes I can't help it. I proclaim Ruby as awesome and C as *please no segfaults this time*
mrpot4to_ has quit [Read error: Connection reset by peer]
nisstyre has joined #ruby-lang
specialblend has quit [Quit: specialblend]
benlovell has quit [Ping timeout: 245 seconds]
<workmad3>
[spoiler]: many people get forced into JS due to browsers
<[spoiler]>
workmad3: those people can't deal with browsers, then :P
<[spoiler]>
Well, if they don't like JS, I mean
wallerdev has joined #ruby-lang
micalexander has joined #ruby-lang
mrpot4to_ has joined #ruby-lang
solars has quit [Ping timeout: 272 seconds]
Marco__ has joined #ruby-lang
Marco__ has left #ruby-lang [#ruby-lang]
hotpancakes has quit [Remote host closed the connection]
tbuehlmann has quit [Remote host closed the connection]
arBmind1 has quit [Quit: Leaving.]
hotpancakes has joined #ruby-lang
tylersmith has quit [Read error: Connection reset by peer]
tylersmith has joined #ruby-lang
micalexa_ has joined #ruby-lang
micalexander has quit [Read error: Connection reset by peer]
stamina has joined #ruby-lang
lfox has joined #ruby-lang
metus_violarium has quit [Quit: Konversation terminated!]
metus_violarium has joined #ruby-lang
hotpancakes has quit [Ping timeout: 246 seconds]
saarinen has joined #ruby-lang
ecnalyr has quit [Remote host closed the connection]
coca_rails has quit [Remote host closed the connection]
workmad3 has quit [Read error: Operation timed out]
coca_rails has joined #ruby-lang
MichD is now known as michd
metus_violarium has quit [Quit: Konversation terminated!]
smashwilson has joined #ruby-lang
heath has quit [Quit: No Ping reply in 180 seconds.]
metus_violarium has joined #ruby-lang
heath has joined #ruby-lang
kith has joined #ruby-lang
bantic has joined #ruby-lang
sulo has joined #ruby-lang
coca_rails has quit [Ping timeout: 272 seconds]
metus_violarium has quit [Client Quit]
metus_violarium has joined #ruby-lang
kek has joined #ruby-lang
metus_violarium has quit [Client Quit]
metus_violarium has joined #ruby-lang
metus_violarium has quit [Client Quit]
metus_violarium has joined #ruby-lang
coca_rails has joined #ruby-lang
ecnalyr has joined #ruby-lang
hotpancakes has joined #ruby-lang
kek has quit [Remote host closed the connection]
<coca_rails>
Anyone here from the dc area?
sevvie has quit [Ping timeout: 246 seconds]
nigerianceo has quit []
<cout>
occasionally I hear from the dc area, does that count?
<pothibo>
@foo can be a class variable if you declare it inside the ClassMethods module...
<Mon_Ouie>
No, it can't
<Mon_Ouie>
It can be an instance variable on a class at best
<pothibo>
Hmm
<Technodrome>
i see
<Mon_Ouie>
object.foo is always a method call. Having object = self is just the same as any other case.
<Mon_Ouie>
When you are in the class body (class Foo; …; end), self is the class so self.foo results in calling a method on the class
slyphon has quit [Ping timeout: 245 seconds]
relix has joined #ruby-lang
<Mon_Ouie>
When you are in an instance method body (class Foo; def bar; …; end; end), self is an instance of your class and so self.foo will call foo on that same instance
shaptseva has quit [Remote host closed the connection]
nisstyre has quit [Quit: Leaving]
ledestin has joined #ruby-lang
coca_rails has joined #ruby-lang
TheMoonMaster has quit [Quit: Later!]
relix has joined #ruby-lang
deception has quit [Quit: Goodbye]
TheMoonMaster has joined #ruby-lang
vpretzel has quit [Quit: Adios!]
achru has joined #ruby-lang
julweber has joined #ruby-lang
julweber has quit [Ping timeout: 264 seconds]
dingus_khan has joined #ruby-lang
yfeldblum has joined #ruby-lang
jerrytgarcia has quit [Quit: WeeChat 0.4.2]
mistym has quit [Remote host closed the connection]
ecnalyr has joined #ruby-lang
cnivolle has joined #ruby-lang
ledestin has quit [Quit: ledestin]
ecnalyr has quit [Ping timeout: 245 seconds]
mistym_lunch is now known as mistym
cnivolle has quit [Remote host closed the connection]
julweber has joined #ruby-lang
achru has quit []
pkrnj has quit [Quit: Computer has gone to sleep.]
julweber has quit [Ping timeout: 246 seconds]
hahuang65 has quit [Remote host closed the connection]
hahuang65 has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
hotpancakes has joined #ruby-lang
carbo_ has quit [Ping timeout: 250 seconds]
hotpancakes has quit [Read error: Connection reset by peer]
hotpancakes has joined #ruby-lang
zz_michael_mbp is now known as michael_mbp
slyphon_ has quit [Ping timeout: 245 seconds]
<coca_rails>
Hello
<coca_rails>
A question for you Mac users regarding the Messages app. this is annoying me.. Any way to turn off the sound when i SEND a message?
<coca_rails>
i only want an audio notification when I receive a message.
spuk has quit [Read error: Operation timed out]
nathanstitt has quit [Quit: I growing sleepy]
dddtest_2f250 has quit [Remote host closed the connection]
<drbrain>
coca_rails: try: ⌘, General tab, uncheck Play sound effects
<drbrain>
coca_rails: then enable sounds for Messages in Notification Center
<drbrain>
I don't know if that will do what you want, I hate sound effects
michael_mbp is now known as zz_michael_mbp
simoz has joined #ruby-lang
<coca_rails>
Let me try it
<coca_rails>
Thanks
ebetancourt has joined #ruby-lang
nathanstitt has joined #ruby-lang
<coca_rails>
Didnt work! ahh i hate this
<drbrain>
sorry ☹
<coca_rails>
I;ll deal with no sounds.
ledestin has joined #ruby-lang
smashwilson has quit [Quit: Leaving.]
Scaber has joined #ruby-lang
TheMoonMaster has quit [Excess Flood]
Scaber has quit [Client Quit]
nisstyre has joined #ruby-lang
nathanstitt has quit [Ping timeout: 246 seconds]
TheMoonMaster_ has joined #ruby-lang
Scader has quit [Ping timeout: 245 seconds]
nathanstitt has joined #ruby-lang
dingus_khan has quit [Remote host closed the connection]
dingus_khan has joined #ruby-lang
yalue has quit [Quit: Leaving]
dingus_khan has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby-lang
vlad_sta_ has quit [Ping timeout: 246 seconds]
cnivolle has joined #ruby-lang
adambeynon has joined #ruby-lang
vlad_sta_ has joined #ruby-lang
yfeldblum has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 248 seconds]
enmand has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ecnalyr has joined #ruby-lang
datanoise has quit [Ping timeout: 264 seconds]
priodev has quit [Ping timeout: 264 seconds]
slyphon_ has joined #ruby-lang
toretore has quit [Quit: Leaving]
ebetancourt has quit [Read error: Operation timed out]
joonty has quit [Quit: WeeChat 0.3.8]
workmad3 has joined #ruby-lang
smashwilson has joined #ruby-lang
ikrima has joined #ruby-lang
sepp2k1 has joined #ruby-lang
sepp2k has quit [Ping timeout: 240 seconds]
smashwilson1 has joined #ruby-lang
smashwilson has quit [Ping timeout: 246 seconds]
priodev has joined #ruby-lang
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
NemesisD has joined #ruby-lang
<NemesisD>
anyone know how i could scan a string and find the location of characters that are making its encoding invalid?
<apeiros>
that would depend entirely on the encoding
slyphon_ has quit [Ping timeout: 245 seconds]
hotpancakes has quit [Ping timeout: 240 seconds]
<NemesisD>
i don't know what the actual encoding of the file is but ruby interpreted the string as utf-8
<apeiros>
wrong
<apeiros>
ruby does not interpret as string as something
<NemesisD>
ok well when i read the file the encoding was set to utf-8
<apeiros>
it uses the encoding you tell it the string should have
<NemesisD>
ok so that must be the default
skade has joined #ruby-lang
<mistym>
NemesisD: Simple/dumb method would be to encode it to something else with :invalid => :replace and a unique replacement character and check the indices of the replacement characters, though that doesn't tell you much
slyphon_ has joined #ruby-lang
<apeiros>
if you just need it for manual inspection, you can transcode it to utf-16 with what mistym said
<apeiros>
"something else" won't do since not all encodings define all chars unicode defines. utf-16 does.
skade has quit [Client Quit]
<NemesisD>
actually i should rephrase this: my non-technical team has files with invalid utf-8 chars in it. i need to recommend to them a tool so they can see those bad chars and deal with them
<apeiros>
better approach would be to figure out what encoding your input is and read it with the :encoding option set properly.
<apeiros>
NemesisD: are you sure your team actually has utf-8 encoded files?
<whitequark>
apeiros: any unicode variant defines all characters..
<NemesisD>
apeiros: i have no idea. they are *supposed* to be utf-8 files but they are csv files from screen scrapers that we had outsourced
<apeiros>
whitequark: yes. which is why utf-8 -> utf-16, and not utf-8 -> "some encoding"
<apeiros>
whitequark: it's a silly workaround for rubys inability to replace invalid chars in a string without going through .encode
bastilian has joined #ruby-lang
<whitequark>
ah, right
<apeiros>
I think 2.1 adds a proper method for that
<whitequark>
2.0 (or 2.1?) is supposed to fix that
<NemesisD>
which means that it is usally 1 or 2 specific chars that are invalid in a file, like a fancy double quote or something
<apeiros>
2.0 sadly not yet :(
<NemesisD>
our rails app barfs when trying to parse the csv so i need to give them an editor or something where they can deal with those chars. they are using notepad which seems to eat/hide invalid chars
<NemesisD>
vim shows the bad chars in a different color sometimes but i have no way to search and replace them and that team doesn't know vim
<mistym>
NemesisD: Maybe it's not unicode at all, but something like, e.g., iso-8859-1?
pkrnj has joined #ruby-lang
<NemesisD>
mistym: could very well be. i'd bet money its whatever the default is for VB.NET in Pakistan
<NemesisD>
file says Non-ISO extended-ASCII text, with very long lines, with CRLF line terminators
ldnunes has joined #ruby-lang
<NemesisD>
as i understand it it is unlikely the people writing the scraper understand encoding and will be able to fix this on their end, so at the very least i need to figure out a way for non-technical users to see and correct invalid chars in an editor
<apeiros>
NemesisD: re "understand encoding" - maybe they don't, but you could show the input in various encodings and let them decide which one makes sense
<apeiros>
at least that's what we do with our highly non-technical users which upload stuff without having a clue :)
<apeiros>
(though, we actually auto-guess the encoding since it's with 99.9999% chance only one of 3 encodings…)
<whitequark>
could check for symbol frequencies
<NemesisD>
yikes
<apeiros>
yupp, that's what we do for the auto-guess part :)
<NemesisD>
i'm going to see if we can push this back to them for now. if all they had to do is flip a switch in their code i'd prefer that
<NemesisD>
i'm going to have them add to the job posting that their scraper needs to produce valid utf-8 or they don't get paid
<apeiros>
assume it's utf-8 -> check .valid_encoding?, if not valid, auto-guess, then search for a word with bytes >127, show 3 words in the guessed encoding and ask whether it's correct
priodev has quit [Ping timeout: 245 seconds]
<mistym>
But who knows what kind of mojibake is being produced if they're taking non-unicode text, interpreting it as utf-16, then munging it to some third encoding on the way out
<NemesisD>
i don't even know that they're using VB.net, i was just being condescending :(
<mistym>
Oh, lol
nisstyre has quit [Quit: Leaving]
slyphon_ has quit [Ping timeout: 245 seconds]
kurko_ has quit [Ping timeout: 246 seconds]
kurko_ has joined #ruby-lang
priodev has joined #ruby-lang
mdedetrich has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
mistym_ has joined #ruby-lang
dingus_khan has joined #ruby-lang
mistym_ has quit [Disconnected by services]
amerine has joined #ruby-lang
rickhull has quit [Quit: Leaving.]
pr0ton has joined #ruby-lang
lfox has quit [Quit: ZZZzzz…]
enebo has quit [Quit: enebo]
Coincidental has quit [Remote host closed the connection]
amerine_ has joined #ruby-lang
simoz has quit [Ping timeout: 246 seconds]
simoz has joined #ruby-lang
amerine has quit [Ping timeout: 272 seconds]
enmand has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
MrZYX is now known as MrZYX|off
<NemesisD>
mistym: hmm im confused. if i do something like bad_str.encode("UTF-8", :invalid => :replace, :replace => ''), the string it produces still has !valid_encoding? why?
dingus_khan has quit [Ping timeout: 246 seconds]
<mistym>
NemesisD: Pretty sure encoding back into the source encoding is a no-op regardless of the specified options
<NemesisD>
mistym: so should i do bad_str.encode('UTF-16', :undef => :replace, :invalid => :replace, :replace => '').encode('UTF-8')?
<NemesisD>
thankfully our catalog data is shitty enough anyways that discarding punctuation is a relatively small problem :(
<zenspider>
NemesisD: is the problem that you don't know the encoding or that ruby dealt with it wrong?
<mistym>
What kind of application is this, out of curiosity?
<NemesisD>
zenspider: the former. we're getting data from scrapers built by outsourcers
<zenspider>
oooh goodie. so you really do have the problem I had (parse all the ruby code).
<NemesisD>
mistym: we're an ecommerce platform. we have a central product catalog for some product lines, the data for which is largely obtained via screen scrapers built by people who are even less knowledgable about encoding than i am
datanoise has joined #ruby-lang
<zenspider>
I ran charlock against all my files and used that data to order encodings from most-to-least likely. then I tried them in that order until I got one that was listed as valid
slyphon_ has joined #ruby-lang
<zenspider>
it's not ideal... but it was as close as I could get to mostly-accurate
<NemesisD>
nice
vlad_sta_ has quit [Remote host closed the connection]
<NemesisD>
unfortunately my team doesn't have much time to spare on this right now, so eating the invalid chars is the best choice for now
<NemesisD>
being perpetually understaffed is not fun
<mistym>
Nor is encoding hell :/
vlad_starkov has joined #ruby-lang
dwknoxy has quit [Quit: Computer has gone to sleep.]
workmad3 has quit [Ping timeout: 256 seconds]
priodev has quit [Ping timeout: 245 seconds]
jonahR has quit [Quit: jonahR]
<zenspider>
NemesisD: if that's the route you're gonna go... read them in as binary, then do the encoding w/ replace
<NemesisD>
oh boy, this isn't a valid CSV. they aren't quoting text that has commas
pkrnj has quit [Quit: Computer has gone to sleep.]
<zenspider>
SURPRISE!
<NemesisD>
zenspider: currently i'm encoding to utf-16 w/ replace then back down to utf-8
eponymi has joined #ruby-lang
<[spoiler]>
NemesisD: WTF. Ask them to fix their files before they send them. This is such bullshit omg. How can people be so shit
<[spoiler]>
Sorry, I'm raging, I hate such stuff
nigerianceo has quit []
charlespeach has quit [Quit: charlespeach]
<NemesisD>
there's only so much pointing at outsourcing horror stories i can do :)
<zenspider>
NemesisD: hopefully you don't have too many to do then. that's just extra work
<[spoiler]>
did your company pay them for this?
<zenspider>
[spoiler]: you're new to the real world, aren't you?
<[spoiler]>
zenspider: clearly
<[spoiler]>
zenspider: does this shit happen often???
<zenspider>
uh. yeah.
<[spoiler]>
The worst I had to deal with was a really really bad API
<[spoiler]>
but omg, reading the conversation is just infuriating me
<NemesisD>
as far as I know we paid them. one problem is that theres 0 dev team involvement in finding these outsourcers. they wrote the ad, chose the outsourcer, got the data, paid them and dropped the bad data in our laps
<zenspider>
do you need this job?
priodev has joined #ruby-lang
<[spoiler]>
who the fuck even sends CSV files these days anymore
<[spoiler]>
I'd pick binary over CSV
<NemesisD>
sometimes i ask myself that lol
<[spoiler]>
zenspider: LOL
<[spoiler]>
suggestion: start looking for a new job and quit when you find a cool one
<[spoiler]>
well, quit your current one, I mean
<NemesisD>
if it weren't for it being the only rails job in the Lynnwood/Mountlake Terrace, WA area I would have ragequit some time ago
dr_bob has quit [Quit: Tune in next week when you'll hear Dr. Bob say...]
bf4 has quit [Ping timeout: 240 seconds]
<NemesisD>
its near Seattle, WA in the US
<zenspider>
NemesisD: I highly doubt it is
<NemesisD>
you doubt my geograpical claims? D:
<NemesisD>
come on man you should konw where lynnwood is, you're from seattle
<zenspider>
no, I highly doubt it is the only thing available
<[spoiler]>
zenspider: he said only rails job available
workmad3 has joined #ruby-lang
<[spoiler]>
tbf, in croatia, you can't even find a rails job
<[spoiler]>
well, maybe you can
<[spoiler]>
but they use Ruby 1.8.6 and Rails 2
<[spoiler]>
MRI ruby
<[spoiler]>
with 0 patches, all vulnerabilities, bugs and whatnots
GarethAdams has joined #ruby-lang
<zenspider>
I know bulgarian rubyists... no reason why croatians can't get the same jobs
<[spoiler]>
still there
<NemesisD>
i haven't looked too hard yet. this job pays the bills, waiting on some company stock that i'm owed, and hasn't really become intolerable yet
<zenspider>
NemesisD: where are you working, if you don't mind sharing...
vlad_sta_ has joined #ruby-lang
<[spoiler]>
I've done Ruby jobs, not rails jobs :P
mannyt has quit [Quit: mannyt]
mdedetrich has quit [Quit: Computer has gone to sleep.]
<NemesisD>
zenspider: CrystalCommerce. we've attended a few seattle rb meetups. i was sitting in the row in front of you at Cascadia next to Ashe and Sarah Blackthorne :)
verto has quit [Ping timeout: 240 seconds]
<CaptainJet>
Boy if I could find a ruby job that never required me to web develop
<CaptainJet>
That'd be great
<zenspider>
NemesisD: ok. n/m then... that might be the only job up there. :P
pkrnj has joined #ruby-lang
hotpancakes has quit [Ping timeout: 256 seconds]
arBmind has joined #ruby-lang
benanne has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 240 seconds]
<NemesisD>
hehe
<NemesisD>
we actually lost our CTO while we were at cascadia
<NemesisD>
i should probably stop airing dirty laundry in #ruby-lang. i'll stop now
<zenspider>
I hope you took a picture of the job board P
<eval-in>
joevandyk => comparison of F with 2 failed (ArgumentError) ... (https://eval.in/58937)
<coca_rails>
like tutorials
<joevandyk>
i was confused by FalseClass
<joevandyk>
but makes sense now
<coca_rails>
whitequark: Yep
flip_digits has quit []
<mistym>
zenspider: You could be a bit nicer about this :b
<whitequark>
coca_rails: never understood why would anyone learn a language through videos
<whitequark>
why?
Mon_Ouie has quit [Ping timeout: 245 seconds]
<[spoiler]>
coca_rails: some people like to listen more than they like to read
benwoody has quit [Quit: benwoody]
yfeldblum has quit [Remote host closed the connection]
<[spoiler]>
whitequark: seeing code and hearing someone explain it makes more sense to them (it's how I tutored my friend C++ so he could pass an exam)
<coca_rails>
Very true. Thanks [spoiler]
<joevandyk>
i got confused by postgresql. you can order by booleans, false is always first.
<coca_rails>
for understanding.
<joevandyk>
and nulls can be first or last
workmad3 has quit [Ping timeout: 272 seconds]
<coca_rails>
[spoiler]: any video suggestions?
<coca_rails>
for ruby
<[spoiler]>
coca_rails: Hmm, not really. Trey some conference videos where they're introducing ruby?
__butch__ has quit [Quit: Leaving.]
<[spoiler]>
I'm more of a get-my-feet-wet type when it comes to this type fo stuff
<[spoiler]>
I decide to build something and make it a learning project
Mon_Ouie has joined #ruby-lang
Andrevan has joined #ruby-lang
yfeldblum has joined #ruby-lang
<coca_rails>
im a pussy cat
a1ph4g33k has quit [Quit: Leaving]
benwoody has joined #ruby-lang
<[spoiler]>
do you try to catch the cursor
<[spoiler]>
my cat sits on the keyboard and messes up the irc client somehow
<[spoiler]>
Well, I'm off, guys! Good night!
hotpancakes has joined #ruby-lang
benanne has quit [Quit: kbai]
<zenspider>
whitequark: different learning styles. I'm highly visual so I read. thagomizer is highly auditory so she likes to listen to podcasts. tactiles need to fidget during learning...
<zenspider>
I couldn't watch the SICP videos... too slow and linear. worked better for others
<whitequark>
zenspider: yeah I see now, guess earlier there was a bias against non-visual folks since you could only easily make books
<whitequark>
I never was able to make sense of videos... got bored after about twenty seconds
charlespeach has joined #ruby-lang
<zenspider>
well... there's always the lecture in the classroom too...
<zenspider>
that way I can put my nose down and read ahead while others sit through an explanation. (mostly) works fairly well.
<zenspider>
coca_rails: you might want to look at peepcode
<zenspider>
lots and lots of videos there on all sorts of topics