SeepingN has quit [Quit: The system is going down for reboot NOW!]
anisha has joined #ruby
<RougeR>
havenwood: finished it
punnie has quit [Quit: Connection closed for inactivity]
cschneid has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Ping timeout: 256 seconds]
wontruefree has joined #ruby
lxsameer has joined #ruby
cschneid has quit [Remote host closed the connection]
cschneid has joined #ruby
cschneid has quit [Remote host closed the connection]
lxsameer has quit [Ping timeout: 255 seconds]
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
lxsameer has joined #ruby
roamingdog has joined #ruby
ellcs1 has quit [Ping timeout: 260 seconds]
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
ellcs has joined #ruby
apeiros has quit [Remote host closed the connection]
lxsameer has quit [Ping timeout: 255 seconds]
za1b1tsu has joined #ruby
aupadhye has joined #ruby
lxsameer has joined #ruby
amar has joined #ruby
Inline has quit [Quit: Leaving]
lxsameer has quit [Ping timeout: 260 seconds]
wontruefree has quit [Quit: bye]
amar has quit [Ping timeout: 265 seconds]
amar has joined #ruby
lxsameer has joined #ruby
apeiros has joined #ruby
amar has quit [Ping timeout: 265 seconds]
amar has joined #ruby
lxsameer has quit [Ping timeout: 276 seconds]
Venomen has joined #ruby
Venomen has quit [Changing host]
Venomen has joined #ruby
lxsameer has joined #ruby
apeiros has quit [Remote host closed the connection]
lxsameer has quit [Ping timeout: 256 seconds]
lxsameer has joined #ruby
taylorzr has quit [Ping timeout: 265 seconds]
lxsameer has quit [Ping timeout: 256 seconds]
schleppel has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Ping timeout: 260 seconds]
andikr has joined #ruby
lxsameer has joined #ruby
yohji has joined #ruby
lxsameer has quit [Ping timeout: 255 seconds]
wilbert_ has joined #ruby
Caerus has quit [Quit: Leaving]
wilbert has quit [Ping timeout: 245 seconds]
vondruch has quit [Quit: vondruch]
aufi has joined #ruby
aufi_ has joined #ruby
lxsameer has joined #ruby
aufi has quit [Ping timeout: 268 seconds]
lxsameer has quit [Ping timeout: 268 seconds]
tvw has joined #ruby
claudiuinberlin has joined #ruby
\void has quit [Quit: So long, and thanks for all the fish.]
lxsameer has joined #ruby
BloopMonster has joined #ruby
TomyWork has joined #ruby
RougeR has quit [Ping timeout: 240 seconds]
n13z has joined #ruby
lxsameer has quit [Ping timeout: 256 seconds]
sysvalve has joined #ruby
lxsameer has joined #ruby
ogres has quit [Quit: Connection closed for inactivity]
amar has quit [Remote host closed the connection]
amar has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
vondruch has joined #ruby
megamos has joined #ruby
amar has quit [Ping timeout: 248 seconds]
wilbert_ has quit [Ping timeout: 268 seconds]
RougeR has joined #ruby
RougeR has quit [Changing host]
RougeR has joined #ruby
lxsameer has joined #ruby
Burgestrand has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
RougeR has quit [Ping timeout: 276 seconds]
__nightw0lf has joined #ruby
lxsameer has joined #ruby
CrazyEddy has quit [Ping timeout: 256 seconds]
_nightw0lf has quit [Ping timeout: 245 seconds]
megamos has quit [Ping timeout: 256 seconds]
lxsameer has quit [Ping timeout: 256 seconds]
Burgestrand has quit [Quit: Closing time!]
lxsameer has joined #ruby
__nightw0lf has quit [Quit: Leaving]
Mike11 has joined #ruby
bjpenn has joined #ruby
Burgestrand has joined #ruby
Beams has joined #ruby
conta has quit [Ping timeout: 260 seconds]
amar has joined #ruby
megamos has joined #ruby
Puffball has quit [Quit: Puffball]
conta has joined #ruby
clemens3 has joined #ruby
nowhere_man has joined #ruby
guille-moe has joined #ruby
konos5__ has joined #ruby
BloopMonster has quit [Ping timeout: 240 seconds]
CrazyEddy has joined #ruby
Crackville has joined #ruby
<konos5__>
Hi, everyone! Quick question: The ruby eigenclass diagram suggests that `BasicObject.singleton_class.singleton_class.superclass` is `Class` (Please see the link: https://www.dropbox.com/s/rmcdzjgb9c4ljsw/ruby-eigenclass-diagram-edit.png?dl=0) . However it using a ruby interpreter I found out that it's #Class and not Class. Which one is true?
<konos5__>
\q
konos5__ has quit []
konos5__ has joined #ruby
Crackville has quit []
dhollin3 has joined #ruby
dhollinger has quit [Ping timeout: 264 seconds]
Guest41035 has quit [Changing host]
Guest41035 has joined #ruby
Guest41035 is now known as Kestrel-029
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
karapetyan has joined #ruby
bjpenn has quit [Ping timeout: 240 seconds]
karapetyan has quit [Ping timeout: 264 seconds]
Es0teric has joined #ruby
reber has joined #ruby
inukshuk_ has joined #ruby
postmodern has quit [Quit: Leaving]
sonOfRa has quit [Remote host closed the connection]
<konsolebox>
konos5__: that "#Class" is probably just output of "inspect"
inukshuk_ has quit [Quit: leaving]
naftilos76 has joined #ruby
<konos5__>
You just run `BasicObject.singleton_class.singleton_class.singleton_class.class` instead of `BasicObject.singleton_class.singleton_class.singleton_class.superclass`
<konos5__>
ooops my apologies.
<konsolebox>
oh
<konos5__>
should just be `BasicObject.singleton_class.singleton_class.superclass`
<konsolebox>
you're it should be literally Class
<konsolebox>
*you're saying
<konos5__>
that should return `#<Class:Class>`
karapetyan has joined #ruby
<konos5__>
which it does, but the diagram suggests otherwise
<konos5__>
I'm saying that the diagram suggests that it should literally be `Class` but the interpreter says `#<Class:Class>`
vondruch_ has joined #ruby
<konsolebox>
yes i get what you mean
<konos5__>
it can't be both true. ...and the interpreter usually doesn't make mistakes... so... why is the diagram "wrong"?
<konos5__>
maybe it refers to a previous version of Ruby..?
<konsolebox>
perhaps Ruby have some forms of specialization when it comes to singleton classes
<konos5__>
...carry on
<konsolebox>
konos5__: i no other thoughts more than that
<konsolebox>
*i have
vondruch has quit [Ping timeout: 264 seconds]
vondruch_ is now known as vondruch
amar has joined #ruby
<konos5__>
Thanks anyway, I'll try again later on today...
biberu has joined #ruby
apeiros has joined #ruby
shinnya has quit [Ping timeout: 240 seconds]
Burgestrand has quit [Quit: Closing time!]
karapetyan has quit [Remote host closed the connection]
mjolnird has quit [Remote host closed the connection]
megamos has quit [Quit: Leaving]
DeepIO has joined #ruby
apeiros has quit [Remote host closed the connection]
roamingdog has joined #ruby
apeiros has joined #ruby
BloopMonster has joined #ruby
Burgestrand has joined #ruby
<konsolebox>
konos5__: as i observed, singleton classes of normal objects inherit differently from those of classes. e.g `Object.new.singleton_class.superclass == Object`, but `Object.singleton_class.superclass == BasicObject.singleton_class`. One thing to note is that the superclass of BasicObject's singleton_class is Class, and singleton class of Class is #<Class:Class>, that is why it is what you get with BasicObject.singleton_class.singleton_class.superclass
feelx- has joined #ruby
feelx has quit [Ping timeout: 256 seconds]
<konsolebox>
>> BasicObject.singleton_class.superclass == Class && BasicObject.singleton_class.singleton_class.superclass == Class.singleton_class
<konos5__>
Thanks I get that and I see what's going on. However the diagram disagrees with you and has been quoted here multiple times.
<konos5__>
I mean the output of irb makes perfect sense and is -in my eyes- totally justified. The diagram isn't
graphene has quit [Remote host closed the connection]
lxsameer has quit [Ping timeout: 256 seconds]
graphene has joined #ruby
graphene has quit [Read error: Connection reset by peer]
<konsolebox>
konos5__: i agree
lxsameer has joined #ruby
graphene has joined #ruby
drale2k_ has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Mike11 has quit [Ping timeout: 265 seconds]
yokel has quit [Ping timeout: 245 seconds]
yokel has joined #ruby
<konsolebox>
konos5__: where did you get the diagram though?
<konos5__>
can't really remember the user...
<konos5__>
could be @apeiros
<konos5__>
but can't really remember...it's been 5 to 6 months ago...
KaffeeJunky123 has joined #ruby
InfinityFye has joined #ruby
punnie has joined #ruby
conta has quit [Quit: conta]
KaffeeJunky123 has left #ruby [#ruby]
KaffeeJunky123 has joined #ruby
<KaffeeJunky123>
I can't seem to use the ruby standard library in irb, it doesn't find any of the standard library modules when I try to either write its fullname or use include, I've ruby 2.3.3 installed here.
<KaffeeJunky123>
Any ideas what might be wrong?
<tbuehlmann>
KaffeeJunky123: you need to require first. did you do that?
<KaffeeJunky123>
tbuehlmann: yes it does not find any of the standard library modules, the core ones work
<KaffeeJunky123>
eg Math works but Matrix does not
<KaffeeJunky123>
Which should be present in this version of ruby
<KaffeeJunky123>
I'm on Debian and installed ruby-full, if that helps
<croberts>
yeah in vmware if index is 7 that is reserverd for a internal device id so it has to skip that one
<apeiros>
anyway, "I had X before" is not really an explanation for why you now have a ternary + if. but from that code I'd assume you're still a rookie learning the syntax?
anisha has quit [Read error: Connection reset by peer]
<croberts>
for the disk
<croberts>
yeah
<croberts>
still a noob
ellcs1 has joined #ruby
bradleyprice has quit [Ping timeout: 265 seconds]
amar has quit [Remote host closed the connection]
<apeiros>
well, `a = condition ? if_truthy_this : if_falsy_that` is how ternary goes. no if. e.g. `a = true ? 1 : 2` will assign 1 to a.
yokel has joined #ruby
BloopMonster has joined #ruby
<croberts>
ah ok
r29v has quit [Quit: r29v]
<apeiros>
and don't use map if you want the side-effect. map is if you want the return value of map.
<croberts>
sorry for the awful code, like i said still trying to learn
<apeiros>
e.g. `array.each do |item| puts item end` instead of `array.map do |item| puts item end`
alex`` has quit [Ping timeout: 265 seconds]
<croberts>
ok ty again
graphene has quit [Remote host closed the connection]
Liothen has quit [Quit: The Dogmatic Law of Shadowsong]
Liothen has joined #ruby
Liothen has quit [Changing host]
Liothen has joined #ruby
psychicist__ has joined #ruby
anisha has joined #ruby
synthroid has quit [Remote host closed the connection]
chouhoulis has joined #ruby
gizmore has joined #ruby
AlHafoudh has quit [Ping timeout: 245 seconds]
guille-moe has joined #ruby
synthroid has joined #ruby
foxxx0 has quit [Ping timeout: 256 seconds]
Mike11 has joined #ruby
yokel has quit [Ping timeout: 245 seconds]
Burgestrand has quit [Quit: Closing time!]
gix- has quit [Quit: Client exiting]
yokel has joined #ruby
AlHafoudh has joined #ruby
foxxx0 has joined #ruby
gix has joined #ruby
clemens3 has quit [Ping timeout: 256 seconds]
nicht has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
caleBOT_ has quit [Remote host closed the connection]
yqt has quit [Ping timeout: 265 seconds]
r29v has joined #ruby
sriehl has joined #ruby
sriehl has quit [Changing host]
sriehl has joined #ruby
shinnya has joined #ruby
apeiros has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 276 seconds]
cagomez has joined #ruby
p0s1x has joined #ruby
p0s1x has quit [Client Quit]
nowhere_man has quit [Ping timeout: 245 seconds]
mmattice has quit [Ping timeout: 260 seconds]
andikr has quit [Remote host closed the connection]
ropeney has joined #ruby
mmattice has joined #ruby
FernandoBasso has joined #ruby
<KaffeeJunky123>
convention wise, how should I name an instance method that modifies the objects state and returns a boolean? Is this even a good idea? It's a method on my tic tac toe games board class, I called it move for now, but I'm somehow unhappy with the name.
bradleyp_ has quit [Remote host closed the connection]
<gizmore>
add ?
<gizmore>
like foo.bar?
<gizmore>
KaffeeJunky123: modifieng and returning eh?
amar_ has joined #ruby
<gizmore>
KaffeeJunky123: in my project i chose _foo for getters and foo(foo); self; for setters (chain)
caleBOT has joined #ruby
rafadc has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<KaffeeJunky123>
gizmore: I don't think it makes sense to chain on this method, it takes the indice of the field as argument and marks it for the current player or returns false if it's an illegal turn
<gizmore>
i did a major design pattern on my project
amar_ has quit [Ping timeout: 260 seconds]
<gizmore>
_foo (getters)
<gizmore>
foo(foo) setters
mupt has joined #ruby
<gizmore>
_foo (being public getters)
<Zarthus>
why not just use attr_accessor
Beams has quit [Quit: .]
ciscam has quit [Ping timeout: 256 seconds]
ciscam has joined #ruby
Mrgoose2 has joined #ruby
karapetyan has joined #ruby
ellcs1 has quit [Ping timeout: 264 seconds]
dhollin3 is now known as dhollinger
foxxx0 has quit [Ping timeout: 256 seconds]
<gizmore>
Zarthus: good question
<gizmore>
i dont like this decorator
<Zarthus>
i'd imagine ruby allows you to override the decorator (or at least include your own)
Es0teric has quit [Quit: Computer has gone to sleep.]
mroutis has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<gizmore>
why deal with those internals of attr_* when you can just define your own to be sure
Sina has joined #ruby
karapetyan has quit [Ping timeout: 256 seconds]
aufi_ has quit [Quit: Leaving]
<Zarthus>
because they're convienient
<Zarthus>
and t's waht everyone expects you'll be using
<Zarthus>
why write in ruby when you could be writing in c
mupt has quit [Ping timeout: 240 seconds]
Puffball has joined #ruby
herbmillerjr has joined #ruby
<konsolebox>
KaffeeJunky123: an action method returning boolean is pretty ok to me
wontruefree has left #ruby ["this is not the client you are looking for"]
rshetty has joined #ruby
<KaffeeJunky123>
konsolebox: actually I can just write identity(3) instead of diagonal(1,1,1) to shorten it down
synthroid has quit [Ping timeout: 265 seconds]
<konsolebox>
i see
naftilos76 has quit [Quit: Leaving]
roamingdog has quit [Ping timeout: 245 seconds]
synthroid has joined #ruby
roamingdog has joined #ruby
synthroi_ has joined #ruby
synthro__ has quit [Ping timeout: 260 seconds]
caleBOT has quit [Remote host closed the connection]
caleBOT has joined #ruby
rafadc has joined #ruby
synthroid has quit [Ping timeout: 256 seconds]
jrich523 has joined #ruby
catbusters has joined #ruby
bradleyprice has quit [Remote host closed the connection]
bradleyprice has joined #ruby
<jrich523>
hey guys, any suggestions on how to expose rules to a user via a file config? that would allow basic logic
<jrich523>
its for resource rules
<jrich523>
host.totalcpu > host.usedcpu - 2 or something simple like that
eckhardt_ has joined #ruby
akaiiro has joined #ruby
InfinityFye has quit [Quit: Leaving]
AJA4350 has quit [Quit: AJA4350]
kapil___ has quit [Quit: Connection closed for inactivity]
nowhere_man has joined #ruby
FernandoBasso has quit [Quit: Page closed]
dbugger_ has joined #ruby
claudiuinberlin has joined #ruby
mupt has quit [Ping timeout: 240 seconds]
dviola has joined #ruby
Mike11 has quit [Ping timeout: 264 seconds]
shinnya has quit [Ping timeout: 248 seconds]
AlHafoudh has quit [Ping timeout: 256 seconds]
karapetyan has quit [Remote host closed the connection]
foxxx0 has quit [Ping timeout: 255 seconds]
mupt has joined #ruby
ohcibi has quit [Ping timeout: 260 seconds]
bjpenn has joined #ruby
rshetty has quit [Remote host closed the connection]
fluxAeon_ has joined #ruby
ohcibi has joined #ruby
karapetyan has joined #ruby
foxxx0 has joined #ruby
alex`` has joined #ruby
AlHafoudh has joined #ruby
mupt has quit [Ping timeout: 240 seconds]
tvw has quit [Remote host closed the connection]
ogres has quit [Quit: Connection closed for inactivity]
qwebirc70579 has joined #ruby
sameerynho has joined #ruby
deadnull has joined #ruby
mupt has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
deadnull has quit [Client Quit]
RougeR has joined #ruby
RougeR has quit [Changing host]
RougeR has joined #ruby
qwebirc70579 has quit [Ping timeout: 260 seconds]
caleBOT has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
karapetyan has quit [Remote host closed the connection]
nima_m has joined #ruby
megamos has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
caleBOT_ has joined #ruby
pauliesaint_ has joined #ruby
ramfjord has joined #ruby
<KaffeeJunky123>
wow, I spent hours on this silly matrix stuff and yet my code looks like this https://ideone.com/iZW8C1
needhelp has joined #ruby
\void has joined #ruby
<needhelp>
Hi channel. I need to do a join (many-to-many relationship) togheter with or where. What is the best way to do it? Raw sql or ActiveRecords built in functions?
<KaffeeJunky123>
this acutally means I want people to look at my code and state their opinion
<havenwood>
#ruby channel logs for "markov" show: "markov my words" "markov twain" "markoved for death" "markey markov" "markov the beast" "markov zuckerberg" "markov polo" "markov get set go"
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
MagePsycho has joined #ruby
rafadc has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
harmaahylje has joined #ruby
<MagePsycho>
run "find #{release_path}/var #{release_path}/vendor #{release_path}/pub/static #{shared_path}/pub/media #{release_path}/app/etc -type f -exec chmod g+w {} \;"
Matthew1 has joined #ruby
<MagePsycho>
is valid in ruby?
cmhobbs has joined #ruby
<cmhobbs>
is there a less gross way to define one line predicate methods than this? def foo?; !!@foo end
<havenwood>
MagePsycho: The `run "..."` part is valid Ruby. The shell script you're running isn't Ruby at all.
<havenwood>
cmhobbs: That doesn't seem gross to me. Seems fine.
<cmhobbs>
hm
<cmhobbs>
just doesn't really flow
<havenwood>
cmhobbs: Alternatively: def foo?; @foo end
<MagePsycho>
inside run “” we can run shell commands right
<cmhobbs>
s'ok, it's functional
<MagePsycho>
@havenwood
<cmhobbs>
havenwood: that won't force true or false, though. what if foo is nil or "bar"
<havenwood>
cmhobbs: Not all predicate methods return `true` or `false`, just something truthy and `nil` or `false`.
<havenwood>
MagePsycho: In shelling out, it's often better to provide the individual arguments. That way your programming language can run the command directly, without shelling out to get shellword splitting.
bradleyprice has quit [Remote host closed the connection]
MagePsycho has quit [Quit: MagePsycho]
cschneid has joined #ruby
duderonomy has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
MagePsycho has joined #ruby
MagePsycho has quit [Client Quit]
MagePsycho has joined #ruby
MagePsycho has quit [Client Quit]
<starseed0000>
If I have a user model with a profile, and that profile belongs to a color - if I were writing an api would it make any sense to put an update to /profile/color or would it just be an update to /profile?
<starseed0000>
I feel like updating to color implies I am updating the color itself, not the relationship.
AKPWD has quit [Quit: じゃね。]
AKPWD has joined #ruby
<starseed0000>
But from an api standpoint it isn't clear to update color you would request /profile
<starseed0000>
Would it make more sense to PUT to a color_relationship path or something?
<starseed0000>
What is best practice there?
jenrzzz has quit [Ping timeout: 276 seconds]
bruce_lee has quit [Remote host closed the connection]
mupt has quit [Ping timeout: 240 seconds]
shinnya has joined #ruby
schleppel has quit [Quit: Konversation terminated!]
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eckhardt_ has joined #ruby
eckhardt_ has quit [Client Quit]
bradleyprice has joined #ruby
bradleyprice has quit [Remote host closed the connection]
darkhanb has quit [Ping timeout: 255 seconds]
<baweaver>
Hrm, matrixes are immutable it seems. Interesting.
<baweaver>
I will say the varying ways of iteration are nice though
rafadc has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
<baweaver>
>> require 'matrix'; Matrix[%w(x o x), %w(x o -), %(x - o)].each(:upper).to_a
<ruby[bot]>
baweaver: # => can't convert String into an Array (undefined method `to_ary' for "x - o":String ...check link for more (https://eval.in/1030630)
<jrich523>
hey guys, need to store 'rules' for VM provisioning, and was wondering what the best way would be to save those as a configuration
<baweaver>
Heh, whoops.
<baweaver>
>> require 'matrix'; Matrix[%w(x o x), %w(x o -), %w(x - o)].each(:upper).to_a
<Zarthus>
it doesn't really require knowledge of ruby, just decent documentation
<jrich523>
i guess i should add that they run it from a server
<jrich523>
so setup etc isnt too big of a deal
<jrich523>
right now the process is they ssh to a box, run a script provision -application jrich -env dev -guestcount 5
<Zarthus>
anyway, this is all just a suggestion, but rather than implementing a whole system to handle parsing of rules, you might as well rely on ruby *shrug*
<jrich523>
well the reason im looking at this is the rules the company wants changes often
<jrich523>
right now that means telling me, i do an update/PR and push a deployment
<jrich523>
sorta horrible to change rules
<jrich523>
so i wanted to expose that so they can do it as they need it
<Zarthus>
are you writing something like saltstack?
karapetyan has quit [Remote host closed the connection]
<jrich523>
oh god no
codymj has quit [Quit: Leaving]
<jrich523>
this actually directly talks to Foreman
<jrich523>
foreman/puppet handle all the config etc
<jrich523>
they dont like the foreman gui (it doesnt have all they need)
sameerynho has quit [Ping timeout: 260 seconds]
<Zarthus>
fair enough
<jrich523>
thats my next task actually, to decomission this script in favor of a gui plugin (lets see how many ages that takes)
ohcibi has quit [Quit: No Ping reply in 180 seconds.]
<jrich523>
so, on the foreman side, its react, i can create a rule page and process it howeveer i want
AlHafoudh has quit [Ping timeout: 255 seconds]
<jrich523>
or rather, i can easier control the input with a react page, where as with this, its harder to control
<jrich523>
and i've been trying to nicely say, the idiots run this
<jrich523>
so it has to be super simple
<jrich523>
so having them edit a class of ruby, probably not a good idea :)
reber has quit [Read error: Connection reset by peer]
foxxx0 has quit [Ping timeout: 255 seconds]
<Zarthus>
i would expect even a junior sysadmin to manage a small ruby config :)
<jrich523>
i would too :-/
<jrich523>
my expectations, and reality have clashed
<jrich523>
lol
ohcibi has joined #ruby
rafadc has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Zarthus>
i guess that's why they hired you to do it rather than let them do it themselves huh
<jrich523>
yeah
<Zarthus>
Smells like job security.
<jrich523>
ugh
<jrich523>
this place is so banged up its the opposite
<jrich523>
people leaving left and right cuz they are fed up
<Zarthus>
smells like even more job security.
<jrich523>
lol sorta i guess
<jrich523>
i typically do like 1-2 month contracts
<jrich523>
i think im up to 14 months now
<zenspider>
"needs to support maths" => write an interpreter
<zenspider>
or yeah, give them full access to ruby or whatever.
<jrich523>
well, thats the thing, i was hoping there was something sort of ready to go :)
<Zarthus>
I couldn't think of anything simpler than ruby for this, tbh
<zenspider>
jrich523: something ready to go, for your particular and peculiar needs?
<jrich523>
well can i do a rule.rb thats like one function def rules(kvm,cabinet,pod)
<jrich523>
no, a general parser that i could feed stuff to
* Zarthus
shrugs, and would recommend the Vagrantfile config style over a dedicated function
<zenspider>
there's always eval. and now you have 2 problems and a disfunctional server
<jrich523>
yeah i think im leaning towards that method too
<zenspider>
that's really dumb... you've been warned.
<jrich523>
wait, isnt for regex? :)
<Zarthus>
if you have enough disfunctional servers the number of problems start to reduce
<Zarthus>
they grow in size but not in quantity
<jrich523>
lol
foxxx0 has joined #ruby
<zenspider>
if you want something slighly more secure, you could use ruby_parser + sexp_processor to write a simple interpreter for a subset of ruby and limit the expressions you allow
<jrich523>
right now im thinking more like the vagrant config
jhack has quit [Quit: jhack]
<jrich523>
the rules i'll have to put in there should make it easy for anyone to tweak later on
mmattice has quit [Ping timeout: 260 seconds]
<Zarthus>
whatever you end up going with, good luck
<Zarthus>
i'm off to bed.
<jrich523>
thanks
<jrich523>
have a good one!
AlHafoudh has joined #ruby
jhack has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
AJA4350 has joined #ruby
pauliesaint has quit [Quit: pauliesaint]
jenrzzz has quit [Ping timeout: 256 seconds]
lordtolstoi has quit [Remote host closed the connection]
pauliesaint has joined #ruby
caleBOT has quit [Remote host closed the connection]
jhack has quit [Quit: jhack]
mmattice has joined #ruby
pauliesaint has quit [Client Quit]
pauliesaint has joined #ruby
cschneid has quit [Remote host closed the connection]
jhack has joined #ruby
jhack has quit [Client Quit]
ellcs has joined #ruby
caleBOT has joined #ruby
feelx has joined #ruby
feelx- has quit [Ping timeout: 248 seconds]
AlHafoudh has quit [Ping timeout: 255 seconds]
cseder has joined #ruby
cseder has left #ruby [#ruby]
foxxx0 has quit [Ping timeout: 264 seconds]
AlHafoudh has joined #ruby
foxxx0 has joined #ruby
graphene has quit [Read error: Connection reset by peer]
graphene has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
ellcs has quit [Ping timeout: 245 seconds]
karapetyan has joined #ruby
mmattice has quit [Ping timeout: 256 seconds]
lavamind has joined #ruby
mmattice has joined #ruby
<lavamind>
hello, ruby newbie here, I'm trying my hand at beaker-rspec but am having trouble with it running vagrant. it's installed on my Debian 9 system through the package manager but it says "can't find executable" when doing "bundle exec vagrant"
karapetyan has quit [Ping timeout: 265 seconds]
<lavamind>
however when I do "bundle exec which vagrant" it says "/usr/bin/vagrant" which is correct
<mynameisdebian>
cidrs[0][1] on line 34. I have commented line 34 and confirmed that it is the only line accessing cidrs[0][1]. Can anyone see how “cidrs[0][1]” can keep changing from the line “cidrs[i][1] += 1” when I no longer equals 1?
coderphive has joined #ruby
<havenwood>
lavamind: head -n1 /usr/bin/vagrant
<lavamind>
havenwood: #!/usr/bin/ruby
<havenwood>
lavamind: mm
<havenwood>
lavamind: Is that as expected? Matches?: command -v ruby
<havenwood>
lavamind: I've not seen this one before.
<havenwood>
mynameisdebian: You don't need to `require 'rubygems'` these days.
<lavamind>
havenwood: just to make sure, I shouldnt need to have "vagrant" in my Gemfile correct?
r29v has joined #ruby
<mynameisdebian>
havenwood thx
ElFerna has quit [Quit: ElFerna]
<havenwood>
lavamind: Yes, you should have it in your gemfile if you want to prefix `bundle exec` or `RUBYGEMS_GEMDEPS=-`.
<havenwood>
lavamind: Both of those limit gem choices to those found in the Gemfile.lock
<havenwood>
mynameisdebian: Seems like no reason to set ARGV.first to a thing - just directly: File.open('test.plist')
<mynameisdebian>
havenwood: it's for testing
<havenwood>
mynameisdebian: We really don't use `for` in Ruby.
<darix>
JFYI: we already have an opensuse package for 2.6 testing
<mynameisdebian>
since when
<havenwood>
mynameisdebian: Forever. Are you familiar with #each?
<havenwood>
darix: nice
<darix>
mynameisdebian: most people will probably use yourenumrable.each {|e| ... }
<lavamind>
havenwood: I see no sign of this in the beaker-rspec documentation tough, and I noticed it pulls in beaker-vagrant which is supposed to handle interfacing with vagrant
<mynameisdebian>
yes but i need an iterating variable as well so I use the built-in for command designed for that purpose
mozzarella has joined #ruby
<lavamind>
maybe it's just a coincidence that running the beaker testsuite outputs the same error as "bundle exec vagrant" ?
<havenwood>
mynameisdebian: There is *always* a better way.
<mynameisdebian>
havenwood: do you have any comment on my original question?
<havenwood>
mynameisdebian: I've never seen `for` legitimately used in Ruby.
<darix>
mynameisdebian: #each is also builtin :P
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood>
mynameisdebian: cidr_list_length.times do |i|
mmattice has joined #ruby
za1b1tsu has quit [Ping timeout: 256 seconds]
caleBOT has quit [Remote host closed the connection]