<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]
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]
<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
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]
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>
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.
<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.
<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.
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?
<[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]
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>
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…]
<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
<[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?
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
<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.
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
<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…]
<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?
<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
<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.
<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?
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>
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) }
<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>
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
<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
<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