apeiros_ changed the topic of #ruby to: programming language || ruby-lang.org || Paste >3 lines of text in http://pastie.org || Rails is in #rubyonrails
krz has joined #ruby
Criztian has quit [Remote host closed the connection]
seanstickle has joined #ruby
tayy has joined #ruby
sebastorama has quit [Quit: Computer has gone to sleep.]
fridim_ has quit [Quit: Quitte]
<dsimon>
stanigator, so did the problem go away when you ran bundle install?
<stanigator>
no
<stanigator>
dsimon: problem reappeared
<dsimon>
hm
<dsimon>
well
<dsimon>
cucumber 1.2 won't resolve for a requirement for cucumber
<dsimon>
er
<dsimon>
cucumber ~> 1.0
pygospa has quit [Disconnected by services]
pygospa has joined #ruby
<stanigator>
dsimon: here's a printout of what i've seen so far
<dsimon>
hm, actually, nvm
<dsimon>
as i understand it, only cucumber 2 and above would be unsuccessful
<stanigator>
dsimon: i don't know how to make it point to 1.2, or install 1.0
<dsimon>
you don't want to do that
<stanigator>
dsimon: i just ran "sudo gem install cucumber"
<dsimon>
for one thing, you don't need to uninstall anything because bundle can ignore unwanted versions
<dsimon>
and you don't want to resolve bundler issues with "gem install"
prtksxna has quit [Remote host closed the connection]
<dsimon>
because bundle will ignore any gems that aren't required, directly or indirectly, in the gemfile
<stanigator>
ic
<dsimon>
in your Gemfile.lock
<dsimon>
does it mention cucumber anywhere
nari_ has quit [Ping timeout: 244 seconds]
<stanigator>
dsimon: no
ivancv has quit [Remote host closed the connection]
cpruitt has joined #ruby
tresk has quit [Ping timeout: 265 seconds]
davidpk has quit [Quit: Computer has gone to sleep.]
otters has quit [Read error: Connection reset by peer]
otters has joined #ruby
telos has quit [Ping timeout: 260 seconds]
davidpk has joined #ruby
mlevin_ has quit [Quit: Computer has gone to sleep.]
ThatDudeGuy_ has quit [Quit: ThatDudeGuy_]
weasels has joined #ruby
otters has quit [Read error: Connection reset by peer]
<dsimon>
stanigator, try adding a cucmber line to your gemfile then
<dsimon>
then re-run bundler
<dsimon>
make sure its
replore has joined #ruby
<dsimon>
gem "cucumber", "~> 1.0"
seanstickle has quit [Quit: seanstickle]
<stanigator>
dsimon: i should add gem "cucumber", "~> 1.0" in my gemfile?
<markjwlee>
Hi everyone... I'm currently running a server program using bundle exec... what would be the best way to get the program to run as a service on startup? (I'm running CentOS 5.7)
jd has joined #ruby
jd has quit [Changing host]
jd has joined #ruby
azm has quit [Ping timeout: 245 seconds]
<dsimon>
stanigator, yes
berserkr has quit [Quit: Leaving.]
Jade has quit [Disconnected by services]
jd is now known as Jade
techhelp has quit [Quit: This computer has gone to sleep]
cascalheira has joined #ruby
* fowl
wants to buy a diner, and staff it with only coprophiliacs
Ontolog has quit [Remote host closed the connection]
liluo has quit [Remote host closed the connection]
davidpk has quit [Quit: Computer has gone to sleep.]
bluenemo has quit [Remote host closed the connection]
chessguy has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 245 seconds]
deobald__ has quit [Ping timeout: 260 seconds]
Urth|Away is now known as Urthwhyte
jtrudeau has quit [Quit: Leaving]
nej has quit [Remote host closed the connection]
godzirra has joined #ruby
nej has joined #ruby
<godzirra>
Hey guys. Why would I get the error in sqlite3 and ruby saying that bind_param can't prepare Symbol?
weasels has quit [Read error: Connection reset by peer]
otters has joined #ruby
kevinbond has quit [Quit: kevinbond]
willyum has quit [Ping timeout: 245 seconds]
mahmoudimus has joined #ruby
griffindy has joined #ruby
looopy has quit [Remote host closed the connection]
Urthwhyte is now known as Urth|Away
Ontolog has joined #ruby
Mohan has quit [Ping timeout: 272 seconds]
Mohan has joined #ruby
Mohan has quit [Changing host]
Mohan has joined #ruby
Norrin_ has joined #ruby
Norrin__ has quit [Ping timeout: 260 seconds]
emmanuelux has quit [Remote host closed the connection]
advorak has quit [Read error: Connection reset by peer]
cascalheira has quit [Remote host closed the connection]
Ontolog has quit [Remote host closed the connection]
weasels has joined #ruby
Soul_Est has quit [Quit: WeeChat 0.3.7]
advorak has joined #ruby
otters has quit [Ping timeout: 252 seconds]
fukushima has quit [Ping timeout: 265 seconds]
L-----D has joined #ruby
tar_ has quit [Quit: tar_]
looopy has joined #ruby
fukushima has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
fivetwentysix has joined #ruby
<godzirra>
Anyone? lol
<seanstickle>
Putting the full error to pastie.org or a gist will be more helpful.
ConstantineXVI has quit [Remote host closed the connection]
<godzirra>
One moment.
gtuckerkellogg has joined #ruby
tar_ has joined #ruby
fulmato has joined #ruby
kevinbond has joined #ruby
cousine has joined #ruby
mikeycgto has quit [Ping timeout: 246 seconds]
cousine has quit [Remote host closed the connection]
cousine has joined #ruby
AnarchoTroll has joined #ruby
<AnarchoTroll>
Is there a way to run a block of code on the main thread in ruby?
CheeToS has quit [Ping timeout: 240 seconds]
_2easy has quit [Quit: Lost terminal]
jimeh has quit [Ping timeout: 265 seconds]
amalvagomes has joined #ruby
looopy has quit [Remote host closed the connection]
seanstickle has quit [Quit: seanstickle]
jernejz has joined #ruby
<heftig>
AnarchoTroll: run an event loop like EventMachine in the thread
<banisterfiend`>
heftig: in eventmachine use: EM.next_tick { your block }
<godzirra>
Hey guys. Why would I get the error in sqlite3 and ruby saying that bind_param can't prepare Symbol? http://pastie.org/3942583
<heftig>
AnarchoTroll: core ruby only provides Thread.raise
<heftig>
er, Thread#raise
nej has quit [Ping timeout: 240 seconds]
<AnarchoTroll>
I see
<AnarchoTroll>
Well, maybe thats not the best way to do what I am trying to do
<heftig>
godzirra: is i.id, r.name, i.status or i.instance_type a Symbol?
<heftig>
might need a to_s
<banisterfiend`>
AnarchoTroll: well you can't just break into the main thread
<banisterfiend`>
AnarchoTroll: whatever you do, has to be scheduled to run on the main thread
<banisterfiend`>
AnarchoTroll: so you have to have some kind of event loop going on
<AnarchoTroll>
I need to keep a thread opened in my app listening for pubsub redis events. When these events are received I am going to persist something to the database
<AnarchoTroll>
as of now, I don't know if rails automatically synchronizes writes to the database
<AnarchoTroll>
so I was thinking about scheduling it to run on the main thread
<heftig>
activerecord should be threadsafe
eka has quit [Remote host closed the connection]
<AnarchoTroll>
really? cool
<AnarchoTroll>
so there is no need for me to worry about it
S3kx has joined #ruby
<AnarchoTroll>
I thought that maybe I should check out a connection in the connectionpool
<AnarchoTroll>
if active record is thread safe then I don't have to worry about anything
mikeycgto has joined #ruby
<godzirra>
heftig: Each of them should be a string. How do I tell for sure?
<heftig>
check out the .class
cousine has quit [Remote host closed the connection]
<heftig>
use pry or a debugger
punkrawkR has quit [Read error: Connection reset by peer]
mikeycgto has quit [Remote host closed the connection]
<godzirra>
pry? Thanks. I'll google.
<banisterfiend`>
heftig: i didnt know you use pry
noodletraveler has joined #ruby
vitoravelino is now known as vitoravelino`afk
jameshyde has joined #ruby
emet has quit [Remote host closed the connection]
<bnagy>
banisterfiend`: nobody does, we just recommend it to noobs :>
wmoxam has quit [Ping timeout: 240 seconds]
defendguin has joined #ruby
<banisterfiend`>
bnagy: heh heh
<minijupe>
how do I do a match on a string WITHOUT using regex. I need a simple string to string match.
<bnagy>
==
<banisterfiend`>
haha
<banisterfiend`>
minijupe: was that right? :)
<minijupe>
a substring match basically
<minijupe>
is string x in string y
<bnagy>
oh. include?
<minijupe>
it looks like include?
<minijupe>
ha
<bnagy>
include? just wraps index
Ontolog has joined #ruby
hemanth has quit [Ping timeout: 244 seconds]
<banisterfiend`>
bnagy: how did u find that out?
<bnagy>
reading the source?
<banisterfiend`>
bnagy: how did u read the source
<bnagy>
I was just wondering if they used a regexp internally :)
<banisterfiend`>
bnagy: i mean how did u locate teh source to read it
<bnagy>
the ruby-doc site has 'click to toggle source' for everything
quesada has joined #ruby
urlwolf has quit [Ping timeout: 246 seconds]
<banisterfiend`>
bnagy: oh ok
hemanth has joined #ruby
<banisterfiend`>
bnagy: i'm trying to get u to use pry, if u were u could just have typed: show-source String#include? and it would have told u the same answer. I predict u will use it soon, and send me sweet pvt msgs here on irc every morning
looopy has joined #ruby
<bnagy>
:)
riyonuk has quit [Quit: riyonuk]
<bnagy>
could happen, but I'm pretty old, dude. I don't do well with change.
xhh has joined #ruby
willyum has joined #ruby
ahayworth has joined #ruby
ahayworth has quit [Client Quit]
ahayworth has joined #ruby
Ontolog has quit [Remote host closed the connection]
Solnse has joined #ruby
mpereira has joined #ruby
arcresu has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
radic_ is now known as radic
ahayworth is now known as drewbug01
manizzle has joined #ruby
arcresu has quit [Client Quit]
arcresu has joined #ruby
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
ElderFain has quit [Read error: Connection reset by peer]
drewbug01 has quit [Quit: leaving]
<rking>
So, Metaprogramming Ruby (the book) is really solid. I'm 1/3rd the way through, and I've learned less evil stuff than I expected, mostly really good foundational explanations of how things work.
<seanstickle>
It is a splendid book indeed
test34- has joined #ruby
test34- has quit [Changing host]
test34- has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
neilcarvalho has quit [Quit: neilcarvalho]
test34 has quit [Ping timeout: 265 seconds]
Alantas has joined #ruby
looopy has quit [Remote host closed the connection]
ZachBeta has quit [Quit: Computer has gone to sleep.]
ZachBeta has joined #ruby
Seventoe1 is now known as Seventoes
kawa_xxx has joined #ruby
manizzle has joined #ruby
seanstickle has quit [Quit: Nihil sub sole novum]
A124 has joined #ruby
Karmaon|away is now known as Karmaon
googya has quit [Quit: Leaving.]
niklasb has quit [Ping timeout: 245 seconds]
gtuckerkellogg has joined #ruby
austinbv has joined #ruby
hemanth has quit [Ping timeout: 245 seconds]
kawa_xxx has quit [Read error: Connection reset by peer]
kawa_xxx has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
LongkerDandy has joined #ruby
Progster has quit [Ping timeout: 265 seconds]
Dreamer3 has quit [Ping timeout: 245 seconds]
noodletraveler has quit [Ping timeout: 245 seconds]
robacarp has quit [Ping timeout: 245 seconds]
mksm has quit [Ping timeout: 245 seconds]
test34- has quit [Ping timeout: 248 seconds]
Gekz_ has joined #ruby
Gekz_ has joined #ruby
test34 has joined #ruby
test34 has quit [Changing host]
test34 has joined #ruby
Asher1 has joined #ruby
fbernier has joined #ruby
godzirra has quit [Ping timeout: 245 seconds]
Asher has quit [Ping timeout: 245 seconds]
vitoravelino`afk has quit [Ping timeout: 245 seconds]
Targen_ has joined #ruby
godzirra has joined #ruby
L-----D has quit [Ping timeout: 245 seconds]
sejo has quit [Ping timeout: 245 seconds]
Targen has quit [Ping timeout: 245 seconds]
Gonzih has quit [Ping timeout: 245 seconds]
locriani has quit [Ping timeout: 245 seconds]
semarjt has quit [Ping timeout: 245 seconds]
Gekz has quit [Ping timeout: 245 seconds]
jeremy_c has quit [Ping timeout: 245 seconds]
locriani_ has joined #ruby
orealis has quit [Ping timeout: 265 seconds]
Asher1 has quit [Remote host closed the connection]
Asher has joined #ruby
noodletraveler has joined #ruby
mksm has joined #ruby
orealis has joined #ruby
robacarp has joined #ruby
Phrogz has joined #ruby
mksm is now known as Guest74504
robacarp is now known as Guest38418
sejo has joined #ruby
jeremy_c has joined #ruby
palmfrond has quit [Quit: palmfrond waves good bye]
Dreamer3 has joined #ruby
austinbv has quit [Quit: austinbv]
kawa_xxx has quit [Remote host closed the connection]
vitoravelino`afk has joined #ruby
palmfrond has joined #ruby
wvms has left #ruby [#ruby]
kevinbond has joined #ruby
LBRapid has joined #ruby
austinbv has joined #ruby
A124 has left #ruby [#ruby]
andrewhl has joined #ruby
rboyd has quit [Quit: rboyd]
mpereira has quit [Ping timeout: 260 seconds]
riyonuk has joined #ruby
nai has joined #ruby
cordoval has joined #ruby
Gonzih has joined #ruby
googya has joined #ruby
semarjt has joined #ruby
austinbv has quit [Quit: austinbv]
vertroa has joined #ruby
td123 has quit [Read error: Connection reset by peer]
ThatDudeGuy_ has joined #ruby
davidpk has joined #ruby
advorak has quit [Quit: Leaving]
c0rn has joined #ruby
cordoval has left #ruby [#ruby]
kil0byte has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 240 seconds]
tommyvyo has joined #ruby
kevinbond has quit [Quit: kevinbond]
kil0byte has joined #ruby
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
kil0byte has quit [Client Quit]
td123 has joined #ruby
manizzle has quit [Ping timeout: 244 seconds]
CannedCorn has quit [Quit: Computer has gone to sleep.]
riyonuk has quit [Quit: riyonuk]
LongkerDandy has quit [Quit: Leaving]
xiaotian has quit [Quit: Computer has gone to sleep.]
gokul has joined #ruby
macmartine has quit [Quit: macmartine]
rippa has joined #ruby
nipra has joined #ruby
LBRapid has quit [Read error: Connection reset by peer]
<shevy>
anyone happens to know whether it is possible to intercept mouse-click-events in ncurses? Like I display a string, and I want to allow the user to click it, and then I trigger a specific action.
<shevy>
hemanth whoa ... that even has ruby bindings?
<Tasser>
and work to be done
<becom33>
in the same loop :/
<hemanth>
shevy, heh heh ya
<Tasser>
shevy, xdotool isn't for ncurses
azm has quit [Ping timeout: 244 seconds]
schovi has joined #ruby
<hemanth>
Tasser, true, but if the goal was to intercept mouse-click-events
pdtpatr1ck has quit [Quit: pdtpatr1ck]
<hemanth>
then he could do with xdotool, no?
<shevy>
Tasser, well I want to actually use anything where I can respond to mouse-click events
<shevy>
my end goal is to enable this in my pseudo-shell, so that a user can click on a displayed string (that "holds" the directory), and then enter that directory
<Tasser>
hemanth, yes, but it's not bound to ncurses, but to the X running the shell running the ncurses
yankov has quit [Quit: yankov]
<shevy>
any solution that allows me this is a good one :)
<hemanth>
Tasser, oh ya, forgot that, me very much confined to X window
tvw has joined #ruby
lampe2 has joined #ruby
abionic has joined #ruby
<becom33>
https://gist.github.com/2760833 in this I want get output of those 3 values . how can I do that . I want all of them in one loop
<lampe2>
has someone used gmaps4rails and added a event listener?
prtksxna has joined #ruby
minijupe has quit [Quit: minijupe]
<Tasser>
shevy, use a real™ toolkit
ABK has quit [Ping timeout: 276 seconds]
Guest38008 has quit [Read error: Operation timed out]
<banisterfiend`>
Tasser: are you ready for a skype chat tonight?
<banisterfiend`>
Tasser: i think we organized it last week
<banisterfiend`>
iirc
krishnaveda has joined #ruby
<shevy>
Tasser yeah as last resort. right now I want to be able to just use something like "xterm" and enable such functionality, when possible. it somehow must be possible to intercept mouse-click-events on displayed strings :(
notjohn has quit [Quit: notjohn]
d3c has quit [Quit: Quit]
hadronzoo has quit [Quit: hadronzoo]
jprovazn has joined #ruby
mdw has quit [Remote host closed the connection]
bluOxigen has joined #ruby
igotnolegs has quit [Quit: Computer has gone to sleep.]
eka has joined #ruby
acrocity_ has quit [Ping timeout: 276 seconds]
shruggar has quit [Ping timeout: 252 seconds]
<greyEAX>
how deep will a ruby hash go?
<shevy>
what means deep
<greyEAX>
can it be like Name > Phone > Cell Phone, Home Phone
<shevy>
it can go to the bottom of the ocean and back if you BELIEVE in it
<shevy>
if you nest hashes inside hashes then sure
<greyEAX>
oic
foofoobar has joined #ruby
<greyEAX>
how would i access a nested hash?
<shevy>
you could also use just one level hash, and assume that, if the key exists, it points at another part of that hash
<greyEAX>
oic
<greyEAX>
kk
<shevy>
well, hash['key1']['key2']['key3']
<shevy>
but it may be easier to use a method for that
<shevy>
search_for('key1')
maesbn has joined #ruby
<shevy>
and have that return the data you need
<bnagy>
the 3G network returns!
yugui_zzz is now known as yugui
fukushima has joined #ruby
<bnagy>
I get so much work done when all sources of internet fail simultaneously :/
<greyEAX>
shevy, oic thx
<shevy>
bnagy hehe
zommi has joined #ruby
<bnagy>
ok rubynauts, I have a bunch of commandline scripts that I am invoking from a single wrangler script, but parsing the outputs is tiresome
<bnagy>
I can modify the sub-scripts. Was thinking of adding a -m option for machine parseable (yaml or similar) output?
c0rn has joined #ruby
<shevy>
yay!
dangerousdave has joined #ruby
<bnagy>
any other ideas? I would jiust take the engines from each script and use them directly, but it's fiddly, they all interface with a networking layer and have different options blah blah
willyum has quit [Remote host closed the connection]
dangerousdave has quit [Client Quit]
piotr_ has joined #ruby
sparrovv has joined #ruby
keanehsiao has quit [Quit: keanehsiao]
jackiechan0 has joined #ruby
<jackiechan0>
hello
jameshyde has quit [Remote host closed the connection]
heftig has quit [Quit: leaving]
cezar has joined #ruby
arturaz has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
rushed has joined #ruby
tomzx has quit [Ping timeout: 276 seconds]
cezar has quit [Client Quit]
otters has quit [Read error: Connection reset by peer]
otters has joined #ruby
<eddie_>
jackiechan0: hello
<jackiechan0>
eddie_: hi :)
<jackiechan0>
eddie_: do you know the Chris Pine's book learn to program about Ruby ?
<eddie_>
No
<eddie_>
jackiechan0: Why do you need a book?
<jackiechan0>
eddie_: anyway i'm studying and at the end of chapter it told me to do an exercize, i solved the exercize in another way and i really don't understand a step that he did
<jackiechan0>
eddie_: to learn
<jackiechan0>
eddie_: can i paste the tow exercize solutions ?^
<jackiechan0>
bnagy: that's an advanced version :) did u write it right now ?
<bnagy>
it's buggy when it goes from 2->1 but whatever. They're both more idiomatic than that book's (and your) solution
<bnagy>
jackiechan0: no I keep a huge list of links to solutions for beginner coding problems
<jackiechan0>
bnagy: i know but i have to follow what the books says, then i'll pass to an advanced one
<jackiechan0>
bnagy: i know these lists too, but i will not learn nothing just copying and pasting
<jackiechan0>
bnagy: the book i'm reading as his own solutions for this problem at the end too
<bnagy>
jackiechan0: ... yes I wrote it just then. Is joke.
<jackiechan0>
bnagy: the most important thing is that i understood the use of while, i'm able to set a loop and i understood how the variables could change value
<jackiechan0>
bnagy: ah ok:) tnx for ur time
<bnagy>
yeah except that while and until aren't really used all that often
<bnagy>
IRL
<jackiechan0>
bnagy: lol
moshef has joined #ruby
<jackiechan0>
bnagy: it's teaching me unuseful things :)
<bnagy>
well they're important programming concepts, I guess, they're just not particularly idiomatic ruby
<bnagy>
they're definitely the most expressive _sometimes_
<jackiechan0>
ok
sqlbyme has joined #ruby
ukwiz has joined #ruby
<becom33>
https://gist.github.com/2760833 I used multiple hashes here . but Im having a trouble getting a output out of it :/ . I have mentioned the way I want the output . help please
adeponte has joined #ruby
_adeponte has quit [Read error: Connection reset by peer]
<bnagy>
becom33: myhash.values.each
adeponte has quit [Read error: Connection reset by peer]
adeponte has joined #ruby
PapaSierra has joined #ruby
<bnagy>
but I do not endorse this approach to something called DB
<becom33>
DB is just sample name :/
blacktulip has joined #ruby
<becom33>
btw still I get the results as
<becom33>
core core module
<becom33>
jhone is ok matt fine rude seena sucks
<becom33>
jhone matt ceena
luoluoluo has joined #ruby
<shevy>
man
<shevy>
are you drunk again
<becom33>
keep catagorising aside . how can I get the values in line
<PapaSierra>
I'm trying to use vagrant, someone has made a box that contains chef recipes. now on win7 i'm trying to set up the box. I believe this entire process runs using ruby. I'm getting this error http://pastebin.com/W8rki12T I'm not sure where the error is coming from. I'm using these instructions: https://github.com/ymainier/vagrant-lamp
<becom33>
shevy, not really . but just wokeup . sleepy :/
<bnagy>
becom33: ohhhh, I see what you want. No.
<bnagy>
that's an insane thing to try and do with that structure
<bnagy>
you can just initialize an OpenStruct from a hash, can't you?
<bnagy>
I don't use them much
<eddie_>
the keys in the hash may vary
SmoothSage has joined #ruby
<bnagy>
uh, but all that snippet does is o=OpenStruct.new( a_hsh ) right?
<eddie_>
let me check
rsb38 has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
Araxia_ has quit [Quit: Araxia_]
simao has joined #ruby
<rsb38>
I'm getting the following error - "SSL_connect returned=1 errno=0 state=SSLv3 read server certificate". Is there a way to fix this on Windows?
<eddie_>
bnagy: Thanks
<eddie_>
i was doing it so wrong
<jackiechan0>
eddie_: yeah :)
<bnagy>
:)
neersighted is now known as neersighted[d]
stefanp has joined #ruby
stefanp has quit [Changing host]
stefanp has joined #ruby
mneorr has joined #ruby
ananthakumaran has joined #ruby
Jb_ has joined #ruby
Ammar01 has joined #ruby
rsb38 has quit [Client Quit]
cha1tanya has quit [Read error: Connection reset by peer]
mdw has quit [Remote host closed the connection]
piotr_ has joined #ruby
piotr__ has quit [Ping timeout: 246 seconds]
zeromodulus has quit [Remote host closed the connection]
mneorr_ has joined #ruby
mneorr_ has quit [Read error: Connection reset by peer]
r0bby has joined #ruby
mneorr_ has joined #ruby
mneorr_ has quit [Read error: Connection reset by peer]
mneorr has quit [Ping timeout: 244 seconds]
moshef has quit [Quit: moshef]
kawa_xxx has quit [Remote host closed the connection]
asterix7890 has joined #ruby
berserkr has joined #ruby
ciopte7 has quit [Quit: ciopte7]
mneorr has joined #ruby
mneorr_ has joined #ruby
mneorr has quit [Read error: No route to host]
r0bby has quit [Ping timeout: 252 seconds]
kawa_xxx has joined #ruby
kil0byte_ has quit []
kil0byte has joined #ruby
Vainoharhainen has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
tatsuya_o has joined #ruby
ryanf has quit [Quit: leaving]
mahmoudimus has joined #ruby
Urthwhyte is now known as Urth|Away
foofoobar has quit [Quit: bb]
mahmoudimus has quit [Client Quit]
sspiff has joined #ruby
sspiff has quit [Changing host]
sspiff has joined #ruby
iocor has joined #ruby
asterix7890 has quit [Quit: Sto andando via]
sparrovv has left #ruby ["WeeChat 0.3.7"]
sparrovv has joined #ruby
flype has joined #ruby
sebcioz has joined #ruby
<sebcioz>
WEEKEND PROJECT: Hacker News for Rubyists: http://www.rubycious.com. Instead of following houndreds of users on twitter to stay up to date with ruby and rails simply visit just one page.
Shahor has joined #ruby
kawa_xxx has quit [Remote host closed the connection]
<banisterfiend`>
sebcioz: that kind of project has been done, and failed multiple times in the past
<banisterfiend`>
sebcioz: i know of at least 3-4 different attempts and they all failed hard
<banisterfiend`>
sebcioz: there's even one with practiaclly teh same name as that
<banisterfiend`>
something like rubylicio.us
cantonic has joined #ruby
bluenemo has joined #ruby
<banisterfiend`>
actually, rublicio.us was it ;)
piotr__ has joined #ruby
piotr_ has quit [Ping timeout: 246 seconds]
Shahor has quit [Client Quit]
<sebcioz>
banisterfiend`: thanks, i didn't know. But it was written in just few hours, so it won't be shame if no one will use it. And it good place to store links just for myself ;)
<banisterfiend`>
sebcioz: well maybe yours can be the one that succeeds ;)
kawa_xxx has joined #ruby
c0rn has quit []
omry has joined #ruby
<banisterfiend`>
sebcioz: yours looks nice btw
<banisterfiend`>
i like the design more than some of the others
remmy4441 has joined #ruby
<bnagy>
banisterfiend` uses the NLP / speed seduction approach to #ruby - first he starts with some negging, then he slips in a few compliments
<banisterfiend`>
bnagy: i just realized i was being a dick
<bnagy>
test stuff in irb, if it's that simple a question :)
<greyEAX>
oic
<bnagy>
or pry
<Hanmac>
bnagy: i prefer tabs with an indent of 2, because imo tabs are has more meaning in formating ...
<shevy>
x = 'bla'; y = 'bla'; a = 'foo'; b = 'foo'; puts 'yup works' if (x == y) && (a == b)
kawa_xxx_ has quit [Remote host closed the connection]
<shevy>
that is what you could have done in irb :P
<bnagy>
Hanmac: nobody on this earth is going to get me into debating the merits of tabs versus spaces
<bnagy>
I fell for that the first 82 times, now I'm done
<shevy>
becom33 perfect ;P
telos has quit [Quit: Lost terminal]
<shevy>
I used to use tabs
<shevy>
until the day when I used spaces to align comments
<shevy>
then I switched to 2 spaces only
<becom33>
shevy, not really . please suggest if you have a more simple a method for that structure
<shevy>
becom33, nono, your ruby code, your ruby style
<becom33>
shevy, if its stupid . come on a if you have a best way I might learn somthing
<shevy>
you could change @myhash to just @hash though, unless you plan of ever using ... @yourhash @ourhash @herhash ...
<shevy>
no you can only learn by doing mistakes
<hoelzro>
is there a library for embedding a sandboxed Ruby interpreter within a Ruby environment? I've looked at rubygems, but either there's nothing fitting that description, or my search keywords are inadequate
<bnagy>
becom33: for bonus points, you can think of some problems with that structure
<bnagy>
becom33: for example, if you started adding a lot of users
<becom33>
shevy, sure
<becom33>
hmm bnagy lemme se
<bnagy>
hoelzro: what kind of sandbox do you mean? like... eval? :>
<Hanmac>
hoelzro not that i know but you can increase $SAFE with works like in a sandbox
<shevy>
hoelzro _why wrote a sandbox once
<shevy>
perhaps that code is still out there in the wild somewhere
<bnagy>
if you want this to run untrusted code 'securely' though, then "don't do that"
<shevy>
I email-asked him for the code back then and he replied that "it is not release ready yet" or something like that :(
<hoelzro>
bnagy: something a little stricter than eval
<hoelzro>
Hanmac: I will look into $SAFE, thanks
<hoelzro>
I'm not looking for locked-down security, no
<bnagy>
ok
Helius has joined #ruby
<bnagy>
if I had to do it I think I would connect an interpreter in chroot to drb or something
<shevy>
I am sure bnagy secretly already has something like that in code :>
<bnagy>
probably even faster / easier than messing with SAFE etc
<hoelzro>
I *was* thinking about running a subprocess with restricted permissions
<hoelzro>
but I thought I'd do my homework first
<hoelzro>
I was kind of surprised that one can't have multiple interpreters in the same process
<bnagy>
I can't think of any reason that should be surprising
<hoelzro>
I'm just not used to it
<banisterfiend`>
bnagy: how good is your itnenret there, can u stream video
<bnagy>
no way :)
<bnagy>
plus I'm on 3G at the moment cause the country ISP appears to be broken, Again
<shevy>
the main benefit I see is that you save a few characters
joshman_ has joined #ruby
<Hanmac>
heisenmink, because its a type error that ruby does not like
joshman_ has quit [Client Quit]
<heisenmink>
Hanmac, what type error?
<shevy>
the type error in your pants!
<heisenmink>
daaamn
<bnagy>
Hanmac: works fine for me?
codebeaker has joined #ruby
<shevy>
the first one does not work on ruby 1.8.7 :)))
alem0lars_ has joined #ruby
alem0lars has quit [Ping timeout: 240 seconds]
<Hanmac>
oh ... oO
mengu_ has joined #ruby
<shevy>
hehe
mengu has quit [Quit: Konversation terminated!]
<shevy>
that is the famous Hanmac surprised-sound-on-IRC
<heisenmink>
what confuses me is the [] wrapping, wouldn't that make it an array? And arrays aren't hashes
<shevy>
I can literally hear it
<heisenmink>
afaik at least
<shevy>
heisenmink I think Hanmac kinda copy / pasted from becom33
<shevy>
because becom33 here used that code earlier
<Hanmac>
shevy i looked at the mRuby include files ... and i thought about how my gems can work with mRuby and MRI
Soda has quit [Remote host closed the connection]
<shevy>
hmm
<shevy>
I wonder if my ruby code will work on mRuby at all
<bnagy>
heisenmink: it's a hash in an array
<shevy>
but if mRuby would be very fast, I'd never have to learn lua!
<shevy>
and man
<shevy>
a cRuby
<shevy>
a ruby that could replace C
<heisenmink>
bnagy, oh, so the result would be [ a_hash ] ? Or would it be [ hash1, hash2 ] ?
<bnagy>
one hash
<shevy>
it would be [ { :key => "some value here" } ]
<becom33>
http://codepad.org/EKk13WGc bnagy you mentioned it will be a problem on huge data . please help I'm trying get a flaw here
<shevy>
ewww becom33 is at it again
xhh has quit [Quit: sleeping, as well as coding..]
<krishnaveda>
shevy: Hai :)
<shevy>
krishnaveda hmm ... are you vectorshelv?
<bnagy>
becom33: heh, no, that's not what I said
<becom33>
is at it ?
<shevy>
I am getting them all confused... becom33 is from sri lanka, vectorshelv was from india
<krishnaveda>
shevy: yes... we are two nicks and one soul.. I am his girlfriend :)
<shevy>
...
<shevy>
ok
<shevy>
only vectorshelv can type this
<shevy>
so you are vectorshelv
<becom33>
bnagy, please tell me so
<bnagy>
krishnaveda: wow, sux that you got a guy's name then
<shevy>
becom33 I think it may be easier to read if you use _ in the method names
<shevy>
like addtohash becomes add_to_hash
<becom33>
shevy, sorry I'll do that
<krishnaveda>
shevy: vector likes you all a lot.. shevy Hanmac aperios_ banister and lot of names I forgot
<shevy>
becom33 does that code work?
<bnagy>
becom33: if you use first name as key, you will eventually discover a problem
<shevy>
krishnaveda we already discovered your new nick vectorshelv :P
fermion has joined #ruby
<becom33>
shevy, yes you can see the output in the bottom of the page
<krishnaveda>
bnagy: this name is used here by both guys as well as girls.. and after all its just a nick and not the real name
<shevy>
becom33 well good! then it works
<shevy>
indians are crazy folks :P
<bnagy>
krishnaveda: ok you've convinced me. I completely believe you are a girl now.
<krishnaveda>
shevy: hahaha so cute... you are so cute when you talk that it hardly gives an impression that you are a male.. ;)
<becom33>
bnagy, i am using the name as key
SmoothSage has quit [Ping timeout: 244 seconds]
<bnagy>
becom33: *sigh* OK, think about what would happen if you got a second user called 'matt' (hint hint)
<krishnaveda>
bnagy: well that was not at all my intention.. u guys are really nice compared to ppl in the rails room.. :)
<becom33>
bnagy, awww you mean that . no no dont worry . this is just a example
<shevy>
krishnaveda you must join #rubyonrails now
jbw has joined #ruby
<becom33>
bnagy, its not a name info database :P. i made my problem simplified with another example before pasting into a new code
<krishnaveda>
shevy: I am in there already... :) Indian's are humble nice and loving.. :) I would like all of you guys to come over to India once for a vacation ... it will be fun :)
<becom33>
krishnaveda, your from india ?
<shevy>
krishnaveda too many people there and not enough sandy beach!
<shevy>
I need a tropical island with son and coconuts
<shevy>
uhm
<shevy>
sun
<shevy>
sun and coconots :P
abstrusenick has quit [Quit: abstrusenick]
<becom33>
umm havai might be good for you shevy
<shevy>
hmm
<shevy>
isn't it windy there?
<krishnaveda>
shevy: u name it and we have it.. lot of ppl have some preconcived wrong notions abt India.. and let me tell you, you will know the real India when u visit here.. just like someone making a comment that ruby isnt asnt good as java when he has never worked in ruby at all :)
<shevy>
like 10 meters high waves
nilg has joined #ruby
<becom33>
kinda . then visit SriLanka
<becom33>
shevy, *
<krishnaveda>
shevy: where u from shevy darling?
<shevy>
that looks like one huge island
<shevy>
krishnaveda go change your nick back to vectorshelv, this is confusing
robert_ has joined #ruby
<krishnaveda>
shevy: I have been planning a vacation to Europe.. can anyone tell me which is the most beautiful country to visit in Europe ? Switzerland ?
<bnagy>
srilanka has crabs! Tons and tons and tons of crabs. Mmm crabs.
<shevy>
krishnaveda, northern italy
<becom33>
umm not really . you can goto the middle of the country in a car with in 6 to 7 hrs
<becom33>
in train 3 hrs
<bnagy>
shevy: yes, personally I find the suburbs of Miland and Turin thimply thunning
<krishnaveda>
shevy: hmm...I wanna visit France sweden germany italy belguim norway switzerland and all european beauties :)
<becom33>
any beach has crabs
<bnagy>
no, mud crabs
<heisenmink>
what's up with the 2-space indentation that I see in most ruby projects? I thought 4spaces was the standard by now... not looking for a flamewar, just... should I start using 2 spaces for indentation in ruby projects?
<krishnaveda>
becom33: thats obvious... just like we would find u in the #ruby room and not in the java room :D
<Stefunel>
krishnaveda then go to Romania and have it all in one package the best and the not so good of Europe :)
<shevy>
bnagy well, the towns may not be in great condition. but take treviso, it's the absolutely most beautiful town I've ever seen http://www.initalytoday.com/veneto/treviso/images/treviso.jpg and the whole town is like that kinda. it is like venice, but smaller, and not so dirty
<bnagy>
heisenmink: do what you find readable, unless you want to commit to core
<becom33>
krishnaveda, i dont get it
<shevy>
also venice kinda stinks like decaying fish ... :P
<shevy>
heisenmink 2 spaces until my death!
<heisenmink>
shevy, by what reasoning do you arrive at that oppinion
<shevy>
heisenmink for me it is more practical, I still tend to split at ~80 chars, so using 2 spaces I can layout easier
<bnagy>
which country ended up with Plitvice when yugo. split up? Czech?
<Alantas>
I used 8 as the default for a long time. Then switched down to 4 as more readable. Now I use 2 for everything, and even 1 sometimes if writing up XML.
clockwize has joined #ruby
<shevy>
never heard Plitvice... or perhaps it has a german name hmmm
<Alantas>
And yeah, I use 80-letter width too, manually wrapping lines rather than letting an indented line wrap around to the far left column and look icky.
<clockwize>
hey guys, dose anyone know why Hash#values_at is slow as hell? If I do Hash#values.join("\t") on say 50,000 rows, it takes 4 seconds, if I do Hash#values_at(*ordered_headings).join("\t") it takes 10 minutes?!
<shevy>
Alantas hehe seems everyone comes to 2 eventually :)
<becom33>
shevy, u suggested bluefinish right ? goes it give syntax suggestions ?
<clockwize>
bnagy: what did you mean about try select? The data structure is just a bunch of hashes, rows from a database and an array of keys in the right order
<shevy>
becom33 "bluefish". well, no, it does not give anything useful for ruby hackers, but I also dont think a ruby hacker really needs to get too much help from an IDE or editor
<bnagy>
clockwize: something like hsh.select {|k,v| keys_i_want.include? k}
<shevy>
Alantas haha cool... that looks scary too
<becom33>
whats a ruby hacker ?
<shevy>
Alantas but I could go there and get washed!
<shevy>
becom33, just someone writing ruby code
<becom33>
aww
JohnBat26 has joined #ruby
<Alantas>
We've got pretty moderate weather here (Willamette Valley). Mediterranean climate. Rain, which I like.
<Alantas>
Also fuzzy eclipses.
<shevy>
you like rain?
<Alantas>
Yeah.
<clockwize>
bnagy: ah, I see.. but then, it'll get them out in whatever order they are in the hash, not the order of headings.. either way, I'm confused as to why values_at is so slow! :)
<bnagy>
me too
<bnagy>
do values_to_get.map {|v| the_hsh[v]}
<bnagy>
bah that only gets values, you'd have to zip em
<bnagy>
I'm just interested in the speed
blacktulip has quit [Remote host closed the connection]
<bnagy>
ohwait that's what values_at does anyway :D
<Alantas>
So, what are we trying to do? Pick out all keys from a set of desired keys?
<bnagy>
Hash#values_at being slow
<Alantas>
values_at, plural?
<bnagy>
uh... is there a singular version of that method? :>
<Alantas>
[]
etehtsea has joined #ruby
<shevy>
the plural
<shevy>
"valueses_at" !!!
<bnagy>
lol
<bnagy>
values_all_at_yall
<Alantas>
all_yall_values, yeah
<Alantas>
_at
<Alantas>
If you're wanting to build the results into a string, maybe initialize an empty String, then do an each_pair on the hash (should be O(n) for any container type) and manually += into that string with the ones you're interested in.
<Alantas>
Or stuff the keys you want into a separate Hash and do & or something.
<Alantas>
Ah, can't do that on a hash. Pity.
k-man has left #ruby ["WeeChat 0.3.7"]
<bnagy>
a) use of inject, should be with_object b) use of ternary c) excess string creation via +
<Alantas>
str.concat, then
<bnagy>
C+ (assuming it works) Could Do Better
schaerli has joined #ruby
<Tasser>
wasn't that C++?
<bnagy>
I'm just baffled as to why values_at would be slow
codefarmer has joined #ruby
<bnagy>
the + was for |str,(key,value)|
<codefarmer>
hi. i want to iterate over an array, while knowing both the index and the value. i see each and each_index, but is there a recomended method for working with both, or just use each_index and grab the element like that ?
<bnagy>
codefarmer: .each.with_index on 1.9
<Alantas>
Oh, it's "I'll give that a grade of C+, with remark: Could Do Better", but it sounded like "the language or technique called C+ could do better at this".
<codefarmer>
ahh
<codefarmer>
tx i'll have a look into that
<Alantas>
each_with_index is in 1.8 too, I think.
<bnagy>
Alantas: yeah, english, sloppy binding
<Alantas>
Yeah, it is. ([1,2,3].respond_to? :each_with_index » true)
<bnagy>
I don't have 1.8 to test - what about .each.with_index (Enumerator)
<bnagy>
clockwize: you are going to let us know when you test these other approaches, right?
<bnagy>
I am curious ;)
<clockwize>
bnagy: I'm not personally working on it, my colleague is, I was just asking here as he found this big performance issue and I was curious ;) I've given him your suggestions. I'll let you know if he gets anything soon :)
tonini has joined #ruby
<bnagy>
clockwize: ohhh I can think of some things...if they're long string keys that could be bad
<bnagy>
especially if they have long shared prefixes
francisfish has joined #ruby
<Alantas>
Hash, given the name, probably uses a hash table, rendering that moot.
<Alantas>
If it used a binary tree structure, then yeah.
hakanensari has joined #ruby
<clockwize>
they are just normal column names you'd see in any database table
<Alantas>
(If it used a BST, though, then the keys would always come out sorted. But they come out in unpredictable order, which is characteristic of hashes.)
liluo has quit [Remote host closed the connection]
<bnagy>
Alantas: 1.9 hashes are ordered
heisenmink has quit [Ping timeout: 248 seconds]
<Alantas>
Which no doubt takes strictly more work than not ordering them.
matti has joined #ruby
<horseman>
Alantas: no, it takes more space
<horseman>
Alantas: they superimpose a linked list over the top by keeping forward/back pointers when a new item is added
<Alantas>
Can you change this ordering once added?
heisenmink has joined #ruby
<horseman>
not through public api
<Alantas>
Pity. If it's gonna take a level of Linked List, it might be useful to treat it like one.
Mohan has quit [Ping timeout: 245 seconds]
BiHi has quit [Quit: Computer has gone to sleep]
<workmad3>
I don't like that they made hashs ordered in 1.9... I feel it promotes a misuse of hashs
Mohan has joined #ruby
Mohan has quit [Changing host]
Mohan has joined #ruby
<Alantas>
Yeah. Relying on hash ordering is bad style, I think.
<bnagy>
Hm, ok I can't find the code
<bnagy>
but I am prepared to bet that you're going to have to use == with String keys
moshee has quit [Ping timeout: 245 seconds]
<bnagy>
cause the hash func is lossy
moshee has joined #ruby
<bnagy>
whereas symbols you can just check objectid
tresk has joined #ruby
<Alantas>
The hash function can work like a Bloom filter: if the hashes are unequal, the strings definitely are unequal. If they're equal, then double-check.
<bnagy>
right
iocor has quit [Quit: Computer has gone to sleep.]
<Alantas>
Dunno if a hash comparison is faster than ==, though, since the hash function would necessarily need to munch on the whole string, rather than being able to return failure early on the first mismatch.
<bnagy>
so if you have a large hash with similar string keys that are long it's not great
<Alantas>
hash==hash might be faster than string==string if they are equal, though.
<bnagy>
no idea if you could construct a pathological case, or how likely you are to hit one by accident
<Alantas>
We'd be in pretty bad shape if String#hash produced a lot of collisions. It could be optimized for the common case of strings containing text, minimizing collision among text at the cost of increasing collision among arbitrary binary data, or such.
<Tasser>
Alantas, depending on how well your CPU preloads
heisenmink has quit [Ping timeout: 248 seconds]
ConstantineXVI has joined #ruby
<Alantas>
Though depending on what kind of hash table Hash uses internally, the presence of collisions may be costly or perhaps not very costly.
<Alantas>
Tasser: Well, I assume that .hash and .== would both have to walk the entire string anyway.
otters has quit [Read error: Connection reset by peer]
otters has joined #ruby
<Alantas>
(When the strings are in fact equal.) (Meaning that such things wouldn't serve to distinguish the two approaches in terms of performance.)
<Tasser>
Alantas, if the two different strings are in different memory locations, there might be cache misses
<Alantas>
Oh, I think I see what you're saying; #hash can do one string at a time, while #== would need access to both.
<Tasser>
and that's one of the most expensive operation
<Tasser>
yeah, and that matters if the strings are big
<bnagy>
ah, here we go, looks like they switched to murmur in 1.9
<bnagy>
so you could definitely construct a pathological case :>
<bnagy>
not very likely you'd hit it by accident though
<clockwize>
bnagy: My colleague has actually narrowed it down to something else entirely. His benchmarking was flawed
ConstantineXVI has quit [Remote host closed the connection]
<pro>
how to check if something is already in array
<pro>
like java .contains
<bnagy>
clockwize: that restores my faith in the universe, thankyou
* Alantas
grumbles at sites that use 'px' to set the entire page width, and invokes Chromium's devtools thing to disable enough of those that the site doesn't get an unnecessary horizontal scrollbar.
<clockwize>
haha :)
<bnagy>
pro: .include?, also, rtfm :)
<bnagy>
clockwize: srsly, I was busting my brain trying to think of theories that explained what (my reading) of the code said was pretty much impossible
<krishnaveda>
bnagy: becom33 shevy so u all suggest romania to me ?
<bnagy>
pro: also, if you use irb, [].methods.sort will list all the instance methods
<bnagy>
which is mainly good for when you have someone else's code and they didn't document it
luoluoluo has quit [Ping timeout: 252 seconds]
<bnagy>
krishnaveda: for what? A good place to get pickpocketed and eat cabbage?
<clockwize>
bnagy: glad you were proven right :) I thought it was very strange for it to have such a massive performance it on something that simple...
<krishnaveda>
bnagy: a good place for holidaying... a paradise like place.. :) switzerland ?
<bnagy>
switzerland is kind of a nice place to live but you wouldn't want to visit there
<krishnaveda>
did anyone know.. University of Florida has a plan ready to tackle a zombie attack
<krishnaveda>
bnagy: why not visit ?
<krishnaveda>
shevy: where are you dear ?
<bnagy>
it's very expensive and it doesn't really have many 'tourist' things to do apart from look at (beautiful) mountains
luoluoluo has joined #ruby
<krishnaveda>
bnagy: beauty and nature is mixed in switzerland right ?
<bnagy>
well it's certainly not a standout for architecture :)
ickmund has quit [Read error: Operation timed out]
<workmad3>
krishnaveda: get the book 'Extreme Programming Explained' ;)
<krishnaveda>
bnagy: then what would you suggest me.. a place which has everything? norway ?
liluo has joined #ruby
<krishnaveda>
workmad3: I cant read book.. I just need to know the basics of it.. understand what its all abt
ananthakumaran has joined #ruby
<bnagy>
:S 'everything'
<workmad3>
krishnaveda: it's not something that just gets easily explained unfortunately
<workmad3>
krishnaveda: is it's really more of a mindset than a methodology
kil0byte has joined #ruby
kaneda_ has joined #ruby
luoluoluo has quit [Ping timeout: 240 seconds]
kil0byte_ has quit [Ping timeout: 240 seconds]
BiHi has joined #ruby
nari_ has joined #ruby
schaerli has quit [Remote host closed the connection]
<krishnaveda>
workmad3: okay...
nari has quit [Ping timeout: 248 seconds]
Guest2137 has quit [Ping timeout: 276 seconds]
<workmad3>
krishnaveda: the book is an excellent resource though... and not a massive tome, quite accessible
nari__ has joined #ruby
<workmad3>
(it's written by Kent Beck himself, and he has a very minimalist approach to writing... gets his points across succintly IMO, and doesn't stress things he has already stated earlier)
nari_ has quit [Read error: Connection reset by peer]
kaneda_ has quit [Ping timeout: 244 seconds]
mengu_ has quit [Ping timeout: 244 seconds]
kaneda_ has joined #ruby
Vendethiel has joined #ruby
nari__ has quit [Ping timeout: 246 seconds]
etehtsea has quit [Ping timeout: 256 seconds]
mengu__ has joined #ruby
heftig has quit [Ping timeout: 245 seconds]
nanderoo has joined #ruby
_adeponte has joined #ruby
adeponte has quit [Read error: Connection reset by peer]
luoluoluo has joined #ruby
netogallo has joined #ruby
googya has quit [Quit: Leaving.]
mohits has joined #ruby
supernova has joined #ruby
fabrice31 has joined #ruby
ddv has joined #ruby
Tuxist has quit [Ping timeout: 246 seconds]
d3vic3 has quit [Ping timeout: 256 seconds]
mrwalker has joined #ruby
d3vic3 has joined #ruby
yugui is now known as yugui_zzz
xhh has joined #ruby
nari__ has joined #ruby
alem0lars_ has quit [Ping timeout: 245 seconds]
gokul has quit [Quit: Leaving]
jd has joined #ruby
jd has quit [Changing host]
jd has joined #ruby
luoluoluo has quit [Remote host closed the connection]
Jade has quit [Disconnected by services]
jd is now known as Jade
geekbri has joined #ruby
tayy has joined #ruby
Progster has joined #ruby
sohocoke has quit [Quit: sohocoke]
cousine has joined #ruby
caaakeeey has joined #ruby
tar_ has quit [Quit: tar_]
<caaakeeey>
what would you expect from a perfect irc web client?
<hoelzro>
caaakeeey: embedding irssi in a browser =P
jcromartie has joined #ruby
<Tasser>
hoelzro, ^^
ivar has joined #ruby
kaneda__ has joined #ruby
fulmato has joined #ruby
<shevy>
caaakeeey tabs to chat in more than one channel
kaneda_ has quit [Ping timeout: 246 seconds]
<shevy>
caaakeeey an options setting with several options. easy checkbuttons to enable or disable logging
<shevy>
caaakeeey and extensive documentation that can be read in the browser
<caaakeeey>
hoelzro, what do you like about irssi?
<caaakeeey>
shevy, tabs within a tab, or is one tab per channel, with decent inline replying good enough?
adambeynon has joined #ruby
<caaakeeey>
shevy, what kind of options/logging?
nari__ has quit [Ping timeout: 276 seconds]
mfojtik has left #ruby [#ruby]
<hoelzro>
caaakeeey: runs in the terminal, easily extensible, highly customizable
<hoelzro>
allows connections to multiple servers/multiple channels
<shevy>
caaakeeey well, it can be tabs within a tab. the point is, one should be able to cycle through tabs quickly / easily
<shevy>
caaakeeey very simple options. enable [ ] checkbutton, disable [ ] checkbutton. and to its right could be the file specified where to log the output
<shevy>
hmm sorry
<shevy>
enable [x]
<shevy>
disable [ ]
<shevy>
now its clearer :)
<shevy>
oh yeah
<caaakeeey>
hoelzro, how do you like customise/extend it, that youd like in the browser?
<shevy>
caaakeeey connecting to different servers, but still being able to use that with tabs, would be nice
<shevy>
right now on xchat here, I tend to be connected only to freenode
<caaakeeey>
shevy, do you need logging if the web client does logging for you?
ABK_ has joined #ruby
kaneda_ has joined #ruby
<shevy>
caaakeeey I want to be able to modify the behaviour in an easy way. if the "web client" does log for me already, that is fine, but I still want an easy option setting to enable/disable that, and I want to instantly be able to find out where the log file is stored, without having to read through extensive documentation in order to find out
<hoelzro>
caaakeeey: well, I've written/used irssi plugins to tell me the country a user is connecting from, add some custom commands for navigating between windows, automatically modifying my status if tmux is attached/detached, and colorize peoples' nicknames
L-----D has joined #ruby
fulmato has quit [Ping timeout: 244 seconds]
<hoelzro>
I've set up irssi to automatically log my chats as well
<shevy>
hoelzro, how does one do that in irssi? does irssi use its own "language" for that?
<hoelzro>
shevy: write plugins?
<shevy>
yeah
supernova has left #ruby ["Leaving"]
<shevy>
for irssi plugins
<hoelzro>
irssi embeds a Perl interpreter
<shevy>
ah
<shevy>
peeeerl!
bigkevmcd has quit [Ping timeout: 245 seconds]
* hoelzro
<3 Perl
<matti>
Perl ...
kaneda__ has quit [Ping timeout: 276 seconds]
<shevy>
caaakeeey, also, the options for plugins should exist, in ruby, so that we could extend it - in ruby
<matti>
Flashback from '70
<matti>
:<
<shevy>
matti, perl 5 is still evolving!
<shevy>
they released a new version not that long ago
<hoelzro>
this morning, actually
<shevy>
perl 6 will go the duke nukem path however
<matti>
shevy: This is a Ruby channel p
<hoelzro>
agreed.
abionic has quit [Ping timeout: 252 seconds]
<matti>
shevy: Perl 6: "Parrot is dead"
<matti>
;d
<shevy>
matti, yeah we have to watch deadly competition
<matti>
shevy: As per the Mony Python sketch.
<shevy>
perl 5 may well end up kicking ruby in the balls one day
<jnoob22>
A config file question for you guys. Normally with Java I like to pull in properties using properties files. With Python, I prefer to import another Python script using a "module" that contain values sort of like in a JSON fashion. For Ruby, what is the preferred method of doing this?
<matti>
shevy: s/board/committee/
<shevy>
jnoob22, you could also pull in other .rb files of course. and store data in .rb files. mac homebrew, written in ruby, is doing that for all their recipes
<matti>
jnoob22: Anything that works for you :)
<shevy>
lemme show you one of their recipes...
<matti>
jnoob22: I like YAML for configuratio files.
<matti>
jnoob22: Some people JSON, some INI files ;]
<caaakeeey>
hoelzro, what do you colorize nicknames for?
<jnoob22>
ok cool. i do prefer the JSON or .rb method.... if I may ask, is YAML the most universal understood amongst Ruby programmers perhaps?
<matti>
jnoob22: YAML + OpenStruct in custom configuration class works for me usually.
<caaakeeey>
hoelzro, not sure, facebook/google oauth maybe? just brainstorming, any metrics you'd be interested in tracking? maybe other users?
<shevy>
ewww
<shevy>
see, that's the thing
<shevy>
facebookification of the world
<shevy>
things used to be simple in the past
<hoelzro>
caaakeeey: sorry, what do you mean by metrics?
<shevy>
caaakeeey, if possible there should be a "simple-client" option where only the very basics are used
bigkevmcd has joined #ruby
* hoelzro
smells plugins
niklasb has joined #ruby
<shevy>
and then, those users who want the fancification, could use a very fancy and complicated default. at least I could ignore that and just stick to very simple things that dont confuse me
<caaakeeey>
minimalism would be default
<shevy>
2 days ago I wrote a tiny irc thing that only connects to one channel and allows me to talk there http://pastie.org/3944430 it misses many things, but I am not too keen to add it all, it seems small enough for now
bluenemo has quit [Quit: leaving]
thone has quit [Ping timeout: 252 seconds]
<caaakeeey>
hoelzro, i mean like popular channels, you replies to you, who you reply to, metric on where and when you post at what time (nerd stats)
<caaakeeey>
hoelzro, how would you do plugins in a web app?
fulmato has joined #ruby
Chryson has quit [Quit: Leaving]
<hoelzro>
caaakeeey: JS, probably =/
<hoelzro>
unless you did *lots* of AJAX
`brendan has joined #ruby
<caaakeeey>
hoelzro, i guess theres things like greasemonkey for the few who really want it
kaneda_ has quit [Read error: Operation timed out]
jhchabran has joined #ruby
ConstantineXVI has joined #ruby
<shevy>
:P
<shevy>
javascript should be replaced by mRuby
shevy is now known as andshevy
carloslopes has joined #ruby
kaneda_ has joined #ruby
francisfish has joined #ruby
francisfish has quit [Remote host closed the connection]
ConstantineXVI has quit [Ping timeout: 245 seconds]
nari__ has quit [Ping timeout: 256 seconds]
thone has joined #ruby
mrwalker has quit [Remote host closed the connection]
zz_chrismcg is now known as chrismcg
nari__ has joined #ruby
kaneda_ has quit [Read error: Operation timed out]
fulmato has quit [Ping timeout: 245 seconds]
chrismcg is now known as zz_chrismcg
kaneda_ has joined #ruby
nilg` has quit [Remote host closed the connection]
nari_ has joined #ruby
tommyvyo has joined #ruby
netogallo has quit [Ping timeout: 240 seconds]
austinbv has joined #ruby
netogallo has joined #ruby
cdepue has joined #ruby
yonggu has quit [Quit: yonggu]
heftig has joined #ruby
nari__ has quit [Ping timeout: 245 seconds]
codefarmer has quit [Ping timeout: 265 seconds]
lxsameer has joined #ruby
lxsameer has quit [Max SendQ exceeded]
lxsameer has joined #ruby
lxsameer has quit [Max SendQ exceeded]
yonggu has joined #ruby
dwaynecrooks has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Max SendQ exceeded]
lxsameer has joined #ruby
lxsameer has quit [Max SendQ exceeded]
jcromartie has joined #ruby
yekta has joined #ruby
lxsameer has joined #ruby
L-----D has quit [Quit: Leaving]
lxsameer has quit [Max SendQ exceeded]
lxsameer has joined #ruby
techhelp has joined #ruby
abionic has joined #ruby
jayrulez has quit [Ping timeout: 245 seconds]
nari_ has quit [Ping timeout: 246 seconds]
dv310p3r has joined #ruby
adambeynon has quit [Quit: adambeynon]
yonggu has quit [Remote host closed the connection]
yonggu has joined #ruby
kaneda_ has quit [Read error: Operation timed out]
fmcgeough has joined #ruby
fr0gprince_ has quit []
kaneda_ has joined #ruby
ABK_ has quit [Ping timeout: 256 seconds]
jayrulez has joined #ruby
kil0byte_ has joined #ruby
cousine has quit [Remote host closed the connection]
Solnse has quit [Read error: No route to host]
jnoob22 has quit [Remote host closed the connection]
[edu] has left #ruby [#ruby]
cryptfu is now known as Guest45554
kil0byt__ has joined #ruby
kil0byte has quit [Ping timeout: 265 seconds]
apeiros_ has joined #ruby
bglusman has joined #ruby
dibri has quit [Ping timeout: 252 seconds]
uris has joined #ruby
kil0byte_ has quit [Ping timeout: 250 seconds]
Codif has joined #ruby
andshevy is now known as shevy
stewart_ has quit [Quit: Leaving.]
caaakeeey has quit [Quit: Leaving]
techhelp has quit [Read error: Connection reset by peer]
looopy has quit [Remote host closed the connection]
nari_ has joined #ruby
jdripper has joined #ruby
mvangala has joined #ruby
clockwize has joined #ruby
dv310p3r has quit [Ping timeout: 246 seconds]
Prz has quit [Read error: Connection reset by peer]
looopy has joined #ruby
looopy has quit [Remote host closed the connection]
Barakas has joined #ruby
Barakas has quit [Remote host closed the connection]
Prz has joined #ruby
Vendethiel has joined #ruby
carlyle has joined #ruby
adambeynon has quit [Quit: adambeynon]
rmascarenhas has joined #ruby
rbanffy has joined #ruby
shruggar has left #ruby [#ruby]
gurrag has joined #ruby
perryh is now known as perryh_away
looopy has joined #ruby
mpereira has joined #ruby
Tuxist has joined #ruby
ackz has joined #ruby
kpshek has joined #ruby
iocor has joined #ruby
BiHi has quit [Ping timeout: 260 seconds]
kil0byte has joined #ruby
<geekbri>
If I am calling the method of an object, and it is rescueing from an exception... is there anyway for me to chain to that exception as well and rescue from it?
mrwalker has joined #ruby
lolmaus has quit []
BiHi has joined #ruby
adambeynon has joined #ruby
<hoelzro>
geekbri: do you mean to say that a method you're calling is catching an exception, but you'd rather handle the exception yourself?
<geekbri>
hoelzro: exactly
<hoelzro>
and I assume that the method in question is not re-raising the exception?
gurrag has left #ruby [#ruby]
<geekbri>
hoelzro: it is not, it just catches it and then exits and prints an error message
kil0byt__ has quit [Ping timeout: 245 seconds]
<hoelzro>
fun
<hoelzro>
I'm not 100% sure, but I don't think there's much you can do
<geekbri>
hoelzro: yeah, I would like to catch it and do something useful
<hoelzro>
although, I'm no expert at Ruby
ananthakumaran has joined #ruby
kevinbond has joined #ruby
rmascarenhas has quit [Quit: leaving]
CannedCorn has joined #ruby
dv310p3r has joined #ruby
ElitestFX has quit [Quit: Page closed]
ph^ has quit [Ping timeout: 276 seconds]
theRoUS_ has joined #ruby
joshman_ has joined #ruby
ken_barber has joined #ruby
jprovazn is now known as jprovazn_away
nari_ has quit [Ping timeout: 252 seconds]
Axsuul has quit [Ping timeout: 260 seconds]
nari_ has joined #ruby
ukwiz has joined #ruby
internet_user has joined #ruby
iocor has quit [Quit: Computer has gone to sleep.]
chson has joined #ruby
theRoUS_ has quit [Quit: Leaving]
netogallo has joined #ruby
theRoUS_ has joined #ruby
nari__ has joined #ruby
becom33 has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
Axsuul has joined #ruby
theRoUS has quit [Remote host closed the connection]
nari_ has quit [Ping timeout: 252 seconds]
mikalv has quit [Ping timeout: 245 seconds]
theRoUS_ is now known as theRoUS
theRoUS has quit [Client Quit]
mikalv has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
<Stefunel>
apeiros_, ah it works ok, I was expecting the wrong result
<Stefunel>
one more thing, if a var is nul, how do I use puts to display something predefined ?
statix has quit [Remote host closed the connection]
spligak has joined #ruby
statix has joined #ruby
heisenmink has quit [Quit: Lämnar]
maletor has joined #ruby
<Alantas>
puts "cry \"havoc!\" and let loose the dogs of war!" if foo.nil?
<Alantas>
If you want to see whether it's defined at all, use defined?(foo)
maletor has quit [Client Quit]
Nicke\ has joined #ruby
<mrbrdo>
Alantas or with ActiveSupport/Rails, foo.present?
abionic has quit [Read error: Operation timed out]
<mrbrdo>
although, nevermind. :)
<mrbrdo>
I'm wrong, hehe
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<Alantas>
Though I suppose one could take advantage of that "wat" thing from the other day and ensure a variable is set: do "foo = foo" beforehand, and it'll definitely exist, with 'nil' if it didn't already exist.
<Alantas>
Then you could safely ||= it, for example.
thone_ has joined #ruby
stefanp_ has joined #ruby
KL-7 has quit [Read error: Operation timed out]
keanehsiao_ has joined #ruby
berserkr has quit [Quit: Leaving.]
thone has quit [Ping timeout: 248 seconds]
stefanp has quit [Ping timeout: 265 seconds]
jcromartie has quit [Quit: jcromartie]
Targen_ has quit [Ping timeout: 245 seconds]
jcromartie has joined #ruby
KL-7 has joined #ruby
keanehsiao_ has quit [Read error: Connection reset by peer]
keanehsiao_ has joined #ruby
keanehsiao has quit [Read error: No route to host]
keanehsiao_ is now known as keanehsiao
rasbonics has joined #ruby
locks_ has joined #ruby
locks_ has quit [Client Quit]
tonini has quit [Remote host closed the connection]
wvms has left #ruby [#ruby]
techhelp has quit [Quit: This computer has gone to sleep]
CheeToS has joined #ruby
JonnieCache has quit [Ping timeout: 248 seconds]
wvms has joined #ruby
pygospa has quit [Read error: Operation timed out]
pygospa has joined #ruby
ElitestFX has joined #ruby
<shevy>
Hanmac, what is that shell?
classix has quit [Quit: leaving]
<shevy>
Hanmac, the default README is copy paste of mRuby
Synthead has quit [Remote host closed the connection]
JohnBat26 has quit [Ping timeout: 244 seconds]
<ccooke>
Anyone have a preferred lightweight DSL for documentation blocks?
sparrovv has quit [Ping timeout: 245 seconds]
<ccooke>
I'm thinking of writing a DSL that needs to document tasks - primary output will be to console and to some standard wiki-languages (I'm currently looking at wiki content DSLs, but haven't used any so wondered if anyone has :-)
cordoval has joined #ruby
cordoval has left #ruby [#ruby]
yankov has joined #ruby
jackiechan0 has joined #ruby
Synthead has joined #ruby
hadees has joined #ruby
wvms has left #ruby [#ruby]
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
don9z has joined #ruby
nari__ has quit [Ping timeout: 252 seconds]
don9z has quit [Client Quit]
andrewhl has joined #ruby
zommi has quit [Read error: Connection reset by peer]
kil0byte_ has joined #ruby
mikepack has joined #ruby
don9z has joined #ruby
<don9z>
quit
<don9z>
quit
<don9z>
quit
<don9z>
quit
<don9z>
quit
<don9z>
quti
don9z has quit [Remote host closed the connection]
mrbrdo has quit [Ping timeout: 260 seconds]
iocor has quit [Quit: Computer has gone to sleep.]
kil0byte has quit [Ping timeout: 265 seconds]
alan_ has joined #ruby
td123 has joined #ruby
senny has quit [Remote host closed the connection]
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
nlc has joined #ruby
fayimora has quit [Remote host closed the connection]
fayimora has joined #ruby
khakimov has joined #ruby
grin has joined #ruby
mrbrdo has joined #ruby
kil0byte_ has quit [Ping timeout: 248 seconds]
Helius has quit [Remote host closed the connection]
mikalv has quit [Read error: Operation timed out]
grin has left #ruby [#ruby]
rmascarenhas has joined #ruby
mikalv has joined #ruby
darthdeus has joined #ruby
kil0byte has joined #ruby
ckrailo has joined #ruby
berserkr has joined #ruby
tommyvyo has quit [Ping timeout: 276 seconds]
_adeponte has quit [Remote host closed the connection]
otters has quit [Read error: Connection reset by peer]
jayrulez has quit [Read error: Connection reset by peer]
imami|afk is now known as banseljaj
rippa has joined #ruby
otters has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
don9z has joined #ruby
alan_ has quit [Quit: ChatZilla 0.9.88.2 [Firefox 12.0/20120420145725]]
emmanuelux has joined #ruby
tommyvyo has joined #ruby
ph^ has joined #ruby
don9z has quit [Client Quit]
mneorr has quit [Remote host closed the connection]
don9z has joined #ruby
Criztian has quit [Remote host closed the connection]
don9z has quit [Client Quit]
don9z has joined #ruby
don9z` has joined #ruby
don9z` has quit [Remote host closed the connection]
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
mikepack has joined #ruby
abionic has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
<any-key>
irc is hard
kevinbond_ has joined #ruby
kevinbond has quit [Read error: Connection reset by peer]
kevinbond_ is now known as kevinbond
<shevy>
any-key yea
don9z has quit [Ping timeout: 246 seconds]
bosphorus has joined #ruby
bluOxigen has quit [Ping timeout: 265 seconds]
indian has quit [Ping timeout: 252 seconds]
don9z has joined #ruby
don9z has quit [Client Quit]
jeremyb has joined #ruby
<jeremyb>
are collect and map the same thing?
<Hanmac>
yeah
don9z has joined #ruby
<jeremyb>
danke
don9z has left #ruby [#ruby]
macmartine has joined #ruby
macmartine has quit [Client Quit]
maesbn has quit [Remote host closed the connection]
macmartine has joined #ruby
jayrulez has joined #ruby
<shevy>
Hanmac cool, that looks interesting
<jeremyb>
so, i wrote my first bits of ruby less than an hour ago
<Hanmac>
so your dream of a ruby os may be possible :P
<shevy>
jeremyb if you need to solve it as terse as possible then it is ok
<jeremyb>
should part of that be done differently?
<Hanmac>
jeremyb why do you do to_set?
<jeremyb>
shevy: it's for erb
<shevy>
when I look at it I dont really know what you are trying to do though
<jeremyb>
Hanmac: to make them unique
<shevy>
there is array#uniq too
<jeremyb>
oh, i could do that then
<shevy>
%w( cat dog cat ).uniq # => ["cat", "dog"]
<jeremyb>
i'm taking a mapping of log files -> IRC channels and pulling out a unique list of all channels
v0lkoff has joined #ruby
<shevy>
jeremyb what I tend to prefer doing is making small methods
<jeremyb>
this is for puppet btw
<jeremyb>
shevy: inside a template?
<shevy>
def fetch_irc_logs
robbyoconnor has joined #ruby
<shevy>
I dont know how ERB works, but if it allows ruby code, you can use that
<shevy>
I find erb not beautiful though, so I dont use it myself
<jeremyb>
hrmm
<shevy>
I think the last time I looked at it was like 6 years ago
Targen has joined #ruby
diegok has joined #ruby
fayimora has quit [Read error: Connection reset by peer]
fayimora has joined #ruby
iocor has joined #ruby
weasels has joined #ruby
v0lkoff has left #ruby [#ruby]
otters has quit [Read error: Connection reset by peer]
Alantas has quit [Quit: The sum of the universe is zero.]
robbyoconnor has quit [Remote host closed the connection]
robbyoconnor has joined #ruby
philcrissman_ is now known as philcrissman
walbert has joined #ruby
codebeaker has quit [Quit: codebeaker]
zeromodulus has joined #ruby
fayimora has quit [Read error: Connection reset by peer]
fayimora has joined #ruby
clockwize has quit [Quit: clockwize]
abionic has quit [Read error: Connection reset by peer]
amalvagomes has quit [Quit: amalvagomes]
kaneda_ has quit [Read error: Connection reset by peer]
tomzx has joined #ruby
cha1tanya has quit [Quit: Leaving]
visof has joined #ruby
arturaz has quit [Ping timeout: 245 seconds]
walbert has quit []
techhelp has joined #ruby
carlyle has quit [Remote host closed the connection]
minijupe has joined #ruby
niku4i has joined #ruby
trivol has joined #ruby
trivol has left #ruby [#ruby]
kaneda has joined #ruby
kaneda is now known as Guest67745
francisfish has joined #ruby
deryl has joined #ruby
mneorr has joined #ruby
Hanmac has quit [Ping timeout: 244 seconds]
fbernier has joined #ruby
pdtpatr1ck has joined #ruby
kenperkins has quit [Quit: Computer has gone to sleep.]
francisfish has quit [Remote host closed the connection]
liluo has quit [Remote host closed the connection]
scb has joined #ruby
<theRoUS>
in ruby 1.8.7, is there any way with File.fnmatch to specify the equivalent of %r!^doc[[:alnum:]]*/! ? in other words, the shell extglob 'doc*([[:alnum:]])/' ? 'doc followed by zero or more alnums and then a slash' ?
enroxorz has joined #ruby
enroxorz has quit [Changing host]
enroxorz has joined #ruby
enroxorz has joined #ruby
<enroxorz>
Got a question. What gem can I use to do straight SQL statements for SQL Server?
davidw has quit [Ping timeout: 244 seconds]
Prz has quit [Quit: Leaving]
<mrbrdo>
enroxorz Microsoft?
<enroxorz>
yeah
<enroxorz>
i have to write a cron job that fixes some stuff nightly on it
flagg0204 has quit [Quit: leaving]
<kalleth>
unfuck the stuff that needs fixing int he first place? :p
<theRoUS>
in ruby 1.8.7, is there any way with File.fnmatch to specify the equivalent of %r!^doc[[:alnum:]]*/! ? in other words, the shell extglob 'doc*([[:alnum:]])/' ? 'doc followed by zero or more alnums and then a slash' ?
tvw has quit [Read error: Connection reset by peer]
<theRoUS>
i don't think there is. Dir.glob can do it, i think -- but that looks at the filesystem. i want to check a filename that may not yet exist on the filesystem.
ipoval has joined #ruby
savage- has joined #ruby
carlyle has joined #ruby
<apeiros_>
theRoUS: don't know, sorry
<theRoUS>
apeiros_: tnx
oooPaul has joined #ruby
timonv has quit [Remote host closed the connection]
khakimov has quit [Quit: Computer has gone to sleep.]
BeLucid has quit [Remote host closed the connection]
Diranged has joined #ruby
<Diranged>
Anyone here use Puppet? I'm struggling with Puppet (many different versions) and RUby 1.8.7 (both in Ubuntu 10.04 and Ubuntu 12.04). There is a line in the Puppet 'utils.rb' file that looks like this: /usr/lib/ruby/1.8/puppet/util.rb
d3vic3 has quit [Ping timeout: 250 seconds]
<Diranged>
this line causes a seg-fault about 80% of the time when i run puppet right now.. on all kinds of different parts of puppet..
matled has quit [Read error: Connection reset by peer]
<Diranged>
there.. longer error stack, and the code itself
<ccooke>
so, you've seen a segfault with gem and with sysctl.
<hardyx>
/msg nickserv help register
hardyx has left #ruby [#ruby]
* ccooke
would be worrying about hardware at this point.
_theriffer_ has joined #ruby
<Diranged>
… this is not a hardware issue
<Diranged>
this has happened on multiple distros (ubuntu 10.04, and 12.04.. in amazon on several different instances)
kpshek has quit []
<ccooke>
Interesting.
ipoval has quit [Quit: ipoval]
danielvdotcom has joined #ruby
<ccooke>
Tried with other Ruby builds?
kpshek has joined #ruby
yankov has quit [Quit: yankov]
kpshek has quit [Client Quit]
clockwize has quit [Quit: clockwize]
Eldariof-ru has quit [Ping timeout: 245 seconds]
<Diranged>
well, ubuntu 10.04 and 12.04 have different builds.. same basic version tho
emmanuelux has joined #ruby
timonv has joined #ruby
v0lkoff has joined #ruby
ivar has quit [Read error: Connection reset by peer]
ivar has joined #ruby
carlyle has quit [Remote host closed the connection]
scb has quit [Remote host closed the connection]
mpereira has joined #ruby
zodiak has joined #ruby
C0deMaver1ck has joined #ruby
v0lkoff has left #ruby [#ruby]
<ccooke>
Diranged: Never had that problem here (with 1.8.7 from Ubuntu)
kenperkins has joined #ruby
kpshek has joined #ruby
<Diranged>
really strange.. i wonder what might be wrong with the puppet code..
<Hanmac>
Diranged do you install the ruby*-full package? maybe something is missing
<ccooke>
Nothing in ruby code should be able to segfault.
<bnagy>
hahah hahahah
<ccooke>
you might want to look and see what compiled gems are installed
<ccooke>
(note: *should*)
fayimora has quit [Read error: Connection reset by peer]
fayimora has joined #ruby
mohits has quit [Ping timeout: 252 seconds]
Guest67745 has quit [Quit: Leaving]
<bnagy>
that looks kind of wack. I would require util.rb in irb and exercise the execute posix command
<Diranged>
ok, still troublesthooting it .. ugh
<ccooke>
mm. If you can get reliable traceroutes, I'd also go as far as running the code under strace
<ccooke>
or ltrace
C0deMaver1ck has quit [Quit: Leaving...]
<ccooke>
see if it's actually segfaulting in a library pulled *in* by puppet/ruby
<bnagy>
you can also patch it up to dump out the uid gid it's trying to use, and inspect the command array
C0deMaver1ck has joined #ruby
<Diranged>
ok well on a quick side note… if i have a ruby program that at the beginning basically checks if a gem is available, and if not, it runs Gem to install it, then can I do somethingin the code to "reload" the gems and then load it?
Cicloid has joined #ruby
<bnagy>
I would be floored if that line you highlighted segfaults
<Diranged>
ie … if gem.available?('foobar') require foobar, else `gem install foobar`, then require foobar..
<ccooke>
bnagy: quite.
abra has joined #ruby
<bnagy>
Diranged: I think people use bundler for that kind of stuff
<bnagy>
but you could rescue LoadError
ikaros has joined #ruby
<ccooke>
bnagy: well... an PD_PRELOAD could cause it.
<Diranged>
bnagy: ive got the part that does the gem install done.. but if i then try to load the gem, its not listed as available..
maxok has joined #ruby
Araxia_ has joined #ruby
<ccooke>
but that would be evil, bad and wrong
<Diranged>
if i quit and re-run the app, it then works
Sgeo has quit [Ping timeout: 246 seconds]
<bnagy>
Diranged: one problem at a time, and also your second one is boring
<workmad3>
Diranged: personally, I prefer apps that just exit if dependencies aren't there
mensvaga has joined #ruby
<bnagy>
I'd agree with that
<deryl>
provided they also change the exit code so you can test externally what the failure was via the exit code :)
<mensvaga>
Is there a ruby module where I give an IP address, a netmask, and it gives me the first IP, last IP, and an iterator through the IP addresses on that network?
<ccooke>
Diranged: Gem.clear_paths IIRC
<Diranged>
ccooke: thanks ill try that
mpereira has quit [Remote host closed the connection]
<rking>
mensvaga: Sounds like a decent idea.
<mensvaga>
like, network = new NetworkGem("192.168.0.1/24"); puts network.first; puts network.last
<ccooke>
workmad3: Seconded. I'd also prefer code that doesn't have permission to install more libs :-)
<Diranged>
ok.. back to my first issue.. looks like ubnuntu 12.04 includes support for different rubys.. 1.9.1-full is listed..
<Diranged>
trying that
<bnagy>
mensvaga: probably. Go hunting through security code etc
<bnagy>
mensvaga: maybe the metasploit codebase :<
<Diranged>
Ah, installing 1.9.1 does not override 1.8.7.. lame
<deryl>
why would it
abstrusenick has joined #ruby
<bnagy>
Diranged: imho apt rubies suck balls on ubuntu
<workmad3>
1.9.1 should be avoided anyway
JonnieCache has joined #ruby
<td123>
bnagy: that's true of pretty much any repackaged 3rd party repository
<shevy>
Diranged problem always is that the debian-based rubies suck
maletor has joined #ruby
<bnagy>
anyway, bedtime. good luck.
<shevy>
the check for rubygems available should no be necessary for ruby 1.9.x and higher
<shevy>
and if debian was dumb enough to repackage ruby without rubygems then people need to stop using debian
<roolo>
Is there some easy way to create database in sequel migration?
<shadoi>
man I wish that was in stdlib
<rking>
roolo: What are you using?
philips has joined #ruby
<roolo>
rking: Can you please be a bit more specific? ;)
<rking>
roolo: Nono, can /you/? =)
<shadoi>
haha
schovi has quit [Remote host closed the connection]
<rking>
roolo: The answer to your question is: "Yes." But that's probably not useful to you, but I can't get any more specific without knowing which DB tools you're already working with.
yankov has joined #ruby
<rking>
roolo: Rails does all of that very conveniently, right out of the box.
robdodson has joined #ruby
clockwize has quit [Ping timeout: 256 seconds]
iocor has quit [Quit: Computer has gone to sleep.]
visof has quit [Ping timeout: 246 seconds]
paulschreiber has joined #ruby
Urth|Away is now known as Urthwhyte
Urthwhyte is now known as Urth|Away
emmanuelux has quit [Remote host closed the connection]
<paulschreiber>
how do i convert a Bignum to an array of hex ints? i.e. 0x0000000d138a87bab5cf3804b1 —> [0x00, 0x00, 0x00, 0x0d, 0x13, 0x8a, 0x87, 0xba, 0xb5, 0xcf, 0x38, 0x04, 0xb1]
Urth|Away is now known as Urthwhyte
d3c has quit [Quit: Quit]
Tomasso has quit [Ping timeout: 245 seconds]
libertyprime has quit [Ping timeout: 245 seconds]
adamkittelson has joined #ruby
<mrbrdo>
paulschreiber you could .to_s(16) and then split it into strings of length 2
abstrusenick has quit [Quit: abstrusenick]
<mrbrdo>
or you can divide by 256 to get bytes
KL-7 has quit [Quit: This computer has gone to sleep]
<mrbrdo>
like least significant byte would be bignum % 256
niku4i has quit [Remote host closed the connection]
<mrbrdo>
and then the next (bignum / 256) % 256
ciopte7_ has joined #ruby
Tomasso has joined #ruby
jdripper has quit [Quit: Leaving.]
<mrbrdo>
btw there is no such thing as a "hex int", an int is an int.. hex is just a representation for the human. all ints are stored in binary
<workmad3>
paulschreiber: did you mean 'hex pairs'? :)
hadronzoo has quit [Quit: hadronzoo]
fbernier has joined #ruby
<paulschreiber>
yeah, i understand the representation (base 16 vs base 10) … that was just a typo
hadronzoo has joined #ruby
<Mon_Ouie>
Also, "hex ints" do not exist — it's just a way to write them — 0xb1 is exactly the same thing as 177
clockwize has joined #ruby
<mrbrdo>
if you want to "see" the hex representation then use .to_s(16)
<paulschreiber>
yeah, i know about to_s(16). i figure string conversion is expensive and was hoping to avoid it
<paulschreiber>
workmad3: sure … hex pairs.
<Mon_Ouie>
Oh, didn't see mrbrdo had already mentioned that
<mrbrdo>
paulschreiber you can use modulus (%) and divison (/) to extract each byte
<mrbrdo>
and each byte is 2 hex digits
<mrbrdo>
16 * 16 = 256
tatsuya_o has quit [Remote host closed the connection]
<mrbrdo>
by the way this will not be much less expensive than to_s(16) because it does a similar thing, perhaps it's even written in C so it can be even faster
emmanuelux has joined #ruby
emmanuel__ has joined #ruby
nlc has joined #ruby
Sgeo has joined #ruby
<mrbrdo>
paulschreiber another way to extract bytes would be by using [] on it, which will give you bits (so you need to get 8 bits and put them together)
<Mon_Ouie>
I'd do it with bitwise operations
<Mon_Ouie>
(n >> (8 * n)) & 255
<Mon_Ouie>
(n >> (8 * byte_id)) & 255 rather
<mrbrdo>
ah yes that is even faster :)
<mrbrdo>
and you can use Bignum#size to see how many bytes are in the Bignum
joast has quit [Quit: Leaving.]
timonv has quit [Remote host closed the connection]
tresk has left #ruby [#ruby]
ddv has joined #ruby
<mrbrdo>
(0..n.size).map {|byte_id| (n >> (8 * byte_id)) & 255} something like that
<heftig>
paulschreiber: divmod is faster than doing / and % separately
t-mart has joined #ruby
<roolo>
rking: I can't, it's project to which i am contributing
Tomasso has quit [Ping timeout: 276 seconds]
<paulschreiber>
mrbrdo: actually, it works fine. user errior.
<roolo>
rking: Yes it has, but i can't find anything about creating databasis
<rking>
roolo: Oh, my bad.
<rking>
roolo: I'd imagine that would be out of the scope of any module. That's kind of an admin task I expect to do externally.
emmanuel__ has quit [Ping timeout: 264 seconds]
emmanuelux has quit [Ping timeout: 264 seconds]
altiouz has joined #ruby
<t-mart>
i need to prime factorize some integers. I thought I remembered a prime module in the core or standard libraries somewhere, but I can't find it right now. Is (or was) such a module available?
berserkr has quit [Quit: Leaving.]
Eldariof-ru has joined #ruby
emmanuelux has joined #ruby
<Mon_Ouie>
require 'prime'
andrewhl has quit [Quit: andrewhl]
<paulschreiber>
mrbrdo: only problem is the array ends up in reverse order, so i have to call .reverse at the end. is there a way to have it generate the array in the order i want?
keanehsiao has quit [Quit: keanehsiao]
<t-mart>
yea...i'll search the docs again. could not find that
weasels has quit [Read error: Connection reset by peer]
schovi has joined #ruby
otters has joined #ruby
fbernier has quit [Ping timeout: 246 seconds]
<mrbrdo>
paulschreiber yes
<mrbrdo>
(n.size-1).downto(0).map {|byte_id| (n >> (8 * byte_id)) & 255} something like that
<apeiros_>
slimjimflim: possible. but not guaranteed.
nilg` has joined #ruby
<slimjimflim>
k thanks
tworkin has joined #ruby
krz has joined #ruby
jesly_ has quit [Ping timeout: 246 seconds]
jesly has quit [Ping timeout: 246 seconds]
<apeiros_>
Neil__: I hope somebody told you that 1) in there is just wrong, yes?
<apeiros_>
and 2 does not the same thing as 0 (or whatever number the code on top has…)
<apeiros_>
neither does 3
<apeiros_>
2 & 3 otoh do the same thing
<shevy>
slimjimflim usually it should work fine, there are a few changes though, mostly other warnings, possible Encoding problems may also happen now
<slimjimflim>
on a related note, i compiled 1.9.3 from source, and 'make uninstall' fails. any idea how to get rid of it?
<shevy>
slimjimflim ruby installs not many files. did you use --prefix?
<apeiros_>
slimjimflim: no idea. I use rvm and it releaves me of all these headaches.
<shevy>
if not, the default is to have dumped it into /usr/local prefix
<apeiros_>
*relieves
<slimjimflim>
k
<Veejay>
Hello everyone
<neil__>
apeiros_: Sure thanks, I'm just trying to improve my ruby and interested in hearing thoughts on the original if user_id condition.
mensvaga has quit [Quit: Leaving.]
kpshek has quit []
<shevy>
if you dont use /usr/local then you can remove that directory. new programs compiled, without a specific --prefix, will re-create their hierarchy in /usr/local again. but ruby does not install many files anyway, in /usr/local/lib/ruby and in /usr/local/bin (ruby, irb, ri, gem, testrb, rdoc)
dax has joined #ruby
<apeiros_>
Neil__: well, is the original condition doing what you want? all other variants do *not* do the same thing
krusty_ar has quit [Read error: Connection reset by peer]
pdtpatr1ck has joined #ruby
<pro>
how to save something as integer in class initialize
<pangur>
Using sinatra, people.each do |n| puts n - gives me the names I expect in the browser but as a run-on rather than a name per row. How do I use return?
<pangur>
If I put return n, I only get one name.
<apeiros_>
pro: could you be less vague on "something"? do you mean a string? same with "save", do you mean assign to a variable?
petercs has joined #ruby
krusty_ar has joined #ruby
afallows has quit [Quit: Lost terminal]
nanderoo has quit [Quit: Leaving.]
pangur has quit [Remote host closed the connection]
quesada has quit [Ping timeout: 246 seconds]
mikepack has joined #ruby
jackiechan0 has joined #ruby
Criztian has joined #ruby
mikeycgto has joined #ruby
mikeycgto has quit [Changing host]
mikeycgto has joined #ruby
<Synthead>
I have a begin, rescue, end block, and want to abort this block if a condition is met (but not hit "rescue"). What's the correct command for this? "next" ?
maesbn has quit [Remote host closed the connection]
<shevy>
abort what block
<shevy>
the faulty code would be in begin
<shevy>
if it triggers an exception, it will enter the rescue clause
punkrawkR has quit [Read error: Connection reset by peer]
<shevy>
so I am not sure how you want to avoid going into the rescue clause, when an exception is issued?
quesada has joined #ruby
<apeiros_>
Synthead: wrong tool. unless cond then …rest… end
<Synthead>
shevy: right, but I don't want to necessarily test for "faulty" code. something like this: begin; [something] if 1 == 1; puts 'stuff'; rescue; puts 'something went wrong'; end
<Veejay>
shevy: You might want to skip to next iteration in the rescue clause
<Synthead>
I want it to catch on 1 == 1 and abort without going to rescue
<Veejay>
But of course that's not the right way to do it as apeiros_ pointed
mrwalker has joined #ruby
<apeiros_>
Synthead: begin/rescue/end is for exception handling, not for flow-control. if/unless are for flow-control in this case.
<Synthead>
apeiros_: this would occur inside of a b/r/e block that is actually testing for exception handling too
<apeiros_>
Synthead: that doesn't matter
weasels has joined #ruby
zastaph has joined #ruby
<Synthead>
apeiros_: how so?
otters has quit [Read error: Connection reset by peer]
<apeiros_>
just because it's around, doesn't make it magically become the right thing to deal with this entirely different issue.
iocor has joined #ruby
<Synthead>
apeiros_: no, this block is normally testing for exception handling. it's checking for a dead mysql connection with activerecord. Inside this block, I also want to test if a .find method returns nil and skip the routine if it is.
<apeiros_>
Synthead: yes. again. use an if/unless.
<Synthead>
apeiros_: to run what command if it tests true?
<any-key>
exit(0)
youdonotexist_ has joined #ruby
<Synthead>
any-key: I don't want the script to stop, I want it to abort the block
<apeiros_>
Synthead: maybe you should paste some code.
Diranged has left #ruby [#ruby]
<any-key>
oh did I accidentally say something relevant >.>
Tuxist64bit has joined #ruby
<Synthead>
any-key: haha
minijupe has joined #ruby
youdonotexist_ has quit [Client Quit]
<any-key>
I read absolutely no scrollback before saying that
youdonotexist has quit [Read error: Operation timed out]
bosphorus has joined #ruby
Criztian has quit [Ping timeout: 246 seconds]
Guedes is now known as Guedes_out
eywu has joined #ruby
bluenemo has quit [Remote host closed the connection]
<apeiros_>
Synthead: "I only want some code to be run when a certain condition is false" --> if !condition then <some code to be run> end
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
<apeiros_>
I don't know what's so hard to grasp about that. and if !condition --> unless condition
<Synthead>
apeiros_, any-key: what would some_command_to_abort_this be?
Criztian has joined #ruby
<ReachingFarr>
I'm using YARD to build documentation for my project and it is giving me a "The file foo.rb' could not be loaded:" error when I pass it the -e option in the YardocTask in my Rakefile but not when I execute `yard -e foo.rb lib/**/*.rb` on the command line. Any thoughts on what might be going wrong?
<apeiros_>
Synthead: told it already over and over… let me paste…
<tobago>
i can't remember the short for concatinating a variable value with a string. thought it was like "test: {value_of_my_variable}"
<tobago>
or "output: {variable} times"
fmcgeough has quit [Quit: fmcgeough]
<apeiros_>
"output: #{variable}"
<apeiros_>
it's called string interpolation btw.
ddv has quit [Quit: *poof*]
rippa has quit [Ping timeout: 244 seconds]
<tobago>
ahhh. well. right.
<apeiros_>
concatenation means "add a string to the end of another string"
<tobago>
apeiros_: thanks :)
<apeiros_>
yw
jimeh has quit [Ping timeout: 276 seconds]
schaerli has quit [Remote host closed the connection]
davidpk has quit [Ping timeout: 244 seconds]
looopy has quit [Remote host closed the connection]
maesbn has joined #ruby
azm has quit [Ping timeout: 256 seconds]
davidw has joined #ruby
davidw is now known as Guest54378
looopy has joined #ruby
davidpk has joined #ruby
tomb_ has joined #ruby
sebastorama has joined #ruby
mvangala has quit [Remote host closed the connection]
sebastorama has quit [Read error: Connection reset by peer]
s0ber_ has joined #ruby
<ReachingFarr>
Does anyone know how to add example code to YARD generated documentation?
<horseman>
ReachingFarr: @example
<horseman>
;)
s0ber has quit [Read error: Operation timed out]
mengu has joined #ruby
s0ber_ is now known as s0ber
mrwalker has quit [Ping timeout: 252 seconds]
mengu__ has quit [Ping timeout: 246 seconds]
sam113101 has quit [Quit: Leaving.]
<ReachingFarr>
horseman: Most of my example code is in a README file. I take it I'll still need to do `#@example`?
sam113101 has joined #ruby
digitalcakestudi has joined #ruby
<Mon_Ouie>
If you use markdown for makeup, just indent code blocks by four spaces
<ReachingFarr>
horseman: OK, that isn't working with or without the #
<Mon_Ouie>
markup*
<horseman>
ReachingFarr: not quite sure what you mean. Where/how are you using YARD? to document methods or what?
sam113101 has left #ruby [#ruby]
<horseman>
ReachingFarr: if you're just using markdown instead (as in the README) then just use markdown formatting rules
jesly_ has joined #ruby
<ReachingFarr>
Mon_Ouie: I think it defaults to RDoc, correct? If so, that is what I'm using.
sam113101 has joined #ruby
foofoobar has joined #ruby
looopy has quit [Remote host closed the connection]
<Mon_Ouie>
I'd guess it's something similar anyway
yoklov has joined #ruby
jesly has joined #ruby
<ReachingFarr>
horseman: There is a README file (currently in RDoc markup) that contains a bunch of examples and overview documentation. In there I have several examples that are indented but showing up as regular text in the generated documentation.
<horseman>
ReachingFarr: if it's in rdoc markup, then lookup the rdoc tags for example code, im not sure what it uses. However, i would probalby switch to markdown if i were you
<ReachingFarr>
horseman: I think RDoc just uses an indented block of text, but that isn't working. Why do you recommend markdown? I'm fine with switching, but I would like to have some reason for it.
maesbn has quit [Remote host closed the connection]
krz has quit [Quit: krz]
zommi has quit [Remote host closed the connection]
<zeknox>
boom! Just got threads working in my ruby script
<ReachingFarr>
OK, apparently the parser used by YARD does not recognize tabs as a valid form of indentation :-( If there was one thing I really disliked about the standard ruby coding style is the two-space indent.
<robacarp>
zeknox: what are you threading?
<zeknox>
robacarp: nnamp scans for penetration testing
<zeknox>
nmap*
hamfz_ has joined #ruby
<zeknox>
robacarp: using the ruby-nmap gem
<zeknox>
robacarp: fairly new to ruby :)
<robacarp>
zeknox: nice. are you using a ...oh, sweet
bbttxu has joined #ruby
tobago has quit [Quit: Instantbird 1.1]
<ReachingFarr>
zeknox: Well, it might be better to say that nmap is a scanning tool used for penetration testing.
<ReachingFarr>
robacarp: So I pass the `-M redcarpet` option? Not `-M markdown`?
araujo has quit [Read error: Connection reset by peer]
<robacarp>
ReachingFarr: I'm not exactly sure what you're doing in your script...but redcarpet is a ruby gem for markdown.
<ReachingFarr>
robacarp: Well, neither of those options seem to work.
tomb_ has quit [Quit: Computer has gone to sleep.]
<ReachingFarr>
robacarp: I'm trying to tell my YardocTask in my Rakefile that my files will be in Markdown.
macmartine has quit [Quit: macmartine]
looopy has quit [Remote host closed the connection]
<robacarp>
welp. no idea about that.
francisfish has quit [Remote host closed the connection]
becom33 has joined #ruby
ciopte7_ has quit [Quit: ciopte7_]
philcrissman_ has joined #ruby
<becom33>
https://gist.github.com/f4584ae08632eab44ad8 i'm kinda confused . I looking for a method I can do the following . in the bottom of the script I have mentioned what I want to do
* becom33
anyone ?
Tuxist64bit has quit [Read error: Connection reset by peer]
<becom33>
please
internet_user has quit [Remote host closed the connection]
rmascarenhas has quit [Quit: leaving]
araujo has joined #ruby
andrewhl has joined #ruby
araujo has quit [Read error: Connection reset by peer]
<dbgster>
do rake dependancies run in a guaranteed order?
<billy_ran_away>
Is it possible to specify a quick one-off guard in the Guardfile?
polysics has quit [Read error: Operation timed out]
Urth|Away is now known as Urthwhyte
<billy_ran_away>
I'm just wondering why this one isn't working… http://cl.ly/Gmy4
stephenjudkins has quit [Quit: stephenjudkins]
ThatDudeGuy_ has quit [Read error: Connection reset by peer]
foofoobar has quit [Quit: bb]
bontaq has joined #ruby
<carloslopes>
becom33: hmmm it's because TestAgain is inside the Test module
<becom33>
hmm yea :/
<becom33>
any idea ?
<krz>
is there a way to get beginning of time?
<carloslopes>
becom33: all the classes that the user will walk through via the command line will be inside the Test module?
<becom33>
carloslopes, think of it a plugin . mod <plguin name> will load the plugin . after loading it . I will be able to use methods inside the plguin class as commands
vipaca has quit [Quit: Leaving...]
<becom33>
like the mod methods in the prompt class
<krz>
through the Time class?
<krz>
any ideas?
<becom33>
method (*
<Hanmac>
becom33 make a a pastie of your current, and what you call, (and what you input)
<becom33>
Hanmac, wait
<carloslopes>
becom
<carloslopes>
becom33: if all the classes will be inside the Test module, you can do Test.const_get(val)
ken_barber1 has joined #ruby
<carloslopes>
becom33: so, it will search for the class inside the module
Guest54378 has quit [Read error: Operation timed out]
bosphorus has quit [Remote host closed the connection]
Jake232 has joined #ruby
<krz>
anyone
RidDrib has joined #ruby
Gavilan has joined #ruby
jrist is now known as jrist-afk
<carloslopes>
becom33: i need to go now, but Hanmac is talking with you, so you are in good hands! :)
<carloslopes>
becom33: good luck, and sorry but i really have to leave :/.. cya
KL-7 has quit [Quit: This computer has gone to sleep]
minijupe has joined #ruby
bglusman has quit [Remote host closed the connection]
stephenjudkins has joined #ruby
<Hanmac>
becom33 in your current system only one module is used at the same time ... if you want common functions thy must defined in Var, or you need some kind of call stack
bglusman has joined #ruby
bglusman has quit [Read error: Connection reset by peer]
dv_ has quit [Ping timeout: 246 seconds]
workmad3 has joined #ruby
skogis has quit [Ping timeout: 252 seconds]
<becom33>
ok thanks Hanmac
polysics_ has quit [Remote host closed the connection]
mattonrails has joined #ruby
dv310p3r has quit [Ping timeout: 246 seconds]
kevinbond has joined #ruby
tatsuya_o has joined #ruby
carlyle has quit [Remote host closed the connection]
td123 has quit [Ping timeout: 246 seconds]
akem has joined #ruby
sie has joined #ruby
sie is now known as Guest47629
pygospa has quit [Read error: Operation timed out]
eka has quit [Quit: Leaving]
dv_ has joined #ruby
keithcelt has joined #ruby
pygospa has joined #ruby
ciopte7_ has quit [Quit: ciopte7_]
Nicke\ has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
indian has joined #ruby
LBRapid has quit [Quit: Farewell...]
<keithcelt>
Does anyone here have any experience with Hamster
<keithcelt>
?
tvw has joined #ruby
mneorr has quit [Remote host closed the connection]
ciopte7_ has joined #ruby
mneorr has joined #ruby
Karmaon has quit [Read error: Connection reset by peer]
Jake232 has quit [Quit: Computer has gone to sleep.]
dhaskew has quit [Read error: Connection reset by peer]
dhaskew has joined #ruby
zastaph has quit []
jgarvey has quit [Quit: Leaving]
dbgster has joined #ruby
dhaskew has quit [Read error: Connection reset by peer]
dhaskew_ has joined #ruby
piotr_ has quit [Ping timeout: 246 seconds]
bontaq has quit [Remote host closed the connection]
<quuxman>
How would I strip quotes from the beginning and end of a string?
<jeremy_c>
Does super have to be the first call on an overridden method or can it be the last? I am running into a weird "Stack too deep" error that I'm having problems solving
saschagehlich has quit [Quit: saschagehlich]
<stephenjudkins>
jeremy_c: it can be anywhere in there
<stephenjudkins>
(or nowhere)
<stephenjudkins>
it's not like java constructors
aquaranto has quit [Quit: Connection closed for inactivity]
<quuxman>
String.strip doesn't take any arguments, like I'd expect
fayimora has quit [Read error: Connection reset by peer]
Synthead has quit [Quit: p33 ba115]
fayimora has joined #ruby
<keithcelt>
quuxman: if you'd like to delete all the quotes, use delete '"'
<jeremy_c>
It's an active model, and I am overriding the save method. I need to do some computations that I want to be cached in the database, so I have: def save ... compute ... super ... end and for that I get a stack too deep. I can call my_obj.compute just fine w/no errors :-/
* jeremy_c
goes digging
semarjt has quit [Read error: Connection reset by peer]
<quuxman>
keithcelt: not really what I want to do, but I guess that'll work
seitensei has quit [Read error: Connection reset by peer]
<keithcelt>
quuxman: the alternative is slicing.
Solnse has joined #ruby
seitensei has joined #ruby
slimjimflim has quit [Quit: ChatZilla 0.9.88.2 [Firefox 12.0/20120420145725]]
<keithcelt>
if mystr[0] == '"' then mystr[1..-1] # repeat for end of string.
<keithcelt>
or gsub
tawk has joined #ruby
adeponte has quit [Remote host closed the connection]
eywu has joined #ruby
<tawk>
test
seitensei has quit [Read error: Connection reset by peer]
Norrin_ is now known as Chitown
uris has joined #ruby
seitensei has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
Chitown is now known as NorrinRadd
NorrinRadd has quit [Changing host]
NorrinRadd has joined #ruby
NorrinRadd is now known as Chitown
looopy has joined #ruby
ZachBeta has joined #ruby
adeponte has joined #ruby
tenseiten has joined #ruby
matti has quit [Quit: 8-X]
tomb_ has joined #ruby
andrewhl has quit [Quit: andrewhl]
tawk has quit [Quit: Leaving]
gmci has quit [Read error: Connection reset by peer]
danielvdotcom has quit [Quit: i sleep.]
baroquebobcat has joined #ruby
azm has quit [Ping timeout: 240 seconds]
Solnse has quit []
seitensei has quit [Ping timeout: 240 seconds]
xaq has joined #ruby
weasels has joined #ruby
otters has quit [Read error: Connection reset by peer]
jameshyde has joined #ruby
Mohan has quit [Ping timeout: 252 seconds]
gmci has joined #ruby
schovi has quit [Remote host closed the connection]
td123 has joined #ruby
billy_ran_away has quit []
Mohan has joined #ruby
moshee has quit [Ping timeout: 246 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
kirun_ has joined #ruby
brianpWins has quit [Quit: brianpWins]
fbernier has quit [Ping timeout: 246 seconds]
kirun has quit [Ping timeout: 265 seconds]
xclite has joined #ruby
C0deMaver1ck has quit [Remote host closed the connection]
kirun_ has quit [Client Quit]
Foxandxss has joined #ruby
<shadoi>
jeremy_c: just make certain you know which method you're calling when using super. Pry is very useful to explore your local state.
mikepack has quit [Read error: Connection reset by peer]
vitor-br has quit [Ping timeout: 246 seconds]
akiress has joined #ruby
bluenemo has quit [Remote host closed the connection]
akiress has quit [Changing host]
akiress has joined #ruby
Emmanuel_Chanel has quit [Quit: Leaving]
emmanuelux has quit [Read error: No route to host]
td123 has quit [Quit: WeeChat 0.3.7]
td123 has joined #ruby
eka has joined #ruby
Emmanuel_Chanel has joined #ruby
emmanuelux has joined #ruby
hadronzoo has quit [Quit: hadronzoo]
kil0byte has joined #ruby
thone_ is now known as thone
baroquebobcat has quit [Quit: baroquebobcat]
Solnse has joined #ruby
_2easy has joined #ruby
bbttxu has joined #ruby
bbttxu has left #ruby [#ruby]
hadronzoo has joined #ruby
Mohan has quit [Ping timeout: 250 seconds]
hadronzoo has quit [Client Quit]
<jeremy_c>
shadoi: thanks!
rbanffy has quit [Quit: Ex-Chat]
Mohan has joined #ruby
cantonic has quit [Quit: cantonic]
Chryson has joined #ruby
hubble has quit [Quit: hubble]
csavola has joined #ruby
cephalopod has quit [Read error: Connection reset by peer]
looopy has quit [Remote host closed the connection]
chson has joined #ruby
akiress has quit [Quit: leaving]
Urth|Away is now known as Urthwhyte
rushed has quit [Quit: rushed]
AlbireoX has quit [Ping timeout: 265 seconds]
fayimora_ has joined #ruby
yoklov has quit [Quit: computer sleeping]
azm has joined #ruby
sbanwart has quit [Read error: Operation timed out]
yoklov has joined #ruby
iocor has quit [Ping timeout: 245 seconds]
nfk has quit [Quit: yawn]
nari__ has joined #ruby
AlbireoX has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
brianpWins has joined #ruby
fayimora has quit [Ping timeout: 264 seconds]
fayimora_ is now known as fayimora
eric has joined #ruby
eric is now known as Guest38930
iocor has joined #ruby
otters has joined #ruby
weasels has quit [Read error: Connection reset by peer]
techhelp has quit [Quit: This computer has gone to sleep]
n1x has joined #ruby
Karmaon has joined #ruby
kah_ has joined #ruby
Karmaon has quit [Remote host closed the connection]
Karmaon has joined #ruby
dbgster has quit [Quit: dbgster]
_2easy has quit [Quit: Lost terminal]
looopy has joined #ruby
blacktulip has quit [Remote host closed the connection]
fbernier has joined #ruby
niklasb has joined #ruby
n1x has quit [Quit: "Dawn!! /me yawns! Time to sleep!!"]
azm has quit [Ping timeout: 244 seconds]
sohocoke has quit [Quit: sohocoke]
nari__ has quit [Ping timeout: 256 seconds]
virunga has quit [Read error: Connection reset by peer]
vitor-br has joined #ruby
mpereira has joined #ruby
Choobie has joined #ruby
nari__ has joined #ruby
td123 has quit [Read error: Connection reset by peer]
td123 has joined #ruby
kenichi has quit [Remote host closed the connection]
indian has quit [Read error: Connection reset by peer]
tatsuya_o has quit [Remote host closed the connection]
nari_ has joined #ruby
EzeQL has quit [Read error: Connection reset by peer]
EzeQL has joined #ruby
sohocoke has joined #ruby
nari__ has quit [Ping timeout: 252 seconds]
oooPaul has quit [Quit: Ciao for now!]
jonathanwallace has joined #ruby
iocor has quit [Quit: Computer has gone to sleep.]