apeiros_ changed the topic of #ruby-lang to: Ruby 2.2.0; 2.1.5; 2.0.0-p598; 1.9.3-p551: http://ruby-lang.org || Paste code on http://gist.github.com
oleo is now known as Guest56975
oleo__ has joined #ruby-lang
Forgetful_Lion has joined #ruby-lang
oleo__ has quit [Read error: Connection reset by peer]
Guest56975 has quit [Ping timeout: 250 seconds]
oleo__ has joined #ruby-lang
oleo__ is now known as oleo
Musashi007 has joined #ruby-lang
tmi_ has quit [Ping timeout: 264 seconds]
ta has quit [Remote host closed the connection]
tmi_ has joined #ruby-lang
Musashi007 has quit [Quit: Musashi007]
Musashi007 has joined #ruby-lang
dorei has quit []
chouhoul_ has quit [Remote host closed the connection]
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pwnz0r has joined #ruby-lang
nofxx has quit [Ping timeout: 252 seconds]
Musashi007 has quit [Quit: Musashi007]
Musashi007 has joined #ruby-lang
marr has quit [Ping timeout: 244 seconds]
nofxx has joined #ruby-lang
nofxx has quit [Changing host]
nofxx has joined #ruby-lang
faces has joined #ruby-lang
Musashi007 has quit [Quit: Musashi007]
face has quit [Ping timeout: 256 seconds]
mcclurmc has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
onlyme has joined #ruby-lang
mcclurmc has joined #ruby-lang
amystephen has joined #ruby-lang
charliesome has joined #ruby-lang
tmi_ has quit [Ping timeout: 240 seconds]
Musashi007 has joined #ruby-lang
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
pwnz0r has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
pwnz0r has joined #ruby-lang
ta has joined #ruby-lang
pwnz0r has quit [Ping timeout: 258 seconds]
ta has quit [Ping timeout: 240 seconds]
ta has joined #ruby-lang
hendranata_ has joined #ruby-lang
ta has quit [Ping timeout: 272 seconds]
chouhoulis has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
chouhoulis has quit [Ping timeout: 258 seconds]
yusuf1 has joined #ruby-lang
yfeldblu_ has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
banister has joined #ruby-lang
djbkd has joined #ruby-lang
amystephen has left #ruby-lang [#ruby-lang]
mistym_ has joined #ruby-lang
j4cknewt has joined #ruby-lang
mistym has quit [Ping timeout: 240 seconds]
djbkd has quit [Remote host closed the connection]
slawrenc_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
onlyme has quit [Quit: Lingo: www.lingoirc.com]
slawrenc_ has joined #ruby-lang
mcclurmc has quit [Remote host closed the connection]
j4cknewt has quit [Ping timeout: 264 seconds]
j4cknewt has joined #ruby-lang
ta has joined #ruby-lang
ta has quit [Ping timeout: 265 seconds]
nathanstitt has joined #ruby-lang
hendranata_ has quit [Read error: Connection reset by peer]
hendranata_ has joined #ruby-lang
havenwood has joined #ruby-lang
red_menace has quit [Quit: Quit]
yfeldblum has joined #ruby-lang
ta has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
loincloth has joined #ruby-lang
yfeldblum has quit [Ping timeout: 252 seconds]
ta has quit [Ping timeout: 245 seconds]
loincloth has quit [Ping timeout: 250 seconds]
ta has joined #ruby-lang
mistym_ is now known as mistym
RickHull has joined #ruby-lang
ta has quit [Ping timeout: 256 seconds]
ta has joined #ruby-lang
ta has quit [Ping timeout: 252 seconds]
nertzy has quit [Quit: This computer has gone to sleep]
tkuchiki has joined #ruby-lang
Sadin_ has joined #ruby-lang
Sadin has quit [Ping timeout: 255 seconds]
kapil__ has joined #ruby-lang
cornerma1 has joined #ruby-lang
hagabaka has quit [Quit: No Ping reply in 180 seconds.]
cornerman has quit [Ping timeout: 265 seconds]
cornerma1 is now known as cornerman
hagabaka has joined #ruby-lang
yatish27 has quit []
Sadin_ has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
symm- has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby-lang
loincloth has joined #ruby-lang
yfeldblum has quit [Ping timeout: 245 seconds]
j4cknewt has quit [Remote host closed the connection]
loincloth has quit [Ping timeout: 265 seconds]
arooni-mobile has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby-lang
loincloth has joined #ruby-lang
lsegal has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
ta has joined #ruby-lang
pepperbreath has joined #ruby-lang
loincloth has quit [Ping timeout: 240 seconds]
ta has quit [Ping timeout: 244 seconds]
lsegal has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
ta has joined #ruby-lang
Menorah has quit [Quit: This computer has gone to sleep]
lsegal has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
ta has quit [Ping timeout: 265 seconds]
Lewix has quit [Remote host closed the connection]
Menorah has joined #ruby-lang
mattyohe has quit [Quit: Connection closed for inactivity]
banister has quit [Ping timeout: 245 seconds]
Sadin has joined #ruby-lang
yfeldblum has joined #ruby-lang
slawrenc_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has quit [Ping timeout: 244 seconds]
ta has joined #ruby-lang
Forgetful_Lion has quit [Remote host closed the connection]
amystephen has joined #ruby-lang
ta has quit [Ping timeout: 245 seconds]
Missphoenix has quit [Quit: Leaving]
Miphix has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
Musashi007 has quit [Quit: Musashi007]
j4cknewt has joined #ruby-lang
loincloth has joined #ruby-lang
loincloth has quit [Ping timeout: 240 seconds]
tkuchiki has quit [Remote host closed the connection]
kaiserpathos has joined #ruby-lang
tkuchiki has joined #ruby-lang
mistym has quit [Ping timeout: 258 seconds]
tkuchiki has quit [Ping timeout: 265 seconds]
matp_ has joined #ruby-lang
ledestin has joined #ruby-lang
DivineEntity has quit [Quit: Lost terminal]
matp has quit [Ping timeout: 240 seconds]
amclain has quit [Quit: Leaving]
kaiserpathos has quit []
revath has joined #ruby-lang
ledestin has quit [Quit: ledestin]
Menorah has quit [Quit: This computer has gone to sleep]
Menorah has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 250 seconds]
yfeldblum has joined #ruby-lang
kapil__ has quit [Quit: Connection closed for inactivity]
yfeldblum has quit [Ping timeout: 272 seconds]
Bwild has quit [Ping timeout: 250 seconds]
ur5us has quit [Remote host closed the connection]
shubhamg_ has quit [Remote host closed the connection]
kyb3r_ has quit [Ping timeout: 244 seconds]
kyb3r_ has joined #ruby-lang
anitchrist has joined #ruby-lang
<anitchrist> I run something close to this http://pastebin.com/0wG408nX in ruby's interactive mode and it prints out all the attr_reader's and then what must be the information result at the end, but when I write make a text(.rb) file with the same two lines the I write in irb all I get is http://pastebin.com/XG7vitGa
<anitchrist> I don't run the .rb file in irb when the information is missing I do it from the command prompt i.e. '$ ruby file.rb'
<anitchrist> if I run '$ irb file.rb' I get http://pastebin.com/xCsgGHYU after the list attr_reader list
shubhamgoyal has joined #ruby-lang
<anitchrist> everyone must still be on vacation?
<pepperbreath> or sleeping, who knows :/
<anitchrist> lol
shubhamgoyal has quit [Remote host closed the connection]
DivineEntity has joined #ruby-lang
ta has joined #ruby-lang
anitchrist has quit [Read error: Connection reset by peer]
anitchrist has joined #ruby-lang
anitchrist has quit [Changing host]
anitchrist has joined #ruby-lang
ta has quit [Ping timeout: 258 seconds]
yfeldblum has joined #ruby-lang
hahuang63 has quit [Ping timeout: 244 seconds]
shubhamgoyal has joined #ruby-lang
shubhamg_ has joined #ruby-lang
shubhamgoyal has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 240 seconds]
kapil__ has joined #ruby-lang
mistym has joined #ruby-lang
Musashi007 has joined #ruby-lang
rahul_j has joined #ruby-lang
rahul_j has quit [Client Quit]
rahul_j has joined #ruby-lang
j4cknewt has quit [Read error: Connection reset by peer]
j4cknewt has joined #ruby-lang
loincloth has joined #ruby-lang
shubhamg_ has quit [Remote host closed the connection]
TvL2386 has joined #ruby-lang
loincloth has quit [Ping timeout: 245 seconds]
tkuchiki has joined #ruby-lang
Musashi007 has quit [Quit: Musashi007]
Menorah has quit [Quit: This computer has gone to sleep]
dagda1 has joined #ruby-lang
Musashi007 has joined #ruby-lang
shubhamgoyal has joined #ruby-lang
yfeldblum has joined #ruby-lang
<RickHull> i'll sleep when i'm dead. never succumb
j4cknewt has quit [Remote host closed the connection]
faces has quit [Ping timeout: 244 seconds]
DivineEntity has quit [Quit: Lost terminal]
hahuang63 has joined #ruby-lang
yfeldblum has quit [Ping timeout: 256 seconds]
Menorah has joined #ruby-lang
face has joined #ruby-lang
hahuang63 has quit [Ping timeout: 265 seconds]
Musashi007 has quit [Quit: Musashi007]
faces has joined #ruby-lang
face has quit [Ping timeout: 240 seconds]
iamninja has joined #ruby-lang
Musashi007 has joined #ruby-lang
shubhamgoyal has quit [Remote host closed the connection]
<anitchrist> I run something close to this http://pastebin.com/0wG408nX in ruby's interactive mode and it prints out all the attr_reader's and then what must be the information result at the end, but when I write make a text(.rb) file with the same two lines the I write in irb all I get is http://pastebin.com/XG7vitGa
<anitchrist> I don't run the .rb file in irb when the information is missing I do it from the command prompt i.e. '$ ruby file.rb'
<anitchrist> if I run '$ irb file.rb' I get http://pastebin.com/xCsgGHYU after the list attr_reader list
solars has joined #ruby-lang
Sadin has quit [Remote host closed the connection]
<RickHull> what's the problem? also you can make all of those readers with attr_reader :foo, :bar, :baz
<anitchrist> yeah
<RickHull> one of your posts is deleted
<RickHull> s/posts/pastes/
<anitchrist> ugg
<RickHull> http://pastebin.com/0wG408nX deleted
ta has joined #ruby-lang
shubhamgoyal has joined #ruby-lang
ta has quit [Ping timeout: 272 seconds]
andrewvos has left #ruby-lang ["WeeChat 0.4.2"]
loincloth has joined #ruby-lang
ta has joined #ruby-lang
anitchrist has quit [Quit: Leaving]
matled- has joined #ruby-lang
Xney2 has joined #ruby-lang
brianpWins has joined #ruby-lang
Git|Nick has joined #ruby-lang
loincloth has quit [Ping timeout: 240 seconds]
GitNick has quit [Ping timeout: 252 seconds]
TrafficMan has quit [Ping timeout: 252 seconds]
moogumbo has quit [Ping timeout: 252 seconds]
Git|Nick is now known as GitNick
dabradley has quit [Ping timeout: 252 seconds]
matled has quit [Ping timeout: 252 seconds]
oddmunds has quit [Ping timeout: 252 seconds]
djinni` has quit [Ping timeout: 252 seconds]
Xney has quit [Ping timeout: 252 seconds]
llakey has quit [Ping timeout: 252 seconds]
_br_- has quit [Ping timeout: 252 seconds]
TTilus has quit [Ping timeout: 252 seconds]
matled- is now known as matled
ta has quit [Ping timeout: 265 seconds]
TTilus has joined #ruby-lang
djinni` has joined #ruby-lang
yfeldblum has joined #ruby-lang
ta has joined #ruby-lang
crazysim has quit [Excess Flood]
dabradley has joined #ruby-lang
crazysim has joined #ruby-lang
_br_ has joined #ruby-lang
oddmunds has joined #ruby-lang
llakey has joined #ruby-lang
moogumbo_ has joined #ruby-lang
TrafficMan has joined #ruby-lang
yfeldblum has quit [Ping timeout: 250 seconds]
ta has quit [Ping timeout: 244 seconds]
Menorah has quit [Quit: This computer has gone to sleep]
lsegal` has joined #ruby-lang
lsegal has quit [Ping timeout: 252 seconds]
nofxx has quit [Ping timeout: 258 seconds]
lsegal` has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
RickHull has quit [Ping timeout: 246 seconds]
rahul_j has quit [Quit: rahul_j]
bmichelsen has joined #ruby-lang
Forgetful_Lion has joined #ruby-lang
rahul_j has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
kirin` has quit [Ping timeout: 245 seconds]
kirin` has joined #ruby-lang
j4cknewt has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
j4cknewt has quit [Ping timeout: 240 seconds]
Menorah has joined #ruby-lang
shinnya_ has joined #ruby-lang
tkuchiki has quit [Ping timeout: 245 seconds]
loincloth has joined #ruby-lang
yfeldblum has joined #ruby-lang
loincloth has quit [Ping timeout: 264 seconds]
yfeldblum has quit [Ping timeout: 244 seconds]
iamninja has quit [Quit: ZZZzzz…]
donove has joined #ruby-lang
Blackhol_ has quit [Remote host closed the connection]
ta has joined #ruby-lang
stevednd has quit [Ping timeout: 245 seconds]
ta has quit [Ping timeout: 255 seconds]
tombroomfield has joined #ruby-lang
Menorah has quit [Quit: This computer has gone to sleep]
tombroomfield has quit [Client Quit]
<yorickpeterse> morning
<ljarvis> moin
ta has joined #ruby-lang
marr has joined #ruby-lang
Iskarlar has joined #ruby-lang
yfeldblum has joined #ruby-lang
ta has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Ping timeout: 272 seconds]
ta has joined #ruby-lang
loincloth has joined #ruby-lang
stevednd has joined #ruby-lang
loincloth has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby-lang
mistym has quit [Remote host closed the connection]
ta has quit [Ping timeout: 265 seconds]
hendranata_ has quit [Ping timeout: 258 seconds]
djbkd has joined #ruby-lang
<ljarvis> i have eaten so much food
<ljarvis> dammit christmas
fusillicode has joined #ruby-lang
mcclurmc has joined #ruby-lang
benlovell has joined #ruby-lang
djbkd has quit [Ping timeout: 264 seconds]
mcclurmc has quit [Ping timeout: 244 seconds]
ledestin has joined #ruby-lang
gregf__ has joined #ruby-lang
gregf__ has left #ruby-lang [#ruby-lang]
<yorickpeterse> Allright, I have about a week or so to port over a whole bunch of mongo aggregations to SQL queries
<yorickpeterse> while fixing an NLP stack
<yorickpeterse> challenge accepted
gregf__ has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
ur5us has quit [Remote host closed the connection]
lapide_viridi has joined #ruby-lang
symm- has joined #ruby-lang
ta has joined #ruby-lang
petertretyakov has joined #ruby-lang
benlovell has quit [Ping timeout: 272 seconds]
charliesome has quit [Quit: zzz]
ta has quit [Ping timeout: 244 seconds]
charliesome has joined #ruby-lang
banister has joined #ruby-lang
charliesome has quit [Client Quit]
rahul_j has joined #ruby-lang
<whitequark> тдз,
<whitequark> er. nlp?
ta has joined #ruby-lang
<yorickpeterse> Natural Language Processing
loincloth has joined #ruby-lang
zz_dlu has quit [Ping timeout: 256 seconds]
<yorickpeterse> some stupid part of this stack takes 20 seconds to process a tiny bit of text
GaelanAintAround has joined #ruby-lang
zz_dlu has joined #ruby-lang
Blackhol_ has joined #ruby-lang
loincloth has quit [Ping timeout: 244 seconds]
ta has quit [Ping timeout: 272 seconds]
shubhamgoyal has quit [Remote host closed the connection]
bmichelsen has quit [Quit: ZZZzzz…]
mcclurmc has joined #ruby-lang
mcclurmc has quit [Ping timeout: 258 seconds]
ta has joined #ruby-lang
ta has quit [Ping timeout: 272 seconds]
jds has joined #ruby-lang
ledestin has quit [Quit: ledestin]
ta has joined #ruby-lang
j4cknewt has joined #ruby-lang
revath has quit [Ping timeout: 255 seconds]
j4cknewt has quit [Ping timeout: 265 seconds]
shubhamgoyal has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby-lang
ta has quit [Ping timeout: 264 seconds]
rahul_j has quit [Quit: rahul_j]
shubhamgoyal has quit [Remote host closed the connection]
yusuf1 has quit [Quit: Leaving.]
<yxhuvud> yorickpeterse: what is it that takes so long? is it still your xml parsing you are banging at?
<ljarvis> lol
symm- has quit [Quit: Leaving...]
yxhuvud has quit [Read error: Connection reset by peer]
yxhuvud has joined #ruby-lang
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
loincloth has joined #ruby-lang
loincloth has quit [Ping timeout: 245 seconds]
revath has joined #ruby-lang
symm- has joined #ruby-lang
stamina has joined #ruby-lang
dangerou_ has joined #ruby-lang
mcclurmc has joined #ruby-lang
toretore has joined #ruby-lang
Forgetful_Lion has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
mcclurmc has quit [Ping timeout: 255 seconds]
<yorickpeterse> yxhuvud: No this is is unrelated as it doesn't use my XML parser atm
<yorickpeterse> it's some stupid C/Python stuff that's dog slow
<yorickpeterse> But yes I'm still banging at my XML parser
oleo is now known as Guest65327
oleo__ has joined #ruby-lang
<yorickpeterse> not exactly like I can write a fully blown LL(1) parser generator during Christmas
<yorickpeterse> I had to play video games instead
<yorickpeterse> and drink wine
<yxhuvud> sucks to be you. :P
<yorickpeterse> actually I planned to write the generator _and_ work on my FOSDEM talk
<yorickpeterse> Instead I wrote like 10% of the code and didn't work at all on my talk
red_menace has joined #ruby-lang
Guest65327 has quit [Ping timeout: 245 seconds]
<whitequark> yorickpeterse: I still don't get why do you even bother with a parser generator
<whitequark> writing it by hand would take a day, top
<yorickpeterse> whitequark: haha get out
<yorickpeterse> I'm not going to hand write 3 parsers and then having to change a fuckton just because I move some rules around
<whitequark> writing it by hand is like, the main reason anyone ever bothers to use ll(1)
j4cknewt has joined #ruby-lang
<whitequark> right, so you've decided to go a grossly less efficient way
<whitequark> clang's parser is handwritten ll(1), it's not complicated
<yorickpeterse> No, I've decided to not cut my wrist using cardboard
<yorickpeterse> So I'm taking a detour to make this much easier in the future
<yorickpeterse> Also offering decent error/conflict anaylsis, etc
<yorickpeterse> All the shit you normally have to do by hand
<whitequark> *facepalm*
red_menace has left #ruby-lang [#ruby-lang]
<whitequark> do you know *why* people want to write ll(1) parsers by hand?
<whitequark> because parser generators don't give you good enough error reporting
<yorickpeterse> I thought they liked the smell of it
<whitequark> lalr(1) especially, but ll(1) too
<yorickpeterse> whitequark: thank you, I figured that out several weeks ago when looking at existing tooling and the rationale for clang using a hand written parser
<whitequark> so you have neither the power of a handwritten ll(1) parser, nor convenience of generating an ll(k) grammar
<whitequark> congratulations on wasting your time, i guess
<yorickpeterse> The latter is completely irrelevant, I have little interest in ll(k)
<yorickpeterse> I'd rather spend a few weeks putting something together that works well enough for me than having to hand-roll it every fucking time
<yorickpeterse> I'd also rather do that than either fixing Racc or continueing to use it
<whitequark> "I'd rather spend a few weeks than a few days". spoken by a true programmer
j4cknewt has quit [Ping timeout: 244 seconds]
<yorickpeterse> Either way I don't really care for your opinion on this matter. You might prefer to hand-roll things, I definitely do not
<yorickpeterse> ll(1) allowing hand-written parsers does nothing to discredit the value of generating them
<yorickpeterse> It merely makes it more easy, unlike LALR which is a PITA
kyb3r_ has quit [Quit: Leaving]
chills42 has joined #ruby-lang
lapide_viridi has quit [Quit: Leaving]
diegoviola has joined #ruby-lang
<yorickpeterse> I'm also not sure why you're bringing up clang as an argument, their reasoning for hand-writing it extends beyond just error reporting
<yorickpeterse> e.g. C++ being a total fucking pain to parse using generators
<yorickpeterse> There are cases where hand-writing it makes sense: where the complexity of the language outweights the benefits of generating it
rahul_j has joined #ruby-lang
<yorickpeterse> But for shit like XML/XPath/CSS I'm sure as hell not going to create state transition tables/rule tables by hand
<whitequark> state transition tables?
<whitequark> how about using functions
<yorickpeterse> and then having to annote everything so I actually can remember what "[3, 0, 1, 1, 5, 3]" means
<whitequark> of course, I'm not suggesting to write tables by hand, that's ridiculous
<godd2> ooh, I know this one. That's the reverse, upside-down fibonacci right?
<yorickpeterse> Whether you write the tables by hand or disguise it using if/case statements, the end result is equally painful for simple grammars
<yorickpeterse> There's a certain Balmer peak I guess, after that it makes sense
<whitequark> the branching is equally readable and writable *shrug*
<whitequark> of course, if you already have an ll(1) generator, sure. but writing it solely to avoid writing a few cases is madness
<yorickpeterse> The thing is I have more parsers coming up in the near future, so I need something decent
<whitequark> makes for a good talk topic i guess
<yorickpeterse> xpath, xml and css are just 3 I have at the moment, but I'll most likely need to parse some NLP shit in the near future
<yxhuvud> if you need to parse real text then you will probably very quickly need a more competent parser though
<yorickpeterse> yxhuvud: oh I won't use this for human languages
<yorickpeterse> One of the tools we use spits out some S expression stuff, which is then parsed by some Python stuff which is then called by Ruby
<apeiros_> sounds epic
scampbell has joined #ruby-lang
<yorickpeterse> I _think_ that's the file that parses it, but I'm not sure
yield_rb has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Musashi007 has quit [Quit: Musashi007]
Sirupsen has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
<yxhuvud> hmm. all this talk of parsers made me start looking at generating parse trees from *my* parser generator (or well, so far it is only a recognizer) ..
dangerou_ has quit [Ping timeout: 245 seconds]
<yorickpeterse> Generating the actual tree isn't that tricky
tkuchiki has joined #ruby-lang
<yorickpeterse> I do still need to decide if/how I'm going to support terminal associativity
<yorickpeterse> My gut says "nein" but I currently use this in my XPath parser, so I'd either have to support that or get rid of the need for it
Sirupsen has quit [Quit: Textual IRC Client: www.textualapp.com]
rahul_j has joined #ruby-lang
mcclurmc has joined #ruby-lang
Iskarlar has joined #ruby-lang
hinbody has joined #ruby-lang
Iskarlar has quit [Ping timeout: 250 seconds]
mcclurmc has quit [Ping timeout: 272 seconds]
<yxhuvud> yorick: uh, it gets a whole lot more tricky when you are dealing with possibly ambigous trees.
kfpratt has joined #ruby-lang
<darix> yorickpeterse: dont be so negative! just say "ja" :p
bmichelsen has joined #ruby-lang
<yorickpeterse> darix: actually it would be positive as it means less stuff to implement
rcvalle has joined #ruby-lang
<pipework> darix: The way I figure, the less I have to do, the more room there is for vodka in the glass.
<darix> it was just a word game with "ja" vs "nein" as i found it funny yorickpeterse using german words.
<darix> :P
[spoiler] has joined #ruby-lang
<yorickpeterse> nein nein nein nein
arooni-mobile has joined #ruby-lang
<darix> jaaaa!
<yorickpeterse> (Inglorious Bastards was amazing)
<pipework> basterds, right?
<yorickpeterse> Oh hmpf, they used American spelling apparently
<yorickpeterse> So yes, Inglorious BastErds
<pipework> Well, not really american, but in a murrican kinda joke way, sure.
<[spoiler]> oh
<[spoiler]> is is "basterds"? lmao that's weird
<[spoiler]> I haven't noticed until now
revath has quit [Ping timeout: 256 seconds]
yield_rb has joined #ruby-lang
hahuang63 has joined #ruby-lang
rippa has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 245 seconds]
loincloth has joined #ruby-lang
goodcodeguy has joined #ruby-lang
yield_rb has quit [Quit: Textual IRC Client: www.textualapp.com]
hahuang63 has quit [Ping timeout: 245 seconds]
loincloth has quit [Ping timeout: 258 seconds]
fusillicode has quit [Ping timeout: 244 seconds]
j4cknewt has joined #ruby-lang
<yorickpeterse> yay BigDecimal
<yorickpeterse> wait is that bot still broken?
<yorickpeterse> >> 'butts'
<eval-in__> yorickpeterse => "butts" (https://eval.in/238062)
<yorickpeterse> yay
<yorickpeterse> >> require 'bigdecimal'; BigDecimal.new(1.123, 2)
<yorickpeterse> ...
* yorickpeterse dusts off a kitchen towel and slaps it at eval-in__
<eval-in__> yorickpeterse => #<BigDecimal:40ca6134,'0.11E1',18(27)> (https://eval.in/238064)
<yorickpeterse> wat
<yorickpeterse> >> require 'bigdecimal'; BigDecimal.new(1.123, 2).to_
<eval-in__> yorickpeterse => undefined method `to_' for #<BigDecimal:41d6e05c,'0.11E1',18(27)> (NoMethodError) ... (https://eval.in/238065)
<yorickpeterse> >> require 'bigdecimal'; BigDecimal.new(1.123, 2).to_f
<eval-in__> yorickpeterse => 1.1 (https://eval.in/238066)
<yorickpeterse> ^ pretty sure I gave it a precision of 2
<yorickpeterse> (yes I know why it's not giving back 1.12, already figured that out)
bmichelsen has quit [Quit: ZZZzzz…]
arooni-mobile has joined #ruby-lang
mattyohe has joined #ruby-lang
<apeiros_> 1.1 is two significant digits
malconis has joined #ruby-lang
malconis has quit [Remote host closed the connection]
malconis has joined #ruby-lang
j4cknewt has quit [Remote host closed the connection]
arooni-mobile has quit [Ping timeout: 244 seconds]
<yorickpeterse> Yeah, though the error messages is a bit confusing when using a float
<yorickpeterse> "ArgumentError: can't omit precision for a Float."
<yorickpeterse> so I was like "ok I'll set the precision to 1"
<yorickpeterse> and then you get "1" instead of "1.5"
<yorickpeterse> ah well
chouhoulis has joined #ruby-lang
j4cknewt has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
stamina has quit [Ping timeout: 264 seconds]
rahul_j has joined #ruby-lang
j2p2 has joined #ruby-lang
Bwild has joined #ruby-lang
shubhamgoyal has joined #ruby-lang
iamninja has joined #ruby-lang
shambrarian has joined #ruby-lang
dragonkh has joined #ruby-lang
whippythellama has joined #ruby-lang
Blackhol_ has quit [Remote host closed the connection]
cantonic has joined #ruby-lang
yfeldblum has joined #ruby-lang
TvL2386 has quit [Read error: Connection reset by peer]
loincloth has joined #ruby-lang
yfeldblum has quit [Ping timeout: 245 seconds]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
iamninja has quit [Quit: ZZZzzz…]
Bwild has quit [Ping timeout: 264 seconds]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
nathanstitt has joined #ruby-lang
tkuchiki has quit [Ping timeout: 244 seconds]
yfeldblum has joined #ruby-lang
petertretyakov has quit [Quit: Be back later ...]
mcclurmc has joined #ruby-lang
yfeldblum has quit [Ping timeout: 245 seconds]
mcclurmc has quit [Ping timeout: 244 seconds]
djbkd has joined #ruby-lang
biggreyhairboy has joined #ruby-lang
bmichelsen has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
stamina has joined #ruby-lang
revath has joined #ruby-lang
shankardevy has joined #ruby-lang
petertretyakov has joined #ruby-lang
straydogstudio has joined #ruby-lang
onlyme has joined #ruby-lang
onlyme has quit [Client Quit]
setanta_ has joined #ruby-lang
banister has quit [Ping timeout: 244 seconds]
hahuang63 has joined #ruby-lang
GBrawl has joined #ruby-lang
cornerma1 has joined #ruby-lang
biggreyhairboy has quit []
cornerman has quit [Ping timeout: 245 seconds]
Blackhol_ has joined #ruby-lang
cornerma1 is now known as cornerman
hahuang63 has quit [Ping timeout: 272 seconds]
Blackhol_ has quit [Ping timeout: 258 seconds]
petertretyakov has quit [Quit: Be back later ...]
petertretyakov has joined #ruby-lang
petertretyakov has quit [Client Quit]
GBrawl has quit [Quit: (null)]
GBrawl has joined #ruby-lang
mostlybadfly has quit [Quit: Connection closed for inactivity]
ruby-lang450 has joined #ruby-lang
klmlfl has joined #ruby-lang
chills42 has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
kapil__ has quit [Quit: Connection closed for inactivity]
pwelch has joined #ruby-lang
Blackhol_ has joined #ruby-lang
chills42 has joined #ruby-lang
goodcodeguy has quit [Read error: Connection reset by peer]
matp has joined #ruby-lang
goodcodeguy has joined #ruby-lang
yfeldblum has quit [Ping timeout: 258 seconds]
ruby-lang450 has quit [Ping timeout: 246 seconds]
|jemc| has joined #ruby-lang
matp_ has quit [Ping timeout: 256 seconds]
lapide_viridi has joined #ruby-lang
Sadin has joined #ruby-lang
<lapide_viridi> Is there a way to use string interpolation or something similar to name new variables?
<lapide_viridi> Say, if I had a list of variables and interated trought them, making a copy of each, but calling them variable_copy
<waxjar> it sounds like you don't really need variables lapide_viridi, what are you trying to do? :)
<lapide_viridi> I have a bunch of variables, but need to make a copy of each of them.
<ljarvis> why?
<lapide_viridi> So I put them in a list and wanted to use #each to iterate trough them.
<lapide_viridi> ljarvis, because I use a trial and error approach to solve some sudoku.
<ljarvis> lapide_viridi: use a hash
<yorickpeterse> lapide_viridi: You can't define local variables using string interpolation
<yorickpeterse> The closest is abusing eval(), but I believe that has its own local scope
<yorickpeterse> >> eval("foo = 10"); foo
<eval-in__> yorickpeterse => undefined local variable or method `foo' for main:Object (NameError) ... (https://eval.in/238104)
<yorickpeterse> Hm, I have an evil genius idea
<yorickpeterse> bah
<yorickpeterse> eval() doesn't return a binding
<waxjar> there is binding.local_variable_set, but it's really *not* want you want in this situation
<yorickpeterse> waxjar: my thought exactly :P
<ljarvis> use a hash
* ljarvis just repeats
<yorickpeterse> eval("...").binding.send(:local_variables).each { |key, value| binding.local_variable_set(key, value) }
<yorickpeterse> but alas binding returns the last expression
<yorickpeterse> well, I guess you can do...
<lapide_viridi> Don't laugh: https://eval.in/238105
* ljarvis laughs
<waxjar> you'll like this yorickpeterse: https://github.com/soveran/mote/blob/master/lib/mote.rb#L25
<yorickpeterse> >> eval("foo = 10; binding").binding.send(:local_variables).each { |key, value| binding.local_variable_set(key, value) }; foo
<eval-in__> yorickpeterse => private method `binding' called for #<Binding:0x40c28c84> (NoMethodError) ... (https://eval.in/238106)
<yorickpeterse> why you little
* lapide_viridi laughs to, albeit more nervously.
<yorickpeterse> >> eval("foo = 10; binding").send(:local_variables).each { |key, value| binding.local_variable_set(key, value) }; foo
<eval-in__> yorickpeterse => undefined local variable or method `foo' for main:Object (NameError) ... (https://eval.in/238107)
<yorickpeterse> bah
gchristensen has left #ruby-lang ["WeeChat 0.4.2"]
<yorickpeterse> waxjar: oh, that's actually pretty common for template engines
dragonkh has quit [Quit: Bye!]
<ljarvis> lapide_viridi: to be honest, I don't really see what you're writing to do
<waxjar> ah, i had no idea. i thought it was really clever (and really dirty) :p
<yorickpeterse> but yeah, it's equally dirty
<yorickpeterse> curses now I want this binding stuff to work
<lapide_viridi> ljarvis, sudoku solver. My first.
<|jemc|> lapide_viridi: use a hash
<ljarvis> lapide_viridi: right I get that part
<ljarvis> |jemc|: lolsrsly
<lapide_viridi> Hash for what?
<ljarvis> for smoking
<|jemc|> store each key value pair in a Hash
<|jemc|> instead of in a pile of clumsy variables with dynamic names
<yorickpeterse> >> bla = {}; bla[:number] = 10; bla
<eval-in__> yorickpeterse => {:number=>10} (https://eval.in/238108)
<lapide_viridi> |jemc|, but then I'd loose the nice overview I made.
<lapide_viridi> Perhaps I should expand to a front end.
<ljarvis> tbh, that could just be a single matrix
<|jemc|> lapide_viridi: we have no idea what overview you're talking about
slawrenc_ has joined #ruby-lang
<|jemc|> but if it's loose, then tighten it ;)
<waxjar> lapide_viridi: why don't you make a Class that represents a sudoku "board"
<ljarvis> or buy it a drink
<|jemc|> heh
petertretyakov has joined #ruby-lang
<lapide_viridi> ljarvis, the thought hit me too. Sadly, I know nothing about matrixes, yet. Thus, I wanted to see how far I'd come.
<waxjar> and has a method to get a row and a column and one of those 9-little-square squares, etc
<yorickpeterse> or use instance variables since you can set those dynamically!
* yorickpeterse runs
dsy_oi has joined #ruby-lang
<waxjar> haha
dsy_oi has left #ruby-lang [#ruby-lang]
<apeiros_> muahaha, AR.pluck is 10x slower than my pluck :D
<lapide_viridi> waxjar, good idea. I'll save that for later.
<apeiros_> oh, wait… I don't map the value
<apeiros_> damn
<ljarvis> apeiros_: wat, that's insane, it's not even supposed to instantiate anything and is thus marketted as fast
<apeiros_> yeah, premature jubilation.
<ljarvis> heh
dsy_oi has joined #ruby-lang
<apeiros_> I still expect to be 2-5x faster. mostly since I don't have to abstract the DB
<ljarvis> when do we get to see it?
j4cknewt has quit [Remote host closed the connection]
<apeiros_> alphas probably in a month. if I can keep up the overall speed. but if I continue to work as slow as the last two days… 2017
<ljarvis> :)
<apeiros_> note that it'll not be untangled from the whole framework. I intend to do that, but it's not a focus.
<ljarvis> the whole framework includes something for handling web requests and some view layer abstraction or something?
petertretyakov has quit [Quit: Be back later ...]
<dsy_oi> Hi guys , does em-http-request support ssl connections ? it seems it doesn’t while going through the it’s code.
<apeiros_> yeah, mapping added. still 7.6x faster :D
<apeiros_> (for a string column)
<apeiros_> different column mappers might introduce different amounts of overhead and thus vary in overall speed difference
j4cknewt has joined #ruby-lang
<dsy_oi> @ljarvis it’s missing ssl ca file parameter.
benlovell has joined #ruby-lang
<yorickpeterse> So I searched for "ruby sequel star literal"
petertretyakov has joined #ruby-lang
<yorickpeterse> wtf is this
djbkd has joined #ruby-lang
<ljarvis> dsy_oi: well, it supports streaming too so...
<ljarvis> dsy_oi: why use httpi and not the adapter directly?
<dsy_oi> I tried the em-http directly but it doesn’t work since my code has to send key, cert and ca_file. It seems EM::connection does have ca file support
<ljarvis> ah. I can't help any further then as I don't use (and frankly dislike) em-*
nofxx has joined #ruby-lang
nofxx has quit [Changing host]
nofxx has joined #ruby-lang
<dsy_oi> hm :) thanks anyway
djbkd has quit [Ping timeout: 255 seconds]
petertretyakov has quit [Quit: Be back later ...]
benlovell has quit [Ping timeout: 256 seconds]
havenwood has joined #ruby-lang
revath has quit [Ping timeout: 244 seconds]
nertzy has joined #ruby-lang
solars has quit [Ping timeout: 255 seconds]
chills42 has quit [Remote host closed the connection]
mostlybadfly has joined #ruby-lang
kiyote23 has joined #ruby-lang
revath has joined #ruby-lang
micmus has joined #ruby-lang
yfeldblum has joined #ruby-lang
kiyote23 has quit [Remote host closed the connection]
oleo__ is now known as oleo
yfeldblum has quit [Ping timeout: 240 seconds]
kiyote23 has joined #ruby-lang
kiyote23 has quit [Remote host closed the connection]
<lapide_viridi> I have two equally long arrays of variables. How can I duplicate each variable from the first array and assign it to the corresponding variable of the second?
<lapide_viridi> Damn, I hope that sentence was understandable.
nertzy has quit [Quit: This computer has gone to sleep]
enebo has joined #ruby-lang
<|jemc|> lapide_viridi: by "array of variables", do you mean "array of values" (that is, no names local variable names associated with these values like you were trying to do before)?
fusillicode has joined #ruby-lang
<lapide_viridi> No, two arrays of variables. The first one has assigned arrays though.
<lapide_viridi> Like so: https://eval.in/238112
<|jemc|> lapide_viridi: do `p my_array_of_variables` and gist it so we can understand what you're saying
<|jemc|> okay, I'll look at the eval.in
mcclurmc has joined #ruby-lang
<|jemc|> so, your 'triplets' array is an array of array objects, not of variables - it would fall into the "array of values" category I mentioned before
michaeldeol has joined #ruby-lang
<lapide_viridi> OK, I guess you're right.
<|jemc|> that is to say, once you've created the array, the information of which variable name each value was copied from is lost
<|jemc|> not trying to be overly pedantic, just making sure you get that part of it after your question from earlier today
<lapide_viridi> Yeah, I appreciate it.
GBrawl has quit [Quit: (null)]
<lapide_viridi> Sorry, have to check something out downstairs.
<lapide_viridi> I thinksomething broke.
ruby-lang819 has joined #ruby-lang
<apeiros_> understanding the difference between variable & object is IMO not pedantry, but quite important
Kingpin_ has joined #ruby-lang
<|jemc|> in your eval.in, it is complaining about line 20 because of syntax error - you need to separate your two statements with a semicolon if they are on the same line
<|jemc|> xtriplets.each { |xtriplet| }; xtriplet = triplet.clone
<|jemc|> instead of
<|jemc|> xtriplets.each { |xtriplet| } xtriplet = triplet.clone
<|jemc|> however, I don't think those stataments will do what you want
mcclurmc has quit [Ping timeout: 244 seconds]
__butch__ has joined #ruby-lang
<|jemc|> I would recommend the approach waxjar was suggesting earlier
<|jemc|> make a class that represents a single state of the sudoku board and has accessors for rows and columns and individual cells
spastorino has joined #ruby-lang
<|jemc|> though it may sound like more work to do so, you will likely find it easier than struggling with the issues you're running into now, and you will end up learning more idiomatic ruby
Xzyx987X_ has joined #ruby-lang
<lapide_viridi> Sorry about that
<lapide_viridi> Seems my Christmas three had some struggles with gravity.
<lapide_viridi> *tree
RickHull has joined #ruby-lang
shankardevy has quit [Ping timeout: 264 seconds]
<lapide_viridi> Yeah, I somewhat agree to that. This seems to be the wrong approach.
toretore has quit [Write error: Connection reset by peer]
<lapide_viridi> Although I also wounder if I should go over to a matrix. I think it would be easier to work with it.
wallerdev has joined #ruby-lang
Xzyx987X has quit [Ping timeout: 250 seconds]
<|jemc|> using a 2d array would be a good approach, but you would likely end up writing your own accessors for rows and/or columns of that array, so at that point you might as well wrap it in an object
dsy_oi has quit [Quit: dsy_oi]
kiyote23 has joined #ruby-lang
<|jemc|> for example, a 2x2 board could be something like [[1, 2], [8, 9]], and you could easily get rows with my_board[0] or my_board[1], but to get columns you would likely want to write an accessor that uses map to return an array of the nth item in each row
<|jemc|> (that is, [1, 8] or [2, 9])
<lapide_viridi> Hm, yes.
<|jemc|> you'd also probably want a function to validate the entire board and see if it is a complete solution
<RickHull> i have a project which uses a 2d array, accessed like: @grid[x][y] this means that I have an array of columns (not an array of rows!)
<|jemc|> in ruby this seems like a natural use case for an object, with each of these logical 'functions' as methods of that object
<RickHull> rendering an array of columns is trickier. i used Array#transpose to render it simply as an array of rows
<lapide_viridi> My original idea was the simple input of new numbers with the 91 arrays. I could the use regexp to determine where the zeros were, and which number to input.
<RickHull> lapide_viridi: what is your project?
<lapide_viridi> Then simply combining the rows into a long array, sorting it and compare it with an array containing the numbers from 1 to 9.
<|jemc|> I'm not saying you can't do it by operating on simple arrays - I'm saying using objects will likely make your code more idiomatic and your time spent more productive
<lapide_viridi> RickHull, sudoku solver. My first,
whippythellama has quit [Quit: whippythellama]
dsy_oi has joined #ruby-lang
shankardevy has joined #ruby-lang
<|jemc|> if you really want to eschew objects go use elixir and reap the other benefits of functional programming
<lapide_viridi> |jemc|, I'm not sure what you mean with objects, to be frank. Isn't nearly everything in ruby an object?
bmichelsen has quit [Quit: ZZZzzz…]
<|jemc|> lapide_viridi: I'm saying write your code as objects instead of as a set of procedures
<lapide_viridi> |jemc|, with classes, right?
<lapide_viridi> Sorry, it has been three months since the last time I did some programming in Ruby.
<|jemc|> lapide_viridi: right
<|jemc|> with objects being instances of those classes
symm- has quit [Ping timeout: 244 seconds]
<lapide_viridi> Hmmm, that also seems like a good approach.
<lapide_viridi> Sadly, I can't see the big difference between using classes and methods, but I'll do as you say.
j4cknewt has quit [Remote host closed the connection]
arooni-mobile has joined #ruby-lang
<lapide_viridi> Oh, so that is what waxjar meant! Now I get it.
<lapide_viridi> Thanks everyone, I'll get to work right away!
chills42 has joined #ruby-lang
whippythellama has joined #ruby-lang
<apeiros_> `connect!': wrong number of arguments (250 for 0) - whoops?
<|jemc|> heh
yfeldblum has joined #ruby-lang
chills42 has quit [Ping timeout: 240 seconds]
hinbody has quit [Quit: leaving]
dsy_oi has quit [Quit: dsy_oi]
yfeldblum has quit [Ping timeout: 250 seconds]
hotpancakes has joined #ruby-lang
stamina has quit [Remote host closed the connection]
mcclurmc has joined #ruby-lang
Missphoenix has joined #ruby-lang
shinnya- has joined #ruby-lang
crankhar1er has joined #ruby-lang
_br_- has joined #ruby-lang
boadie_ has joined #ruby-lang
nofxx has quit [Ping timeout: 244 seconds]
nofxx has joined #ruby-lang
nofxx has quit [Changing host]
nofxx has joined #ruby-lang
kiyote23 has quit [Remote host closed the connection]
shinnya_ has quit [Ping timeout: 264 seconds]
mistym has joined #ruby-lang
deol has joined #ruby-lang
deol has quit [Client Quit]
_br_ has quit [Ping timeout: 264 seconds]
rahul_j has quit [Quit: rahul_j]
SHyx0rmZ has quit [Ping timeout: 264 seconds]
Miphix has quit [Read error: Connection reset by peer]
michaeldeol has quit [*.net *.split]
slawrenc_ has quit [*.net *.split]
rippa has quit [*.net *.split]
stevednd has quit [*.net *.split]
boadie has quit [*.net *.split]
crankharder has quit [*.net *.split]
joast has quit [*.net *.split]
lapideviridi has joined #ruby-lang
jayne_ has joined #ruby-lang
Keltia_ has joined #ruby-lang
Keltia__ has joined #ruby-lang
jayne has quit [Read error: Connection reset by peer]
ryotarai has joined #ruby-lang
ta has joined #ruby-lang
stevednd has joined #ruby-lang
joast has joined #ruby-lang
lapide_viridi has quit [Ping timeout: 255 seconds]
dvorkbjel has quit [Excess Flood]
emery__ has joined #ruby-lang
ta has quit [Ping timeout: 272 seconds]
g0bl1n has joined #ruby-lang
g0bl1n has quit [Changing host]
g0bl1n has joined #ruby-lang
dvorkbjel has joined #ruby-lang
<apeiros_> woot, even while coding slower than a snail - 20 column types done. 2 to go :D
revath has quit [Read error: Connection reset by peer]
mistym_ has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 265 seconds]
tee has joined #ruby-lang
kingofcarrotflow has joined #ruby-lang
emery__ has quit []
mistym has quit [Ping timeout: 240 seconds]
mistym_ is now known as mistym
Lewix has quit [Write error: Connection reset by peer]
Lewix has joined #ruby-lang
michaeldeol has joined #ruby-lang
tee has quit [Ping timeout: 246 seconds]
kingofcarrotflow has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
yfeldblum has joined #ruby-lang
micmus has quit [Read error: Connection reset by peer]
micmus_ has joined #ruby-lang
yfeldblum has quit [Ping timeout: 255 seconds]
nunayerBeezwax has joined #ruby-lang
hotpancakes has quit [Remote host closed the connection]
<nunayerBeezwax> g'day everyone. noob to irc chat, apologies for any faux pas. so i have a question about what method i need... i'm doing a munging project on messy address data and want to remove extra whitespace in strings... so i found .squeeze and thought i was getting somewhere, until i noticed that .squeeze also takes trailing zeros! so the address "5700 Fake St" squeezes into "570 Fake St"... i want to take out the extra spaces be
<nunayerBeezwax> fore " St" but I don't want to turn "5700" into "570"... what do i want here?
micmus_ has quit [Ping timeout: 272 seconds]
micmus has joined #ruby-lang
<|jemc|> nunayerBeezwax: String#gsub is a good general-purpose tool for global string replacements by regular expression matching
<havenwood> nunayerBeezwax: You could: squeeze("\n\s\t")
<nunayerBeezwax> ah, i like that... you can pass only specific characters into squeeze and then it will remove only those? "SomeString".squeeze("S") == "ometring" ?
hotpancakes has joined #ruby-lang
<havenwood> nunayerBeezwax: Squeeze only removes duplicate *consecutive* characters: http://www.ruby-doc.org/core-2.2.0/String.html#method-i-squeeze
<nunayerBeezwax> 10-4. thanks havenwood. i think that should do what i want.
io_syl has joined #ruby-lang
io_syl has quit [Changing host]
io_syl has joined #ruby-lang
<nunayerBeezwax> is this the right place to be for a jr. developer to ask questions of that sort?
red_menace has joined #ruby-lang
<havenwood> nunayerBeezwax: Sure, this is a good place. If you want a smaller forum there's ##new2ruby or a bigger one there's #ruby. Any of the above would be good places, including here.
mcclurmc has quit [Remote host closed the connection]
ruby-lang819 has quit [Quit: Page closed]
ruby-lang063 has joined #ruby-lang
hahuang62 has joined #ruby-lang
ruby-lang063 has quit [Quit: Page closed]
ruby-lang186 has joined #ruby-lang
micmus has quit [Ping timeout: 244 seconds]
micmus has joined #ruby-lang
cantonic has quit [Quit: cantonic]
hahuang63 has joined #ruby-lang
hahuang62 has quit [Ping timeout: 256 seconds]
klmlfl_ has joined #ruby-lang
hahuang62 has joined #ruby-lang
klmlfl has quit [Ping timeout: 256 seconds]
hahuang63 has quit [Ping timeout: 250 seconds]
mcclurmc has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
jphenow has joined #ruby-lang
hotpancakes has quit [Remote host closed the connection]
hotpanca_ has joined #ruby-lang
Musashi007 has joined #ruby-lang
ta has joined #ruby-lang
Lewix has joined #ruby-lang
Lewix has quit [Changing host]
Lewix has joined #ruby-lang
Jet4Fire has joined #ruby-lang
jphenow has quit [Quit: Be back later ...]
mcclurmc has quit [Remote host closed the connection]
ta has quit [Ping timeout: 244 seconds]
unsymbol has quit [Ping timeout: 250 seconds]
jayne_ is now known as jayne
jphenow has joined #ruby-lang
shankardevy has quit [Quit: shankardevy]
ta has joined #ruby-lang
hotpanca_ has quit [Remote host closed the connection]
unsymbol has joined #ruby-lang
ta has quit [Ping timeout: 272 seconds]
unsymbol has quit [Ping timeout: 244 seconds]
ta has joined #ruby-lang
RickHull has quit [Ping timeout: 246 seconds]
ta has quit [Ping timeout: 265 seconds]
Musashi007 has quit [Quit: Musashi007]
unsymbol has joined #ruby-lang
Kingpin_ has quit []
pwnz0r has joined #ruby-lang
pwnz0r has quit [Remote host closed the connection]
lexruee has joined #ruby-lang
[H]unt3r has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
Lewix has quit [Changing host]
Lewix has joined #ruby-lang
scampbell has quit [Quit: Leaving]
<lapideviridi> Umm, can someone please help me with this? https://eval.in/238163
CM-Punk has joined #ruby-lang
<CM-Punk> Hello
<lapideviridi> NTSF: Someone may think it is your code and fire you.
<lapideviridi> *nsfw
_fritchie has joined #ruby-lang
<|jemc|> lapideviridi: read up on how local variables are scoped in ruby
<lapideviridi> CM-Punk, hi.
<CM-Punk> Alright, I'm a fairly new Ruby programmer, and I am trying to find out if it's possible to have a program written in Ruby ask the user a question, wait for the answer, and write it into a YAML file.
<CM-Punk> Hi lapideviridi
yfeldblum has joined #ruby-lang
<wmoxam> CM-Punk: yes, that's totally possible
<lapideviridi> |jemc|, oh, it's you again! I've started the one with classes already. Just wanted to complete that one first.
[H]unt3r has quit [Ping timeout: 258 seconds]
<CM-Punk> Awesome, how would that wait and capture be implemented?
[H]unt3r has joined #ruby-lang
<wmoxam> CM-Punk: gets
<CM-Punk> Hmmm, I don't know if that would work in my code.
<CM-Punk> I've heard of 'gets' and I used it when I was first learning Ruby...
Lewix has quit [Remote host closed the connection]
<wmoxam> CM-Punk: why wouldn't it work?
<CM-Punk> It's for an IRC bot, and it would be asking a user on an IRC channel.
<CM-Punk> Or in a PM
tmi1 has joined #ruby-lang
<lapideviridi> |jemc|, do you mean that I can't reference to new variables inside an if statement?
yfeldblum has quit [Ping timeout: 255 seconds]
<wmoxam> CM-Punk: that's an entirely different question then, lol
<|jemc|> lapideviridi: it's not the if scopes that are your problem - it's the method scopes
Lewix has joined #ruby-lang
Lewix has quit [Changing host]
Lewix has joined #ruby-lang
<wmoxam> CM-Punk: looks like Eve has it's own support channel, I would ask there
<|jemc|> in ruby, local variables don't cross a method definition boundary (unless you define the method with a closure with define_method or similar)
<lapideviridi> Oh, I need to use global ones, rihgt?
<lapideviridi> *right
<|jemc|> basically, any local variables you want to use have to be explicitly passed in and out as arguments and return values
<|jemc|> you can use globals, and they will work more like what you expect, but using instance variables (like @variable_name) in an object would be the most idiomatic way to do what you are trying to do
<|jemc|> most ruby users will frown on the use of global variables (like $variable_name) except in a very limited set of special circumstances
<CM-Punk> wmoxam, going to Eve's support channel won't help me. :( I'm it's programmer.
<CM-Punk> XD
iamninja has joined #ruby-lang
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ta has joined #ruby-lang
<lapideviridi> |jemc|, would that make the arrays I defined in the beginning global variables? And the board segments too?
<lapideviridi> CM-Punk, that was quite hilarious, to say the least.
<CM-Punk> I know, lapideviridi! "Go to Eve's support channel" "I RUN THAT CHANNEL ;-;"
<|jemc|> lapideviridi: if you really want to go the global variable route, yes, but as I said it's not recommended for anything serious
<lapideviridi> |jemc|, then Codecademy may have tricked me.
<wmoxam> CM-Punk: given that you've written an IRC bot you're better qualified to answer that question than I am ;)
<lapideviridi> Excuse me for asking, but what is the difference between a normal variable and a global one?
<wmoxam> lapideviridi: a global one shouldn't be used? ;)
<yxhuvud> the globals can be seen everywhere.
<wmoxam> lapideviridi: it's just a matter of scoping
<wmoxam> ^^
<yxhuvud> (unless they happen to be special and local to the thread oslt)
<|jemc|> CM-Punk: I see you're using cinch for your IRC bot - check the documentation for cinch
<CM-Punk> Well, what do you think it is lapideviridi? Global variables are accessible everywhere.
ta has quit [Ping timeout: 244 seconds]
<CM-Punk> Local variables can only be accessed within the method.
<lapideviridi> Yeah, I kinds figured that. Then there must be places the normal ones won't be accessible, right?
<lapideviridi> Ah, OK
<lapideviridi> But if they're outside the method?
<|jemc|> CM-Punk: try the #cinch IRC channel
<CM-Punk> Yeah, that's what I'm gonna do, |jemc|
<CM-Punk> Do they begin with a capitol letter, lapideviridi?
<CM-Punk> capital*
<CM-Punk> What is with my spelling today.
kyb3r_ has joined #ruby-lang
<lapideviridi> Probably the green clumps under the keys starting to push up. I had to remove them last week.
<lapideviridi> No, I guess they don't.
<CM-Punk> If it begins with a capital letter, then it's a constant
mistym has joined #ruby-lang
<CM-Punk> Then it is accessible everywhere within the class
nofxx has quit [Ping timeout: 255 seconds]
<CM-Punk> Like wmoxam said; it's all just a matter of scoping.
ur5us has joined #ruby-lang
Musashi007 has joined #ruby-lang
<lapideviridi> Oh, I think I get it again. Thanks.
<lapideviridi> I'll have a few more minutes to meditate over this code, before going to bed.
Lewix has quit [Remote host closed the connection]
<CM-Punk> I pull my hair out over code so often.
<CM-Punk> It's amazing I'm not bald
nofxx has joined #ruby-lang
nofxx has joined #ruby-lang
<lapideviridi> CM-Punk, if you have pets, please make sure they're not in the same room as you whenever you code.
<CM-Punk> I do, and I learned that; THE HARD WAY
<lapideviridi> However badly (or perhaps baldly) you look bald, the best might look worse.
<ericwood> I decided to come into work half-sick today and got nothing done as a result
<ericwood> too foggy-headed
<CM-Punk> lol lapideviridi
<CM-Punk> ericwood, you should have taken off
mliqu has joined #ruby-lang
unsymbol has quit [Ping timeout: 255 seconds]
<ericwood> nobody is here anyways
<ericwood> half of my team is sick, the rest are out until new years
<lapideviridi> Remember, humans are irrational beings.
<lapideviridi> I once went to school, only for me to throw up.
<j2p2> same boat here eric, minus the sick part
<j2p2> still didn't get anything done
<ericwood> cedar fever isn't helping either
<ericwood> I can't tell where the cold begins and the cedar fever ends
kiyote23 has joined #ruby-lang
yfeldblum has joined #ruby-lang
Lewix has joined #ruby-lang
Lewix has quit [Changing host]
Lewix has joined #ruby-lang
ta has joined #ruby-lang
kiyote23 has quit [Ping timeout: 265 seconds]
unsymbol has joined #ruby-lang
ta has quit [Ping timeout: 265 seconds]
unsymbol has quit [Ping timeout: 272 seconds]
michaeldeol has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
<nunayerBeezwax> ok so what is the right way to protect against this: looping over a DB table, I'm running a method on a given column but some rows don't have a value there... so the loop keeps breaking because "undefiled method for nil". how do we just tell ruby to quit freaking out and keep going to the next row instead of breaking?
g0bl1n has quit [Ping timeout: 244 seconds]
Kingpin_ has joined #ruby-lang
<apeiros_> nunayerBeezwax: by telling it to exactly do that
<apeiros_> next if value.nil?
<apeiros_> or, if false is not a valid value either or can't occur: next unless value
unsymbol has joined #ruby-lang
<apeiros_> nunayerBeezwax: though, much better: you phrase your sql query correctly so those records aren't returned by it in the first place
tmi1 has quit [Quit: Leaving.]
<nunayerBeezwax> i'm looping over a csv and doing Object.crate on each row. some of the rows have dollar signs in them so i'm doing a "monetary_value => row[10].delete('$')" to remove the dollar signs as the object is created... but some of the rows have no entry at row[10] at all so it breaks
xetu has joined #ruby-lang
<xetu> hello
<xetu> can someone help me ?! i need an list of all p-t-p ip-adresses on my ubuntu in ruby
ta has joined #ruby-lang
lapideviridi has quit [Quit: Leaving]
<xetu> is there an module what can handle this ?!
<apeiros_> nunayerBeezwax: so? ruby does what you tell it to do. it raises if you ask it to do something impossible. I told you how to do what you asked in your initial question. if that's not what you're after, then improve your question.
ta has quit [Ping timeout: 265 seconds]
<xetu> so anyone can help me with the ip-adresses of ppp interfaces on ubuntu server ? the ip-adresses is by p-t-p in ifconfig
[H]unt3r has quit [Read error: Connection reset by peer]
[H]unt3r has joined #ruby-lang
[H]unt3r has quit [Client Quit]
unsymbol has quit [Ping timeout: 240 seconds]
donove has quit [Quit: Leaving]
postmodern has joined #ruby-lang
j4cknewt has joined #ruby-lang
Menorah has joined #ruby-lang
ishikawa has quit [Remote host closed the connection]
ishikawa has joined #ruby-lang
jphenow has quit [Quit: Be back later ...]
MC__ has joined #ruby-lang
chills42 has joined #ruby-lang
djbkd has joined #ruby-lang
chills42 has quit [Remote host closed the connection]
MC__ has quit [Client Quit]
xetu has quit [Ping timeout: 246 seconds]
nunayerBeezwax has quit []
djbkd has quit [Ping timeout: 272 seconds]
unsymbol has joined #ruby-lang
haarchri has joined #ruby-lang
<haarchri> hello
slawrenc_ has joined #ruby-lang
kyb3r_ has quit [Ping timeout: 255 seconds]
kyb3r_ has joined #ruby-lang
goodcodeguy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tmi1 has joined #ruby-lang
Lewix has joined #ruby-lang
Lewix has quit [Changing host]
Lewix has joined #ruby-lang
fusillicode has quit [Ping timeout: 256 seconds]
Kingpin_ has quit []
[spoiler] has quit [Quit: Leaving]
godd2 has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 244 seconds]
Lewix has quit [Remote host closed the connection]
ruby-lang186 has quit [Quit: Page closed]
fclausen has joined #ruby-lang
fclausen has quit [Client Quit]
Forgetful_Lion has joined #ruby-lang
fclausen has joined #ruby-lang
Lewix has joined #ruby-lang
Lewix has quit [Changing host]
Lewix has joined #ruby-lang
klmlfl_ has quit [Ping timeout: 255 seconds]
j4cknewt has quit [Remote host closed the connection]
whippythellama has quit [Quit: whippythellama]
kiyote23 has joined #ruby-lang
Musashi007 has quit [Ping timeout: 258 seconds]
Musashi007 has joined #ruby-lang
duderonomy has quit [Ping timeout: 240 seconds]
haarchri has quit [Remote host closed the connection]
symm- has joined #ruby-lang
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mistym has quit [Remote host closed the connection]
hahuang62 has quit [Ping timeout: 265 seconds]
nathanstitt has quit [Quit: I growing sleepy]
yfeldblu_ has joined #ruby-lang
hotpancakes has joined #ruby-lang
enebo has quit [Quit: enebo]
hahuang62 has joined #ruby-lang
yfeldblu_ has quit [Ping timeout: 258 seconds]
haarchri has joined #ruby-lang
haarchri has quit [Remote host closed the connection]
shubhamgoyal has quit [Remote host closed the connection]
shambrarian has quit [Read error: Connection reset by peer]
haarchri has joined #ruby-lang
haarchri has quit [Remote host closed the connection]
rcvalle has quit [Quit: rcvalle]
djbkd has joined #ruby-lang
asahi has joined #ruby-lang
hotpancakes has quit [Remote host closed the connection]
[spoiler] has joined #ruby-lang
kiyote23 has quit [Ping timeout: 265 seconds]
charliesome has joined #ruby-lang
yock has joined #ruby-lang
arBmind1 has joined #ruby-lang
arBmind has quit [Ping timeout: 244 seconds]
yock has quit [Ping timeout: 244 seconds]
duderonomy has joined #ruby-lang
djbkd_ has joined #ruby-lang
|jemc| has quit [Quit: WeeChat 1.0.1]
|jemc| has joined #ruby-lang
Kabaka has joined #ruby-lang
djbkd has quit [Ping timeout: 240 seconds]
hotpancakes has joined #ruby-lang
hotpancakes has quit [Remote host closed the connection]
charliesome has quit [Quit: zzz]
[H]unt3r has joined #ruby-lang
j4cknewt has joined #ruby-lang
charliesome has joined #ruby-lang
j4cknewt has quit [Ping timeout: 258 seconds]
jo__ has joined #ruby-lang