<Radar>
lemur: Now use your powers of deduction to work out my Twitter handle.
<lemur>
Ah, that'd help
<lemur>
Christ, not even monday yet.
<mozzarella>
I can't see the twitter button
zerowaitstate has quit [Quit: leaving]
oo_ has joined #ruby
<dodobrain>
mozzarella, haha, good one!
yqt has quit [Ping timeout: 276 seconds]
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby
scripore has joined #ruby
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
scripore has quit [Client Quit]
<shevy>
oh a dodobrain
jeramy_s has joined #ruby
<shevy>
didn't the dodos go extinct?
<dodobrain>
i'm still here though :)
* shevy
readies shotgun
dorei is now known as zzzxxxxx
zzzxxxxx is now known as dorei
rubytor has quit [Quit: No Ping reply in 180 seconds.]
rubytor has joined #ruby
_honning_ has joined #ruby
jonr22 has quit [Quit: WeeChat 1.1.1]
jonr22 has joined #ruby
ikeike443 has quit [Quit: Leaving...]
* lemur
grabs popcorn
Filete has joined #ruby
maximski has joined #ruby
maximski has quit [Max SendQ exceeded]
maximski has joined #ruby
reinaldob has joined #ruby
<shevy>
ah I could not shoot the poor dodos
<shevy>
he is doomed to find no mate already punishment enough
jeramy_s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
iasoon has joined #ruby
timanema has quit [Quit: leaving]
Rickmasta has joined #ruby
Azure has joined #ruby
Feyn has joined #ruby
reinaldob has quit [Ping timeout: 256 seconds]
mjuszczak has quit []
<weaksauce>
dodos.each { |dodo| dodo.shoot }
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<weaksauce>
that could have been the nerdiest genocide joke in the history of irc
anaeem1_ has joined #ruby
<centrx>
dodos.replace(dinosaurs)
Deele has joined #ruby
ascarter has joined #ruby
fwaokda has quit [Ping timeout: 256 seconds]
<shevy>
guys be nice to the dodos
<shevy>
evolution was not nice to them
iotouch has joined #ruby
<centrx>
YOU! YOU were not nice to them!
<lemur>
weaksauce: oi, dodos.each(&:shoot)
anaeem1_ has quit [Ping timeout: 252 seconds]
<weaksauce>
lemur what if I told you I have an irrational fear of ampersands?
<lemur>
I'd laugh mercilessly. Why?
<weaksauce>
I don't, but it would explain not doing the more succinct each form
freerobby has quit [Quit: Leaving.]
mjuszczak has joined #ruby
<dodobrain>
well, the jokes aside, i'm a newbie to ruby. just finished the ri20 tutorial reading the 'ruby from other langs' pages now
Nuck has quit [Quit: Computer has gone to sleep.]
<dodobrain>
what does :name mean?
scripore has joined #ruby
iasoon has quit [Ping timeout: 256 seconds]
thumpba has quit [Remote host closed the connection]
<dodobrain>
i assume it is a reference called 'name' to an object, is that correct? if yes, where would you use :name instead of @name to refer to an instance variable?
krisquigley has joined #ruby
<dodobrain>
also, does this channel cater for rails questions as well or does it have a separate channel?
<drocsid>
dodobrain: I think there is a rails channel somewhere.
<drocsid>
try #rails or something like that.
Azure has quit [Ping timeout: 256 seconds]
<dodobrain>
well, that one is blank, #rubyonrails seems to exist with many people though
<dodobrain>
drocsid, yeah i'm reading those 'ruby from other lang' pages now
<drocsid>
Then that's probably a good place for ror specific stuff.
<dodobrain>
anyway, back to my original question; i saw in the 20 min tutorial 'attr_accessor :instance_var' would this work with 'attr_accessor @instance_var' as well?
<dodobrain>
or is @instance_var returning the value of the var?
krisquigley has quit [Ping timeout: 264 seconds]
havenwood has quit []
GnuYawk has joined #ruby
<dodobrain>
ok, thats clear now from running through a testcase in irb
<jhass>
EasyOptions.configure do |config| config.required_arguments = 2; config.help do "blub"; end; end;
dagelf has quit [Ping timeout: 248 seconds]
ki0 has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
ki0 has joined #ruby
oo_ has quit [Remote host closed the connection]
<mark06>
think about it, that is a non-go
oo_ has joined #ruby
<jhass>
was easyoptions that silly idea from parsing the arg parser definition out of comments?
oo_ has quit [Remote host closed the connection]
jottr_ has joined #ruby
<wasamasa>
out of an usage string actually
oo_ has joined #ruby
<ytti>
i most use slop
<wasamasa>
^
<ytti>
but using slop might not be such good idea, if you're also using pry
<wasamasa>
its docs are minimal, but it works
<canton7>
slop or trollop for me
jenrzzz has quit [Ping timeout: 248 seconds]
<ytti>
yeah i might need to fall back to trollop
<ytti>
just to avoid complications with pry
<wasamasa>
what complications?
<jhass>
so you already have code in your comments, can just do everything that way at that point
universa1 is now known as universal
universal is now known as universa1
<ytti>
wasamasa, you cannot run two versions of library at the time
<ytti>
wasamasa, so if you use slop 4.0, you cannot pry that code
jottr has quit [Ping timeout: 245 seconds]
<wasamasa>
wat
<ytti>
arguably pry could be separated to pry-lib and pry-cli
<shevy>
wasamasa seems confused
<ytti>
where pry-lib wouldn't depend on slop, and you could do require 'pry' without complications
<wasamasa>
oh, pry depends on slop
<wasamasa>
well, that explains it then
Igorshp has joined #ruby
lidenskap has joined #ruby
serivichi has quit [Ping timeout: 252 seconds]
<shevy>
ack
serivichi has joined #ruby
<mark06>
jhass: can you tell me about config object or was your snippet about that
<jhass>
that was what my snippet illustrated, yes
<mark06>
does ruby have/plan something like python's docstrings?
<wasamasa>
nope
<wasamasa>
there is a docstring gem though
<wasamasa>
and tools like yard which parse comments to generate documentation from that
<ytti>
i wish github would generate purty document pages for projects which use common document engine formats
<ytti>
would motivate me document my crap better
<mark06>
wasamasa, jhass: yes easyoptions is about parsing help text like docopt, initially from comments but I plan to allow for strings
c0m0 has quit [Ping timeout: 246 seconds]
lidenskap has quit [Ping timeout: 248 seconds]
sevvie has quit [Ping timeout: 250 seconds]
<mark06>
the comments idea was so that for simple scripts we get a unified text serving help text, option definition and source code documentation
apoplexy has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
<mark06>
one concern is having comments defining program behavior though
<undeadaedra>
ytti: rubydoc.info runs yard for github projects
dagelf has joined #ruby
<ytti>
undeadaedra, i know, but only rubyist would know that
<ytti>
undeadaedra, while if github would do docs in github project page, any casual browser would find them
<undeadaedra>
yeah, true
<undeadaedra>
submit them the idea then
<ytti>
i suspect i'm not only one, who would be motivated to document better, if pretty presentation would appear in github like magic
<ytti>
funnily enough, for the social coding site github presents itself, they don't offer any user2github communication channel
<ytti>
or not social channel anyhow, there is feedback form
iotouch has quit [Quit: This computer has gone to sleep]
<ytti>
which i always intepret as /dev/null, i did send suggestion there, and got polite answer
<ytti>
but i don't expect it going anywhere
<ytti>
i would have expected github to use something like userecho
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
IME these don't work once you reach ~1k users
<wasamasa>
support does work though
<jhass>
all sort of useless junk crops up and you start to ignore it because of that
iotouch has joined #ruby
<wasamasa>
sent a question regarding the HTTP API and got a swift answer that helped me proceed
<ytti>
jhass, maybe it should be moderated, by community
<ytti>
jhass, like borrow some clues from stackexchange
<jhass>
and the upvoting no longer works because nobody cares to search for existing ideas and reposts the same stuff over and over again instead
<jhass>
especially if your search turns up all that junk
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
alienaut has quit [Ping timeout: 265 seconds]
leafybasil has joined #ruby
jottr_ is now known as jottr
sevensea_ has joined #ruby
sevvie has joined #ruby
<Darkwater>
is it ok to use @@variables?
A205B064 has quit [Ping timeout: 264 seconds]
c0m0 has joined #ruby
<jhass>
Darkwater: it's a bit smelly, most of the time you meant to use a constant or a class/module level instance variable instead
govg has quit [Quit: leaving]
<jhass>
the actual usecases for them are rather rare
sevenseacat has quit [Ping timeout: 252 seconds]
clarkk has joined #ruby
sigurding has quit [Quit: sigurding]
<Darkwater>
jhass: how about a list of instances?
<canton7>
sounds like a memory leak
<Darkwater>
how so?
<jhass>
class level instance var
<jhass>
you don't need the much broader scope of @@vars for that
<canton7>
depends on the application of course. but stopping all instances ever created from being collected is typically considered a memory leak :P
<Darkwater>
though @vars are per instance, right?
<jhass>
yes, and your class definition is an instance of the class Class
<Darkwater>
hm, I think I see what you're getting at
<Darkwater>
reminds me of how you can call functions in a class definition
sevvie has quit [Ping timeout: 252 seconds]
<Darkwater>
what if I define a local variable in a class?
jimms has joined #ruby
<Darkwater>
in the end I want to call something like Monitor.get n and Monitor.getAll
<jhass>
those are gone after the class definition
<Darkwater>
hm
<apeiros>
Darkwater: if you want idiomatic ruby code, Monitor[n], Monitor.all
<clarkk>
I have two versions of json installed in my local gemset, 1.8.1 and 1.8.2. If I run gem uninstall json -v 1.8.1 it says "Error...gem "json" cannot be uninstalled because it is a default gem". Is there a way to remove the unnecessary version of json?
<Darkwater>
jhass: is there a way to access a class level instance var from initialize?
<jhass>
you need to provide an accessor method on the class
<clarkk>
I have two versions of json installed in my local gemset, 1.8.1 and 1.8.2. If I run gem uninstall json -v 1.8.1 it says "Error...gem "json" cannot be uninstalled because it is a default gem". Is there a way to remove the unnecessary version of json?
<Darkwater>
alright
A124 has quit [Ping timeout: 255 seconds]
<jhass>
Darkwater: though I'd rather hide new and define a constructor
<apeiros>
DaniG2k: in what way would those balls need to be ordered? a property? a calculation?
<apeiros>
I wonder whether the target performance was adjusted for ruby
<DaniG2k>
apeiros: no, 2 seconds in no matter what language. dumb eh? the order would be given with a sequence of gets that I needed to implement. So the first like would be an integer, like 5, which means that I need to gets the next 5 lines which will give me the ordering of the balls
<DaniG2k>
apeiros: that took me 15 mins
silentpost has quit [Ping timeout: 276 seconds]
<DaniG2k>
then I realized the next step was, they would also ask this for an integer k, the number of times it happens
<DaniG2k>
which is like 100,000,000
<DaniG2k>
and that just took longer than 2 seconds
<clarkk>
On rvm 1.11.39, when I run gem list while using the default gemset, it lists all the gems, including those in global. I don't think this was the behaviour the last time I used it. What should I be doing here?
sevenseacat has joined #ruby
<clarkk>
I'd like to know which gems are in which gemsets
<withnale__>
Is there a way to use rspec mocks (i.e. expect(instance.to receive(:output) ) to check that a method is called but not override the implementation of that method?
Igorshp has quit [Read error: Connection reset by peer]
Igorshp_ has joined #ruby
iasoon has quit [Read error: No route to host]
sigurding has quit [Quit: sigurding]
sevvie has quit [Ping timeout: 245 seconds]
<zlude>
Hello guys, I'm learning ruby and I see that somethings stop to work if I change ruby version, so.. I wanna know which code is better, http://pastie.org/private/qf3olnbkjduusa4mywg6hq or it's doesn't matter? Someone can explain me?
sigurding has joined #ruby
kevinying has quit [Ping timeout: 264 seconds]
sankaber has joined #ruby
davedev24_ has joined #ruby
<zlude>
a code has write to RUBY_VERSION => "2.1.3" and another to RUBY_VERSION => "1.9.2"
Rapier- has joined #ruby
<apeiros>
you mean >=?
<zlude>
wrote*
<jhass>
zlude: the top version, the bottom version assigns two useless local variables
sevvie has joined #ruby
<jhass>
the assignments there have no significance
<jhass>
try switching the argument order in both examples if you need a prove
<shevy>
'For his "road work" he would take to the pavement in army boots, declaring running shoes "sissy shoes."'
arup_r has joined #ruby
<shevy>
so I see, I should use high heels for martial arts training, for more encumberance
<hanmac1>
shevy maybe with that one he can do more "pointy" damage? ;P
Node_486 has quit [Ping timeout: 246 seconds]
jimms has quit [Remote host closed the connection]
<zlude>
jhass, Thank you. But my questioning is about... better to write my codes in top version or bottom version?
<zlude>
jhass, like.. I'm using hashes in top version, and it don't work in 1.9.2
<jhass>
1.9 is EOL, not sure why you care about it
<hanmac1>
imo keyargs are more useful when you have more than ones like 3+ or something
Affix has quit [Ping timeout: 272 seconds]
<zlude>
what is EOL?
<monsieurp>
end of life
<zlude>
monsieurp, ty!
lxsameer has quit [Quit: Leaving]
<ddv>
end of the line
<ddv>
:)
<zlude>
jhass, now.. can you re-write my top version code with your's improvements?
nfk has joined #ruby
<jhass>
no, it's too simple
jimms has joined #ruby
<jhass>
you can do that on your own
gigetoo has quit [Ping timeout: 272 seconds]
failshell has joined #ruby
ta_ has quit [Remote host closed the connection]
rshetty has quit [Remote host closed the connection]
t_p has joined #ruby
rshetty has joined #ruby
lanemeyer has joined #ruby
<zlude>
jhass, "the top version, the bottom version assigns two useless local variables" which variables?
Darryl___ has joined #ruby
Pharaoh2_ is now known as Pharaoh2
B1n4r10 has joined #ruby
<jhass>
redis_key and redis_value
baash05 has quit [Ping timeout: 256 seconds]
<jhass>
in the call
<jhass>
did you try swapping the argument order in both examples, like I suggested?
bluOxigen has joined #ruby
rocknrollmarc has quit [Ping timeout: 256 seconds]
<kubunto>
good to know ruby works with redis too
endash has joined #ruby
<zlude>
jhass, I'm sorry dude, but I can't understand what are you trying to talk about (explain me) :/
jottr has joined #ruby
iasoon has joined #ruby
redlegion has joined #ruby
<clarkk>
On rvm 1.11.39, when I run gem list while using the default gemset, it lists all the gems, including those in global. I don't think this was the behaviour the last time I used it. What should I be doing here? I'd like to know which gems are in which gemsets
<canton7>
zlude, 'foo(bar = "baz")' is the same as 'bar = "baz"; foo(bar)'
<canton7>
as in... it's creating a new variable inline, then returning the value of the variable, which is being passed as the method parameter. you could name 'redis_key' on line 44 whatever you like
<jhass>
try that with the bottom example too
<canton7>
(i.e. change redis_key on line 44, not change it on line 30)
blackmesa has joined #ruby
Regulati_ has joined #ruby
juanpablo____ has joined #ruby
sgambino has joined #ruby
DaniG2k has quit [Ping timeout: 264 seconds]
joonty has joined #ruby
mengu has quit [Ping timeout: 250 seconds]
<zlude>
jhass, I do in both examples, and same output...
<jhass>
I doubt that
<zlude>
let me show you
<canton7>
wlel, same output, but the redis key and value are reversed :P
<jhass>
well, actually compare which values are set in redis
RegulationD has quit [Ping timeout: 256 seconds]
<zlude>
i put it like " redis = RedisAction.new(redis_value: 'barrosfilipe', redis_key: 'user').set "
<jhass>
yeah, add accessors for key and value and print them
lanemeyer has quit [Ping timeout: 256 seconds]
sgambino_ has joined #ruby
lanemeyer has joined #ruby
juanpablo____ has quit [Ping timeout: 240 seconds]
<clarkk>
On rvm 1.11.39, when I run gem list while using the default gemset, it lists all the gems, including those in global. I don't think this was the behaviour the last time I used it. What should I be doing here? I'd like to know which gems are in which gemsets
<shevy>
I need some easier way to work with ruby code
<ddv>
damn I quite like amethyst.app
<ddv>
dynamic tiler for osx yay
Astrologos_ has joined #ruby
failshell has joined #ruby
Spami has joined #ruby
<certainty>
shevy: in what way?
evanjs_ has joined #ruby
terminatorzzzzz9 has joined #ruby
dorei has quit [Ping timeout: 245 seconds]
<terminatorzzzzz9>
How can I assign a variable to a file?
failshell has quit [Remote host closed the connection]
Rollabun_ has joined #ruby
<shevy>
certainty well. I wrote some perhaps 1000 lines of code. And I was not happy with the old design, so I started to change; primarily from a big array, to wanting to use a hash instead. it's mostly a table layout column | column | column |, but based on commandline options, only some columns will be displayed, others not
failshell has joined #ruby
gagrio has joined #ruby
<shevy>
and I sort of lost interest in the middle of the rewrite. and it has been lingering for a longer while now... while I happily and very easily write new ruby code. or change small things in larger ruby code
<shevy>
it's always rewrites that suck
evanjs has quit [Ping timeout: 244 seconds]
<canton7>
the trick is to get it right first time ;)
<zlude>
canton7, thank you.
mgorbach has quit [Read error: Connection reset by peer]
<certainty>
shevy: rewrites are almost always a bad idea and you deserve the pain! :p
<shevy>
it feels like twice the pain for less than half the gain
<certainty>
s:)
doodlehaus has joined #ruby
joonty has joined #ruby
lavros has joined #ruby
<certainty>
shevy: small increments to improve the code over time
<shevy>
yeah
<shevy>
now I'd wish to not have started that rewrite :(
<canton7>
that's what version control is for
<certainty>
the design change from arrays to hashes may indicate that you missed an indirection there
tkuchiki has joined #ruby
dorei has joined #ruby
vozcelik has joined #ruby
thingmaker has quit []
<certainty>
shevy: abandon your rewrite branch and start afresh
Sid05 has joined #ruby
<shevy>
certainty hehe
<certainty>
xD
<certainty>
anyway time to call it a day for me
<certainty>
have fun
<shevy>
wat
<shevy>
you finish at 15:25
<shevy>
what kind of job is that
aryaching has quit [Ping timeout: 245 seconds]
gagrio has quit [Ping timeout: 264 seconds]
iamninja has joined #ruby
Astrologos_ has quit [Ping timeout: 256 seconds]
<terminatorzzzzz9>
\q
<terminatorzzzzz9>
\q
<pagios>
any idea about this error ? /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
terminatorzzzzz9 has quit [Quit: Page closed]
aryaching has joined #ruby
rshetty has quit [Remote host closed the connection]
sgambino_ has quit [Remote host closed the connection]
<pagios>
ruby-dev fixed it nvm
yqt has quit [Ping timeout: 255 seconds]
livathinos is now known as we_are_them
gagrio has joined #ruby
Kricir has joined #ruby
aryaching has quit [Read error: No route to host]
we_are_them is now known as livathinos
<SirFunk>
Is there some way in ruby to pass a class along with some context into a method so that when the method does .new on the class it has some custom context?
<SirFunk>
kind of like .bind in javascript?
Jeff_D has joined #ruby
fabrice31_ has joined #ruby
chridal has quit [Ping timeout: 265 seconds]
<Jeff_D>
Question about %r -- how do I set the multiline flag for an expression like %r{\A<figure>(.+)</figure>\z} ?
nettoweb has joined #ruby
Takle has joined #ruby
chridal has joined #ruby
amdbcg has quit [Ping timeout: 265 seconds]
oo_ has quit [Remote host closed the connection]
ojacobson has joined #ruby
fabrice31 has quit [Ping timeout: 264 seconds]
ojacobson has left #ruby ["Leaving"]
Kricir has quit [Ping timeout: 265 seconds]
Regulati_ has quit [Remote host closed the connection]
User458764 has joined #ruby
amdbcg has joined #ruby
mrmargolis has joined #ruby
<Jeff_D>
anyone? setting options on regexp specified using %r?
<Jeff_D>
cool, thanks; *screw* intuitiveness, though it would be wonderful if I could figure out how to find doc or Google-fu for that sort of thing. Holdover from Perl, I'd guess?
maximski has joined #ruby
<Jeff_D>
I thought I'd run screaming away from that language ten years ago; apparently I was mistaken. Thanks again…. back on track :)
<undeadaedra>
well options are suffixed to "standard form", so I tried by putting it the same way
<Jeff_D>
:D
momomomomo has joined #ruby
catcher has joined #ruby
Jeff_D has quit [Quit: JMP $]
govg has joined #ruby
sevenseacat has quit [Quit: Me dun like you no more.]
tkuchiki has quit [Remote host closed the connection]
juanpaucar has quit []
tkuchiki has joined #ruby
dfinninger has joined #ruby
amdbcg has quit [Ping timeout: 243 seconds]
dagelf has quit [Ping timeout: 264 seconds]
juanpablo____ has joined #ruby
rhllor has joined #ruby
momomomomo has quit [Quit: momomomomo]
lidenskap has quit [Ping timeout: 255 seconds]
tkuchiki has quit [Read error: Connection reset by peer]
Alina-malina has quit [Ping timeout: 272 seconds]
Boondox has joined #ruby
mengu__ has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 250 seconds]
r3dk1ng is now known as NinjaOps
Alina-malina has joined #ruby
rshetty has joined #ruby
Zamerick has joined #ruby
werelivinginthef has joined #ruby
Zamerick_ has joined #ruby
Crisix has joined #ruby
juanpablo____ has quit [Ping timeout: 255 seconds]
Kricir has joined #ruby
Rickmasta has joined #ruby
rhllor has quit [Client Quit]
Spami has quit [Quit: This computer has gone to sleep]
ta has quit [Remote host closed the connection]
slackbotgz has quit [Remote host closed the connection]
rshetty has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
dextaa has joined #ruby
ta has joined #ruby
Mia has joined #ruby
Mia has joined #ruby
astrobunny has joined #ruby
Megtastique has quit [Ping timeout: 240 seconds]
vivekananda has quit [Ping timeout: 240 seconds]
rhllor has joined #ruby
jottr has joined #ruby
ndrei has joined #ruby
Megtastique has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
axl_ has joined #ruby
Zamerick_ has quit [Quit: Leaving]
rbennacer has joined #ruby
JDiPierro has joined #ruby
jottr has quit [Ping timeout: 252 seconds]
Beoran__ has quit [Ping timeout: 246 seconds]
freerobby has joined #ruby
maximski has quit []
juanpaucar has joined #ruby
amdbcg has joined #ruby
Domon has joined #ruby
evanjs_ has quit [Remote host closed the connection]
evanjs has joined #ruby
astrobunny has quit [Remote host closed the connection]
wgreenhouse has joined #ruby
Megtastique has quit [Read error: Connection reset by peer]
freerobby has quit [Ping timeout: 256 seconds]
cloaked1 has joined #ruby
cloaked1 has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
freerobby has joined #ruby
freerobby1 has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
vyorkin has quit [Ping timeout: 252 seconds]
dextaa has quit [Quit: Leaving]
rshetty has joined #ruby
prphp has joined #ruby
sgambino has quit [Remote host closed the connection]
fryguy9 has quit [Quit: Leaving.]
Megtastique has joined #ruby
odin22 has joined #ruby
Megtastique has quit [Max SendQ exceeded]
amdbcg has quit [Ping timeout: 256 seconds]
rshetty has quit [Remote host closed the connection]
juanpablo____ has joined #ruby
Megtastique has joined #ruby
Megtastique has quit [Max SendQ exceeded]
Beoran__ has joined #ruby
Megtastique has joined #ruby
maxmanders has quit [Excess Flood]
xploshioon has joined #ruby
PaulCapestany has quit [Excess Flood]
oddskill_away is now known as oddskill
maxmanders has joined #ruby
xploshioon has quit [Client Quit]
ramfjord has joined #ruby
fryguy9 has joined #ruby
arup_r has quit []
wgreenhouse has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
sgambino has joined #ruby
mary5030 has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
mary5030 has quit [Read error: Connection reset by peer]
fabrice31 has joined #ruby
mary5030 has joined #ruby
haxrbyte_ has joined #ruby
beat has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
mary5030 has quit [Remote host closed the connection]
kaffepanna has quit [Quit: Lost terminal]
fabrice31_ has joined #ruby
mary5030 has joined #ruby
roshanavand has quit [Ping timeout: 246 seconds]
roshanavand has joined #ruby
thingmaker has joined #ruby
hanmac1 has quit [Quit: Leaving.]
justin_pdx has joined #ruby
justin_pdx has quit [Client Quit]
paulcsmith has joined #ruby
Megtastique has quit []
ebbflowgo has quit [Read error: Connection reset by peer]
mary5030 has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
iotouch has quit [Quit: This computer has gone to sleep]
ebbflowgo has joined #ruby
banister has joined #ruby
ruby322 has joined #ruby
ruby322 is now known as dudedudeman
fabrice31 has quit [Ping timeout: 276 seconds]
rhllor has quit [Quit: rhllor]
iotouch has joined #ruby
RegulationD has quit [Remote host closed the connection]
rshetty has joined #ruby
RegulationD has joined #ruby
ramfjord has quit [Ping timeout: 245 seconds]
_honning_ has quit [Ping timeout: 248 seconds]
lavros_ has joined #ruby
arturaz has quit [Ping timeout: 256 seconds]
sgambino has quit [Remote host closed the connection]
rshetty has quit [Remote host closed the connection]
oo_ has joined #ruby
lavros has quit [Ping timeout: 264 seconds]
sgambino has joined #ruby
mjuszczak has quit []
rocknrollmarc has joined #ruby
rshetty has joined #ruby
Guest10156 has quit [Remote host closed the connection]
<dudedudeman>
hello awesome rubyists!
alienaut has quit [Ping timeout: 264 seconds]
rshetty has quit [Remote host closed the connection]
rshetty has joined #ruby
cpt_yossarian has quit [Ping timeout: 250 seconds]
msgodf has quit [Ping timeout: 256 seconds]
<undeadaedra>
oh u
<dudedudeman>
oh me oh my
<dudedudeman>
what's everyone working on today?
gsd has joined #ruby
iotouch has quit [Quit: 离开]
<dudedudeman>
i'll just keep rambling because someone's got to do it
beat has quit [Max SendQ exceeded]
<dudedudeman>
i'm just working on the same stuff that's got me bogged down from friday
<dudedudeman>
also, because my full-time gig isn't Ruby, i'm at my desk with about 50 hard drives that were scattered all over our building in random places.
<dudedudeman>
happy monday
rshetty_ has joined #ruby
rshetty has quit [Ping timeout: 272 seconds]
mary5030_ has joined #ruby
kobain has joined #ruby
<catcher>
dudedudeman, happy monday to you too.
<ninjs>
I'm working on writing a little script that parses an excel documents, grabs a few cells from each row, and writes them to a new document. It's hard. D:
<dudedudeman>
ninjs, what problems are you running in to?
thiagovsk has joined #ruby
<dudedudeman>
thanks, catcher!
livathinos has quit []
nszceta has joined #ruby
pigzilla has joined #ruby
<ninjs>
dudedudeman: mainly that I don't understand the Spreadsheet library documentation. And.. I'm pretty new to ruby haha
pigzilla has left #ruby ["Leaving"]
<dudedudeman>
ha, me too me too
Regulati_ has joined #ruby
paulcsmith has quit [Quit: Be back later ...]
omich has joined #ruby
<undeadaedra>
Happy monday?
<undeadaedra>
Is such a thing even possible?
mary5030 has quit [Ping timeout: 250 seconds]
mitchellhenke has joined #ruby
juanpaucar has quit [Remote host closed the connection]
poguez_ has joined #ruby
mengu has quit [Read error: Connection reset by peer]
uri__ has joined #ruby
<dudedudeman>
undeadaedra: we can certainly try for the first one
<dudedudeman>
if not this monday, we can try for next monday
paulcsmith has joined #ruby
<ninjs>
I'm trying to write a function that's like for each row, modify cells x, y, and z
<ninjs>
the problem is I'm not done with what I want it to do yet. I guess I should just print x,y, z. Haha thanks
<DaniG2k>
ninjs: is y always at position 6 in the row and z always at position 24?
Sid05 has joined #ruby
dfinninger has quit [Remote host closed the connection]
<DaniG2k>
ninjs: personally I'd split the row on spaces or commas or something
<DaniG2k>
ninjs: instead of assigning it a statically typed number
<ninjs>
DaniG2k: Yeah. So this program spits out this excel file with the data always in the same spot, one file per row. I need to parse through those rows, grab and format some of the data in each cell, and spit out about 6 cells per row on a new document
Guest26 has joined #ruby
amdbcg has joined #ruby
Spami has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
ddarkpassenger has joined #ruby
vtunka has quit [Quit: Leaving]
rhllor has joined #ruby
ebbflowgo has quit [Read error: Connection reset by peer]
ebbflowgo has joined #ruby
ta has quit [Remote host closed the connection]
sevvie has quit [Ping timeout: 265 seconds]
rshetty_ has quit [Remote host closed the connection]
zenith_ has joined #ruby
ndrei has quit [Ping timeout: 250 seconds]
Takle has quit [Remote host closed the connection]
ta has joined #ruby
amdbcg has quit [Read error: No route to host]
bruno- has joined #ruby
amdbcg1 has joined #ruby
rshetty has joined #ruby
ndrei has joined #ruby
govg has quit [Quit: leaving]
tesuji has quit [Ping timeout: 250 seconds]
weemsledeux has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cpt_yossarian has joined #ruby
bim has joined #ruby
Takle has joined #ruby
bim is now known as Guest49015
ujihisa has joined #ruby
rshetty has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 240 seconds]
_honning_ has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
kirun has joined #ruby
zenith_ has quit [Remote host closed the connection]
gauke has quit [Quit: gauke]
rhllor has quit [Ping timeout: 250 seconds]
dfinninger has joined #ruby
linoj has left #ruby [#ruby]
andikr has quit [Remote host closed the connection]
rhllor has joined #ruby
riotjones has quit [Remote host closed the connection]
bricker has joined #ruby
rbennacer has quit [Remote host closed the connection]
<ninjs>
Okay. So that works great. Now I'm just a bit lost as to how to take those variables, and write them into a new file
<ninjs>
I can instantiate the new file in a variable..
<ismaelga>
Hi everyone!
<ismaelga>
Do you guys know any tool that for a list of words, generates one big, but minified regex that only matches those words?
<jhass>
ismaelga: "minified"?
horsecowdog has quit [Remote host closed the connection]
<jhass>
until that I had said Regexp.union
haxrbyte_ has quit [Read error: Connection reset by peer]
ujihisa has quit [Ping timeout: 246 seconds]
rbennacer has joined #ruby
mitchellhenke has quit [Quit: Computer has gone to sleep.]
bruno- has joined #ruby
chridal has quit [Ping timeout: 272 seconds]
<ismaelga>
jhass: Yeah, minified. For example for AB1 AB2, AB3, AB4 it would generate /AB[1-4]/ or something would be the minified version of /AB1|AB2|AB3|AB4/
jimms has quit [Remote host closed the connection]
freerobby1 has quit [Ping timeout: 250 seconds]
<jhass>
I doubt that exists
<dudedudeman>
ninjs: are you using Ruby's File class and IO class?
<ismaelga>
jhass: The use case for this would be to check if some kind of identifier is in a list. But I rather store a regex instead of a huge list
<ninjs>
Okay so here's that I'm trying to do: Iterate over that loop I posted, grab the values from each of those cells, and put them into a new file to be written.
<ninjs>
Ohh. I know how to write to the file. I'm just not sure how to store the variables to write to the file
<ismaelga>
jhass: google doesn't help much either. It only returns stuff about regexps for minifying html, css, etc... :/
gagrio has quit [Ping timeout: 252 seconds]
mitchellhenke has joined #ruby
lidenskap has joined #ruby
urbanendeavour has joined #ruby
thingmaker has quit []
Sid05 has left #ruby [#ruby]
HayesHimself has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ta has quit [Remote host closed the connection]
paulcsmith has quit [Quit: Be back later ...]
<ismaelga>
jhass: I've read an article on how to minify a regexp a while back but I think the process was manual. I think it would be awesome to have a tool like this. I'm not even sure if that's possible to build
thingmaker has joined #ruby
haxrbyte_ has joined #ruby
sigurding has quit [Quit: sigurding]
fryguy9 has quit [Quit: Leaving.]
chrishough has joined #ruby
<jhass>
sounds like a hard problem indeed
astrobunny has quit [Ping timeout: 255 seconds]
wallerdev has joined #ruby
riotjones has joined #ruby
rbennacer has quit [Read error: Connection reset by peer]
chridal has joined #ruby
mary5030_ has quit [Ping timeout: 264 seconds]
CloCkWeRX has quit [Quit: Leaving.]
fryguy9 has joined #ruby
paulcsmith has joined #ruby
Takle has quit [Remote host closed the connection]
GaryOak_ has joined #ruby
kblake has joined #ruby
haxrbyte_ has quit [Read error: Connection reset by peer]
GaryOak_ has quit []
amdbcg1 has quit [Ping timeout: 272 seconds]
grindmodeon has joined #ruby
grindmodeon has quit [Max SendQ exceeded]
grindmodeon has joined #ruby
jottr has joined #ruby
rbennacer has joined #ruby
<Mon_Ouie>
ismaelga: I doubt you could do that efficiently, one can't even efficiently find an NFA with a minimal amount of states and a regexp is basically that (and Ruby's regexps are actually more powerful than that, but I imagine you're not going to need those extra features)
davedev24_ has quit [Ping timeout: 248 seconds]
davedev24_ has joined #ruby
<Mon_Ouie>
You can minimize DFAs efficiently, but a DFA may require exponentially more states than an equivalent NFA
grindmodeon has quit [Client Quit]
rocknrollmarc has quit [Ping timeout: 250 seconds]
Guest49015 has quit [Remote host closed the connection]
blueOxigen has joined #ruby
ramfjord has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
rocknrollmarc has joined #ruby
rocknrollmarc has quit [Max SendQ exceeded]
rocknrollmarc has joined #ruby
rocknrollmarc has quit [Max SendQ exceeded]
ndrei has quit [Ping timeout: 272 seconds]
krisquig_ has joined #ruby
bluOxigen has quit [Ping timeout: 250 seconds]
seme has joined #ruby
<seme>
hey guys... not sure if you can tell anyone to get it fixed but the goruco.com email is bouncing
Takle has joined #ruby
casshern2 has quit [Ping timeout: 246 seconds]
<ismaelga>
Mon_Ouie: Uh.Thanks for that information. I really don't care that much about performance. And yeah. I don't need groups capturing or any powerful feature. I just want to know if a value is in a list and I was thinking if a "minified regexp" would work
Eiam_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
krisquigley has quit [Ping timeout: 250 seconds]
fryguy9 has quit [Quit: Leaving.]
roshanavand1 has joined #ruby
horsecowdog has joined #ruby
fryguy9 has joined #ruby
roshanavand has quit [Ping timeout: 276 seconds]
ta has joined #ruby
<ismaelga>
Mon_Ouie: I guess compression/decompression would be a simpler alternative and get the same result in terms of memory use, etc.
cpt_yossarian has quit [Ping timeout: 250 seconds]
evanjs has quit [Remote host closed the connection]
n80 has quit [Ping timeout: 265 seconds]
n80_ has joined #ruby
jordanm has quit [Ping timeout: 256 seconds]
ndrei has joined #ruby
jobewan has joined #ruby
dfinninger has quit [Remote host closed the connection]
<banister>
ismaelga btw, if you can speak in french Mon_Ouie would be a lot more responsive. French is actually the only language he speaks, and the delay you get while talking in english to him is due to him running everything through google translate
<jhass>
o_O
failshell has quit [Remote host closed the connection]
allenn has quit [Remote host closed the connection]
jordanm has joined #ruby
RandyT has quit [Ping timeout: 256 seconds]
thingmaker has quit []
mleung has joined #ruby
<Mon_Ouie>
zwz
<Mon_Ouie>
Oh despair! I unmasked how can I get out!
<ismaelga>
banister: My french is really bad :p I only know a few words
Spami has quit [Quit: This computer has gone to sleep]
Rollabun_ has quit [Remote host closed the connection]
fryguy9 has quit [Quit: Leaving.]
amdbcg has joined #ruby
Rollabunna has joined #ruby
grindmodeon has joined #ruby
_honning_ has quit [Read error: Connection reset by peer]
ta has quit [Remote host closed the connection]
<undeadaedra>
ismaelga: salut
Hijiri has quit [Quit: WeeChat 1.0.1]
jottr has quit [Ping timeout: 264 seconds]
pandaant has quit [Quit: Lost terminal]
ascarter has joined #ruby
ndrei has quit [Ping timeout: 276 seconds]
_honning_ has joined #ruby
RandyT has joined #ruby
ghostmoth has joined #ruby
<ismaelga>
and that's pretty much everything I can say in french
failshell has joined #ruby
tgunr has joined #ruby
<banister>
ismaelga comment quel ca chose, voulet vous avec moi, c'est sois
jordanm has quit [Ping timeout: 245 seconds]
GnuYawk has joined #ruby
grindmodeon has quit [Client Quit]
<rom1504>
so much orthograph problems
failshell has quit [Remote host closed the connection]
fryguy9 has joined #ruby
DaniG2k has quit [Quit: leaving]
thingmaker has joined #ruby
axilla has quit [Ping timeout: 245 seconds]
thingmaker has quit [Max SendQ exceeded]
pika_pika has quit [Ping timeout: 245 seconds]
<dudedudeman>
weaksauce: you around?
tjbiddle has joined #ruby
kristofferR has joined #ruby
thingmaker has joined #ruby
thingmaker has quit [Max SendQ exceeded]
<ismaelga>
yup. Even with google translator. I can't understand... My girlfriend speaks french fluently but she isn't here right now
<ismaelga>
* she is actually real.
serivichi has quit [Ping timeout: 272 seconds]
spider-mario has joined #ruby
thingmaker has joined #ruby
thingmaker has quit [Max SendQ exceeded]
<dudedudeman>
ismaelga: i'm glad you have a real girlfriend. they're the best
<dudedudeman>
in most cases, they're even better when they become wives
<dudedudeman>
it's time to propose
thingmaker has joined #ruby
ndrei has joined #ruby
thingmaker has quit [Max SendQ exceeded]
<ismaelga>
nah... Real rings and real weddings in general are too expensive
thingmaker has joined #ruby
thingmaker has quit [Max SendQ exceeded]
JimmyNeutron has quit [Quit: Leaving]
paulcsmith has quit [Quit: Be back later ...]
<Mon_Ouie>
Well part of the reason you can't understand what banisterfiend said is that it isn't actually a French sentence, he basically shuffled the words of "voulez-vous couchez avec moi ce soir?" (his favorite french sentence) and misspelled them
JDiPierro has quit [Remote host closed the connection]
twwyvy has joined #ruby
quintinadam has joined #ruby
pika_pika has joined #ruby
<undeadaedra>
wow
MatthewsFace has joined #ruby
<pagios>
hi i am using ruby binding and doing: result = client[:'userTable'].find(:subscriberToken => token).update_one( "$pull" => { :subscribedTo => topic } )
<pagios>
something wrong ?
<undeadaedra>
banister: don't ever do anything like that again, it hurts eyes
rbennacer has quit [Remote host closed the connection]
krisquig_ has quit [Remote host closed the connection]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
krisquigley has joined #ruby
<undeadaedra>
pagios: expected result, actual result?
<hanmac>
pagios: what kind of binding?
JimmyNeutron has joined #ruby
centrx has joined #ruby
fryguy9 has quit [Quit: Leaving.]
alex88 has quit []
<pagios>
it works , was refering to a wrong collection
<pagios>
it works , was refering to a wrong collection
<undeadaedra>
good
* jhass
wonders if that was another #sequel crosspost
rbennacer has joined #ruby
lloyd is now known as Lloyd
bim has joined #ruby
<undeadaedra>
jhass: no
<jhass>
good
bim is now known as Guest48019
evanjs has joined #ruby
Guest26 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Filete has joined #ruby
dfinninger has joined #ruby
fryguy9 has joined #ruby
<bricker>
jhass: no
jimms has joined #ruby
dfinninger has quit [Read error: Connection reset by peer]
krisquigley has quit [Ping timeout: 272 seconds]
dfinninger has joined #ruby
vire has quit [Remote host closed the connection]
amdbcg has quit [Ping timeout: 264 seconds]
jayeshsolanki has joined #ruby
Takle has quit [Remote host closed the connection]
Dakuan has quit [Remote host closed the connection]
jayeshsolanki has quit [Max SendQ exceeded]
jayeshsolanki has joined #ruby
havenwood has joined #ruby
zorak8 has joined #ruby
quintinadam has quit []
jayeshsolanki has quit [Max SendQ exceeded]
lsmola_ has quit [Ping timeout: 252 seconds]
jayeshsolanki has joined #ruby
connor_goodwolf has joined #ruby
jayeshsolanki has quit [Max SendQ exceeded]
jayeshsolanki has joined #ruby
sgambino has quit [Remote host closed the connection]
snockerton has joined #ruby
JoshGlzBrk has joined #ruby
Zarthus has quit [Ping timeout: 245 seconds]
jayeshsolanki has quit [Max SendQ exceeded]
Zarthus has joined #ruby
lidenskap has quit [Remote host closed the connection]
Dakuan has joined #ruby
Rickmasta has joined #ruby
JDiPierro has joined #ruby
ndrei has quit [Ping timeout: 244 seconds]
paulcsmith has joined #ruby
fryguy9 has quit [Quit: Leaving.]
jeff_laplante has joined #ruby
c0m0 has quit [Ping timeout: 246 seconds]
hectortrope is now known as noobQ
Ellis has joined #ruby
Rephiax has joined #ruby
dagelf has quit [Ping timeout: 255 seconds]
roshanavand1 has quit [Remote host closed the connection]
<Ellis>
when i run this i get nil … what’s wrong with the puts bingo.index(letter) line?
zenith_ has quit [Remote host closed the connection]
fryguy9 has joined #ruby
Musashi007 has joined #ruby
snockerton has joined #ruby
terlar has quit [Ping timeout: 276 seconds]
mostlybadfly has joined #ruby
<nickjj>
has anyone experienced connection refused errors when using faye and sidekiq together?
Guest48019 has quit [Remote host closed the connection]
<Ellis>
how do i run a method from inside another method? i want to run a generate method before i run my method that uses the generated info
<centrx>
Same way as outside a method?
momomomomo has quit [Quit: momomomomo]
DerisiveLogic has joined #ruby
silentpost has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
<Ellis>
centrx: when i’m running the progarm i’d do something like instance.method, but if i don’t know the name of the instance how can i put that in the method where i want it to be run from
<havenwood>
Ellis: So for debugging purposes, use #p instead of #puts to get the #inspect version so you can see what's happening.
<havenwood>
Ellis: Note #p doesn't return `nil` like #puts either.
<Ellis>
havenwood: thanks for sharing your knowledge
snockerton has joined #ruby
kaspernj has quit [Remote host closed the connection]
<havenwood>
Ellis: No prob, you're welcome.
danman has joined #ruby
blueOxigen has quit []
tvon has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
eytanfb has joined #ruby
zorak8 has quit [Read error: Connection reset by peer]
Megtasti_ has quit [Ping timeout: 248 seconds]
tcrypt has joined #ruby
econerd4ever has joined #ruby
RegulationD has joined #ruby
zorak8 has joined #ruby
<Ellis>
i’m iterating using each, is there a method that doesn’t return the array at the end?
linoj has joined #ruby
Megtastique has joined #ruby
<jhass>
what's wrong with that?
Megtastique has quit [Max SendQ exceeded]
econerd4ever has left #ruby [#ruby]
linoj has left #ruby [#ruby]
dfinninger has joined #ruby
Megtastique has joined #ruby
Megtastique has quit [Max SendQ exceeded]
ponga has quit [Quit: Leaving...]
krisquigley has joined #ruby
chrishou_ has quit [Remote host closed the connection]
Megtastique has joined #ruby
keen__ has joined #ruby
Megtastique has quit [Max SendQ exceeded]
<Ellis>
i’m working with a nested array and i want it to be returned with each array on its own line, so i’m trying to format it after i iterate over the array.
chrishough has joined #ruby
Megtastique has joined #ruby
Megtastique has quit [Max SendQ exceeded]
dumdedum has quit [Quit: foo]
keen_ has quit [Ping timeout: 264 seconds]
Megtastique has joined #ruby
Guest26 has joined #ruby
lidenskap has joined #ruby
r0ok has joined #ruby
RegulationD has quit [Ping timeout: 245 seconds]
<jhass>
I can't relate that to your question, sorry
dfinninger has quit [Ping timeout: 272 seconds]
krisquigley has quit [Ping timeout: 245 seconds]
OtterCoder has quit [Ping timeout: 245 seconds]
tvw has quit [Ping timeout: 276 seconds]
chrishough has quit [Read error: Connection reset by peer]
rocknrollmarc has quit [Ping timeout: 272 seconds]
failshell has joined #ruby
Hijiri has quit [Quit: WeeChat 1.0.1]
User458764 has joined #ruby
eytanfb has quit [Ping timeout: 255 seconds]
michaeldeol has joined #ruby
Musashi007 has joined #ruby
blackmes1 has joined #ruby
failshel_ has quit [Ping timeout: 256 seconds]
bradleyprice has joined #ruby
Morkel has joined #ruby
<Ellis>
no worries
<Musashi007>
try: array[0].each do |var| puts var end
<Ellis>
thanks
beneggett has joined #ruby
vim_shimm has joined #ruby
quimrstorres has quit [Remote host closed the connection]
dfinninger has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
silentpost has quit [Ping timeout: 276 seconds]
ki0 has joined #ruby
shazaum has joined #ruby
nszceta has quit [Ping timeout: 244 seconds]
Morkel has quit [Client Quit]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
rbennacer has quit [Write error: Connection reset by peer]
Morkel has joined #ruby
RegulationD has joined #ruby
codecop has quit [Ping timeout: 272 seconds]
Megtastique has quit [Ping timeout: 245 seconds]
nszceta has joined #ruby
jlast has joined #ruby
jerius has quit [Ping timeout: 276 seconds]
Zai00 has joined #ruby
jeff_laplante has quit [Ping timeout: 264 seconds]
ki0 has quit [Remote host closed the connection]
Megtastique has joined #ruby
nszceta has quit [Max SendQ exceeded]
Megtastique has quit [Max SendQ exceeded]
Megtastique has joined #ruby
nszceta has joined #ruby
<kq_away_>
can I convert an array of two-value arrays to a hash?
<kq_away_>
I mean, easily, like .to_hash or something
<havenwood>
kq_away_: #to_h
djbkd has quit [Remote host closed the connection]
codecop has joined #ruby
<kq_away_>
`<main>': undefined method `to_h' for #<Array:0x000000027fa330> (NoMethodError)
<kq_away_>
I'm on a crappy connection so I'm using a previously downloaded installer from rubyinstaller.org
<kq_away_>
I'm on windows
<havenwood>
kq_away_: Ah, yeah then 2.2.1!
jimms has quit [Remote host closed the connection]
<kq_away_>
You may not believe it, but for a while my only connection here was ip over dns
<kq_away_>
good luck using anything but irssi with that
blackmes1 has quit [Ping timeout: 250 seconds]
Hijiri has joined #ruby
werelivinginthef has quit [Remote host closed the connection]
vim_shimm has quit [Ping timeout: 245 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
MXfive has joined #ruby
<kq_away_>
if I have an array of filenames, can I do something like arr.each(:File.delete) so that I don't have to create a lambda just to pass its argument?
<jhass>
no
<kq_away_>
oh, well
<jhass>
well, &File.method(:delete) but it's not worth it IMO
Hijiri has quit [Client Quit]
<undeadaedra>
did you try by yourself?
<undeadaedra>
always interesting.
User458764 has joined #ruby
sanguisdex has joined #ruby
Hijiri has joined #ruby
Megtastique has quit [Ping timeout: 256 seconds]
<kq_away_>
I did, but guessing syntax is a game you usually lose :P
<kq_away_>
and there is :+ and etc that can be passed
sevvie has quit [Ping timeout: 245 seconds]
<sanguisdex>
hi all, is there a standard guide for TDD in developing ruby gems. when I search I find multple methods, and I don't know what road to go down
Megtastique has joined #ruby
leafybas_ has joined #ruby
<jhass>
if you like rspec, do rspec, if you like test-unit style, go minitest
Hijiri has quit [Client Quit]
leafybas_ has quit [Remote host closed the connection]
Hijiri has joined #ruby
<havenwood>
sanguisdex: Minitest ships with Ruby and has spec or test style but RSpec is also quite popular.
WillAmes has quit [Remote host closed the connection]
ismaelga has quit [Remote host closed the connection]
genpaku has joined #ruby
Eiam_ has joined #ruby
yokel has joined #ruby
Zai00 has quit [Quit: Zai00]
Megtastique has quit [Remote host closed the connection]
basiclaser has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
Megtastique has joined #ruby
Megtastique has quit [Max SendQ exceeded]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Megtastique has joined #ruby
charliesome has quit [Quit: zzz]
<Igorshp>
i'm trying to see if a class instance been modified during a script run. is there a way to compare 2 instances and their contents?
sevvie has joined #ruby
NinjaOps has quit [Remote host closed the connection]
<toretore>
==
Musashi007 has quit [Quit: Musashi007]
jimms has quit [Remote host closed the connection]
_honning_ has quit [Ping timeout: 276 seconds]
<hanmac>
Igorshp: hm if you do not write the == method yourself its not that easy ... can you make a gist of what you already have or what are you trying todo? ... specially if you may forgot to copy / or even deep copy thee second instance
<Igorshp>
hanmac: give me a sec, i'll put together a short explanation of what i'm doing
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hounddog_ has joined #ruby
x1337807x has joined #ruby
kadoppe has joined #ruby
iamninja has quit [Ping timeout: 245 seconds]
<Igorshp>
updated to use markdown
Ellis has quit [Quit: Ellis]
yfeldblum has joined #ruby
Hounddog has quit [Ping timeout: 264 seconds]
Guest26 has joined #ruby
Pharaoh2 has joined #ruby
momomomomo has quit [Quit: momomomomo]
Megtastique has quit [Ping timeout: 252 seconds]
<ninjs>
So I have a bunch of files in a folder /FolderX/FolderY/file1.ext with names like "John Doe blah blah blah". I'm trying to write a little script that looks at the first two words in a file (e.g. John Doe), and puts them in a directory with the same name. So for example from FolderX/FolderY/John Doe file1.ext to FolderX/John Doe/John Doe file1.ext
willharrison has joined #ruby
<ninjs>
Can ruby do that?
Vitor has joined #ruby
<hanmac>
ninjs: why not? ruby can nail a pudding on the wall ;P
Vitor has quit [Remote host closed the connection]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<hanmac>
shevy: "for ruby everything is a nail-object" ;P
<ninjs>
But can it do it for all of the files in a folder? So take all the files in FolderX/FolderY/... and move them to FolderX/FolderName/.. for each file?
cpt_yossarian has quit [Remote host closed the connection]
cpt_yossarian has joined #ruby
<ninjs>
Can anyone point me in the right direction for resources to do that?
<ninjs>
Besides google.com :P
merqlove has quit [Quit: Connection closed for inactivity]
<jhass>
Igorshp: this goes into chefs internals, so #chef should be the better place
grindmodeon has quit [Quit: Leaving.]
Megtastique has joined #ruby
Megtastique has quit [Max SendQ exceeded]
<work_op>
whats the purpose of an object having both __id__ and .hash? whats the difference?
Darryl___ has quit [Quit: Connection closed for inactivity]
danman has quit [Quit: danman]
Megtastique has joined #ruby
Megtastique has quit [Max SendQ exceeded]
ta has joined #ruby
<hanmac>
ninjs: checkout Dir::[] for globing the files like with "*/*/*" or something like that, use "File.foreach(s).first" to get the first line, use FileUtils::mv to move the files into a new folder
sgambino has quit [Remote host closed the connection]
<jhass>
ninjs: Dir[], File.read, String#[] with a regex, Array#map, Enumerable#group_by, FileUtils.cp/.mv
Megtastique has joined #ruby
Megtastique has quit [Max SendQ exceeded]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
redbaritone has joined #ruby
<ytti>
work_op, object_id is unique id for given object
Megtastique has joined #ruby
<ytti>
work_op, hash is hash of the values of object
Megtastique has quit [Max SendQ exceeded]
<ninjs>
thanks!
<ytti>
work_op, 'moi' and 'moi' have different object_id but same hash
Igorshp has quit [Remote host closed the connection]
<jhass>
kq_away_: for now you, future you will curse now you though ;)
<hanmac>
work_op: about implementation specific, there is FLONUM which does gives Float numbers fixed object Ids under 64 bit, (and also does move some other ids around) so you may never depend on specific object ids
blackmes1 has quit [Client Quit]
amdbcg1 has joined #ruby
Nuck has joined #ruby
tvon has quit [Quit: Lost terminal]
amdbcg has quit [Read error: Connection reset by peer]
<kq_away_>
I dunno. The past me used short names in one-liners and I don't hate him for that
<baweaver>
kq_away_: except fn is usually short for function.
Nuck has quit [Max SendQ exceeded]
<baweaver>
which will at least confuse others.
<hanmac>
kq_away_: the select and the reject block might be combined into one select block .. imo
Nuck has joined #ruby
Nuck has quit [Max SendQ exceeded]
<kq_away_>
fair enough, bewe
<kq_away_>
err
<kq_away_>
baweaver*
chrishough has joined #ruby
Nuck has joined #ruby
<baweaver>
also 8 space indentation is a bit severe, most people tend to use 2 in Ruby.
<baweaver>
4 in Python
Megtastique has quit [Ping timeout: 245 seconds]
amdbcg1 has quit [Read error: Connection reset by peer]
amdbcg has joined #ruby
<kq_away_>
it's how gist handles tabs
<baweaver>
might want to translate that to spaces.
gfawcettpq has quit [Ping timeout: 252 seconds]
<hanmac>
imo i also use tabs in some of my projects because it does makes more sense for me (and most of my programs does handle them better)
vim_shimm has joined #ruby
shadoi1 has joined #ruby
cabouffard has joined #ruby
<baweaver>
How's that?
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver>
because at least in the case of Rubymine, Vim, and Sublime spaces are perfectly usable, and that's most of the ruby community right there.
bim has joined #ruby
bim is now known as Guest38973
<hanmac>
some have problems with when i want to remove a line or an indention so i allways need to remove two spaces instead of one tab for one indent level
<hanmac>
also i need IDEs which does support more languages at the same time simultaniously ... and most bigger ones (specially where you need to pay for) does have many problems with that
axilla has joined #ruby
<kq_away_>
I'm pro-tabs
<kq_away_>
and camel case
<adaedra>
KqAway
aghalarp has joined #ruby
Kricir has quit [Remote host closed the connection]
<shadoi1>
kq_away_: you'll hate 99% of all ruby code then.
jenrzzz has quit [Ping timeout: 246 seconds]
<hanmac>
Camels should stay in the desert ;P
meschiv2 has joined #ruby
<kq_away_>
I have no problems with people using tabs
<kq_away_>
err
<kq_away_>
spaces
<hanmac>
then you get classes like the java- poisoned AR/AS like with HashWithThatVeryToLongName
sankaber has joined #ruby
<havenwood>
two-space soft-tabs!
<adaedra>
too narrow.
charliesome has joined #ruby
<kq_away_>
adaedra: funny thing: irssi nickalerted me about 'KqAway'
meschiv2 has quit [Read error: Connection reset by peer]
ki0 has joined #ruby
<Dairenn>
I keep getting the old version of a gem (from the same git branch) that, in spite of being deleted from the bundler gems directory and gem cache, when I run bundle install, it somehow gets back the version of the gem committed before the most recent commit to the repo on the origin server. What am I missing here?
iasoon has quit [Ping timeout: 245 seconds]
lewix has quit [Remote host closed the connection]
prphp has joined #ruby
vim_shimm has joined #ruby
sinkensabe has quit [Remote host closed the connection]
<jhass>
Dairenn: bundle update gem_name
* Dairenn
nods.
boustnt has joined #ruby
sinkensabe has joined #ruby
<boustnt>
1+1
<Dairenn>
jhass: You're a superstar. Thanks for that.
<jhass>
yw
<jhass>
Dairenn: read (do not edit it by hand) your Gemfile.lock for the why
<havenwood>
boustnt: # => 2
RegulationD has quit [Remote host closed the connection]
<Dairenn>
Aha!!
* Dairenn
feels lame for forgetting about this...
yfeldblum has quit [Remote host closed the connection]
<Dairenn>
Seriously, I was looking at this file 10,000 times 3 weeks ago for a similar issue.
<ninjs>
next if File.extname(file) != '.xls' || File.extname(file) != '.jpg' isn't working
ebbflowgo has quit [Read error: Connection reset by peer]
colorisco has quit [Quit: colorisco]
ebbflowgo has joined #ruby
<ramfjord>
Any of you guys use Resque? I'm trying to test a Resque job that goes through the working jobs, and kills/retries certain ones that it thinks is hung
aspiers_ has joined #ruby
<ramfjord>
I'm having a little trouble getting a worker to be registered and working in a separate thread in the tests
<riceandbeans>
I think the === in PHP is ridiculous
<shevy>
:)
<boustnt>
naftilos verify if the path is correct, perhaps there is some component missing in the dir
vim_shimm has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby
<shevy>
PHP was created on the first april of 1995
<shevy>
and it shows
<hanmac>
riceandbeans: just be happy that they didnt had ===== yet ;P
<adaedra>
:D
axl_ has quit [Ping timeout: 272 seconds]
axl__ is now known as axl_
<naftilos76>
boustnt: i just tried changing the filename from test.rb.time to test.time and it worked fine
vim_shimm has joined #ruby
<naftilos76>
thanks for the comment
catcher has quit [Quit: Leaving]
<shevy>
Ok... not first april... a fe weeks later... "Lerdorf, Rasmus (2007-04-26)" but still, he must have been thinking about it on first april!
<shevy>
*few weeks
jheg has joined #ruby
<ninjs>
Okay, I think I did it. This script takes files named like "John Doe File.ext" and moves them to "../John Doe/John Doe File.ext" what do you think?
<shevy>
we train you to become a ruby guru in no time
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shazaum has quit [Quit: Leaving]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jheg has quit [Client Quit]
ldnunes has quit [Quit: Leaving]
<boustnt>
ninjs, what's the problem?
<ninjs>
boustnt: No real problem, just wanted to get a 2nd set of eyes on it to see if I was doing anything crazy wrong
werelivinginthef has joined #ruby
<ninjs>
The biggest problem is that the script has to be executed from the working directory, because of how FileUtils treat the working directory
<adaedra>
Use chdir
paulcsmith has quit [Quit: Be back later ...]
<shevy>
\o/
<shevy>
go ninja go!
<ninjs>
That's my first real "ruby app" haha
ddarkpassenger has quit [Quit: Leaving]
<ninjs>
other than some silly little test stuff
n80_ has quit [Quit: n80_]
skullz has joined #ruby
<shevy>
file manipulation and directory manipulation is quite easy
djbkd has joined #ruby
brb3 has quit [Quit: <.<]
amdbcg has joined #ruby
XorSwap has joined #ruby
<boustnt>
bye
<shevy>
you have some redundancy too; for instance. File.delete, but FileUtils also have delete (sort of; .rm and I think rm_rf, which should both work on files too if I remember correctly)
boustnt has left #ruby [#ruby]
claw___ has quit [Ping timeout: 244 seconds]
<adaedra>
FileUtils looks like a ”Ruby-ation” of UNIX common file commands
<pipework>
Rubyification, you mean?
<pipework>
I'm more a fan of Pathna,e.
<pipework>
Pathname
<adaedra>
Thanks, pipework
<adaedra>
I couldn’t find how to assemble it
meschi has quit [Ping timeout: 264 seconds]
vt102 has quit [Remote host closed the connection]
spyderman4g63 has quit [Remote host closed the connection]
meschi has joined #ruby
krisquigley has joined #ruby
spyderman4g63 has joined #ruby
iasoon has joined #ruby
spyderman4g63 has quit [Client Quit]
Guest26 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest26 has joined #ruby
<shevy>
pathname is pretty verbose
mhib has joined #ruby
<shevy>
adaedra why are you not undeadra now
djbkd has quit [Remote host closed the connection]
<jhass>
Don't forget Shell!
neanderslob_ has joined #ruby
<adaedra>
shevy: I got disconnected from freenode and adaedra is my primary nick
<ruboto>
pipework # => ["/execpad/interpreters/ruby-2.2.0/lib/ruby/site_ruby/2.2.0", "/execpad/interpreters/ruby-2.2.0/lib/ ...check link for more (https://eval.in/313032)
<pipework>
>> $LOADED_FEATURES
<ruboto>
pipework # => ["enumerator.so", "rational.so", "complex.so", "/execpad/interpreters/ruby-2.2.0/lib/ruby/2.2.0/i686 ...check link for more (https://eval.in/313033)
djbkd has joined #ruby
GaryOak_ has joined #ruby
<skullz>
Does Cobweb play well with URL parameters?
<quesker>
some guy told me to use bundler. I became root, did gem install bundler. then bundle install. it says don't run bundle as root. but as a user I don't have permission to install gems, obviously
amdbcg has quit [Ping timeout: 250 seconds]
vim_shimm has quit [Ping timeout: 255 seconds]
mitchellhenke has quit [Quit: Computer has gone to sleep.]
krisquigley has quit [Ping timeout: 246 seconds]
<pipework>
quesker: 'obviously'?
<jhass>
bundler asks for sudo as needed
<pipework>
You can write to any filesystem anywhere?
<pipework>
can't*
<jhass>
and also can install gems to a local site dir with the --path option
<pipework>
Damn dog keeps 'helping' me with her paw.
<jhass>
and respects whatever location you set with $GEM_HOME
<GaryOak_>
or you can use a ruby version manager to help with that
<jhass>
so yeah, don't just run stuff as root
<quesker>
so just don't use bungler it sounds like. I want to install for everyone
<GaryOak_>
lolz bungler
<pipework>
quesker: Whale, you can put the file where you want, just use it correctly.
pika_pika has quit [Ping timeout: 245 seconds]
babykosh has joined #ruby
<jhass>
bundler is for managing a projects dependencies, it's not a rubygems replacement
FernandoBasso has joined #ruby
<jhass>
if somebody told you that, give them a slap
fedexo has joined #ruby
<quesker>
I guess I could install sudo. ugh
<pipework>
quesker: It's like you're ignoring us here. :D
<GaryOak_>
do people still like rvm?
<adaedra>
you can also use --path to install gems in the local directory
<pipework>
I use chruby and ruby-install
<jhass>
GaryOak_: people still go to war ... so
<GaryOak_>
hahaha
<GaryOak_>
pipework: I've been using chruby as well
<quesker>
I understand modules can be installed per user, but I would prefer to just install them to /usr/lib/ruby like everything else
<pipework>
quesker: Sure, just use `sudo gem install <gem>`
<GaryOak_>
quesker: they are called gems, modules mean something different in ruby
<quesker>
oh ok sorry
<shevy>
module in ruby is like: module Foo <-- now we have defined the module Foo
claw___ has joined #ruby
<shevy>
the gems typically reside in a directory called gems/
toretore has quit [Quit: Leaving]
zzing has joined #ruby
<quesker>
yeah I didn't type the whole long path sorry /usr/lib/ruby/gems/2.1.0
<shevy>
For instance, here on my system one directory is at /usr/lib/ruby/gems/2.2.0/gems/
<pipework>
quesker: Anyways, if you just want to provide a bunch of gems to your users, just use install the gems as root such that they arrive in the shared location.
<shevy>
It is also possible to install into the home-directory
DerisiveLogic has joined #ruby
<dudedudeman>
;
rgb-one has joined #ruby
silentpost has joined #ruby
julieeharshaw has quit [Quit: ZZZZZzzzz]
<quesker>
right I see. I just thought bundler was supposed to install all the deps for me real nice, but it tries to be too smart about root I guess
<quesker>
thanks for the help, I see what I need to do
<dudedudeman>
does anyone use pidgin for their IRC client?
<dudedudeman>
i'm stumped as to what to actually put in for the server here
uri__ has quit [Ping timeout: 256 seconds]
<quesker>
either install sudo or just use gem install directly
<jhass>
I actually did until I sat down and learned weechat
<rgb-one>
dudedudeman: irc.freenode.net
<pipework>
jhass: mm weechat
<GaryOak_>
I'm using a mac client
<dudedudeman>
eh, it gives me a remote server not found error when i use that server
julieeharshaw has joined #ruby
meschi has quit [Ping timeout: 240 seconds]
skullz has quit [Ping timeout: 272 seconds]
<jhass>
dudedudeman: chat.freenode.net then
<dudedudeman>
i'm at work, so i'm stuck with what my sysadmin will put on my machine
<dudedudeman>
lol
silentpost has quit [Read error: Connection reset by peer]
<dudedudeman>
does seem neat, but man... i'm lazy. lol
grindmodeon has joined #ruby
<pipework>
dudedudeman: Isn't that part of the point though?
skullz has joined #ruby
silentpost has joined #ruby
<dudedudeman>
to use toast to be lazy?
p8952 has quit [Excess Flood]
sgambino has quit [Remote host closed the connection]
sami has quit [Remote host closed the connection]
ezra has quit [Write error: Broken pipe]
meshugga has quit [Write error: Broken pipe]
destructure has quit [Write error: Broken pipe]
p8952 has joined #ruby
<jhass>
toast is basically a thin wrapper around modifying PATH, LD_LIBRARY_PATH and ./configure, make, make install DEST="~/.my_stuff/foo"
kaleido has joined #ruby
dudedudeman is now known as dudedudemanchang
<dudedudemanchang>
that was supposed to be dudedudemanchanging....
<dudedudemanchang>
but it looks like there's a char limit on that that ended up being rather unfortunate
<jhass>
being not so actively developed anymore it lacks github support though
aryaching has quit [Ping timeout: 250 seconds]
jimms has joined #ruby
fedexo has quit [Read error: Connection reset by peer]
Pharaoh2 has joined #ruby
dudedudeman1 has joined #ruby
<adaedra>
dudedudemanchang: yes, there’s a limit on nick names
<dudedudeman1>
no worries, i figured this bad boy out!
<dudedudeman1>
aw.. i'm dude dude man 1 now
dudedudemanchang has quit [Quit: Page closed]
<dudedudeman1>
but wait, i'm still here!
babykosh has quit [Quit: babykosh]
<shevy>
so dude man
rgb-one has quit [Remote host closed the connection]
Blackhole has joined #ruby
<shevy>
did you write some ruby code dude?
<dudedudeman1>
shevy: yes?
<dudedudeman1>
man, i'm trying. i'm stuck on stuff of course
<shevy>
good!
<skullz>
Does Cobweb play well with URL parameters?
<shevy>
we are all stuff... I mean stuck
<shevy>
I am trying to find out why my gcc no longer compiles gtk+
codecop has quit [Remote host closed the connection]
sevvie has quit [Ping timeout: 248 seconds]
<dudedudeman1>
see, you said some words, and i understood some of those words... like, find, and out
rbennacer has quit [Ping timeout: 264 seconds]
x1337807x has joined #ruby
naftilos76 has quit [Remote host closed the connection]
mary5030_ has quit [Remote host closed the connection]
michaeldeol has joined #ruby
zachrab has joined #ruby
fryguy9 has joined #ruby
reinaldob has quit [Remote host closed the connection]
tercenya has quit [Read error: Connection reset by peer]
<zachrab>
How can i get a cucumber test suite to run everyday at 3pm?
Hijiri has quit [Quit: WeeChat 1.0.1]
<dudedudeman1>
zachrab: i would say that a cron job might work for that
<dudedudeman1>
or maybe delayedjob?
<crowell>
cron
cabouffard has quit [Ping timeout: 256 seconds]
<zachrab>
dudedudeman1: use a gem?
<adaedra>
+1 for cron
<skullz>
Does anyone know a good gem for web crawling?
<jhass>
zachrab: man systemd.timer
<shevy>
dudedudeman1 well, gcc is just used to compile lots of software on linux systems in particular; written in different programming languages like C C++ ObjC
tercenya has joined #ruby
Rickmasta has joined #ruby
<crowell>
Or the gem 'whenever'
havenwood has quit []
<dudedudeman1>
whenever is nice
<kaleido>
complements whatever very nicely, too
havenwood has joined #ruby
<dudedudeman1>
shevy: that's neat! learn something new every day
<jhass>
did somebody write a systemd.timer backend for it yet?
<jhass>
that might actually be a fun and useful project
cabouffard has joined #ruby
GnuYawk has joined #ruby
<shevy>
dudedudeman1 I'd wish things would be written in ruby, they would be so much easier to understand and use
jimms has quit [Remote host closed the connection]
<dudedudeman1>
i'm definitely learning that the phrase 'elegant ruby' is truly true
<dudedudeman1>
it does not return :nil
<dudedudeman1>
lol
<sanguisdex>
is there a way to get ruby to output an array or has in a formated way (on command line). I am currently using p and that is less parsable by my eyes). like an equivalent of PHP's var_export
casshern2 has joined #ruby
<dudedudeman1>
sanguisdex: would a regex fit for that?
akurilin3 has quit [Read error: Connection reset by peer]
sevvie has joined #ruby
cartothemax has joined #ruby
<dudedudeman1>
man, i wish i could turn off the entered and left the room notifications
<dudedudeman1>
is that possible?
<jhass>
sanguisdex: require "pp"; pp array
<sanguisdex>
dudedudeman1: I don't think so I am just looking for a nested array/hash output as opposed to the single line string output that p provides
astrobunny has joined #ruby
baweaver has quit [Remote host closed the connection]
akurilin3 has joined #ruby
<dudedudeman1>
sanguisdex: ah ah. word. i may or may not have completely mis-read your question.... don't midn me
<dudedudeman1>
lol
<jhass>
sanguisdex: and next up as a gem: gem install awesome_print; require "ap"; ap array
<havenwood>
sanguisdex: Or if pp doesn't have what you're looking for take a look at ap from the awesome_print gem or other gems.
DerisiveLogic has quit [Remote host closed the connection]
cjim_ has joined #ruby
failshell has quit [Ping timeout: 245 seconds]
cabouffard has quit [Ping timeout: 246 seconds]
werelivinginthef has quit [Remote host closed the connection]
<shevy>
dudedudeman1 ruby can be elegant; it can however also be ugly, if the person who wrote it isn't disciplined or sloppy :)
mhib has quit [Quit: Leaving]
<sanguisdex>
havenwood: pp is perfect, I was not aware of it.
<sanguisdex>
thans dudedudeman1 and jhass fo the help as well
<dudedudeman1>
hey, glad you found something! nothing better than finding an answer to your problem
cjim_ has quit [Client Quit]
Hijiri has joined #ruby
<pipework>
Except finding the right answer to everyone's problem(S)
dudedudeman1 is now known as dudedudeman
<shevy>
I just found out the culprit, a stray libpango.a file without DSO/-fPIC (or respectively, not only libpango.a but also some *pango*.so* files too)
<shevy>
ruby-gnome here I come!
Blackhole has quit []
Igorshp has joined #ruby
<FernandoBasso>
I have a Guardfile that generate asciidoctor documents from several (1 level deep) subdirectories. ./foo/ , ./bar/, etc. There is a line like `watch(/^foo\.adoc$/ | m | ...` I would like to be able to watch files in those subdirs. Any help would be appreciated.
tjbiddle has quit [Quit: tjbiddle]
<dudedudeman>
man, i love the amount of different questions we get in here
<jhass>
FernandoBasso: /^(?:foo|bar) ?
failshel_ has joined #ruby
jottr has joined #ruby
<sanguisdex>
so back to my original question.
benegget_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<FernandoBasso>
jhass: Almost. Thanks. I'm tweaking it.
Dairenn has quit [Remote host closed the connection]
<sanguisdex>
also I am having trouble with some of the terminology between arrays and hashs, so I may have just asked a useless question
<jhass>
FernandoBasso: yeah, was meant to only show the important part ;)
cabouffard has joined #ruby
<ninjs>
how do I get a variable out of an each loop?
<FernandoBasso>
:) Fair enough!
mrmargolis has quit [Remote host closed the connection]
<ninjs>
so I have like a worksheet.each do |row| loop that stores cell values as variables. I need to take those values, put them on a new row, per row loop
<jhass>
sanguisdex: hash: map some arbitrary key to some arbitrary value. Array: ordered list/sequence of some arbitrary values
<jhass>
ninjs: Array#map
mhib has quit [Remote host closed the connection]
jottr_ has joined #ruby
<jhass>
sanguisdex: so you have an array of hashes there
<jhass>
you want an array of all names?
dudedudeman has quit [Quit: Leaving.]
axl_ has quit [Quit: axl_]
dfinning_ has quit [Remote host closed the connection]
<havenwood>
sanguisdex: Is the desired output `["bar", "foo"]` or something else?
djbkd has quit [Remote host closed the connection]
<sanguisdex>
jhass: I want search the array return the key of the nested hash that has the "name"=>"bar" in it
jottr has quit [Ping timeout: 264 seconds]
<jhass>
ah
<jhass>
with key you mean index?
<jhass>
or do you want the entire hash?
Narzew has quit [Ping timeout: 250 seconds]
<jhass>
.find {|server| server["server_environment"]["name"] == "bar" } gives the full hash
<havenwood>
sanguisdex: Show us the return value you want.
astrobunny has quit [Remote host closed the connection]
<chintanparikh>
I guess a better question is I have certain values in an array and I want to fit them in a string so they only take up a certian amount of bytes
<ninjs>
how do I do an each loop in the .each loop? if that makes sense
<jhass>
chintanparikh: you would read for example the RFC for the wire format and pass a format string to pack that matches it
<ninjs>
jhass: the rows should be 1:1. So read from row 1, print in row 1
<jhass>
ninjs: why would you need to?
<ninjs>
So I could do something like...
<havenwood>
FernandoBasso: I prefer `arr.first`, just a method, to `arr[0]`, a method with an argument--unless it's for aesthetic uniformity.
<chintanparikh>
jhass: Think you could help me figure out the format string? My actual header is a little different from the TCP header but I can't figure out the format string