havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Can't talk? Register/identify with Nickserv first! || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
apple12 has joined #ruby
bronson has joined #ruby
scripore has joined #ruby
cb_ has joined #ruby
deject3d has joined #ruby
nfisher has quit [Ping timeout: 250 seconds]
Yurich has joined #ruby
vikaton has quit [Quit: Connection closed for inactivity]
bronson has quit [Ping timeout: 268 seconds]
gambl0re has joined #ruby
hfp has left #ruby [#ruby]
scripore has quit [Quit: This computer has gone to sleep]
dorei has quit []
bkxd has joined #ruby
centrx has joined #ruby
_blizzy_ has joined #ruby
stardiviner has joined #ruby
howdoico1 has quit [Ping timeout: 260 seconds]
devoldmx has joined #ruby
Voker57 has quit [Read error: Connection reset by peer]
Melpaws has joined #ruby
kriskropd has quit [Ping timeout: 246 seconds]
devoldmx has quit [Ping timeout: 246 seconds]
ragingcake has quit [Quit: ragingcake]
ktkh has joined #ruby
Encapsulation has quit [Read error: Connection reset by peer]
Kallis has joined #ruby
workmad3 has joined #ruby
eminencehc has joined #ruby
Encapsulation has joined #ruby
fedexo has quit [Ping timeout: 240 seconds]
davedev24 has quit [Ping timeout: 240 seconds]
Pupeno has joined #ruby
davedev24 has joined #ruby
c355E3B has joined #ruby
ragingcake has joined #ruby
einarj has joined #ruby
webguynow has quit [Ping timeout: 265 seconds]
webguynow has joined #ruby
baweaver has quit [Remote host closed the connection]
bkulbida has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
hydrozen has joined #ruby
Pupeno has quit [Remote host closed the connection]
chills42 has joined #ruby
Leef_ has quit [Quit: Leaving]
Pupeno has joined #ruby
einarj has quit [Ping timeout: 252 seconds]
bkxd has quit [Quit: leaving]
neanderslob has quit [Read error: Connection reset by peer]
ragingcake has quit [Quit: ragingcake]
webguynow has quit [Ping timeout: 265 seconds]
rurik has quit [Ping timeout: 250 seconds]
Technodrome has joined #ruby
webguynow has joined #ruby
apple12 has quit [Ping timeout: 244 seconds]
dcarmich has joined #ruby
rurik has joined #ruby
tvw has quit [Remote host closed the connection]
drewvanstone has joined #ruby
scripore has joined #ruby
frmendes has quit [Quit: Textual IRC Client: www.textualapp.com]
brandon has quit [Ping timeout: 265 seconds]
chouhoulis has joined #ruby
drewvanstone has quit [Ping timeout: 246 seconds]
drewvanstone has joined #ruby
chouhoulis has quit [Ping timeout: 244 seconds]
nfisher has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bruno-_ has joined #ruby
marr has quit []
hydrozen has quit [Quit: Textual IRC Client: www.textualapp.com]
bruno- has quit [Ping timeout: 255 seconds]
scripore has quit [Quit: This computer has gone to sleep]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
phutchins has joined #ruby
brendan- is now known as bmurt
tockitj has quit [Ping timeout: 250 seconds]
webguynow has quit [Ping timeout: 252 seconds]
apple12 has joined #ruby
webguynow has joined #ruby
apple12 has quit [Max SendQ exceeded]
phreakocious has quit [Quit: gotta go]
HAL2328 has quit [Remote host closed the connection]
curses has joined #ruby
phreakocious has joined #ruby
curses has quit [Client Quit]
centrx has quit [Remote host closed the connection]
eminencehc has quit [Remote host closed the connection]
mcFactor has quit [Remote host closed the connection]
michaeldeol has joined #ruby
webguynow has quit [Ping timeout: 268 seconds]
scripore has joined #ruby
bkulbida has quit [Ping timeout: 265 seconds]
towski_ has joined #ruby
webguynow has joined #ruby
dcarmich has quit [Quit: Textual IRC Client: www.textualapp.com]
tockitj has joined #ruby
webguynow has quit [Ping timeout: 250 seconds]
webguynow has joined #ruby
HAL2328 has joined #ruby
tno has quit [Remote host closed the connection]
solocshaw1 has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
solocshaw1 is now known as solocshaw
bkxd has joined #ruby
ekain has joined #ruby
bkxd has quit [Client Quit]
webguynow has quit [Ping timeout: 246 seconds]
webguynow has joined #ruby
tockitj has quit [Changing host]
tockitj has joined #ruby
nyon-zero-pyon is now known as nyon-acceptable
tubuliferous_ has joined #ruby
einarj has joined #ruby
Ebok has joined #ruby
fedexo has joined #ruby
c4nc3r has joined #ruby
<c4nc3r> why is programming illegal?
<Ebok> it isnt
webguynow has quit [Ping timeout: 264 seconds]
nfisher has quit [Ping timeout: 272 seconds]
<pipework> Ebok: There may be places where it is.
<c4nc3r> it is
webguynow has joined #ruby
<Ox0dea> Some programming is illegal.
comm64x has joined #ruby
<comm64x> hello all
<c4nc3r> i've spent 6 years in prison for writing a script that traces cookies and logs credit card details
<Ox0dea> Congratulations?
einarj has quit [Ping timeout: 268 seconds]
quazimodo has joined #ruby
<quazimodo> yo
<c4nc3r> i shouldn't be the one going to jail
<pontiki> driving isn't illegal. but if you drive on the sidewalks you'll go to jail
<c4nc3r> you don't imprison the person that sold the gun
<pontiki> do you have a ruby question?
devoldmx has joined #ruby
beginner_with_qu has quit [Ping timeout: 246 seconds]
<c4nc3r> yes why is making ruby scripts illegal
phutchins has quit [Ping timeout: 256 seconds]
<pipework> c4nc3r: We can't offer legal advice here
<quazimodo> so I want to write a .deb & a homebrew formula for a package i've been making for our company. It's a series of scripts & git hooks, all written in ruby. I could use it as a gem (current situation) but thats' a big pain with the 6 different ruby versions we're all using
<quazimodo> so, is there a sane way to go about packaging?
<pipework> quazimodo: Look at other projects that provide debian folders in the root.
<quazimodo> i'm thinking I need to make it as a gem, use bundler to vendor dependencies, then export that into a tar.gz that apt and homebrew can use
<pipework> The homebrew stuff is fairly easy. Maybe ruby-instlal's would be good.
HAL2328 has quit [Quit: Leaving]
<quazimodo> pipework: I have no idea which project?
<comm64x> I have a quick question, simple really, on ruby. I'm reading a book on Ruby. It's going over OOP, and it says that an object is a combination of state and methods that use that state. It gives some example of what it means by state but I just need to clarify. Is state the things we use in a class to represent categories of the concept we are looking to model?
<pipework> quazimodo: ruby-install maybe
<quazimodo> pipework: oh, ok
<pontiki> isn't there some thing called Transparent Ruby that makes packaging and distribution easier? i probably have the wrong name...
<darix> you probably mean travel ruby
<pipework> Travelling.
<pontiki> that's it, thanks. maybe that might help? i dunno, i don't know anything about packaging
<pipework> comm64x: No, state is things like instance variables, class variables. State is a fundamental concept of OO that you can google and wikipedia.
<quazimodo> comm64x: i f you mean the mathematical notion of categories, kind of yeah
nfisher has joined #ruby
<quazimodo> but that's very vague
<comm64x> pipework: thats what I meant, e.g. variables, thanks
<pipework> comm64x: Not all variables are 'state' though.
<quazimodo> pipework: each state of an object *can* represent a mathematical category
<pipework> Like, not in an OO fashion.
<pipework> quazimodo: I wouldn't know.
devoldmx has quit [Ping timeout: 255 seconds]
<pipework> pontiki: that's more for ruby applications so you can package a ruby with the app so that the receiver doesn't need to install ruby to install your app. Though you could certainly use traveling ruby in a package that packages a gem along.
towski_ has quit [Remote host closed the connection]
<pontiki> help a gal out: what's a "mathematical category" in this conversation mean?
<Ox0dea> Monads.
<pontiki> thanks
<Ox0dea> <3
<quazimodo> comm64x: it's really really simple. Imagine a chest of drawers. Each drawer holds 'something', even another chest of drawers. That's an object
<quazimodo> in RUBY the drawers are a lie
<quazimodo> they are an illusion for the actual drawers inside, hidden away (instance variables)
<pontiki> "Keep your drawers out of my chest!" she cried
bkulbida has joined #ruby
charliesome has joined #ruby
webguynow has quit [Ping timeout: 246 seconds]
<Ox0dea> comm64x: A Vehicle class might have methods like #turn and #accelerate, and "properties" (instance variables) like @rate_of_acceleration and @top_speed.
<quazimodo> in ruby foo.butt is like looking at the chest of drawers called foo, telling it to open upp the butt drawer so you can get what's inside. It's actually a function that returns the @butt instance variable
<Ox0dea> #turn and #accelerate are behavior, the instance variables are state.
webguynow has joined #ruby
<quazimodo> Also theres' no good reason that an object has 'behaviour' or methods attached to it
<eam> can you imagine attempting to build a safe accelerator system in ruby?
<quazimodo> it doesn't need to. All it needns to to is hold state
<pontiki> will it run in a browser?
cb_ has quit [Remote host closed the connection]
<Ox0dea> quazimodo: Are you being deliberately unhelpful?
<pontiki> i'm only hear for rather poor comic relief
<quazimodo> Ox0dea: too complicated for him?
<pontiki> [sic]
Melpaws has quit [Quit: Leaving.]
<comm64x> okay so, if I'm getting this right, methods would be like verbs and state would be like adjectives describing the noun
<deject3d> i don't think trying to draw similarities like that is a good idea
<pipework> comm64x: Not necessarily. It's like having mutable variables that might not be accessible from the outside of the object, but it can.
<Ox0dea> comm64x: That's a perfectly workable first approximation, yes.
<pipework> Methods are functions whose implicit first argument is 'self', if you know python or that just helps you understand that they're member functions of an object.
nfisher has quit [Ping timeout: 252 seconds]
<quazimodo> comm64x: sure, if you have knowledge of the entire state, that's good. But in ruby sometimes some parts of the state are hidden (for good reaso) to the outside world
<jhass> comm64x: I'd say good enough for now, move on, it'll become clearer as you actually try to apply those concepts (and get shown how to do it in a different or preferred way)
<Ox0dea> ^
<comm64x> jhass: That's what I was looking for clarification of, just something I can run with. Thanks everyone.
tubuliferous_ has quit [Ping timeout: 240 seconds]
<comm64x> I think I can get it from here :)
<pipework> comm64x: On the whole, state is easily observed when there are instance and class variables present.
chills42 has quit [Remote host closed the connection]
<pipework> Not necessarily just in the code, but at runtime.
chouhoulis has joined #ruby
<Ox0dea> comm64x: Thinking of instance variables as adjectives isn't terrible, but they're really for holding what an object knows about itself, not what other objects might think of it.
sepp2k has quit [Read error: Connection reset by peer]
<jhass> going back to the Vehicle, while #accelerate is influenced by @rate_of_acceleration, #chiptune might change the actual property
<comm64x> Ox0dea: I get what you mean. Thanks for your help.
Pupeno has quit [Remote host closed the connection]
<comm64x> I tend to over analyze things
<jhass> not a too terrible tribe for a programmer, the trick is to set yourself a border and limit the problem domain you analyze at a given point ;)
chouhoulis has quit [Ping timeout: 240 seconds]
<comm64x> jhass: good advice
nfisher has joined #ruby
bkulbida has quit [Ping timeout: 246 seconds]
cb_ has joined #ruby
cb_ has joined #ruby
drewvanstone has quit [Read error: Connection reset by peer]
webguynow has quit [Ping timeout: 250 seconds]
webguynow has joined #ruby
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
michaeldeol has quit [Remote host closed the connection]
gambl0re has quit [Ping timeout: 250 seconds]
devoldmx has joined #ruby
quazimodo has quit [Ping timeout: 240 seconds]
nfisher has quit [Ping timeout: 240 seconds]
webguynow has quit [Ping timeout: 240 seconds]
webguynow has joined #ruby
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
nfisher has joined #ruby
old1 has joined #ruby
s2013 has joined #ruby
webguynow has quit [Ping timeout: 240 seconds]
Ropeney has joined #ruby
webguynow has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gregf has quit [Quit: WeeChat 1.3]
workmad3 has joined #ruby
nfisher has quit [Ping timeout: 265 seconds]
ktkh has quit [Remote host closed the connection]
Asher has quit [Ping timeout: 240 seconds]
c4nc3r has quit [Quit: Page closed]
gregf has joined #ruby
Asher has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
nfisher has joined #ruby
Rickmasta has joined #ruby
kriskropd has joined #ruby
poguez_ has quit [Quit: Connection closed for inactivity]
nfisher has quit [Ping timeout: 246 seconds]
kkeuning has joined #ruby
bruno-_ has quit [Ping timeout: 272 seconds]
gambl0re has joined #ruby
[k- has joined #ruby
nfisher has joined #ruby
youngbaks has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
phutchins has joined #ruby
Yurich has quit [Quit: Leaving]
nfisher has quit [Ping timeout: 264 seconds]
s2013 has quit [Ping timeout: 256 seconds]
arescorpio has joined #ruby
webguynow has quit [Ping timeout: 272 seconds]
webguynow has joined #ruby
joeyjones has quit [Ping timeout: 246 seconds]
joeyjones has joined #ruby
nfisher has joined #ruby
pwnd_nsfw has quit [Ping timeout: 240 seconds]
iamninja has quit [Read error: Connection reset by peer]
platzhirsch has quit [Ping timeout: 272 seconds]
iamninja has joined #ruby
startupality has joined #ruby
benlieb has joined #ruby
nfisher has quit [Ping timeout: 260 seconds]
charliesome has joined #ruby
umgrosscol has joined #ruby
gregf has quit [Quit: WeeChat 1.3]
atzorvas has quit [Read error: Connection reset by peer]
meatherly has joined #ruby
nfisher has joined #ruby
dgutierrez1287 has joined #ruby
PublicSubnet has quit [Ping timeout: 265 seconds]
chouhoulis has joined #ruby
PublicSubnet has joined #ruby
nfisher has quit [Ping timeout: 255 seconds]
PublicSubnet has quit [Client Quit]
PublicSubnet has joined #ruby
dgutierrez1287 has quit [Ping timeout: 240 seconds]
iamninja has quit [Ping timeout: 265 seconds]
howdoico1 has joined #ruby
chouhoulis has quit [Ping timeout: 264 seconds]
jxv has quit [Ping timeout: 244 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Newtonianb has joined #ruby
nfisher has joined #ruby
<Newtonianb> question: I'm trying to parse a file that has content key=val into a hash. This is what I have results = config.scan(/(\w+)=(.*)$/) but it breaks when file has \r\n or \n, how could I Fix this regex to handle both cases?
gregf has joined #ruby
umgrosscol has quit [Remote host closed the connection]
rushed has joined #ruby
startupality has quit [Quit: startupality]
Technodrome has quit [Quit: Technodrome]
sp4rrow has joined #ruby
Technodrome has joined #ruby
webguynow has quit [Ping timeout: 244 seconds]
webguynow has joined #ruby
nfisher has quit [Ping timeout: 240 seconds]
elperdut has joined #ruby
drewvanstone has joined #ruby
kkeuning has quit [Quit: Textual IRC Client: www.textualapp.com]
cb_ has quit [Remote host closed the connection]
circ-user-serfU has joined #ruby
moeabdol1 has joined #ruby
comm64x has left #ruby [#ruby]
nfisher has joined #ruby
drewvanstone has quit [Ping timeout: 250 seconds]
webguynow has quit [Ping timeout: 244 seconds]
gener1c has joined #ruby
webguynow has joined #ruby
<[k-> config = File.readlines.map { |line| line.scan <regexp> }
<[k-> file*
ItSANgo has quit [Quit: Leaving...]
nyon-acceptable is now known as nyon-terminating
gener1c_ has quit [Ping timeout: 250 seconds]
moeabdol1 has quit [Ping timeout: 264 seconds]
nfisher has quit [Ping timeout: 272 seconds]
braincrash has quit [Quit: bye bye]
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
braincrash has joined #ruby
braincrash is now known as braincras
ramfjord has quit [Ping timeout: 246 seconds]
youngbaks has quit [Ping timeout: 268 seconds]
nfisher has joined #ruby
EasyCo has quit [Quit: Connection closed for inactivity]
nfisher has quit [Ping timeout: 255 seconds]
patata00101 has joined #ruby
amystephen has quit [Quit: amystephen]
webguynow has quit [Ping timeout: 244 seconds]
webguynow has joined #ruby
UtkarshRay has joined #ruby
patata00101 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
PublicSubnet has quit [Ping timeout: 252 seconds]
nfisher has joined #ruby
armyriad has quit [Quit: Leaving]
badbodh has quit [Remote host closed the connection]
badbodh has joined #ruby
badbodh has quit [Changing host]
badbodh has joined #ruby
amystephen has joined #ruby
nfisher has quit [Ping timeout: 240 seconds]
webguynow has quit [Ping timeout: 250 seconds]
webguynow has joined #ruby
amystephen has quit [Client Quit]
Lycanii has joined #ruby
ekain has quit [Quit: Textual IRC Client: www.textualapp.com]
gix has quit [Ping timeout: 265 seconds]
meatherly has quit []
gix has joined #ruby
webguynow has quit [Ping timeout: 272 seconds]
webguynow has joined #ruby
circ-user-serfU has quit [Remote host closed the connection]
chouhoulis has joined #ruby
webguynow has quit [Ping timeout: 252 seconds]
phreakocious has quit [Remote host closed the connection]
webguynow has joined #ruby
beauby has joined #ruby
postmodern has quit [Quit: Leaving]
Pupeno has joined #ruby
phreakocious has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
davedev24 has quit []
Pupeno has quit [Ping timeout: 250 seconds]
webguynow has quit [Ping timeout: 255 seconds]
webguynow has joined #ruby
andyrs has joined #ruby
workmad3 has joined #ruby
ruby-lang490 has quit [Ping timeout: 246 seconds]
Kallis has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 250 seconds]
The_Phoenix has joined #ruby
moeabdol1 has joined #ruby
rushed has quit [Quit: rushed]
nyon-terminating is now known as pyon
Coldblackice has quit [Ping timeout: 264 seconds]
Technodrome has quit [Quit: Technodrome]
moeabdol1 has quit [Ping timeout: 264 seconds]
Coldblackice has joined #ruby
last_staff has joined #ruby
sp4rrow has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_blizzy_ has quit [Ping timeout: 264 seconds]
Technodrome has joined #ruby
deject3d has quit [Quit: Computer has gone to sleep.]
crowell is now known as ghost_host
EllisTAA has joined #ruby
<EllisTAA> can anyone recommend a good source for learning how to optimize your website
rushed has joined #ruby
darkf has joined #ruby
solocshaw has quit [Ping timeout: 264 seconds]
dopie has joined #ruby
<[k-> use frozen strings, that's all i have!
<pipework> EllisTAA: https://mitpress.mit.edu/sicp/
freerobby has quit [Quit: Leaving.]
<EllisTAA> pipework: thanks, can u say more about that book
dreadnought8971 has quit [Remote host closed the connection]
towski_ has joined #ruby
<pipework> EllisTAA: It's pretty much the only book I've ever wanted to know whale enough to never read again, but then keep reading again anyways.
<pipework> Go through it translating to different languages, crying because I can't find jobs where I'd be writing scheme, or just reading it to re-read it.
<EllisTAA> how will this help me write more efficient websites?
webguynow has quit [Ping timeout: 240 seconds]
nfisher has joined #ruby
ghost_host is now known as crowell
<pipework> EllisTAA: It helps you understand more, though a lot of the trouble you'll have is in measuring and finding the places where it's not good enough.
<EllisTAA> ok ill check it out
andyrs has quit [Quit: I'm leaving now, bye.]
MiW has left #ruby [#ruby]
shinnya has quit [Ping timeout: 268 seconds]
webguynow has joined #ruby
nfisher has quit [Ping timeout: 246 seconds]
ItSANgo has joined #ruby
cb_ has joined #ruby
jimbeaudoin has quit [Quit: Connection closed for inactivity]
drewvanstone has joined #ruby
einarj has joined #ruby
blur3d has joined #ruby
fedexo has quit [Ping timeout: 240 seconds]
webguynow has quit [Ping timeout: 240 seconds]
einarj has quit [Ping timeout: 265 seconds]
webguynow has joined #ruby
tobukiah has joined #ruby
rurik has quit [Ping timeout: 272 seconds]
tobukiah has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
karapetyan has joined #ruby
tobukiah has joined #ruby
youngbaks has joined #ruby
Technodrome has quit [Quit: Technodrome]
tobukiah has quit [Remote host closed the connection]
karapetyan has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
tobukiah has joined #ruby
doritostains has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
rushed has quit [Quit: rushed]
iamninja has joined #ruby
chouhoulis has joined #ruby
vdamewood has quit [Quit: Life beckons.]
an0ma1y- has quit [Ping timeout: 265 seconds]
iamninja has quit [Ping timeout: 240 seconds]
chouhoulis has quit [Ping timeout: 250 seconds]
arescorpio has quit [Quit: Leaving.]
an0ma1y has joined #ruby
yfeldblum has joined #ruby
baweaver has joined #ruby
nanoz has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
last_staff has quit [Quit: last_staff]
Newtonianb has quit [Ping timeout: 252 seconds]
CloCkWeRX has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
nfisher has joined #ruby
an0ma1y has quit [Ping timeout: 252 seconds]
an0ma1y has joined #ruby
an0ma1y has quit [Ping timeout: 246 seconds]
nsuke has joined #ruby
devoldmx has quit [Remote host closed the connection]
dgutierrez1287 has joined #ruby
an0ma1y has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
youngbaks has quit [Ping timeout: 250 seconds]
dgutierrez1287 has quit [Ping timeout: 252 seconds]
an0ma1y has quit [Ping timeout: 246 seconds]
quazimodo has joined #ruby
an0ma1y has joined #ruby
bruno- has joined #ruby
jamesaxl has joined #ruby
bruno- has quit [Ping timeout: 252 seconds]
oitnelis has joined #ruby
slayerjain has joined #ruby
mahuebel has joined #ruby
jcdesimp has quit [Quit: Leaving...]
slayerjain has quit [Client Quit]
<mahuebel> quit
Technodrome has joined #ruby
kgirthofer_ has joined #ruby
<Ox0dea> Nope, you're staying.
mahuebel has left #ruby [#ruby]
<[k-> QUIT :Ox0dea
<Ox0dea> /part I'm taking my ball.
einarj has joined #ruby
<pipework> /part nopenopenope
kgirthofer has quit [Ping timeout: 250 seconds]
scripore has joined #ruby
kgirthofer has joined #ruby
einarj has quit [Ping timeout: 272 seconds]
roxtrongo has joined #ruby
slayerjain has joined #ruby
slayerjain has quit [Client Quit]
kgirthofer_ has quit [Ping timeout: 246 seconds]
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Lucky__ has joined #ruby
c355E3B has quit [Quit: Connection closed for inactivity]
Lucky__ has quit [Read error: Connection reset by peer]
Lucky__ has joined #ruby
wildlander has quit [Quit: Saliendo]
towski_ has quit [Ping timeout: 260 seconds]
tejasmanohar_ has joined #ruby
<quazimodo> possbible to bundle install --standalone without it installing development dependencies?
workmad3 has joined #ruby
<pipework> Yeah. I think you'd use the --groups thing
<quazimodo> hrm
<Ox0dea> Just `--without development`, yeah?
<pipework> Ah yeah, --without
tejasmanohar has quit [Ping timeout: 268 seconds]
tejasmanohar_ is now known as tejasmanohar
<quazimodo> --deployment is doing weird stuff
webguynow has quit [Ping timeout: 240 seconds]
webguynow has joined #ruby
<quazimodo> maybe it's bundle package?
chouhoulis has joined #ruby
psy_ has joined #ruby
Pupeno has joined #ruby
<Ox0dea> quazimodo: `--deployment`?
Neverdie has quit [Quit: http://radiux.io/]
<quazimodo> Ox0dea: bundle install --deployment
workmad3 has quit [Ping timeout: 246 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<quazimodo> I can kind of understand bundle install --deployment. But I'm not sure I understand bundel install --standalone vs bundle package
moeabdol1 has joined #ruby
sulivan has joined #ruby
chouhoulis has quit [Ping timeout: 264 seconds]
[k- has quit [Quit: -a- IRC for Android 2.1.23]
Pupeno has quit [Ping timeout: 246 seconds]
Rickmasta has joined #ruby
sulivan has left #ruby [#ruby]
nfisher has quit [Quit: Good-bye all!]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
moeabdol1 has quit [Ping timeout: 246 seconds]
yardenbar has joined #ruby
webguynow has quit [Ping timeout: 240 seconds]
webguynow has joined #ruby
beauby has quit [Ping timeout: 256 seconds]
old1 has quit [Remote host closed the connection]
quazimodo has quit [Ping timeout: 264 seconds]
CrazyEddy has joined #ruby
pawnbox has quit [Remote host closed the connection]
Synthead has quit [Ping timeout: 244 seconds]
mondayrain has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devoldmx has joined #ruby
dyleted has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
tk___ has joined #ruby
moeabdol1 has joined #ruby
pawnbox has joined #ruby
Ropeney has joined #ruby
VeryBewitching has quit [Quit: Konversation terminated!]
mondayrain has quit [Quit: Leaving]
mondayrain has joined #ruby
Synthead has joined #ruby
bigmac has joined #ruby
rippa has joined #ruby
mondayrain has quit [Ping timeout: 246 seconds]
badbodh has quit [Remote host closed the connection]
bigmac has quit [Client Quit]
nsuke has quit [Read error: Connection reset by peer]
chipotle has quit [Quit: cheerio]
einarj has joined #ruby
pawnbox_ has joined #ruby
moeabdol1 has quit [Ping timeout: 264 seconds]
pawnbox has quit [Ping timeout: 240 seconds]
einarj has quit [Ping timeout: 256 seconds]
sp4rrow has joined #ruby
FernandoBasso has quit [Quit: WeeChat 1.3]
sp4rrow has quit [Client Quit]
sp4rrow has joined #ruby
pyon has quit [Quit: F...ix you, Emacs.]
bronson has joined #ruby
nyon has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
saddad has quit [Ping timeout: 240 seconds]
bronson has quit [Ping timeout: 260 seconds]
CloCkWeRX has joined #ruby
toretore has quit [Quit: This computer has gone to sleep]
pawnbox_ has quit [Remote host closed the connection]
armyriad has joined #ruby
pawnbox has joined #ruby
arup_r has joined #ruby
eGGsha has joined #ruby
iamninja has joined #ruby
webguynow has quit [Ping timeout: 240 seconds]
webguynow has joined #ruby
CloCkWeRX has quit [Ping timeout: 250 seconds]
chouhoulis has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
ndrei has quit [Ping timeout: 268 seconds]
nahtnam has quit [Quit: Connection closed for inactivity]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iamninja has quit [Ping timeout: 240 seconds]
chouhoulis has quit [Ping timeout: 264 seconds]
drewvanstone has quit [Ping timeout: 255 seconds]
webguynow has quit [Ping timeout: 250 seconds]
webguynow has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Lucky__ has joined #ruby
charliesome has joined #ruby
curses has joined #ruby
Technodrome has quit [Quit: Technodrome]
sotojuan has joined #ruby
iateadonut has joined #ruby
curses has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
amystephen has joined #ruby
karapetyan has quit [Ping timeout: 252 seconds]
webguynow has quit [Ping timeout: 268 seconds]
webguynow has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
KnownSyntax has quit [Ping timeout: 246 seconds]
KnownSyntax has joined #ruby
dagda1 has quit [Quit: Textual IRC Client: www.textualapp.com]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bruno- has joined #ruby
lkba has joined #ruby
Jackneill has joined #ruby
platzhirsch has joined #ruby
Pupeno has joined #ruby
bruno- has quit [Ping timeout: 272 seconds]
ktkh has joined #ruby
moeabdol1 has joined #ruby
CloCkWeRX has joined #ruby
webguynow has quit [Ping timeout: 246 seconds]
tockitj has quit [Ping timeout: 265 seconds]
webguynow has joined #ruby
firstdayonthejob has joined #ruby
CloCkWeRX has quit [Client Quit]
CloCkWeRX1 has joined #ruby
Rickmasta has joined #ruby
moeabdol1 has quit [Ping timeout: 244 seconds]
CloCkWeRX1 has quit [Client Quit]
CloCkWeRX has joined #ruby
workmad3 has joined #ruby
chipotle has joined #ruby
pawnbox_ has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 268 seconds]
dgutierrez1287 has joined #ruby
roxtrongo has quit [Remote host closed the connection]
rurik has joined #ruby
moeabdol1 has joined #ruby
araujo_ has joined #ruby
codecop has joined #ruby
JohnBat26 has joined #ruby
dgutierrez1287 has quit [Ping timeout: 272 seconds]
araujo has quit [Ping timeout: 255 seconds]
ramfjord has joined #ruby
chouhoulis has joined #ruby
Pupeno has quit [Remote host closed the connection]
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
chouhoulis has quit [Ping timeout: 252 seconds]
BlackCoyote has joined #ruby
<TTilus> --deployment is shorthand for --path vendor/bundle --frozen (and --local if vendor/cache exists)
ndrei has joined #ruby
brandon has joined #ruby
stardiviner has quit [Ping timeout: 246 seconds]
stevednd has quit [Ping timeout: 246 seconds]
jgt has joined #ruby
<TTilus> --standalone hardcodes stuff so that bundler is not a runtime dependency, i.e. running stuff in the package doesn't require bundler
ktkh has quit [Quit: Leaving...]
<TTilus> the both are platform specific
chipotle has quit [Quit: cheerio]
<TTilus> bundle package can shrink wrap enough stuff that you can install to all supported platforms (if your deps vary) and not access network in the process
<baweaver> few hours off there mate.
<TTilus> d'oh
stardiviner has joined #ruby
BaroMeter has joined #ruby
Mon_Ouie has joined #ruby
webguynow has quit [Ping timeout: 252 seconds]
pawnbox_ has quit [Remote host closed the connection]
webguynow has joined #ruby
tk___ has quit [Quit: ばいばい]
devoldmx has joined #ruby
<TTilus> Ox0dea: replying to old stuff... yes, class(NA) => "logical" :D
pawnbox has joined #ruby
baweaver has quit [Remote host closed the connection]
<Ox0dea> TTilus: I suppose it's similar enough to `nil`, but we really oughtn't treat that bastard as much like a boolean as we tend to.
decoponyo has joined #ruby
stevednd has joined #ruby
devoldmx has quit [Ping timeout: 255 seconds]
moeabdol1 has quit [Ping timeout: 265 seconds]
decoponio has quit [Ping timeout: 246 seconds]
Voker57 has joined #ruby
webguynow has quit [Ping timeout: 240 seconds]
tejasmanohar has quit [Quit: tejasmanohar]
webguynow has joined #ruby
pawnbox has quit [Remote host closed the connection]
krz has joined #ruby
Ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
quazimodo has joined #ruby
eGGsha has quit [Quit: Textual IRC Client: www.textualapp.com]
beast has joined #ruby
jgt1 has joined #ruby
moeabdol1 has joined #ruby
Ropeney has joined #ruby
Ropeney has quit [Client Quit]
justin_pdx has joined #ruby
Ropeney has joined #ruby
jgt has quit [Ping timeout: 268 seconds]
krz has quit [Quit: WeeChat 1.2]
moeabdol1 has quit [Ping timeout: 250 seconds]
pawnbox has joined #ruby
aces1up has joined #ruby
<aces1up> anyone here good with nokogiri?
<aces1up> i am trying to add a node right before the closing </body> tag of an html document
<aces1up> example here : http://pastebin.com/w0uHHWzi
<ruboto> aces1up, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/949d9574059afab9e299
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<Ox0dea> aces1up: Do you solemnly swear that you're up to no good?
<aces1up> yes
<Ox0dea> There's probably a better way to inject your JavaScript.
sanjayu has joined #ruby
devbug has quit [Read error: Connection reset by peer]
webguynow has quit [Ping timeout: 260 seconds]
webguynow has joined #ruby
cb_ has quit [Remote host closed the connection]
contradictioned has quit [Remote host closed the connection]
cb_ has joined #ruby
BlackCoyote has quit [Remote host closed the connection]
rurik has quit [Ping timeout: 240 seconds]
roxtrongo has joined #ruby
sanjayu has quit [Ping timeout: 272 seconds]
rurik has joined #ruby
youngbaks has joined #ruby
karapetyan has quit [Remote host closed the connection]
iamninja has joined #ruby
karapetyan has joined #ruby
michael_mbp has quit [Excess Flood]
chouhoulis has joined #ruby
futilegames has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
iamninja has quit [Ping timeout: 268 seconds]
lkba has quit [Remote host closed the connection]
karapetyan has quit [Ping timeout: 246 seconds]
chouhoulis has quit [Ping timeout: 240 seconds]
michael_mbp has joined #ruby
youngbaks has quit [Ping timeout: 246 seconds]
howdoico1 has quit [Ping timeout: 240 seconds]
sotojuan has quit [Quit: Bye!]
<aces1up> apeiros I looked through that, doesn't seeem to show what I want.
<apeiros> it does. but what did you try so far?
<apeiros> I mean it doesn't show you a ready-recipe for your use-case, but the relevant things are there.
DoubleMalt has joined #ruby
<aces1up> nothing but from reading, i do not see any functions that would do what i want, sorry if i'm not seeing it, i will read through it again.
moeabdol1 has joined #ruby
moeabdol1 has quit [Client Quit]
<apeiros> aces1up: add_child is one method to do what you want
<aces1up> add child would add from opening tag of whatever node i select correct?
<apeiros> what does "add from opening tag" mean?
<apeiros> it appends a child to the node you call it on
moeabdol has joined #ruby
futilegames has quit [Quit: futilegames]
iamninja has joined #ruby
<aces1up> so i would have to traverse the whole document to detect the node right before the closing <body> so i can add a child to that node?
jkladfs has joined #ruby
pawnbox has quit [Remote host closed the connection]
<apeiros> aces1up: no. adding a child is not adding after. adding a child is within the node.
<aces1up> I see
pawnbox has joined #ruby
mosez has quit [Quit: Switching back to real life]
<apeiros> after/before is a sibling relation, not child/parent
devyn has quit [Ping timeout: 265 seconds]
<aces1up> thanks apeiros that cleared up siblings / child relationship for me
devyn has joined #ruby
youngbaks has joined #ruby
lxsameer has joined #ruby
mosez has joined #ruby
workmad3 has joined #ruby
stan has joined #ruby
mosez has quit [Client Quit]
mosez has joined #ruby
mosez has quit [Client Quit]
UtkarshRay has quit [Ping timeout: 240 seconds]
youngbaks has quit [Ping timeout: 255 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
jgt1 has quit [Ping timeout: 265 seconds]
<apeiros> aces1up: still not solved?
mosez has joined #ruby
ledestin has joined #ruby
mosez has quit [Client Quit]
<moeabdol> how would someone get the attributes names of a webservice method using savon?
mosez has joined #ruby
jgt1 has joined #ruby
devyn has quit [Ping timeout: 264 seconds]
ramfjord has quit [Ping timeout: 252 seconds]
nofxx has quit [Ping timeout: 246 seconds]
<Ox0dea> moeabdol: Are you being punished?
<moeabdol> Ox0dea: lol...I don't get what you mean?
einarj has joined #ruby
<moeabdol> am I doing something wrong posting my questions here?
<apeiros> moeabdol: having to use a soap interface is considered punishment by some (many?)
<apeiros> your question is fine here
lkba has joined #ruby
<moeabdol> apeiros: oh thanks...I thought using soap savon is the proper way to communicate with web-services.
Tempesta has quit [Quit: AdiIRC is updating to v1.9.7 Beta Build (2015/09/17) 32 Bit]
<moeabdol> apeiros: oh! and I'm not a guru by any means
<moeabdol> just a newbie
Tempesta has joined #ruby
quazimodo has quit [Ping timeout: 240 seconds]
<apeiros> moeabdol: ah it's not the choice of your tools. it's soap interfaces themselves. many consider them to be painful to use. don't mind that comment.
<moeabdol> apeiros: how would you personally tackle web-services?
Coldblackice has quit [Ping timeout: 240 seconds]
<apeiros> writing one or using an existing one?
einarj has quit [Ping timeout: 240 seconds]
<moeabdol> apeiros: using an existing one
Tempesta has quit [Client Quit]
<apeiros> savon is a fine choice then I think
devyn has joined #ruby
stan has quit [Ping timeout: 272 seconds]
Tempesta has joined #ruby
<moeabdol> apeiros: but then coming back to my original problem. I can't seem to successfully call the webservice. It keeps asking me for an attribute which I have provided.
<moeabdol> I'll share my code if you don't mind
spider-mario has joined #ruby
<shevy> yes!
<shevy> share code, pants and house
stardiviner has quit [Ping timeout: 240 seconds]
<moeabdol> do you know any good sites to share ruby code? :)
<Ox0dea> ?gist moeabdol
<ruboto> moeabdol, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
Coldblackice has joined #ruby
<Ox0dea> moeabdol: It seems like you just need to call #hash on your Savon::Response, no?
yfeldblum has quit [Ping timeout: 240 seconds]
stamina has joined #ruby
<moeabdol> I'm calling the service using the call method
<Ox0dea> And getting back a Response, right?
<moeabdol> client.call(:get_cities_by_country, message: { country_name: "england" })
sp4rrow has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stardiviner has joined #ruby
<Ox0dea> moeabdol: Do you know how to check the class of an object?
<moeabdol> Ox0dea: object.superclass
<moeabdol> here is my gist
<Ox0dea> moeabdol: Change Line 6 to `p cities_info.hash`.
BaroMeter has quit [Quit: Leaving]
Coldblackice has quit [Read error: Connection reset by peer]
<moeabdol> Ox0dea: same issue. the output is: 'getWCity' expects parameter @CountryName
<Ox0dea> Lovely. In that case, it seems the problem is you've not properly set up whatever facility this thing provides for converting from :country_name to @CountryName.
Coldblackice has joined #ruby
BaroMeter has joined #ruby
<Ox0dea> I saw something about there being a default converter, but maybe it's not being invoked.
<Ox0dea> Or something.
youngbaks has joined #ruby
<shevy> >> RubyVM.object_id
<ruboto> shevy # => 545551670 (https://eval.in/436277)
<shevy> >> RubyVM.object_id
<ruboto> shevy # => 547271990 (https://eval.in/436278)
<shevy> hmmm
<shevy> does the bot respawn a new RubyVM object?
<Ox0dea> It's a different Ruby process each time.
karapetyan has joined #ruby
<shevy> it was originally based on charliesome's code right? I am watching the wicked ruby talk
chouhoulis has joined #ruby
<Ox0dea> >> $$
<ruboto> Ox0dea # => 11533 (https://eval.in/436279)
<Ox0dea> >> $$
<ruboto> Ox0dea # => 11537 (https://eval.in/436280)
<Ox0dea> It's a new process each time.
Finder has joined #ruby
<Ox0dea> eval.in is still charliesome's code, as I understand it.
subshad has joined #ruby
<shevy> hmm
<Ox0dea> I'm gonna roll. Fingers crossed for somethin' good.
justin_pdx has quit [Quit: justin_pdx]
<Ox0dea> >> [*ObjectSpace.each_object].sample 3
<ruboto> Ox0dea # => [Enumerator, "rdoc/stats/normal.rb", []] (https://eval.in/436281)
<Ox0dea> Nice.
karapetyan has quit [Ping timeout: 240 seconds]
<moeabdol> Ox0dea: the convention is converting CountryName to country_name as shown in savon's site examples
<shevy> lol
<shevy> Ox0dea is in a lottery
BaroMeter has quit [Quit: Leaving]
chouhoulis has quit [Ping timeout: 250 seconds]
devoldmx has joined #ruby
<Ox0dea> moeabdol: I figured as much, but that conversion doesn't seem to be taking place for you.
<Ox0dea> shevy: What I wonder is why, at least back when I played with it on 1.9, FrozenCore.object_id was RubyVM.object_id + 60 with remarkable consistency.
Finder has left #ruby [#ruby]
BaroMeter has joined #ruby
<Ox0dea> I suspect his casting such a broad net was mostly just precaution, for lack of a better term.
devoldmx has quit [Ping timeout: 240 seconds]
Juanchito has joined #ruby
tomphp has joined #ruby
nodestaff has joined #ruby
<nodestaff> #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
<nodestaff> #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
<nodestaff> #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
<nodestaff> #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
<nodestaff> #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
<nodestaff> #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
<nodestaff> #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
<nodestaff> #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
<nodestaff> #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
<nodestaff> #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
<nodestaff> #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
<nodestaff> #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
<nodestaff> #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
<nodestaff> #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
nodestaff has left #ruby [#ruby]
tomphp has quit [Client Quit]
<shevy> what's with those webchatters ... [nodestaff] (92b91fd6@gateway/web/freenode/ip.146.185.31.214) - http://webchat.freenode.net
urrr has joined #ruby
DmitryBochkarev has quit [Ping timeout: 240 seconds]
<moeabdol> Ox0dea: thanks! I'll try to figure this out and let you know :)
<Ox0dea> moeabdol: Apologies for not being terribly interested in digging much further. :x
<moeabdol> Ox0dea: you've been awesome. Thanks :)
DmitryBochkarev has joined #ruby
<Ox0dea> Happy to have been of some help.
Coldblackice has quit [Read error: Connection reset by peer]
<Ox0dea> When you do manage to get the thing to send you something back, that #hash method should show you all the attributes you were interested in in your initial question.
bruno- has joined #ruby
araujo_ has quit [Ping timeout: 255 seconds]
tomphp has joined #ruby
araujo_ has joined #ruby
tkuchiki has joined #ruby
aswen has joined #ruby
Mon_Ouie has quit [Ping timeout: 246 seconds]
bruno- has quit [Ping timeout: 250 seconds]
pecpec has joined #ruby
drewvanstone has joined #ruby
tkuchiki has quit [Remote host closed the connection]
araujo_ has quit [Quit: Leaving]
araujo has joined #ruby
[k- has joined #ruby
solocshaw has joined #ruby
hackeron_ has quit [Ping timeout: 246 seconds]
A124 has quit [Read error: No route to host]
drewvanstone has quit [Ping timeout: 252 seconds]
A124 has joined #ruby
hackeron has joined #ruby
Coldblackice has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
Coldblackice has quit [Read error: Connection reset by peer]
apt-get has joined #ruby
Coldblackice has joined #ruby
Mon_Ouie has joined #ruby
drewvanstone has joined #ruby
MyMind has joined #ruby
karapetyan has joined #ruby
fantazo has joined #ruby
Sembei has quit [Ping timeout: 246 seconds]
mprelude has joined #ruby
drewvanstone has quit [Ping timeout: 252 seconds]
charliesome has joined #ruby
zenguy_pc has joined #ruby
jkladfs has quit [Quit: WeeChat 1.3]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
youngbaks has quit [Ping timeout: 268 seconds]
karapetyan has quit [Ping timeout: 240 seconds]
tockitj has joined #ruby
tockitj has quit [Changing host]
tockitj has joined #ruby
startupality has joined #ruby
<shevy> bot downloads on rubygems confuse me
<shevy> I could swear that there are more downloads for projects that were already downloaded more times than before.
davedev2_ has joined #ruby
<Ox0dea> shevy: Do you suspect some sort of collusion or something?
<[k-> maybe rubygems is trying to filter out bot downloads?
lkba has quit [Remote host closed the connection]
<[k-> clu
<[k-> collusion* has such a scary definition
<Ox0dea> !define collude
<[k-> collude: collaborating with someone, in the dark
<[k-> ynonyms:conspire, connive, intrigue, be hand in glove, plot, participate in a conspiracy,collaborate, scheme; More
<[k-> informalbe in cahoots;
<[k-> raremachinate, cabal, complot
<[k-> "corrupt border officials colluded with the importers of dubious goods"
<shevy> Ox0dea well, no... just that the download statistics seem to be changing and I don't quite know how
lulzmachine has joined #ruby
wookiehangover has quit [Ping timeout: 240 seconds]
<shevy> like say, you push a new gem onto rubygems
<shevy> ok so the first downloads in the coming ~10 minutes or so will 99,9% of the time be bots
<Ox0dea> Sounds about right.
<Ox0dea> [k-: Do you know "clandestine"?
<shevy> But, for a project that already has had several releases before... or for a project that perhaps is after a certain size-threshold ... there seem to be significantly more downloads, both in those early stages (like 10 minutes), but also overall... and I don't know why
sanjayu has joined #ruby
<shevy> I am like studying bot-architecture indirectly here
bazbing80 has quit [Ping timeout: 250 seconds]
<Ox0dea> shevy: I think you're looking for Zipf's law.
chouhoulis has joined #ruby
<Ox0dea> Maybe watch this at greater than 1x, but it's got some good parts: https://www.youtube.com/watch?v=fCn8zs912OE
<shevy> I'd love to get some way to filter away bot downloads :(
<[k-> i linked that video yesterday, but you seemed to be inactive :(
<Ox0dea> shevy: The popularity of this video on Zipf's law took the word "quizzaciously" from having a single Google result to >300k in ~5 days.
<Ox0dea> I think that might have some relevance to the perceived disparity in bot downloads.
allcentury has joined #ruby
<shevy> huh
<[k-> clandestine is such an evil word
<Ox0dea> I like it a lot.
<[k-> you like all big words
<Ox0dea> No, certainly not all of them.
<shevy> certainty
<Ox0dea> That was rude.
<[k-> so you like evil words?!
<Ox0dea> I reject the premise on its face.
chouhoulis has quit [Ping timeout: 255 seconds]
wookiehangover has joined #ruby
unop has joined #ruby
youngbaks has joined #ruby
AndroUser2 has joined #ruby
<[k-> you like words that look seemingly innocent, yet harbours such evil definitions?
einarj has joined #ruby
cndiv has quit [Remote host closed the connection]
<[k-> a collection of words and phrases by me
tobukiah has quit [Read error: Connection reset by peer]
Ox0dea has quit [Read error: Connection reset by peer]
<[k-> oh dear, it seems that clandestine is in the collection
Ox0dea has joined #ruby
<[k-> i went to add it in again because i didnt know...
tobukiah has joined #ruby
AndroUser2 has quit [Ping timeout: 250 seconds]
pecpec has quit [Ping timeout: 240 seconds]
yashinbasement has joined #ruby
workmad3 has joined #ruby
apt-get_ has joined #ruby
ruurd has joined #ruby
mercerist has joined #ruby
codecop has quit [Remote host closed the connection]
apt-get has quit [Ping timeout: 246 seconds]
subshad has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 272 seconds]
workmad3 has joined #ruby
fungal has joined #ruby
riffraff has joined #ruby
workmad3 has quit [Ping timeout: 268 seconds]
k3asd` has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
einarj has quit [Remote host closed the connection]
mercerist has quit [Read error: Connection reset by peer]
urrr has quit [Quit: Leaving]
mercerist has joined #ruby
rikkipitt has joined #ruby
pwnd_nsfw has joined #ruby
BaroMeter has quit [Quit: Leaving]
workmad3 has joined #ruby
sanjayu has quit [Ping timeout: 264 seconds]
ruurd has quit [Quit: ZZZzzz…]
riffraff has quit [Quit: This computer has gone to sleep]
rikkipitt has quit [Read error: Connection reset by peer]
Coldblackice has quit [Ping timeout: 264 seconds]
riffraff has joined #ruby
k3asd` has quit [Ping timeout: 264 seconds]
devoldmx has joined #ruby
workmad3 has quit [Ping timeout: 268 seconds]
[k-_ has joined #ruby
aswen has quit [Ping timeout: 260 seconds]
brendan- has joined #ruby
apt-get_ has quit [Quit: Quit]
apt-get has joined #ruby
iyan has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
tomphp has joined #ruby
radgeRayden_ has quit [Ping timeout: 264 seconds]
SCHAAP137 has joined #ruby
sdothum has joined #ruby
platzhirsch has quit [Ping timeout: 265 seconds]
chouhoulis has joined #ruby
apt-get has quit [Ping timeout: 250 seconds]
chouhoulis has quit [Ping timeout: 246 seconds]
DoubleMalt has quit [Remote host closed the connection]
beast has quit [Quit: Leaving]
riffraff has quit [Quit: Leaving]
<shevy> those contributors code of conducts are weird
youngbaks has quit [Ping timeout: 250 seconds]
<Ox0dea> Do you reckon you might have trouble abiding by them?
<shevy> I can't sacrifice cats
<Ox0dea> What is the plural of "terms of service"?
<Ox0dea> "Termses"?
ruurd has joined #ruby
<shevy> how many individual term are in a terms?
<Ox0dea> That doesn't seem entirely pertinent.
<Ox0dea> If I'm contractually bound by both Foo's and Bar's terms of service, do I not have two termses of services by which to abide?
banister has quit [Read error: Connection reset by peer]
ruurd has quit [Client Quit]
youngbaks has joined #ruby
frmendes has joined #ruby
<shevy> yeah!
<shevy> and if they have conflicting terms, you must fulfil all of them!
howdoi has joined #ruby
<[k-_> excuse mua, but termses of service is obviously wrong
<[k-_> if you would just keep to terms of service/s/ like you did above
<Ox0dea> [k-_: So the plural of "terms" is "terms"?
<[k-_> yes
<[k-_> the plural of cats is still cats
<[k-_> apparently i pinged someone :<
<Ox0dea> No, "cats" is already plural.
<[k-_> terms is also already plural
<Ox0dea> "Terms of service" is a singular phrase.
<[k-_> yes, because of service
<Ox0dea> No, because it's *a* collection.
<[k-_> yes, of a service
fungal has quit [Ping timeout: 272 seconds]
<Ox0dea> But we're talking about the terms?
<[k-_> there can be one term, or two terms
<Ox0dea> That has no bearing on the singularity of the collection.
solocshaw has quit [Ping timeout: 240 seconds]
<[k-_> terms is already plural
<[k-_> a term is a statement dictating how you would behave
<[k-_> and there are many statements in a tos
<Ox0dea> > a tos
<[k-_> yes, of a service
<shevy> how about
<shevy> terms of cats
<[k-_> of **_/a/_** service
<shevy> and
<shevy> term of cat
<Ox0dea> [k-_: Please pluralize "a tos".
<Ox0dea> "2 tos", then?
<shevy> one alot, lotsa alots
<[k-_> terms of services, TOS(e)s
<Ox0dea> Aha!
<shevy> what is with the parens there :)
<Ox0dea> [k-_: So you think we should "double pluralize" "services" rather than "terms"?
<Ox0dea> It's "attorneys general", not "attorney generals".
solocshaw has joined #ruby
<[k-_> yes.
<shevy> attorneys generals
rurik has quit [Ping timeout: 240 seconds]
<Ox0dea> [k-_: Ergo, your "TOS(e)s" from above should actually be "TsOS", and since the T there is "terms", we get "termses".
<Ox0dea> QED, motherfacer.
<Ox0dea> <3
<[k-_> er, no
<[k-_> what's the context here?
rurik has joined #ruby
<Ox0dea> Tomfoolery at best.
<[k-_> terms of service of different companies?
<Ox0dea> I do think it's an interesting linguistic anomaly, mind.
<tobukiah> I do think it's an / interesting linguistic / anomaly, mind.
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> Ha!
<[k-_> you have to define a context
<Ox0dea> [k-_: Do you agree that "terms of service" is singular, insofar as it only refers to the one collection/document?
k3asd` has joined #ruby
k3asd` has quit [Changing host]
k3asd` has joined #ruby
tomphp has joined #ruby
<shevy> it could refer to a collection of work
apt-get has joined #ruby
<[k-_> yes
sepp2k has joined #ruby
<Ox0dea> [k-_: Now, to what does "two terms of service" refer?
<Ox0dea> Any sensible interpretation of the thing need not introduce a second collection/document, correct?
<[k-_> terms of [multiple] services
<Ox0dea> Bollocks.
<[k-_> as i said, you need to define a context
c355E3B has joined #ruby
<Ox0dea> What phrase is available to us to unambiguously refer to two distinct terms of service in the same breath?
<[k-_> there cannot be two distinct terms of service if they are not from different services
youngbaks has quit [Ping timeout: 268 seconds]
<Ox0dea> "By fooing, you have violated no less than six t_____s of s______!"
<Ox0dea> Fill in the blanks.
FernandoBasso has joined #ruby
<Ox0dea> (And correct my grammatical error.)
linuxboytoo has quit [Ping timeout: 244 seconds]
<[k-_> terms of the service
kirun has joined #ruby
<[k-_> was it that difficult to provide a context?
einarj has joined #ruby
wildlander has joined #ruby
<Ox0dea> [k-_: I thought we'd already established that there are multiple services?
bubuntu has quit [Ping timeout: 255 seconds]
bubuntu has joined #ruby
<[k-_> the sentence above does not provide the neccessary context that there are multiple services
Ropeney has quit [Quit: Leaving]
<[k-_> a ~ Infinity
<Ox0dea> > helpful to nerds like me who read Terms of Service (Termses of Service? Terms of Servii?)
<Ox0dea> Google says there is one other person out there who's with me on this one.
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Mon_Ouie has quit [Ping timeout: 250 seconds]
<[k-_> please give proper context on what you want!!!
linuxboytoo has joined #ruby
<Ox0dea> I'm off to the dictionary of obscure sorrows to find out what to call this feel.
einarj has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
brendan- has quit [Ping timeout: 264 seconds]
<[k-_> By fooing, you have violated no less than six terms stated in the terms of service
<[k-_> By fooing, you have violated six terms of services of different companies!
The_Phoenix1 has joined #ruby
nfk has joined #ruby
<Ox0dea> [k-_: In the first, you're referring to the terms themselves, not the document as a whole.
<Ox0dea> And in the latter, you're pluralizing the services, but I'm asking about the terms.
<[k-_> By fooingm you have violated six terms in six terms of services of different services each
<Ox0dea> [k-_: Yes, that one!
<Ox0dea> How to say that more succinctly?
startupality has quit [Quit: startupality]
<[k-_> you cant, or there would be ambiguity
bruno- has joined #ruby
<Ox0dea> Not if "termses" were acceptable.
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
<[k-_> you'd have to educate the masses on what's the difference between termses and services
scripore has joined #ruby
startupality has joined #ruby
rurik has quit [Ping timeout: 240 seconds]
User458764 has joined #ruby
The_Phoenix has quit [Ping timeout: 260 seconds]
meatherly has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
<[k-_> and, i strongly object to termses
<[k-_> never have i seen a more uglier word
Pisuke has joined #ruby
jxv has joined #ruby
<Ox0dea> I shall draw a picture.
MyMind has quit [Ping timeout: 240 seconds]
Kallis has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
rurik has joined #ruby
freerobby has joined #ruby
solocshaw has joined #ruby
<Ox0dea> Imagine a fellow with two documents plainly visible on his desk and a colleague seated opposite. "We have to follow these two terms of service, Jim," the desk-haver says to his aforementioned colleague.
<Ox0dea> Now, would it make sense for Jim's colleague to ask "which two?"?
Kallis has quit [Read error: Connection reset by peer]
<Ox0dea> You can take it for given that John has perfect vision.
<[k-_> it would not make sense
<[k-_> people are not that particular
<Ox0dea> Then you concede that "terms of service" is singular?
petersaints has quit [Quit: ZNC - http://znc.in]
dreadnought8971 has joined #ruby
<[k-_> i already said it was singular
<[k-_> i believe terms of services is still correct.
fantazo has quit [Quit: Verlassend]
Ropeney has joined #ruby
dreadnought8971 has quit [Remote host closed the connection]
mercerist has quit [Read error: Connection reset by peer]
<Ox0dea> <span style="font-size: 0.001pt;">Yeah, I suppose you're right.</span>
Azure has joined #ruby
dreadnought8971 has joined #ruby
codenapper has joined #ruby
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #ruby
Kallis has joined #ruby
karapetyan has joined #ruby
Narzew has joined #ruby
chouhoulis has joined #ruby
aces1up has quit []
Mon_Ouie has joined #ruby
dreadnought8971 has quit [Remote host closed the connection]
stardiviner has joined #ruby
devoldmx has joined #ruby
drewvanstone has joined #ruby
petersaints has joined #ruby
petersaints has quit [Remote host closed the connection]
chouhoulis has quit [Ping timeout: 260 seconds]
<[k-_> yes, it's obviously the most logical conclusion
lxsameer has quit [Ping timeout: 260 seconds]
devoldmx has quit [Ping timeout: 250 seconds]
petersaints has joined #ruby
PublicSubnet has joined #ruby
workmad3 has joined #ruby
<Ox0dea> [k-_: I would still argue that it's irregular to pluralize the adjective and not the noun (we don't say "attorney generals", remember), but this is English.
drewvanstone has quit [Ping timeout: 252 seconds]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
mprelude has quit [Ping timeout: 252 seconds]
karapetyan has quit [Remote host closed the connection]
PublicSubnet has quit [Read error: Connection reset by peer]
PublicSubnet has joined #ruby
<[k-_> of course, i do not care about the classes of words
<[k-_> adjective? servicing terms?
<[k-_> general attorneys?
workmad3 has quit [Ping timeout: 260 seconds]
jxv has quit [Remote host closed the connection]
mission712 has joined #ruby
chills42 has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
<[k-_> terms for service?
blur3d has quit [Quit: blur3d]
<[k-_> i would argue that service is a noun in this case
<Ox0dea> You skipped the "of".
<[k-_> yes, terms belonging to this service
<[k-_> terms belonging to me
<[k-_> terms belonging to Alfred
<[k-_> @.@
frmendes has quit [Read error: Connection reset by peer]
minimalism has quit [Quit: leaving]
<Ox0dea> I wonder how the fellow who designed Ithkuil would weigh in on the matter.
solocshaw has joined #ruby
<Ox0dea> I gather he constructed the language with utmost precision foremost amongst the design goals.
gregf has quit [Quit: WeeChat 1.3]
<shevy> what is Ithkuil, the webframework of Cthulhu?
<Ox0dea> Close enough.
<Ox0dea> Ithkuil is kind of like Python.
<Ox0dea> "There should be one-- and preferably only one --obvious way to say it."
martin_work has joined #ruby
DoubleMalt has joined #ruby
frmendes has joined #ruby
chills42 has quit [Read error: Connection reset by peer]
chills42 has joined #ruby
gregf has joined #ruby
zapata has quit [Ping timeout: 240 seconds]
<[k-_> this will never get accepted by programmers
<shevy> but python became so popular
icbm has joined #ruby
leafybasil has quit [Remote host closed the connection]
platzhirsch has joined #ruby
davispuh has joined #ruby
k3asd` has quit [Remote host closed the connection]
aswen has joined #ruby
chills42 has quit [Remote host closed the connection]
mprelude has joined #ruby
Narzew has quit [Remote host closed the connection]
frmendes has quit [Quit: Textual IRC Client: www.textualapp.com]
bruno- has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
rushed has joined #ruby
jxv has joined #ruby
zapata has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
aswen has quit [Ping timeout: 260 seconds]
sdothum has joined #ruby
futilegames has joined #ruby
Poussinou has joined #ruby
leafybasil has joined #ruby
krz has joined #ruby
mistnim has joined #ruby
<mistnim> >> a = [[0,0,0]*3]; a[0][0] = 1; p a
<ruboto> mistnim # => [[1, 0, 0, 0, 0, 0, 0, 0, 0]] ...check link for more (https://eval.in/436311)
<arup_r> This is Rails code. But I want to refactor it, so thought lets ask here. As nothing Rails you can see, it is mostly ruby. Can you give me some tips about refactoring? https://gist.github.com/aruprakshit/49b1d37062a13ca426d2 Let me know if I am not allowed to ask this here, I will then move it to ror channel
iyan has quit [Ping timeout: 265 seconds]
<mistnim> >> a = [[0,0,0]]*3; a[0][0] = 1; p a
<ruboto> mistnim # => [[1, 0, 0], [1, 0, 0], [1, 0, 0]] ...check link for more (https://eval.in/436312)
zenguy_pc has joined #ruby
<mistnim> why does the 1 gets assigned to all the rows?
<arup_r> >> a = [[0,0,0]]*3; p a.map(&:object_id)
<ruboto> arup_r # => [541886540, 541886540, 541886540] ...check link for more (https://eval.in/436313)
<arup_r> this is why
<arup_r> mistnim: ^^
<mistnim> ops
<[k-_> favouriteable?
<[k-_> favourable?
<arup_r> favouriteable
<[k-_> that isnt a word
<arup_r> [k-: Let me tell you the story in brief
<arup_r> one min
yashinbasement has quit [Quit: Leaving]
<mistnim> arup_r: what is that & for?
petersaints has quit [Quit: ZNC - http://znc.in]
<arup_r> I have some Assets -- which are Project or Folder or Videos ... And you can favourite/bookmark only asset types which are projects. Now there are 3 types of urls hits the same Rails controller action and views. And the favourite column I want to hide for all pages but not projects
atomical has joined #ruby
Encapsulation has quit [Quit: Leaving]
petersaints has joined #ruby
sanjayu has joined #ruby
<arup_r> That is how I am able to code it.. but if..else logic is ugly
<arup_r> that is why asking if can be written much better way
<arup_r> mistnim: Read to_proc
<arup_r> mistnim: You want Array.new(n) {}
Poussinou has quit [Quit: ChatZilla 0.9.92 [Firefox 40.0.3/20150826023504]]
<mistnim> arup_r: thanks
<Ox0dea> mistnim: Do you understand what happened?
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<[k-_> arup_r: i spy with my little eye, your involvement in this thread
<mistnim> Ox0dea: I guess I made an array with the same object three times
<Ox0dea> mistnim: That's right.
wookiehangover has quit [Ping timeout: 240 seconds]
chouhoulis has joined #ruby
<arup_r> [k-: you are right
<[k-_> such ruby laziness
rurik has quit [Read error: Connection reset by peer]
sanjayu has quit [Ping timeout: 250 seconds]
wookiehangover has joined #ruby
atmosx has quit [Ping timeout: 250 seconds]
contradictioned has joined #ruby
krz has quit [Quit: WeeChat 1.2]
<arup_r> [k-: I had a good answer on this topic on Stackoveflow.com
<arup_r> but not able to find it out atm :
<arup_r> :(
krz has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
<arup_r> but it is not what I was searching..
<arup_r> I have the exact answer what mistnim asked
<arup_r> anyway you can mistnim you can read that also
ruurd has joined #ruby
dstarh has joined #ruby
krz has quit [Quit: WeeChat 1.2]
<mistnim> thanks arup_r, btw I'm reading a beginner ruby book explaining the syntax of exceptions, but I still don't understand where to use them, where not to use them, and how to use them in geneal. Can you point me to something more in depth?
UtkarshRay has joined #ruby
<arup_r> mistnim: I started with well grounded Rubyist it helped me a lot
<arup_r> writer David A Black
<mistnim> thanks arup_r, I'll look into it
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<arup_r> You read the book,,You will get the sweet concept ... Gurantee :D
rurik has joined #ruby
havenwood has joined #ruby
pecpec has joined #ruby
contradictioned has quit [Remote host closed the connection]
sdr995 has joined #ruby
gizmore has joined #ruby
<sdr995> Hi. The regexp /\w+/ matches one or more word characters. What does the word 'matches' mean here?
contradictioned has joined #ruby
<shevy> it'll return non nil
<shevy> and if you use (), then you can grab the match itself
<shevy> >> "abc".match(/(\w)/)[1]
<ruboto> shevy # => "a" (https://eval.in/436318)
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> sdr995: With regular expressions, we "match" the patterns we'd like to extract from some text.
oitnelis has quit [Ping timeout: 244 seconds]
arup_r has quit [Ping timeout: 240 seconds]
<sdr995> 0x0dea: so "match" means "find a match for"?
pecpec has quit [Ping timeout: 244 seconds]
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
f4cl3y has quit [Ping timeout: 250 seconds]
<Ox0dea> sdr995: Perhaps it'll be more illustrative to think of "match" as "extract" for the time being.
<Ox0dea> >> "this is a string and there's a 314-1592-653 phone number hidden inside".match /\d+-\d+-\d+/
<ruboto> Ox0dea # => #<MatchData "314-1592-653"> (https://eval.in/436319)
tjohnson has joined #ruby
ericjphillips has joined #ruby
<[k-_> "fits a pattern"
saddad has joined #ruby
<[k-_> "is in this form or shape"
pwnd_nsfw has quit [Ping timeout: 240 seconds]
<shevy> "be like water my friend" - bruce lee
<Ox0dea> Why would I water your friend?
<shevy> water your friend!
<Ox0dea> You asked me to water your friend.
<[k-_> and your friend is not "your friend" in my context
<shevy> your friend
<Ox0dea> In any case, don't water people.
frmendes has joined #ruby
<Ox0dea> "Let's eat Susan!" vs. "Let's eat, Susan."
<Ox0dea> Commas save lives.
<shevy> I, understand.
sanjayu has joined #ruby
podman has joined #ruby
petersaints has quit [Quit: I'll be back!]
<[k-_> such a powerful sentence, shevy
<sdr995> 0x0dea: Can we also say "314-1592-653".match(/\d{3}-\d{4}-\d{3}/) can be interpreted as "find a match for /\d{3}-\d{4}-\d{3}/ inside the string?
<apeiros> I, robot?
<apeiros> sdr995: yes, but s/a/the first/
keen_ has joined #ruby
petersaints has joined #ruby
modern has joined #ruby
<[k-_> apeiros: that is not powerful
<sdr995> What about wildcards? When we say "? matches any single character" do we mean the "? represents any single character" or "? finds any single character"?
tomphp has joined #ruby
<apeiros> sdr995: uh? "?" does not match characters. ? is a quantifier for the preceding pattern.
<sdr995> apeiros: I mean as a wildcard, not a regexp. In the command line.
<apeiros> "." matches any single character (except \n if used without //m flag)
Mon_Ouie has quit [Quit: WeeChat 1.3]
<apeiros> sdr995: you mean in a glob expression?
<sdr995> aperios: Yup.
<shevy> I, phone.
<apeiros> sdr995: what's the difference between "represents" and "finds" there?
yottanami has joined #ruby
<yottanami> Hey all
<apeiros> hi yottanami
<Ox0dea> Phone be like: "Water my friend."
shinnya has joined #ruby
<sdr995> apeiros: I'm not sure. That's why I'm asking. What exactly do we mean by 'matches'? 'finds' or 'represents'?
<apeiros> Ox0dea: the phone's friend is a plant?
<Ox0dea> I be like: "But that'll damage the circuitry!"
<Ox0dea> Phone be like: "DILLIGAF?"
symm- has joined #ruby
<yottanami> I want to connect to a WSDL web API so I used savon client = Savon.client(wsdl: "http://URL") but in client.operations I got this error:
<apeiros> sdr995: "it fits the description"
<yottanami> NoMethodError: undefined method `element_children' for nil:NilClass from /home/yottanami/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/wasabi-3.5.0/lib/wasabi/parser.rb:311:in `sections'
umgrosscol has joined #ruby
<apeiros> "a man" matches any man in a group of people
<apeiros> "a man with blonde hair" matches any man with blond hair in a group of people
<yottanami> How should I fix it?
<apeiros> "any character from a-z" matches "a", "f", "z" and 23 other characters from the alphabet.
<sdr995> apeiros: So it just means 'is the same as' right?
<apeiros> no
<apeiros> "a-z" is hardly *the same* as "a"
arup_r has joined #ruby
<apeiros> "a" matches "a", and that would be one case where the pattern is the same as the matched value.
<[k-_> it fits, it falls under, it can be categorised under, classified under, is apart of, is included in
<apeiros> "a-z" is a pattern which differs from what it matches. it's a description.
<apeiros> "a man with blonde hair" is not the same as "ralph, that man which has blonde hair" (and thus matches "a man with blonde hair")
Hrorek has joined #ruby
rurik has quit [Read error: Connection reset by peer]
krz has joined #ruby
havenwood has quit [Ping timeout: 268 seconds]
gregf has quit [Quit: WeeChat 1.3]
<sdr995> apeiros: Alright.
<apeiros> yottanami: sounds like the url you point it at is not a a WSDL
<apeiros> either that or wasabi has a bug which prevents it from parsing that wsdl
<sdr995> What's the best book to learn Ruby?
<apeiros> good old "define best"
tno has joined #ruby
<apeiros> but I wouldn't know even with a definition :)
<[k-_> ?best
<ruboto> "Best" and "better" are subjective. Try to use a different term.
<sdr995> Okay... what are some good books for learning ruby?
<apeiros> ?books sdr995
<ruboto> sdr995, You can find a list of recommended books at http://ruby-community.com/pages/links
<yottanami> apeiros, Is any other tools to check it?
<apeiros> if you find other books, please open an issue and/or a pull request
futilegames has quit [Quit: futilegames]
<apeiros> yottanami: I don't know of any. I'd probably google for "web wsdl"
apt-get has quit [Ping timeout: 250 seconds]
Balzrael has joined #ruby
<apeiros> +checker validator whatever
sdr995 has left #ruby [#ruby]
frmendes has quit [Read error: Connection reset by peer]
gizmore has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Oka has quit [Quit: o/]
davedev2_ has quit []
martin_work has quit [Quit: martin_work]
workmad3 has joined #ruby
David27 has joined #ruby
rippa has joined #ruby
c355E3B has quit [Quit: Connection closed for inactivity]
freerobby has quit [Quit: Leaving.]
workmad3 has quit [Ping timeout: 264 seconds]
yardenbar has quit [Ping timeout: 250 seconds]
chouhoulis has joined #ruby
<pontiki> i've got a couple of books to add
devoldmx has joined #ruby
apt-get has joined #ruby
platzhirsch has quit [Ping timeout: 255 seconds]
davispuh has quit [Read error: Connection reset by peer]
krz has quit [Quit: WeeChat 1.2]
Mon_Ouie has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
devoldmx has quit [Ping timeout: 240 seconds]
robwri32 has joined #ruby
<apeiros> pontiki: PR :)
Guest61 has joined #ruby
Balzrael has quit [Read error: No route to host]
meatherly has quit []
f4cl3y has joined #ruby
<pontiki> i'm on it
solocshaw has quit [Ping timeout: 246 seconds]
pauly_oc has quit [Ping timeout: 264 seconds]
Balzrael has joined #ruby
Balzrael has quit [Client Quit]
Guest61 has quit [Quit: Textual IRC Client: www.textualapp.com]
Balzrael has joined #ruby
robwri32_ has joined #ruby
freerobby has joined #ruby
solocshaw has joined #ruby
OrbitalKitten has joined #ruby
frmendes has joined #ruby
mission712 is now known as mission712[AFK]
krz has joined #ruby
freerobby has quit [Client Quit]
ekain has joined #ruby
yottanami has quit [Quit: Leaving]
krz has quit [Client Quit]
Hrorek has quit [Read error: Connection reset by peer]
rurik has joined #ruby
symm- has quit [Ping timeout: 250 seconds]
karapetyan has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
[k-_ has quit [Quit: Lingo: www.lingoirc.com]
elperdut has joined #ruby
<ericjphillips> is it practical to learn programming from a book?
<ericjphillips> what does a book provide that online resources don't?
sanjayu has quit [Remote host closed the connection]
<ArchRogem> They don't go offline when AWS goes down.
<adaedra> some people prefer learning with a book.
karapetyan has quit [Ping timeout: 240 seconds]
atomical has joined #ruby
<adaedra> you can have it by the side, quick search in it, read it without your computer.
allcentury has quit [Ping timeout: 260 seconds]
<ericjphillips> do many of them include exercises to try? or are they mostly reference?
<eam> ericjphillips: you do not need a book
f4cl3y has quit [Quit: Leaving]
saddad has quit [Ping timeout: 246 seconds]
<shevy> ericjphillips best exercise you can do is to write as much ruby code as you can, on your own, with as many different .rb files as possible
<shevy> a book can help you kickstart things easier
<shevy> the pickaxe helped me a lot back in 2004 or 2005
robwri32 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
robwri32_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
drewvanstone has joined #ruby
<shevy> I bought the newer version in... I don't know... 2008? it did not help me anywhere near as much anymore
<shevy> first programming books are important; later ones usually not as much anymore, unless they would be really good
pecpec has joined #ruby
<ericjphillips> so I'm a cute newbie..
<ericjphillips> what do you mean by "as many different .rb files as possible"?
moeabdol has quit [Ping timeout: 260 seconds]
<adaedra> write code, different things, again, again, and again
eGGsha has joined #ruby
<shevy> ericjphillips well just store the ruby code in .rb files
<shevy> you can also try it in irb
<ericjphillips> so you write many, different programs
apt-get has quit [Quit: Quit]
eminencehc has joined #ruby
apt-get has joined #ruby
drewvanstone has quit [Ping timeout: 244 seconds]
robwri32_ has joined #ruby
rushed has quit [Quit: rushed]
robwri32 has joined #ruby
pecpec has quit [Ping timeout: 246 seconds]
ericjphillips has quit [Quit: Leaving.]
sanjayu has joined #ruby
pecpec has joined #ruby
str_ctf has joined #ruby
<str_ctf> hey
einarj has joined #ruby
str_ctf has left #ruby [#ruby]
apt-get_ has joined #ruby
decoponio has joined #ruby
decoponyo has quit [Ping timeout: 250 seconds]
apt-get has quit [Ping timeout: 246 seconds]
ixti has joined #ruby
rurik has quit [Read error: Connection reset by peer]
einarj has quit [Ping timeout: 240 seconds]
rurik has joined #ruby
<pontiki> apeiros: this would be a lot more fun if i'd known i'd needed PG9.4
symm- has joined #ruby
eGGsha has quit [Quit: Textual IRC Client: www.textualapp.com]
jcoe has joined #ruby
CloCkWeRX has left #ruby [#ruby]
robwri32_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
robwri32 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
frmendes has quit [Read error: Connection reset by peer]
Mon_Ouie has quit [Ping timeout: 272 seconds]
jcoe has quit [Client Quit]
jimeh_ has joined #ruby
User458764 has joined #ruby
rushed has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
drewvanstone has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
beast has joined #ruby
sanjayu has quit [Ping timeout: 240 seconds]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
pawnbox has quit [Ping timeout: 256 seconds]
rodfersou has joined #ruby
gregf has joined #ruby
tubuliferous_ has joined #ruby
chouhoulis has joined #ruby
BaroMeter has joined #ruby
<apeiros> pontiki: thanks, merged.
allomov has joined #ruby
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devoldmx has joined #ruby
bkulbida has joined #ruby
martin_work has joined #ruby
moeabdol has joined #ruby
BaroMeter has quit [Client Quit]
niemcu has joined #ruby
moeabdol has quit [Client Quit]
umgrosscol has quit [Remote host closed the connection]
ramfjord has joined #ruby
symm- has quit [Ping timeout: 246 seconds]
<pontiki> ta
moeabdol has joined #ruby
havenwood has joined #ruby
chouhoulis has quit [Ping timeout: 255 seconds]
devoldmx has quit [Ping timeout: 252 seconds]
karapetyan has joined #ruby
niemcu has quit [Client Quit]
codecop has joined #ruby
<jhass> PostGreSQL ?
<jhass> never seen that capitalization before
<apeiros> oh? didn't see that one
<adaedra> pOSTGREsql
<apeiros> >> "postgresql".chars.map { |c| rand < 0.5 ? c.upcase : c.downcase }.join
<ruboto> apeiros # => "PoSTgREsql" (https://eval.in/436330)
<Ox0dea> >> 'postgresql'.gsub(/./) { |c| c.send %w[upcase downcase].sample }
<ruboto> Ox0dea # => "PostgrESql" (https://eval.in/436331)
pawnbox has joined #ruby
rodfersou has quit [Quit: leaving]
jimeh_ has quit [Quit: ZNC - http://znc.in]
<karapetyan> if i call return in loop loop will not continue?
jimeh_ has joined #ruby
<shevy> LocalJumpError: unexpected return
jimeh_ has quit [Client Quit]
spider-mario has quit [Remote host closed the connection]
sotojuan has joined #ruby
<pontiki> could be a typo
<pontiki> can fix
<pontiki> one sec
<Ox0dea> karapetyan: You want `break`.
<Ox0dea> Unless your loop is within a method definition, in which case `return` will behave as you'd expect.
<karapetyan> where to read what difference between return and break? break return nil ?
<shevy> use break to get out of a loop
ruurd has joined #ruby
<karapetyan> ok, thx
allcentury has joined #ruby
vF3hNGxc47h8 has joined #ruby
platzhirsch has joined #ruby
mahuebel has joined #ruby
PaulCapestany has quit [Quit: .]
ruurd has quit [Ping timeout: 264 seconds]
krz has joined #ruby
allcentury has quit [Ping timeout: 264 seconds]
saddad has joined #ruby
allcentury has joined #ruby
exadeci has joined #ruby
allomov has quit [Remote host closed the connection]
jamesaxl|2 has joined #ruby
karapetyan has quit [Remote host closed the connection]
eminencehc has quit [Remote host closed the connection]
atzorvas has joined #ruby
jamesaxl has quit [Ping timeout: 246 seconds]
allcentury has quit [Ping timeout: 240 seconds]
krz has quit [Quit: WeeChat 1.2]
einarj has joined #ruby
bkulbida has quit [Ping timeout: 250 seconds]
jgt1 has quit [Ping timeout: 240 seconds]
SCHAAP137 has joined #ruby
nateberkopec has joined #ruby
dstarh has joined #ruby
rushed has quit [Quit: rushed]
Igorshp has joined #ruby
einarj has quit [Ping timeout: 272 seconds]
workmad3 has joined #ruby
beauby has joined #ruby
chipotle has joined #ruby
kies has quit [Quit: baaaaiiiiiiiiiii~]
kies has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 250 seconds]
elperdut has joined #ruby
elperdut has quit [Client Quit]
niemcu has joined #ruby
Alina-malina has quit [Ping timeout: 255 seconds]
n008f4g_ has joined #ruby
rushed has joined #ruby
niemcu has quit [Ping timeout: 246 seconds]
lulzmachine has quit [Quit: Connection closed for inactivity]
sanjayu has joined #ruby
tomphp has joined #ruby
joneshf-laptop has joined #ruby
tkiel has quit [Quit: Going offline, see ya! (www.adiirc.com)]
Technodrome has joined #ruby
tkiel has joined #ruby
<shevy> sundays are really sleepy days
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby
bkulbida has joined #ruby
devoldmx has joined #ruby
pawnbox_ has joined #ruby
Alina-malina has joined #ruby
yardenbar has joined #ruby
danieli has joined #ruby
dorei has joined #ruby
mistermocha has joined #ruby
niemcu has joined #ruby
chouhoulis has quit [Ping timeout: 268 seconds]
pawnbox has quit [Ping timeout: 250 seconds]
Melpaws has joined #ruby
devoldmx has quit [Ping timeout: 264 seconds]
nateberkopec has quit [Quit: Leaving...]
jxv has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
justin_pdx has joined #ruby
chouhoulis has joined #ruby
sotojuan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox_ has quit [Ping timeout: 265 seconds]
phutchins has quit [Ping timeout: 246 seconds]
crdpink2 has joined #ruby
beauby has quit [Ping timeout: 246 seconds]
tubuliferous_ has quit [Ping timeout: 240 seconds]
crdpink has quit [Ping timeout: 246 seconds]
The_Phoenix1 has quit [Read error: Connection reset by peer]
hanmac has quit [Ping timeout: 246 seconds]
tubuliferous_ has joined #ruby
Igorshp has quit [Remote host closed the connection]
naftilos76 has joined #ruby
platzhirsch has left #ruby [#ruby]
swgillespie has joined #ruby
marr has joined #ruby
banister has joined #ruby
swgillespie has left #ruby [#ruby]
mistnim has quit [Remote host closed the connection]
pecpec has quit [Remote host closed the connection]
yeticry has quit [Quit: leaving]
pecpec has joined #ruby
bkulbida has quit [Ping timeout: 240 seconds]
frmendes has joined #ruby
devoldmx has joined #ruby
codecop has quit [Remote host closed the connection]
yeticry has joined #ruby
Rodya_ has joined #ruby
pecpec has quit [Ping timeout: 264 seconds]
ruurd has joined #ruby
banjara has joined #ruby
roxtrongo has quit [Remote host closed the connection]
mahuebel has quit [Remote host closed the connection]
roxtrongo has joined #ruby
dgutierrez1287 has joined #ruby
mistermocha has quit []
justin_pdx has quit [Quit: justin_pdx]
yeticry has quit [Read error: Connection reset by peer]
rapha has joined #ruby
<rapha> Hi all!
hanmac has joined #ruby
banister has quit [Read error: Connection reset by peer]
yardenbar has quit [Ping timeout: 256 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
nowhereFast has joined #ruby
<rapha> Do you know of any library able to convert a binary blob of some sort of encoded media (i.e. "audio/mpeg", "video/ogg", "audio/wav", whatever) into "audio/ogg" given that the initial mime type is known?
<shevy> hmm
beauby has joined #ruby
<nowhereFast> I'm looking at this example
<nowhereFast> IO.foreach("testfile") {|x| print "GOT ", x }
<nowhereFast> how would I structure it so that @arr << x
<nowhereFast> I'm trying to add lines to an array
poguez_ has joined #ruby
chills42 has joined #ruby
<nowhereFast> @lines = IO.readlines("test.txt")
<apeiros> rapha: ffmpeg
<nowhereFast> this works, but I get the \n at the end
<apeiros> nowhereFast: @arr = File.readlines(path)
<apeiros> ah well, if you don't want the newline: @arr = File.read(path).split("\n")
<apeiros> and if you'd really want to reuse the above code: String#chomp is your friend
centrx has joined #ruby
einarj has joined #ruby
<nowhereFast> right, so I see there's File.read and IO.read
<nowhereFast> what is the difference in this case?
<apeiros> File.read is IO.read
<rapha> apeiros: hmm ... so with this here? https://github.com/streamio/streamio-ffmpeg
<apeiros> I just prefer it as it reads better IMO
yeticry has joined #ruby
<nowhereFast> okay, reads better but no difference under the hood?
<apeiros> rapha: did you read the readme?
<apeiros> nowhereFast: no
<apeiros> >> File.method(:read).owner
<rapha> apeiros: trying to understand it right now.
<ruboto> apeiros # => #<Class:IO> (https://eval.in/436361)
<apeiros> nowhereFast: ^
elperdut has joined #ruby
<nowhereFast> thanks
<apeiros> as said, File.read *is* IO.read.
<rapha> apeiros: when it says "video" somewhere, I'm never sure if that means "and audio also"
jimeh_ has joined #ruby
<apeiros> rapha: who knows, maybe it does indeed not wrap audio.
<nowhereFast> then strictly for my own curiosity, using the foreach method I pasted initially would I be able to do an @arr << x?
<apeiros> rapha: but to figure that out, I'd have to read the readme too, just like you
<apeiros> and I sure hope you don't need somebody to read the readme for you :-p
allcentury has joined #ruby
<rapha> apeiros: sorry :( ... trying it out, will tell you what I learn
einarj has quit [Ping timeout: 240 seconds]
jimeh_ has quit [Remote host closed the connection]
unop has quit [Ping timeout: 260 seconds]
banjara has quit [Quit: Leaving.]
pawnbox has quit [Remote host closed the connection]
symm- has joined #ruby
symm- has quit [Client Quit]
rushed has quit [Quit: rushed]
ckuhn has joined #ruby
jimeh_ has joined #ruby
chills42 has quit [Remote host closed the connection]
rushed has joined #ruby
chills42 has joined #ruby
nietzschette has joined #ruby
tubuliferous_ has quit [Ping timeout: 240 seconds]
jxv has joined #ruby
youngbaks has joined #ruby
ruurd has quit [Ping timeout: 255 seconds]
apt-get_ has quit [Ping timeout: 240 seconds]
<rapha> apeiros: okay, so even though the thing has been last updated two years ago, it still seems to be working quite nicely, and audio-only isn't a problem. the resulting files seem to be valid as far as VLC is concerned.
<apeiros> great
<apeiros> ?toolbox rapha
<ruboto> rapha, https://www.ruby-toolbox.com is a website which lists lots of gems, topically organized
chills42 has quit [Ping timeout: 246 seconds]
<apeiros> in case you want to search for other libs
frmendes has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> long live ffmpeg \o/
Narzew has joined #ruby
Neverdie has joined #ruby
stamina has quit [Ping timeout: 244 seconds]
<rapha> apeiros: thank you!
Neverdie has quit [Max SendQ exceeded]
rikkipitt has joined #ruby
cb_ has quit [Remote host closed the connection]
Neverdie has joined #ruby
Technodrome has quit [Quit: Technodrome]
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jimeh_ has quit [Remote host closed the connection]
ckuhn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
User458764 has joined #ruby
nowhereFast has left #ruby [#ruby]
Andrey has joined #ruby
Andrey_ has joined #ruby
Andrey has quit [Read error: Connection reset by peer]
Andrey_ is now known as Andrey
Azure has joined #ruby
Coldblackice has joined #ruby
shmilan has joined #ruby
ckuhn has joined #ruby
<Andrey> Guys, quick question. Every time I use "require" and run the file, I get "C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file --"
<Andrey> I have uninstalled ruby and reinstalled it, still the same error...
nofxx has joined #ruby
nofxx has joined #ruby
ruurd has joined #ruby
freerobby has joined #ruby
sotojuan has joined #ruby
<Andrey> But if I use "load", it works fine.
<Andrey> Any ideas?
MeMoc has joined #ruby
banjara has joined #ruby
cb_ has joined #ruby
<jhass> Andrey: require what?
<Andrey> a file
<jhass> which file?
freerobby has quit [Client Quit]
<jhass> where does it come from?
<Andrey> any file. If I have two .rb files and I try to require one of them from the other - it gives the error. If I use "load file.rb" instead - it works.
tubbo has quit [Ping timeout: 264 seconds]
<jhass> use require_relative or setup $LOAD_PATH (global inside ruby) to contain the directory that contains the file
pawnbox has joined #ruby
tubbo has joined #ruby
<Andrey> but they are in the same directory. I'm trying to figure why "require" throws an error. It's still a valid command in Ruby 2.1, correct? (I'm reading off of a Ruby 1.9 book)
tejasmanohar has joined #ruby
<jhass> yes, and its behavior didn't change between the two
<jhass> the current working directory is not in the $LOAD_PATH
<jhass> require only searches in the $LOAD_PATH
<Andrey> Oh, I see. How do I change the path (sorry, noob here)?
FernandoBasso has quit [Ping timeout: 265 seconds]
<jhass> it's an array, just push elements to it
craysiii has joined #ruby
<jhass> or invoke ruby with ruby -Ifoo/bar
Kallis has quit [Read error: Connection reset by peer]
robwri32_ has joined #ruby
robwri32 has joined #ruby
nettoweb has joined #ruby
FernandoBasso has joined #ruby
eminencehc has joined #ruby
<Andrey> You mean I have to set up the global $LOAD_PATH inside the file I'm executing? Like $LOAD_PATH=C:\dir\etc?
martin_work has quit [Quit: martin_work]
<jhass> more like $LOAD_PATH << __dir__ to add the directory the current file is in for example, but yeah
shmilan has quit [Ping timeout: 250 seconds]
Kallis has joined #ruby
Pupeno has quit [Quit: Leaving...]
Kallis has quit [Max SendQ exceeded]
<jhass> or as said just use require_relative
iateadonut has quit [Quit: Leaving.]
<Andrey> jhass: But I'm already running "ruby file2.rb" from the CLI in the same directory.
<ckuhn> require_relative is the easiest way
<jhass> and I repeat, the current working directory is _not_ in the $LOAD_PATH
wookiehangover has quit [Ping timeout: 240 seconds]
Fr1eza has joined #ruby
skade has joined #ruby
drewvanstone has quit [Ping timeout: 244 seconds]
<Andrey> require_relative does work, thanks jhass (ckuhn). Another question : How do I find out which is the current working directory?
atmosx_laptop has joined #ruby
MeMoc has quit []
shmilan has joined #ruby
<jhass> Andrey: the current working directory is the directory your commandline is in when you invoke a program
<jhass> you can query it inside Ruby with
<jhass> >> Dir.pwd
<ruboto> jhass # => "/tmp/execpad-c910d60255f7" (https://eval.in/436370)
EllisTAA has joined #ruby
<Andrey> jhass, this is what I can't understand. I run "ruby my_file.rb" from the CLI in the directory where both files are in, but it still gives me error.
<ckuhn> The working directory isn't the dir the files are in
<ckuhn> It is the directory that you exec ruby
<jhass> yes you said that multiple times now and I said multiple times now that and why that is expected behavior
ekain has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> I'm not sure what you expect from repeating it, the answer won't change, the ways to properly do what you want won't change
<Andrey> jhass, ckuhn, bare with me. Here is an example. In CLI I am in "C:\ruby" from there I run "ruby my_file.rb" and both files are in c:\ruby
<jhass> yes
EllisTAA has quit [Client Quit]
<jhass> still expected behavior
wookiehangover has joined #ruby
fungal has joined #ruby
<Andrey> but you said that the pwd is the directory my CLI is in when I invoke a program, "C:\ruby", in this case. Why is "require" still throwing error?
workmad3 has joined #ruby
rushed has quit [Quit: rushed]
<ckuhn> because that directory is not included
<jhass> require does look for whiles relative to $LOAD_PATH. The current working directory is not in $LOAD_PATH unless you add it yourself. Add the directory with the files you want require to find yourself either inside ruby or with the -I flag, or use require_relative
elperdut has joined #ruby
<jhass> I can copy paste that answer as many times as you want
Melpaws1 has joined #ruby
<jhass> meh, for files*
skade has quit [Quit: Computer has gone to sleep.]
<jhass> Andrey: maybe try rephrasing what I said three times to you now. I make that task easier by posing a question you should try to answer: Where does require look for files? How does the default value of that look like?
nettoweb has quit [Ping timeout: 260 seconds]
Melpaws has quit [Ping timeout: 240 seconds]
shmilan has quit [Ping timeout: 264 seconds]
EllisTAA has joined #ruby
rushed has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 240 seconds]
<Andrey> jhass: From reading the book I gathered that "require" looks for files in the same directory the file is in.
<pipework> Andrey: It looks in the $LOAD_PATH
nateberkopec has joined #ruby
<pipework> require_relative doesn't look in the load path. But require can be passed a local or absolute path as well.
<jhass> Andrey: then your book is wrong or you misinterpreted it
<jhass> get over that fact, it's wrong
noethics has joined #ruby
Lycanii has quit [Remote host closed the connection]
EllisTAA has quit [Client Quit]
tubbo has quit [Ping timeout: 264 seconds]
<jhass> and it was never right. Back in the 1.8 it coincidentally looked that way most of the time but was subtly different even back then. But those days are long gone for good
<jhass> 1.8 days
einarj has joined #ruby
<Andrey> I don't think the book is wrong :) I see I got it wrong. I can't understand, however, how do I know the value of $LOAD_PATH. The examples in the book simply use "require file_name", no reference to $LOAD_PATH whatsoever.
<Andrey> is $LOAD_PATH created when ruby was installed?
<jhass> $LOAD_PATH is for the most part you care about managed by RubyGems
<jhass> but yes, its default value is defined at compile time
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tubbo has joined #ruby
<Andrey> so how can I see its value (using Windows)?
<ckuhn> It's just an array
<ruurd> puts $LOAD_PATH ???
nateberkopec has quit [Ping timeout: 240 seconds]
<ruurd> >> puts $LOAD_PATH
<ruboto> ruurd # => /execpad/interpreters/ruby-2.2.0/lib/ruby/site_ruby/2.2.0 ...check link for more (https://eval.in/436371)
<Ox0dea> ruurd: Use #p.
codenapper has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ruurd> >> #p $LOAD_PATH
<ruboto> ruurd # => nil (https://eval.in/436373)
<ruurd> hehhehheh
<Ox0dea> Well, I suppose #puts is sensible enough for $LOAD_PATH, but #puts is notorious for "hiding" information from newcomers.
<pipework> ruurd: # denotes an instance method
einarj has quit [Ping timeout: 265 seconds]
<pipework> When followed by a method name.
<havenwood> Andrey: Type `irb` at the command line and: p $LOAD_PATH
<Ox0dea> >> method(:p)
<ruboto> Ox0dea # => #<Method: Object(Kernel)#p> (https://eval.in/436374)
<Ox0dea> ruurd: ^
<Andrey> It did give me a whole list of directories...
<Ox0dea> Though I suppose you were probably having a laugh.
<ruurd> pffff
<Ox0dea> Andrey: Those are all the directories #require will look in.
<Andrey> Ox0dea, awwww, none of them is where my files are in :)
saddad has quit [Read error: No route to host]
<havenwood> Andrey: In irb try `$LOAD_PATH << __dir__` then check `p $LOAD_PATH` again.
Rickmasta has joined #ruby
last_staff has joined #ruby
pocketprotector has quit [Ping timeout: 240 seconds]
<Andrey> havenwood, it gives me syntax error
<havenwood> Andrey: What version of Ruby?
<Andrey> 2.1.5
Soda has quit [Remote host closed the connection]
<havenwood> Andrey: That should work: $LOAD_PATH << __dir__
drewvanstone has joined #ruby
<Andrey> $LOAD_PATH<<c:/ruby
<Andrey> SyntaxError: (irb):4: syntax error, unexpected tLABEL
<Andrey> $LOAD_PATH<<c:/ruby
<jhass> Andrey: literally
<havenwood> Andrey: It's an Array of Strings.
sanjayu has quit [Ping timeout: 260 seconds]
<jhass> $LOAD_PATH << __dir__
<jhass> enter that, change nothing about it
<jhass> include the spaces
Fr1eza has quit [Quit: Leaving]
<havenwood> Andrey: $LOAD_PATH << 'c:/ruby'
<Andrey> got ya, lol
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
chills42 has joined #ruby
noethics has quit [Quit: Leaving]
noethics has joined #ruby
elperdut has joined #ruby
<Andrey> havenwood, I did that, but $LOAD_PATH did not change
darkf has quit [Quit: Leaving]
<havenwood> Andrey: $LOAD_PATH << 'are' << 'you' << 'sure???'
<havenwood> Andrey: Look at the end of the Array.
startupality has quit [Quit: startupality]
<havenwood> Andrey: $LOAD_PATH
Newtonianb has joined #ruby
zeroDivisible has joined #ruby
zeroDivisible has quit [Client Quit]
krz has joined #ruby
<shevy> aha havenwood is awake on a sunday!
zeroDivisible has joined #ruby
<Andrey> This is what I get when I run a file from c:\ruby in CLI, both before and after using $LOAD_PATH<<__dir__ in irb: https://gist.github.com/anonymous/a772bb0ce88669fe1981
saddad has joined #ruby
chills42 has quit [Ping timeout: 244 seconds]
<havenwood> shevy: That reminds me it's time for coffee.
michael_mbp has quit [Excess Flood]
stamina has joined #ruby
apt-get_ has joined #ruby
lorn_ has quit [Quit: ZNC - http://znc.in]
<havenwood> Andrey: In irb it doesn't persist past that irb session or pertain to any other irb sessions.
<shevy> even on non-work days??
fungal has quit [Read error: Connection reset by peer]
michael_mbp has joined #ruby
<havenwood> Andrey: If you wanted to change the load path in a file you'd have to do it in the file.
<ckuhn> ^^
blik71 has joined #ruby
<Andrey> havenwood: I see. So there is no way I can change $LOAD_PATH in the future to include c:\ruby, for example?
<ckuhn> Why would you want to do that
David27 has quit [Remote host closed the connection]
lkba has joined #ruby
<blik71> hey guys just some quick help, for some reason this for loop is only running once and for the life of me I can't figure out why
bronson has joined #ruby
<blik71> which paste site is used again?
<shevy> you could use: loop {}
<shevy> or if you have a collection .each
<Andrey> ckuhn: well, the book examples are using "require file_name", I would like to use them verbatim, if possible
<blik71> i tried but it still only runs once
<Ox0dea> ?gist blik71
scripore has quit [Quit: This computer has gone to sleep]
<ruboto> blik71, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
UtkarshRay has quit [Ping timeout: 240 seconds]
<Ox0dea> You're probably doing assignment instead of equality comparison. :P
pocketprotector has joined #ruby
davedev24 has joined #ruby
<blik71> i hope I am lol
<ckuhn> Andrey: Find a new book ;) cuz that one is wrong
<Ox0dea> blik71: Well, start by checking the value of `maze.size`, of course.
<shevy> and what is the value: maze.size
<shevy> it must be 1
ddrmanxbxfr has joined #ruby
<blik71> i checked with pry and its 4 like it should be
<havenwood> Andrey: I think jhass showed you how you can invoke Ruby with a load path directory specified. You could alias with the flag if you wanted but such shenanigans can be avoided by setting up $LOAD_PATH in your Ruby file.
<havenwood> Andrey: You can get a fairly abbreviated list of Ruby flags with: ruby -h
<havenwood> Or a lot more info about the flags with: man ruby
<Andrey> ckuhn: LOL. havenwood: I think I got the gist of jhass, I'm thinking maybe the author made a mistake using"require" instead of "require_relative"?
spider-mario has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mahuebel has joined #ruby
<havenwood> Andrey: If you're thinking about setting up load path it might be time to cut a gem. :)
<jhass> havenwood: maybe not.
<Ox0dea> Bit early.
<havenwood> Aye. Probably so.
<Ox0dea> Andrey: That said, do you know about gems?
meatherly has joined #ruby
<Andrey> havenwood - lol, let's not get ahead of ourselves. (<Ox0dea)
<havenwood> Andrey: It's something to look forward to then. :) Just know there's a nice convention to land on one you understand what all is going on.
Lycanii has joined #ruby
decoponio has quit [Ping timeout: 240 seconds]
<Ox0dea> Andrey: You might be thinking this pain you're experiencing with paths is ridiculous, but it's really a very sensible approach; if Ruby automagically used a matching file in the current directory without your explicitly mentioning so, you would instead experience the pain when trying to bring in a gem of the same name.
<Ox0dea> It's better this way.
<Andrey> I did a search of the Pickaxe and they talk about "require_relative" there for exactly my case. I guess the first book was wrong afterall for just using "require my_file" in the examples...
<Ox0dea> Could well have been.
noethics has quit [Quit: Leaving]
bronson has quit [Remote host closed the connection]
<Andrey> So basically, unless I set up the $LOAD_PATH myself, I should use "require" just for gems?
<Ox0dea> Then again, are you sure they weren't using require './foo' to specify a relative path?
<Andrey> Ox0dea, nope, just "require file_name".
decoponio has joined #ruby
youngbaks has quit [Quit: WeeChat 1.3]
<shevy> blik71 if it is 4 then it will run exactly 4 times
Denis has joined #ruby
youngbaks has joined #ruby
davedev24 has quit [Read error: Connection reset by peer]
<blik71> in pry it only runs once because i is not being incremented
Coldblackice has quit [Ping timeout: 256 seconds]
davedev24 has joined #ruby
Coldblackice_ has joined #ruby
<shevy> >> 5.times { print 'Hi, ' }
<ruboto> shevy # => Hi, Hi, Hi, Hi, Hi, 5 (https://eval.in/436396)
lkba has quit [Remote host closed the connection]
<shevy> >> 5.times {|i| print i,' ' }
<ruboto> shevy # => 0 1 2 3 4 5 (https://eval.in/436397)
<blik71> nevermind I fixed it lol small typo in a previous statement
<shevy> so you can see, ruby is clear on it
<tobukiah> nevermind I fixed / it lol small typo in a / previous statement
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ckuhn has quit [Read error: Connection reset by peer]
<Ox0dea> blik71: Are you not surprised by the output of shevy's demonstration?
<Ox0dea> He said `5.times`, but I see six numbers; what happened?
youngbaks has quit [Client Quit]
youngbaks has joined #ruby
rushed has quit [Quit: rushed]
karapetyan has joined #ruby
houhoulis has joined #ruby
ekain has joined #ruby
j4cknewt has joined #ruby
robwri32_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
robwri32 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ruurd has quit [Read error: Connection reset by peer]
Denis has quit [Quit: Leaving]
unop has joined #ruby
apt-get_ has quit [Quit: Quit]
Technodrome has joined #ruby
apt-get has joined #ruby
banjara has quit [Quit: Leaving.]
Meow-J has quit [Quit: Connection closed for inactivity]
<Andrey> OK, guys, my mystery has been solved. Apparently up until Ruby 1.8.7 "require" did scan the current directory first, before moving to $LOAD_PATH. This book says that it covers 1.9, but apparently not all the way. Thanks to havenwood, jhass, ckuhn, and of course, Ox0dea, who is still trying to help me, despite of == lost cause :)
youngbaks has quit [Quit: WeeChat 1.3]
cb_ has quit [Remote host closed the connection]
<apeiros> "did scan the current directory first, before moving to $LOAD_PATH"
<apeiros> almost
<jhass> Andrey: I noted that. I also noted that "current directory" is the wrong and misleading way to picture it, it's the current working directory
<apeiros> 1.8 simply contained "." as part of $LOAD_PATH
leafybas_ has joined #ruby
sanjayu has joined #ruby
m8 has joined #ruby
<apeiros> and ., as jhass just said, is the working directory. relying on that in $LOAD_PATH is brittle at best.
cb_ has joined #ruby
ckuhn has joined #ruby
<jhass> apeiros: scroll up, been through this like 5 times now
<apeiros> :D
rushed has joined #ruby
<apeiros> maybe it sticks now!
EllisTAA has joined #ruby
Cache_Money has joined #ruby
<Andrey> jhass, you should talk to Ox0dea :). apeiros - it sure did
ruurd has joined #ruby
pecpec has joined #ruby
joneshf-laptop has quit [Read error: Connection reset by peer]
eminencehc has quit [Remote host closed the connection]
<Andrey> I don't think I'll ever forget "the whole require- $LOAD_PATH-debacle" ;)
meatherly has quit []
Rodya_ has quit [Remote host closed the connection]
leafybasil has quit [Ping timeout: 272 seconds]
PaulCapestany has joined #ruby
Narzew has quit [Read error: No route to host]
leafybas_ has quit [Ping timeout: 240 seconds]
Narzew_ has joined #ruby
pecpec has quit [Ping timeout: 260 seconds]
avahey has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
fedexo has joined #ruby
yardenbar has joined #ruby
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Andrey has quit [Ping timeout: 240 seconds]
<blik71> hey is there a reason pry would stop telling you values of variables of strings and ints and instead just give u the object class and address?
icbm has quit [Quit: Computer sleeping]
Narzew_ has quit [Read error: No route to host]
<Ox0dea> blik71: Pry invokes an object's #inspect method to decide what to show you.
Narzew has joined #ruby
bronson has joined #ruby
<Ox0dea> If an object doesn't have a custom definition, it defers to the default provided by Object, which results in the kind of output you're seeing.
gard has joined #ruby
<Ox0dea> >> Object.new
<ruboto> Ox0dea # => #<Object:0x4149447c> (https://eval.in/436401)
pwnd_nsfw has joined #ruby
<apeiros> I think you can change the way pry inspects an object
<Ox0dea> Well, yeah.
<apeiros> so that'd be another possible reason
karapetyan has quit [Remote host closed the connection]
einarj has joined #ruby
dreadnought8971 has joined #ruby
<Ox0dea> blik71 would have had to do some intrusive tinkering to see something like #<String:0xf00>, I would think?
lorn has joined #ruby
lorn has quit [Changing host]
lorn has joined #ruby
<blik71> i don't know what i did lol but thats what im seeing
ckuhn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
krz has quit [Quit: WeeChat 1.2]
icbm has joined #ruby
PaulCapestany has quit [Quit: .]
workmad3 has joined #ruby
einarj has quit [Ping timeout: 265 seconds]
radgeRayden_ has joined #ruby
PaulCapestany has joined #ruby
Technodrome has quit [Quit: Technodrome]
Melpaws1 has quit [Quit: Leaving.]
leafybasil has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
ruurd has quit [Quit: ZZZzzz…]
sanjayu has quit [Ping timeout: 240 seconds]
baweaver has joined #ruby
Lingo has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cb_ has quit [Remote host closed the connection]
Lingo has quit [Client Quit]
cb_ has joined #ruby
blik71 has quit [Ping timeout: 268 seconds]
elperdut has joined #ruby
chipotle has quit [Quit: cheerio]
startupality has joined #ruby
dpp has quit [Ping timeout: 240 seconds]
dstarh has quit [Quit: Textual IRC Client: www.textualapp.com]
j4cknewt has quit [Remote host closed the connection]
towski_ has joined #ruby
art-solopov has joined #ruby
shinnya has quit [Ping timeout: 240 seconds]
atomical has joined #ruby
accacin has joined #ruby
ckuhn has joined #ruby
davedev2_ has joined #ruby
davedev24 has quit [Ping timeout: 240 seconds]
craysiii has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
solocshaw1 has joined #ruby
solocshaw has quit [Read error: Connection reset by peer]
solocshaw1 is now known as solocshaw
toretore has joined #ruby
Kallis has joined #ruby
joufflu has joined #ruby
Yzguy has joined #ruby
OrbitalKitten has quit [Quit: Textual IRC Client: www.textualapp.com]
nanoz has quit [Quit: <3]
PlasmaStar has quit [Ping timeout: 240 seconds]
phutchins has joined #ruby
yardenbar has quit [Ping timeout: 240 seconds]
towski_ has quit [Remote host closed the connection]
accacin is now known as caradhras
pocketprotector has quit [Ping timeout: 265 seconds]
chipotle has joined #ruby
cb_ has quit [Remote host closed the connection]
hectortrope has quit [Remote host closed the connection]
hectortrope has joined #ruby
Soda has joined #ruby
cb_ has joined #ruby
cb_ has joined #ruby
caradhras has quit [Quit: Textual IRC Client: www.textualapp.com]
tomaz_b has joined #ruby
kobain has joined #ruby
Yzguy has quit [Quit: Zzz...]
PlasmaStar has joined #ruby
<Newtonianb> question: I have a ruby script that dumps out a configuration file. In my ruby script I need to specify the line ending (I'm dumping an array with line ending added to end of each element and dumping it to a file). What line ending should I be using that would be compatible across platforms? \n or \r\n ?
Yzguy has joined #ruby
<ckuhn> \n
<atmosx_laptop> Newtonianb: maybe make that config file a json or yaml
<atmosx_laptop> news an idea
Technodrome has joined #ruby
<atmosx_laptop> this cmd: ip route add 10.11.0.0/24 dev tun0 src 10.11.0.10 table vpn can be system("ip", "route", "add" ... "table" "vpn") right?
saddad has quit [Ping timeout: 240 seconds]
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
hectortrope has quit [Remote host closed the connection]
freerobby has joined #ruby
exadeci has quit [Quit: Connection closed for inactivity]
hectortrope has joined #ruby
hectortrope has quit [Client Quit]
freerobby has quit [Client Quit]
cb_ has quit [Remote host closed the connection]
hectortrope has joined #ruby
<Ox0dea> ?try atmosx_laptop
<ruboto> atmosx_laptop, Why don't you try it and see for yourself?
<Ox0dea> But yes.
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Kallis has quit [Read error: Connection reset by peer]
<atmosx_laptop> Ox0dea: yeah... I'lljust go with system(" entire command #{var} ...")
sdothum has joined #ruby
mahuebel has quit [Remote host closed the connection]
pocketprotector has joined #ruby
<apeiros> atmosx_laptop: I'd only do that if var is not userinput
tomphp has joined #ruby
<apeiros> otherwise be prepared for your mandatory var = "; rm -rf /"
<Ox0dea> Newtonianb: Ruby provides you with the platform-specific input record separator, which is almost certainly the one you'll want to use for output fields as well.
<atmosx_laptop> apeiros: it's not, it's a ruby script to create a routing table for transmission
Kallis has joined #ruby
Kallis has quit [Max SendQ exceeded]
<atmosx_laptop> mandatory? hehe
Yzguy has quit [Quit: Zzz...]
Yzguy has joined #ruby
duncannz has joined #ruby
skade has joined #ruby
<Newtonianb> when I do f.write("\n") should I use single or double quote? I vaguely remember somewhat it matters for this character?
<Ox0dea> >> '\n' == "\n" Newtonianb
<ruboto> Ox0dea # => /tmp/execpad-5fc17ef01ae8/source-5fc17ef01ae8:2: syntax error, unexpected tCONSTANT, expecting keywo ...check link for more (https://eval.in/436407)
<Ox0dea> >> '\n' == "\n" # Newtonianb
<ruboto> Ox0dea # => false (https://eval.in/436408)
arup_r has quit [Quit: Leaving]
<jhass> >> '\n'
<apeiros> Newtonianb: '\n' is a backslash followed by "n". "\n" is a newline.
<ruboto> jhass # => "\\n" (https://eval.in/436409)
<Ox0dea> Double quotes are necessary for special characters to take on their special meanings.
<Newtonianb> thank you
Yzguy has quit [Client Quit]
centrx has quit [Quit: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."]
segfalt has joined #ruby
cb_ has joined #ruby
agent_white has joined #ruby
<atmosx_laptop> Does this looks good? system("echo '1 #{table_name}' >> /etc/iproute2/rt_tables") unless system("grep #{table_name} /etc/iproute2/rt_tables")
<atmosx_laptop> s/looks/look
ddrmanxbxfr has quit [Quit: This computer has gone to sleep]
<jhass> atmosx_laptop: File.read(..).include? for the second system
ericjphillips has joined #ruby
<atmosx_laptop> ty
<jhass> you're inside Ruby, use it
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
<jhass> mmh, can File.write append?
cb_ has quit [Remote host closed the connection]
freerobby has joined #ruby
<jhass> try File.write(..., "1 #{table_name}", "a") for the first system
art-solopov has quit [Quit: Konversation terminated!]
<jhass> mmh, "\n1 #{table_name}\n" I guess
Cache_Money has quit [Quit: Cache_Money]
robwri32 has joined #ruby
robwri32_ has joined #ruby
<Newtonianb> I'm trying to dump my hash to file with \n line endings but on windows when I run the script it keeps adding \r\n hash.each do |key, value| outputContent += "#{key}=#{value} \n" end then dumping the content to file using File.open(dest, 'w') { |file| file.write(content) }
<Newtonianb> Am i doing something wrong
cb_ has joined #ruby
cb_ has quit [Changing host]
cb_ has joined #ruby
Andrey has joined #ruby
scripore has joined #ruby
drewvanstone has quit [Ping timeout: 250 seconds]
umgrosscol has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<Ox0dea> Solving it functionally is so painful. :/ I would love to be proved wrong in that conclusion.
<atmosx_laptop> jhass: take a look here, give me some hints if you have time https://gist.github.com/atmosx/e243aff60e86f94bd73b
freerobby has quit [Client Quit]
<ckuhn> Newtonianb: What about dumping the hash to json?
<jhass> Newtonianb: 'wb' probably
freerobby has joined #ruby
<Newtonianb> @jahss thanks that worked!
mahuebel has joined #ruby
<Newtonianb> @ckuhn I don't want json though
<jhass> atmosx_laptop: I prefer to do things like |grep|awk in Ruby too
<atmosx_laptop> Newtonianb: yaml?
atomical has quit [Quit: Textual IRC Client: www.textualapp.com]
<Newtonianb> I don't control the syntax it's the dotenv library that needs this format https://github.com/bkeepers/dotenv
Coldblackice_ is now known as Coldblackice
<jhass> atmosx_laptop: your indentation could use some redoing :P
<atmosx_laptop> jhass: vim kinda messed it up, sorry hehe
<jhass> but otherwise probably fine, looks a bit like a bash script but the json stuff justifies using Ruby
<Ox0dea> atmosx_laptop: gg=G
niemcu has quit [Ping timeout: 272 seconds]
<atmosx_laptop> Ox0dea: that the command that messed it up.
<atmosx_laptop> anyway
atomical has joined #ruby
Melpaws has joined #ruby
<Ox0dea> Such a stupid thing to lie about.
freerobby has quit [Client Quit]
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gard has quit [Quit: Leaving]
lkba has joined #ruby
<atmosx_laptop> Ox0dea: ...
<Ox0dea> atmosx_laptop: Yes?
<atmosx_laptop> Ox0dea: nothing, I'm too old for this.
<Ox0dea> You're never to old to learn to use and appreciate gg=G, bud.
<Ox0dea> *too
umgrosscol has quit [Quit: End of Line]
eminencehc has joined #ruby
<atmosx_laptop> nah, I'm too old to give a shit about what a nickname says on a screen.
phutchins has quit [Ping timeout: 264 seconds]
<Ox0dea> And yet here you are, a nickname on a screen.
<atmosx_laptop> whatever
<Ox0dea> You know it's okay not to use Vim, right?
pawnbox has quit [Remote host closed the connection]
<Ox0dea> We don't burn heretics anymore.
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
solocshaw has quit [Ping timeout: 246 seconds]
eminencehc has quit [Remote host closed the connection]
<pipework> At least, not publicly.
Yzguy has joined #ruby
cb_ has quit [Remote host closed the connection]
<ericjphillips> i have no idea what you all are talking about.
skade has joined #ruby
<jhass> you're welcome
saddad has joined #ruby
skade has quit [Client Quit]
fedexo has quit [Ping timeout: 240 seconds]
agent_white has quit [Quit: Lost terminal]
amoeba has joined #ruby
amoeba_ has joined #ruby
amoeba_ has quit [Client Quit]
allcentury has quit [Ping timeout: 260 seconds]
platosha_ has quit [Quit: Leaving]
camroller has joined #ruby
<camroller> do you guys still remember how to add and subtract mixed and improper fractions?
cndiv has joined #ruby
<Ox0dea> camroller: Even some of us gals too!
<camroller> stop trolling please
<Ox0dea> Pardon?
<ckuhn> lol what
<jhass> Ox0dea: your detection is broken, eh?
<Ox0dea> It does seem like I might need to recalibrate the thing.
<atmosx_laptop> I wonder can this be done in one line? https://gist.github.com/atmosx/c8b0ecf39da9b6517d83#file-trans_fix-rb-L23 (L23-24)
sotojuan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<camroller> well i would like to know because i forgot how to do that stuff since it's been a long time since i did it
<camroller> or are fractions not important in ruby development?
<Ox0dea> atmosx_laptop: Array#values_at.
<atmosx_laptop> Ox0dea: nice, ty
<ckuhn> camroller: do you mean like a Rational?
<camroller> i mean like basic arithmetic
<jhass> ckuhn: don't feed please
<ckuhn> >> 2 + 2
<ruboto> ckuhn # => 4 (https://eval.in/436412)
<camroller> i can't believe i forgot a lot of it
<Ox0dea> So go relearn it?
<ckuhn> jhass: thought he was srs
<camroller> someone just pmed me a useful channel i'll stop talking here
<Ox0dea> Danke.
drewvanstone has joined #ruby
<camroller> i am serious, jhass is just a terrible op
<ckuhn> jhass: do you happen to have stake in Hass avacados?
<apeiros> !kick camroller good bye
camroller was kicked from #ruby by ruboto [good bye]
<jhass> ckuhn: my actual last name is Haß, so no
<Ox0dea> >> 'ß'.upcase
<ruboto> Ox0dea # => "ß" (https://eval.in/436413)
robwri32 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
robwri32_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> Ox0dea: ruby only upcases ascii
<Ox0dea> I know. :(
tomaz_b has quit [Quit: Leaving]
<ckuhn> what is the "best" ruby gui framework?
<pipework> shoes, probably
<Ox0dea> ckuhn: Opal.
<ckuhn> looks pretty intuitive
danieli has quit [Quit: *does an epic backflip into nowhere*]
last_staff has quit [Quit: last_staff]
<ckuhn> Ox0dea: im confused. "Opal Ruby to JavaScript Compiler"
<Ox0dea> Yes, that's right.
danshultz has quit [Ping timeout: 244 seconds]
<ckuhn> how is that a GUI framework
<Ox0dea> Because it's 2015.
Narzew has quit [Ping timeout: 264 seconds]
<ckuhn> ah
<ckuhn> what abouts html
frmendes has joined #ruby
<Ox0dea> Hopefully a vestigial appendage someday.
<Ox0dea> A necessary evil for now.
Pupeno has joined #ruby
BlackCoyote has joined #ruby
<Ox0dea> > the history of JavaScript... from 1995 until 2035
scripore has quit [Quit: This computer has gone to sleep]
benlieb has joined #ruby
<ckuhn> I still don't understand how you generate a web interface with that
subscope has quit [Quit: Leaving]
Narzew has joined #ruby
Voker57 has quit [Read error: Connection reset by peer]
VeryBewitching has joined #ruby
zenguy_pc has quit [Ping timeout: 250 seconds]
pecpec has joined #ruby
<shevy> yeah rule of thumb - don't take Ox0dea too seriously
<shevy> the problem is that there are not that many GUIs in ruby :(
<pipework> Graphical desktop ruby tooling isn't always so great.
shinnya has joined #ruby
<jhass> ckuhn: ruby-gir appears worth looking at, if you can deal with Gtk that is
<pipework> There's gtk+ bindings, QT bindings, and shoes.
<shevy> and tk!!!
Jackneill has quit [Ping timeout: 246 seconds]
<pipework> and tk!
martin_work has joined #ruby
Technodrome has quit [Quit: Technodrome]
ckuhn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> ckuhn I guess using html/css/javascript may yield better results. I can do drag and drop via jquery or dragula really in a simple manner; in ruby-gtk it is also possible but so much more annoying
<pipework> There is things like electron
<shevy> signal_new('document_drag', GLib::Signal::RUN_FIRST,
<pipework> They do a lot of heavy lifting to handle a lot of things that most apps want to be able to do.
<jhass> (they left)
workmad3 has joined #ruby
<Ox0dea> Another convert!
Rodya_ has joined #ruby
jjasonclark has joined #ruby
cb_ has joined #ruby
drewvanstone has quit [Ping timeout: 240 seconds]
zenguy_pc has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
meatherly has joined #ruby
Rodya_ has quit [Ping timeout: 240 seconds]
meatherly has quit [Client Quit]
ragingcake_ has joined #ruby
howdoico1 has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
<Ox0dea> shevy: How many web apps do you use on a regular basis? How many native GUIs?
einarj has joined #ruby
kaliwanagan has joined #ruby
ckuhn has joined #ruby
Melpaws has quit [Quit: Leaving.]
<jhass> does the browser count as native gui?
martin_work has quit [Quit: martin_work]
<Ox0dea> Of course, but only once.
ap4y has joined #ruby
<jhass> do mobile apps count as native gui?
<jhass> what about games?
avahey has quit [Quit: Connection closed for inactivity]
<Ox0dea> Damn! You saw through my ruse.
<pipework> What about each app that embeds webkit?
m8 has quit [Quit: Sto andando via]
n008f4g_ has quit [Ping timeout: 250 seconds]
<toretore> native = not web; if they embed a web component it's a native app with a browser inside it
dgutierrez1287 has joined #ruby
<jhass> what about the DE? does it count into the native GUIs?
n008f4g_ has joined #ruby
einarj has quit [Ping timeout: 240 seconds]
<toretore> desktop env?
<jhass> yeah
<pipework> toretore: So, one point for each?
<toretore> sure
<toretore> it's native
<pipework> I wouldn't say 'browser' but I get your point.
meatherly has joined #ruby
<toretore> but most users don't know/care about its existence
<jhass> and also Gnome3 specifically, given its UI is basically written in JS & CSS
<toretore> does it use html?
pecpec has quit [Remote host closed the connection]
<toretore> html is what makes web based apps suck
<jhass> I don't think so, probably some XML descriptions though
<toretore> yeah
<toretore> i still miss xul
glenn_ has joined #ruby
pecpec has joined #ruby
<toretore> fucking html
Rodya_ has joined #ruby
<ekem> is it possible to use rsense across a network?
<toretore> and the html5 abomination that just made everything worse
meatherly has quit [Client Quit]
SCHAAP137 has quit [Ping timeout: 260 seconds]
<Ox0dea> ekem: I mean, it takes a --port argument?
<ekem> yeah it does, i put in --port 0.0.0.0:47637
dgutierrez1287 has quit [Ping timeout: 252 seconds]
joufflu has quit [Read error: Connection reset by peer]
<ekem> im actually sort of wondering if the atom plugin will take an ip and not just a port
<Ox0dea> I can't imagine why it wouldn't.
<shevy> Ox0dea well the web is everywhere
<ekem> it just has a field for default port, im trying it out but its not working as expected yet
_aeris_ has quit [Remote host closed the connection]
phutchins has joined #ruby
_aeris_ has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> locally I use... a browser, a pdf viewer... an editor... a torrent client... and irc client. all of these could in principle run through the browser
jjasonclark has quit [Quit: jjasonclark]
<ekem> yeah, telnet tells me nope on that one
<toretore> all of these could in pcinciple run through an ftp server
shmilan has joined #ruby
<toretore> that doesn't mean it's the best choice
<Ox0dea> shevy: Sure, but each of them could just as well embed a Web view, so that's essentially a moot point.
martin_work has joined #ruby
karapetyan has joined #ruby
<Ox0dea> The fact of the matter is that JavaScript has reached critical mass, and nothing is properly poised to slow it down.
pecpec has quit [Ping timeout: 264 seconds]
<ekem> everything will be server side at some point anyway
<ekem> >thanks apple
kaliwanagan has quit [Ping timeout: 240 seconds]
naftilos76 has quit [Ping timeout: 240 seconds]
<shevy> javascript rules the world
<ekem> you mean ecmascript
<shevy> I don't know what is ymcascript
nietzschette has quit [Quit: Nettalk6 - www.ntalk.de]
<nofxx> ekem, disagree. Everything hw accelerated won't. For one example that's not gaming: photoshop
<darix> Ox0dea: that critical mass was reached like a few years ago when basically every browser vendor went with JS as the language for client side scripting
<ekem> i disagree, we will push bits fast enough to update screens
<ekem> just look at playstation
frmendes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> nofxx: JavaScript is fast and getting faster.
<ekem> they screencast games, i mean you are just sending controls on the wire
<darix> nofxx: there is even webgl already ... www.draw.io ... having photoshop in JS is a matter of time
frmendes has joined #ruby
<ekem> shevy, ecmascript is actually what javascript is
n008f4g_ has quit [Ping timeout: 240 seconds]
<pipework> JavaScript is what JavaScript does
<ekem> javascript is an old brand name from netscape days
<ekem> riding the java wave
<nofxx> but that's is download and run locally with hw accelerated. It's a mix. Problably will have cache so it's offline...kinda of heh
<nofxx> if you have or not to install it doesn't matter, it is local
karapetyan has quit [Ping timeout: 255 seconds]
<nofxx> Ox0dea, gem working! capkin =D
<toretore> hw acc will happen on the device, but it may happen as a simple set of instructions that are compiled remotely
f25_pics has joined #ruby
bigmac has joined #ruby
howdoico1 has quit [Ping timeout: 250 seconds]
ruby-lang709 has joined #ruby
<ruby-lang709> Hey
<ruby-lang709> Hey, is nayone here?
<ruby-lang709> I need help!
SCHAAP137 has joined #ruby
<ruby-lang709> I hope I am being nice; I just need some help with a problem.
<shevy> hey gateway person, long time no see
ericjphillips has quit [Quit: Leaving.]
zenguy_pc has quit [Ping timeout: 252 seconds]
<ruby-lang709> Should I change my name, shevy?
ruby-lang709 is now known as SkynetProgrammer
<shevy> lol
<SkynetProgrammer> I am building a ruby gem that needs to parse a YAML file located within the lib folder
cndiv has quit [Quit: Be back later ...]
<SkynetProgrammer> when I run skynet.rb within the lib folder, the YAML file is parsed successfully
<SkynetProgrammer> But if I try to run it outside of the lib folder (like using bin/skynet)...it throws an error
<SkynetProgrammer> No such file or directory @ rb_sysopen - yml/characters.yml (Errno::ENOENT)
ericjphillips has joined #ruby
<SkynetProgrammer> I am assuming this means that Ruby thinks that it needs to find yml/characters.yml in wherever I run my program
<pipework> !code
pecpec has joined #ruby
<ckuhn> code
<SkynetProgrammer> Uh, what code do you want?
<ckuhn> how do you load the file
<Ox0dea> nofxx: Nice! It's a great name.
<nofxx> Ox0dea, nice that it means 'vagabond' too... taking it as 'lazy' which is exactly the point
<SkynetProgrammer> Here we go, ckuhn
tubuliferous_ has joined #ruby
<Ox0dea> nofxx: In Russian, or?
<nofxx> Ox0dea, turkish iirc
devbug has joined #ruby
<toretore> SkynetProgrammer: which file is this?
<SkynetProgrammer> story_generator.rb
<SkynetProgrammer> which is a file that is run when I run an installed ruby gem
<SkynetProgrammer> (A ruby gem that I am right now creating)
<SkynetProgrammer> when I use my ruby gem, it runs story_generator.rb, but it fails to load those files unless I am in the folder where those files exist
<SkynetProgrammer> which defeats the purpose of having a ruby gem/CLI
<Ox0dea> SkynetProgrammer: Consider using a data directory.
<toretore> SkynetProgrammer: you need to create some classes
<SkynetProgrammer> What's a data directory?
Vile` has quit [Quit: .]
<SkynetProgrammer> toretore: Yeah, I'll classify it later
<pipework> SkynetProgrammer: Also, for lulz, stop using sample everywhere and instead use a seed in one place and use that seed to select from the collections.
pecpec has quit [Ping timeout: 246 seconds]
martin_work has quit [Quit: martin_work]
blarghlarghl has quit [Remote host closed the connection]
<toretore> SkynetProgrammer: no, it is the reason you're having problems. your lib file shouldn't know anything about file locations
<SkynetProgrammer> pipework: Wouldn't that mean you'll have the same words constantly selected each time I run it?
<SkynetProgrammer> toretore: Oh.
tomphp has joined #ruby
saddad has quit [Ping timeout: 250 seconds]
<toretore> it should have the necessary data fed into it from the outside
<SkynetProgrammer> That's...going to be odd.
<SkynetProgrammer> How would I do that?
<SkynetProgrammer> Do I stuff the yml files in the bin folder?
<SkynetProgrammer> of the ruby gem?
aibot has quit [Remote host closed the connection]
aibot has joined #ruby
duncan_bayne has joined #ruby
<SkynetProgrammer> Like, I need to know how to ensure that the story_generator.rb somehow gets the data from the yml fil
<SkynetProgrammer> *file
<toretore> data = YAML.load(File.read(filename)); app = MyApp.new(data: data)
atmosx_laptop has quit [Quit: Lost in trance]
<pipework> SkynetProgrammer: Not if the seed changes each run.
<duncan_bayne> Hi, quick question - are thread pools the default for JRuby 9.0.1.0? I get 'jruby: warning: unknown property jruby.thread.pooling' when I try to use thread pools with 9.0.1.0 but not with 1.7.22.
<pipework> SkynetProgrammer: But then you can provide a CLI option to pass in a seed so you can have reproducible output.
quazimodo has joined #ruby
<SkynetProgrammer> pipework: Got it
<duncan_bayne> I've had a look at the documentation, but it doesn't say anything about support being dropped / defaulted.
<toretore> duncan_bayne: in which context?
<SkynetProgrammer> toretore: Let me try that
f25_pics has quit []
decoponio has quit [Ping timeout: 252 seconds]
<duncan_bayne> When I set it in JRUBY_OPTS, e.g. JRUBY_OPTS="-J-Djruby.thread.pooling=true" ruby myscript.rb
<duncan_bayne>
<duncan_bayne> No complaint from 1.7.22, but warnings with 9.0.1.0
ap4y has quit [Remote host closed the connection]
<duncan_bayne> Of course it might be I'm passing in an altogether invalid option, and it's just that 1.7.22 is silent about it :)
martin_work has joined #ruby
ap4y has joined #ruby
zenguy_pc has joined #ruby
shmilan has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby
ericjphillips has quit [Quit: Leaving.]
opensource_ninja has joined #ruby
ap4y has quit [Remote host closed the connection]
bronson has quit [Remote host closed the connection]
Vile` has joined #ruby
ap4y has joined #ruby
platzhirsch has joined #ruby
<SkynetProgrammer> toretore: Trying to load the yaml file in bin/skynet is not working
<SkynetProgrammer> However, I kept the yaml file still inside lib/yml/
<SkynetProgrammer> Let me correct the path
duncan_b` has joined #ruby
duncan_b` has quit [Client Quit]
duncan_b` has joined #ruby
duncan_b` has left #ruby [#ruby]
<SkynetProgrammer> Alright it works!
<SkynetProgrammer> Thanks toretore
<SkynetProgrammer> That being said, I am using constants to try and store the data before passing it over to the next file in line
<SkynetProgrammer> Is that bad ruby practice?
workmad3 has quit [Ping timeout: 265 seconds]
ap4y has quit [Remote host closed the connection]
duncan_bayne has quit [Ping timeout: 255 seconds]
ap4y has joined #ruby
<shevy> gateway practice
<toretore> SkynetProgrammer: put your entire project somewhere we can see
<Ox0dea> SkynetProgrammer: Are you using Bundler?
ap4y has quit [Remote host closed the connection]
ap4y has joined #ruby
ap4y has quit [Remote host closed the connection]
an0ma1y has quit [Ping timeout: 264 seconds]
ap4y has joined #ruby
Steve_Jobs has quit [Quit: WeeChat 0.4.2]
duncan_bayne has joined #ruby
apt-get has quit [Remote host closed the connection]
<platzhirsch> People in #java are so aggresive, after 2-3 questions forth and back one of the ops said fuck you :D
cornerma1 has joined #ruby
<SkynetProgrammer> Here it is toretore
<SkynetProgrammer> I am not using Bundler
ckuhn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benlieb has quit [Quit: benlieb]
zenguy_pc has quit [Read error: Connection reset by peer]
lapide_viridi has joined #ruby
mahuebel has quit [Remote host closed the connection]
duncan_bayne has quit [Ping timeout: 252 seconds]
kirun has quit [Quit: Client exiting]
<toretore> firstly, all your lib files should be in the skynet dir
benlieb has joined #ruby
cornerman has quit [Ping timeout: 265 seconds]
cornerma1 is now known as cornerman
ckuhn has joined #ruby
<Ox0dea> Second, all your static data should be in the data dir.
ragingcake_ has quit [Quit: ragingcake_]
linuxboytoo has quit [Remote host closed the connection]
<toretore> you must embrace classes; 99% of your code should be inside a method that is inside a class
workmad3 has joined #ruby
linuxboytoo has joined #ruby
martin_work has quit [Quit: martin_work]
benlieb has quit [Client Quit]
<pipework> Probably more than one method though
<toretore> and 90+ % of those should be instance methods
<SkynetProgrammer> But the thing is, how would I ensure that my file will actually load the yml files in my directory
Vile` has quit [Read error: Connection reset by peer]
<SkynetProgrammer> instead of assuming that it should load yml files in the location I am currently in
yosafbridge has quit [Ping timeout: 240 seconds]
<Ox0dea> SkynetProgrammer: Do you have me on ignore?
<SkynetProgrammer> No, I don't Ox0dea
ndrei has quit [Ping timeout: 244 seconds]
<SkynetProgrammer> I am currently moving my files over to the data directory and the skynet directory
<SkynetProgrammer> I am just afraid my app will not work again
<toretore> SkynetProgrammer: that is not important
<SkynetProgrammer> ...
blik71 has joined #ruby
Igorshp has joined #ruby
Igorshp has quit [Remote host closed the connection]
<toretore> the data will be read from the bin file and then passed into the appropriate class
<SkynetProgrammer> okay
jamesaxl|2 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
ndrei has joined #ruby
linuxboytoo has quit [Ping timeout: 264 seconds]
martin_work has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
yosafbridge has joined #ruby
swgillespie has joined #ruby
<SkynetProgrammer> toretore, the data is not being read from the bin file
<SkynetProgrammer> It just throws No such file or directory @ rb_sysopen - lib/data/characters.yml
Azure|dc has joined #ruby
Andrey has quit [Quit: ChatZilla 0.9.92 [Firefox 40.0.3/20150826023504]]
<Ox0dea> SkynetProgrammer: toretore is telling you to use a path relative to your bin directory.
<SkynetProgrammer> Oh!
<Ox0dea> It's not the greatest idea.
linuxboytoo has joined #ruby
lkba_ has joined #ruby
Rickmasta has joined #ruby
<pipework> I'd just suggest setting a constant in your lib that provides a Pathname object to reach the yaml directory or file.
<SkynetProgrammer> Okay, how do you write a path relative to my bin directory
Azure has quit [Ping timeout: 255 seconds]
<SkynetProgrammer> "No such file or directory @ rb_sysopen - ../lib/data/characters.yml "
<SkynetProgrammer> I thought .. makes it a relative path
<SkynetProgrammer> but it seems like it wasn't
<Ox0dea> SkynetProgrammer: You get that error because you're not executing the script from within your bin directory.
Vile` has joined #ruby
<Ox0dea> Relative paths a shit.
lkba has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
<SkynetProgrammer> so I need to move the data folder into the bin directory right?
<Ox0dea> SkynetProgrammer: Is your data executable?
atomical has quit [Ping timeout: 255 seconds]
stamina has quit [Ping timeout: 264 seconds]
<SkynetProgrammer> It's just a yaml file
michael_mbp has quit [Excess Flood]
zenguy_pc has joined #ruby
<SkynetProgrammer> I only did it because I thought it was good practice to store data outside of a ruby file
<SkynetProgrammer> And now it's causing me pain
<Ox0dea> SkynetProgrammer: It is good practice, obviously.
<platzhirsch> shevy: *shakes*
<SkynetProgrammer> Okay, so...how do I tell Ruby to load a YAML file without typing it as a string
<SkynetProgrammer> and thereby causing it to try and load the file from where I currently am in the terminal
zenguy_pc has quit [Read error: Connection reset by peer]
michael_mbp has joined #ruby
wookiehangover has quit [Ping timeout: 240 seconds]
wookiehangover has joined #ruby
Musashi007 has joined #ruby
Encapsulation has joined #ruby
<SkynetProgrammer> Even stuffing the yaml file directly in the bin folder isn't working.
bruno- has quit [Ping timeout: 240 seconds]
<Ox0dea> And then put your YAML files in data/skynet.
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<SkynetProgrammer> Got it
Musashi007 has quit [Client Quit]
<quazimodo> is there a nicer way to restrict FileUtils operations to a directory, better than this example: https://gist.github.com/siassaj/c3636e78e17f2b142f25
[k- has quit [Ping timeout: 256 seconds]
jgt1 has joined #ruby
<quazimodo> here I'm just making sure to include #{dir} to the top level of my operations, what i really want is more like a jail/chroot
<Ox0dea> SkynetProgrammer: You can finagle paths all sorts of ways, but it's a little silly not to just let Gem provide the facility for you.
<SkynetProgrammer> Yeah it is.
<SkynetProgrammer> I didn't know that there was a method called .datadir
wildlander has quit [Quit: Saliendo]
Rodya_ has quit [Ping timeout: 240 seconds]
Rodya_ has joined #ruby
<SkynetProgrammer> No such file or directory @ rb_sysopen - /home/tariq/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/skynet-0.1.0/data/skynet/characters.yml
<SkynetProgrammer> Progress at least
ap4y has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<Ox0dea> SkynetProgrammer: Did you build and install?
<SkynetProgrammer> I did
sotojuan has joined #ruby
<Ox0dea> Are you sure you didn't stick the files in data/skynet/yml?
ckuhn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<SkynetProgrammer> No I did not...
<SkynetProgrammer> but why would I want to have a skynet folder
<SkynetProgrammer> within a data folder?
<Ox0dea> >> require 'json'; Gem.datadir 'json'
<ruboto> Ox0dea # => "/execpad/interpreters/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/json-1.8.1/data/json" (https://eval.in/436422)
<SkynetProgrammer> Never mind
<Ox0dea> It's just how Gem.datadir works.
<SkynetProgrammer> Fair enough
<SkynetProgrammer> I'll fix it
eminencehc has joined #ruby
<Ox0dea> I'm gonna roll. Food if I don't get all Strings.
jt__ has joined #ruby
<Ox0dea> >> [*ObjectSpace.each_object].sample 3
<ruboto> Ox0dea # => ["i686", "val", "@specification_version"] (https://eval.in/436423)
<Ox0dea> :'(
spider-mario has quit [Remote host closed the connection]
<SkynetProgrammer> Got it, Ox0dea
<Ox0dea> Excellent!
<SkynetProgrammer> Code no longer has that yaml error
<SkynetProgrammer> the Yaml file is finally being loaded
<SkynetProgrammer> Just so much pain though. The more pain you have, the harder it is to refactor it later
<Ox0dea> Wunderbar.
drewvanstone has joined #ruby
<Ox0dea> SkynetProgrammer: On the bright side, you should never have *this* pain ever again.
bigmac has quit [Ping timeout: 264 seconds]
chills42 has joined #ruby
saddad has joined #ruby
zenguy_pc has joined #ruby
pecpec has joined #ruby
joufflu has joined #ruby
ramfjord has quit [Ping timeout: 256 seconds]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chills42 has quit [Ping timeout: 240 seconds]
pecpec has quit [Ping timeout: 240 seconds]
lxsameer has quit [Quit: Leaving]
solocshaw has joined #ruby
devbug_ has joined #ruby
scripore has joined #ruby
firstdayonthejob has quit [Ping timeout: 250 seconds]
zenguy_pc has quit [Read error: No route to host]
devbug has quit [Ping timeout: 240 seconds]
startupality has quit [Quit: startupality]
sanjayu has joined #ruby
PublicSubnet has quit [Ping timeout: 264 seconds]
SCHAAP137 has quit [Remote host closed the connection]
Narzew has quit [Quit: Leaving]
startupality has joined #ruby
lapide_viridi has quit [Quit: Leaving]
mprelude has quit [Ping timeout: 250 seconds]
phutchins has quit [Ping timeout: 250 seconds]
rikkipitt has quit [Quit: Leaving...]
<blik71> how would u escape parenthesis in ruby when using regular expressions?
<eam> blik71: with a backslach
<eam> backslash, even
saddad has quit [Quit: WeeChat 1.3-dev]
skade has joined #ruby
saddad has joined #ruby
<blik71> cool thanks guys!
<eam> hmm, does ruby RE not support \Q...\E?
<pipework> RE?
<eam> regex
skade has quit [Client Quit]
<Ox0dea> eam: Okay, Perl guy.
<eam> it appears not to support it. That's an unfortunate divergence from PCRE
<eam> how are you supposed to quote in a regex!?
<eam> (quote a literal string, not quote one char)
freerobby has quit [Read error: Connection reset by peer]
<darix> eam: %r{}?
freerobby has joined #ruby
<eam> well, that's to delimit a regex expression like // right?
opensource_ninja has quit [Ping timeout: 244 seconds]
<eam> this is like: /foo\Qno meta()chars in here have any effect\E/
cb_ has quit [Remote host closed the connection]
martin_work has quit [Quit: martin_work]
skade has joined #ruby
skade has quit [Client Quit]
opensource_ninja has joined #ruby
<Ox0dea> As if regular expressions weren't Turing-complete enough.
benlieb has joined #ruby
bigmac has joined #ruby
justinmcp has joined #ruby
Ropeney has joined #ruby
zenguy_pc has joined #ruby
willharrison has joined #ruby
gambl0re has quit [Ping timeout: 240 seconds]
gambl0re has joined #ruby
devoldmx_ has joined #ruby
psy_ has quit [Ping timeout: 250 seconds]
zenguy_pc has quit [Read error: Connection reset by peer]
Igorshp has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
eminencehc has quit [Remote host closed the connection]
Soda has quit [Remote host closed the connection]
freerobby has quit [Read error: No route to host]
freerobby has joined #ruby
tubuliferous_ has quit [Ping timeout: 252 seconds]
atomical has joined #ruby
jgt1 has quit [Ping timeout: 260 seconds]
diegoviola has joined #ruby
ramfjord has joined #ruby
bruno- has joined #ruby
Igorshp has quit [Remote host closed the connection]
scripore has quit [Quit: Leaving]
gambl0re has quit [Ping timeout: 240 seconds]
zenguy_pc has joined #ruby
Pupeno has quit [Remote host closed the connection]
rgb-one has joined #ruby
gambl0re has joined #ruby
dreadnought8971 has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 252 seconds]
dreadnought8971 has joined #ruby
solocshaw1 has joined #ruby
SkynetProgrammer has quit [Ping timeout: 246 seconds]
baweaver has quit [Remote host closed the connection]
solocshaw has quit [Ping timeout: 240 seconds]
solocshaw1 is now known as solocshaw
swgillespie has left #ruby ["Textual IRC Client: www.textualapp.com"]
bronson has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
Vile` has quit [Ping timeout: 244 seconds]
mahuebel has joined #ruby
Vile` has joined #ruby
tubuliferous_ has joined #ruby
pecpec has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
Balzrael has quit [Quit: Leaving]
freerobby has quit [Ping timeout: 256 seconds]
freerobby has joined #ruby
startupality has quit [Quit: startupality]
pecpec has quit [Ping timeout: 246 seconds]