heppy [heppy!~heppy@fw.baysidebusinessplaza.com] has joined #ruby-lang
<samuelkadolph>
zenspider: AHHHHHHHHHHHH HOW DID YOU GET MY PICTURE?!?!?!?!?!!
Sailias [Sailias!~jonathan@99.234.118.225] has joined #ruby-lang
takaokouji [takaokouji!~takaokouj@2001:268:306:1:225:bcff:fedc:e1fe] has joined #ruby-lang
<wmoxam>
avfoundation == Lion only?
<rue>
command not found
<samuelkadolph>
zenspider: The mustache is way off center though
<samuelkadolph>
I didn't even see it the first time
<zenspider>
samuelkadolph: that's because of YOUR FACE
* samuelkadolph
cries
<rue>
Still, it's rather concise
<rue>
The code, not samuelkadolph's face
<samuelkadolph>
CPU usage is quite high
<samuelkadolph>
Probably macruby's fault
<rue>
That could be because of your face, again.
<samuelkadolph>
rue: Yeah… well… your mother!
neoesque [neoesque!~neoesque@210.59.147.232] has joined #ruby-lang
macmartine [macmartine!~macmartin@069-064-227-254.pdx.net] has joined #ruby-lang
amh345 [amh345!~amh345@unaffiliated/amh345] has joined #ruby-lang
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
srbaker [srbaker!~srbaker@68.71.200.170] has joined #ruby-lang
looopy [looopy!~looopy@pool-151-200-236-181.washdc.btas.verizon.net] has joined #ruby-lang
<shevy>
you gotta believe what rue says
gix [gix!~gix@e180001167.adsl.alicedsl.de] has joined #ruby-lang
havenn [havenn!~skipper@pool-72-67-31-69.lsanca.fios.verizon.net] has joined #ruby-lang
looopy [looopy!~looopy@pool-151-200-236-181.washdc.btas.verizon.net] has joined #ruby-lang
Defusal [Defusal!DeFi@dsl-240-229-241.telkomadsl.co.za] has joined #ruby-lang
Defusal [Defusal!DeFi@unaffiliated/ecnerifed] has joined #ruby-lang
Pip_ [Pip_!~Pip@unaffiliated/pip] has joined #ruby-lang
<jmontross>
what is best way to put some junk at end of a file using ruby?
<jmontross>
`echo "stuff" >> file` ?
QaDeS_ [QaDeS_!~mklaus@frbg-5d84fe49.pool.mediaWays.net] has joined #ruby-lang
<rue>
…Not that
<rue>
jmontross: >> means append mode, which you can also find in File
woollyams [woollyams!~woollyams@124-170-59-47.dyn.iinet.net.au] has joined #ruby-lang
Diazo [Diazo!~Diazo@cpe-76-169-9-64.socal.res.rr.com] has joined #ruby-lang
kaos180 [kaos180!~kaos@128.205.236.244] has joined #ruby-lang
Diazo [Diazo!~Diazo@cpe-76-169-9-64.socal.res.rr.com] has quit [#ruby-lang]
<jmontross>
rue: I cannot deny, that is what I wanted.
arooni-mobile [arooni-mobile!~arooni-mo@187.153.79.230] has joined #ruby-lang
igotnolegs [igotnolegs!~igotnoleg@174-27-214-73.slkc.qwest.net] has joined #ruby-lang
Aaaarg [Aaaarg!~Arthur@121-74-43-214.telstraclear.net] has joined #ruby-lang
tomzx [tomzx!~tomzx@dsl-216-221-32-204.aei.ca] has joined #ruby-lang
srbaker [srbaker!~srbaker@70.28.245.108] has joined #ruby-lang
densebits [densebits!~michael@fedora/densebits] has joined #ruby-lang
fayimora_ [fayimora_!~fayimora@95.175.159.32] has joined #ruby-lang
freenodiz [freenodiz!~IceChat77@unaffiliated/freenodiz] has joined #ruby-lang
Aaaarg [Aaaarg!~Arthur@121-74-32-24.telstraclear.net] has joined #ruby-lang
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
<freenodiz>
Hi,I'm a ruby newbie,and i'm very interested in the language.i know css/html ,and a bit of php.I just want to know if ruby frameworks,such as rails or sinatra,are "naturally" more secure than php.i would like also to know some feed back about deploying an app at heroku.Is heroku server prepared for ddos attacks or it would be some manual configuration made by the owner of the app/domain?
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
wmoxam [wmoxam!~wmoxam@69-196-160-133.dsl.teksavvy.com] has joined #ruby-lang
tomzx [tomzx!~tomzx@dsl-216-221-32-204.aei.ca] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@46.118.221.156] has joined #ruby-lang
looopy [looopy!~looopy@pool-151-200-236-181.washdc.btas.verizon.net] has joined #ruby-lang
<rue>
freenodiz: #heroku or their FAQs might be able to shed light on their countermeasures
<rue>
freenodiz: Where security is concerned, a competent programmer is probably equally safe either way
<rue>
Or unsafe, if you wish.
<freenodiz>
no answer from heroku.i went there before comming here already.rue,i just don't understand 1 thing.heroku is a sinatra app,k got that...but then,they have of course the servers,wich could be amazon cloud,for example.then i ask you,wich "os" would be behind it?freebsd?some custom linux?
<freenodiz>
rue,thanks for imput regarding security in general.it means i can use previous php security knowledge on it
<rue>
By and large the same problems exist, yes. Solutions may be a bit different, but you'll know what to look for
<rue>
Also, there's #rubyonrails and #sinatra, if you are working with those.
arooni-mobile [arooni-mobile!~arooni-mo@187.153.79.230] has joined #ruby-lang
<freenodiz>
sure,i will be going in those channels,altough i will focus on ruby-lang and sinitra for now,to keep it simple and understand the basics concepts of the language.
confounds [confounds!~confounds@CPE78cd8e667600-CM78cd8e6675fd.cpe.net.cable.rogers.com] has joined #ruby-lang
Sailias [Sailias!~jonathan@99.234.118.225] has joined #ruby-lang
valeri_ufo [valeri_ufo!~valeri_uf@octocat.net] has joined #ruby-lang
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
<freenodiz>
rue,i found out,heroku is a custom linux kernel
Wardrop [Wardrop!~tomwardro@86.46.96.58.static.exetel.com.au] has joined #ruby-lang
Oloryn_lt11 [Oloryn_lt11!~Oloryn@home.benshome.net] has joined #ruby-lang
diegoviola [diegoviola!~diego@host-1-211.b15.cvc.com.py] has joined #ruby-lang
krz [krz!~foobar@unaffiliated/krz] has joined #ruby-lang
heppy_ [heppy_!~heppy@fw.baysidebusinessplaza.com] has joined #ruby-lang
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
MarcoBXBRO1 [MarcoBXBRO1!~MarcoBXBR@c-68-34-17-197.hsd1.md.comcast.net] has joined #ruby-lang
MarcoBXBRO1 [MarcoBXBRO1!~MarcoBXBR@c-68-34-17-197.hsd1.md.comcast.net] has quit [#ruby-lang]
andrewhl [andrewhl!~andrew@24-246-15-43.cable.teksavvy.com] has joined #ruby-lang
mkscrg [mkscrg!~mkscrg@ool-18e4f9d6.dyn.optonline.net] has joined #ruby-lang
Diaoer [Diaoer!~Diaoer@116.239.4.194] has joined #ruby-lang
heppy [heppy!~heppy@75-101-31-55.dsl.dynamic.sonic.net] has joined #ruby-lang
confounds [confounds!~confounds@CPE78cd8e667600-CM78cd8e6675fd.cpe.net.cable.rogers.com] has joined #ruby-lang
dr0id [dr0id!~andy@unaffiliated/dr0id] has joined #ruby-lang
x0F__ [x0F__!~x0F@unaffiliated/x0f] has joined #ruby-lang
nuclearsandwich [nuclearsandwich!~nuclearsa@74.sub-166-250-32.myvzw.com] has joined #ruby-lang
Austin__ [Austin__!~austin@CPE0016cbc30e9c-CM001ceacff6ba.cpe.net.cable.rogers.com] has joined #ruby-lang
confounds [confounds!~confounds@CPE78cd8e667600-CM78cd8e6675fd.cpe.net.cable.rogers.com] has joined #ruby-lang
rippa [rippa!~splitta@85.158.54.234] has joined #ruby-lang
nuclearsandwich [nuclearsandwich!~nuclearsa@77.sub-166-250-38.myvzw.com] has joined #ruby-lang
<rue>
Anybody (still?) run a chef server and client on the same machine, rather than using Solo?
Jerrry [Jerrry!~Jerry@c-98-208-86-236.hsd1.ca.comcast.net] has joined #ruby-lang
<jmontross>
why would you do that?
<rue>
Or maybe I misrecall, maybe the setup was just using a non-server machine as a temporary server
<jmontross>
hosted chef is easy enough and free for one server i believe…
handygandy [handygandy!~handygand@adsl-76-193-165-192.dsl.chcgil.sbcglobal.net] has joined #ruby-lang
<handygandy>
Given an array A how do I create an array that is all but the last element of A?
<mksm>
array_a.shift
<mksm>
no
<mksm>
array_a.pop
<handygandy>
no
<confounds>
no
<mksm>
i'm sure there's a reason, but why do we have 2 ruby channels?
<confounds>
something with array.slice
<rue>
mksm: Because the asses on #ruby removed the agreed-upon /topic referral to here (#ruby-lang being the channel designated on ruby-lang.org).
Sailias_ [Sailias_!~jonathan@173.32.33.27] has joined #ruby-lang
<diegoviola>
rue: could we get the channel to merge? i also see no point in 2 channels, python has #python and perl has #perl
<diegoviola>
channels*
<confounds>
or instead of merging, we could create another two or three channels
<handygandy>
Because way back when some fool created #ruby-lang instead of #ruby, which worked OK for a while but then someone went into #ruby -- creating it. Peoples started congregating there.
livinded [livinded!~lolwut@pool-108-23-242-132.lsanca.fios.verizon.net] has joined #ruby-lang
<rippa>
handygandy: A[0..-2]
<handygandy>
rippa:That's it! Thanks.
<diegoviola>
make #ruby a redirect to #ruby-lang
<diegoviola>
or something like that
<confounds>
handygandy i beat rippa cause i already said slice
<mksm>
diegoviola, you can't configure #ruby without being owner
<rue>
diegoviola: The problem is that the rights-holder (i.e. Matz) needs to submit a group registration.
<rue>
Given that the aforementioned asses prefer to perpetuate the split
Austin__ [Austin__!~austin@CPE0016cbc30e9c-CM001ceacff6ba.cpe.net.cable.rogers.com] has quit [#ruby-lang]
<jmontross>
#ruby is better name
woollyams [woollyams!~woollyams@124-170-59-47.dyn.iinet.net.au] has joined #ruby-lang
<jmontross>
I just come here because the more refined rubyists seem to be here
<diegoviola>
i find the split unnecessary, could we talk to the people in charge?
<diegoviola>
we could have like 800 people here if the split didn't exist
cola_zero [cola_zero!~cola_zero@www5054u.sakura.ne.jp] has joined #ruby-lang
<confounds>
we wouldn't get along... totally different factions
<diegoviola>
oh ok, that's another thing, i wasn't aware of that
<diegoviola>
i almost never go to #ruby
<confounds>
diegoviola i'm just kidding ;) but they've existed separately for quite a while i think
companybot [companybot!martins@login1.powertech.no] has joined #ruby-lang
<confounds>
if the owners haven't figured it out by now, i'm kinda doubtful they'd bother
<diegoviola>
i see
scottschecter [scottschecter!~scott@c-98-252-167-171.hsd1.ga.comcast.net] has joined #ruby-lang
<mksm>
we should invade
<diegoviola>
invade?
<confounds>
yeah
<mksm>
(for the oil, obviously)
confounds [confounds!~confounds@CPE78cd8e667600-CM78cd8e6675fd.cpe.net.cable.rogers.com] has joined #ruby-lang
Aaaarg [Aaaarg!~Arthur@121-74-32-232.telstraclear.net] has joined #ruby-lang
MarcoBXBRO1 [MarcoBXBRO1!~MarcoBXBR@c-68-34-17-197.hsd1.md.comcast.net] has joined #ruby-lang
<mksm>
would there be a ruby equivalent for "awk -F "|" "{ print NF }" <file>" ?
<confounds>
what does that do in english
JosephRuby [JosephRuby!~joseph@46.33.34.30] has joined #ruby-lang
<confounds>
(and i'm sure there would be a ruby equiv)
<mksm>
prints number of fields using "|" as field separator
<mksm>
for each line in file
<confounds>
not sure what the shortest would be, but you could just split each line in the file, then call .count or .size on the resulting array
<mksm>
ruby -an -F"\|" -e 'puts $F.size' <file> does it
<mksm>
the -F option is kinda weird ... it sticks the argument inside a regex ... so "|" needs to be escaped.
<confounds>
very cool
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
<jmontross>
mksm - marksuman?
<mksm>
no
Aaaarg [Aaaarg!~Arthur@121-74-35-160.telstraclear.net] has joined #ruby-lang
woollyams [woollyams!~woollyams@124-170-59-47.dyn.iinet.net.au] has joined #ruby-lang
<mksm>
ah rubyzip is back
lsegal [lsegal!jinx@modemcable249.109-177-173.mc.videotron.ca] has joined #ruby-lang
huugsy [huugsy!~huug@ip-83-134-136-36.dsl.scarlet.be] has joined #ruby-lang
Aaaarg [Aaaarg!~Arthur@121-74-38-206.telstraclear.net] has joined #ruby-lang
gnufied [gnufied!~gnufied@122.167.254.70] has joined #ruby-lang
adam_ [adam_!~adam@S010600238b791368.cg.shawcable.net] has joined #ruby-lang
Aaaarg [Aaaarg!~Arthur@121-74-42-170.telstraclear.net] has joined #ruby-lang
<adam_>
Hi guys, I have an issue -> ruby path/to/ruby/file does nothing in terms of running the ruby file.
<adam_>
am I doing something wrong?
<jmontross>
maybe you dont have path right...
<adam_>
would it not spazz out? and i dragged the file from the window to the terminal so im sure the path is correect
<jmontross>
i had ismilar issues on ubuntu tho… with a script that had lots of stuff going on… but never with simple scripts.
jmontross [jmontross!~Adium@static-96-236-65-137.snfcca.dsl-w.verizon.net] has quit [#ruby-lang]
<adam_>
its also a test, using rubys test cases
<imperator>
maybe your script doesn't do what you think it does
woollyams [woollyams!~woollyams@124-170-59-47.dyn.iinet.net.au] has joined #ruby-lang
freenodiz [freenodiz!~IceChat77@unaffiliated/freenodiz] has joined #ruby-lang
eumario [eumario!~eumario@va-184-5-132-88.dhcp.embarqhsd.net] has joined #ruby-lang
dv310p3r [dv310p3r!~dv310p3r@c-98-203-41-91.hsd1.fl.comcast.net] has joined #ruby-lang
<adam_>
when running ruby files as ruby /path/to/file and then /path/to/file I get a bunch of "commands not found" for obvious commands that would work....
<eumario>
what kind of commands adam_?
traph_ [traph_!~traph@95-42-78-184.btc-net.bg] has joined #ruby-lang
traph_ [traph_!~traph@95-42-78-184.btc-net.bg] has quit [#ruby-lang]
<adam_>
for example a = [1,2,3] sais a, = and [1,2,3] are not found
<eumario>
Weird.... Can you do a Pastebin of your terminal output from when you execute ruby, to the next prompt, and the script your trying to run?
<adam_>
ill just post both my scripts and the terminal out put - I have a feeling I am doing something wrong any ways give me a moment
<eumario>
np
<adam_>
sorry about the formatting, pasting from Scite to paste bin screws up the formatting: http://pastebin.com/1RAC2yLm
traph [traph!~traph@95-42-78-184.btc-net.bg] has joined #ruby-lang
traph [traph!~traph@95-42-78-184.btc-net.bg] has quit [#ruby-lang]
<eumario>
adam_, At the top of your script, put in #!/usr/bin/env ruby
<adam_>
is this seriously my issue?
<adam_>
>_>
<eumario>
Bash thinks your trying to run a BASH Shell script, instead of a Ruby Script, the Shebang at the top, tells it which interpreter to run.
<adam_>
angry face.
<adam_>
any ways thanks
<eumario>
That way, either method will work, as long as the file has Executable bit set for the script in question.
<adam_>
ok thanks
<eumario>
Np. I'm working on a my own Linux Distro, and currently working on making a Live CD Installer. I run into that kind of issue more often then not. lol
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby-lang
<adam_>
isnt managing a distro a lot more trouble then if you had a huge team?
<eumario>
Yes, but all distros started out with a small team to start off with.
<adam_>
a small team of one?
<eumario>
Yeah
<eumario>
lol
Asher [Asher!~asher@98.158.127.150] has joined #ruby-lang
<eumario>
Though I'm not alone. My partner in crime, works Python, and I have people to administrate forums, and Do artwork. So I'm not completely alone. Just pretty much the only Ruby programmer.
<adam_>
oh I dont know if I want to use it, 2 gigs of ram? im on a vm with 1.3 lol
<adam_>
Im not going up to 2 gigs
<eumario>
It's java, what do you expect?
<eumario>
Like I said though, Geany, Gedit
<adam_>
java nevr required that much ram before ....
<adam_>
oday
<eumario>
Those two are good options.
<eumario>
Though not as feature rich as RubyMine
<eumario>
I'm on ArchLinux, with 6 gigs of ram, so I have the space to work with. lol
<adam_>
there was an ide written in ruby for ruby that was fre and open source and i cant rememeber its name now
<adam_>
redcar
<eumario>
That's extreme simplistic
<adam_>
yar
<mksm>
VIM
<adam_>
ICK
* eumario
shoots himself in the head for even hearing that editor being suggested.
retro|cz [retro|cz!~retro@106.142.broadband6.iol.cz] has joined #ruby-lang
<adam_>
LOL
<mksm>
vim is no-no and gigantic java ide is ok?
<adam_>
hence Redcar
<rhizmoe>
wat
<adam_>
vim makes me puke
<eumario>
mksm: I prefer simplistic editing. For my needs, as of current, RubyMine covers what I need. VIM, is over complicated, with a major learning curve.
<ruskie>
maybe try diakonos then considering this is #ruby-lang ?
<adam_>
redcar does what i need it to
<mksm>
i see we all buy different underwears :D
kyrylo [kyrylo!~kyrylo@46.118.221.156] has joined #ruby-lang
<eumario>
Every programmer has their own way of writing code, and their own preference to their editor.
<eumario>
Amazing, Redcar is downloading Eclipse stuff.
nari [nari!~nari@2001:268:306:1:f2de:f1ff:fe55:2de0] has joined #ruby-lang
<adam_>
it is?
<eumario>
Yep
krz [krz!~foobar@unaffiliated/krz] has joined #ruby-lang
<eumario>
ArachnoRuby IDE use to be a good one.
<eumario>
But it looks like scriptolutions went kaput
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby-lang
heppy [heppy!~heppy@75-101-31-55.dsl.dynamic.sonic.net] has joined #ruby-lang
Mchl [Mchl!~Mchl@h1881165560.rev.rootvps.pl] has joined #ruby-lang
Fullmoon [Fullmoon!~Fullmoon@dsl-stat-43-17.mmc.at] has joined #ruby-lang
havenn [havenn!~skipper@pool-72-67-31-69.lsanca.fios.verizon.net] has joined #ruby-lang
Diaoer [Diaoer!~Diaoer@116.239.4.194] has joined #ruby-lang
solars [solars!~solars@clnet-kmu02-090.ikbnet.co.at] has joined #ruby-lang
<adam_>
if I am going through an array called a and looking for an element would I do for element in a if element.exists return bla end?
JohnBat26 [JohnBat26!~Eugene@89.175.77.90] has joined #ruby-lang
<eumario>
return blah if a.index(element
<eumario>
)
<adam_>
excellent
<eumario>
With hash, it's return blah if a.has_key?(element)
<rhizmoe>
.detect
<eumario>
And return blah if a.has_value?(element)
<eumario>
And detect
<eumario>
Many ways
<adam_>
i am looking for the simplest way to say if you have this (what ever it is) in the array return it, and your first soloution works
JohnBat26 [JohnBat26!~Eugene@89.175.77.90] has joined #ruby-lang
<adam_>
actually an .include? is better
<adam_>
now that i think about it
JohnBat26 [JohnBat26!~Eugene@89.175.77.90] has joined #ruby-lang
nuclearsandwich [nuclearsandwich!~nuclearsa@74-93-3-241-SFBA.hfc.comcastbusiness.net] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
<adam_>
something that makes me mad: if I have a module names apple and a extend apple in a class called fruit and call apples method by doing: fruit? why when running that class do I get a no method error on fruit? (i hope that makes sense)
Diaoer [Diaoer!~Diaoer@116.239.4.194] has joined #ruby-lang
<rue>
Nope
<eumario>
Are you defining the fruit? method as a instance method, or a class method?
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
michael_mbp [michael_mbp!~Marin@112.134.196.69] has joined #ruby-lang
jensn [jensn!~Jens@165-244-96-87.cust.blixtvik.se] has joined #ruby-lang
<adam_>
neither I am just doing module apple def fruit? end end
<eumario>
And class fruit; extend apple; end ?
molgrew [molgrew!~bozo20@85.182.139.18] has joined #ruby-lang
<adam_>
class fruit extend apple def whatis fruit? end end - then I get a "no method error" on fruit?
<adam_>
which shouldnt happen
<eumario>
No, it shouldn't.
<adam_>
so why is it?
<adam_>
it basically sais cannot find fruit? no method error
<eumario>
Yeah, just got the same thing here.....
<adam_>
why though? it should work
<eumario>
It should, but seems that you have to include, instead of extend.
<rippa>
it would work
<rippa>
with self.class.fruit?
<eumario>
Yeah, that's right, extend does class methods, include does instance methods.
<rippa>
because self in instance method is instance
<adam_>
oh ok. thanks.
<eumario>
o.O
twittard [twittard!~twittard@vpn.lax.truecarcorp.com] has joined #ruby-lang
yorickpeterse [yorickpeterse!~yorickpet@pdpc/supporter/professional/yorickpeterse] has joined #ruby-lang
tooky [tooky!~tooky@cpc5-sotn11-2-0-cust194.15-1.cable.virginmedia.com] has joined #ruby-lang
brianpWins [brianpWins!~brianpWin@207.6.118.71] has joined #ruby-lang
matti [matti!matti@madwifi/support/matti] has joined #ruby-lang
lenilson_dias [lenilson_dias!~lenilson_@c934d329.virtua.com.br] has joined #ruby-lang
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby-lang
now_ [now_!d470b392@gateway/web/freenode/ip.212.112.179.146] has joined #ruby-lang
roadkith [roadkith!~kith@unaffiliated/kith] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
<rue>
Does a lowercase module even compile? It doesn't, does it?
<eumario>
No, it doesn't.
cyri_ [cyri_!~cyri_@236.200.72.86.rev.sfr.net] has joined #ruby-lang
<rippa>
compile?
<rippa>
you can have lowercase module
<rippa>
with Module#new for example
<rue>
Referring to the “sample code” above
tbuehlmann [tbuehlmann!~Tobias@unaffiliated/tovias] has joined #ruby-lang
jensn [jensn!~Jens@ip231-140.wireless.lu.se] has joined #ruby-lang
NARKOZ [NARKOZ!~NARKOZ@109.127.30.213] has joined #ruby-lang
jaafar [jaafar!~jet@adsl-76-200-166-49.dsl.pltn13.sbcglobal.net] has joined #ruby-lang
<jaafar>
Hi everyone, is there an official location for documentation on the "embedded API" (i.e., the C level API)?
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby-lang
nari [nari!~nari@raichu.netlab.jp] has joined #ruby-lang
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@cblmdm24-53-178-92.buckeyecom.net] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
saLOUt [saLOUt!~rriemann@91-65-223-29-dynip.superkabel.de] has joined #ruby-lang
Fullmoon [Fullmoon!~Fullmoon@dsl-stat-43-17.mmc.at] has joined #ruby-lang
replore [replore!~replore@203.152.213.161.static.zoot.jp] has joined #ruby-lang
<Guest64631>
jaafar - README.EXT is the official doc
woollyams [woollyams!~woollyams@124-170-59-47.dyn.iinet.net.au] has joined #ruby-lang
<jaafar>
Asher: thanks!
<erikh>
it's a solid read too; not very cryptic at all
<erikh>
a nice change of pace.
<jaafar>
Looks good and very helpful. Not many pointers to recent C API docs that I could find via Google... Glad to have something
<Asher>
there are also a number of us here that are pretty familiar with it
<Asher>
so feel free to ask specific questions
<jaafar>
This channel is awesome actually, I got some embedding problems resolve here previously
<jaafar>
resolved
<Asher>
most of us hang out while working so it might take 20 min before we see but someone will ultimately see
<eumario>
Yes, we're here, and in other channels, and working on our own projects, so we tend to be slow to respond sometimes.
<jaafar>
20 min is nothing for something I've been pounding my head against for hours, so that's perfectly fine :)
<erikh>
the pickaxe tends to get dated quick enough
<erikh>
README.EXT, especially from svn is kept up to date regularly
Manhose [Manhose!~Manhose@dial-b1-238-132.telepac.pt] has joined #ruby-lang
<Asher>
your best resource is the ruby source
<Asher>
seeing how examples are used
<Asher>
but README.EXT and other guides are a good place to start, then the headers
mytrile [mytrile!~mytrile@94.26.28.135] has joined #ruby-lang
thrcka [thrcka!~thrcka@ip-89-102-34-33.net.upcbroadband.cz] has joined #ruby-lang
judofyr [judofyr!~judofyr@195.159.219.65] has joined #ruby-lang
workmad3 [workmad3!~workmad3@vpn164.its.manchester.ac.uk] has joined #ruby-lang
jhchabran [jhchabran!~jh@bne75-11-88-189-148-57.fbx.proxad.net] has joined #ruby-lang
NARKOZ [NARKOZ!~NARKOZ@109.127.30.213] has joined #ruby-lang
<NARKOZ>
is it possible to set attr_reader if some condition is true?
kedare [kedare!~kedare@scuderia.internet-fr.net] has joined #ruby-lang
<Asher>
attr_reader :reader if condition
<Asher>
just like you'd use any if condition
<matti>
Asher: :)
kedare [kedare!~kedare@scuderia.internet-fr.net] has joined #ruby-lang
<Asher>
matti :D how goes
<matti>
Asher: Not too bad, you?
<Asher>
goin well here
<rue>
NARKOZ: The takeaway here: it's just a method, and class bodies are executable code.
<rue>
Although you should take care to not go overboard with that
<judofyr>
attr_reader :hello if ENV["USER"] == "magnus"
|Vargas| [|Vargas|!~vargas@pdpc/supporter/profesional/vargas] has joined #ruby-lang
<NARKOZ>
thanks
<judofyr>
attr_reader :lucky_you if rand(100).zero?
benanne [benanne!~sander@b252h039.ugent.be] has joined #ruby-lang
valeri_ufo [valeri_ufo!~valeri_uf@februality.com] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
|Vargas| [|Vargas|!~vargas@pdpc/supporter/profesional/vargas] has joined #ruby-lang
geoffw8_ [geoffw8_!~geoffw8_@host86-161-34-158.range86-161.btcentralplus.com] has joined #ruby-lang
<DEac->
it's possible, that an on rubygems.org released gem is not installable via gem, yet? how long it takes till it installable?
<shevy>
DEac- almost instantly I would say
<shevy>
ah you mean
<shevy>
a delay before it is available after publishing?
<DEac->
yes
eumario [eumario!~eumario@va-184-5-132-88.dhcp.embarqhsd.net] has quit ["Leaving"]
<shevy>
that could be, perhaps it has to sync from somewhere
<shevy>
but I would not know really
<DEac->
i see 3 downloads happens yet, but i can't yet
<DEac->
ok, thanks
<DEac->
that never happens before
geoffw8_ [geoffw8_!~geoffw8_@host86-161-34-158.range86-161.btcentralplus.com] has joined #ruby-lang
<andrewvos>
We're doing a dojo today and are going to take a project and refactor it using flog.. Could anyone suggest some ruby code that's really simple to understand?
<andrewvos>
Well written code, that's simple to read.
<rue>
Won't that make flog superfluous, then?
<andrewvos>
rue: Yes
geoffw8_ [geoffw8_!~geoffw8_@host86-161-34-158.range86-161.btcentralplus.com] has joined #ruby-lang
<andrewvos>
rue: It's just a fun excercise though. We're not going to submit a pull request with massive refactorings.
<rue>
I mean wouldn't it make more sense to pick something that *isn't* simple?
<andrewvos>
rue: Can you think of any well written gems?
<andrewvos>
rue: Well, I'm thinking probably not because there are about 10 people joining with varying skills
<rue>
Maybe minitest?
roadkith [roadkith!~kith@unaffiliated/kith] has joined #ruby-lang
patkoscsaba [patkoscsaba!~patkoscsa@81.196.33.110] has joined #ruby-lang
<patkoscsaba>
hi everyone
<patkoscsaba>
anybody using infinity_test here?
<patkoscsaba>
is there any way to make infinity_test to reload it's configuration while running, in order to catch / observe newly added _rspec.rb test files?
<rue>
Maybe, did you have questions?
<rue>
Looks like the config is executable?
woollyams [woollyams!~woollyams@124-170-59-47.dyn.iinet.net.au] has joined #ruby-lang
<rue>
You could add a before/after to reprocess, I suppose
<patkoscsaba>
rue: that's what I though also, but I don't know how to do the reprocess or what command to run
<patkoscsaba>
I mean what to run inside after_run or before_run
<rue>
Just redo the add pattern, maybe? That wouldn't work in all cases…
<rue>
patkoscsaba: Did you check whether it supports HUP? Although I'd imagine it'd automatically be able to observe new files… seems rather pointless otherwise
<rue>
What if you add a directory pattern?
EvilJStoker [EvilJStoker!jstoker@unaffiliated/jstoker] has joined #ruby-lang
<patkoscsaba>
rue: autotest can't observe new files either ...
<patkoscsaba>
rue: I am looking into the possible solutions based on your suggestions
<rue>
patkoscsaba: Why bother redoing it if you're not improving? :)
<patkoscsaba>
rue: I don't understand you
<rue>
It should have implemented directory watching
davesq [davesq!u1884@gateway/web/irccloud.com/x-ilhbccvqjucnfdev] has joined #ruby-lang
kain [kain!~kain@151.64.233.57] has joined #ruby-lang
<patkoscsaba>
rue: hmm ... if I have a watch on views/* it includes both /app/views and rspec/views and it runs when a new test is added into rspec/views
<rue>
That's good, then?
<patkoscsaba>
maybe I just have to add an empty watcher to rspec? ... let's try
<patkoscsaba>
rue: it's good
<patkoscsaba>
but I have to make it more general
thrcka_ [thrcka_!~thrcka@ip-89-102-34-33.net.upcbroadband.cz] has joined #ruby-lang
mantono [mantono!~mantono@83.251.126.234] has joined #ruby-lang
<andrewvos>
rue: Thanks will take a look at minitest :)
Manhose [Manhose!~Manhose@193.136.33.133] has joined #ruby-lang
steerio [steerio!~steerio@92.48.73.9] has joined #ruby-lang
<steerio>
yo
<steerio>
i got a problem here that you guys probably can solve in seconds: no such file to load -- mkmf
<steerio>
which i normally can solve on debian (insteall dev package)
<steerio>
but this time ruby was installed from source under /opt, and the file indeed exists
<patkoscsaba>
rue: however this has a problem ... it will run all the tests in the specific folder, which I do not want
<steerio>
(and 'which ruby' points to the correct installation)
<andrewvos>
heftig: Supermodel doesn't look like the right tool. I want to be able to use sql/sqlite/inmemory but dont' want to have to install inmemory for sqlite
<andrewvos>
Sorry, I mean I don't want to have to install sqlite
Manhose_ [Manhose_!~Manhose@193.136.33.133] has joined #ruby-lang
nark-1 [nark-1!~NARKOZ@109.127.30.213] has joined #ruby-lang
niklasb [niklasb!~codeslay0@p5B310842.dip0.t-ipconnect.de] has joined #ruby-lang
EvilJStoker [EvilJStoker!jstoker@unaffiliated/jstoker] has joined #ruby-lang
Ypsilon [Ypsilon!~opera@p54B89E2D.dip0.t-ipconnect.de] has joined #ruby-lang
imperator [imperator!~Daniel@63-225-247-192.hlrn.qwest.net] has joined #ruby-lang
flip_digits [flip_digits!~textual@c-76-122-14-228.hsd1.fl.comcast.net] has joined #ruby-lang
ovnimancer [ovnimancer!~anton@212.59.96.38] has joined #ruby-lang
EvilJStoker [EvilJStoker!jstoker@unaffiliated/jstoker] has joined #ruby-lang
NARKOZ [NARKOZ!~NARKOZ@109.127.30.213] has joined #ruby-lang
thrcka_ [thrcka_!~thrcka@ip-89-102-34-33.net.upcbroadband.cz] has joined #ruby-lang
yorickpeterse1 [yorickpeterse1!~yorickpet@pdpc/supporter/professional/yorickpeterse] has joined #ruby-lang
ovnimancer [ovnimancer!~anton@212.59.96.38] has quit [#ruby-lang]
dv310p3r [dv310p3r!~dv310p3r@c-98-203-41-91.hsd1.fl.comcast.net] has joined #ruby-lang
davesq [davesq!u1884@gateway/web/irccloud.com/x-ilhbccvqjucnfdev] has quit [#ruby-lang]
rubyplusplus [rubyplusplus!~eric@cpe-74-75-153-107.maine.res.rr.com] has joined #ruby-lang
meise [meise!~dm@3st.be] has joined #ruby-lang
lele|w [lele|w!~Lele@2a01:2d8:0:cafe:218:f3ff:fece:a48] has joined #ruby-lang
RomD` [RomD`!~Roman@nrbg-4dbe092a.pool.mediaWays.net] has joined #ruby-lang
aLinux [aLinux!~aLinux@unaffiliated/alinux] has joined #ruby-lang
* aLinux
is back.
nari [nari!~nari@p62e324.totrnt01.ap.so-net.ne.jp] has joined #ruby-lang
aLinux [aLinux!~aLinux@unaffiliated/alinux] has quit ["Leaving"]
grafthez [grafthez!~John@78.8.207.2] has joined #ruby-lang
imajes [imajes!~imajes@is.imaj.es] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
<rue>
Congrats
<shevy>
lol
* shevy
is on rue.
sepp2k [sepp2k!~sexy@g224101130.adsl.alicedsl.de] has joined #ruby-lang
mark_locklear [mark_locklear!~jlocklear@ab-tech-lan-to-ab-tech-gw.ncren.net] has joined #ruby-lang
<TTilus>
andrewvos: don't rdbmsystems have in-memory tables? could they be of any help?
<andrewvos>
TTilus: Not sure what oyu mean exactly?
tommyvyo [tommyvyo!~tommyvyo@38.123.129.115] has joined #ruby-lang
* imperator
wonders if he means views
<andrewvos>
Ok so minitest might not be the right project to work with
<andrewvos>
may be a little complex
yfeldblum [yfeldblum!~Jay@pool-71-246-76-76.bltmmd.east.verizon.net] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@2.69.243.51.mobile.tre.se] has joined #ruby-lang
tomzx [tomzx!~tomzx@dsl-216-221-32-204.aei.ca] has joined #ruby-lang
Spooner [Spooner!~Miranda@host-92-23-158-179.as13285.net] has joined #ruby-lang
rippa [rippa!~rippa@109-161-75-186.pppoe.yaroslavl.ru] has joined #ruby-lang
EvilJStoker [EvilJStoker!jstoker@unaffiliated/jstoker] has joined #ruby-lang
<andrewvos>
WTF every gem I download has failing tests
slaytanic [slaytanic!~slaytanic@200-55-74-190.dsl.prima.net.ar] has joined #ruby-lang
dv310p3r [dv310p3r!~dv310p3r@host-208-68-238-122.biznesshosting.net] has joined #ruby-lang
<imperator>
andrewvos, how are you running them?
cjs226 [cjs226!~cjs226@rrcs-71-40-79-154.sw.biz.rr.com] has joined #ruby-lang
vesan__ [vesan__!vesan@maailmanlopun.modeemi.net] has joined #ruby-lang
gearaholic [gearaholic!~gearaholi@c-71-238-98-243.hsd1.mi.comcast.net] has joined #ruby-lang
geoffw8_ [geoffw8_!~geoffw8_@host81-151-1-88.range81-151.btcentralplus.com] has joined #ruby-lang
Manhose_ [Manhose_!~Manhose@193.136.33.133] has joined #ruby-lang
imajes [imajes!~imajes@is.imaj.es] has joined #ruby-lang
geoffw8_ [geoffw8_!~geoffw8_@host81-151-1-88.range81-151.btcentralplus.com] has joined #ruby-lang
orbit [orbit!9506a6d6@gateway/web/freenode/ip.149.6.166.214] has joined #ruby-lang
<andrewvos>
imperator: bundle exec rake test
<andrewvos>
or spec, depending
<andrewvos>
Using p290
NARKOZ [NARKOZ!~NARKOZ@109.127.30.213] has joined #ruby-lang
<andrewvos>
Just tried sinatra and there's one failing test in it too
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
Austin__ [Austin__!~austin@CPE00f1f3072bf9-CM001ceacce8e2.cpe.net.cable.rogers.com] has joined #ruby-lang
Austin__ [Austin__!~austin@CPE00f1f3072bf9-CM001ceacce8e2.cpe.net.cable.rogers.com] has joined #ruby-lang
<andrewvos>
orbita: Write imagemagick in ruby
<orbita>
andrewvos: Oh :p
<orbita>
andrewvos: Isn't too large ?
andrewhl [andrewhl!~andrew@24.246.15.43] has joined #ruby-lang
<ironcamel>
Asher: note the function test_999_teardown
<ironcamel>
i need to add logic there to clean up servers only if all the tests have passed
<Asher>
right...
<ironcamel>
RickHull: that would be great
srbaker [srbaker!~srbaker@68.71.200.170] has joined #ruby-lang
<ironcamel>
RickHull: but how to get that info is the question
lsegal [lsegal!jinx@modemcable249.109-177-173.mc.videotron.ca] has joined #ruby-lang
<Asher>
ironcamel - it seems like you either keep track of when they fail or you test whether they've been created for cleanup
<RickHull>
indeed, i am long on generalizations and short on specifics ;)
<ironcamel>
Asher: what is a good way to keep track of when they fail?
<ironcamel>
i can create a flag as an attribute
<Asher>
why don't you just check if the server exists and clean it up if it does
<ironcamel>
do assert_* functions return true/false ?
<ironcamel>
Asher: because the server existing doesn't mean success
towski [towski!~towski@204-15-1-114-static.ipnetworksinc.net] has joined #ruby-lang
<ironcamel>
success means the server exists and i can ssh to it
<Asher>
why do you care about success for cleanup
<Asher>
you just need to clean it up if it was created, right?
<Asher>
you said you only clean up if it was successful
<ironcamel>
because we need to do some manual troubleshooting
<ironcamel>
if there was a failure
<ironcamel>
so we want the servers to still exist after running the tests
<RickHull>
these should be automated tests
<ironcamel>
RickHull: they are
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has quit ["WeeChat 0.3.6"]
<RickHull>
if your tests fail, you can re run in a manual fashion
<RickHull>
i wouldn't mix the two
<ironcamel>
but we also are running manually
<Asher>
i agree
<Asher>
it seems like a weird task to expect from unit tests
<ironcamel>
we added the CLEAN_UP_SERVERS specifically for running manually
<ironcamel>
in general they are automated and CLEAN_UP_SERVERS defaults to true
<RickHull>
i'm not speaking from experience here, but i think your tests should be written in an automated fashion
<RickHull>
then add some rake tasks to handle manual running
<ironcamel>
Asher: yes, it is a weird task, but one my boss has asked for
stamina [stamina!~stamina@ip5452a9bc.speed.planet.nl] has joined #ruby-lang
<ironcamel>
does anyone know if assert_* methods return true/false? do they return anything?
<RickHull>
(making the distinction between Test::Unit and rake)
srbaker_ [srbaker_!~srbaker@68.71.200.170] has joined #ruby-lang
<RickHull>
ironcamel: it seems like you've built a large structure on a shaky foundation ;)
<Asher>
well then keep track of failure state in some sort of global place - either a var or a constant or whatnot
spinagon [spinagon!~rippa@109-161-73-144.pppoe.yaroslavl.ru] has joined #ruby-lang
<Asher>
but i think proceeding in this way is going to cause a mess… better to modularize your code and create a set of unit tests and a set of debugging tools
<Asher>
unit tests are to prove your code works
<Asher>
not to test if your setup was executed properly
<RickHull>
when unit tests fail, you should shift to debug mode
<Asher>
if your unit tests prove your code work then your debugging tools should be pretty simple
<RickHull>
and not try to debug in your unit tests
ascarter [ascarter!~ascarter@216.243.14.210] has joined #ruby-lang
EvilJStoker [EvilJStoker!jstoker@unaffiliated/jstoker] has joined #ruby-lang
<ironcamel>
RickHull: this not something i have built
<Asher>
do you get the distinction point i'm making tho?
<RickHull>
ironcamel: fair enough. I'd still focus on the foundation, you can look up the exact behavior of assert_*
<RickHull>
(I'm not particularly familiar with Test::Unit)
malev [malev!~malev@190.210.138.237] has joined #ruby-lang
pandora17 [pandora17!~pandora17@p508D509F.dip.t-dialin.net] has joined #ruby-lang
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
outoftime [outoftime!~mat@50.57.10.189] has joined #ruby-lang
<ironcamel>
Asher: yes, i understand
<jorgenpt>
Holy crap.
<jorgenpt>
Why is foo {} allowed? :/
<jorgenpt>
(and not ambigious to mean "empty hash arg" *or* "empty block arg")
<Asher>
you can pass any method a block
<Asher>
it is an empty block arg
yorickpeterse [yorickpeterse!~yorickpet@pdpc/supporter/professional/yorickpeterse] has joined #ruby-lang
<jorgenpt>
I know, but you can't use a hash literal to pass an empty hash arg as the only arg?
<RickHull>
just use Hash.new?
<Asher>
it's a lambda
<Asher>
oh i see
<Asher>
i duno how that'll be interpreted
<jorgenpt>
RickHull: I know there's a workaround, I just think it's ugly :(
<jorgenpt>
I'm code-reviewing a coworkers code, and he does EM.run {}
gearaholic [gearaholic!~gearaholi@c-71-238-98-243.hsd1.mi.comcast.net] has joined #ruby-lang
<RickHull>
that's what we get for overloading {} :p
<jorgenpt>
And I was like "that function doesn't take a hash!"
<Asher>
it looks like it interprets it as a block
<jorgenpt>
Yeah, it does
<jorgenpt>
I don't think it's a good way to write code, though, since it's so ambiguous.
<Asher>
there's no good reason to send an empty block anyway
<TTilus>
jorgenpt: foo({})
<jorgenpt>
TTilus: What about the other scenario?
<jorgenpt>
foo() {}? :/
<jorgenpt>
I hate empty parens like that, it's so Javalike :P
Austin__1 [Austin__1!~austin@96.45.197.22] has joined #ruby-lang
<jorgenpt>
Asher: Yes there is - empty block is non-nil
butchanton [butchanton!~butchanto@64.134.230.26] has joined #ruby-lang