skaczor has quit [Remote host closed the connection]
Tuxist has joined #ruby
skaczor has joined #ruby
alejandro_ has quit [Ping timeout: 252 seconds]
banseljaj is now known as imami|afk
bradhe has quit [Remote host closed the connection]
Michae___ has quit [Remote host closed the connection]
Tuxist_ has quit [Ping timeout: 265 seconds]
TechCel has quit []
joeycarmello has joined #ruby
LouisGB has quit [Ping timeout: 260 seconds]
LouisGB has joined #ruby
rellin has quit [Ping timeout: 276 seconds]
havenn has quit [Remote host closed the connection]
trevortwining has quit [Quit: trevortwining]
dmerrick has joined #ruby
osirisx11 has joined #ruby
vickaita has joined #ruby
<osirisx11>
hi.. is there a way to pass a hash as parameter symbols? ( zombie.create(params) instead of breaking it out into each param )
joeycarmello has quit [Ping timeout: 260 seconds]
Michae___ has joined #ruby
amacgregor_osx has quit [Read error: Operation timed out]
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
senny has quit [Remote host closed the connection]
Michae___ has quit [Remote host closed the connection]
kold has quit [Remote host closed the connection]
amacgregor_ has joined #ruby
aetcore has joined #ruby
ryanf has joined #ruby
dmerrick has quit [Client Quit]
amacgregor has quit [Ping timeout: 255 seconds]
Michae___ has joined #ruby
tbrock has quit [Quit: Computer has gone to sleep.]
dagnachewa has joined #ruby
vickaita has quit [Ping timeout: 240 seconds]
brianpWins has quit [Quit: brianpWins]
cburyta has joined #ruby
dagnachewa has quit [Client Quit]
savage- has quit [Quit: savage-]
aetcore has quit [Remote host closed the connection]
buscapepe has joined #ruby
dagnachewa has joined #ruby
savage- has joined #ruby
arietis has joined #ruby
savage- has quit [Client Quit]
freeayu has joined #ruby
cburyta has quit [Ping timeout: 246 seconds]
amacgregor_osx has joined #ruby
Liothen has quit [Ping timeout: 246 seconds]
TomRone has quit [Ping timeout: 248 seconds]
unXus has quit []
Xeago has joined #ruby
dagnachewa has quit [Quit: Leaving]
Jasko has quit [Read error: Connection reset by peer]
Jasko has joined #ruby
tenmilestereo has quit [Quit: Leaving]
TomRone has joined #ruby
buscapepe has quit [Remote host closed the connection]
buscapepe has joined #ruby
strangeworks has joined #ruby
fixl has joined #ruby
ChampS666 has quit [Ping timeout: 260 seconds]
moshee has quit [Ping timeout: 255 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
jsebring has joined #ruby
pmros has joined #ruby
bradhe has joined #ruby
nyrb has joined #ruby
osirisx11 has left #ruby [#ruby]
dagnachew has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
Nisstyre-laptop has joined #ruby
amacgregor_ has quit [Quit: Leaving]
nyrb has quit [Remote host closed the connection]
trevortwining has joined #ruby
codeFiend has joined #ruby
hsbt is now known as hsbt_away
zaki[] has quit [Read error: Operation timed out]
hsbt_away is now known as hsbt
dagnachew has quit [Quit: Leaving]
dagnachew has joined #ruby
nyrb has joined #ruby
havenn has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
bradhe has quit [Remote host closed the connection]
hsbt is now known as hsbt_away
nyrb has quit [Remote host closed the connection]
hsbt_away is now known as hsbt
nitti has joined #ruby
thone_ has joined #ruby
nyrb has joined #ruby
dagnachew has quit [Quit: Leaving]
micsha has joined #ruby
ndrei has quit [Ping timeout: 260 seconds]
nitti has quit [Ping timeout: 240 seconds]
<micsha>
I'm going through the "Learn ruby the hard way" course and I'm tasked with finding other ways to trim strings via String.chomp
<micsha>
the only ways I can think would be string = "My string"
<micsha>
string2 = string.chomp
nyrb has quit [Remote host closed the connection]
havenn has quit [Ping timeout: 252 seconds]
<micsha>
are there any other ways to do this?
<micsha>
or is something like gets.chomp pretty canonical?
thone has quit [Ping timeout: 252 seconds]
<micsha>
e.g. var.chomp or something like that.
ltsstar has quit [Quit: ltsstar]
ndrei has joined #ruby
Cultofmetatron has quit [Remote host closed the connection]
zaki[] has joined #ruby
CaptainJet has quit []
pmros has quit [Quit: Konversation terminated!]
Michae___ has quit [Remote host closed the connection]
cj3kim has joined #ruby
Michael__ has joined #ruby
Bytephilia has joined #ruby
<Bytephilia>
hi
cj3kim has quit [Client Quit]
Michael__ has quit [Remote host closed the connection]
Michael__ has joined #ruby
Connecti0n has quit [Ping timeout: 256 seconds]
daniel_- has quit [Ping timeout: 240 seconds]
peregrine81 has quit [Quit: Computer sleeping.]
wf2f has quit []
slainer68 has quit [Remote host closed the connection]
joeycarmello has joined #ruby
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
brianpWins has joined #ruby
ddd has quit [Quit: Leaving.]
bg has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Client Quit]
bg has quit [Client Quit]
icole has joined #ruby
cj3kim has joined #ruby
daniel_- has joined #ruby
mpereira has quit [Remote host closed the connection]
joeycarmello has quit [Ping timeout: 252 seconds]
cj3kim has quit [Client Quit]
cj3kim has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has quit [Client Quit]
havenn has joined #ruby
kalleth_ has quit [Quit: kalleth_]
cburyta has joined #ruby
jackdanger has joined #ruby
BrianJ has quit [Quit: BrianJ]
havenn has quit [Read error: Operation timed out]
statarb3 has quit [Ping timeout: 245 seconds]
<rakl>
Is there a shorter way to do this using `where`? ----> `Post.all.map{|p| p if p.attribute }`
<rakl>
I trued Post.where(attribute:true)
<rakl>
tried*
<ryanf>
Post.where('attribute is not null')
eataix has joined #ruby
cburyta has quit [Ping timeout: 255 seconds]
<ryanf>
don't do Post.all.map; that downloads every entry in the posts table and filters on the client side
<ryanf>
which is a bad idea
carlyle has joined #ruby
wf2f has quit []
<ryanf>
btw you might want to ask questions like that in #rubyonrails
jrajav has joined #ruby
<ryanf>
oh, or Post.where('attribute') I guess, if attribute is boolean
ddd has joined #ruby
u89 has quit [Remote host closed the connection]
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
peregrine81 has joined #ruby
<rakl>
ryanf thanks, is .where a rails thing? i thought it was ruby
peregrine81 has quit [Client Quit]
wargasm has joined #ruby
<rakl>
Post.where("attribute") doesn't work
xbayrockx has joined #ruby
hackerdude has quit [Remote host closed the connection]
wf2f has quit [Ping timeout: 260 seconds]
invapid has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
bradhe has joined #ruby
buscapepe has quit [Ping timeout: 264 seconds]
Cultofmetatron has joined #ruby
BoomCow has left #ruby ["Leaving"]
mengu has quit [Read error: Connection reset by peer]
carlyle has quit [Remote host closed the connection]
niklasb has quit [Ping timeout: 246 seconds]
slainer68 has joined #ruby
carlyle has joined #ruby
Tuxist has quit [Remote host closed the connection]
qwerxy has quit [Quit: offski]
amacgregor_osx has quit [Read error: Operation timed out]
micsha has quit [Quit: HydraIRC -> http://www.hydrairc.com <- The professional IRC Client :D]
codeFiend has quit [Quit: codeFiend]
yaymukund has quit [Ping timeout: 264 seconds]
bigmac_ has quit [Remote host closed the connection]
nitti has joined #ruby
roadt has joined #ruby
locriani has quit [Read error: Connection reset by peer]
locriani_ has joined #ruby
reset has quit [Quit: Leaving...]
slainer68 has quit [Ping timeout: 256 seconds]
Guest95843 has quit []
bradhe has quit [Remote host closed the connection]
amacgregor_osx has joined #ruby
<ddd>
rakl: its an ActiveRecord::QueryMethods thing and an ActiveRelations thing (Arel::Table). While the Rails framework includes those gems as dependencies they can be, and are, used outside of Rails. Many apps use AR without using Rails itself. However, no, 'where' is not a 'ruby' thing, as in its not part of the core language.
nitti has quit [Ping timeout: 260 seconds]
<ddd>
rakl: Sequel uses 'where' as well, as an example.
pemulis has joined #ruby
bradhe has joined #ruby
kbeddingfield has joined #ruby
jimeh has quit [Quit: Computer has gone to sleep.]
locriani has joined #ruby
locriani_ has quit [Read error: Connection reset by peer]
bapa has quit [Read error: Connection reset by peer]
niklasb has joined #ruby
Grieg has joined #ruby
Grieg has quit [Changing host]
Grieg has joined #ruby
hackerdude has joined #ruby
cantonic has quit [Ping timeout: 240 seconds]
joeycarmello has joined #ruby
locriani has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
locriani has joined #ruby
elico has quit [Quit: elico]
joofsh has joined #ruby
niklasb has quit [Ping timeout: 260 seconds]
fbernier has joined #ruby
MissionCritical has quit [Read error: Connection reset by peer]
banisterfiend has quit [Read error: Connection reset by peer]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
Jasko has quit [Read error: Connection reset by peer]
Jasko has joined #ruby
havenn has joined #ruby
_alejandro has quit [Remote host closed the connection]
amacgregor has joined #ruby
havenn has quit [Ping timeout: 240 seconds]
joeycarmello has quit [Ping timeout: 252 seconds]
kbeddingfield has quit [Remote host closed the connection]
eataix has left #ruby [#ruby]
bapa has joined #ruby
Hanmac has quit [Ping timeout: 246 seconds]
MissionCritical has joined #ruby
bradhe has quit [Remote host closed the connection]
jslowe has quit [Ping timeout: 252 seconds]
daniel_- has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
enderx86 has joined #ruby
Connecti0n has joined #ruby
paolooo has joined #ruby
jeffreybaird_ has joined #ruby
Hanmac has joined #ruby
slainer68 has joined #ruby
jeffreybaird has quit [Ping timeout: 240 seconds]
jeffreybaird_ is now known as jeffreybaird
adeponte has quit [Remote host closed the connection]
trevortwining has quit [Quit: trevortwining]
adeponte has joined #ruby
nitti has joined #ruby
<arietis>
anyone online?
Ruler_Of_Heaven_ has joined #ruby
carlyle has quit [Remote host closed the connection]
pipopopo has quit [Ping timeout: 264 seconds]
khakimov has joined #ruby
Guest62176 has quit [Read error: Connection reset by peer]
Guest62176 has joined #ruby
Bytephilia has quit []
adeponte has quit [Remote host closed the connection]
nitti has quit [Ping timeout: 240 seconds]
enderx86 has quit [Remote host closed the connection]
enderx86 has joined #ruby
slainer68 has quit [Ping timeout: 245 seconds]
horofox has quit [Quit: horofox]
<davidcelis>
no
<ddd>
the Zombies got us
asterinux has joined #ruby
<arietis>
i just wonder how do i contribute to open-source
<davidcelis>
find a project you like on github, fork it, write some shit for it, pull request
<arietis>
i don't know how to find project i could be useful for
<ddd>
also, if you know a couple languages (human ones) you can even do translations.
<ddd>
a *great* many projects need that. (we occupy one heck of a big world. lots of different languages out there)
<swarley>
Pot files for the win
busybox42 has quit [Ping timeout: 264 seconds]
kbeddingfield has quit [Ping timeout: 252 seconds]
banjara has joined #ruby
<swarley>
Sometimes looking at feature requests on github is a good exercise
amacgregor has quit [Ping timeout: 255 seconds]
<swarley>
Seeing if you can implement it itself. If you can't, no worries. If you do then woohoo
bradhe has joined #ruby
icole_ has joined #ruby
<ddd>
there ya go
icole has quit [Ping timeout: 255 seconds]
strangeworks is now known as emanon_
iamjarvo has joined #ruby
mmikeym has quit [Ping timeout: 276 seconds]
busybox42 has joined #ruby
joeycarmello has joined #ruby
skaczor has quit [Remote host closed the connection]
iamjarvo has quit [Client Quit]
bigmac has joined #ruby
bigmac is now known as i8igmac
jenrzzz has quit [Ping timeout: 248 seconds]
kn330 has joined #ruby
joeycarmello has quit [Ping timeout: 245 seconds]
g-ram is now known as crackas
mpereira has joined #ruby
carlyle has joined #ruby
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
jeremywen has quit [Remote host closed the connection]
savage- has joined #ruby
carlyle has quit [Ping timeout: 245 seconds]
Michael__ has quit [Remote host closed the connection]
paolooo has quit [Quit: Page closed]
Michael_ has joined #ruby
jeffreybaird has quit [Ping timeout: 240 seconds]
yaymukund has joined #ruby
Michael_ has quit [Ping timeout: 276 seconds]
asterinux has quit [Read error: Connection reset by peer]
Michael_ has joined #ruby
freeayu has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 268 seconds]
F1skr has quit [Quit: WeeChat 0.3.9]
nari_ has joined #ruby
mercwithamouth has quit [Ping timeout: 268 seconds]
stephenjudkins has joined #ruby
ewag has joined #ruby
yshh has joined #ruby
LouisGB has quit [Ping timeout: 264 seconds]
nitti has joined #ruby
Monie[ip] has joined #ruby
cousine has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 248 seconds]
nitti has quit [Ping timeout: 246 seconds]
justsee has quit [Quit: Leaving...]
Monie[ip] has quit [Ping timeout: 268 seconds]
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
jrajav has quit []
kbeddingfield has joined #ruby
tjbiddle has joined #ruby
cakehero has joined #ruby
adeponte has joined #ruby
tjbiddle has quit [Client Quit]
Nisstyre-laptop has quit [Read error: Connection reset by peer]
Nisstyre-laptop has joined #ruby
kbeddingfield has quit [Ping timeout: 268 seconds]
jonan has joined #ruby
QKO_ has joined #ruby
joeycarmello has joined #ruby
QKO has quit [Ping timeout: 248 seconds]
justsee has quit [Quit: Leaving...]
bradhe has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
Nisstyre-laptop has quit [Quit: Leaving]
ananthakumaran has joined #ruby
joeycarmello has quit [Ping timeout: 251 seconds]
Nisstyre-laptop has joined #ruby
amacgregor_ has quit [Quit: Leaving]
davehimself has joined #ruby
caleb_io has joined #ruby
kiyoura has quit [Ping timeout: 240 seconds]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
n_blownapart has joined #ruby
davehimself has left #ruby [#ruby]
cakehero has quit [Read error: Connection reset by peer]
tjbiddle has joined #ruby
tjbiddle has quit [Client Quit]
<n_blownapart>
http://pastie.org/5358981 hi I'm curious to know why the call to Person's to_proc method from line 12 is refered to as implicit in textbook. thanks.
tjbiddle has joined #ruby
Jasko has quit [Read error: Connection reset by peer]
<n_blownapart>
i.e. I'm questioning whether I understand the idea behind an implicit call in various contexts.
Jasko has joined #ruby
cakehero has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
nari_ has quit [Ping timeout: 268 seconds]
n_blownapart has quit [Remote host closed the connection]
bradhe has joined #ruby
havenn has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
jonan has quit [Quit: jonan]
carlyle has joined #ruby
stephenjudkins has joined #ruby
<ryanf>
it's implicit in that your code does not call some_object.to_proc anywhere
bradhe has quit [Remote host closed the connection]
<ryanf>
but ruby internally calls it because you used the & syntax
<ryanf>
that code is really strange btw. is that an example in a book?
lorn has quit [Ping timeout: 252 seconds]
bradhe has joined #ruby
havenn has quit [Ping timeout: 240 seconds]
lorn has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
bradhe has quit [Remote host closed the connection]
Connecti0n has quit [Quit: Leaving]
bradhe has joined #ruby
NiteRain has joined #ruby
vitor-br has quit [Remote host closed the connection]
tjbiddle has joined #ruby
carlyle has quit [Remote host closed the connection]
tjbiddle has quit [Client Quit]
emanon_ has quit [Quit: Leaving]
hcs has joined #ruby
justsee has quit [Quit: Leaving...]
beachandbytes has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
enderx86 has quit [Remote host closed the connection]
tjbiddle has joined #ruby
tjbiddle has quit [Client Quit]
godfrey999 has joined #ruby
pkrnj has joined #ruby
nitti has joined #ruby
enderx86 has joined #ruby
charliesome has joined #ruby
minijupe has joined #ruby
nitti has quit [Ping timeout: 246 seconds]
tjbiddle has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
tjbiddle has quit [Client Quit]
vickaita has joined #ruby
gregorg has quit [Read error: Connection reset by peer]
codeFiend has joined #ruby
gregorg has joined #ruby
banjara has quit [Quit: Leaving.]
_cheney has quit [Ping timeout: 246 seconds]
<rking>
Are you a Ruby documentation web site that doesn't include a link to the source? Oh, you are? Did you also know that rking hates you?
cj3kim has joined #ruby
dhruvasagar has joined #ruby
tjbiddle has joined #ruby
jrajav has joined #ruby
tjbiddle has quit [Client Quit]
joeycarmello has joined #ruby
chichou has joined #ruby
joeycarmello has quit [Ping timeout: 246 seconds]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
tjbiddle has joined #ruby
fyolnish has quit [Remote host closed the connection]
tjbiddle has quit [Client Quit]
enderx86 has quit [Remote host closed the connection]
chichou has quit [Remote host closed the connection]
enderx86 has joined #ruby
jrajav has quit []
jrajav has joined #ruby
Heresy has joined #ruby
minijupe has quit [Quit: minijupe]
enderx86 has quit [Remote host closed the connection]
savage- has quit [Quit: savage-]
Heresy has quit [Quit: +q]
JustinCampbell has joined #ruby
savage- has joined #ruby
vickaita has quit [Ping timeout: 246 seconds]
hackerdude has quit [Remote host closed the connection]
adeponte has quit [Remote host closed the connection]
jenrzzz has joined #ruby
tbrock has joined #ruby
kbeddingfield has joined #ruby
JustinCampbell has quit [Ping timeout: 246 seconds]
wallerdev_ has joined #ruby
catepill1r has joined #ruby
wallerdev has quit [Read error: Connection reset by peer]
catepillar has quit [Read error: Connection reset by peer]
kn330 has quit [Ping timeout: 246 seconds]
atmosx has quit [Ping timeout: 276 seconds]
nitti has joined #ruby
dakine has joined #ruby
tbrock has quit [Quit: Computer has gone to sleep.]
atmosx has joined #ruby
slainer68 has joined #ruby
nitti has quit [Ping timeout: 246 seconds]
coderhut has joined #ruby
dakine has quit [Quit: Leaving]
slainer68 has quit [Ping timeout: 246 seconds]
advorak has joined #ruby
jrajav has quit []
mpereira has quit [Ping timeout: 240 seconds]
Fezzler has joined #ruby
dnyy has quit [Remote host closed the connection]
catepill1r is now known as catepillar
JustinCampbell has joined #ruby
answer_42 has joined #ruby
joeycarmello has joined #ruby
rippa has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
JustinCampbell has quit [Ping timeout: 240 seconds]
Fezzler has quit [Quit: Leaving]
NiteRain has quit [Ping timeout: 246 seconds]
hackerdude has joined #ruby
hackerdude has quit [Remote host closed the connection]
fyolnish has joined #ruby
icole_ has quit [Remote host closed the connection]
<Paradox>
chunky bacon
prezioso has joined #ruby
Xeago has quit [Remote host closed the connection]
answer_42 has quit [Ping timeout: 252 seconds]
pyx has joined #ruby
fyolnish has quit [Ping timeout: 265 seconds]
joofsh has quit [Remote host closed the connection]
tehlulz has quit [Quit: tehlulz]
lkba has quit [Ping timeout: 246 seconds]
joeycarmello has quit [Ping timeout: 252 seconds]
pyx has quit [Quit: Leaving]
Jasko has quit [Read error: Connection reset by peer]
cj3kim has quit [Quit: This computer has gone to sleep]
havenn has joined #ruby
<davidcelis>
no
caleb_io has quit [Quit: caleb_io]
seich- is now known as Seich
Seich is now known as seich
havenn has quit [Ping timeout: 260 seconds]
rakl has quit [Quit: sleeping]
brianpWins has quit [Quit: brianpWins]
dakine has joined #ruby
vickaita has joined #ruby
<advorak>
I'm using Watir .. I have a page with a bunch of javascript links ... you click one, it refers you to a PDF file in a new window, which currently is set to download to a download folder. Is there any way to disable the download functionality and, instead, just get the url of the requested download?
cj3kim has joined #ruby
godfrey999 has quit [Read error: Connection reset by peer]
godfrey999 has joined #ruby
JustinCampbell has joined #ruby
psycho_one has joined #ruby
starship has joined #ruby
nari_ has joined #ruby
nitti has joined #ruby
vickaita has quit [Ping timeout: 240 seconds]
starship has quit [Quit: WeeChat 0.3.9]
JustinCampbell has quit [Ping timeout: 246 seconds]
Xeago has quit [Remote host closed the connection]
<Owiec>
Hi. I am using string.scan to find all regexp in string what i need. But i need whole string what was founded in index 0. Example: @output_template.scan /\[\[ (.+?) \/ (.+?) \/ (.+?) \]\]/mx do |block| will return me array with 3 values. but i have to know whole regexp, exatly {{a/b/c}}, not only [a,b,c]. I hope you understand :)
maxer has quit [Quit: maxer]
<apeiros>
Owiec: add a capture around the whole expression
<Owiec>
apeiros: additional ()?
<apeiros>
yes
<Owiec>
ok, thx. I thought mayby some special parametr or function exist for that
`brendan has joined #ruby
<apeiros>
well, in scan with block you can access $~, $& etc.
sheerun has joined #ruby
slainer68 has joined #ruby
<apeiros>
so if you want to go fancy, you can do str.enum_for(:scan).map { |captures| …use $& etc. here… }
nitti has quit [Ping timeout: 246 seconds]
<Owiec>
apeiros: can you give a link where i can read about $~ amd $&?
spike|spiegel has quit [Read error: Connection reset by peer]
<apeiros>
I like "gril"
<Owiec>
heh ;)
<apeiros>
you could use String#% if you used %{id} instead of {{:id}}
beiter has joined #ruby
clj_newb has quit [Ping timeout: 264 seconds]
<apeiros>
(and client_name instead of client:name)
<Owiec>
apeiros: the source data will be in format {client: {name: "Krzysztof"}}
<Owiec>
so i think its good
JonnieCa1he has quit [Ping timeout: 260 seconds]
<apeiros>
not too difficult to flatten that. but your choice.
<Owiec>
its more readable because it can be {client:full_name}
<Owiec>
and then will be problem
<apeiros>
gawd, all osx terminal.app clear screen thingies use osascript
<Owiec>
but i think i will change {{ }}
<apeiros>
RUSRS?
bradhe has joined #ruby
<apeiros>
ah, d'oh, me stupid
<apeiros>
of course I don't clear the screen if I `exit`
<apeiros>
since the clearing code is never reached…
<apeiros>
throw/catch to the rescue!
nitti has joined #ruby
<apeiros>
works now :)
<apeiros>
only 152839 more steps to the most primitive ruby rpg ever
beiter has quit [Quit: beiter]
<allsystemsarego>
Hi all, is this the most elegant and Ruby-idiomatic way to break up a string into its component letters? some_string.scan(/../)
<allsystemsarego>
sorry, I meant /./
nitti has quit [Ping timeout: 240 seconds]
beiter has joined #ruby
<Hanmac>
apeiros does an 3d engine helps your plan? :D
<Owiec>
"string string".split("") - mayby this?
<apeiros>
Hanmac: it's an ascii based rpg, so, no, not really ;-)
<allsystemsarego>
Owiec, thanks, that works
<apeiros>
allsystemsarego: str.chars
<apeiros>
also str.each_char
TheFuzzball has quit [Read error: Connection reset by peer]
<Hanmac>
apeiros i saw an cool mix of text-based and point&click rpg ... where you can point at the words in the text and build your next action together like : [look] [at] [door] :D
<apeiros>
heh
spike|spiegel has joined #ruby
<apeiros>
Hanmac: na, I intend it to be more a bit like zelda/FF1
<allsystemsarego>
apeiros, thanks, that gives an enumerator as a result, is there a performance benefit vs. the other approaches which return arrays of characters?
<apeiros>
with FF1 like battle screens (just without fancy graphics)
<Hanmac>
[break][][pot] & [take][][gem] ?
<apeiros>
allsystemsarego: benchmark it. I don't know
<allsystemsarego>
ok, thanks a lot
<apeiros>
Hanmac: no, you see a top-view of the dungeon and walk around with WASD
Jasko has quit [Read error: Connection reset by peer]
<Hanmac>
apeiros: in the game i saw you did not see anything ... only pointable text :D
jimeh has quit [Client Quit]
niklasb has joined #ruby
shellox has quit [Quit: Computer has gone to sleep.]
LouisGB has joined #ruby
jimeh has joined #ruby
jimeh has quit [Client Quit]
Averna has quit [Quit: Leaving.]
<apeiros>
and enemy encounters are random, i.e. each move, 15% chance to have an enemy encounter
<apeiros>
plus some forced encounters (boss fights) of course
TheFuzzball has joined #ruby
<banisterfiend>
apeiros: what library are u using? gosu?
<apeiros>
banisterfiend: gosu is graphics, as said, this is purely ascii for the moment
<banisterfiend>
apeiros: so curses?
<Hanmac>
allsystemarego enumerators are more fun when you comine it with other enumerators
<apeiros>
no, just plain io/console + ansi escape sequences :)
<banisterfiend>
apeiros: y r u doing it, for fun or for some competition?
<apeiros>
teaching some guy some ruby
<apeiros>
and fun
<apeiros>
maybe for once I manage to finish a game :)
tehlulz has quit [Quit: tehlulz]
hamed_r has quit [Ping timeout: 246 seconds]
bradhe has quit [Ping timeout: 268 seconds]
hamed_r has joined #ruby
<Hanmac>
apeiros if you have more to test i want to play it :D
<apeiros>
Hanmac: will tell you :)
<apeiros>
I think by today a minimally playable version might be around
<apeiros>
and playable will mean "you can run around and beat enemies until you run out of hp and die"
<apeiros>
but contributions will be welcome. especially dungeons, maps and ideas ;-) (dungeons are plaintext files)
darthdeus has quit [Quit: Leaving...]
<banisterfiend>
apeiros: how do u scroll the map around?
<banisterfiend>
apeiros: just redraw the whole screen?
<banisterfiend>
does it flicker?
<apeiros>
banisterfiend: redraw whole screen, yes
<apeiros>
banisterfiend: no idea, but it might
nari_ has quit [Ping timeout: 256 seconds]
<apeiros>
banisterfiend: the ascii version is intended to be only the first step, though. I do intend to move to gosu. but for gosu, I need somebody to draw tiles and sprites :-/
<Hanmac>
apeiros what did you thought about that "text-based and point&click rpg" ? it could be fun too right?
<apeiros>
Hanmac: totally. I also enjoyed where you had to type what to do.
<Owiec>
i modify my code to: @output_template.gsub! /%\[ (.+?) \/ (.+?) \/ (.+?) \]/mx, ['\1','\2','\3'][gender]
<Owiec>
can i write ['\1','\2','\3'][gender] better?
<banisterfiend>
apeiros: lots of free stuff online
ChampS666 has joined #ruby
<Owiec>
apeiros: about 10 years ago i was playing text rpg with terminal and it wasnt fun with that. I had to read documentation what i can write and guess what to write to do something... guess what creator imagine about area, its a little unsense
Xeago has joined #ruby
<shevy>
Hanmac: what RPG was that?
jds_ has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
Tania has quit [Read error: Connection reset by peer]
<Hanmac>
shevy an mix of an text-rpg where you type your actions comined with an point&click RPG where you need to find the stuff you need :D or do you mean the name?
<jds_>
Anyone know any online archives of this channel?
Slivka has quit [Remote host closed the connection]
rakl has quit [Quit: gone]
EddieS has joined #ruby
EddieS is now known as Guest59128
hamed_r has quit [Quit: Leaving]
<banisterfiend>
jds_: why?
<jds_>
Because I'm trying to track down something I said a couple of weeks ago :/
margle has joined #ruby
rampantmonkey has joined #ruby
<banisterfiend>
jds_: irc.whitequark.org
<banisterfiend>
jds_: irclog.whitequark.org
darthdeus has joined #ruby
<jds_>
banisterfiend: perfect, thanks
bradhe has joined #ruby
alexwh has joined #ruby
rampantmonkey has quit [Client Quit]
alexwh has quit [Client Quit]
alexwh has joined #ruby
maxer has joined #ruby
Liothen has joined #ruby
<Owiec>
i have question ebout regexp: string "(1)(2)%((a)(b)(c))(3)(4)", i want get "%((a)(b)(c))". in %(...) can be diffrent content, even with () so i need count how many open ( and how many close ) and get string in right moment
<Owiec>
any function for that or parametr or i have to write this myself?
<apeiros>
StringScanner & have fun
nyuszika7h has quit [Read error: Connection reset by peer]
swarley| has quit [Ping timeout: 246 seconds]
Michae___ has joined #ruby
swarley has joined #ruby
kiddy10159 has joined #ruby
Michael_ has quit [Read error: Connection reset by peer]
strangeworks has joined #ruby
kiddy56842 has quit [Ping timeout: 240 seconds]
<Sou|cutter>
I'm struggling a bit to understand how to properly implement coerce for a money class
theRoUS has quit [Ping timeout: 240 seconds]
tUze has joined #ruby
guns has joined #ruby
nitti has joined #ruby
<Sou|cutter>
hmmm, I suppose I'll post a gist
ejnahc has quit [Ping timeout: 245 seconds]
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
havenn has joined #ruby
ejnahc has joined #ruby
<tUze>
anyone already created a project related with music or video written in ruby?
cakehero has joined #ruby
enderx86 has joined #ruby
enderx86 has quit [Remote host closed the connection]
TheFuzzball has quit [Read error: Connection reset by peer]
Jasko has quit [Read error: Connection reset by peer]
nitti has quit [Ping timeout: 246 seconds]
Jasko has joined #ruby
vlad_starkov has joined #ruby
bradhe has quit [Ping timeout: 255 seconds]
iPhoneMRZ has joined #ruby
iPhoneMRZ has quit [Client Quit]
iPhoneMRZ has joined #ruby
JonnieCache has joined #ruby
francisfish has quit [Remote host closed the connection]
<canton7>
When you call 8 - Price.new(4.5), Fixnum realises it doesn't know how to subtrace a Price, and so does a `my_equiv, their_equiv = Price.new(4.5).coerce(8)`. The operation then becomes Price.new(8) - Price.new(4.5)
<canton7>
(presumably after Fixnum does a `my_equiv.send(:-, their_equiv)`
<Sou|cutter>
I sorta worked it out, though I confess to still not quite understanding... Price.new(amount - coerce(obj)[0].amount)
<Sou|cutter>
I may be using coerce in a way that is not intended, though. I am forcing things to be Price, but perhaps coerce is meant to convert Price to a compatible non-price object?
<Sou|cutter>
it's a bit of a bummer that it has to do type checking like that before coercion
tbrock has joined #ruby
tungd has joined #ruby
<Sou|cutter>
I figured you could coerce any value and then operate on it (but then I was getting stack level too deep issues... infinite recursion... or I ended up with an unexpected type if I swapped the order of classes in calling the operator)
areil has quit [Ping timeout: 264 seconds]
tungd has quit [Client Quit]
abstrusenick has quit [Quit: abstrusenick]
tungd has joined #ruby
jimeh has joined #ruby
jimeh has quit [Client Quit]
nari_ has quit [Ping timeout: 240 seconds]
enderx86 has joined #ruby
<Sou|cutter>
generally you were correct, though, canton7 - the order of my array created the problem. Thanks a ton
quazimodo has quit [Remote host closed the connection]
tungd has quit [Quit: leaving]
cakehero has quit [Quit: Computer has gone to sleep.]
themadcanudist has joined #ruby
themadcanudist has left #ruby [#ruby]
tbrock has quit [Quit: Computer has gone to sleep.]
atheotsky has quit [Quit: atheotsky]
und3f has quit [Quit: Leaving.]
nitti has joined #ruby
iamjarvo has joined #ruby
arya has joined #ruby
beneggett has joined #ruby
nazty has quit [Read error: Connection reset by peer]
wpaulson has joined #ruby
nitti has quit [Ping timeout: 246 seconds]
Jasko has quit [Read error: Connection reset by peer]
linoj has joined #ruby
<apeiros>
Hanmac: https://github.com/apeiros/teaching_rpg - walking around works. if you're on non-osx I'd be interested whether the map rendering works (missing chars and stuff - I use some exotic utf-8 characters)
Jasko has joined #ruby
<apeiros>
Hanmac: run it with `ruby -Ilib bin/ruby_rpg`
AndChat| has joined #ruby
vickaita has joined #ruby
<Hanmac>
hm rendering & walking seems to work ... abotu missing chars i dont know i need to make an scene shot
F1skr has joined #ruby
arya has quit [Ping timeout: 255 seconds]
SuperrMann has joined #ruby
savage- has joined #ruby
hoelzro|away is now known as hoelzro
Banistergalaxy has quit [Ping timeout: 264 seconds]
jimeh has joined #ruby
nosleep77 has joined #ruby
<nosleep77>
hello
snearch has quit [Quit: Verlassend]
atmosx has quit [Remote host closed the connection]
<Sou|cutter>
making a roguelike sounds like a fun side project
cousine has joined #ruby
somazero has joined #ruby
<JonnieCache>
i tried to make a text adventure in html when i was a kid
savage- has joined #ruby
<JonnieCache>
i didnt have any programming skills to manage the whole thing so i just updated all the links by hand, and basically i wasnt autistic enough to follow that mammoth task through :)
Jasko has quit [Read error: Connection reset by peer]
<banisterfiend>
JonnieCache: filthy, was web dev your first programming experience? :P
<JonnieCache>
not really
<banisterfiend>
did you have a play with QuickBasic ?
<Sou|cutter>
I did a choose your own adventure in Logo in 1st grade
<rokhdua>
rippa: ty very much , exactly what i needed
jimeh has joined #ruby
trevortwining has quit [Quit: trevortwining]
<Sou|cutter>
I loved game genie. Some of those old nintendo games were near impossible without it
<JonnieCache>
i just used to use it to break games. the best was finding hidden content
<JonnieCache>
theres so much stuff in the zelda 64 ROM, people are still finding it now
nyrb has joined #ruby
Vert has joined #ruby
savage- has quit [Client Quit]
malkomal_ has quit [Read error: Connection reset by peer]
<JonnieCache>
never had such a thing for the snes though
tungd has joined #ruby
tUze has joined #ruby
bradhe has quit [Ping timeout: 246 seconds]
kirun_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
daniel_- has joined #ruby
whowantstolivefo has joined #ruby
tungd has quit [Quit: WeeChat 0.3.7]
tungd has joined #ruby
kirun has quit [Ping timeout: 256 seconds]
<whowantstolivefo>
hi, i know it is not question about linux but i dont know where to ask this question... i searched in google but i still cannot figure out what is the SYSBSE-IQ ? what is this ? anyone have idea ?
whowantstolivefo has quit [Killed (idoru (Spam is off topic on freenode.))]
rokhdua has quit [Quit: Leaving]
[1]SoonerBourne has joined #ruby
vlad_starkov has joined #ruby
minijupe has joined #ruby
SoonerBourne has quit [Ping timeout: 260 seconds]
[1]SoonerBourne is now known as SoonerBourne
francisfish has quit [Remote host closed the connection]
LucidDreamZzZ has quit [Ping timeout: 276 seconds]
francisfish has joined #ruby
Mon_Ouie has quit [Ping timeout: 252 seconds]
savage- has joined #ruby
nitti has joined #ruby
ltsstar has joined #ruby
pac1 has quit [Quit: I got it one line of code at a time]
baphled has quit [Ping timeout: 248 seconds]
LucidDreamZzZ has joined #ruby
carlyle has joined #ruby
ewag has quit [Ping timeout: 256 seconds]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
nitti has quit [Ping timeout: 246 seconds]
cousine has quit [Remote host closed the connection]
wroathe has joined #ruby
Jasko has quit [Read error: Connection reset by peer]
Jasko has joined #ruby
mytec has left #ruby ["Leaving"]
Agis__ has joined #ruby
fraser has joined #ruby
horofox has joined #ruby
fraser has quit [Client Quit]
elico has joined #ruby
qwerxy has joined #ruby
bradhe has joined #ruby
ztirf has joined #ruby
baphled has joined #ruby
BrianJ has joined #ruby
wroathe has quit [Ping timeout: 268 seconds]
vlad_starkov has quit [Remote host closed the connection]
savage- has quit [Quit: savage-]
enderx86 has quit [Remote host closed the connection]
mpereira has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
<nosleep77>
looking for an intuitive way to merge 2 textfiles line by line.
swarley has quit [Ping timeout: 246 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
samphippen has joined #ruby
beiter has quit [Quit: beiter]
hcs has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
<evansbee>
you can zip arrays which does what you're looking for, i'd assume
i8igmac has quit [Quit: Leaving]
banisterfiend has quit [Ping timeout: 245 seconds]
apeiros_ has joined #ruby
nwertman has quit [Quit: nwertman]
rafter has joined #ruby
qwerxy has quit [Quit: offski]
Michae___ has quit [Remote host closed the connection]
kirun_ has quit [Ping timeout: 244 seconds]
beiter has joined #ruby
qwerxy has joined #ruby
baphled has quit [Ping timeout: 264 seconds]
qwerxy has quit [Client Quit]
<arietis>
are while and for equal in term of O?
<arietis>
or while is faster
ananthakumaran has quit [Quit: Leaving.]
<evansbee>
nosleep77: i just did file1.zip(file2).flatten and it makes an array that alternates files
baphled has joined #ruby
<evansbee>
so that should work for you
wroathe has joined #ruby
<nosleep77>
evansbee: thank you!
<evansbee>
np
mityaz has joined #ruby
francisfish has quit [Remote host closed the connection]
<evansbee>
you obviously need to do file1 = File.open("blah")
francisfish has joined #ruby
<evansbee>
and whatnot
somazero has quit [Read error: Connection reset by peer]
somazero has joined #ruby
Jasko has quit [Read error: Connection reset by peer]
<chrisramon>
hiii, i have this in my .rvmrc https://gist.github.com/4055488 , but when i type ruby -v within the directory It keeps using the ruby system
vlad_starkov has joined #ruby
<Agis__>
I'm kinda confused about how and why we use instance variables inside class methods
<apeiros_>
Agis__: classes are objects
<apeiros_>
that is, 1 class is 1 object
<Agis__>
so we use them in the sense that a class is an instance of Class, therefore it can have instance variables and state
<Agis__>
got it, thx
joast has quit [Quit: Leaving.]
dakine has joined #ruby
<apeiros_>
yes, wanted to write more, but kitchen accident :(
<tUze>
is possible login in a website with a ruby code?
arya has joined #ruby
wpaulson has joined #ruby
wpaulson has quit [Client Quit]
kirun has quit [Ping timeout: 264 seconds]
theRoUS has quit [Ping timeout: 240 seconds]
<Agis__>
lol?
<jackdanger>
tUze: check out the 'mechanize' gem. That's what you want.
n_blownapart has joined #ruby
<n_blownapart>
%w{this is supposed to work}.each(&:capitalize) hi anyone tell me why this symbol to proc syntax doesn't work? thanks
dhruvasagar has joined #ruby
<canton7>
it does work
<canton7>
you want #map, not #each
arya has quit [Ping timeout: 260 seconds]
<canton7>
what you types is the same as %w{this is supposed to work}.each{ |v| v.capitalize }
carlyle has quit [Read error: Connection reset by peer]
<canton7>
*typed
carlyle has joined #ruby
<n_blownapart>
hmm, canton7 the book has each (1.9.1 version) Yeah, I tried that code and it worked as usual
<n_blownapart>
but thanks ! just another mystery canton7
<canton7>
did it use :capitalize!
<canton7>
?
<n_blownapart>
canton7: no
<canton7>
typo
<canton7>
in that case
CaptainJet has joined #ruby
<n_blownapart>
cool I'm happy with map thank you canton7
carlyle has quit [Remote host closed the connection]
tjbiddle has joined #ruby
arya has joined #ruby
<chrisramon>
i fixed the .rvmrc issue creating it from terminal using --rvmrc
Michael__ has quit [Remote host closed the connection]
LouisGB has joined #ruby
enderx86 has quit [Remote host closed the connection]
<big_poppah>
if a mixin has methods in it that set instance variables (or alternatively that the mixin has methods that have some method of storing state in the object that includes the mixin) what's the best way to encapsulate the variables so that they don't pollute the namespace of the object that includes the mixin
<evansbee>
looks like theres a ruby-opengl2 in gems, that may work...
bradhe has quit [Ping timeout: 240 seconds]
daniel_- has quit [Ping timeout: 252 seconds]
mmikeym has joined #ruby
ij has quit [Ping timeout: 246 seconds]
LouisGB has quit [Ping timeout: 256 seconds]
<gauravag>
big_poppah: sounds like the mixins are supposed to be classes!
<big_poppah>
gauravag: that may be
jds_ has quit [Remote host closed the connection]
cakehero has joined #ruby
<BrianJ>
whats the best way to pass in a paragraph of test into a ruby script?
<tUze>
big_poppah: you works good with mechanize?
bishop9 has joined #ruby
<BrianJ>
I have been using trollop to pass in variables, but I don't think thats the right tool for a paragraph of text
linoj has quit [Quit: linoj]
mpereira has quit [Ping timeout: 246 seconds]
<shevy>
cool jrajav
<jrajav>
shevy: Literally the first result for "ruby sysinfo" :P
<jrajav>
Jusayin'
bishop9 has quit [Quit: Leaving]
<shevy>
oh
freakazoid0223 has quit [Quit: Leaving]
<shevy>
doesnt work
<tUze>
jrajav: you know work with mechanize in ruby?
mpereira has joined #ruby
<shevy>
oh wait... missing storable dependency
<jrajav>
No
Amirh has quit [Quit: Leaving.]
banisterfiend has joined #ruby
<jrajav>
shevy: Are you installing the gem?
<shevy>
hmm
<jrajav>
That would probably be easier
<shevy>
gem install sysinfo
foofoobar has joined #ruby
<shevy>
require 'sysinfo' # TypeError: SysInfo is not a class
<jrajav>
foofoobar: Note that that isn't very strict
<foofoobar>
y
<jrajav>
foofoobar: It will refuse to match if 'foobar' precedes it anywhere in the string
<jrajav>
Not just as the function name
<foofoobar>
mhhh
<foofoobar>
anyway thanks I will try it
francisfish has quit [Remote host closed the connection]
<jrajav>
Another approach that would work a little better is to match the whole function first, capturing the function name, and then after the regex check the captured function name for equality with the string "foobar"
francisfish has joined #ruby
banisterfiend has quit [Ping timeout: 240 seconds]
<foofoobar>
ok
<foofoobar>
thank you
foofoobar has quit [Quit: Computer has gone to sleep]
<susenbg>
there is a command to generate a gemspec file, but i can't find it somehow. any help?
Dreamer3 has joined #ruby
nitti has quit [Ping timeout: 246 seconds]
<burgestrand>
susenbg: bundler can generate a completely new gem for you, and some gems allow you to declare your gemspec in a Rakefile and do it from there
<burgestrand>
susenbg: I write mine by hand
hotovson has quit [Remote host closed the connection]
LastBeer1ver has quit [Ping timeout: 246 seconds]
<susenbg>
burgestrand: ok, i will see if that works for me
LastBeerEver has joined #ruby
hotovson has joined #ruby
dakine has joined #ruby
Cultofmetatron has quit [Ping timeout: 246 seconds]
stephenjudkins has joined #ruby
adelcampo has joined #ruby
geggam has joined #ruby
Cultofmetatron has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
mmikeym has quit [Ping timeout: 252 seconds]
monkegjinni has joined #ruby
hotovson has quit [Ping timeout: 246 seconds]
<shevy>
burgestrand: really by hand? not even a helper script helping you?
Xeago has joined #ruby
<burgestrand>
shevy: no take a needle and carve it into my old-school spinning hard drive
<burgestrand>
i once read through the gemspec, wrote a gemspec that had all I wanted, and now I just copy it for every new project
Ry__ has quit [Read error: Connection reset by peer]
Ry_ has joined #ruby
banghouse2 has quit [Remote host closed the connection]
vickaita has joined #ruby
apeiros_ has quit [Remote host closed the connection]
banghouse2 has joined #ruby
perlsyntax has quit [Quit: Leaving]
banghouse2 has quit [Remote host closed the connection]
strangeworks has quit [Quit: Leaving]
apeiros_ has joined #ruby
banister_ has quit [Ping timeout: 260 seconds]
<shevy>
hehe
vickaita has quit [Read error: Operation timed out]
<jrajav>
You need a needle?
mmikeym has joined #ruby
wallerdev has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby
monkegji_ has joined #ruby
banjara has quit [Quit: Leaving.]
foofoobar has joined #ruby
mercwithamouth has quit [Ping timeout: 276 seconds]
fantazo has joined #ruby
iaj has quit [Ping timeout: 260 seconds]
pcarrier has quit []
joeycarmello has joined #ruby
pcarrier has joined #ruby
pcarrier has quit [Client Quit]
enderx86 has quit [Remote host closed the connection]
<foofoobar>
So why does a '(' is matched by \w ?
<foofoobar>
I thought \w is only letter,digit,underscore
psycho_one has quit [Remote host closed the connection]
enderx86 has joined #ruby
monkegji_ has joined #ruby
<jrajav>
Err, wrong way around :P
<jrajav>
What you want is for the first one to not match (, right?
<jrajav>
And possibly, for the second one to not match )
Tuxist has quit [Remote host closed the connection]
<foofoobar>
I want to get the surrounding function
<jrajav>
Which one?
Elico1 has joined #ruby
Surf71 has joined #ruby
vlad_starkov has quit [Ping timeout: 260 seconds]
freakazoid0223 has joined #ruby
Surf71 has quit []
<foofoobar>
the outer
<foofoobar>
jrajav: I want to get the function name of the function which surrounds the document.referrer
<foofoobar>
bar(foo(document.referrer)) <- i want to get foo
<foofoobar>
foo(bar(document.referrer)) <- i want to get bar
Michael__ has quit [Remote host closed the connection]
Surf71 has joined #ruby
<jrajav>
foofoobar: Then yes, use [^(]
<foofoobar>
but where exactly?
Michael__ has joined #ruby
Neomex has joined #ruby
NewWorld has joined #ruby
centipedefarmer has quit [Remote host closed the connection]
chrisramon has quit [Quit: chrisramon]
NewWorld has left #ruby ["Terminated"]
tjbiddle has joined #ruby
<jrajav>
Instead of .
hcs has joined #ruby
<jrajav>
You already did it with [^)]
khakimov has quit [Quit: Computer has gone to sleep.]
<jrajav>
Just change that to [^(]
<jrajav>
Obviously, ( is the problem here...
codeFiend has quit [Quit: codeFiend]
QKO_ has quit [Read error: Connection reset by peer]
cousine has joined #ruby
<shevy>
i have two arrays
<shevy>
array1 = %w( abc def ghi ); array2 = ['this is a test','this is a test abc','this is another test']
<shevy>
I'd like to return element [1] of array2 because it includes the substring "abc", which is part of array1
QKO has joined #ruby
<shevy>
I could solve this via .each or something else in a few lines, but is there not a one liner to check for partial includes?
qwerxy has joined #ruby
nkts has quit []
s0ber has quit [Read error: Connection reset by peer]
nitti has joined #ruby
jimeh has quit [Quit: Computer has gone to sleep.]
nkts has joined #ruby
kirun has quit [Ping timeout: 248 seconds]
s0ber has joined #ruby
daniel_- has quit [Ping timeout: 260 seconds]
chrisramon has joined #ruby
berserkr has joined #ruby
nitti has quit [Ping timeout: 246 seconds]
SuperrMann has quit [Quit: Bye all :)]
daniel_- has joined #ruby
banisterfiend has joined #ruby
<tUze>
need talk in private with someone who has a great knowlede of mechanize, importnt thing so if anyone can help me, I really thank you
Hanmac has joined #ruby
Bosox20051 has joined #ruby
jslowe has joined #ruby
kirun has joined #ruby
hcs has quit [Quit: hcs]
Jasko has quit [Read error: Connection reset by peer]
Jasko has joined #ruby
Virunga has joined #ruby
rippa has quit [Ping timeout: 260 seconds]
freakazoid0223 has quit [Quit: Leaving]
invapid__ has joined #ruby
akafurious has quit [Read error: Connection reset by peer]
akafurious has joined #ruby
Surf71 has quit []
Hanmac has left #ruby [#ruby]
Tania has quit [Quit: :p]
invapid__ has quit [Ping timeout: 252 seconds]
monkegj__ has joined #ruby
carlyle has joined #ruby
rdg has joined #ruby
centipedefarmer has joined #ruby
monkegji_ has quit [Ping timeout: 246 seconds]
monkegjinni has quit [Ping timeout: 268 seconds]
monkegji_ has joined #ruby
monkegj__ has quit [Read error: Connection reset by peer]
darthdeu has joined #ruby
monkegjinni has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
fyolnish_ has quit [Remote host closed the connection]
daniel_- has quit [Ping timeout: 246 seconds]
fyolnish has joined #ruby
jimeh has joined #ruby
pcarrier has joined #ruby
akafurious has quit [Quit: Leaving]
Beoran_ has joined #ruby
joeycarmello has quit [Remote host closed the connection]
centipedefarmer has quit [Remote host closed the connection]
centipedefarmer has joined #ruby
nosleep77 has left #ruby [#ruby]
jrajav has quit []
fyolnish has quit [Ping timeout: 260 seconds]
Beoran__ has quit [Ping timeout: 264 seconds]
rafter has quit [Remote host closed the connection]
itnomad has joined #ruby
vickaita has joined #ruby
centipedefarmer has quit [Ping timeout: 256 seconds]
crackas has quit [Quit: Computer has gone to sleep.]
tUze has quit [Quit: The computer fell asleep]
monkegji_ has quit [Read error: Connection reset by peer]
SoonerBourne has quit [Ping timeout: 276 seconds]
Jackneill has quit [Quit: Jackneill]
monkegji_ has joined #ruby
tUze has joined #ruby
malkomalko has quit [Read error: Connection reset by peer]
malkomalko has joined #ruby
Morkel_ has joined #ruby
rdg has quit [Ping timeout: 246 seconds]
Morkel has quit [Ping timeout: 264 seconds]
Morkel_ is now known as Morkel
QKO has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
QKO has joined #ruby
vickaita has quit [Ping timeout: 255 seconds]
mpereira has quit [Ping timeout: 255 seconds]
mercwithamouth has joined #ruby
mpereira has joined #ruby
joeycarmello has joined #ruby
malkomalko has quit [Read error: Connection reset by peer]
Jasko has quit [Read error: Connection reset by peer]
olrrai has joined #ruby
darthdeu has quit [Quit: Leaving...]
Jasko has joined #ruby
olrrai has quit [Client Quit]
big_poppah has joined #ruby
u89 has quit [Remote host closed the connection]
joeycarmello has quit [Remote host closed the connection]
rakl has joined #ruby
kirun has quit [Ping timeout: 252 seconds]
jsebring has joined #ruby
rakl has quit [Client Quit]
chrisramon has quit [Quit: chrisramon]
vickaita has joined #ruby
Jdubs has joined #ruby
<Jdubs>
Hey guys!
<Jdubs>
Anyone on here willing to help me with some CSS? No one is responding to me in #css
dmiller has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
daniel_- has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
arya has quit [Ping timeout: 265 seconds]
losh has joined #ruby
mpereira has quit [Ping timeout: 252 seconds]
Nisstyre-laptop has joined #ruby
ltsstar has quit [Quit: ltsstar]
Grieg has quit [Quit: laterz! :D]
Slivka has joined #ruby
allsystemsarego has quit [Quit: Leaving]
kirun has joined #ruby
big_poppah has quit [Quit: leaving]
mytec has joined #ruby
darthdeus has joined #ruby
u89 has joined #ruby
nitti has joined #ruby
<losh>
I have a sub-class that I want to over ride the default values for the initialize method, but want to use the parent classes initialize code. Is this possible?
Jdubs has quit [Ping timeout: 240 seconds]
banisterfiend has quit [Ping timeout: 246 seconds]
arya has joined #ruby
mpereira has joined #ruby
sh1nji has quit [Ping timeout: 260 seconds]
frogstarr78 has quit [Remote host closed the connection]
<shevy>
losh: tried super() or super yet?
nitti has quit [Ping timeout: 240 seconds]
<losh>
Nope. Didn't know it existed. Thanks shevy, I'll look it up/
jackdanger has quit [Quit: Leaving.]
<shevy>
with super you can call parent methods, and you can pass in your own arguments
Michael__ has quit [Remote host closed the connection]
<losh>
shevy, that's exactly what I was after. Thanks!
<shevy>
you are welcome
<atmosx>
hey shevy
<atmosx>
how's life
Jasko has quit [Read error: Connection reset by peer]
<shevy>
atmosx: it's ok, awfully much to do lately though
Jasko has joined #ruby
jimeh has quit [Quit: Bye.]
darthdeus has quit [Quit: Leaving...]
<shevy>
I think it's the time of where everyone needs things to be done... before X-mas... and new year...
pkrnj has joined #ruby
BoomCow has joined #ruby
<atmosx>
I see
<atmosx>
true
<atmosx>
I need start studying microbiology :-)
<atmosx>
and human morphology hmmm also I have a basketball tournament in two days
pkrnj has quit [Client Quit]
<atmosx>
oh, I also need to find 15 different hosts to plant a program which will run everyday 1.000 queries to lycos.com and sync them to a db for my last project
pkrnj has joined #ruby
<atmosx>
and I'm thinking of more efficient ways of syncing the db
answer_42 has quit [Quit: WeeChat 0.3.9]
mpereira has quit [Ping timeout: 248 seconds]
<shevy>
hehe
mpereira has joined #ruby
<tUze>
is ruby mechanize able to get more recent posts from a website?
linoj has joined #ruby
trevortwining has quit [Quit: trevortwining]
yxhuvud has quit [Ping timeout: 240 seconds]
mpereira has quit [Ping timeout: 255 seconds]
mytec has quit [Quit: Leaving]
LouisGB has joined #ruby
mpereira has joined #ruby
<Spaceghostc2c>
tUze: Mechanize doesn't know about what 'recent posts' are. The question is, can you use mechanize?
<tUze>
I mean fetch content
bradex has joined #ruby
<Spaceghostc2c>
Sure.
losh has left #ruby ["Leaving"]
<Spaceghostc2c>
Don't query me. Ask in the channel.
<bradex>
hiya... how do I specify a symbol that contains spaces..... using the newer 1.9.2 hash-with-symbols syntax. OLD: h = {:"hash browns" => true}
<burgestrand>
bradex: you can’t.
<burgestrand>
bradex: Use the old syntax.
<bradex>
burgestrand: wow. thanks! I'll stop the experiments then.
Cultofmetatron has quit [Remote host closed the connection]
Michael__ has joined #ruby
k610 has quit [Ping timeout: 240 seconds]
khakimov has joined #ruby
monkegji_ has quit [Ping timeout: 246 seconds]
emmanuelux has quit [Quit: emmanuelux]
atran has joined #ruby
atran has quit [Read error: Connection reset by peer]
emmanuelux has joined #ruby
jrajav has joined #ruby
khakimov has quit [Ping timeout: 246 seconds]
mpereira has quit [Ping timeout: 246 seconds]
emmanuelux has quit [Read error: Connection reset by peer]
mpereira has joined #ruby
khakimov has joined #ruby
tbrock has joined #ruby
Criztian has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
chussenot has quit [Quit: chussenot]
tommyvyo has joined #ruby
wroathe has joined #ruby
xd-xd-xd-xd- has joined #ruby
<xd-xd-xd-xd->
HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA
<xd-xd-xd-xd->
HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA
<xd-xd-xd-xd->
HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA
<xd-xd-xd-xd->
HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA
<xd-xd-xd-xd->
HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA HOLA HIJOS DE PUTA
xd-xd-xd-xd- has quit [Killed (idoru (Spam is off topic on freenode.))]
Michael__ has quit [Remote host closed the connection]
<apeiros_>
hurray for complete and utter nutjobs…
<lushious>
yep
segmond has joined #ruby
<lushious>
the human race is beautiful
* apeiros_
always wonders what motivates people to do something like that
healpay has joined #ruby
jipiboily has joined #ruby
staafl has quit [Ping timeout: 246 seconds]
jslowe has quit [Read error: Connection reset by peer]
cousine has quit [Remote host closed the connection]
tenmilestereo has joined #ruby
<ddd>
who said they needed motivation
linoj has quit [Read error: Connection reset by peer]
linoj has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
<atmosx>
apeiros_: when people don't get laid long enough
<atmosx>
some weird chemicals reactions take place in their brains
<apeiros_>
atmosx: so you agree with me, that all those people get is to be seen as losers?
adeponte has joined #ruby
<atmosx>
apeiros_: totally.
kirun has quit [Quit: Client exiting]
<apeiros_>
must be an awesome motivation
<atmosx>
seriously, this linux crunchbang distribution is awesome for notebooks, runs extremelly smoothly
<apeiros_>
"yay! I can get people to think I was a loser! I totally should do that!"
<atmosx>
apeiros_: probably
cousine has joined #ruby
<atmosx>
apeiros_: I need to gather data to a database from 15-20 different hosts. What you think is the best way to sync the db?
peregrine81 has quit [Quit: Computer sleeping.]
<apeiros_>
why? what problems are you experiencing with your current method?
<apeiros_>
also, what does "gather data" mean?
xAndy is now known as xandy
cousine has quit [Remote host closed the connection]
jds_ has quit [Remote host closed the connection]
mpereira has quit [Ping timeout: 260 seconds]
<atmosx>
I don't have a current method becauase I use sqlite3 on localhost now
<atmosx>
I'm making about 1.000 queries on a search engine per day. If I do more I get banned
xandy is now known as xAndy
peregrine81 has joined #ruby
chendo has quit [Ping timeout: 252 seconds]
mpereira has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
peregrine81 has quit [Client Quit]
<atmosx>
however 1.000/day is too little for my db to get all the data it needs. I must make 410.000 requests, so I'm gonna install a ruby program that will do the retrieval in a couple of different machines/ips
<atmosx>
I'll try to find 10 to 15
<atmosx>
but I need to sync the data to make sure none retrieves the same data
<atmosx>
the prob is that the script will sit in machines of people I don't feel like trusting, wich user/pass on my system
<atmosx>
I mean, no prob but I'd like to avoid it
Cultofmetatron has joined #ruby
<apeiros_>
then let your machine be the main machine, which polls the data from the other machines and pushes instructions to them
wroathe has quit [Ping timeout: 260 seconds]
<apeiros_>
i.e., your machine merely coordinates the querying
chendo_ has joined #ruby
<atmosx>
apeiros_: how hoadd
samphippen has quit [Quit: Computer has gone to sleep.]
<atmosx>
hmm
<WhereIsMySpoon>
Sorry if this is vague, but I know there's a special name for a Ruby "class" that *only* describes the way in which information which is going to be put into an object (say json) should be laid out in that object
<WhereIsMySpoon>
anyone got a clue?
<atmosx>
apeiros_: how do I approach this? I'm thinking of swithing to txt/yaml
<atmosx>
for the db
<apeiros_>
WhereIsMySpoon: presenter pattern?
QKO has quit [Ping timeout: 260 seconds]
<WhereIsMySpoon>
apeiros_: im thinking of a special extension type to teh file
<apeiros_>
atmosx: you can transfer data between the servers using drb for example
Russell^^ has quit [Quit: Russell^^]
<apeiros_>
WhereIsMySpoon: you're probably thinking of some railsism
<apeiros_>
hence #rubyonrails
QKO has joined #ruby
<WhereIsMySpoon>
apeiros_: oops yea
<Owiec>
Is it possible to get hash with string.scan? Example blocks = @output_template.scan /(?<found>%\[ (?<name>[[:alnum:]]+) : (?<content>.+?) \]%)/mx
<apeiros_>
Owiec: see Hash::[]
<Owiec>
and the result doesnt have hash :found, :name, :content
<atmosx>
apeiros_: I'll look at it thanks. I was thinjing via ssh but that needs user/pass
<apeiros_>
(note that :: denotes *class* methods, not instance methods)
<atmosx>
and I'd like to avoid that
hcs has joined #ruby
<apeiros_>
Owiec: though, a hash with 3 capturing groups makes little sense
<apeiros_>
hashes are key-value, not key-value-somethingodd
jackdanger has joined #ruby
dagnachew has joined #ruby
havenn has joined #ruby
Michael__ has joined #ruby
<Owiec>
but this work /<(?<starttag>.+)>(?<content>.+)<\/(?<endtag>.+)>/i.match "<html>string</html>"
nari_ has joined #ruby
<Owiec>
if i use this with scan doesnt
ilyam has quit [Quit: ilyam]
<Owiec>
i am sorry but i dont uderstand what you suggest me to use?
<reactormonk>
Owiec, never parse html with regexp...
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
<Owiec>
reactomonk, its only example of working regexp with hash
<Owiec>
i need this with string.scan to something else
<Owiec>
i want this because it make code more readable
<apeiros_>
Owiec: you mean you want *an array of hashes*, not a single hash?
alanp_ has joined #ruby
alanp_ has quit [Read error: Connection reset by peer]
alanp_ has joined #ruby
<Owiec>
apeiros_: yes
<apeiros_>
also, .match does *not* give you a Hash
<apeiros_>
you may want to pay closer attention to what ruby/irb reports back to you…
<Owiec>
apeiors_: ok its MatchData object
<apeiros_>
you can get an array of MatchData objects by doing string.enum_for(:scan, /your regex/).map { $~ }
<apeiros_>
Owiec: tab completion for nicks - most irc clients have it
<apeiros_>
also, what reactormonk said - parsing html with regexen is a bad idea
<Owiec>
apeiros_: i am using webchat, but yes it have this. i didnt try :)
<shadewind>
is there a way to disable object instantiation using new? I'm writing a C extension and I want to Data_Wrap_Struct a pointer when calling some other method which creates an object
<Owiec>
apeiros_: ok so i will ask in other side: @output_template.scan /(?<found>%\[ (?<name>[[:alnum:]]+) : (?<content>.+?) \]%)/mx do |block|
<shadewind>
but just creating a new instance just like that is not meaningful in this case
<Owiec>
and i will be happy if i can write block[:content]
<shadewind>
but maybe I'm not doing this right
<Owiec>
not block[2]
<Owiec>
it make code more redeable.
alanp has quit [Ping timeout: 252 seconds]
jackdanger has quit [Quit: Leaving.]
<apeiros_>
Owiec: as said, use $~, or Regexp.last_match
<Owiec>
apeiros_: so any other good practic to make code more redeable in this case?
monkegjinni has joined #ruby
<WhereIsMySpoon>
apeiros_: seems presenter pattern is what i wanted, after looking it up
<WhereIsMySpoon>
just offload presentation logic to something so that controller isnt bloated
arya has quit [Ping timeout: 240 seconds]
<shadewind>
havenn: that's probably what I want
tjbiddle has joined #ruby
<Owiec>
apeiros_: using $~ in this case its not exatly what i suspect
<shadewind>
any C extension wizards in here? what's the common idiom for wrapping C types in Ruby objects? wrap it in the user accessible object or wrap it in another object only accessible internally?
<apeiros_>
Owiec: yeah, I can't help with "does not what I want".
Cultofme_ has joined #ruby
jrajav has quit []
<Owiec>
apeiros_: just asking because mayby ruby have other solution, i am just learning this language
<Owiec>
so i dont know about my think i guess :)
<Owiec>
*many
foofoobar has quit [Quit: bb]
<apeiros_>
Owiec: if you do not describe your problem, there's no way I can help
bigmac has joined #ruby
<shevy>
you must learn to read the mind!
<apeiros_>
and no, "It doesn't do what I want" is *by no means* a usable problem description.
Cultofmetatron has quit [Ping timeout: 246 seconds]
<apeiros_>
shevy: I stopped doing that. people freak out if I do.
nitti has joined #ruby
Virunga has quit [Remote host closed the connection]
monkegjinni has quit [Ping timeout: 276 seconds]
<Owiec>
as i side, i have @output_template.scan /(?<found>%\[ (?<name>[[:alnum:]]+) : (?<content>.+?) \]%)/mx do |block| and i want write in loop block[:found] instead block[1] or something like that. Only to make code more readable.
<Owiec>
*said, to many misspels :)
zaki[] has quit [Read error: Operation timed out]
headius has joined #ruby
<Owiec>
but mayby just cant?
<apeiros_>
I told you to use $~.
<apeiros_>
block is not $~.
<apeiros_>
and you still don't say what problem you have with $~.
<apeiros_>
and I don't have the patience to pull all the info out of your nose, sorry.
Jasko has quit [Read error: Connection reset by peer]
nitti has quit [Ping timeout: 240 seconds]
Jasko has joined #ruby
arya has joined #ruby
shtirlic has joined #ruby
adeponte has quit [Remote host closed the connection]
<Owiec>
apeiros_: ok, thx for help. I will beat this myself :)
vickaita has joined #ruby
u89 has quit [Remote host closed the connection]
monkegjinni has joined #ruby
dmiller has quit [Remote host closed the connection]
frogstarr78 has joined #ruby
dagnachew has quit [Quit: Leaving]
dagnachew has joined #ruby
vickaita has quit [Ping timeout: 252 seconds]
mercwithamouth has quit [Ping timeout: 240 seconds]
headius has quit [Quit: headius]
monkegjinni has quit [Ping timeout: 246 seconds]
Tearan has joined #ruby
_bart has quit [Quit: _bart]
mikepack has quit [Remote host closed the connection]