<Ox0dea>
Did this patch make it impossible to access FrozenCore in any useful way?
haraoka has quit [Ping timeout: 272 seconds]
rbowlby has joined #ruby-lang
datanoise has joined #ruby-lang
djbkd has joined #ruby-lang
charliesome has quit [Quit: zzz]
aaeron has quit [Quit: aaeron]
gix has quit [Ping timeout: 256 seconds]
datanoise has quit [Ping timeout: 258 seconds]
djbkd has quit [Ping timeout: 255 seconds]
ubernil has joined #ruby-lang
gix has joined #ruby-lang
<womble>
Does there exist a gem which just has rspec matchers for CSS selectors in a document, without requiring me to buy into the entire capybara worldview?
<womble>
I would have expected so, but I'll be jiggered if I can find one that doesn't date from RSpec 1.x days.
kfpratt has quit [Remote host closed the connection]
revath has joined #ruby-lang
hahuang65 has quit [Ping timeout: 252 seconds]
Jon-Xie has quit [Read error: Connection reset by peer]
charliesome has joined #ruby-lang
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby-lang
Jon-Xie has joined #ruby-lang
<Ox0dea>
charliesome: Did you ever look into accessing FrozenCore in 2.1+?
<charliesome>
Ox0dea: nah haven't had a chance
<Ox0dea>
charliesome: That its superclass is essentially NULL makes things quite troublesome.
<Ox0dea>
It's still "accessible" via the ObjectSpace._id2ref trick, but that's about the end of the line as best I can tell.
revath has quit [Ping timeout: 255 seconds]
dellavg_ has joined #ruby-lang
b_hoffman has joined #ruby-lang
Jon-Xie has quit [Remote host closed the connection]
kfpratt has joined #ruby-lang
b_hoffman has quit [Quit: b_hoffman]
datanoise has joined #ruby-lang
Miphix has joined #ruby-lang
datanoise has quit [Ping timeout: 256 seconds]
jwaldrip has joined #ruby-lang
harly has joined #ruby-lang
deg has joined #ruby-lang
deg_ has quit [Ping timeout: 264 seconds]
Musashi007 has joined #ruby-lang
mikecmpbll has quit [Quit: ciao.]
hahuang65 has joined #ruby-lang
hahuang65 has quit [Ping timeout: 265 seconds]
rippa has joined #ruby-lang
dellavg_ has quit [Ping timeout: 264 seconds]
zotherstupidguy has joined #ruby-lang
charliesome has quit [Ping timeout: 256 seconds]
charliesome has joined #ruby-lang
anaiden has left #ruby-lang [#ruby-lang]
cornerma1 has joined #ruby-lang
Ropeney has quit [Quit: Leaving...]
Ox0dea has quit [Quit: WeeChat 1.2-rc1]
kfpratt has quit [Remote host closed the connection]
cornerman has quit [Ping timeout: 272 seconds]
cornerma1 is now known as cornerman
Ropeney has joined #ruby-lang
Jon-Xie has joined #ruby-lang
Ropeney has quit [Client Quit]
brownbathrobe has joined #ruby-lang
Ropeney has joined #ruby-lang
revath has joined #ruby-lang
revath1 has joined #ruby-lang
houhoulis has quit [Remote host closed the connection]
revath has quit [Ping timeout: 256 seconds]
chinmay_dd has joined #ruby-lang
|jemc| has quit [Ping timeout: 244 seconds]
joaomdmoura has quit [Remote host closed the connection]
joaomdmoura has joined #ruby-lang
ubernil has quit [Ping timeout: 264 seconds]
joaomdmoura has quit [Ping timeout: 255 seconds]
postmodern has quit [Quit: Leaving]
postmodern has joined #ruby-lang
amclain has quit [Quit: Leaving]
jwaldrip has quit [Quit: Be back later ...]
ubernil has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 240 seconds]
ubernil has quit [Read error: Connection reset by peer]
stan has joined #ruby-lang
rbowlby has quit [Remote host closed the connection]
skade has joined #ruby-lang
fusillicode has joined #ruby-lang
datanoise has joined #ruby-lang
ubernil has joined #ruby-lang
tomaz_b has joined #ruby-lang
datanoise has quit [Ping timeout: 255 seconds]
ubernil has quit [Ping timeout: 258 seconds]
rbowlby has joined #ruby-lang
ubernil has joined #ruby-lang
brownbathrobe has quit [Remote host closed the connection]
datanoise has joined #ruby-lang
VinnyBoy has quit [Read error: Connection reset by peer]
tsujp has joined #ruby-lang
niemcu has joined #ruby-lang
gix has quit [Ping timeout: 258 seconds]
allomov has joined #ruby-lang
ur5us has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
Jon-Xie has quit [Read error: Connection reset by peer]
Jon-Xie has joined #ruby-lang
datanoise has quit [Ping timeout: 256 seconds]
ruby-lang074 has joined #ruby-lang
<ruby-lang074>
hi, completely new to ruby (actually looked at ruby script for the first time yesterday...), need help with flock and filehandles (suspect it might be a linux problem, though). I get: `flock': Function not implemented ; my script has the line: fh.flock(File::LOCK_SH)
<ledestin>
ruby-lang074 Windows?
<Ropeney>
ledestin: he said ' linux problem,' so i'd assume linux
<aJanuary>
I'm trying to escape certain characters in a string by prefixing them with a backslash. I've tried str.gsub(/([_*-+^~])/, '\\1') with various numbers of backslashes in the second argument, but I can't get it to work.
<Ox0dea>
I suspect it won't be considered a bug that FrozenCore's instance methods can't be properly aliased.
<banister>
Ox0dea i haven't messed with frozen core before
shazaum has joined #ruby-lang
niemcu has quit [Ping timeout: 265 seconds]
<Ox0dea>
banister: I hadn't expected that, to be honest.
<banister>
is this a new nickname for you? I dont recognize you :)
<Ox0dea>
I've been here before, if that's the gist of your question. :)
Guest20_ has joined #ruby-lang
matp has joined #ruby-lang
revath has joined #ruby-lang
sankaber has joined #ruby-lang
<Ox0dea>
banister: I just figured you'd've found yourself pretty far into Ruby during the course of writing Pry, but FrozenCore is about as deep as the hole goes, I guess.
<Ox0dea>
But core#define_method does its thing inside the REWIND_CFP macro, which puts me a ways out of my depth.
<Ox0dea>
Also, the exit handler to instance trick doesn't work anymore. :/
alestuber has quit [Remote host closed the connection]
<darix>
Ox0dea: ... just curious ... why?
pyo_ has joined #ruby-lang
wprice has quit [Quit: wprice]
<Ox0dea>
darix: "Because it's there."
revath has quit [Quit: Leaving.]
dzejrou has quit [Read error: Connection reset by peer]
revath has joined #ruby-lang
alestuber has joined #ruby-lang
<Ox0dea>
darix: I had something vaguely resembling a use case when I wanted to capture and potentially reorder exit handlers for testing, but now it's just a matter of seeing the thing done.
vondruch has quit [Quit: Ex-Chat]
victortyau has joined #ruby-lang
workmad3 has joined #ruby-lang
Forgetful_Lion has quit [Remote host closed the connection]
fclausen has quit [Ping timeout: 272 seconds]
ggerman has joined #ruby-lang
imperator has joined #ruby-lang
Musashi007 has joined #ruby-lang
airdisa has joined #ruby-lang
ggerman_ has joined #ruby-lang
k3asd` has joined #ruby-lang
ggerman has quit [Ping timeout: 276 seconds]
ggerman_ has quit [Ping timeout: 265 seconds]
djellemah__ has joined #ruby-lang
ggerman has joined #ruby-lang
pyo_ has quit []
pyoio has joined #ruby-lang
kfpratt has joined #ruby-lang
djellemah has quit [Ping timeout: 240 seconds]
niemcu has joined #ruby-lang
ggerman has quit [Ping timeout: 240 seconds]
ggerman has joined #ruby-lang
bungoman has joined #ruby-lang
chinmay_dd has quit []
bungoman has quit [Remote host closed the connection]
revath has quit [Ping timeout: 272 seconds]
bungoman has joined #ruby-lang
ggerman has quit [Ping timeout: 252 seconds]
pyoio has quit []
ggerman has joined #ruby-lang
joaomdmoura has joined #ruby-lang
dzejrou has joined #ruby-lang
dhjondoh has quit [Quit: dhjondoh]
malconis has joined #ruby-lang
enebo has joined #ruby-lang
kfpratt has quit [Remote host closed the connection]
fclausen has joined #ruby-lang
pyoio has joined #ruby-lang
elia has joined #ruby-lang
bruno- has joined #ruby-lang
ggerman has quit [Ping timeout: 264 seconds]
bruno- is now known as Guest98109
ggerman has joined #ruby-lang
Musashi007 has quit [Quit: Musashi007]
dzejrou has quit [Read error: Connection reset by peer]
pyoio has quit [Client Quit]
tkuchiki has joined #ruby-lang
pyo_ has joined #ruby-lang
charliesome has quit [Quit: zzz]
caseypatrickdris has quit [Remote host closed the connection]
pyo_ has quit [Max SendQ exceeded]
pyo_ has joined #ruby-lang
malconis has quit [Remote host closed the connection]
ggerman has quit [Ping timeout: 264 seconds]
charliesome has joined #ruby-lang
malconis has joined #ruby-lang
ggerman has joined #ruby-lang
pyo_ has quit [Max SendQ exceeded]
ggerman has quit [Ping timeout: 264 seconds]
ggerman has joined #ruby-lang
revath has joined #ruby-lang
ggerman has quit [Ping timeout: 265 seconds]
ggerman has joined #ruby-lang
imperator2 has joined #ruby-lang
alestuber has quit [Ping timeout: 240 seconds]
ggerman has quit [Ping timeout: 244 seconds]
alestuber has joined #ruby-lang
ggerman has joined #ruby-lang
wprice has joined #ruby-lang
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
tomaz_b has quit [Ping timeout: 256 seconds]
alestuber has quit [Remote host closed the connection]
ggerman has quit [Ping timeout: 256 seconds]
ggerman has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
ogpastaling has joined #ruby-lang
tkuchiki has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby-lang
ggerman has quit [Ping timeout: 245 seconds]
jas02_ has joined #ruby-lang
jwaldrip has joined #ruby-lang
dorei has joined #ruby-lang
ggerman has joined #ruby-lang
jas02 has quit [Ping timeout: 264 seconds]
jas02_ is now known as jas02
alestuber has joined #ruby-lang
datanoise has joined #ruby-lang
stan has quit [Quit: Leaving]
j4cknewt has joined #ruby-lang
stan has joined #ruby-lang
skade has joined #ruby-lang
ggerman has quit [Ping timeout: 272 seconds]
ggerman has joined #ruby-lang
datanoise has quit [Ping timeout: 246 seconds]
dzejrou has joined #ruby-lang
ubernil has quit [Ping timeout: 256 seconds]
caseypatrickdris has joined #ruby-lang
ggerman has quit [Ping timeout: 264 seconds]
ggerman has joined #ruby-lang
stamina has joined #ruby-lang
zotherstupidguy has left #ruby-lang [#ruby-lang]
ggerman has quit [Ping timeout: 264 seconds]
ggerman has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
ggerman has quit [Ping timeout: 264 seconds]
ggerman has joined #ruby-lang
gambl0re has joined #ruby-lang
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Ropeney has joined #ruby-lang
Ropeney has quit [Remote host closed the connection]
ggerman has quit [Ping timeout: 245 seconds]
ggerman has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
Guest20_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
momomomomo has joined #ruby-lang
whippythellama has joined #ruby-lang
ggerman has quit [Ping timeout: 255 seconds]
ggerman has joined #ruby-lang
go|dfish has quit [Ping timeout: 264 seconds]
jas02 has quit [Ping timeout: 252 seconds]
momomomomo has quit [Ping timeout: 256 seconds]
momomomomo_ has joined #ruby-lang
ggerman has quit [Ping timeout: 256 seconds]
ggerman has joined #ruby-lang
ggerman has quit [Ping timeout: 240 seconds]
dhjondoh has joined #ruby-lang
ggerman has joined #ruby-lang
canesugar88 has joined #ruby-lang
canesugar88 has quit [Client Quit]
mcclurmc has joined #ruby-lang
shinnya has joined #ruby-lang
ggerman has quit [Ping timeout: 252 seconds]
bungoman has quit [Remote host closed the connection]
ggerman has joined #ruby-lang
chinmay_dd has joined #ruby-lang
ggerman has quit [Ping timeout: 256 seconds]
ggerman has joined #ruby-lang
j4cknewt has quit [Remote host closed the connection]
charliesome has quit [Quit: zzz]
revath has quit [Ping timeout: 246 seconds]
ggerman has quit [Ping timeout: 276 seconds]
ggerman has joined #ruby-lang
ubernil has joined #ruby-lang
ggerman has quit [Ping timeout: 250 seconds]
gambl0re has quit [Ping timeout: 272 seconds]
ggerman has joined #ruby-lang
datanoise has joined #ruby-lang
slawrence00 has joined #ruby-lang
Guest20_ has joined #ruby-lang
alestuber has quit [Remote host closed the connection]
joaomdmoura has quit [Remote host closed the connection]
go|dfish has joined #ruby-lang
ggerman has quit [Ping timeout: 272 seconds]
ggerman has joined #ruby-lang
airdisa has quit [Remote host closed the connection]
datanoise has quit [Ping timeout: 255 seconds]
ItSANgo has quit [Read error: Connection reset by peer]
ItSANg___ has joined #ruby-lang
ItSANg___ has quit [Read error: Connection reset by peer]
chinmay_dd has quit [Remote host closed the connection]
ItSANgo__ has joined #ruby-lang
chinmay_dd has joined #ruby-lang
ggerman has quit [Ping timeout: 255 seconds]
sarkyniin has joined #ruby-lang
ggerman has joined #ruby-lang
joaomdmoura has joined #ruby-lang
datanoise has joined #ruby-lang
brownbathrobe has joined #ruby-lang
dhjondoh has quit [Quit: dhjondoh]
noobrubyguy has joined #ruby-lang
<noobrubyguy>
Hello guys... I have set of rails projects (Different API) ...How do i automate integration testing? can anyone help me with the important things to follow
k3asd` has quit [Ping timeout: 256 seconds]
<noobrubyguy>
is there any ruby test frameworks which i can use?
ggerman has quit [Ping timeout: 264 seconds]
ggerman has joined #ruby-lang
<noobrubyguy>
How does this work? does anyone replies?
VinnyBoy has joined #ruby-lang
gamename has joined #ruby-lang
tkuchiki has quit [Ping timeout: 276 seconds]
kr3ssh has joined #ruby-lang
chinmay_dd has quit [Remote host closed the connection]
kfpratt has joined #ruby-lang
joaomdmoura has quit [Remote host closed the connection]
chinmay_dd has joined #ruby-lang
ggerman has quit [Ping timeout: 240 seconds]
<noobrubyguy>
anyone deR?
<noobrubyguy>
does this chat work
<noobrubyguy>
???
<noobrubyguy>
???
<noobrubyguy>
????
<VinnyBoy>
it does
ggerman has joined #ruby-lang
<noobrubyguy>
ok
<noobrubyguy>
But no one replies?
<bougyman>
VinnyBoy replied.
<noobrubyguy>
I have set of rails projects (Different API) ...How do i automate integration testing? can anyone help me with the important things to follow
<bougyman>
Your question is very vague
<bougyman>
what exactly are you trying to do?
<noobrubyguy>
Just hit a web service by creating a request
bungoman has joined #ruby-lang
<noobrubyguy>
and get the response and validate
<noobrubyguy>
is there any test frameworks people use.? there is PySys in python...what about ruby?
<bougyman>
lots
<bougyman>
cucumber or even just rack-test could do this
airdisa has joined #ruby-lang
JakFrist_ has joined #ruby-lang
ggerman has quit [Ping timeout: 250 seconds]
ggerman has joined #ruby-lang
jwaldrip_ has joined #ruby-lang
<noobrubyguy>
Thanks mate
<noobrubyguy>
Rack Test looks good
<noobrubyguy>
new to ruby, so don't know anything...
rcvalle has joined #ruby-lang
michael_imac is now known as michael_mbp
ggerman has quit [Ping timeout: 256 seconds]
jwaldrip has quit [Ping timeout: 265 seconds]
harly has quit [Quit: Leaving]
ggerman has joined #ruby-lang
gambl0re has joined #ruby-lang
ggerman has quit [Ping timeout: 276 seconds]
ggerman has joined #ruby-lang
JakFrist_ has quit [Remote host closed the connection]
noobrubyguy has quit [Ping timeout: 246 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
ggerman has quit [Ping timeout: 264 seconds]
ggerman has joined #ruby-lang
__butch__ has joined #ruby-lang
ggerman has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby-lang
ggerman has joined #ruby-lang
momomomomo_ has quit [Quit: momomomomo_]
ggerman has quit [Ping timeout: 256 seconds]
ggerman has joined #ruby-lang
zendrix has joined #ruby-lang
ggerman has quit [Ping timeout: 245 seconds]
scottschecter has quit [Quit: Leaving]
allomov has quit [Remote host closed the connection]
ggerman has joined #ruby-lang
jds has joined #ruby-lang
BanzaiJoe has joined #ruby-lang
<BanzaiJoe>
good day
shinnya has quit [Ping timeout: 264 seconds]
victortyau has quit [Quit: Leaving]
ggerman has quit [Ping timeout: 265 seconds]
ggerman has joined #ruby-lang
alestuber has joined #ruby-lang
ogpastaling has quit [Remote host closed the connection]
jamo___ has joined #ruby-lang
jamo___ has quit [Client Quit]
ggerman has quit [Ping timeout: 264 seconds]
niemcu has quit [Ping timeout: 272 seconds]
ggerman has joined #ruby-lang
alestuber has quit [Ping timeout: 272 seconds]
simi has quit [Ping timeout: 255 seconds]
harisamin_ has joined #ruby-lang
<harisamin_>
:smile:
<harisamin_>
:)
bb010g has quit [Quit: Connection closed for inactivity]
dagda1 has joined #ruby-lang
ggerman has quit [Ping timeout: 256 seconds]
ggerman has joined #ruby-lang
stan has quit [Ping timeout: 265 seconds]
revath has joined #ruby-lang
momomomomo has joined #ruby-lang
iamninja has quit [Ping timeout: 264 seconds]
ggerman has quit [Ping timeout: 252 seconds]
ggerman has joined #ruby-lang
apt-get_ has joined #ruby-lang
fusillicode has quit [Ping timeout: 272 seconds]
woodruffw has quit [Quit: And then he took off.]
ggerman has quit [Ping timeout: 252 seconds]
sarkyniin has quit [Ping timeout: 265 seconds]
ggerman has joined #ruby-lang
mikecmpbll has quit [Ping timeout: 258 seconds]
airdisa has quit []
joaomdmoura has joined #ruby-lang
zendrix has quit [Remote host closed the connection]
<BanzaiJoe>
hmm... the more items I end up with the more I'm thinking there needs to be an abstraction
ggerman has quit [Ping timeout: 258 seconds]
ggerman has joined #ruby-lang
<BanzaiJoe>
position objects, inventory arrays, transfer methods
skade has quit [Quit: Computer has gone to sleep.]
alestuber has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
ggerman has quit [Ping timeout: 255 seconds]
ggerman has joined #ruby-lang
alestuber has joined #ruby-lang
ggerman has quit [Ping timeout: 252 seconds]
ggerman has joined #ruby-lang
hackeron has quit [Ping timeout: 245 seconds]
hackeron has joined #ruby-lang
bungoman has joined #ruby-lang
<Ox0dea>
BanzaiJoe: You can use your "positions" as hash keys.
ggerman has quit [Ping timeout: 276 seconds]
<BanzaiJoe>
I've been thinking about it and the more I think about it, yes
ggerman has joined #ruby-lang
dellavg_ has joined #ruby-lang
<BanzaiJoe>
I'm a n00b and I was thinking that the positions needed to be passed but it truth, they are nothing more than labels
AlxAltea has quit [Ping timeout: 252 seconds]
<BanzaiJoe>
the more I go down this rabbit hole it's like seeing how movies are made, and I can't undo what I see :)
momomomomo_ has joined #ruby-lang
zendrix has quit [Remote host closed the connection]
<BanzaiJoe>
Travelling my little spaceship across the galaxy and spending fuel was really nothing more than subtracting fuel and changing a label position
momomomomo has quit [Ping timeout: 255 seconds]
momomomomo_ is now known as momomomomo
ggerman has quit [Ping timeout: 246 seconds]
drbrain has quit [Ping timeout: 265 seconds]
ggerman has joined #ruby-lang
zendrix has joined #ruby-lang
drbrain has joined #ruby-lang
ggerman has quit [Ping timeout: 264 seconds]
jgpawletko has joined #ruby-lang
joaomdmoura has quit [Remote host closed the connection]
aaeron has joined #ruby-lang
ggerman has joined #ruby-lang
<BanzaiJoe>
does it matter if the position is explicit? What I really mean... is it bad practice to use the index on the array as the position and use the index as the labeled position. Example...
lele is now known as Guest24
hahuang65 has joined #ruby-lang
<BanzaiJoe>
item = [0, 100,200,100,500,0,100,0] and then label by inex sun = 0, 1 = mercury, 2 = venus, 3 = earth, so item has 100 on Mercury because it's at index 1
<VinnyBoy>
well
<VinnyBoy>
are you gonna use them labels?
hahuang65 has quit [Client Quit]
hahuang65 has joined #ruby-lang
ggerman has quit [Ping timeout: 255 seconds]
<BanzaiJoe>
the ordinitality doesn't change in my program, but I'm really asking if this is a good practice
<VinnyBoy>
im not a professional programmer so i wouldnt know
<VinnyBoy>
i would, however, put a comment near your array
ggerman has joined #ruby-lang
<BanzaiJoe>
that I'm a n00b? ;)
<BanzaiJoe>
hashtag - not sure if this is a good idea, but fire in the hole! note: using ordinatlity of index as labels for position
<VinnyBoy>
no, something like "array = [sun, mercury, venus, earth, etc
marr has quit [Ping timeout: 246 seconds]
<Ox0dea>
No, something like {Sun: 0, Mercury: 100, ...}.
<imperator2>
VinnyBoy, not a professional programmer? may we ask what you do then?
<imperator2>
just curious what brought you here
<VinnyBoy>
im a market clerk
<BanzaiJoe>
Ox0dea, if the ordinitality doesn't change, is it bad practice to use the index to as the key for the label ?
<Ox0dea>
BanzaiJoe: Are you familiar with the phrase "magic number"?
<BanzaiJoe>
not particularly
<VinnyBoy>
however, i studied in computer science, and i want to do something with that
<Ox0dea>
BanzaiJoe: It's good practice to avoid them, but you're suggesting using nine of them rapid-fire!
<apt-get_>
Hey
<apt-get_>
I have this regex: /^(!|@)shuffle (\d*)/i
<apt-get_>
how can I make it so, for example, "!shuffle something" will not match at all?
<apt-get_>
currently, even if the second group doesn't match, it'll match the first group
<BanzaiJoe>
Ox0dea, thanks I get the gist. The implicitness obscures the next person reading the code. Will avoid
ggerman has quit [Ping timeout: 256 seconds]
alestuber has quit [Remote host closed the connection]
<Ox0dea>
BanzaiJoe: Yes, that's exactly right.
<imperator2>
apt-get_, rubular.com is your friend :)
ggerman has joined #ruby-lang
<BanzaiJoe>
and I thought I was being so slick, haha. Maybe too slick, good first project lesson.
<Ox0dea>
BanzaiJoe: Properly "clever" code always feels good; if you have misgivings, you've either been too clever or not enough.
<apt-get_>
imperator2: I already use it
<apt-get_>
but it doesn't have any info on what I want to do
<Ox0dea>
apt-get_: To be clear, you *do* want to capture both of those groups, right?
ggerman has quit [Read error: Connection reset by peer]
<apt-get_>
Ox0dea: yeah
<apt-get_>
but I don't want the regex to match at all if only one group is captured
<imperator2>
apt-get_, if i understand you correctly, i think you want ^([^!]|@)shuffle (\d*)
<imperator2>
oic
djellemah__ has quit [Ping timeout: 256 seconds]
<imperator2>
then you want \d+ i think
<apt-get_>
oh right
<apt-get_>
thanks
harisamin has joined #ruby-lang
ggerman has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
cornerma1 has joined #ruby-lang
ggerman has quit [Ping timeout: 256 seconds]
workmad3 has quit [Ping timeout: 272 seconds]
ubernil has quit [Ping timeout: 256 seconds]
ggerman has joined #ruby-lang
zendrix has quit [Remote host closed the connection]
<BanzaiJoe>
so I google "Ruby create a hash from an array" for my previous problem. I feel like I opened a giant can of worms that I'm just going to close and remind myself to look into later. I'd probably spend hours pouring over each vs map vs collect vs each_with_object and not get any code written. Maybe lunch instead...
cornerman has quit [Ping timeout: 256 seconds]
cornerma1 is now known as cornerman
joaomdmoura has joined #ruby-lang
stamina has joined #ruby-lang
ggerman has quit [Ping timeout: 246 seconds]
baweaver has joined #ruby-lang
alestuber has joined #ruby-lang
ggerman has joined #ruby-lang
<Ox0dea>
>> Hash.new[1, 2, 3, 4]
<eval-in>
Ox0dea => wrong number of arguments (4 for 1) (ArgumentError) ... (https://eval.in/358498)
<eval-in>
BanzaiJoe => undefined local variable or method `positions' for main:Object (NameError) ... (https://eval.in/358504)
<Ox0dea>
BanzaiJoe: That's not how any of this works.
<BanzaiJoe>
then given type X, quantity Y0 through Y4 , create type [Sun: Y0, Mercury: Y1, Venus: Y2, Earth: Y3]
<BanzaiJoe>
type being the label for the item_type hash
shinnya has joined #ruby-lang
<Ox0dea>
BanzaiJoe: The bodies only have Y coordinates?
<BanzaiJoe>
errr.... let me try again, in an ideal world, I'd have something like this...
g0bl1n has quit [Ping timeout: 246 seconds]
<BanzaiJoe>
for a given item_type a hash of type 's' would be s = [Sun: 100, Mercury:0, Venus: 200, Earth:500] than rinse repeat for different item_types and different quantities where the first part of the tuple would always be the sun and planets
<Ox0dea>
That's not a hash, and Ruby doesn't really have tuples, per se.
<pipework>
Ox0dea: What stops a grid from being 3 dimensional?
baweaver has quit [Remote host closed the connection]
<pipework>
Or n-dimensional?
<Ox0dea>
pipework: It does seem I misspoke.
<pipework>
Egh, shit happens. :)
<BanzaiJoe>
so if I keep the nest organized, I can query by nest...
<Ox0dea>
BanzaiJoe: Enumerable is very powerful; you can query by all sorts of things.
<BanzaiJoe>
right, I'm grokking out load and catching up on your suggestion
<BanzaiJoe>
I'm hoping that adding and subtracting from nested fields like this is more of mental leap than a coding issue
<imperator>
deeply nested hashes as structs...ick territory
<Ox0dea>
BanzaiJoe: How's your grasp on classes?
tsujp has quit [Quit: tsujp is outta here]
baweaver has joined #ruby-lang
<BanzaiJoe>
like a drunken sailor to a bottle, at times great, but mostly loose
<Ox0dea>
It may be out of your comfort zone, but factoring out the notion of "an item and its quantity" into a class (which could be as simple as a Struct, as imperator suggests) and storing arrays of these would be the best approach.
<Ox0dea>
Then, for example, s[:Sun].map(&:quantity).reduce(:+) would tell you the total number of items on the Sun.
<BanzaiJoe>
that's actually where I started from but not structs, pretty much only heard the word "structs"
robbyoconnor has quit [Ping timeout: 256 seconds]
<BanzaiJoe>
I can read s[:Sun].map(&:quantity).reduce(:+) and intuitively read it coming from a data background but from a coding background, way, way beyond me
bungoman has quit [Remote host closed the connection]
zendrix has quit [Remote host closed the connection]
zendrix has joined #ruby-lang
Miphix has quit [Quit: Leaving]
caseypatrickdris has quit [Remote host closed the connection]
marr has joined #ruby-lang
zendrix has quit [Ping timeout: 264 seconds]
bungoman has joined #ruby-lang
setanta_ has joined #ruby-lang
dagda1 has joined #ruby-lang
baweaver has quit [Remote host closed the connection]
Excelsior2015 has quit [Ping timeout: 250 seconds]
ur5us has joined #ruby-lang
kadoppe has quit [Ping timeout: 244 seconds]
kadoppe has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
bungoman has quit [Remote host closed the connection]
enebo has quit [Quit: enebo]
alestuber has quit [Remote host closed the connection]
harisamin has quit [Quit: harisamin]
melter has quit [Quit: Client exiting]
momomomomo has joined #ruby-lang
chinmay_dd has quit []
djbkd has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
bungoman has joined #ruby-lang
<BanzaiJoe>
Ox0dea: yea... Struct is what I need but it's too far above me for now. I'll attempt it on the rewrite.
<Ox0dea>
BanzaiJoe: Thing = Struct.new(:foo, :bar) is essentially equivalent to: class Thing; attr_accessor :foo, :bar; end.
<Ox0dea>
And attr_accessor :foo is equivalent to: def foo; @foo; end; def foo=bar; @foo=bar; end.
<Ox0dea>
All in good time, I suppose.
pkrnj has joined #ruby-lang
<BanzaiJoe>
All in good time
<Ox0dea>
BanzaiJoe: Still, classes are the heart of object-oriented design, and Ruby is arguably the most object-oriented language of them all, so you'll want to familiarize yourself with these concepts sooner rather than not.
alestuber has joined #ruby-lang
datanoise has joined #ruby-lang
ggerman has joined #ruby-lang
<Ox0dea>
BanzaiJoe: From where all are you learning Ruby, if you don't mind my asking?
<BanzaiJoe>
Linux Academy, Ruby docs, trial and error
<BanzaiJoe>
of course, listening to podcasts and google if you can call that "learning Ruby"
<BanzaiJoe>
My background is network/sysadmin and powershell scripting
allomov has joined #ruby-lang
zendrix has joined #ruby-lang
Senjai has quit [Ping timeout: 265 seconds]
alestuber has quit [Ping timeout: 272 seconds]
AlexAltea has joined #ruby-lang
<imperator>
just learning powershell myself :)
momomomomo_ has joined #ruby-lang
momomomomo has quit [Ping timeout: 265 seconds]
momomomomo_ is now known as momomomomo
caseypatrickdris has joined #ruby-lang
<darix>
at my friends place they banned the exchange gui tools and only allow powershell scripts for admin tasks now
alestuber has joined #ruby-lang
revath has quit [Ping timeout: 258 seconds]
<BanzaiJoe>
You can version control or QA a script, not so much for clicky-clicky
Senjai has joined #ruby-lang
Senjai has quit [Changing host]
Senjai has joined #ruby-lang
<bougyman>
so I got simplecov working again (need update to 0.10)
<bougyman>
but something is still doing this crazy math: