fflush changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste > 3 lines of text on pastebin.com
<swarley>
I am a computer
<harushimo>
nice
lggr has quit [Ping timeout: 245 seconds]
JonnieCache has quit [Ping timeout: 260 seconds]
vitoravelino is now known as vitoravelino`afk
<Spooner>
swarley : I thought you were a sleazy guy who used to be a boy doctor, but I live and learn.
<swarley>
I'm actually 16, hoping to be a computer science major.
nari has quit [Ping timeout: 246 seconds]
blinkerror has joined #ruby
`brendan has joined #ruby
<Spooner>
I thought you had to be over 30 to be allowed into IRC? Damn!
Goles has quit [Ping timeout: 245 seconds]
<swarley>
Nope, most places just require 13
lggr has joined #ruby
v0n has quit [Ping timeout: 246 seconds]
<blazes816>
swarley: make sure the CS program is good, and not just a piece of money sucking crap
<Spooner>
Most places are wrong.
<swarley>
blazes816; i plan on going to MIT or VT
<swarley>
GT maybe
<blazes816>
eh, those are decent
<blazes816>
:p
<swarley>
MIT, decent?
<swarley>
lol
stephenjudkins has quit [Quit: stephenjudkins]
<pmros>
Standford?
<blazes816>
good luck man. I wish I could've gone to mit. but i D'ed my way through highschool
<harushimo>
Illinois
<blazes816>
l
<harushimo>
really good CS program
stephenjudkins has joined #ruby
<harushimo>
engineering school in general is good
stephenjudkins has quit [Client Quit]
<swarley>
I'm working on my 7th AP class in my junior year, i've got a pretty good track record of A-B average and advanced science and math credits
<pmros>
but do you like ruby?
<swarley>
Of course
<pmros>
this is the question
<swarley>
What? Lol
<pmros>
I'm glad to read this answer
fyolnish has quit [Remote host closed the connection]
<pmros>
I'm developing a ruby repl
Jamone has quit [Ping timeout: 244 seconds]
<harushimo>
ruby is awesome
hsbt_away is now known as hsbt
roadt has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
<pmros>
yes, it ts
<pmros>
it's a gui repl
<harushimo>
its a good programming. I put as equal to python(I learned that too)
<pmros>
it's called troshka
erichmenge has joined #ruby
<harushimo>
nice
zeromodu_ has joined #ruby
zeromodulus has quit [Ping timeout: 265 seconds]
bricker_ has quit [Ping timeout: 245 seconds]
<pmros>
I think you could like it
AwesomeGarethMan has quit [Read error: Operation timed out]
AwesomeGarethMan has joined #ruby
_nitti has joined #ruby
<pmros>
well... I need some feedback
<pmros>
I guess
<pmros>
sorry
kalleth has quit [Read error: Operation timed out]
kalleth has joined #ruby
rburton- has joined #ruby
lggr has joined #ruby
elico has joined #ruby
freakazoid0223 has joined #ruby
<Spooner>
harushimo : You've barely scratched the surface of Ruby though, to be fair.
<swarley>
Yeah
<swarley>
Until you've hit metaprogramming classes that do metaprogramming... You havn't gone all the way in
zeromodu_ has quit [Ping timeout: 252 seconds]
_nitti has quit [Ping timeout: 240 seconds]
<blazes816>
if you're not monkey patching your entire rack app onto a symbol called :rack_app, you're not really a programmer
<swarley>
lol
<swarley>
'd
<ElderFain>
I did python before doing ruby..
<swarley>
or that moment when you realize you can one line an entire class
<ElderFain>
I find ruby fits me mentally a bit more, although only in some ways. I really don't like people that call ruby methods without () (and use spaces instead)
<blazes816>
and you do it because you can
<blazes816>
yeah, ruby has some warty areas but python blows chunks
<kyletcarey>
I'm new to Ruby and am writing a usd/euro converter for practice. Ran into an issue where I can't get it to print the value before the program quits. Any asssistance would be appreiciated. http://pastebin.com/NdyL8jWm
ryanlecompte has quit [Remote host closed the connection]
mparodi has joined #ruby
mparodi_ has quit [Quit: Leaving]
joofsh has quit [Remote host closed the connection]
cardoni has quit [Quit: cardoni]
prtksxna_ has joined #ruby
prtksxna has quit [Read error: Connection reset by peer]
joeycarmello has joined #ruby
dmiller has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
DrShoggoth has joined #ruby
duracrisis has quit [Ping timeout: 246 seconds]
DrShoggoth has quit [Read error: Connection reset by peer]
lggr has joined #ruby
<waxjar>
kyletcarey, when you call gets it includes a newline (e.g. "euro/n"), so type == "euro" fails
<waxjar>
you can fix that by calling strip on type (gets.downcase.strip)
tjwallace has joined #ruby
justinmcp has joined #ruby
Tearan has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
justinmcp has quit [Ping timeout: 252 seconds]
irleif has joined #ruby
bperry has quit [Quit: oh shit's going down]
lggr has joined #ruby
<kyletcarey>
waxjar, that makes sense. Thanks!
_nitti has joined #ruby
Nisstyre has quit [Ping timeout: 260 seconds]
xpen has quit [Remote host closed the connection]
<kyletcarey>
waxjar, is that basically the same thing as gets.chomp.downcase?
xpen has joined #ruby
justinmcp has joined #ruby
krz has joined #ruby
<waxjar>
kyletcarey, in this case it is, but strip deletes any prefixed and trailing whitespace, including spaces, tabs, etc
_nitti has quit [Ping timeout: 246 seconds]
seoaqua has joined #ruby
icole has quit [Remote host closed the connection]
adeponte has quit [Remote host closed the connection]
dblandin has joined #ruby
jord has quit [Ping timeout: 246 seconds]
lggr has quit [Ping timeout: 260 seconds]
_jesse_ has quit [Ping timeout: 246 seconds]
xpen_ has joined #ruby
dblandin has quit [Client Quit]
<kyletcarey>
waxjar, So strip would be the better choice because I'm just looking for an integer as apposed to if I were trying to get a string? Just for newbie clariafication... ;P
rburton- has joined #ruby
jord has joined #ruby
glyytchy has quit [Quit: Leaving...]
Norrin has quit [Ping timeout: 246 seconds]
tjwallace has left #ruby [#ruby]
<kyletcarey>
waxjar, wait a second, I understand. Haha.
blazes816 has quit [Quit: blazes816]
<waxjar>
it won't matter much i think, strip is a bit more fault tolerant in this case. if you accidentally put a space after euro for example, it would still match
xpen has quit [Ping timeout: 245 seconds]
joeycarmello has quit [Remote host closed the connection]
<waxjar>
with chomp it wouldn't, because type would be "euro "
lggr has joined #ruby
phantasm66 has quit [Quit: *poof*]
<waxjar>
the integer thing is fine btw. ruby figures that out on its own " 1 ".to_i # => 1
jeffreybaird has joined #ruby
<kyletcarey>
Gotcha! Thanks a lot!
<waxjar>
yw :)
jord has quit [Ping timeout: 240 seconds]
Nisstyre has joined #ruby
puts_h3ll0 has joined #ruby
ryanlecompte has joined #ruby
icole has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
iamjarvo has quit [Ping timeout: 245 seconds]
_jesse_ has joined #ruby
kyletcarey has quit [Quit: Lost terminal]
lggr has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
ananthakumaran has joined #ruby
mikepack has joined #ruby
k_89 has joined #ruby
jord has joined #ruby
puts_h3ll0 has left #ruby [#ruby]
sagax has quit [Quit: Ухожу я от вас]
Norrin has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
irleif has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
horofox has quit [Read error: Connection reset by peer]
horofox has joined #ruby
seoaqua has quit [Ping timeout: 255 seconds]
haxrbyte has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
k_89 has quit [Ping timeout: 245 seconds]
lggr has joined #ruby
adeponte has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
justinmcp has quit [Remote host closed the connection]
tjbiddle has joined #ruby
haxrbyte has quit [Remote host closed the connection]
cakehero has quit [Quit: Computer has gone to sleep.]
chichou has joined #ruby
Axsuul has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
hsbt is now known as hsbt_away
lggr has quit [Ping timeout: 240 seconds]
manizzle has quit [Remote host closed the connection]
gmci has quit [Quit: Computer has gone to sleep.]
saschagehlich has joined #ruby
bradleyprice has quit [Remote host closed the connection]
mneorr has quit [Remote host closed the connection]
prtksxna has joined #ruby
baphled has quit [Ping timeout: 260 seconds]
mneorr has joined #ruby
nilg has joined #ruby
hsbt_away is now known as hsbt
lggr has joined #ruby
bapa has quit [Ping timeout: 246 seconds]
omry has joined #ruby
Shipow has quit [Quit: Leaving...]
cezar has joined #ruby
cezar has quit [Client Quit]
Markvilla has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
Markvilla has quit [Client Quit]
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
lggr has joined #ruby
lukaszk_afk has joined #ruby
lukaszk_afk has left #ruby [#ruby]
fphilipe has quit [Ping timeout: 246 seconds]
monkegjinni has quit [Read error: Connection reset by peer]
monkegji_ has joined #ruby
lukaszk has joined #ruby
Iszak has joined #ruby
justinmcp has quit [Remote host closed the connection]
etehtsea has quit []
monkegji_ has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
scx has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 252 seconds]
Xeago has joined #ruby
apeiros_ has joined #ruby
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
JonnieCache has joined #ruby
lggr has joined #ruby
jimeh has joined #ruby
_nitti has joined #ruby
Mon_Ouie has quit [Ping timeout: 245 seconds]
Forevernade has joined #ruby
Shipow has joined #ruby
maasha has joined #ruby
_nitti has quit [Ping timeout: 245 seconds]
naquad has joined #ruby
tonini has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
JonnieCache has quit [Ping timeout: 276 seconds]
lggr has joined #ruby
elaptics`away is now known as elaptics
red_ has joined #ruby
<maasha>
iterating over one hash and inserting keys in another hash gives me this: `[]=': can't add a new key into hash during iteration (RuntimeError) ???
<apeiros_>
sounds like you were inserting into the wrong hash…
mohits has quit [Read error: Connection reset by peer]
<Xeago>
does bundle exec rake -V output the same nenadalm__?
<regedarek>
Is any other alternative way to install this package apple-gcc-42 ??
<nenadalm__>
bundle install: Your bundle is complete! It was installed into ./vendor/bundle - whithout changes (rake-0.9.2.2 included)
<Xeago>
regedarek: you're running osx?
lggr has joined #ruby
bigkevmcd has quit [Ping timeout: 276 seconds]
<Xeago>
if so, you already have ruby 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0]
<regedarek>
i installed comand line
<awestroke>
regedarek: get xcode app, download command line tools, compile ruby
<Xeago>
he should have xcode if he followed homebrew advice
<awestroke>
yes
Averna has quit [Quit: Leaving.]
<nenadalm__>
Xeago: bundle exec rake -V: ...database configuration does not specify adapter (ActiveRecord::AdapterNotSpecified)... - but I specified adapter in redmine/config/database.yml...
hemanth has quit [Read error: Connection reset by peer]
<Xeago>
how to achieve :O
waxjar has quit [Ping timeout: 245 seconds]
DarkStar1 has joined #ruby
<hoelzro>
mmfs?
ltsstar has joined #ruby
<Xeago>
memory mapped file system
<hoelzro>
ah =)
<hoelzro>
what for?
chussenot has quit [Quit: chussenot]
<Xeago>
to not have diskio when opening a new shell
<ShiintoRyuu>
for programs to load faster?
dhruvasagar has quit [Ping timeout: 246 seconds]
<Xeago>
for shells to load faster
<Xeago>
it's only about 4mb total
<ShiintoRyuu>
symlinks
<hoelzro>
Xeago: the OS should have your dotfiles in memory caches, then!
<Xeago>
hoelzro: it does not
waxjar has joined #ruby
answer_42 has quit [Quit: WeeChat 0.3.9]
<hoelzro>
why TF not?
<hoelzro>
if they're accessed enough, they should be in FS buffers
<Xeago>
hoelzro: I might not access em enough
<hoelzro>
so create a cronjob that reads them in once a minute ;)
<hoelzro>
</joke>
<Xeago>
don't have cron on osx..
<Xeago>
I considered that tho
<Xeago>
but than I would have 2 locations for loading my shell
reset has joined #ruby
<apeiros_>
Xeago: errr… yes, of course osx has cron
<Xeago>
ramfs, and disk
<Xeago>
hmm
<apeiros_>
that said, launchd is the way to go on osx
<Xeago>
thought it didn't
lggr has quit [Ping timeout: 240 seconds]
<Xeago>
a new shell takes 28 io's when started every 30seconds
<apeiros_>
Xeago: a simple which cron/crontab would've told you
frogprince_mac has joined #ruby
samuel02 has joined #ruby
knirhs has joined #ruby
<ShiintoRyuu>
Xeago: how do you count io's per launch?
tsunamie has joined #ruby
<tsunamie>
save me
* hoelzro
guesses dtrace
<Xeago>
dmesg
lggr has joined #ruby
<tsunamie>
hi there, anyone know about erd?
<hoelzro>
just because 28 IO system calls are occurring doesn't mean each one is going to disk
<hoelzro>
28 IO system calls will occur everytime, memory FS or no
<tsunamie>
ERB
<tsunamie>
sorry
dhruvasagar has joined #ruby
<apeiros_>
tsunamie: don't ask meta-questions.
<Xeago>
I configured dmesg to drop io calls that do not hit the disk
<Xeago>
if I start within a second
<Xeago>
let's say 100/second
<Xeago>
I get 0 to 2 io
fphilipe has joined #ruby
<tsunamie>
I am trying to create a template for puppet using the ERB standards and I ahve so far cobbeled togeather the following template http://pastebin.com/8JjU7ZYE
hemanth has joined #ruby
<tsunamie>
the problem I have is that for searcha nd ns I want to assign default values like I have with domain
Hanmac has quit [Ping timeout: 255 seconds]
mohits has joined #ruby
<tsunamie>
however I do not know how to do this for the array values in searchpath and ns
<tsunamie>
can someone help me with this?
elico has joined #ruby
Rydefalk_ has quit []
<apeiros_>
tsunamie: you mean if e.g. nameservers is empty, you still want at least a default one listed?
Rydefalk has joined #ruby
<tsunamie>
no
<tsunamie>
sorry I did'nt make myself clear
<tsunamie>
just the name server
saschagehlich has joined #ruby
<apeiros_>
tsunamie: has_variable? is neither ruby nor erb, sounds more like a puppet thing
lggr has quit [Ping timeout: 256 seconds]
<tsunamie>
sorry ment to say if no value is detected for nameserver that one is provided by default
<tsunamie>
don't need to worry about searchpath
rippa has joined #ruby
mohits has quit [Read error: Connection reset by peer]
<apeiros_>
I can't make sense of "no value is detected for nameserver"
<apeiros_>
still sounds to me like "the nameservers array is empty"
<tsunamie>
humm... If no value is detected for nameservers I provide one
<tsunamie>
as a default value other wise use the array provided
haxrbyte has joined #ruby
rb2k has joined #ruby
<rb2k>
Hey, I recall having read a blogpost at some point that talked about the design decision of making active record a class vs a mixin
<rb2k>
and that it might have been a mistake
<rb2k>
but I can't seem to find that post anywhere
lggr has joined #ruby
<rb2k>
anybody got an idea what I could have read?
JohnBat26 has quit [Remote host closed the connection]
margle has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
haxrbyte_ has quit [Ping timeout: 245 seconds]
otters has joined #ruby
krz has quit [Quit: krz]
tk__ has joined #ruby
seanwash has quit [Client Quit]
margle has joined #ruby
GoGoGarrett has joined #ruby
elsifaka has quit [Quit: Veloma e!]
Jork1 has joined #ruby
<shevy>
guys in a normal english sentence
<shevy>
the ? ! and . character
<shevy>
how do you call that? punctuation mark?
<_7894>
Punctuation
nari has joined #ruby
mmitchell has joined #ruby
<zii>
Can you curry the _2nd_ argument in a proc?
lggr has quit [Ping timeout: 252 seconds]
<_7894>
shevy: question mark, exclamation mark, period
RJ3000_ has joined #ruby
gmurphey has joined #ruby
<_7894>
/full stop
<A124>
zii: curry? Where's the chicken?
<shevy>
ok
<ddd>
i can stand curry only in small doses. Don't eat out at many Indian restaurants because they always *drown* most of the food in curry. A light curry sauce though is mmmm mmmm good
monkegjinni has quit [Read error: No route to host]
lggr has joined #ruby
monkegjinni has joined #ruby
samphippen has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
Servidorv has quit [Ping timeout: 260 seconds]
monkegjinni has joined #ruby
morozovm has quit [Read error: Connection reset by peer]
<zii>
ddd, A124: I'm talking about Proc#curry.
robotmay has quit [Read error: Connection reset by peer]
morozovm has joined #ruby
<ddd>
hahaha, my bad :)
robotmay has joined #ruby
<Axsuul>
Is there any way for a method to handle.. a, b = some_method, and a = some_method ?
<Axsuul>
Oops, is there any way for a method to return results like that*
<A124>
zii: Anyway, I don't get your question. Can you rephrase?
<Mon_Ouie>
Ruby doesn't have multiple return values, just some syntax to deconstruct arrays
<A124>
Axsuul: Exacly, return into an array than work with that
jrist-afk is now known as jrist
<Axsuul>
I recall there might be a way with splatting?
<Mon_Ouie>
Therefor if some_method returns an array, in your first example, a and b will respectively be the first and second item, while in the second one, a will be the whole array
<Mon_Ouie>
If you want a to be only the first item, use some_method.first, or, perhaps more confusingly, "a, = some_method"
blitzrage has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
<A124>
What about "a, _ = some_method"
peneconleche has joined #ruby
mercwithamouth has joined #ruby
<Mon_Ouie>
well, that's the same thing, with a useless variable (that the compiler will let you ignore without warnings, though)
<apeiros_>
a,b = foo # invokes to_a on the return value of foo if it isn't already an array
<apeiros_>
a,b = *foo # invokes to_ary on the return value of foo, if it isn't already an array
vlad_starkov has quit [Remote host closed the connection]
Servidorv has joined #ruby
ryannielson has joined #ruby
<blitzrage>
hey all, silly question. I want to access a nested hash using .each. Am I right in that something like: ohai = { "foo" => { "bar" => "baz" } } is valid, and would be accessed with something like: ohai.each do |f, b, z|
<apeiros_>
but the method foo itself does not and can not know whether its return value is being assigned to a single variable or a list.
Takehiro has quit [Remote host closed the connection]
<apeiros_>
blitzrage: no, you're mistaken
<apeiros_>
blitzrage: also: irb
<apeiros_>
or rather: pry
theRoUS has joined #ruby
lggr has joined #ruby
SmoothSage_ has joined #ruby
erichmenge has joined #ruby
<Mon_Ouie>
Are you using it now? ;)
SmoothSage__ has quit [Ping timeout: 245 seconds]
morozovm has quit [Read error: Connection reset by peer]
morozovm has joined #ruby
peneconleche has quit [Quit: Leaving...]
d-snp has quit [Ping timeout: 244 seconds]
d-snp has joined #ruby
ryannielson has quit [Quit: ryannielson]
ryannielson has joined #ruby
morozovm has quit [Read error: Connection reset by peer]
<shevy>
A124 if it would be english language yeah, but code contains some logic parts, and decisions that one made before, and when it breaks you are left with something that is no longer working, whereas in literature you have more freedom to rearrange content into sentences
<shevy>
yeah Mon_Ouie
<Mon_Ouie>
That explains why I see you everwhere :p
<waxjar>
doesn't work for Hashes unfortunately
chimay has joined #ruby
<A124>
shevy: Test suite, testcase
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
<Spooner>
waxjar : Well, yes, but that is "begging it to" a bit ;)
SCommette has joined #ruby
originerd has quit [Quit: Originerd]
mohits_ has quit [Ping timeout: 244 seconds]
Neomex has joined #ruby
<shevy>
A124 that is even more code to handle
<waxjar>
ah, ok. do you know a way for Hashes?
nwertman has quit [Ping timeout: 245 seconds]
nateberkopec has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
<Spooner>
I was really meaning that it ignores nesting, since a nested array/hash is just a value, not something special. But still, your correction is useful.
<Mon_Ouie>
Actually, for arrays, you don't need to "beg it to" (at least not here): [[1,2,3], [4,5,6], [7,8,9]].each { |a,b,c| puts "#{a} #{b} #{c}" } is equivalent to what you wrote.
DrShoggoth has joined #ruby
<Mon_Ouie>
(I somehow think that feature is evil)
flagg0204 has quit [Read error: Connection reset by peer]
<waxjar>
i didn't know that
starship is now known as duracrisis
<Spooner>
Yeah, that is terrible, Mon_Ouie. Wish it didnt' magically do that.
<shevy>
hehe
x82_nicole has joined #ruby
<waxjar>
that could lead to some nasty bugs i reckon, in case you forget to take one of the block arguments off or something
<Spooner>
It does.
Pip__ has joined #ruby
lggr has joined #ruby
Pip has quit [Ping timeout: 255 seconds]
ZubKonst has joined #ruby
quest88 has joined #ruby
ZenGuy311 has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
morozovm has quit [Read error: Connection reset by peer]
morozovm has joined #ruby
jenrzzz has joined #ruby
ZubKonst_ has quit [Ping timeout: 245 seconds]
Tarential has quit [Ping timeout: 260 seconds]
philips_ has quit [Excess Flood]
<Servidorv>
what does "it 'gets post insights' do" means??
philips_ has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
<Servidorv>
is get post insights just a name??
<Mon_Ouie>
It calls the method called "it" on self with a string argument and a block (the block being the do … end part)
<Mon_Ouie>
RSpec uses this syntax to create a test
<Servidorv>
oh ok
<Servidorv>
thanks guys
monkegjinni has joined #ruby
flagg0204 has joined #ruby
lggr has joined #ruby
_bart has joined #ruby
greg-_ has joined #ruby
chussenot has joined #ruby
My_Hearing has joined #ruby
SmoothSage__ has quit [Ping timeout: 245 seconds]
d2dchat has joined #ruby
My_Hearing has quit [Read error: Connection reset by peer]
A124 has quit [Read error: Connection reset by peer]
_7894 has quit [Read error: Connection reset by peer]
jerius has quit [Quit: Computer has gone to sleep.]
erichmenge has quit [Quit: Be back later]
My_Hearing has joined #ruby
Mon_Ouie has quit [Ping timeout: 246 seconds]
My_Hearing is now known as Mon_Ouie
samphippen has joined #ruby
quest88 has quit [Quit: quest88]
asteve has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
izepstan has joined #ruby
x82_nicole has quit [Read error: Connection reset by peer]
Pip__ is now known as Pip
<izepstan>
hi, hello there, very beginner question, what is meant by "Edit your application Gemfile" where is this located and what should it contain, i'm trying to install locomotiveCMS
irleif has joined #ruby
x82_nicole has joined #ruby
<waxjar>
Gemfile is a part of Bundler, it's called Gemfile and it's located in your project root
zmisc has left #ruby [#ruby]
A124 has joined #ruby
bluOxigen has quit [Ping timeout: 245 seconds]
slainer6_ has joined #ruby
Tarential has joined #ruby
monkegjinni has quit [Read error: No route to host]
monkegjinni has joined #ruby
lggr has joined #ruby
hotovson_ has quit [Remote host closed the connection]
AxonetBE has quit [Quit: Leaving.]
mohits has quit [Ping timeout: 245 seconds]
slainer68 has quit [Ping timeout: 272 seconds]
mmitchell has quit [Remote host closed the connection]
Uranio has quit [Ping timeout: 252 seconds]
kil0byte has quit [Remote host closed the connection]
Aristata has quit [Quit: Leaving.]
kil0byte has joined #ruby
rabidpraxis has joined #ruby
Aristata has joined #ruby
philcrissman has quit [Remote host closed the connection]
jerius has quit [Quit: Computer has gone to sleep.]
cwang has joined #ruby
pmros_ has joined #ruby
sagax has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
rabidpraxis has quit [Remote host closed the connection]
mikalv has joined #ruby
shadoi has joined #ruby
Takehiro has quit [Ping timeout: 276 seconds]
jgrevich has joined #ruby
adeponte has joined #ruby
Iszak has quit [Quit: User has gone to sleep.]
Tarential has joined #ruby
mneorr_ has left #ruby [#ruby]
Xeago has quit [Ping timeout: 260 seconds]
pmros has quit [Ping timeout: 248 seconds]
advorak has quit [Quit: This computer has gone to sleep]
binaryplease has quit [Quit: WeeChat 0.3.9]
joshman_ has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
thedeadghost has joined #ruby
Synthead has joined #ruby
alvaro_o has joined #ruby
erichmenge has quit [Quit: Be back later]
dinamicex1 has joined #ruby
samphippen has joined #ruby
KevinSjoberg has joined #ruby
aganov has quit [Remote host closed the connection]
netzapper has joined #ruby
<ddd>
hrmm, if there is a gem loaded, is there a programmatic way I can unload it? say, for instance, I have dtf loaded, and I want to remove it completely if Gem.loaded_specs['dtf-skeleton']dependencies shows its loaded?
chichou_ has joined #ruby
<netzapper>
I have a block that's defined inside an object, and which is then instance_exec'd inside another object. Is there some way that I can refer to the instance variables of the *enclosing scope* instead of the executing instance scope? (Right now, I do 'some_local_var = @some_instance_var' so that I can refer to the variable by local name in the block.)
chussenot has quit [Quit: chussenot]
lggr has quit [Ping timeout: 255 seconds]
<dinamicex1>
Hi, I have an multidimensional array meals = [ ["peanuts", "P"], ["salad", "S"] ] and want to extract the second column["P", "S"]. I tried something in the console but it wouldn't work.
<yxhuvud>
netzapper: please don't do stuff like that. there are some libraries that does it and it make finding errors a nightmare since you have no idea what scope something is evaluated in
<netzapper>
yxhuvud: Eh, it makes my DSL much, much easier to use if you can define action blocks in controller scope from inside of an FX script. So, don't hack on my game, and you won't have to see it. :)
Monie has joined #ruby
<workmad3>
netzapper: in addition - no, you can't do that. If you want to be able to do that don't change the object context
reuf has joined #ruby
<netzapper>
workmad3: okay, cool.
<netzapper>
thanks!
chichou has quit [Ping timeout: 260 seconds]
<workmad3>
netzapper: the nicer way to do that would be to pass in an object to the block that you can work on
lggr has joined #ruby
Guest89985 has quit [Quit: WeeChat 0.3.9]
<workmad3>
netzapper: if you want to support both, you can ask the block how many arguments it takes... it it takes an argument, you pass in the object and don't change context, if it doesn't take an argument then you don't pass in a block and do change context
chrishunt has joined #ruby
pmros__ has joined #ruby
ryanlecompte has quit [Remote host closed the connection]
friskd has joined #ruby
roadt has quit [Ping timeout: 245 seconds]
<netzapper>
workmad3: eh, the problem is that there is no clear object that would be passed in. It's a DSL for special effects scripting in a game... so, I may have on controller block updating six different objects in the scene graph, not one of which is the actual enclosing object context. Furthermore, then I lose access to all the convenience functions inside the controller class itself.
monkegji_ has quit [Ping timeout: 252 seconds]
<workmad3>
netzapper: sure there is
cantonic_ has joined #ruby
<workmad3>
netzapper: whatever object you're calling instance_eval on
timmow has quit [Quit: has left the building]
pmros_ has quit [Read error: Operation timed out]
monkegjinni has joined #ruby
chussenot has joined #ruby
<workmad3>
netzapper: and if things are really that complex then I'd humbly suggest that you're DSL-ifying things too soon
<workmad3>
netzapper: your DSL should really be a thin, simple layer on top of well-engineered easy-to-use code, so that the DSL is simply some nice syntax sugar
<workmad3>
netzapper: if the DSL is the only thing making your code usable, you have an issue
cakehero has quit [Quit: Computer has gone to sleep.]
icooba has quit [Quit: Computer has gone to sleep.]
originerd has joined #ruby
cantonic has quit [Ping timeout: 248 seconds]
cantonic_ is now known as cantonic
originerd has quit [Client Quit]
zz_chrismcg is now known as chrismcg
<netzapper>
nah, the DSL is a wrapper on top of a reasonably well-engineered cueing/chaining system. And the Java library all of this sits on top of is pretty decent too. I just preferred to use a block and dynamic controllers instead of requiring the user to subclass controllers every time. ::shrug::
hiroyuki has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 260 seconds]
<netzapper>
especially since most of the controllers action code often winds up just moving around parameters from various interpolators.
monkegjinni has quit [Remote host closed the connection]
no_worries has quit [Remote host closed the connection]
<workmad3>
sounds weirdly magical and prone to headaches...
dhruvasagar has quit [Ping timeout: 245 seconds]
roadt has joined #ruby
<netzapper>
ehhh... it is annoyingly magical. And definitely not useful beyond this project. But, it's surprisingly headache free... and I almost never *need* to move things from instance to local context. Usually, the actionable objects are local scope when the controller block is created. It's really just for preloaded assets that this becomes an issue, since they preload in a separate method from building the FX.
mercwithamouth has joined #ruby
no_worries has joined #ruby
lggr has joined #ruby
nwertman has joined #ruby
nwertman has quit [Client Quit]
<netzapper>
I was really just hoping there was some sort of explicit scope resolution possibility I was missing (like C++'s ParentClass::overriddenMethod scope resolution). But, if there isn't, I'll just endeavor to minimize how much hokeypokey I've gotta do.
twoism has joined #ruby
twoism has quit [Remote host closed the connection]
_md has joined #ruby
sn0wb1rd has joined #ruby
Uranio has quit [Quit: WeeChat 0.3.8]
thedeadghost has quit [Ping timeout: 252 seconds]
greg-_ has quit [Quit: greg-_]
bluOxigen has joined #ruby
senny has quit [Remote host closed the connection]
<JonnieCache>
will you still understand it if you dont look at it for a year though?
aldodelgado has quit [Quit: aldodelgado]
syamajala has joined #ruby
Xeago has joined #ruby
mercwithamouth has quit [Ping timeout: 246 seconds]
lggr has quit [Ping timeout: 276 seconds]
havenn has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 245 seconds]
Mon_Ouie has quit [Ping timeout: 245 seconds]
<Xeago>
edge so slow
slainer6_ has quit [Remote host closed the connection]
_md has quit [Quit: Leaving...]
tjbiddle has joined #ruby
erichmenge has joined #ruby
sneakyness_wk has joined #ruby
lggr has joined #ruby
jenrzzz has joined #ruby
tjbiddle has quit [Remote host closed the connection]
tjbiddle has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
jrist is now known as jrist-phn
DarkStar1 has left #ruby [#ruby]
rabidpraxis has joined #ruby
Tearan has joined #ruby
slainer68 has joined #ruby
chrismcg is now known as zz_chrismcg
apok has joined #ruby
sn0wb1rd has joined #ruby
<shevy>
complexity is the root cause of all evil in software
skum has quit [Ping timeout: 260 seconds]
linoj has quit [Quit: linoj]
<shevy>
I wonder if we could have a simpler yet better ruby
chichou_ has quit [Remote host closed the connection]
horofox has joined #ruby
Tearan has quit [Quit: Sleepy Badger....]
morozovm has quit [Quit: morozovm]
<Spooner>
netzapper Another Ruby game library? Tell me more. How does it compare with the existing ones (Gosu/Chingu, Gosu/Gamebox, Ray & Rubygame)?
sneakyness_wk has quit [Read error: Connection reset by peer]
sneakyness_wk has joined #ruby
ryanlecompte has joined #ruby
mahmoudimus has joined #ruby
mahmoudimus has quit [Remote host closed the connection]
advorak has joined #ruby
_cheney2 has joined #ruby
shevy has quit [Ping timeout: 240 seconds]
wallerdev has quit [Quit: wallerdev]
lggr has quit [Ping timeout: 265 seconds]
_cheney has quit [Ping timeout: 246 seconds]
_cheney2 is now known as _cheney
cviebrock has joined #ruby
<cviebrock>
total ruby n00b here … how can I solve this error: /Users/cmv/bin/github_issues_to_csv_v3.rb:1:in `require': no such file to load -- octokit (LoadError)
advorak has quit [Client Quit]
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
<cviebrock>
I did sudo gem install octokit already
xyzodiac has quit [Quit: Computer has gone to sleep.]
apeiros_ has quit [Remote host closed the connection]
<AlecTaylor>
Alright, it's almost 5AM here; I'd best grab some sleep
axl_ has quit [Read error: Connection reset by peer]
ohdae has joined #ruby
<cviebrock>
Spooner: thx .. switched to the FasterCSV gem, which supports the same syntax as CSV 1.9.x
axl_ has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
apok has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby
voodoofish430 has joined #ruby
apok has joined #ruby
zigomir has joined #ruby
oldB has quit [Quit: oldB]
<symb0l>
thanks for the tips guys
<symb0l>
I'll check out all these suggestions
arturaz has quit [Read error: Connection reset by peer]
<Spooner>
cviebrock : Ah yes, was just about to suggest using a CSV gem rather than the standard one.
lggr has joined #ruby
<netzapper>
Spooner: it's not a ruby game library. It's an FX scripting language I built for our game (www.justtactics.com). It essentially just exposes a bunch of our Java systems to JRuby in a more ruby-esque manner.
Xeago has joined #ruby
<Spooner>
netzapper Ah right, I see.
<cviebrock>
cool, a few other fixes and it works now
<cviebrock>
thanks Spooner
JohnBat26 has joined #ruby
<Spooner>
Use Ruby 1.9.3 would have worked too ;)
<Spooner>
netzapper : How do you find JRuby as a game scripting language? I mean since Python/Lua/etc are much more common (and obviously CRuby would be a joke if used for in-game scripting)?
wedtm|away is now known as wedtm
Virunga has quit [Remote host closed the connection]
peneconleche has joined #ruby
AlecTaylor has quit [Quit: Leaving.]
sepp2k1 has joined #ruby
sepp2k has quit [Ping timeout: 246 seconds]
lggr has quit [Ping timeout: 255 seconds]
anderse has quit [Quit: anderse]
pmros__ is now known as pmros
<pmros>
Spooner: ruby is nicer
miphe has joined #ruby
irleif has quit [Quit: Computer has gone to sleep.]
chimay has quit [Quit: WeeChat 0.4.0-dev]
<netzapper>
Spooner: I'm actually really digging JRuby for game scripting. My one complaint is that its Java object proxies make it hard for me to debug memory leaks. But, aside from that, I have no issues with it whatsoever. And the Java/Ruby integration is seamless.
Xtreme has joined #ruby
<Xtreme>
update-alternatives: error: alternative /usr/bin/gem1.8 for gem not registered; not setting << how to fix this?
chussenot has joined #ruby
fphilipe has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
<netzapper>
Xtreme: that's a problem in the OS. 'alternatives' is the debian/ubuntu system for having multiple versions of a infrastructure program on the system. Did you install ruby with apt-get, or are you using RVM or similar?
cdzombak has joined #ruby
harryheintz has joined #ruby
<Xtreme>
netzapper, yes i have ruby 1.9 and 1.8 installed
<netzapper>
Xtreme: using apt, or using rvm?
irleif has joined #ruby
<Xtreme>
synaptics
peneconleche has quit [Ping timeout: 240 seconds]
harryheintz has quit [Client Quit]
<netzapper>
Xtreme: okay. 'rubygems' is a separate package in ubuntu from the base ruby install. Search for it in synaptic and install the one you want.
<reactormonk>
I've got elements with a set of features each - how would you find which features distinguish one set from another?
NimeshNeema has joined #ruby
bluenemo has quit [Remote host closed the connection]
RubyRails has joined #ruby
<RubyRails>
Does anyone know of a good tutorial for MacRuby? The one on the website seems too old to work with Xcode 4.5.1
lggr has joined #ruby
kirun has joined #ruby
notbrent has joined #ruby
jonasac has joined #ruby
anderse has quit [Quit: anderse]
arietis has joined #ruby
mwilson` has quit [Excess Flood]
mwilson` has joined #ruby
bradleyprice has quit [Remote host closed the connection]
haxrbyte has quit [Ping timeout: 248 seconds]
adamkittelson has quit [Ping timeout: 245 seconds]
iaj_ has quit [Ping timeout: 244 seconds]
lggr has quit [Ping timeout: 256 seconds]
iaj has joined #ruby
dkannan has joined #ruby
cwang has quit [Remote host closed the connection]
kaichanvong has joined #ruby
pothibo has quit [Quit: pothibo]
one8zero has joined #ruby
jasond has quit [Ping timeout: 245 seconds]
ryanf has quit [Quit: leaving]
lggr has joined #ruby
gazler has quit [Read error: No route to host]
ryanf has joined #ruby
freerobby has joined #ruby
workmad3 has joined #ruby
kapowaz has joined #ruby
dnyy has joined #ruby
Kudos has quit [Ping timeout: 248 seconds]
jenrzzz has joined #ruby
peneconleche is now known as peneconleche|awa
Kudos has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
SirRamonGabriel has quit [Remote host closed the connection]
Tarential has quit [Ping timeout: 255 seconds]
axl_ has joined #ruby
nwertman has quit [Quit: nwertman]
Jork1 has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
hotovson_ has quit [Remote host closed the connection]
lggr has joined #ruby
Kudos has quit [Ping timeout: 248 seconds]
sailias has quit [Quit: Leaving.]
jenrzzz has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
Kudos has joined #ruby
FifthWall has joined #ruby
symb0l has quit [Read error: Operation timed out]
lggr has quit [Ping timeout: 245 seconds]
Uranio has joined #ruby
hoelzro|away is now known as hoelzro
margle has joined #ruby
margle has quit [Client Quit]
carlyle has joined #ruby
Xeago has joined #ruby
lggr has joined #ruby
nanderoo has left #ruby [#ruby]
jenrzzz has quit [Ping timeout: 240 seconds]
elaptics`away is now known as elaptics
rabidpraxis has joined #ruby
eldarik has quit []
lggr has quit [Ping timeout: 245 seconds]
Banistergalaxy has quit [Ping timeout: 272 seconds]
<_bart>
so I have this [#<Tag id: 1, name: "athlete", created_at: "2012-10-12 20:06:57", updated_at: "2012-10-12 20:06:57">] , how do I get the 'name'? I tried .name, but that gets 'Tag'.
saschagehlich has quit [Quit: saschagehlich]
Banistergalaxy has joined #ruby
Kudos has quit [Ping timeout: 248 seconds]
adamkittelson has joined #ruby
<RubyRails>
object[0][:name]
<_bart>
ah yeah, thanks
<RubyRails>
:)
<waxjar>
the [] indicate your tag is in an Array
<_bart>
I was missing the [0], I see it's an array
<_bart>
thanks
lggr has joined #ruby
<_bart>
rails is so easy, but I'm really hitting walls now and then
<waxjar>
alternatively you could use object.first.name
<_bart>
yes I prefer .first
Kudos has joined #ruby
<invisime>
_bart: if you are getting 'Tag' when you call the 'name' method, you're calling it on the Tag class instead of on your tag instance. hope that helps. :-)
adamkittelson has quit [Remote host closed the connection]
ForevernadeAFK has joined #ruby
saac has joined #ruby
<_bart>
invisime: yes I was seeing it like XML, calling name gives you the root node name.
dnstbr has quit [Quit: Computer has gone to sleep.]
ABK has quit [Ping timeout: 240 seconds]
carlyle has quit [Remote host closed the connection]
JonnieCache has joined #ruby
<hvq>
hi, after I create a resource with DataMapper, how can I convert it to JSON text?
lggr has joined #ruby
yxhuvud has quit [Ping timeout: 246 seconds]
<invisime>
hvq: call to_json?
billyoc has quit [Ping timeout: 260 seconds]
krz has joined #ruby
<hvq>
invisime: any library needed for that method to work?
<blazes816>
require 'json'
Xtreme has quit [Quit: Leaving]
Takehiro has quit [Ping timeout: 276 seconds]
<hvq>
invisime: I have an article resource of the Article model, and it returns something like this --- "#<Article:0x8685634>" ----
<yaymukund>
hvq: also see the difference between as_json and to_json
<yaymukund>
hvq: as_json might be more appropriate in thsi case, not sure
<invisime>
hvq: you'll need the json gem.
CaptainKnots has joined #ruby
CaptainKnots has quit [Changing host]
CaptainKnots has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
CaptainKnots has quit [Client Quit]
irleif has joined #ruby
CaptainKnots has joined #ruby
CaptainKnots has quit [Changing host]
CaptainKnots has joined #ruby
<hvq>
invisime: I installed the json gem and I think the to_json function returns something: "#<Article:0x872bf5c>". Look like it's the address of @article resource. I think there maybe something wrong with my function usage
krawchyk has quit [Remote host closed the connection]
Virunga has quit [Remote host closed the connection]
<invisime>
hvq: try irb?
<hvq>
invisime: can you elaborate it? I am new to ruby :P
<invisime>
hvq: on the command line of your development machine, type 'irb'.
<invisime>
this will let you enter an interactive terminal where you can test out things like this.
lggr has joined #ruby
<hvq>
invisime: oh yeah, totally forget that command :-|. But I think the to_json function works well with a simple data stucture like an array. Can you confirm if I called to_json correctly in the piece of code above?
symb0l has joined #ruby
<invisime>
hvq: it seems like you called it correctly. but like yaymukund said, you might want to use as_json instead. I'm not well-read on the differences between the two.
<hvq>
invisime: hmm, ok, thank you.
hoelzro is now known as hoelzro|away
_kW has joined #ruby
JonnieCache has quit [Ping timeout: 252 seconds]
_kW is now known as Guest47540
ABK has joined #ruby
Elise24 has joined #ruby
Elise24 has quit [Client Quit]
swarley has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
saac has quit [Ping timeout: 248 seconds]
jrist-gym is now known as jrist
CaptainJet has joined #ruby
kaawee has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 246 seconds]
reset has joined #ruby
kpshek has quit []
LineByLine has joined #ruby
cardoni has quit [Quit: cardoni]
gmurphey has quit [Ping timeout: 260 seconds]
bradleyprice has joined #ruby
lggr has joined #ruby
cardoni has joined #ruby
Servidorv has joined #ruby
ABK has quit [Read error: Connection reset by peer]
dmerrick has quit [Quit: dmerrick]
ABK has joined #ruby
Quintus_q has quit [Ping timeout: 245 seconds]
dmerrick has joined #ruby
dmerrick has quit [Client Quit]
thmzlt has quit [Remote host closed the connection]
dmerrick has joined #ruby
dmerrick has quit [Client Quit]
Servidorv has quit [Read error: Connection reset by peer]
ABK has quit [Read error: Connection reset by peer]
glupo has quit [Remote host closed the connection]
ABK has joined #ruby
ckrailo has joined #ruby
peneconleche|awa has quit [Ping timeout: 255 seconds]
thmzlt has joined #ruby
lggr has quit [Ping timeout: 276 seconds]
banseljaj is now known as imami|afk
jeffreybaird has joined #ruby
netzapper has quit [Quit: Leaving]
kpshek has joined #ruby
Servidorv has joined #ruby
DrShoggoth has quit [Quit: Leaving]
jenrzzz has joined #ruby
jenrzzz has quit [Client Quit]
<hvq>
invisime: found the answer, we have to use the json provided by dm-serializer
nyrb has joined #ruby
lggr has joined #ruby
jenrzzz has joined #ruby
futilegames has joined #ruby
<invisime>
hvq: ah. ok. :-)
futilegames has quit [Client Quit]
sent-hil has quit [Remote host closed the connection]
Virunga has joined #ruby
_JamieD_ has quit [Quit: _JamieD_]
Morkel has quit [Quit: Morkel]
Virunga has quit [Remote host closed the connection]
ziffa has quit [Quit: Leaving.]
wedtm is now known as wedtm|away
ForevernadeAFK is now known as Forevernade
pothibo has joined #ruby
wedtm|away is now known as wedtm
pothibo has quit [Client Quit]
lggr has quit [Ping timeout: 252 seconds]
smp has joined #ruby
krz has quit [Quit: krz]
irleif has quit [Quit: Computer has gone to sleep.]
pothibo has joined #ruby
awestroke has quit [Remote host closed the connection]
ZubKonst_ has joined #ruby
hoelzro|away is now known as hoelzro
Guest47540 is now known as kaawee
lggr has joined #ruby
ZubKonst has quit [Ping timeout: 245 seconds]
<smp>
Can someone suggest me a good book/site for learning Ruby
ABK has quit [Read error: Connection reset by peer]
<philcrissman>
wmoxam: I should try David Brady's approach; monkey-patch Ruby so that the tests all pass, without fixing the tests.
<wmoxam>
haha
<wmoxam>
yeah, I saw that
Servidorv has quit [Ping timeout: 260 seconds]
<philcrissman>
smp: If it's a book you want, David A. Black's "Well Grounded Rubyist" is a good book that would take you from zero to knowing Ruby very well. The Pickaxe book is a good reference, you'll probably want it around at some point.
marcux has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
bbttxu_ has quit [Quit: bbttxu_]
vlad_starkov has quit [Ping timeout: 245 seconds]
sepp2k1 has quit [Remote host closed the connection]
Coolhand_ has joined #ruby
Coolhand_ has quit [Read error: Connection reset by peer]
irleif has joined #ruby
swarley has quit [Ping timeout: 240 seconds]
ZubKonst has joined #ruby
<smp>
Thanks philcrissman. I would love a book. I was intending to buy learn ruby the hard way by Zed Shaw.
<philcrissman>
smp: That's probably good as well, I haven't read it.
zmo_ has quit [Quit: Leaving]
<werdnativ>
Is there a way to access a file's DATA (stuff after __END__) within a Rakefile?
ziffa has joined #ruby
zmo_ has joined #ruby
<smp>
@philcrissman : Well, It gives a real hands on session. Type, refactor learn. Thats the procedure followed in the book
lggr has joined #ruby
Hanmac has quit [Ping timeout: 244 seconds]
<ziffa>
hi all
Servidorv has joined #ruby
Ankhers has quit [Remote host closed the connection]
Dawne has quit [Read error: Connection reset by peer]
<philcrissman>
smp: like I said, it's probably good. Whatever you think will help you learn. :)
Dawne has joined #ruby
<werdnativ>
or in a Capfile? These files are actually evaluated in another context so I'm wondering if there's a way to read the DATA section from them.
<smp>
:)
chin-tastic has joined #ruby
ABK has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 265 seconds]
ABK has joined #ruby
lazyPower has quit [Remote host closed the connection]
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
ABK has quit [Read error: Connection reset by peer]
Takehiro has joined #ruby
lggr has joined #ruby
SJr has quit [Excess Flood]
SJr has joined #ruby
SJr has quit [Excess Flood]
heftig has quit [Quit: leaving]
heftig has joined #ruby
<pskosinski>
Is there any one-liner which will split "a b c d e" into ["a b c d", "e"]? ^^
SJr has joined #ruby
tchebb1 has quit [Quit: Leaving.]
sent-hil has joined #ruby
invisime has quit [Quit: Leaving.]
Takehiro has quit [Ping timeout: 272 seconds]
h4mz1d has joined #ruby
philcrissman has quit [Remote host closed the connection]
nwertman has joined #ruby
<asteve>
pskosinski: one_liner = "a b c d e".split(" ")[4] will give you the last element
lggr has quit [Ping timeout: 245 seconds]
jhubert has joined #ruby
Araxia has joined #ruby
<jhubert>
Hello. Does anyone know how to use guard and minitest to test a single ruby file?
<pskosinski>
asteve: Thank you
tchebb has joined #ruby
<blazes816>
a, b = my_ary[0..-2], my_ary[-1]
<blazes816>
will split it into two like you had
xyzodiac has quit [Ping timeout: 245 seconds]
timonv has joined #ruby
williamcotton has joined #ruby
anderse has quit [Quit: anderse]
lggr has joined #ruby
horofox has quit [Quit: horofox]
<asteve>
"a b c d e" is a string, unless pskosinski meant to use an array that won't work
cardoni has quit [Quit: cardoni]
<blazes816>
lol, good call my friend
<blazes816>
I forgot the split
kpshek has quit []
GoGoGarrett has quit [Remote host closed the connection]
jenrzzz has joined #ruby
anderse has joined #ruby
kpshek has joined #ruby
asteve has quit []
erichmenge has joined #ruby
iamjarvo has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 272 seconds]
iamjarvo has joined #ruby
bbttxu_ has joined #ruby
jgarvey has quit [Quit: Leaving]
lggr has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
Serial_Killer_C has quit [Remote host closed the connection]
xyzodiac has joined #ruby
jimeh has joined #ruby
<pskosinski>
Well, there is variable number of spaces ^^ So I don't see simple way...
mmitchel_ has quit [Remote host closed the connection]
cdzombak has quit []
servidorv_ has joined #ruby
irleif has quit [Quit: Computer has gone to sleep.]
symb0l has quit [Remote host closed the connection]
gmurphey has joined #ruby
daniel_- has quit [Read error: Connection reset by peer]
Servidorv has quit [Ping timeout: 265 seconds]
daniel_- has joined #ruby
<pskosinski>
I have to do something more anyway, so maybe better I will just do it in long but simple way, thank you 8)
mohits has quit [Ping timeout: 248 seconds]
lggr has quit [Ping timeout: 245 seconds]
<pskosinski>
I just have lines like "abc (1.2.3.4)" and want to sort list using IPs. ^^
xyzodiac has quit [Read error: Connection reset by peer]
Serial_Killer_C has quit [Remote host closed the connection]
tchebb has joined #ruby
mercwithamouth has quit [Ping timeout: 246 seconds]
Virunga has joined #ruby
parzorep has joined #ruby
bluOxigen has quit [Ping timeout: 245 seconds]
ForevernadeAFK has joined #ruby
lggr has quit [Ping timeout: 272 seconds]
verto|off is now known as verto
peregrine81 has quit [Quit: Computer sleeping.]
Forevernade has quit [Ping timeout: 246 seconds]
swaits has joined #ruby
lggr has joined #ruby
havenn has joined #ruby
mercwithamouth has joined #ruby
alanp has quit [Read error: Connection reset by peer]
<Spooner>
pskosinski : Not entirely what you asked for. Maybe: lines.sort_by {|line| line[/(?:\d+\.){3}\d+/] } - really depends if string sorting is fine for the IPs.
alanp_ has joined #ruby
<swaits>
i wonder why Range#include? doesn't work with range parameters? i.e. > (1..10).include?(2..3)
tommyvyo has joined #ruby
devdazed has quit [Quit: Bye]
fantazo_ has quit [Ping timeout: 246 seconds]
lggr has quit [Ping timeout: 256 seconds]
<pskosinski>
Spooner: Ah, yes, works well and is short, thank you. :)
thmzlt has quit [Remote host closed the connection]
colinbm has joined #ruby
bradleyprice has quit [Remote host closed the connection]
chendo_ has joined #ruby
v0n has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
bbttxu_ has quit [Read error: Connection reset by peer]
bbttxu_ has joined #ruby
erichmenge has quit [Quit: Be back later]
lggr has joined #ruby
joshman_ has quit [Quit: Computer has gone to sleep.]
hoelzro is now known as hoelzro|away
freerobby has quit [Read error: Connection reset by peer]
freerobby1 has joined #ruby
colinbm has quit [Quit: colinbm]
timonv has quit [Remote host closed the connection]
freerobby1 has left #ruby [#ruby]
TheFuzzball has quit [Read error: Operation timed out]
chendo_ has quit [Quit: Computer has gone to sleep.]
glyytchy has quit [Quit: Leaving...]
jeffreybaird has quit [Quit: jeffreybaird]
lggr has quit [Ping timeout: 260 seconds]
thmzlt has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
cardoni has quit [Quit: cardoni]
postmodern has joined #ruby
cardoni has joined #ruby
bbttxu_ has quit [Quit: bbttxu_]
TheFuzzball has joined #ruby
elaptics is now known as elaptics`away
servidorv_ has quit [Quit: Light travels faster then sound, which is why some people appear bright, until you hear them speak]
kpshek has quit []
Servidorv has joined #ruby
lggr has joined #ruby
<Servidorv>
hey anyone there ??
<Servidorv>
i have a problem trying to start my goliath app aserver
<bairui>
hi there. been afr for a while and now i need to write a little command-line app. when i last played in this area, there were quite a few libs contending for the job of command-line args processing. did one of them win? what do you recommend for this task?
answer_42 has quit [Ping timeout: 252 seconds]
x82_nicole has quit [Quit: Computer has gone to sleep.]
apok_ has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
bier has quit [Read error: Operation timed out]
anderse has quit [Quit: anderse]
apok has quit [Ping timeout: 245 seconds]
apok_ is now known as apok
lggr has joined #ruby
SCommette has quit [Quit: SCommette]
Foxandxss has joined #ruby
dblandin has joined #ruby
pskosinski has quit [Quit: A few unofficial Red Eclipse 1.3.1 (r4131) servers: http://altred.tk/toggle.rb]
axl_ has joined #ruby
kirun has quit [Quit: Client exiting]
<Spooner>
jvdz : There is a #nanoc channel - tried there?
<Spooner>
bairui : Slop is most commonly recommended. Plenty of others out there though - depends on which API you prefer and how much you need subcommands.
<bairui>
was just thinking about whether i wanted subcommands... thanks, Spooner. hadn't heard of slop. i'll check it out.
<Spooner>
jvdz : I have used nanoc, but I don't think I did what you need to do. Not sure.
stkowski has quit [Quit: stkowski]
pskosinski has joined #ruby
love_color_text has quit [Remote host closed the connection]
<jvdz>
Spooner: I am more familiar with Python; it's a bit challenging to wrap my head around the syntax style
<jvdz>
Just like any language, once you start playing with it, there comes a point where it clicks… will get ther.
<Spooner>
jvdz : Usually you have a main layout file and use different page layouts, rather than inheritance.
bradyl0ve has joined #ruby
voodoofish430 has quit [Quit: Leaving.]
<Spooner>
Not entirely sure what you are trying to do that isn't gelling.
voodoofish430 has joined #ruby
<jvdz>
Spooner: Right - I saw an example with layout/default.html (main meat of the HTML) and then e.g. blog.html which does <% render 'default' do %>[blog specific HTML]<%= yield %>
<jvdz>
Trying that out now...
Takehiro has joined #ruby
<Spooner>
Yeah, you usually use #render to insert another partial layout file and yield to allow insertion into it from outside. Hmm, not sure that is a good explanation.
bier has joined #ruby
<jvdz>
I *think* it's making sense
icole has quit [Remote host closed the connection]
zxiest has quit []
lggr has quit [Ping timeout: 248 seconds]
<Spooner>
I'd expect to see a yield in the default (outermost HTML) file and render being used to insert partials, like table rows or whatever.
<jvdz>
I am trying to do that, but getting an error (NoMethodError: undefined method `render')
<Spooner>
Odd.
glyytchy has joined #ruby
ziffa has left #ruby [#ruby]
apok has quit [Remote host closed the connection]
apok has joined #ruby
jeffreybaird has joined #ruby
<Spooner>
Ah yes, you need to put stuff in the default.rb - you need Nanoc3::Helpers::Rendering to get access to #render
<Spooner>
It tells you in that blog post. Must have skipped it ;)
justinmcp has joined #ruby
<jvdz>
Good eye!
<Spooner>
Those modules are pretty fundamental, but nice that they are module.
<Spooner>
*that they are modular.
<jvdz>
Spooner: That was it, thanks
justinmcp has quit [Remote host closed the connection]
havenn has quit [Ping timeout: 240 seconds]
lggr has quit [Ping timeout: 252 seconds]
dinamicex1 has quit [Remote host closed the connection]
samphippen has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
jtcoon has joined #ruby
marcux has quit [Ping timeout: 272 seconds]
chin-tastic has quit [Ping timeout: 272 seconds]
mikepack has quit [Remote host closed the connection]
pmros has joined #ruby
ckrailo has quit [Quit: Leaving...]
<pmros>
hi!
chendo_ has joined #ruby
pmros_ has joined #ruby
iamjarvo has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 260 seconds]
dblandin has quit [Quit: dblandin]
nwertman has quit [Quit: nwertman]
thmzlt has quit [Ping timeout: 252 seconds]
pmros has quit [Ping timeout: 245 seconds]
Araxia has joined #ruby
lggr has joined #ruby
thmzlt has joined #ruby
mrsolo has quit [Quit: Leaving]
justinmcp has joined #ruby
<bairui>
does anyone know of a tool for quickly locating a trouble-causing file within a set of files. Assume that there is a consistent test that will identify when the 'faulty' file is 'disabled / removed'
waxjar has joined #ruby
<bairui>
what i'm looking for is a Fault Localisation tool aimed at files/dirs within a (software) tree
mikeg has quit [Quit: Leaving]
icole has quit [Remote host closed the connection]
<bairui>
i'm looking for a good name. a tool is designed to analyse a system it is given as a command-line arg, for example: my-tool --system=git I want a better name than 'system' domain? software? target? in?
jso has quit []
Xeago has quit [Remote host closed the connection]