Topic for #ruby is now Ruby programming language || ruby-lang.org || RUBY SUMMER OF CODE! rubysoc.org/ || Paste >3 lines of text in http://pastie.org || Para a nossa audiencia em portugues http://ruby-br.org/
<slide>
hrm seems macos has dtrace, not sure if they are even similar though
<slide>
i dont know how to use either anyway lol
looopy [looopy!~looopy@static-71-166-232-207.washdc.east.verizon.net] has joined #ruby
<slide>
ugh this is why i hate ruby
a|i_ [a|i_!~ali@client-86-31-19-222.midd.adsl.virginmedia.com] has joined #ruby
a|i_ [a|i_!~ali@unaffiliated/ai/x-9091534] has joined #ruby
rramsden [rramsden!~rramsden@s64-180-62-209.bc.hsia.telus.net] has joined #ruby
S1kx [S1kx!~S1kx@ip-95-223-80-198.unitymediagroup.de] has joined #ruby
S1kx [S1kx!~S1kx@pdpc/supporter/monthlybyte/s1kx] has joined #ruby
kevinbond [kevinbond!~kevinbond@91.218.205.68.cfl.res.rr.com] has joined #ruby
thomascioppett-1 [thomascioppett-1!~thomascio@cpe-071-071-047-213.triad.res.rr.com] has joined #ruby
<shevy>
slide dtrace is why you hate ruby?
ferbass [ferbass!~ferbass@177.35.204.136] has joined #ruby
moshee [moshee!~moshee@unaffiliated/moshee] has joined #ruby
<slide>
well, this is the 30th problem ive had in the past hour....
<Okasu>
shevy: no, macos if he hate ruby
<Okasu>
is why*
<Okasu>
slide: just write in Ada
<slide>
helpful
<Okasu>
yw
Boohbah [Boohbah!boohbah@gateway/shell/anapnea.net/x-pbkxdjpmijjnuhvm] has joined #ruby
Boohbah [Boohbah!boohbah@unaffiliated/boohbah] has joined #ruby
Boohbah [Boohbah!boohbah@gateway/shell/anapnea.net/x-pbkxdjpmijjnuhvm] has joined #ruby
ferbass [ferbass!~ferbass@177.35.204.136] has joined #ruby
ferbass [ferbass!~ferbass@177.35.204.136] has joined #ruby
SterNiX [SterNiX!~LessIsMor@unaffiliated/nu253r/x-0655220] has joined #ruby
rickmasta [rickmasta!~rickmasta@pool-71-183-247-164.nycmny.fios.verizon.net] has joined #ruby
xpot-mobile [xpot-mobile!~james@70-91-210-237-BusName-Utah.hfc.comcastbusiness.net] has joined #ruby
namidark [namidark!~namidark@c-98-230-1-143.hsd1.fl.comcast.net] has joined #ruby
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
janissary [janissary!~user@adsl-98-85-0-232.mco.bellsouth.net] has joined #ruby
_|christian|_ [_|christian|_!~christian@190.235.168.156] has joined #ruby
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
<slide>
UdontKnow, if ruby is trying to open a lib, does that mean it knows about the call?
<slide>
or its missing a package that perhaps knows about it?
<idarkside>
RenatoSilva [RenatoSilva!~nouser@186.205.140.94] has joined #ruby
<UdontKnow>
slide: then it does know about, but you need an OS-dependent package
milkpost_ [milkpost_!~dec@173-28-195-157.client.mchsi.com] has joined #ruby
<slide>
hrm, i definitely have openssl installed.... still cant figure out what file its actually trying to load though
<slide>
ill try reinstalling openssl
<idarkside>
no takers?
nykc [nykc!~nykc@99-40-62-66.lightspeed.clmboh.sbcglobal.net] has joined #ruby
<confounds>
lol, 10 pounds
<idarkside>
yeah
<slide>
10 pounds of what? ;)
<idarkside>
script is simple
<idarkside>
GBP
Indian_ [Indian_!~Indian@unaffiliated/londonmet050] has joined #ruby
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby
<slide>
Is there a way to force ruby to load a specific lib?
rickmast [rickmast!~rickmasta@pool-71-183-247-164.nycmny.fios.verizon.net] has joined #ruby
<idarkside>
maybe 315
<idarkside>
kevinbond [kevinbond!~kevinbond@91.218.205.68.cfl.res.rr.com] has joined #ruby
<confounds>
idarkside you're not counting the overhead involved
rebagliatte [rebagliatte!~rebagliat@r186-50-128-185.dialup.adsl.anteldata.net.uy] has joined #ruby
<idarkside>
wht u mean
j3r0m3 [j3r0m3!~j3r0m3@adsl-71-142-226-109.dsl.scrm01.pacbell.net] has joined #ruby
<confounds>
gather requirements, make sure they know what you want, communicating, figure out how they'll get paid, chase you to get paid ;) and so on
<idarkside>
nah ill pay b4 they send script
<idarkside>
what i want is easy
<idarkside>
there are a few scripts out there already that should be easy to copy from i can provide 1
<confounds>
don't know. maybe post on some freelance coder site
<idarkside>
lol
<idarkside>
meh takes too long
<idarkside>
id simple send as a gift via pp
<idarkside>
then script delivery
<slide>
hrm, shouldnt it be DL::dopen('libssl.dylib'); etc?
<idarkside>
u lost me lol
<slide>
(not talking to ya hehe, just thinking out loud)
<idarkside>
ah lol
<idarkside>
lemme knw if ur intrested
<idarkside>
i have a script that is very simlar that works already i just need sum1 to adapt it to my needs
iamjarvo [iamjarvo!~Adium@c-71-230-13-201.hsd1.nj.comcast.net] has joined #ruby
manizzle [manizzle!~manizzle@pcp046723pcs.pcv.reshall.calpoly.edu] has joined #ruby
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
<idarkside>
i simply want this script adapting to my address and commands and a simple guide on how to add more commands
<idarkside>
cant be more that 30 mins work
<idarkside>
<new_ruby_program>
what does the @ symbol mean? when would i use it?
<shevy>
new_ruby_program this is data. to instance variables
<shevy>
you use it inside your class
<shevy>
def foo
<shevy>
@foo = 'this is now stored in @foo'
<shevy>
it is like a normal variable, but resides in your object
<shevy>
and is accessible throughout your object, in other methods of it too
<new_ruby_program>
ohhh i see
<new_ruby_program>
ty
<new_ruby_program>
my head hurts now from studying too much :/ i needa take a break
<idarkside>
lol
<idarkside>
coffee
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has quit [#ruby]
tobym [tobym!~tobym@cpe-72-229-2-6.nyc.res.rr.com] has joined #ruby
charlenopires [charlenopires!~quassel@187.62.124.186] has joined #ruby
fluke_ [fluke_!~fluke@109.80.109.12] has joined #ruby
pen [pen!~pen@dhcp1.csie.ntu.edu.tw] has joined #ruby
syamajala [syamajala!~syamajala@c-75-68-106-118.hsd1.ma.comcast.net] has joined #ruby
a|i [a|i!~ali@unaffiliated/ai/x-9091534] has quit [#ruby]
* tnk1
is back.
RenatoSilva [RenatoSilva!~nouser@186.205.140.94] has quit [#ruby]
rpowell [rpowell!~rpowell@CPE-58-164-72-158.lns1.ken.bigpond.net.au] has joined #ruby
mengu_ [mengu_!~mengu@95.13.68.170] has joined #ruby
mengu_ [mengu_!~mengu@unaffiliated/mengu] has joined #ruby
* tnk1
is away: Gone away for now
flip_digits [flip_digits!~textual@c-76-122-14-228.hsd1.fl.comcast.net] has joined #ruby
jbw [jbw!~jbw@dsl-044-084.cust.imagine.ie] has joined #ruby
flip_digits [flip_digits!~textual@c-76-122-14-228.hsd1.fl.comcast.net] has joined #ruby
tobym [tobym!~tobym@cpe-72-229-2-6.nyc.res.rr.com] has joined #ruby
chrisja [chrisja!~chris@5ac7d92c.bb.sky.com] has quit [#ruby]
zodiak [zodiak!~stef@pool-108-13-237-159.lsanca.fios.verizon.net] has joined #ruby
_|christian|_ [_|christian|_!~christian@190.235.168.156] has joined #ruby
milkpost_ [milkpost_!~dec@173-28-195-157.client.mchsi.com] has joined #ruby
allaire [allaire!~allaire@modemcable055.255-80-70.mc.videotron.ca] has joined #ruby
c[g]k [c[g]k!~cgk@cpe-76-176-150-213.san.res.rr.com] has joined #ruby
Manhose [Manhose!~Manhose@bl17-17-151.dsl.telepac.pt] has joined #ruby
syamajala [syamajala!~syamajala@c-75-68-106-118.hsd1.ma.comcast.net] has joined #ruby
Witide_ [Witide_!~Witide@adsl-65-8-194-102.mia.bellsouth.net] has quit ["Leaving"]
djuki_ [djuki_!~djuki@109-93-167-65.dynamic.isp.telekom.rs] has joined #ruby
* tnk1
is back.
Lord-Harlot [Lord-Harlot!~Serenity@adsl-94-72-228-27.karoo.kcom.com] has joined #ruby
eignerchris [eignerchris!~eignerchr@71-222-114-71.ptld.qwest.net] has joined #ruby
<multi_io>
ruby doesn't have optional arguments like def foo(arg?); ... end , right?
cyfirus [cyfirus!~cyfirus@201.157.2.126] has joined #ruby
<cyfirus>
Hi
<cyfirus>
i need some help
<multi_io>
(I know it has def foo(*args) )
* tnk1
is away: Gone away for now
<cyfirus>
I have trouble installing ruby in debian pg when I get gem install pg says: Currently Requires the ruby pg / st.h header! I need to install to accept it?
<heftig>
multi_io: you can have default values: def foo(arg=1)
somebody_ [somebody_!~notbrent@67.217.136.130] has joined #ruby
notbrent [notbrent!~notbrent@67.217.136.130] has joined #ruby
<Okasu>
multi_io: just give it a default value
<multi_io>
ah, default values. OK thanks.
pen [pen!~pen@dhcp1.csie.ntu.edu.tw] has joined #ruby
conor_ireland [conor_ireland!~conor_ire@89.100.121.49] has joined #ruby
jessemc [jessemc!~jessemc@S010678cd8e6f175f.ed.shawcable.net] has joined #ruby
jbhewitt [jbhewitt!~jbhewitt@c122-108-214-224.rochd4.qld.optusnet.com.au] has joined #ruby
<jbhewitt>
hi all - i'm wondering if anyone here know much about ActiveAdmin? I want to add a conditional to an edit form… if a setting is set in the model to show one form or another
durre [durre!~kvirc@217-212-242-4.customer.telia.com] has joined #ruby
* tnk1
is back.
drewrm [drewrm!~user@nbncom1.lnk.telstra.net] has joined #ruby
allaire [allaire!~allaire@modemcable055.255-80-70.mc.videotron.ca] has quit [#ruby]
trend [trend!~trend@97-81-69-219.dhcp.athn.ga.charter.com] has joined #ruby
minijupe [minijupe!~benlieb@adsl-74-250-185-38.ard.bellsouth.net] has joined #ruby
* tnk1
is away: Gone away for now
jessemc [jessemc!~jessemc@S010678cd8e6f175f.ed.shawcable.net] has joined #ruby
bnewton [bnewton!~bnewton@cpe-66-68-94-56.austin.res.rr.com] has joined #ruby
jessemc [jessemc!~jessemc@S010678cd8e6f175f.ed.shawcable.net] has joined #ruby
* tnk1
is back.
Norrin [Norrin!~Norrin@c-67-160-193-132.hsd1.ca.comcast.net] has joined #ruby
strife25 [strife25!~strife25@cpe-098-026-018-050.nc.res.rr.com] has joined #ruby
p0y [p0y!~p0y@122.52.126.66] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
* tnk1
is away: Gone away for now
warmwaffles [warmwaffles!~warmwaffl@user-12lm2k7.cable.mindspring.com] has joined #ruby
* tnk1
is back.
jrist [jrist!~jrist@184-96-254-134.hlrn.qwest.net] has joined #ruby
rethaw [rethaw!~textual@c-98-234-116-174.hsd1.ca.comcast.net] has joined #ruby
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
fleas [fleas!~mike@wikia/fleas] has joined #ruby
rjfranco [rjfranco!~rfranco@c-24-21-64-5.hsd1.wa.comcast.net] has joined #ruby
rickmasta [rickmasta!~rickmasta@pool-71-183-247-164.nycmny.fios.verizon.net] has joined #ruby
<iamjarvo>
can someone give me the right terminology for this #<Twitter::User:0x007fce848020f0 @attrs={"listed_count"=>7
<iamjarvo>
so what exactly is @attrs
vpamulap [vpamulap!~textual@97-91-100-189.dhcp.roch.mn.charter.com] has joined #ruby
vpamulap [vpamulap!~textual@97-91-100-189.dhcp.roch.mn.charter.com] has quit [#ruby]
andrewhl [andrewhl!~andrew@24-246-15-43.cable.teksavvy.com] has joined #ruby
<csmrfx>
attri bytes
nerdy_ [nerdy_!~textual@66-44-118-195.c3-0.grg-ubr1.lnh-grg.md.cable.rcn.com] has joined #ruby
<iamjarvo>
csmrfx: what do you mean
c[g]k [c[g]k!~cgk@cpe-76-176-150-213.san.res.rr.com] has joined #ruby
* tnk1
is away: Gone away for now
j3r0m3 [j3r0m3!~j3r0m3@50-0-128-97.dsl.dynamic.sonic.net] has joined #ruby
marknyc [marknyc!~Grom@207-237-59-125.c3-0.elm-ubr1.qens-elm.ny.cable.rcn.com] has joined #ruby
Azure [Azure!~azt@unaffiliated/azure] has joined #ruby
<robert_>
anybody have any experience with using the odbc gem?
Azure [Azure!~azt@unaffiliated/azure] has joined #ruby
ly- [ly-!~ly-@unaffiliated/ly-] has joined #ruby
stringoO [stringoO!~JLstring@CPE001346cbe31b-CM00111ae502a8.cpe.net.cable.rogers.com] has joined #ruby
x0F_ [x0F_!~x0F@unaffiliated/x0f] has joined #ruby
radic [radic!~radic@dslb-094-216-234-146.pools.arcor-ip.net] has joined #ruby
gnychis [gnychis!~gnychis@c-71-61-181-202.hsd1.pa.comcast.net] has joined #ruby
<gnychis>
what is a good way to replace all 3's in an array like this: a=[1,2,3,5,6,3] with the number 9?
apok [apok!~apok@96.24.67.22] has joined #ruby
zodiak [zodiak!~stef@cpe-75-84-218-68.socal.res.rr.com] has joined #ruby
<multi_io>
is anyone out there actually writing Ruby 1.9-only code?
* tnk1
is back.
<Okasu>
multi_io: i am
<Okasu>
1.8 crap
warmwaffles [warmwaffles!~warmwaffl@user-12lm2k7.cable.mindspring.com] has joined #ruby
<Okasu>
1.8 can't rand(1..9), nonsense
<Okasu>
and 1.8 haven't yarv
<Okasu>
sad but true
<heftig>
gnychis: a.map { |x| x == 3 ? 9 : x }
<multi_io>
heftig: he wanted to replace, so it's probably map!
<Okasu>
multi_io: do not yell on heftig!
skim1776 [skim1776!~sergey@95.56.123.168] has joined #ruby
<multi_io>
:P
* tnk1
is away: Gone away for now
Jarred [Jarred!~Jarred@c-71-198-139-210.hsd1.ca.comcast.net] has joined #ruby
jrist [jrist!~jrist@71-212-214-169.hlrn.qwest.net] has joined #ruby
tk [tk!~tk@p252198.doubleroute.jp] has joined #ruby
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
jimmyy111 [jimmyy111!jimmy@112.237.26.89] has joined #ruby
burgestrand1 [burgestrand1!~burgestra@81-229-85-235-no66.tbcn.telia.com] has joined #ruby
kennethreitz [kennethreitz!~kennethre@c-24-127-96-129.hsd1.va.comcast.net] has joined #ruby
Count_Niedar [Count_Niedar!~nnscript@ip68-231-248-182.hr.hr.cox.net] has joined #ruby
t-mart [t-mart!~t-mart@c-174-49-68-22.hsd1.ga.comcast.net] has joined #ruby
<skim1776>
who has participated in rusoc?
krz [krz!~foobar@unaffiliated/krz] has joined #ruby
<t-mart>
could someone tell me why I'm getting a TypeError "in `raise': can't convert String into Integer" on line 13 here (http://pastie.org/3116358)?
<t-mart>
i used to be getting the same error for line 12, but it somehow went away
<t-mart>
i've tried every logical parentheses combination i could think of, and still nothing
<Radar>
t-mart: you need to convert the number to... well, a number.
<t-mart>
and what's additionally funny, but probably revealing, is that when i put that same syntax in it's own file, it works
<Radar>
t-mart: either block_size or columns is a String and not a Numeric.
<Radar>
or Integer, rather.
<t-mart>
hrm
<Radar>
I suspect it could be columns and/or rows, given that you're passing 337 in to simplify in the code at the bottom.
<Radar>
t-mart: to_i
<t-mart>
yea
<t-mart>
and 337 is Numeric
<t-mart>
right?
<t-mart>
maybe RMagick is doing something magical
<t-mart>
to rows or columns
stringoO [stringoO!~JLstring@CPE001346cbe31b-CM00111ae502a8.cpe.net.cable.rogers.com] has joined #ruby
dyer [dyer!~dyer@108-193-172-174.lightspeed.tukrga.sbcglobal.net] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
<t-mart>
hmm, i separated the if line and the raise line, and the problem is still reported on the raise line
mohits [mohits!~mohit@unaffiliated/mohits] has joined #ruby
Jonah11_ [Jonah11_!~Jonah@173-30-163-4.client.mchsi.com] has joined #ruby
<Jonah11_>
I need to create a hashmap where the keys are pairs of ints like (x,y) -- what's the best way to do that?
<heftig>
{ [3,2] => "foo" }
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby
<Jonah11_>
heftig, ty
<heftig>
or if you prefer: Point = Struct.new(:x, :y); { Point[3,2] => "foo" }
<t-mart>
Radar, RMagick must have been defining it's own raise. saying Kernel.raise works =P
<t-mart>
but then why is the 1st raise working!?
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
CodyLinux [CodyLinux!~cody@80.249.82.205] has joined #ruby
<t-mart>
kind of interesting how this channel's topic includes a link for portuguese. anyone know why?
<Radar>
For the portuguese people that visit.
<Radar>
Sorry, brazillian*
<t-mart>
Are there a lot of Portuguese speakers that visit? Why just them? Is ruby somehow more used by Portuguese speakers?
<t-mart>
I'm not saying this is bad, its just an interesting affinity
<banisterfiend>
t-mart: seem to be a few brazillian rubyists, at least i have noticed a lot
<t-mart>
yea, banisterfiend, i could name a few too
<any-key>
Matz is Brazillian, it makes sense
<t-mart>
o really? hehe
<banisterfiend>
hehe
<any-key>
it's true
colint_ [colint_!~ColinT@69-11-97-130.regn.static.sasknet.sk.ca] has joined #ruby
ryh [ryh!~ryh@174.45.125.160] has joined #ruby
minijupe [minijupe!~benlieb@adsl-74-250-185-38.ard.bellsouth.net] has joined #ruby
apok [apok!~apok@96.24.67.22] has joined #ruby
replore_ [replore_!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby
Evixion [Evixion!Evixion@67.235.68.96] has joined #ruby
Marco [Marco!~marco@Marco-2.Kiewit.Dartmouth.EDU] has joined #ruby
colint [colint!~ColinT@69-11-97-130.regn.static.sasknet.sk.ca] has joined #ruby
tonini [tonini!~zastav@edge.garaio.com] has joined #ruby
Cervajz [Cervajz!~Cervajz@opensuse/member/Cervajz] has joined #ruby
tekknolagi [tekknolagi!~tekknolag@c-67-180-21-25.hsd1.ca.comcast.net] has joined #ruby
dyer [dyer!~dyer@108-193-172-174.lightspeed.tukrga.sbcglobal.net] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
tobym [tobym!~tobym@cpe-72-229-2-6.nyc.res.rr.com] has joined #ruby
adeponte [adeponte!~adeponte@pool-173-51-131-197.lsanca.fios.verizon.net] has joined #ruby
trivol [trivol!~aurelien@ip-178.net-89-2-84.rev.numericable.fr] has joined #ruby
ly- [ly-!~ly-@unaffiliated/ly-] has joined #ruby
ngng [ngng!~ng@c-98-210-117-31.hsd1.ca.comcast.net] has joined #ruby
<Radar>
any-key: NICE.
<Radar>
t-mart: If we don't do it the Brazillians will kidnap our families.
<Radar>
Or am I confusing them with the Mexicans? oh well.
<Radar>
Home time.
nekid [nekid!~nekid@c-24-6-170-1.hsd1.ca.comcast.net] has joined #ruby
michael__ [michael__!~michael@213.8.57.217] has joined #ruby
CannedCorn [CannedCorn!~textual@cpe-66-65-102-78.nyc.res.rr.com] has joined #ruby
ly- [ly-!~ly-@unaffiliated/ly-] has joined #ruby
Tachyon [Tachyon!~tach@81.200.61.23] has joined #ruby
yxhuvud [yxhuvud!mongo@h-17-181.a149.priv.bahnhof.se] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
Amirh [Amirh!~amir@46.21.81.146] has joined #ruby
mohits [mohits!~mohit@unaffiliated/mohits] has joined #ruby
norm [norm!~norm@ip-128-239-142-7.v4.wm.edu] has joined #ruby
al3xnull [al3xnull!~al3xnull@cpe-76-188-178-7.neo.res.rr.com] has joined #ruby
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby
alem0lars [alem0lars!~alem0lars@host128-246-dynamic.11-87-r.retail.telecomitalia.it] has joined #ruby
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby
stayarrr [stayarrr!~olivererx@dslb-178-009-059-241.pools.arcor-ip.net] has joined #ruby
ly- [ly-!~ly-@unaffiliated/ly-] has joined #ruby
<Amirh>
does ruby has the ability to write low-level apps? like C++ or Java?
Azure|netbook [Azure|netbook!~azt@unaffiliated/azure] has joined #ruby
<banisterfiend>
Amirh: give an example of the kind of thing u want to write
<Amirh>
banisterfiend: for example, a web server
<ly->
Amirh: low-level apps doesn't really mean anything, Ruby is a high-level language, meaning there's a lot of abstraction layers between the hardware and the software
alem0lars [alem0lars!~alem0lars@host128-246-dynamic.11-87-r.retail.telecomitalia.it] has joined #ruby
<banisterfiend>
Amirh: of course
<banisterfiend>
Amirh: that's not particularly low level btw
<Amirh>
so
<Amirh>
what kind of work c++ can do which ruby can't?
<rethaw>
the main reason you need low level is portability
<ly->
drivers
<Amirh>
Operating system?
<rethaw>
ruby is a replacement for perl and python, not designed for that kind of stuff afaik
<rethaw>
however, if you really need portability in delivering some ruby app there are tools (Ruby2c)
<Amirh>
can I build decent programming tool using ruby?
<Amirh>
can I build a decent IDE using ruby? or a debugger?
<heftig>
rubinius' bytecode compiler is written in ruby
<banisterfiend>
Amirh: i wrote/am writing a debugger in Ruby, but to do some of the crazy stuff (like walking the callstack) i needed to drop down to C, but there wasnt much C required, and even next/step can be implemented in pure ruby (almost)
probst_ [probst_!~probst@bumblebee.cl.cam.ac.uk] has joined #ruby
<heftig>
redcar is an ide written in ruby and java
<alem0lars>
Amirh: you can. however ruby is a dynamically tiped language, so i would not use it for complex systems, like a bank software. I think small applications, scripta, websites are good example of ruby usabe.
<banisterfiend>
alem0lars: that's what tests are for ;)
<rethaw>
thats one of the lingering questions I have about ruby, maybe someone can answer
<banisterfiend>
alem0lars: ruby ecosystem has such a strong testing emphasis that i'd wager ruby code is very robust
<rethaw>
how well does ruby scale?
<rethaw>
RoR even
<Amirh>
Interesting. banisterfiend, you can use C along the ruby's code?
<banisterfiend>
Amirh: yes, the C API is very nice
<Amirh>
og it is bult-in
<Amirh>
oh
<Amirh>
cool
SterNiX [SterNiX!~LessIsMor@unaffiliated/nu253r/x-0655220] has joined #ruby
<Amirh>
SterNiX: to inja chikar mikoni?
<alem0lars>
banisterfiend: yes, you are right. i was not talking about a weakness of the language, i love it. I was trying to say that i would prefex a statically tiped language with a more strong type safety for a bank soso
<alem0lars>
software
<banisterfiend>
Amirh: using ruby_inline you can even write C code in the same file as the Ruby code
<Amirh>
banisterfiend: very cool dude.
<Amirh>
so we can write anything using ruby.
<banisterfiend>
alem0lars: well i'd like to see empirical data that ruby is less apt in those situations, because i have a feeling ruby would fare well even there if it was given a chance
<banisterfiend>
Amirh: so long as you have C bindings or are willing to write C bindings yes you can pretty much do anything
<Amirh>
banisterfiend: you think ruby is not going to last?
<banisterfiend>
Amirh: i didnt say that
<alem0lars>
banisterfiend: for example i think to write a parser or a concurrent software i would prefer haskell. for scripting purposes i would prefer ruby, but it's my opinion.
<burgestrand1>
Jonah11_: because FixNum is not same as Fixnum
<banisterfiend>
alem0lars: of course ruby is not the best tool for every situation
<banisterfiend>
alem0lars: but i wouldn't relegate it to just 'scripting' either
<banisterfiend>
up to you though
<burgestrand1>
I’m writing bindings to a multithreaded C audio library in Ruby, no speed or performance issues so far and I’m streaming audio from the network with this thing
<burgestrand1>
Ruby handles more than you’d think
<Jonah11_>
burgestrand1, doh! but shouldnt it be giving me a "no method found" error, since i'm not even using the right class?
<alem0lars>
banisterfiend: of course. this is what i would say to Amirh. it depends on which kind of software do u want to do
<banisterfiend>
burgestrand1: but that's also because you're a programmer of talent and abilities beyond the average pig
<burgestrand1>
Jonah11_: apparently there’s a protected method named test on fixnum :)
<banisterfiend>
:P
<burgestrand1>
banisterfiend: even if that were true it would not help if ruby could not keep up :p
<banisterfiend>
ya
<Amirh>
so glad that I asked that question. :)
skim1776 [skim1776!~sergey@95.56.123.168] has quit [#ruby]
centipedefarmer [centipedefarmer!~centipede@74-84-107-90.client.mchsi.com] has joined #ruby
<burgestrand1>
banisterfiend: you found a way to pass blocks to method calls from C yet apart from the hack with creating a proc to do it for you?
<banisterfiend>
burgestrand1: no, i haven't had a need for that yet, what about u?
<Jonah11_>
when extending an existing class like Fixnum, how can I add new class variables and ensure they are initialized? using initialize dind't work...
<banisterfiend>
Jonah11_: just use the @blah ||= init_val trick
<burgestrand1>
banisterfiend: naw, I work around it too, find it strange that it’s missing that’s all
<Jonah11_>
banisterfiend, is there no way to add new code to be executed in initialize?
<banisterfiend>
Jonah11_: Fixnums are always automatically initialized
<banisterfiend>
they're not 'created', they already exist, they're like singleton objects if u want
<banisterfiend>
5 == 5
<banisterfiend>
they're teh same object, tey're not two different instances
<Jonah11_>
banisterfiend, right, ok
thone [thone!~thone@g226048044.adsl.alicedsl.de] has joined #ruby
<banisterfiend>
burgestrand1: can probably do it in C actually using some mad skills
<banisterfiend>
burgestrand1: by messing with the current 'frame' and pushing a block on etc
cjs [cjs!~cjs@41.98.156.220.st.bbexcite.jp] has joined #ruby
<cjs>
Is there some way of finding out the path to the ruby interpreter the current script is being executed with? E.g., /usr/bin/ruby or whatever?
<banisterfiend>
but if that was possible easily there'd probalby be a helper for it (there might be in 1.9.3 who knows :P)
<burgestrand1>
:p
<cjs>
Failing that, what's a good way of displaying the "install" of Ruby that's being used on a system with several Rubys installed?
<cjs>
Maybe grovelling through $:?
<banisterfiend>
cjs: try RbConfig::CONFIG
<cjs>
banisterfiend: Ah, thanks.
stoffus [stoffus!~stoffus@2001:9b0:1:dead:129a:ddff:fe58:6835] has joined #ruby
<burgestrand>
banisterfiend: like you’ve been messing around with stack-explorer I’m sure you feel right at home with messing about in the ruby internals ;)
<banisterfiend>
burgestrand: hehe i'd like to do more of that sometime
<banisterfiend>
burgestrand: you used it again or get it to bug out/segfault?
<burgestrand>
banisterfiend: nope, haven’t needed it much during the holidays I’m afraid
<banisterfiend>
oh ok
<burgestrand>
pretty much only coding on this music thingy :p
<banisterfiend>
burgestrand: how far is it from release/announcement?
pencilcheck [pencilcheck!~pen@2001:288:1001:28:f583:f768:dc6e:9dcb] has joined #ruby
<burgestrand>
banisterfiend: I’d say at least 2 months
<burgestrand>
banisterfiend: but I am releasing tiny point-releases because it’s fun, but I want it to reach a certain point before 1.0, got loads of API changes in my head just waiting to happen
<burgestrand>
or, well, big changes internally that is ^^
mdel [mdel!~mdel@pool-71-175-17-16.phlapa.fios.verizon.net] has joined #ruby
<banisterfiend>
oh ok
<Gekz>
so which framework should I use for webapps?
<Gekz>
:P
senny [senny!~senny@edge.garaio.com] has joined #ruby
<burgestrand>
Gekz: sinatra, rails, padrino are the ones i usually evaluate
<Gekz>
not heard of padrino
<burgestrand>
also been meaning to have a look at goliath but chances are I won’t encounter a project where it’s useful
<Gekz>
oh cool.
<Gekz>
I try to avoid monolithic frameworks that I can't really reuse
<Gekz>
I like using one ORM everywhere
<Gekz>
so looks like padrino is the way to go :D
josefig [josefig!~josefig@unaffiliated/josefig] has joined #ruby
senny [senny!~senny@edge.garaio.com] has joined #ruby
durre [durre!~kvirc@217-212-242-4.customer.telia.com] has joined #ruby
* tnk1
is back.
<banisterfiend>
burgestrand: btw why did you make your internet nickname simply your last name
<banisterfiend>
burgestrand: is that normal practice in sweden? cos i would feel kind of weird about just using the nickname 'mair'
<burgestrand>
banisterfiend: because too many god damn people are named kim on the internet :p
<banisterfiend>
;)
<banisterfiend>
burgestrand: and most of them are chicks i bet ;)
<burgestrand>
banisterfiend: you wouldn’t believe the amount of free stuff I get when I game online
<banisterfiend>
hehe
rickmasta [rickmasta!~rickmasta@pool-71-183-247-164.nycmny.fios.verizon.net] has joined #ruby
<burgestrand>
banisterfiend: burgestrand is simply the name that’s pretty much always available, so all my nicknames in the past evolved and became… my surname
<banisterfiend>
Yeah
<banisterfiend>
burgestrand: what about giving yourself a weird pseudonym
<burgestrand>
hm, dunno, I like me being me I guess
RomD` [RomD`!~Roman@nrbg-4d0705b3.pool.mediaWays.net] has joined #ruby
ph^ [ph^!~ph^@79.135.7.162] has joined #ruby
bnewton [bnewton!~bnewton@cpe-66-68-94-56.austin.res.rr.com] has joined #ruby
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby
vmatiyko [vmatiyko!~vmatiyko@178.120.67.145] has joined #ruby
mafolz [mafolz!~mafolz@dhcp50-210.start.uni-saarland.de] has joined #ruby
madsgraphics [madsgraphics!~madsgraph@mail.11labo.net] has joined #ruby
<banisterfiend>
burgestrand: im the opposite i feel kind of disturbed when i see someone with a nickname such as RichardSmith (i.e their full real name, capitalized)
<burgestrand>
banisterfiend: hah, I agree with you on that one, it feels weird
batlock666 [batlock666!~quassel@bvderbau.ugent.be] has joined #ruby
Sliker_ [Sliker_!~ponies@46.208.206.144] has joined #ruby
djdb [djdb!~digitalbo@linux.minsk.tutby.com] has joined #ruby
<banisterfiend>
burgestrand: are tehre any adapters to charge your macbook from a usb port?
<banisterfiend>
if so, you could share battery between all your devices, macbook, tablet, smartphone (with another adapter), that'd be pretty handy IMO
<banisterfiend>
i just wonder how efficient it is
<rethaw>
no
<banisterfiend>
it just feels asymmetrical i can charge my tablet off my laptop, and my phone off my tablet, but not my laptop off my phone/tablet
ikaros [ikaros!~ikaros@dslb-188-107-221-154.pools.arcor-ip.net] has joined #ruby
<rethaw>
I think USB is rated for 5V
rickmasta [rickmasta!~rickmasta@pool-71-183-247-164.nycmny.fios.verizon.net] has joined #ruby
rickmasta [rickmasta!~rickmasta@pool-71-183-247-164.nycmny.fios.verizon.net] has joined #ruby
waxjar [waxjar!~waxjar@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
<heeton>
banisterfiend: Remember that a laptop battery is far larger than an iPad / Phone
poseid [poseid!52877a23@gateway/web/freenode/ip.82.135.122.35] has joined #ruby
<heeton>
Looking at iPad / Macbook for instance, it's 25 Wh against 75Wh. So, you'd only get a third of your laptop charged from your entire iPad2
michael__ [michael__!~michael@213.8.57.217] has joined #ruby
<heeton>
(And I believe the laptop battery requires a higher voltage than the iPad or USB could provide)
bhavesh_a_p [bhavesh_a_p!~bhavesh_a@210.211.251.20] has joined #ruby
Seisatsu [Seisatsu!~seisatsu@adsl-99-35-225-92.dsl.pltn13.sbcglobal.net] has joined #ruby
jnh [jnh!~jnh@118-93-162-232.dsl.dyn.ihug.co.nz] has joined #ruby
* tnk1
is away: Gone away for now
poseid_ [poseid_!52877a23@gateway/web/freenode/ip.82.135.122.35] has joined #ruby
<jnh>
Hi all. I'm trying to create a queue using fibers so that when each is called it waits until the queue has more content before yielding, but I get a double resume if I push things onto the queue faster than they are read - is there a way to tell if a fiber is currently yielding or anything? #alive? doesn't give me what I need.
vitoravelino [vitoravelino!~rockhampt@unaffiliated/vtr] has joined #ruby
altivec [altivec!~altivec@95.105.60.182] has joined #ruby
adeponte [adeponte!~adeponte@pool-173-51-131-197.lsanca.fios.verizon.net] has joined #ruby
zommi [zommi!quassel@nat/ibm/x-gmgvbshffuqevdhz] has joined #ruby
<sj26>
jnh: you will never be able to resume a fiber from within itself
<jnh>
no, the queue is being pushed onto from an external callback.
p1d [p1d!~p1d@ns1.vonaffenfels.de] has joined #ruby
shevy [shevy!~shevy@178-191-185-201.adsl.highway.telekom.at] has joined #ruby
<sj26>
Fiber.current?
<sj26>
what are you doing? can you gist it?
<jnh>
sj26: sure. give me two minutes.
pi3r [pi3r!~pi3r@LSt-Amand-152-32-39-189.w80-11.abo.wanadoo.fr] has joined #ruby
<jnh>
sj26: let me give you a bit of context on the problem I'm trying to solve: I have an EM based service which outputs JSON periodically (it's a message passing service). I want to send these to the client via Rack, so I'm trying to make a queue type object where when rack calls #each it simply waits until there is data available before calling the block.
<sj26>
for each request, construct a response triple with a body object which actually iterates from a channel
<sj26>
then push data into the channel as neccessary
<sj26>
eventmachine takes care of the non-blocking machinery
norm [norm!~norm@ip-128-239-142-7.v4.wm.edu] has joined #ruby
<sj26>
waxjar: yes, I've read that one :-)
<jnh>
the problem is that Rack isn't evented.
<sj26>
have written my own bindings for libev and done quite a bit of evented work
<sj26>
jnh: correct, but as long as you return a body which blocks on each it's all good mate
pietro_ [pietro_!~pietro@2-227-162-47.ip187.fastwebnet.it] has joined #ruby
<jnh>
right.
<jnh>
that was my idea.
<jnh>
I don't see how EM::Channel would be any good - the subscribe idea is backwards to what I need.
<jnh>
Ahh. Pop.
<jnh>
next question; will Rack choke if there is a number of connections all blocking on each waiting for more input?
madsgraphics [madsgraphics!~madsgraph@mail.11labo.net] has joined #ruby
<jnh>
I expect it will block the entire thread, right?
<sj26>
jnh: yup, except if you use something on top which uses eventmachine and/or fibers
<sj26>
so you could run inside thin
<jnh>
sj26: this is what I'm trying to avoid. I'm trying to put a service designed to run on thin inside my rails app.
<sj26>
yup, so if you use thin then a single response becoming blocked means thin will handle the next response until it's able to come back and finish the first response
<sj26>
hence how websockets and friends run inside thin
<sj26>
(like skinny, the websocket upgrader I wrote for thin and rails/sinatra)
jay_zawrotny [jay_zawrotny!~Jay@c-68-43-28-43.hsd1.mi.comcast.net] has joined #ruby
<sj26>
basically you need to make eventmachine block inside your body iterator
<sj26>
which is why a channel works
<sj26>
it blocks until the next item arrives, iirc
<sj26>
actually, the queue might be better (duh_
<jnh>
maybe i am just making a hash of it, but I was hoping to be able to deploy on passenger and develop on pow :/
<sj26>
passenger won't work
<sj26>
it's purely threaded
<sj26>
and generally runs one thread per process
<sj26>
iirc, pow does async above the app level, so same problem
<sj26>
you need to run in unicorn, thin, etc.
<sj26>
jnh have you considered using pusher or another hosted service to do this for you?
johanhsfy [johanhsfy!~johan@c-887471d5.012-52-6c756e10.cust.bredbandsbolaget.se] has joined #ruby
<sj26>
multiple client connections, but handling is pipelined
xpot [xpot!~xpot@166-70-100-198.ip.xmission.com] has joined #ruby
<jnh>
sj26: yes. seems a pity.
elliot98 [elliot98!~elliot@IGLD-84-229-15-130.inter.net.il] has joined #ruby
elliot98 [elliot98!~elliot@unaffiliated/elliot98] has joined #ruby
<jnh>
other option is to use the redis engine in faye and run two server processes.
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
dch4pm4n [dch4pm4n!~d@gateway/tor-sasl/dchapman1988] has joined #ruby
Russell^^ [Russell^^!~Russell^^@88.97.51.87] has joined #ruby
rippa [rippa!~rippa@87-253-28-238.pppoe.yaroslavl.ru] has joined #ruby
trivol [trivol!~aurelien@gra94-1-81-57-175-179.fbx.proxad.net] has joined #ruby
fixl [fixl!~fixl@124-170-21-28.dyn.iinet.net.au] has joined #ruby
<sj26>
jnh: well i'm off, good luck
ferbass [ferbass!~ferbass@177.35.204.136] has joined #ruby
<jnh>
sj26: cheers.
<jnh>
thanks for your help.
csmrfx [csmrfx!~Casimir@81.90.72.4] has quit ["bye"]
peterhellberg [peterhellberg!~peterhell@213.115.122.2] has joined #ruby
BrianE [BrianE!~brian@46.208.239.186] has joined #ruby
ferbass [ferbass!~ferbass@201-048-211-049.static.ctbctelecom.com.br] has joined #ruby
jbpros [jbpros!~jbpros@d515285E6.access.telenet.be] has joined #ruby
dazoakley [dazoakley!~dazoakley@hocuspokus.vm.bytemark.co.uk] has joined #ruby
becom33 [becom33!~becom33@112.135.228.238] has joined #ruby
<becom33>
why is this http://pastebin.com/pgzZwM3y giving me test.rb:7:in `*': can't convert String into Integer (TypeError) error
Nies [Nies!~Nies@137.Red-81-44-152.dynamicIP.rima-tde.net] has joined #ruby
madsgraphics [madsgraphics!~madsgraph@mail.11labo.net] has joined #ruby
* becom33
anyone ?
<rippa>
because int is a string
Manhose [Manhose!~Manhose@bl6-38-193.dsl.telepac.pt] has joined #ruby
<becom33>
but I input a int in ARGV[0]
<rippa>
still a string
<rippa>
"123"
<rippa>
or something
<becom33>
rippa: how can I fix it /
<becom33>
?
<rippa>
int.to_i
<becom33>
thanks done
vmatiyko [vmatiyko!~vmatiyko@178.120.67.145] has joined #ruby
andreime [andreime!~andrei-ci@80.97.64.3] has joined #ruby
ly- [ly-!~ly-@unaffiliated/ly-] has joined #ruby
madsgraphics [madsgraphics!~madsgraph@mail.11labo.net] has joined #ruby
kakashi__ [kakashi__!~kakashi_@nltk/kakashi] has joined #ruby
james_cotterill [james_cotterill!~james_cot@89.238.149.34] has joined #ruby
flippingbits [flippingbits!~anonymous@port-212-202-126-63.static.qsc.de] has joined #ruby
azbarcea_ [azbarcea_!~quassel@79.114.15.145] has joined #ruby
flippingbits [flippingbits!~anonymous@port-212-202-126-63.static.qsc.de] has joined #ruby
flippingbits [flippingbits!~anonymous@port-212-202-126-63.static.qsc.de] has joined #ruby
ephemerian [ephemerian!~ian@82-69-1-248.dsl.in-addr.zen.co.uk] has joined #ruby
lofic [lofic!~lofic@92.103.32.131] has joined #ruby
<lofic>
can you use a module with an alternate custom name ?
<lofic>
like in python when you do :
<lofic>
import foo as bar
<rippa>
Derp = Enumerable
mengu [mengu!~mengu@unaffiliated/mengu] has joined #ruby
<lofic>
ha yes
<lofic>
so simple
<lofic>
thanks, rippa
pencilcheck [pencilcheck!~pen@wl065.cc.ntu.edu.tw] has joined #ruby
madgraphics [madgraphics!~madgraphi@mail.11labo.net] has joined #ruby
madgraphics [madgraphics!~madgraphi@mail.11labo.net] has joined #ruby
marcol [marcol!~marcol@ppp-23-47.26-151.libero.it] has joined #ruby
madgraphics [madgraphics!~madgraphi@mail.11labo.net] has joined #ruby
peterhil [peterhil!~peterhil@xdsl-77-86-196-131.nebulazone.fi] has joined #ruby
james_co_ [james_co_!~james_cot@89.238.149.34] has joined #ruby
jbpros [jbpros!~jbpros@d515285E6.access.telenet.be] has joined #ruby
Jonah11_ [Jonah11_!~Jonah@173-30-163-4.client.mchsi.com] has joined #ruby
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
pietro_ [pietro_!~pietro@2-227-162-47.ip187.fastwebnet.it] has joined #ruby
rpowell [rpowell!~rpowell@CPE-58-164-72-158.lns1.ken.bigpond.net.au] has joined #ruby
jay_zawrotny [jay_zawrotny!~Jay@c-68-43-28-43.hsd1.mi.comcast.net] has joined #ruby
tvo [tvo!~tvo@katapult/developer/tvo] has joined #ruby
ChampS_ [ChampS_!~ChampS@141.32.27.50] has joined #ruby
bhavesh_a_p [bhavesh_a_p!~bhavesh_a@122.170.115.202] has joined #ruby
workmad3 [workmad3!~workmad3@host-78-146-168-54.as13285.net] has joined #ruby
james_cotterill [james_cotterill!~james_cot@89.238.149.34] has joined #ruby
Newbs [Newbs!~textual@host-78-144-71-110.as13285.net] has joined #ruby
<andreime>
hello! i have a quick question: if in a module i have an extra field :something and a method something how do i call each in tests?
bhavesh_a_p [bhavesh_a_p!~bhavesh_a@122.170.115.202] has joined #ruby
matti [matti!matti@madwifi/support/matti] has joined #ruby
tvw [tvw!~tv@212.79.9.150] has joined #ruby
BrianE [BrianE!~brian@188-220-10-235.zone11.bethere.co.uk] has joined #ruby
brian_ [brian_!~brian@188-220-10-235.zone11.bethere.co.uk] has joined #ruby
trivol [trivol!~aurelien@gra94-1-81-57-175-179.fbx.proxad.net] has joined #ruby
andreime [andreime!~andrei-ci@82.79.96.20] has joined #ruby
josephwilk [josephwilk!~josephwil@109.231.237.58] has joined #ruby
kaneda_ [kaneda_!~kaneda@5acb1c98.bb.sky.com] has joined #ruby
pen [pen!~pen@wl065.cc.ntu.edu.tw] has joined #ruby
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby
pdcawley [pdcawley!~user@195.171.24.2] has joined #ruby
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.45] has joined #ruby
logic [logic!~logic@unaffiliated/bitch333z] has joined #ruby
james_cotterill [james_cotterill!~james_cot@89.238.149.34] has joined #ruby
Doppp [Doppp!~Doppp@unaffiliated/doppp] has joined #ruby
adman65 [adman65!~adman65@cs181188119.pp.htv.fi] has joined #ruby
apok [apok!~apok@96.24.67.22] has joined #ruby
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
bhavesh_a_p [bhavesh_a_p!~bhavesh_a@122.170.115.202] has joined #ruby
oponder [oponder!~oponder@mail.memocom.nl] has joined #ruby
wedtm [wedtm!~wedtm@173-12-163-78-oregon.hfc.comcastbusiness.net] has joined #ruby
waxjar [waxjar!~waxjar@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
bhavesh_a_p [bhavesh_a_p!~bhavesh_a@122.170.115.202] has joined #ruby
chrismcg [chrismcg!~chrismcg@pdpc/supporter/active/chrismcg] has joined #ruby
TheTFEF [TheTFEF!~JS@cpe-173-88-110-115.columbus.res.rr.com] has joined #ruby
jamesfend [jamesfend!~jamesfend@c-71-228-225-167.hsd1.tn.comcast.net] has joined #ruby
<jamesfend>
how would you all tackle this? A worker has 40 credits per month. A credit is used when they join a discussion for a project. The credits automatically renew every 30 days.
becom33 [becom33!~becom33@112.135.228.238] has quit [#ruby]
lorandi [lorandi!~lorandi@gateway/tor-sasl/lorandi] has joined #ruby
skim1776 [skim1776!~sergey@95.56.123.168] has joined #ruby
<heftig>
renew via cronjob.
geaif [geaif!~geaif@AToulouse-554-1-40-57.w92-149.abo.wanadoo.fr] has joined #ruby
skim1776 [skim1776!~sergey@95.56.123.168] has quit [#ruby]
jimmyy111 [jimmyy111!jimmy@112.237.26.89] has joined #ruby
Helius [Helius!~Adium@212.31.227.18] has joined #ruby
bhavesh_a_p [bhavesh_a_p!~bhavesh_a@122.170.115.202] has joined #ruby
lstejskal [lstejskal!~lstejskal@194.228.7.34] has joined #ruby
lstejskal [lstejskal!~lstejskal@194.228.7.34] has quit [#ruby]
ChampS_ [ChampS_!~ChampS@wlan1-141.zw.fh-zwickau.de] has joined #ruby
p0y [p0y!~p0y@122.52.126.66] has joined #ruby
cachemoney [cachemoney!~cachemone@71-94-132-42.static.mtpk.ca.charter.com] has joined #ruby
ly- [ly-!~ly-@unaffiliated/ly-] has joined #ruby
vmatiyko [vmatiyko!~vmatiyko@178.120.67.145] has quit [#ruby]
pietro_ [pietro_!~pietro@2-227-162-47.ip187.fastwebnet.it] has joined #ruby
gmci [gmci!~gmci@72.34.190.239] has joined #ruby
palcu [palcu!~alex@89.122.187.223] has joined #ruby
niko [niko!~niko@freenode/staff/ubuntu.member.niko] has quit [#ruby]
virunga [virunga!~virunga@151.64.22.99] has joined #ruby
hugalua [hugalua!~asdf@108-69-128-62.lightspeed.sntcca.sbcglobal.net] has joined #ruby
ksinkar [ksinkar!~ksinkar@117.195.102.185] has joined #ruby
<hugalua>
is this too much to ask for a 6th grader and 4th grader to work on? to make a command line choose your own adventure program; and also something that graphs polynomials as a PNG?
<hugalua>
it's my X-mas challenge for next year - if they can do it, then they get 4x what they saved in their coin jars this past christmas
<hugalua>
they have no background in programming thought. I think they can do it, as I don't think I'm asking for that much.
poclsolnuh [poclsolnuh!~123@78-106-95-140.broadband.corbina.ru] has joined #ruby
<poclsolnuh>
hi people)
gregorg_taf [gregorg_taf!~Greg@78.155.152.6] has joined #ruby
Squarepy [Squarepy!~Squarepy@wcw-staff-214-212.wireless.uva.nl] has joined #ruby
`gregorg` [`gregorg`!~Greg@78.155.152.6] has joined #ruby
flippingbits [flippingbits!~anonymous@port-212-202-126-63.static.qsc.de] has joined #ruby
ph^ [ph^!~ph^@79.135.7.162] has joined #ruby
iamjarvo [iamjarvo!~Adium@c-71-230-13-201.hsd1.nj.comcast.net] has joined #ruby
albedoa [albedoa!~albedoa@ip68-108-106-30.lv.lv.cox.net] has joined #ruby
hugalua [hugalua!~asdf@108-69-128-62.lightspeed.sntcca.sbcglobal.net] has quit ["Leaving"]
tomzx [tomzx!~tomzx@dsl-216-221-39-59.aei.ca] has joined #ruby
iamjarvo1 [iamjarvo1!~Adium@c-71-230-13-201.hsd1.nj.comcast.net] has joined #ruby
iamjarvo [iamjarvo!~Adium@c-71-230-13-201.hsd1.nj.comcast.net] has joined #ruby
pietro__ [pietro__!~pietro@2-227-162-47.ip187.fastwebnet.it] has joined #ruby
canton7 [canton7!~canton7@95.150.107.113] has joined #ruby
ksinkar [ksinkar!~ksinkar@117.195.115.203] has joined #ruby
cousine [cousine!~cousine@196.221.242.180] has joined #ruby
Natch| [Natch|!~natch@178.73.216.55] has joined #ruby
root [root!~root@ec2-184-72-210-31.compute-1.amazonaws.com] has joined #ruby
<Guest86244>
ikaros [ikaros!~ikaros@dslb-188-107-221-154.pools.arcor-ip.net] has joined #ruby
pen [pen!~pen@g1pc2n249.g1.ntu.edu.tw] has joined #ruby
Sliker [Sliker!~ponies@46.208.206.144] has joined #ruby
nanderoo [nanderoo!~nanders@38.124.137.226] has joined #ruby
xpot [xpot!~xpot@166-70-100-198.ip.xmission.com] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
ephemerian [ephemerian!~ian@82-69-1-248.dsl.in-addr.zen.co.uk] has joined #ruby
`brendan [`brendan!~b@66-208-246-34-ubr02b-waldlk01-mi.hfc.comcastbusiness.net] has joined #ruby
TheNumb [TheNumb!thenumb@gateway/shell/mydevil.net/x-eyoozsqxquiewpxx] has joined #ruby
cousine [cousine!~cousine@196.221.242.180] has joined #ruby
<`brendan>
good morning folks
james_cotterill [james_cotterill!~james_cot@89.238.149.34] has joined #ruby
ephemerian [ephemerian!~ian@82-69-1-248.dsl.in-addr.zen.co.uk] has joined #ruby
johanhsfy [johanhsfy!~johan@c-887471d5.012-52-6c756e10.cust.bredbandsbolaget.se] has joined #ruby
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
BrianE [BrianE!~brian@188-220-10-235.zone11.bethere.co.uk] has joined #ruby
Deiu [Deiu!~deiu@lor-8175.int-evry.fr] has joined #ruby
Deiu [Deiu!~deiu@unaffiliated/deiu] has joined #ruby
Deiu [Deiu!~deiu@unaffiliated/deiu] has quit [#ruby]
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
chrisja [chrisja!~chris@5ac7d92c.bb.sky.com] has joined #ruby
jmdev [jmdev!~josesalda@206.132.224.107] has joined #ruby
rickmasta [rickmasta!~rickmasta@pool-71-183-247-164.nycmny.fios.verizon.net] has joined #ruby
pen [pen!~pen@g1pc2n249.g1.ntu.edu.tw] has joined #ruby
rbanffy [rbanffy!~rbanffy@187.31.77.7] has joined #ruby
yakko [yakko!~quassel@200-140-84-9.bsace702.dsl.brasiltelecom.net.br] has joined #ruby
<peterhellberg>
Anyone here that use Goliath?
BrianE [BrianE!~brian@188-220-10-235.zone11.bethere.co.uk] has joined #ruby
seii [seii!~sei@user-3c2h3m6.cable.mindspring.com] has joined #ruby
james_cotterill [james_cotterill!~james_cot@89.238.149.34] has joined #ruby
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby
yakko [yakko!~quassel@200-140-84-9.bsace702.dsl.brasiltelecom.net.br] has quit ["http://quassel-irc.org - Chat comfortably. Anywhere."]
crescendo [crescendo!~eric@unaffiliated/crescendo] has joined #ruby
sandbags [sandbags!~sandbags@unaffiliated/rubymatt] has joined #ruby
<sandbags>
anyone here using RVM and Ruby 1.9.3-p0?
<sandbags>
i guess, in particlar, on a Mac
brian_ [brian_!~brian@188-220-10-235.zone11.bethere.co.uk] has joined #ruby
<sandbags>
if you can help me out with something run ruby -e 'puts $:'
<sandbags>
and tell me what version number is in the lib/ruby/site_ruby/<ver> and lib/ruby/<ver> folders ?
tziOm [tziOm!~bjornar@194.19.106.242] has joined #ruby
tommyvyo [tommyvyo!~tommyvyo@38.123.129.115] has joined #ruby
tommyvyo_ [tommyvyo_!~tommyvyo@38.123.129.115] has joined #ruby
<tziOm>
Does anyone know what "uninitialized constant Syck::Syck" comes from, and how to solve it?
Squarepy [Squarepy!~Squarepy@unaffiliated/squarepy] has joined #ruby
`gregorg` [`gregorg`!~Greg@unaffiliated/gregorg] has joined #ruby
akem [akem!~akem@222.144.120.78.rev.sfr.net] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
sandelius [sandelius!~textual@90-231-202-62-no214.tbcn.telia.com] has joined #ruby
<peterhellberg>
burgestrand: You might be on to something there :)
<peterhellberg>
Well, time to head to the Vietnamese embassy… (picking up my visa for a month long trip in a few weeks)
Ammar01 [Ammar01!~hassaa10@gatej.thls.bbc.co.uk] has joined #ruby
tesmar [tesmar!~tesmar@rrcs-70-62-109-131.midsouth.biz.rr.com] has joined #ruby
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
norex [norex!~quassel@41-135-90-67.dsl.mweb.co.za] has joined #ruby
Wilhelm_ [Wilhelm_!~textual@oyt234.internetdsl.tpnet.pl] has joined #ruby
Wilhelm_ [Wilhelm_!~textual@oyt234.internetdsl.tpnet.pl] has joined #ruby
yfeldblum [yfeldblum!~Jay@pool-71-246-76-76.bltmmd.east.verizon.net] has joined #ruby
Silker [Silker!~ponies@46.208.206.144] has joined #ruby
Lord-Harlot [Lord-Harlot!~Serenity@adsl-94-72-228-27.karoo.kcom.com] has joined #ruby
waxjar [waxjar!~waxjar@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
akem [akem!~akem@222.144.120.78.rev.sfr.net] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
lofic [lofic!~lofic@92.103.32.131] has quit ["Quitte"]
jimmyy111 [jimmyy111!~jimmy@112.237.26.89] has joined #ruby
rbanffy [rbanffy!~rbanffy@187.31.77.7] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
Natch| [Natch|!~natch@178.73.218.106] has joined #ruby
Sliker [Sliker!~ponies@46.208.206.144] has joined #ruby
oponder [oponder!~oponder@mail.memocom.nl] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
netytan [netytan!~user@83-244-220-243.cust-83.exponential-e.net] has joined #ruby
abstrusenick [abstrusenick!~abstrusen@bb220-255-36-18.singnet.com.sg] has joined #ruby
niklasb [niklasb!~codeslay0@p5B310A64.dip0.t-ipconnect.de] has joined #ruby
janissary [janissary!~user@adsl-98-85-0-232.mco.bellsouth.net] has joined #ruby
dv310p3r [dv310p3r!~dv310p3r@host-208-68-238-122.biznesshosting.net] has joined #ruby
sross07|2 [sross07|2!~sross07@vm-s1164-ac3.vet.cornell.edu] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
vraa [vraa!~vraa@h136.231.29.71.dynamic.ip.windstream.net] has joined #ruby
* tnk1
is back.
<robert_>
anybody have any experience with using the odbc gem?
evantravers [evantravers!~textual@fw.luckie.net] has joined #ruby
nvez [nvez!~textual@modemcable196.193-178-173.mc.videotron.ca] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
<linduxed>
hey guys, i'm going to start rewriting a simple python application in ruby. before i start however, i want to try out this TDD thing (something i've never done) and from what i've heard, rspec is what i should use
<linduxed>
is there a good, up-to-date rspec tutorial out there that you could recommend?
<linduxed>
without rails, preferrably
<linduxed>
i'll get to that later
<linduxed>
right now it's only ruby i'm working with
yekta [yekta!~yekta@c-24-1-182-219.hsd1.il.comcast.net] has joined #ruby
james_cotterill [james_cotterill!~james_cot@94-192-130-249.zone6.bethere.co.uk] has joined #ruby
nvez [nvez!~textual@modemcable196.193-178-173.mc.videotron.ca] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
devdazed [devdazed!~russ_nyc@static-96-239-59-191.nycmny.fios.verizon.net] has joined #ruby
carlyle [carlyle!~carlyle@rrcs-96-10-255-203.midsouth.biz.rr.com] has joined #ruby
virunga [virunga!~virunga@151.64.22.99] has joined #ruby
nvez [nvez!~textual@modemcable196.193-178-173.mc.videotron.ca] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
tobym [tobym!~tobym@pool-173-56-80-136.nycmny.fios.verizon.net] has joined #ruby
BrianE [BrianE!~brian@188-220-10-235.zone11.bethere.co.uk] has joined #ruby
Niedar [Niedar!~nnscript@ip68-231-248-182.hr.hr.cox.net] has joined #ruby
dazoakley [dazoakley!~dazoakley@hocuspokus.vm.bytemark.co.uk] has joined #ruby
tk_ [tk_!~tk@p252198.doubleroute.jp] has joined #ruby
delvit [delvit!~tukan@236.53.broadband14.iol.cz] has joined #ruby
Carmivore [Carmivore!~carmivmor@ec2-184-73-17-110.compute-1.amazonaws.com] has joined #ruby
nvez [nvez!~textual@modemcable196.193-178-173.mc.videotron.ca] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
Silker [Silker!~ponies@46.208.206.144] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
nvez [nvez!~textual@modemcable196.193-178-173.mc.videotron.ca] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
* tnk1
is away: Gone away for now
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
* tnk1
is back.
xpot [xpot!~xpot@166-70-100-198.ip.xmission.com] has joined #ruby
philcrissman [philcrissman!~philcriss@206.57.45.116] has joined #ruby
lateau_ [lateau_!~Adium@KD125054233174.ppp-bb.dion.ne.jp] has joined #ruby
bbttxu [bbttxu!~adam@nt8rsctf1.unt.ad.unt.edu] has joined #ruby
bbttxu [bbttxu!~adam@nt8rsctf1.unt.ad.unt.edu] has joined #ruby
dasfugufish [dasfugufish!~Adium@68-170-39-205.mammothnetworks.com] has joined #ruby
Marco [Marco!~marco@Marco-2.Kiewit.Dartmouth.EDU] has joined #ruby
ryh [ryh!~ryh@host-174-45-115-181.bzm-mt.client.bresnan.net] has joined #ruby
bnewton [bnewton!~bnewton@17.102.37.210] has joined #ruby
Jackneill [Jackneill!~Jackneill@unaffiliated/jackneill] has joined #ruby
stepnem [stepnem!~stepnem@176.119.broadband10.iol.cz] has joined #ruby
strife25 [strife25!strife25@nat/ibm/x-pgiaogtvosudpawm] has joined #ruby
thomascioppettin [thomascioppettin!~thomascio@cpe-071-071-047-213.triad.res.rr.com] has joined #ruby
jgarvey [jgarvey!~jgarvey@cpe-174-097-248-211.nc.res.rr.com] has joined #ruby
nvez [nvez!~textual@modemcable196.193-178-173.mc.videotron.ca] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
Locke23rus [Locke23rus!~quassel@128-70-109-104.broadband.corbina.ru] has joined #ruby
linoj [linoj!~linoj@sn1-pat-1.m2s.com] has joined #ruby
ferbass [ferbass!~ferbass@201-048-211-049.static.ctbctelecom.com.br] has joined #ruby
<linoj>
hi, i'm looking at the various veal methods in ruby, i'm looking for a relatively safe way to store a ruby expression in a database and evaluate it at runtime (specifically, need things like Time.now in a search condition). Any ideas for best way to do this?
<linoj>
eval
<linoj>
not veal :)
<mlue>
yummy
wilhelm__ [wilhelm__!~textual@bdh179.neoplus.adsl.tpnet.pl] has joined #ruby
durre [durre!~kvirc@217-212-242-4.customer.telia.com] has joined #ruby
theRoUS [theRoUS!KenCoar@apache/committer/coar] has joined #ruby
BrianE [BrianE!~brian@188-220-10-235.zone11.bethere.co.uk] has joined #ruby
nd__ [nd__!~nd@mnhm-4d006942.pool.mediaWays.net] has joined #ruby
vmatiyko [vmatiyko!~vmatiyko@178.120.67.145] has joined #ruby
krzkrzkrz [krzkrzkrz!~foobar@175.139.71.25] has joined #ruby
krzkrzkrz [krzkrzkrz!~foobar@unaffiliated/krz] has joined #ruby
DMKE [DMKE!~DMKE@pdpc/supporter/student/dmke] has joined #ruby
nvez_ [nvez_!~textual@modemcable196.193-178-173.mc.videotron.ca] has joined #ruby
kjs3 [kjs3!~kseefried@174.47.62.3] has joined #ruby
alem0lars [alem0lars!~alem0lars@host128-246-dynamic.11-87-r.retail.telecomitalia.it] has joined #ruby
<shevy>
no idea linoj. what I do know is that all *eval* take up a lot of processing power of my brain, so I tend to avoid them when possible
catphish [catphish!~catphish@2001:9d8:2005:11:222:15ff:fe88:aae2] has joined #ruby
<catphish>
does anyone know if a mysql driver that's threadsafe and easy to use in a muntithreaded way?
<catphish>
i usually use mysql2
<catphish>
but rather than blocking, it raises an exception if you try to pull 2 simultaneous requests through the same instance
<catphish>
i suppose i want a driver that either has an integral thread pool, or blocks allowing queued requests
akem [akem!~akem@unaffiliated/akem] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
confounds [confounds!~confounds@CPE78cd8e667600-CM78cd8e6675fd.cpe.net.cable.rogers.com] has joined #ruby
durre [durre!~kvirc@217-212-242-4.customer.telia.com] has joined #ruby
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
HNDavid [HNDavid!~david@pool-173-48-127-244.bstnma.fios.verizon.net] has quit [#ruby]
axl_ [axl_!~axl@173-11-52-113-Minnesota.hfc.comcastbusiness.net] has joined #ruby
ksk [ksk!ksk@im.knubz.de] has joined #ruby
<catphish>
i could always put the mysql config in a class variable and open a new connection on every instance, but i dont really want to
quest88 [quest88!~quest88@ppp-70-254-37-241.dsl.lgvwtx.swbell.net] has joined #ruby
nvez [nvez!~textual@modemcable196.193-178-173.mc.videotron.ca] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
elliot_ [elliot_!~elliot@77.125.140.132] has joined #ruby
albemuth [albemuth!~albemuth@201.198.78.18] has joined #ruby
crankycoder [crankycoder!~crankycod@199.243.188.66] has joined #ruby
quest88 [quest88!~quest88@70.42.255.242] has joined #ruby
SterNiX [SterNiX!~LessIsMor@unaffiliated/nu253r/x-0655220] has joined #ruby
Azure|netbook|dc [Azure|netbook|dc!~azt@unaffiliated/azure] has joined #ruby
Azure|dc [Azure|dc!~azt@unaffiliated/azure] has joined #ruby
nvez [nvez!~textual@modemcable196.193-178-173.mc.videotron.ca] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
nvez [nvez!~textual@modemcable196.193-178-173.mc.videotron.ca] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
luckman212 [luckman212!~irc@pool-108-41-8-176.nycmny.fios.verizon.net] has joined #ruby
<robert_>
hii shevy :D
luckman212 [luckman212!~irc@pool-108-41-8-176.nycmny.fios.verizon.net] has joined #ruby
stoffus [stoffus!~stoffus@2001:9b0:1:dead:129a:ddff:fe58:6835] has joined #ruby
<shevy>
die!
<shevy>
oops, sorry. wrong idiom :(
<shevy>
hi robert_ :D
<robert_>
heh :p
<robert_>
how goes it? :D
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
pootpoot [pootpoot!~pootpoot@38.108.250.130] has joined #ruby
<shevy>
dunno
<shevy>
staring at old ruby code
<shevy>
trying to make it look nicer
<shevy>
very tedious :(
<shevy>
http://pastie.org/3119028 that's a layout I have now ... not sure if it is better than how it used to be ... (it used to be a method, not a class)
<jmdev>
Hi guys, What alternative to Ruby Koans you guys recommend?
eldariof [eldariof!~CLD@PPPoE-78-29-101-123.san.ru] has joined #ruby
waxjar [waxjar!~waxjar@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
misfitsu [misfitsu!~halliburt@pool-108-9-31-218.tampfl.fios.verizon.net] has joined #ruby
<misfitsu>
is there a way to specify which CWD Process.exec executes in?
<misfitsu>
I'm using Dir.chdir in the previous line but it's not taking
<canton7>
shevy, do you have to instantiate a new class there?
Deiu [Deiu!~deiu@lor-8175.int-evry.fr] has joined #ruby
Deiu [Deiu!~deiu@unaffiliated/deiu] has joined #ruby
<shevy>
I really don't know if it was better to move it to a class, or let it stay a method
<canton7>
shevy, more to the point, do RBT::Base#opn, #cif, etc, require RBT::Base to be instantiated?
<shevy>
oh hmm... that Base thing is just a common and shared module
<shevy>
obviously my own layout confuses me
<shevy>
it feels as if it is all growing over my head :(
<canton7>
because if they can become static/module methods of RBT::Base, then you won't need the instantiation there... Not sure what's best without knowing the whole application, of course
<shevy>
hmm yeah
nvez [nvez!~textual@modemcable196.193-178-173.mc.videotron.ca] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
<canton7>
however, some part of me really dislikes having a static method which instantiates the class. Which isn't part of a factory pattern, of course
wilhelmn_ [wilhelmn_!~textual@oyt234.internetdsl.tpnet.pl] has joined #ruby
nvez [nvez!~textual@modemcable196.193-178-173.mc.videotron.ca] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
<robert_>
shevy: be lucky you're not working with win32.
* robert_
gags.
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
<shevy>
robert_ hmm well I guess it only makes things a bit more complicated, but I can work within the "project logic" of a ruby project no matter the OS , I suppose
<robert_>
yeah
<robert_>
but I'm stuck writing a win32 c++ app for windows server.
ryh_ [ryh_!~ryh@host-174-45-115-181.bzm-mt.client.bresnan.net] has joined #ruby
dazoakley [dazoakley!~dazoakley@hocuspokus.vm.bytemark.co.uk] has joined #ruby
Mramaizng [Mramaizng!~bbeers@205.204.33.2] has joined #ruby
* tnk1
is away: Gone away for now
Helius [Helius!~Adium@212.31.227.18] has joined #ruby
mistaker [mistaker!~mistaker@77-253-210-31.ip.netia.com.pl] has joined #ruby
nvez [nvez!~textual@modemcable196.193-178-173.mc.videotron.ca] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
<mistaker>
I have very basic beginners question about a small script I am running
Dreamer3 [Dreamer3!~Dreamer3@74-134-34-116.dhcp.insightbb.com] has joined #ruby
ph^ [ph^!~ph^@cm-84.212.225.74.getinternet.no] has joined #ruby
<mistaker>
I am using hpricot to search a web page, and I want it to find the last data value in an HTML document table and return the value of just the last cell
ckrailo [ckrailo!~ckrailo@208.86.167.247] has joined #ruby
bbttxu [bbttxu!~adam@nt8rsctf1.unt.ad.unt.edu] has joined #ruby
thomascioppett-1 [thomascioppett-1!~thomascio@cpe-071-071-047-213.triad.res.rr.com] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
ph^ [ph^!~ph^@cm-84.212.225.74.getinternet.no] has joined #ruby
SterNiX [SterNiX!~LessIsMor@unaffiliated/nu253r/x-0655220] has joined #ruby
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
dasfugufish [dasfugufish!~Adium@174-27-233-214.slkc.qwest.net] has joined #ruby
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
kenperkins [kenperkins!~textual@174-24-171-37.tukw.qwest.net] has joined #ruby
ph^ [ph^!~ph^@cm-84.212.225.74.getinternet.no] has joined #ruby
nvez [nvez!~textual@modemcable196.193-178-173.mc.videotron.ca] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
vraa_ [vraa_!~vraa@h180.73.29.71.dynamic.ip.windstream.net] has joined #ruby
kevinbond [kevinbond!~kevinbond@250.orl54.voxeo.com] has joined #ruby
paissad [paissad!~paissad@89-92-16-151.hfc.dyn.abo.bbox.fr] has joined #ruby
vmatiyko [vmatiyko!~vmatiyko@178.120.67.145] has quit [#ruby]
cjlicata [cjlicata!~carlyle@rrcs-96-10-255-203.midsouth.biz.rr.com] has joined #ruby
tmiller [tmiller!~tmiller@fw.luckie.net] has joined #ruby
bbttxu [bbttxu!~adam@nt8rsctf1.unt.ad.unt.edu] has joined #ruby
nvez [nvez!~textual@modemcable196.193-178-173.mc.videotron.ca] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
kakashi__ [kakashi__!~kakashi_@nltk/kakashi] has joined #ruby
v0n [v0n!~v4n@2607:fad8:4:0:21e:8cff:fe4d:2f7d] has joined #ruby
billy_ran_away [billy_ran_away!~billy_ran@pool-173-69-211-31.bltmmd.fios.verizon.net] has joined #ruby
<v0n>
hey guys, is there a way with MiniMagick to get a rgb stream from an image?
mah_b_ [mah_b_!4fca5b94@gateway/web/freenode/ip.79.202.91.148] has joined #ruby
trend [trend!~trend@97-81-69-219.dhcp.athn.ga.charter.com] has joined #ruby
carlyle [carlyle!~carlyle@216.133.69.20] has joined #ruby
<billy_ran_away>
How can I add a variable'ly named instance method to a class (like define_method)?
<billy_ran_away>
define_method when within a class will only add the method to the class, right?
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
nvez [nvez!~textual@modemcable196.193-178-173.mc.videotron.ca] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
BrianE [BrianE!~brian@188-220-10-235.zone11.bethere.co.uk] has joined #ruby
<v0n>
any mini_magick user?
apeiros_ [apeiros_!~apeiros@77-58-113-31.dclient.hispeed.ch] has joined #ruby
logic [logic!~logic@unaffiliated/bitch333z] has joined #ruby
nvez [nvez!~textual@modemcable196.193-178-173.mc.videotron.ca] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
headius [headius!~headius@71-210-151-185.mpls.qwest.net] has joined #ruby
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
nvez [nvez!~textual@modemcable196.193-178-173.mc.videotron.ca] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
Mahoek [Mahoek!~Mahoek@ip51ceb6d4.adsl-surfen.hetnet.nl] has joined #ruby
<billy_ran_away>
How can I define a new instance method from a class method for all instances of that class?
nowthatsamatt [nowthatsamatt!~nowthatsa@adsl-98-85-31-238.mco.bellsouth.net] has joined #ruby
<apeiros_>
billy_ran_away: see Module#define_method
<apeiros_>
also see Module#class_eval
<billy_ran_away>
apeiros_: Thank you!
<billy_ran_away>
apeiros_: You helped me last time.
<apeiros_>
you're welcome
lkba [lkba!~AndChat@dwj22.neoplus.adsl.tpnet.pl] has joined #ruby
tommyvyo_ [tommyvyo_!~tommyvyo@38.123.129.115] has joined #ruby
tommyvyo [tommyvyo!~tommyvyo@38.123.129.115] has joined #ruby
thepix [thepix!~pix@as3-16.starogard.dialup.inetia.pl] has joined #ruby
<apeiros_>
billy_ran_away: some suggestions: use {} instead of Hash.new, also in `Array.wrap masks`, the Array.wrap is superfluous, masks is guaranteed to be an array
<billy_ran_away>
apeiros_: I'm trying to make the dynamically named (from the masked_attribute's name) getter and setters for each instance of that class
nvez [nvez!~textual@modemcable196.193-178-173.mc.videotron.ca] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
<apeiros_>
robert_: somebody might have (I don't, and notice, this kind of question is pointless)
flippingbits_ [flippingbits_!~anonymous@port-212-202-126-63.static.qsc.de] has joined #ruby
ephemerian [ephemerian!~ian@82-69-1-248.dsl.in-addr.zen.co.uk] has quit [#ruby]
<apeiros_>
billy_ran_away: unrelated to your issue: `self.send(:define_method` - omit the self.send(: part
<apeiros_>
just define_method. no self. needed either.
<apeiros_>
ah, I guess you tried self.define_method first and failed… you can't call private methods with an explicit receiver. not even if that is `self`.
<linduxed>
is there a ruby operator that does floor division
<linduxed>
the equivalent of python's //
<apeiros_>
linduxed: div
<billy_ran_away>
apeiros_: K, now that would defining new class methods, but I of course need them to be instance methods (so each instance could set and get different values, right?)
<robert_>
apeiros_: I was hoping someone could give me pointers on how to use it. ;/
<linduxed>
apeiros_: ok thx
Codif [Codif!~codif@84.120.204.160.dyn.user.ono.com] has joined #ruby
<apeiros_>
robert_: if you want help, you should do your best to describe your actual problem. neither "somebody used X" nor "I'm having troubles" are of any use to potential helpers.
<robert_>
it's complaining about the way I'm forming my DSN
<apeiros_>
billy_ran_away: no, define_method defines instance methods
<robert_>
I have no idea why, though, because by all accounts, it should be accept a dsn, not just the driver name.
<apeiros_>
class Foo; define_method(:bar) do "bar!" end; end; Foo.new.bar # => "bar!"
<linduxed>
apeiros_: hmm, i can't figure out how to use it, where could i find a description of its usage?
<billy_ran_away>
apeiros_: So that could be working?!?! Let me write an easier test… : )
<linduxed>
btw, is ruby like python in the sense that the standards dictate that methods should have underscore separation while classes are camelcase?
<apeiros_>
linduxed: no
<apeiros_>
ruby doesn't care much how you name your methods
savage- [savage-!~savage-@209.118.197.220] has joined #ruby
<linduxed>
well
<linduxed>
i didn't mean it in the MUST way
<apeiros_>
also classes are objects and only have a name if you assign them to a constant
<apeiros_>
constants however *must* start with A-Z
<linduxed>
i meant that i read in a PEP that you should do it a certain way because all others do it that way
<apeiros_>
methods that start with A-Z (only uppercase) *must* be unambiguously methods (i.e., have a receiver, parens and/or get arguments passed)
<apeiros_>
also, it is *convention* that methods are snake_cased
<linduxed>
ok
<apeiros_>
it is also convention that you use 2 space indents
<apeiros_>
and CamelCase constants
<linduxed>
ok, good to know
<apeiros_>
there's plenty of conventions, those are probably the most important ones. google for ruby code styleguide if you look for more.
<linduxed>
ok, i will if i'm uncertain
<linduxed>
one thing though...
<linduxed>
so people will get mad if i use 8space tabs?
<apeiros_>
billy_ran_away: sorry for the delay - in the methods you define - where should maskable_attributes come from? (line 23 in your code)
<linduxed>
:-D
<apeiros_>
linduxed: probably
lahwran [lahwran!lahwran@unaffiliated/lahwran] has joined #ruby
llaskin [llaskin!~Leo@c-24-128-198-93.hsd1.ma.comcast.net] has joined #ruby
<billy_ran_away>
apeiros_: No problem at all, what method are you referring to?
<llaskin>
if i call fileX with args (a,b,c) and fileX loads fileY, does fileY have access to args (a,b,c)?
revans [revans!~revans@99-132-72-207.lightspeed.sndgca.sbcglobal.net] has joined #ruby
<linduxed>
just kidding, but i do prefer 4space tabs... i guess i'll just have to adjust
<billy_ran_away>
apeiros_: MaskableAttributes the class?
eywu [eywu!~Adium@205-170-107-4.dia.static.qwest.net] has joined #ruby
<apeiros_>
linduxed: they might burn your code and run you out of town - after having tared and feathered you
bier [bier!~bier@p54A5BEF9.dip.t-dialin.net] has joined #ruby
Greed [Greed!~Greed@pool-71-251-229-136.rcmdva.fios.verizon.net] has joined #ruby
<apeiros_>
billy_ran_away: a class method?
<Greed>
What do you want from me lahwran
johanhsfy [johanhsfy!~johan@81-225-127-57-no201.tbcn.telia.com] has joined #ruby
dekroning [dekroning!~dekroning@217.166.122.42] has joined #ruby
<apeiros_>
llaskin: what do you mean by "call fileX"?
<llaskin>
ruby fileX.rb a b c
<llaskin>
then fileX loads fileY
axl_ [axl_!~axl@75-149-152-225-Minnesota.hfc.comcastbusiness.net] has joined #ruby
nvez [nvez!~textual@modemcable196.193-178-173.mc.videotron.ca] has joined #ruby
<apeiros_>
ah, execute…
<llaskin>
yes sorry
<apeiros_>
yes, sure. ARGV is a constant
<apeiros_>
constants are global.
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
niklasb [niklasb!~codeslay0@p5B310A64.dip0.t-ipconnect.de] has joined #ruby
ben_alman [ben_alman!~cowboy@awesome.benalman.com] has joined #ruby
<apeiros_>
unless fileX contains code to delete it, of course
<apeiros_>
llaskin: *but* it's bad style to access ARGV anywhere but in the executable
<apeiros_>
(directly, that is)
<llaskin>
so what is the best way to transfer the args then?
<llaskin>
if i am loading fileY, how would I pass the args without storing them in a constant or global?
<apeiros_>
llaskin: I assume your fileY contains classes and methods? pass it as args to whatever method makes use of it.
<llaskin>
apeiros_: it does, but I am literally calling the command "load fileY" from fileX
<apeiros_>
llaskin: so?
<llaskin>
fileY actually has a set of function calls to a bunch of other files, which may or may not rely on the values in ARGV
<llaskin>
can i pass arguments to the load method?
<apeiros_>
llaskin: I somewhat get the feeling you should read a thing or two about OO…
<shevy>
or just ask apeiros_
<shevy>
:D
<llaskin>
apeiros_: ummmm i know plenty about object oriented design
<apeiros_>
shevy: I'm not a personal teacher, though…
axl_ [axl_!~axl@75-149-152-225-Minnesota.hfc.comcastbusiness.net] has joined #ruby
<llaskin>
however i'm trying to work within constraints of an existing system(that might not be ideal)
<shevy>
in my world OOP is about ponies and unicorns and flowers
<apeiros_>
llaskin: then apply your knowledge. load only loads code (also, why load and not require?)
<apeiros_>
invoking code is a different thing
<apeiros_>
having toplevel code in your loaded files that are not definitions is bad style too… but if you know about OO, you likely know that too…
axl_ [axl_!~axl@75-149-152-225-Minnesota.hfc.comcastbusiness.net] has joined #ruby
<llaskin>
apeiros_: the way this piece of code works, is that based on one of the ARGVs passed to fileX, a specific fileY is loaded/required(which are mostly synonymous btw from what I can see). However, i have come to a situation where I want to pass some of the ARGV's to fileY
<llaskin>
you also must know that we don't always all work in the most ideal systems right?
<apeiros_>
billy_ran_away: oh, the cattr_accessor? I see…
billy_ran_away [billy_ran_away!~billy_ran@pool-173-69-211-31.bltmmd.fios.verizon.net] has joined #ruby
<apeiros_>
llaskin: if you say "pass ARGS to file X", that either implies you have non-definitions toplevel code, which is bad, or it means you're conflating stuff…
Araxia [Araxia!~Araxia@173-164-68-213-Oregon.hfc.comcastbusiness.net] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
alfism [alfism!~alfism@2620:149:4:1201:38e1:a080:ba34:aad1] has joined #ruby
adambeynon_ [adambeynon_!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby
SterNiX [SterNiX!~LessIsMor@unaffiliated/nu253r/x-0655220] has joined #ruby
crankycoder [crankycoder!~crankycod@199.243.188.66] has quit ["Leaving..."]
kenichi [kenichi!~kenichi@c-24-20-239-11.hsd1.or.comcast.net] has joined #ruby
<apeiros_>
billy_ran_away: hm… is it possible that you haven't pushed all files? maskable_attribute/maskable_attribute.rb seems missing…
<billy_ran_away>
i added it in the next commit
<billy_ran_away>
I should have re-ordered those commits in a rebase...
<billy_ran_away>
apeiros_: Nope you're right
Tuxist [Tuxist!~quassel@dyndsl-031-150-026-140.ewe-ip-backbone.de] has joined #ruby
amerine [amerine!~mturner@67.204.184.82] has joined #ruby
machuga [machuga!~machuga@pool-72-64-157-228.tampfl.fios.verizon.net] has joined #ruby
<apeiros_>
oh, hehe, funny… billy_ran_away, you should check the names of your variables ;-)
<apeiros_>
define_method name <-- where does name come from?
strife25 [strife25!strife25@nat/ibm/x-qgdtrhctepdpwqyc] has joined #ruby
andrewhl [andrewhl!~andrew@24-246-15-43.cable.teksavvy.com] has joined #ruby
<apeiros_>
subsequently, masked_attributes vs. maskable_attributes
<linduxed>
if i've got a file i've imported with "import calc" i can use one of its arguments with "calc.foobar". how do i do that i ruby, asusuming it's loaded?
ghanima [ghanima!~ghanima@163.192.12.2] has joined #ruby
<billy_ran_away>
apeiros_: Okay, I pushed it out.
<shevy>
linduxed ruby does not really have an import-like system. when you require the file, it is available for you. most of the time, it will reside in a module namespace, like module Foo (sometimes class Foo)
<apeiros_>
linduxed: with ruby, you do `require "path/to/file"` where path/to/file is relative to any path in $LOAD_PATH (or a file of any installed gem)
<billy_ran_away>
apeiros_: haha, which line was that?
<apeiros_>
linduxed: after that, it's (almost) as if you had written the code in the same file
<apeiros_>
that is, you can use its classes and its methods
dr_bob [dr_bob!~robert@p5DC4F764.dip.t-dialin.net] has joined #ruby
<billy_ran_away>
apeiros_: That was a copy and paste but forgot to change...
<billy_ran_away>
apeiros_: That should be masked_attribute
<shevy>
not sure what calc.foobar is doing linduxed but I guess in ruby, it could be a class called Calc, and foobar could be a class method perhaps. Calc.foobar or if calc is a variable then .foobar would be a method on that object
<apeiros_>
linduxed: oh, it might be that toplevel methods are file-local. add methods to Kernel if you want "global functions"
<billy_ran_away>
apeiros_: awesome thanks for your help!
<tziOm>
how do I debug the: uninitialized constant Syck::Syck
<apeiros_>
billy_ran_away: relevant changes are on line 29 & 32 (`masked_attribute` instead of `name`), and line 30 & 33 (`masked_attributes` instead of `maskable_attributes`)
<machuga>
Hey I'm having some headaches installing the rqr gem from both system ruby and and rvm rubies. It was hanging on a non existent folder which I've since symlinked accordingly, but am now getting hung up on "ld: library not found for -lsupc++". It appears that supc++ is not included in the OS X 10.7 SDK (I'm currently on Mac OS X 10.7) so I'm assuming this is part of the headache. Has anyone had any luck compiling it or any other
<billy_ran_away>
apeiros_: Yea, I went ahead and used your do end proc style too : )
<apeiros_>
oh, and remove the `p self` on line 22
linusoleander [linusoleander!~linus@h62n3c1o1042.bredband.skanova.com] has joined #ruby
<billy_ran_away>
apeiros_: What's the deal with lines 2-4?
<billy_ran_away>
apeiros_: Oh duh
<machuga>
To be honest I'm not entirely why they tried to drop back down to just GCC there instead of continuing with g++, but I'm sure it was a valid reason
<billy_ran_away>
apeiros_: Because I forgot to check in maskable_attribute.rb
<apeiros_>
billy_ran_away: btw., you may *not* want to use cattr's, they use class variables, which are somewhat nasty (and often misunderstood by ruby programmers)
<apeiros_>
billy_ran_away: line 2-4 was a work-around for your missing file :-p
<apeiros_>
you can just drop that
<apeiros_>
machuga: rqr some qr-code reader? if so, then I (likely) didn't have any better luck. I tried a couple and didn't get any to work on 10.7 :-S (I didn't invest more than a couple of minutes into each, though)
<linusoleander>
Can I combine lazy evaluation and a hash in ruby?
<apeiros_>
machuga: I think for writing there's pure ruby solutions
josesaldana [josesaldana!~josesalda@206.132.224.107] has joined #ruby
<machuga>
apeiros_: Ya I think there are a few extra options, I'll just likely need the extra speed since it'll be in a high traffic environment
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
s_much [s_much!~butt_hurt@static-173-61-113-6.cmdnnj.fios.verizon.net] has joined #ruby
crankycoder [crankycoder!~crankycod@24-246-44-226.cable.teksavvy.com] has joined #ruby
RomD` [RomD`!~Roman@nrbg-4d0705b3.pool.mediaWays.net] has joined #ruby
<machuga>
still need the client to provide me realistic estimations to run some benchmarks, but it'll be up there a bit.
rethaw [rethaw!~textual@c-98-234-116-174.hsd1.ca.comcast.net] has joined #ruby
strife25 [strife25!strife25@nat/ibm/x-qokzjawdjxhjbpop] has joined #ruby
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
Helius [Helius!~Adium@109.117.183.145] has joined #ruby
stkowski [stkowski!~stkowski@ns25.8x8.com] has joined #ruby
TheNatd [TheNatd!~natd@DSL217-132-220-120.bb.netvision.net.il] has joined #ruby
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby
josephwilk [josephwilk!~josephwil@109.231.237.58] has joined #ruby
eldariof [eldariof!~CLD@95.84.46.218] has joined #ruby
vmatiyko [vmatiyko!~vmatiyko@178.120.67.145] has joined #ruby
sandelius [sandelius!~textual@90-231-202-62-no214.tbcn.telia.com] has joined #ruby
chiel [chiel!~chiel@kunkels.me] has joined #ruby
chiel [chiel!~chiel@kunkels.me] has quit [#ruby]
sobering [sobering!~Adium@iphost-64-56-142-213.wpg.wiband.net] has joined #ruby
ChampS_ [ChampS_!~ChampS@p54B4C6F6.dip.t-dialin.net] has joined #ruby
chiel [chiel!~chiel@kunkels.me] has joined #ruby
<chiel>
Hi guys, for a project I am working on, I am printing some html inside a <script> tag. I'd like it to be escaped so that people can't, for example, put a </script> tag. how would I achieve this?
minijupe [minijupe!~benlieb@97-95-236-58.dhcp.sffl.va.charter.com] has joined #ruby
crankyco_ [crankyco_!~crankycod@out-on-138.wireless.telus.com] has joined #ruby
<canton7>
HTML *inside* a script tag? Like, inside quotes?
crankyco_ [crankyco_!~crankycod@out-on-138.wireless.telus.com] has joined #ruby
<chiel>
canton7: ehm, sorry, between the opening and closing script tags. :)
Jake232 [Jake232!~textual@5e08fa4c.bb.sky.com] has joined #ruby
<chiel>
basically I need something equivalent to htmlspecialchars found in php.
eldariof [eldariof!~CLD@95.84.23.23] has joined #ruby
logic [logic!~logic@unaffiliated/bitch333z] has joined #ruby
ceej [ceej!~anonymous@cpe-72-190-40-203.tx.res.rr.com] has joined #ruby
Guest35011 [Guest35011!~marco@Marco-2.Kiewit.Dartmouth.EDU] has joined #ruby
p0y [p0y!~p0y@182.18.249.40] has joined #ruby
savage- [savage-!~savage-@209.118.197.220] has joined #ruby
Cervajz [Cervajz!~Cervajz@opensuse/member/Cervajz] has joined #ruby
Cervajz [Cervajz!~Cervajz@opensuse/member/Cervajz] has joined #ruby
kirun [kirun!~kirun@78-86-154-194.zone2.bethere.co.uk] has joined #ruby
pantsman [pantsman!~pantsman@2.25.204.165] has joined #ruby
pantsman [pantsman!~pantsman@pdpc/supporter/active/pantsman] has joined #ruby
johanhsfy [johanhsfy!~johan@81-225-127-57-no201.tbcn.telia.com] has joined #ruby
TheIronWolf [TheIronWolf!~theironwo@208.90.215.35] has joined #ruby
startling [startling!~startling@c-24-15-86-181.hsd1.il.comcast.net] has joined #ruby
<startling>
In python, I can install packages with `pip install -e .`, which will install a symlink to the source code so I can change things without constantly having to reinstall them. Does gem have anything like that?
MekkisFreenode [MekkisFreenode!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
<apeiros_>
gem which GEMNAME, then edit away…
<apeiros_>
of course you can use ln -s + xargs to get your symlink too…
jay_zawrotny [jay_zawrotny!~Jay@50-77-200-126-static.hfc.comcastbusiness.net] has joined #ruby
<startling>
thanks.
MekkisFreenode [MekkisFreenode!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
nd_____ [nd_____!~nd@mnhm-5f74c458.pool.mediaWays.net] has joined #ruby
epochwolf|vps [epochwolf|vps!~epoch@singleforest.com] has joined #ruby
epochwolf|vps [epochwolf|vps!~epoch@unaffiliated/epochwolf] has joined #ruby
froy [froy!~troy@manuel.dublan.net] has joined #ruby
kennethreitz [kennethreitz!~kennethre@c-24-127-96-129.hsd1.va.comcast.net] has joined #ruby
eignerchris [eignerchris!~eignerchr@c-24-20-239-11.hsd1.or.comcast.net] has joined #ruby
Spockz [Spockz!~Spockz@84.245.46.110] has joined #ruby
DrShoggoth [DrShoggoth!~prakwtf@68-188-73-250.static.stls.mo.charter.com] has joined #ruby
<linduxed>
ok so this is my old python project that i want to port to ruby: https://github.com/linduxed/eve-mins-python in planning the layout of this project i've so far decided that i'll split it all up into three files
<linduxed>
calc.rb, converter.rb and items.rb
<linduxed>
the thing i'm unsure of is whether i should have a separate file alltogether for the data importing from the text files
<linduxed>
like... parser.rb
crankycoder [crankycoder!~crankycod@24-246-44-226.cable.teksavvy.com] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@67.139.75.158] has joined #ruby
jtrudeau [jtrudeau!~jeff@75-150-71-83-NewEngland.hfc.comcastbusiness.net] has joined #ruby
eywu [eywu!~Adium@205-170-107-4.dia.static.qwest.net] has joined #ruby
h4mz1d [h4mz1d!~hamfz@99-0-57-199.lightspeed.tsclal.sbcglobal.net] has joined #ruby
Spockz_ [Spockz_!~Spockz@84.245.46.110] has joined #ruby
<canton7>
linduxed, after a quick glance through the python code, my main comment is that it's all written rather procedurally -- your objects contains data only, and there are global (well, module) methods which operate on that data. You might gain a lot by moving to a proper OO design -- your objects contains both data and methods, with the methods operating on the data
<linduxed>
canton7: that sounds quite true, now that you mention it
Spockz [Spockz!~Spockz@84.245.46.110] has joined #ruby
<linduxed>
canton7: would you suggest anything?
eignerchris_ [eignerchris_!~eignerchr@c-24-20-239-11.hsd1.or.comcast.net] has joined #ruby
ryh [ryh!~ryh@host-174-45-115-181.bzm-mt.client.bresnan.net] has joined #ruby
<canton7>
linduxed, I can't suggest anything concrete without first fully understanding what you've got at the moment. One example would be the calc.ores_to_minerals methods, though... That could become Ore.to_mineral maybe?
afex [afex!~kthornhil@wsip-68-225-20-130.oc.oc.cox.net] has joined #ruby
<linduxed>
canton7: if by "what you've got" you mean ruby code... i've got nothing
<canton7>
sorry, what python code you've got
<linduxed>
canton7: what you see in that repo is all there is
Liothen_ [Liothen_!~liothen@24-119-65-28.cpe.cableone.net] has joined #ruby
<canton7>
yeah, but I don't have time to read and understand it all, so I don't have the full structure and operation of the program in my head
<linduxed>
aaaah
<canton7>
sorry, that was unclear
Tachyon [Tachyon!tach@tachnb.kolej.mff.cuni.cz] has joined #ruby
nekid [nekid!~nekid@c-24-6-170-1.hsd1.ca.comcast.net] has joined #ruby
davidboy [davidboy!u3228@gateway/web/irccloud.com/x-hdthdctdklwkplkj] has joined #ruby
btanaka [btanaka!~textual@17.212.166.137] has joined #ruby
<linduxed>
ok then
<linduxed>
hmmm
<linduxed>
i'm trying to picture that "proper OO design"
<linduxed>
i'm not sure what i'm aiming for
<davidcelis>
do you know ruby?
chiel [chiel!~chiel@kunkels.me] has quit [#ruby]
<linduxed>
davidcelis: to be honest... no
minijupe [minijupe!~benlieb@97-95-236-58.dhcp.sffl.va.charter.com] has joined #ruby
<linduxed>
davidcelis: i'm not even sure if i'd answer yes if you said python
<davidcelis>
you might want to read a ruby book. there are some good ones that will also teach you OO design practices
<davidcelis>
Well-Grounded Rubyist is one I see recommended often
<linduxed>
"i've had shit compile"
<linduxed>
that's a good way to put it
<davidcelis>
ruby and python don't compile
<davidcelis>
they are interpreted
<linduxed>
sorry
<davidcelis>
lol
<linduxed>
i know
<linduxed>
but you know what i meant
<davidcelis>
more or less
<apeiros_>
davidcelis: only partially true :-p
<apeiros_>
(bytecode… yadda yadda…)
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
rethaw [rethaw!~textual@c-98-234-116-174.hsd1.ca.comcast.net] has joined #ruby
<canton7>
linduxed, I think the thing that clicked for me, was realising that, in OOP, you don't have functions that operate on data (as you do in, say, C). You have classes that operate on themselves
<canton7>
Obviously you can't do that 100% of the time, but it's the general idea
<canton7>
so, before OOP, you'd say f = fopen('file'); fread(f); fclose(f); Under OOP, you'd say f = File.open('file'); f.read(); f.close()
shaatar [shaatar!u648@gateway/web/irccloud.com/x-iljoxjjajcszjeev] has joined #ruby
<davidcelis>
I thought Python was supposed to be primarly OO, but most Python code I see seems to be imperitave
<apeiros_>
pythons OO is rather tacked-on
<startling>
ha, what?
<startling>
python is pretty thoroughly OO.
t-mart [t-mart!~t-mart@c-174-49-68-22.hsd1.ga.comcast.net] has joined #ruby
<apeiros_>
startling: …yeah, which is why you have to pass self around…
<davidcelis>
lolz
<shevy>
startling python is too dumb to know where is self
kakashi__ [kakashi__!~kakashi_@nltk/kakashi] has joined #ruby
<shevy>
it's like you have baby kittens and you need to tell them where the mother is
<workmad3>
python isn't really OO
<workmad3>
it just gives you the ability to group function pointers together with some data
<davidcelis>
python seems about as OO as C
tehgeekmeister [tehgeekmeister!~tehgeekme@sea02-v612-nat.marchex.com] has joined #ruby
<shevy>
I think startling does not want to comment any further :(
<workmad3>
oh, and it manages rewriting something.function_call() into function_call(something) for the self param :)
<shevy>
if MacOS.prefer_64_bit? and not ARGV.include? "--32-bit"
<shevy>
to:
<shevy>
if MacOS.prefer_64_bit? and not ARGV.build_32_bit?
pvh [pvh!u717@gateway/web/irccloud.com/x-rnvenogcxwddiyqv] has joined #ruby
patricksroberts [patricksroberts!u3278@gateway/web/irccloud.com/x-hcpafjamdydrdtpf] has joined #ruby
<shevy>
never seen that with ARGV before :D
<startling>
shevy: whatever dude, not going to get in a pissing contest in an irc channel.
<davidcelis>
shevy: --build-32-bit
<davidcelis>
my guess is the ARG changed to that?
<shevy>
startling pissing contest? these were just statements.
<davidcelis>
instead of --32-bit
<shevy>
dunno davidcelis ... I am trying to find out which one is better
<shevy>
the second one is a bit shorter, so that's a plus in my book right now
<davidcelis>
the latter, for sure
<davidcelis>
definitely more Ruby like
<apeiros_>
it'd be a startling pissing contest…
<davidcelis>
ha
<shevy>
teaches you to not pick certain nicks eh
<shevy>
to chevy
<shevy>
:/
<apeiros_>
and yeah, it'd be pissing against the wind, given that you're not just in an irc channel, but in a ruby channel…
aces1up [aces1up!~aces1up@ip70-173-232-11.lv.lv.cox.net] has joined #ruby
<wmoxam>
eah, lets just argue about with text editor is TEH BEST EVAR instead
<workmad3>
wmoxam: that's no argument
<workmad3>
wmoxam: it's self-evidently vim :P
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
senny [senny!~senny@77-56-67-120.dclient.hispeed.ch] has joined #ruby
<wmoxam>
workmad3: NO, macvim!
* wmoxam
hates your favorite editor
* wmoxam
hates your favorite Linux distro too
<workmad3>
wmoxam: my favourite linux distro is ubuntu... so quite easily hatable :)
alup__ [alup__!~alup@193.92.123.5] has joined #ruby
<davidcelis>
macvim++
<deryl>
reading Well Grounded Rubyists. In it, David is stating that you call Obj.send() with the method name you want to send to that object. However, I;m discovering that appears to be a typo or learning opportunity missed insofar as that if I do Array.send(methods) I get a TypeError. but if i turn methods into a symbol :methods it works as expected. ri Object.send shows the first is a symbol. I take it that symbol should be the method you wish to pass.
<davidcelis>
precompiled vim binary with extras? yes please
looopy [looopy!~looopy@static-71-166-232-207.washdc.east.verizon.net] has joined #ruby
<davidcelis>
deryl: yes, you pass the method name as a symbol
<workmad3>
deryl: method name as symbol or string
<davidcelis>
but mostly symbols
moeSeth [moeSeth!u1029@gateway/web/irccloud.com/x-sxunfnbefjpvgywk] has joined #ruby
<wmoxam>
workmad3: DERPBUNTU
<deryl>
so you would build any methods using .send you should send(:"#{method_param}")
<davidcelis>
deryl: if you're gonna pass method_param, which is probably a string, you can just do Obj.send(method_param)
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
<apeiros_>
drop the :"" part deryl
<apeiros_>
assuming method_param is a string, that'll work just fine.
greenfreq [greenfreq!~greenfreq@173.227.164.18] has joined #ruby
<workmad3>
deryl: it's just a normal method call, so you can pass variables that contain the method name :)
kuranai [kuranai!~kuranai@g231243223.adsl.alicedsl.de] has joined #ruby
<deryl>
ahh cool. thanks for the clarification. var = "methods" ; Array.send(var) got it :)
<workmad3>
deryl: yeah, that's the one :)
<greenfreq>
is there a way to use a variable to define an object attribute? for example an object pkt has an src and a dst attribute pkt.dst or pkt.src what i want to be able to do is read in whether the user wants src or dst and have a single section of code that does pkt.variable rather than an if statement to determine dst or src
<deryl>
I was manually passing Array.send(methods) and getting a type error. Didn't dawn on me Array.send("methods")
wilhelmn [wilhelmn!~textual@abln181.neoplus.adsl.tpnet.pl] has joined #ruby
<shevy>
wait what
<shevy>
what does that mean greenfreq
<shevy>
"use a variable to define an object attribute"
shadoi [shadoi!~Adium@2001:5a8:4:68e1:613c:4a53:1955:d8e8] has joined #ruby
celestius [celestius!~celestius@173-228-44-97.dsl.static.sonic.net] has joined #ruby
<shevy>
.dst and .src sounds as if you want accessor methods like davidcelis wrote, so you can use attr_accessor :src, :dst and inside your class ensure that it has proper values when you want to query it
<celestius>
quick q - what's that idiom to check if the current source file was invoked from the command line as an executable?
<shevy>
not sure about the executable part
semperos [semperos!~semperos@50-78-71-53-static.hfc.comcastbusiness.net] has joined #ruby
<shevy>
but the rest of the question can be answered with "if __FILE__ == $PROGRAM_NAME"
<semperos>
currently in a contained env, proof-of-concept coding, in a situation where cert's are known to be faulty
<semperos>
(out of my control)
srid [srid!u3297@gateway/web/irccloud.com/x-iibiazbbdtdocpad] has joined #ruby
<semperos>
but thanks for the pointer
<shevy>
a dangerous environment
Smile_BoY [Smile_BoY!~Arseny@178.46.118.38] has joined #ruby
startling [startling!~startling@c-24-15-86-181.hsd1.il.comcast.net] has quit [#ruby]
<greenfreq>
shevy, davidcelis: I am using Pcap::Capture and src and dst are the attributes created when a pcap file is parsed. so that... cap.loop do |pkt| creates a pkt object for each packet in the file
<davidcelis>
yeah man i don't follow what you're trying to do at all
<davidcelis>
i have no idea what the hell your pcaps, caps, or pkts are
<greenfreq>
shevy, davidcelis: this lets me do pkt.src to see the source ip and dst for destination.
<shevy>
hehe
<shevy>
can't you just abstract or generalize the question
<greenfreq>
ok cap is an object created of the capture file, pkt is a object of a packet within cap
<greenfreq>
shevy
<davidcelis>
if you need the Packet object to have attributes, then you need to do what shevy and I said earlier
<greenfreq>
ill try..
<davidcelis>
use attr_accessor
<davidcelis>
in your Packet class
<shevy>
abstract to the point where your objects do not have any names anymore :)
<davidcelis>
but please don't use foo or bar either..
<shevy>
pcaps caps pkts trsc okg is confusing me
<davidcelis>
(those are fucking terrible variable names, by the way)
<shevy>
how about
<davidcelis>
you dont need to abbreviate "packet" to "pkt"
<shevy>
foo1 foo2 foo3
<shevy>
:)
<davidcelis>
just call the variable "packet"
<davidcelis>
ruby is about readability
<greenfreq>
animal object with attributes of head tail and feet. user needs to pick one of them. currently i have to duplicate the same code over and over with if statements for which the user asks for. animal.feet animal.tail animal.head what i want to do is animal.variable where variable is the users choice
peterhil [peterhil!~peterhil@xdsl-77-86-196-131.nebulazone.fi] has joined #ruby
t-mart [t-mart!~t-mart@c-174-49-68-22.hsd1.ga.comcast.net] has joined #ruby
<workmad3>
shevy: all your variables should be in one array called 'v' and accessed my index
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
<shevy>
hmm
<davidcelis>
animal.send(variable)
semperos [semperos!~semperos@50-78-71-53-static.hfc.comcastbusiness.net] has quit ["Killed buffer"]
<shevy>
and the users choice can be limited? or can it be anything
Smile_BoY [Smile_BoY!~Arseny@178.46.118.38] has quit ["Ухожу я от вас (xchat 2.4.5 или старше)"]
<shevy>
but anyway, that sounds just like any other method
<shevy>
so make a "def variable" method and inside, determine how to continue
<greenfreq>
shevy the users choice is limited to what is available within the Pcap::Capture
<shevy>
odd name of method though
<workmad3>
greenfreq: you want dynamic dispatch
Codif [Codif!~codif@84.120.204.160.dyn.user.ono.com] has joined #ruby
<workmad3>
greenfreq: which is davidcelis's solution ;)
<davidcelis>
greenfreq: do pkt.send(variable)
<davidcelis>
if variable is a string or symbol, and pkt responds to that method, it will return what you want
nonotza [nonotza!~nonotza@66.246.94.130] has joined #ruby
<greenfreq>
davidcelis: ok.. let me try that out.. thanks for the patience
ferbass [ferbass!~ferbass@177.35.204.136] has joined #ruby
<davidcelis>
no problem BRO
rethaw [rethaw!~textual@c-98-234-116-174.hsd1.ca.comcast.net] has joined #ruby
GSpotAssassin [GSpotAssassin!u4086@gateway/web/irccloud.com/x-bxearutldtmlbafj] has joined #ruby
stephans [stephans!~stephans@209.66.114.6] has joined #ruby
daniel_hinojosa [daniel_hinojosa!~danno@67-0-103-21.albq.qwest.net] has joined #ruby
yekta [yekta!~yekta@c-24-1-182-219.hsd1.il.comcast.net] has joined #ruby
<linduxed>
davidcelis: well don't judge python by my code :-P
CoverSlide [CoverSlide!~richard@216.2.249.50] has joined #ruby
<linduxed>
oh shit... responding to hour old comment :-/
<davidcelis>
but your python looks like most python i've seen
<davidcelis>
lol
<linduxed>
good thing to go to the bottom of the page
<linduxed>
davidcelis: hahaa
<canton7>
my two cents: I just spent half a year on a large python project. I like it, but wouldn't choose it over ruby
<linduxed>
davidcelis: well... maybe python is dominated by newbies?
<linduxed>
haha
<workmad3>
linduxed: heh :) and python needs to be judged by someone's code, so why not yours? :)
<linduxed>
workmad3: because i'm shit at coding and willing to admit it?
<linduxed>
:-)
<workmad3>
canton7: I'd choose perl over python personally :P
<davidcelis>
I'd choose Scheme over Python
<linduxed>
i'm the kind of guy who realizes that the sole thing i can amount to is to make stuff run
gheegh [gheegh!~wflanagan@pool-71-191-146-170.washdc.fios.verizon.net] has joined #ruby
<linduxed>
i know the different paradigms... but I can't honestly say i've mastered any one of them
<workmad3>
linduxed: getting stuff to run is an important skill
<deryl>
its all junk until it runs :)
<deryl>
then its useful!
skim1776 [skim1776!~sergey@95.56.98.124] has joined #ruby
<linduxed>
workmad3: well... there's a difference between making a meal and achievieving edible guck
<workmad3>
deryl: I dunno... some of it is still junk even when it's running
<linduxed>
*achieving
<deryl>
workmad3: i didn't attach a degree of usefulness :)
<deryl>
i reserved that for the general public :)
<workmad3>
linduxed: I've known plenty of coders that given all the ingredients could only make a mess
<linduxed>
workmad3: well as long as they can admit that then that's fine
<workmad3>
linduxed: so I live by the maxim that first you make it work, then you make it good... and making it work is the more important :)
<linduxed>
i'm one of those
<workmad3>
linduxed: like hell they could admit it :P
kapowaz [kapowaz!u546@gateway/web/irccloud.com/x-ildhwpsycpuzorwy] has joined #ruby
<linduxed>
workmad3: admitting one's shit is the first step they say
<linduxed>
i just can't take the next step
<workmad3>
linduxed: if they could admit it, they'd never touch an IDE again :)
<davidcelis>
There was a CS minor that was in a bunch of classes with me while I was still in college... The program was small (and the school was small) so she was in practically all of my CS courses
<davidcelis>
she just
<workmad3>
linduxed: ah, paraphrasing good old socrates... 'the first step to wisdom is knowing that you know nothing'
<davidcelis>
could not wrap her head around
SeanTAllen [SeanTAllen!u4855@gateway/web/irccloud.com/x-egqnrnhptbghcvxa] has joined #ruby
orangejuice [orangejuice!~orangejui@66.96.251.117] has joined #ruby
<davidcelis>
the most basic conventions
<davidcelis>
like indentation and not using poor variable names
<soycamo>
workmad3 isn't that lao tzu?
llaskin [llaskin!~Leo@c-24-128-198-93.hsd1.ma.comcast.net] has quit [#ruby]
<davidcelis>
looking at her code was just the worst
<workmad3>
soycamo: hmm... I've always seen it attributed to socrates
<soycamo>
time to get into the investigawagon!
<linduxed>
socrates said "i know that i know nothing"
srid [srid!u3297@gateway/web/irccloud.com/x-iibiazbbdtdocpad] has quit [#ruby]
<linduxed>
or something to that effect
<linduxed>
so yeah, that's probably socrates you're talking about
<workmad3>
linduxed: if you ever want a confidence boost, read some of 'The Daily WTF' ;)
<deryl>
davidcelis: mine is a messy pile of "these instructions do what I set out to. Pretty Be Damned" code
<soycamo>
rather, plato quoted socrates saying that
moshee [moshee!~moshee@c-50-135-229-127.hsd1.wa.comcast.net] has joined #ruby
moshee [moshee!~moshee@unaffiliated/moshee] has joined #ruby
<linduxed>
workmad3: i clean up their RSS
<linduxed>
workmad3: as soon as there's a new one, i'm reading it :-)
<linduxed>
except for the Error'd articles, those tend to be pretty boring
<linduxed>
or well... articles is a lot to be said
<linduxed>
bunch of pictures
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby
<workmad3>
soycamo: I take it as read that when I say 'said by socrates' I mean 'quoted by plato and attributed to socrates' :P
<workmad3>
linduxed: I quite like the error'd pics :)
<linduxed>
CodeSOD are what I love the most
Jakee` [Jakee`!~Jakee`@5ad317fe.bb.sky.com] has joined #ruby
dch4pm4n [dch4pm4n!~d@gateway/tor-sasl/dchapman1988] has joined #ruby
machuga [machuga!~machuga@pool-72-64-157-228.tampfl.fios.verizon.net] has quit [#ruby]
<greenfreq>
davidcelis: you da man... http://pastie.org/3120450 to give you an idea of what i was trying to do
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
CoverSlide [CoverSlide!~richard@216.2.249.50] has joined #ruby
skim1776 [skim1776!~sergey@95.56.98.124] has quit [#ruby]
tvo [tvo!~tvo@katapult/developer/tvo] has joined #ruby
jbpros [jbpros!~jbpros@54-178-112-217.dyn.adsl.belcenter.be] has joined #ruby
ikaros [ikaros!~ikaros@dslb-188-107-221-154.pools.arcor-ip.net] has joined #ruby
wilhelmn [wilhelmn!~textual@aaht210.neoplus.adsl.tpnet.pl] has joined #ruby
dkannan [dkannan!u480@gateway/web/irccloud.com/x-qpcrhrvxubfydlet] has joined #ruby
<canton7>
greenfreq, I got bored, and tidied that last loop up a little. it's only a suggestion http://pastie.org/3120514
<canton7>
ah, actually that won't work with the inject like that... gimme a sec
quest88_ [quest88_!~quest88@ppp-70-254-37-241.dsl.lgvwtx.swbell.net] has joined #ruby
quest88_ [quest88_!~quest88@70.42.255.242] has joined #ruby
eywu [eywu!~Adium@205-170-107-4.dia.static.qwest.net] has joined #ruby
<canton7>
there, edited
syamajala [syamajala!~syamajala@c-75-68-106-118.hsd1.ma.comcast.net] has joined #ruby
dyer [dyer!~dyer@108-193-172-174.lightspeed.tukrga.sbcglobal.net] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
cousine [cousine!~cousine@196.221.242.180] has joined #ruby
toy_battery [toy_battery!~choldbroo@216.101.134.191] has joined #ruby
zalesz [zalesz!~zalesz@user-164-127-71-218.play-internet.pl] has joined #ruby
<toy_battery>
anyone there?
<toy_battery>
i was hoping someone could help me with a class design question
freelanceful [freelanceful!~jamesfend@c-71-228-225-167.hsd1.tn.comcast.net] has joined #ruby
<apeiros_>
your chances will increase by asking an actual question
<freelanceful>
How would you all tackle this? A worker has 40 credits per month. A credit is used when they join a discussion for a project. The credits automatically renew every 30 days.
<toy_battery>
ok
nanderoo [nanderoo!~nanders@38.124.137.226] has quit [#ruby]
<toy_battery>
i'm working on a simple library that builds vim colorschemes
<toy_battery>
the object that represents the 'highlight' in vim takes specific arguments
<toy_battery>
should i use attr_accessor for that many attribs though?
<apeiros_>
about how many are we talking?
quest88 [quest88!~quest88@ppp-70-254-37-241.dsl.lgvwtx.swbell.net] has joined #ruby
<apeiros_>
(I'm not a vim user)
<shevy>
3
<apeiros_>
shevy: I think the 'etc' meant there are more than the 3 he mentioned
<toy_battery>
11
<apeiros_>
I think that's still in order
quest88 [quest88!~quest88@70.42.255.242] has joined #ruby
<apeiros_>
you may think of ways to nicer represent it later
<toy_battery>
yeah that's what i was thinking
<apeiros_>
but for now, I don't think 11 is a killer-amount
<toy_battery>
i've got all the valid args in some constants
<apeiros_>
freelanceful: was that supposed to be a question?
sobering [sobering!~Adium@iphost-64-56-142-213.wpg.wiband.net] has quit [#ruby]
<freelanceful>
yes.. just wondering how one would try to create a feature like that
<toy_battery>
and i thought about doing something like class Highlight < Struct.new(*VALID_ARGS)
<toy_battery>
but that doesn't feel nice
linusoleander [linusoleander!~linus@h62n3c1o1042.bredband.skanova.com] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
<apeiros_>
freelanceful: it's a bit too broad of a question to answer. but sure, I can answer it in the same breadth: I'd tackle it using my superior math and ruby skills.
<toy_battery>
i also thought about using class_eval to loop throught the valid arguements assigning attr_accesor that way
<toy_battery>
but eh i dunno
<apeiros_>
toy_battery: heh, yeah, I do that at times
indeterminate [indeterminate!~sei@user-3c2h3m6.cable.mindspring.com] has joined #ruby
Avi` [Avi`!~mine@unaffiliated/avi/x-8629955] has joined #ruby
<apeiros_>
toy_battery: well, attr_accessor *VALID_ARGS will work
<apeiros_>
attr_accessor is a method too, after all… and it accepts multiple names as args.
<toy_battery>
oh man, i can't believe i didn't think of that
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
<apeiros_>
also `attr_names.each do |name| attr_accessor name end` would work
<toy_battery>
is that ok todo or what?
<apeiros_>
sure
<apeiros_>
the only bothering thing about such techniques is that it's a bit bothersome to document
logic [logic!~logic@41.205.169.144] has joined #ruby
logic [logic!~logic@unaffiliated/bitch333z] has joined #ruby
<toy_battery>
well that's not too huge
<toy_battery>
i just wanna make sure the code i'm writing is clean and makes sense
zerdman [zerdman!~mbk@71.255.123.66] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
<brownies>
is there a simple way to get capybara's matchers to do a regex instead of a pure string?
<brownies>
or, really, i just need case-insensitive matching for has_content
<greenfreq>
canton7: why do you choose .each over .loop?
ferbass [ferbass!~ferbass@177.35.204.136] has joined #ruby
zerdman [zerdman!~mbk@71.255.123.66] has quit [#ruby]
<canton7>
greenfreq, each is part of Enumerable, whereas loop is not, so the function of the code was more obvious to me if each is used
<apeiros_>
canton7: each_with_object instead of inject…
<canton7>
that was unclear... because #each is part of Enumerable, you see it around a lot -- if someone's iterating over an array, you almost always see #each used. #loop seems to be pcap-specific, and so didn't carry nearly as much meaning. I had to check the docs to be sure of what it did
paissad [paissad!~paissad@89-92-16-151.hfc.dyn.abo.bbox.fr] has joined #ruby
t34ew [t34ew!~thomas@e180090232.adsl.alicedsl.de] has joined #ruby
geaif [geaif!~geaif@AToulouse-554-1-40-57.w92-149.abo.wanadoo.fr] has joined #ruby
<ReinH>
canton7: #each is not a part of Enumerable
<davidcelis>
the fuck is #loop
<t34ew>
hi
<canton7>
apeiros_, never spotted that one, thanks!
<ReinH>
#each is the *basis method* for Enumerable
<ReinH>
i.e. all methods in Enumerable are based on #each
<canton7>
ReinH, my bad. Enumerable relies on #each, though?
<apeiros_>
I'd probably write a proper class for the IPs collection, something like an IPSet… could probably be really short (only << & each)
<canton7>
So you'll always see #each where Enumerable is mixed in
<yekta>
Is there a simpler way to write: conditions.nil? ? false : conditions
<t34ew>
i have a problem qit qtruby: i use QGraphicsScene addPixmap. it returns a QGraphicsPixmapItem. when i want to call its setOffset method, i get a method_missing error
<davidcelis>
yekta: conditions?
<apeiros_>
yekta: is false and nil considered to be a different case there?
<ReinH>
i.e. why do you care about coercing nil to false? Ruby doesn't.
<canton7>
davidcelis, #loop is a rubypcap Capture method. It does the same as #each
<yekta>
apeiros_: yes
<apeiros_>
conditions || false
<t34ew>
where to get qtruby help?
<yekta>
apeiros_: I like that
<apeiros_>
I concur with the others that I'd not try to make a difference
<apeiros_>
slippery slope
<yekta>
thank you
<apeiros_>
yw
<davidcelis>
canton7: what's the point
* tnk1
is back.
<canton7>
davidcelis, some snippet of code from much earlier. I tinkered with it, and changed a #loop to #each. Then the question of why I had made the change arose...
<davidcelis>
ah
<canton7>
and that lead into Enumerable, etc...
<greenfreq>
davidcelis: he took the code i showed you with the change you suggested and made the loop more concise and used each instead of loop and i asked why
Carmivore [Carmivore!~carmivmor@ec2-50-16-157-158.compute-1.amazonaws.com] has joined #ruby
wkdown [wkdown!~Adium@63.146.80.82] has joined #ruby
peterhil [peterhil!~peterhil@xdsl-77-86-196-131.nebulazone.fi] has joined #ruby
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby
<wkdown>
would someone starting to learn Ruby be shooting them in the foot professionally if they did not learn Rails, but a different framework?
<wkdown>
themselves*
<jensn>
If you know one well, you can pick another up quickly.
<wkdown>
I'm still new to it, but it seems ActiveRecord is much different than, say, DataMapper
<canton7>
sinatra is used a lot, from what I can gather
azbarcea___ [azbarcea___!~quassel@79.114.90.211] has joined #ruby
<wkdown>
but I may be wrong
<jensn>
If you just want a checkbox on your CV, then you should pick rails. But otherwise it doesn't really matter.
<wkdown>
Sinatra is exactly the one I have been looking into
<jensn>
It is mostly API differences.
<jensn>
The theory is mostly the same.
<wkdown>
ok good to know
<canton7>
the difference between sinatra and rails is, in my slightly limited experience, colossal
<wkdown>
what are the colossal differences (a few)
<jensn>
Rails includes a lot of stuff, Sinatra doesn't.
<canton7>
rails tries to do everything for you: if you know how to use it (steep learning curve), and want to do something which it knows how to do, you can do a lot with very little work. Sinatra is more about giving you some support, but letting you tackle things your own way
<shevy>
Rails is so big that it could be its own language
<canton7>
I had some major fights with rails trying to make it do things it didn't want to do
<davidcelis>
Isn't Sinatra pretty much only the webserver?
twock [twock!~twock@rrcs-24-227-222-61.sw.biz.rr.com] has joined #ruby
<canton7>
it's a DSL built on top of rack
rsenk330 [rsenk330!~Adium@108-81-12-178.lightspeed.milwwi.sbcglobal.net] has joined #ruby
<canton7>
so it'll run on top of <your favourite webserver>, and gives you some nice help with routing, templating, etc
<wkdown>
it = Rails, u mean
CannedCorn [CannedCorn!~textual@74.113.160.178] has joined #ruby
<canton7>
sorry, I was referring to sinatra there
<wkdown>
ok
<canton7>
with rails, for example, you put your controllers, with such-and-such a structure, into such-a-such a file in some specific folder. rails will make sure the right controller's method will be called at the right time
<canton7>
with sinatra, you structure your app however you like, and define your routes manually. Better for small stuff, less good for massive stuff
\logic [\logic!~logic@unaffiliated/bitch333z] has joined #ruby
<canton7>
monk exists, and provides common setups and structures for sinatra
<canton7>
there's also padrino, which is an MVC framework built on top of sinatra
Wilhelm_ [Wilhelm_!~textual@ably241.neoplus.adsl.tpnet.pl] has joined #ruby
<wkdown>
this may be a bad metaphor, but Rails is like Windows (pre-configured for most every user to easily use) and Sinatra is like a flavor of *nix (sparse but powerful, for those that know what they want to do with it)
<wkdown>
looking up Monk and PAdrino now
<canton7>
to add to that: when you want to change some random setting in windows, it can be an absolute nightmare, and you end up with hacky workarounds
<canton7>
however, I'd say the learning curve to usign sinatra is much smaller than rails, which doesn't fit the metaphor
<wkdown>
same for Rails?
eywu [eywu!~Adium@205-170-107-4.dia.static.qwest.net] has joined #ruby
<canton7>
same for rails, imo
<wkdown>
things to consider, definitely
achiu [achiu!~Adium@216.174.109.254] has joined #ruby
<wkdown>
forgive another n00b question, but what is DSL (if not Digital Subscriber Line)?
<wkdown>
dynamic source library?
<wkdown>
domain specific language
<wkdown>
found it, sorry
emacsen [emacsen!~serge@pool-71-163-31-64.washdc.fios.verizon.net] has joined #ruby
<emacsen>
In ActiveRecord, can I have a model which has_one and also has_many of the same model?
SterNiX [SterNiX!~LessIsMor@unaffiliated/nu253r/x-0655220] has joined #ruby
charlenopires [charlenopires!~quassel@186.194.13.186] has joined #ruby
Locke23rus [Locke23rus!~quassel@128-70-109-104.broadband.corbina.ru] has joined #ruby
milkpost_ [milkpost_!~dec@38.108.146.145] has joined #ruby
<davidcelis>
lol what
<davidcelis>
why?
<apeiros_>
emacsen: sure. but #rubyonrails
s_much [s_much!~butt_hurt@c-68-36-123-133.hsd1.nj.comcast.net] has joined #ruby
<emacsen>
davidcelis, I want to maintain several versions of an object, but one "current" version
<davidcelis>
so you can have object.related_object, and object.related_objects ?
<emacsen>
apeiros_, I'm not using rails :)
<davidcelis>
ahh.
<davidcelis>
ActiveRecord is part of rails, though, so it really does belong there
<apeiros_>
emacsen: still, AR is mainly an AR domain and #rubyonrails is the proper channel for AR questions.
adeponte [adeponte!~adeponte@pool-173-51-131-197.lsanca.fios.verizon.net] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@67.139.75.158] has joined #ruby
luxurymo_ [luxurymo_!~luxurymod@rrcs-184-75-21-21.nyc.biz.rr.com] has joined #ruby
tesmar [tesmar!~tesmar@rrcs-70-62-109-131.midsouth.biz.rr.com] has joined #ruby
luxurymo_ [luxurymo_!~luxurymod@rrcs-184-75-21-21.nyc.biz.rr.com] has joined #ruby
mib_mib [mib_mib!4b46aa90@gateway/web/freenode/ip.75.70.170.144] has joined #ruby
Wilhelm_ [Wilhelm_!~textual@bou209.neoplus.adsl.tpnet.pl] has joined #ruby
drewrm [drewrm!~user@nbncom1.lnk.telstra.net] has joined #ruby
<mib_mib>
hi guys, i'm starting using ec2, wanted to know why people normally use chef + stock ami instead of preinstalling everything on an AMI and then just booting it straight
chrisja [chrisja!~chris@5ac7d92c.bb.sky.com] has quit [#ruby]
GreaseMonkey [GreaseMonkey!~gm@unaffiliated/greasemonkey] has joined #ruby
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
tcurdt [tcurdt!~tcurdt@dslb-188-097-009-235.pools.arcor-ip.net] has joined #ruby
axl_ [axl_!~axl@75-149-152-225-Minnesota.hfc.comcastbusiness.net] has joined #ruby
<shevy>
v0n it seems I usually use Object.const_get
hSATAC [hSATAC!~cat@221.169.252.14] has joined #ruby
frogstarr78 [frogstarr78!~frogstarr@lan.viviotech.net] has joined #ruby
eignerchris [eignerchris!~eignerchr@c-24-20-239-11.hsd1.or.comcast.net] has joined #ruby
jensn_ [jensn_!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby
axl__ [axl__!~axl@75-149-152-225-Minnesota.hfc.comcastbusiness.net] has joined #ruby
jblack [jblack!~jblack@65.242.101.42] has joined #ruby
<jblack>
Hello, I'm not much of a ruby user myself, but I administrate systems for those that are. I'm trying to get a ruby gem called cijoe, which is up to 0.92, installed, but the most recent version that I can get gem to see is 0.8.1
geaif [geaif!~geaif@AToulouse-554-1-40-57.w92-149.abo.wanadoo.fr] has joined #ruby
<jblack>
could you gentlemen recommend a couple signpost docs that I can use to figure gem out enough to detangle this apparent verion dependancy problem?
zulax [zulax!~radarwork@99-120-232-161.lightspeed.iplsin.sbcglobal.net] has joined #ruby
trivol [trivol!~aurelien@ip-178.net-89-2-84.rev.numericable.fr] has joined #ruby
Jay_Levitt [Jay_Levitt!~Jay_Levit@c-24-63-250-125.hsd1.ma.comcast.net] has joined #ruby
<oddmunds>
i guess it depends on how much you want to make an android app
<shevy>
nilspetter, you can go into GUI stuff with ruby-gtk or ruby-qt. for any given problem where you use a programming language to solve something, you can use ruby
<nilspetter>
moderately. but i can't think of much else to program other than apps and web... what else is there?
evilgeenius [evilgeenius!5e093561@gateway/web/freenode/ip.94.9.53.97] has joined #ruby
<oddmunds>
haha
<evilgeenius>
I have received the characters "O \005 i }" from an SMS service when I should have receieved the characters "ó é, í ñ". Does anyone know how I can convert the what I've recieved into what I need? I guess it's something to do with character encoding.
<shevy>
you take a problem
<shevy>
you write a script to solve that problem
<shevy>
that is it nilspetter
<Amnesia_>
anyone..:)?
<shevy>
apps and web just have the constrained of usually "have to work in a web browser"
<shevy>
*constraint
<oddmunds>
nilspetter: i make programs that plays music through my keyboard
<oddmunds>
i make games
<shevy>
nilspetter every time you have a manual task anywhere, you use ruby to automate it
<nilspetter>
make games? in ruby? is that convenient to do with ruby? what do you use for it? rubygame?
<shevy>
every game has game logic
<shevy>
you write that in ruby
<shevy>
I dunno what you mean with "convenient", what other language do you want to use
mdel_ [mdel_!~mdel@pool-71-175-17-16.phlapa.fios.verizon.net] has joined #ruby
<nilspetter>
shevy: hehe. yea. that's nice. do you mean stuff that has to do with organizing files on your machine and stuff like that?
<shevy>
is C more convenient than ruby? perl? php?
<workmad3>
shevy: I dunno... some games seem to completely lack logic :P
<shevy>
you can organize things however you want to
<shevy>
I mean
<shevy>
what does ruby have to do with how you organize files on your machine :)
<Amnesia_>
shadoi: oi:)
<shevy>
ah
<shevy>
I guess you mean to automatically move or rename them etc..
<shevy>
you can do that in pretty every programming language
<shevy>
perhaps not prolog
<nilspetter>
shevy, idk. you said: every manual task you automate with ruby. what kind of tasks do you mean? :)
<shevy>
nilspetter, example, configure/make/make install. I do that a lot on the shell. But I use ruby scripts to automate it
<shevy>
*at the shell
cjlicata [cjlicata!~carlyle@rrcs-96-10-255-203.midsouth.biz.rr.com] has joined #ruby
<oddmunds>
nilspetter: i did not use any game libs like rubygame
quest88_ [quest88_!~quest88@ppp-70-254-37-241.dsl.lgvwtx.swbell.net] has joined #ruby
geaif [geaif!~geaif@AToulouse-554-1-40-57.w92-149.abo.wanadoo.fr] has joined #ruby
<deryl>
if you can think a computerized problem's process through from beginning to end, you can probably write it in ruby. (can even link into Tcl/Tk or other languages if you wanted to write a GUI in something else (for example))
<Amnesia_>
does anyone over here know
<shevy>
oddmunds made any finished games? :)
<Amnesia_>
how I could write some value to a specified memory location?
<oddmunds>
sort of
<shevy>
not in plain ruby
<nilspetter>
shevy: you mentioned using ruby for games, game logic in particular. does that mean you have some engine underneath (written in C or something) that specifically supports ruby? or ... how do you go about embedding ruby to it? (sorry for being ignorant btw :P )
<shevy>
you can perhaps use FFI or ... dl or what not Amnesia_
<Amnesia_>
FFI,dl :)?
<oddmunds>
it's terminal game, which probably disappoints most of you
<shevy>
Amnesia_ why do you make a ',' there :(
conickal [conickal!~Adium@67.218.117.238] has joined #ruby
<banisterfiend>
Amnesia_: use ruby_inline
<Amnesia_>
cause I thought it were 2 different things?
<shevy>
nilspetter dunno, havent had the need to embed ruby yet. there was a C++ game that used ruby
<banisterfiend>
Amnesia_: RubyInline
<shevy>
Amnesia_ yeah
pootpoot [pootpoot!~pootpoot@38.108.250.130] has quit [#ruby]
<deryl>
oddmunds: when i was a kid i wrote a role playing game that was totally console called Dungeons Of The Gods.
<deryl>
doesn't disappoint me at least
peterhil [peterhil!~peterhil@xdsl-77-86-196-131.nebulazone.fi] has joined #ruby
<workmad3>
nilspetter: you can easily write a game using just ruby, or you could probably embed an interpreter in another language and use ruby for scripting
<shevy>
deryl where is the code!
<deryl>
shevy: lost to the antiquities of time
<shevy>
:(
<Amnesia_>
banisterfiend: hm there's no way using only stdlib just like perl?
<banisterfiend>
Amnesia_: to dereference a pointer? perl allows you to dereference a pointer in stdlib?
<banisterfiend>
that's stupid
<banisterfiend>
really stupid
<banisterfiend>
that means regular perl apps could segfault
<oddmunds>
i'm actually in the process of making a roguelike, and i took what i have in mye engine so far (not much) and made a tiny game out of it. i spent only six hours on it, which might not sound very impressive, but i'm pleased with it.
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
<oddmunds>
you can try it by ssh-ing to topolov.weknowwhatboyslike.com (username and password: santa)
<oddmunds>
i made it as an 1drl (1-day roguelike), so even though i ought to iron out some major, but easily fixable bugs, i haven't. :P
<nilspetter>
shevy, what I'm trying to figure is where I can use my ruby. i want to program something. but it seems ruby isn't used much. like: android use Java. game development use C/C#/C++. are there any "big" companies that use ruby? (besides rails'ing) :P
<Amnesia_>
sorry for wasting your time:/
<shevy>
oddmunds you on github?
<any-key>
nilspetter: plenty do, I don't have a list in front of me
<shevy>
nilspetter the question is odd. what about python?
<shevy>
because if you can use python, you can use ruby
<oddmunds>
(almost, i've made some minor adjustments to the live version not present in the repo)
aroop [aroop!~aroop@67.139.104.203] has joined #ruby
<Amnesia_>
shevy: hm well I keep mixing stuff up
tehgeekmeister [tehgeekmeister!~tehgeekme@sea02-v612-nat.marchex.com] has joined #ruby
<nilspetter>
same problem there i guess.. except that it's used somewhat more frequent than ruby; thus being more "useful"...?
apok [apok!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
<any-key>
nilspetter: you can use ruby for doing any number of things...I built a VPS hosting service with it once
<shevy>
lol "Cave Christmas"
<any-key>
nilspetter: popularity is not a complete indication of usefulness
<shevy>
oddmunds, it's a lot of work to really make a "finished" game without bugs :(
<oddmunds>
yes, aim low like me!
<shevy>
haha
<oddmunds>
unless you're an experienced game maker you can't really aim too low.
<shevy>
first game I tried, I kept on adding features and added more and more over time. until one day I got tired of it
<deryl>
lol
<oddmunds>
this game was perfect in scope for me at this point.
<any-key>
nilspetter: you can do practically anything in ruby, it's extraordinarily useful
<shevy>
and then it started to bit-rot ...
<nilspetter>
any-key: in my sense of the word: it is. because if something use ruby, e.g. i Photoshop did, then ruby could be used for that...
<any-key>
you're putting too much emphasis on who uses it over what it can do
<shevy>
one language to rule them all
<workmad3>
nilspetter: so what you're really asking is 'what applications have ruby embedded' or is it 'what has been created with ruby'?
<shevy>
though at this point it may be better for nilspetter to just pick *ANY*
<deryl>
so i take it his case is that ruby isn't popular enough outside of rails to be worthwhile to learn because taht popularity (or supposed lack thereof) is the determining factor of its usefulness. did i understand him correctly?
<any-key>
it's a scripting language, it's not well-suited for writing desktop applications (neither are any others)
<nilspetter>
any-key: I really do love it, i just need to find something purposeful to do with it except outputting random stuff in a console window
<any-key>
I built a VPS hosting service for a project with virtualbox and ruby
strife25 [strife25!~strife25@cpe-098-026-018-050.nc.res.rr.com] has joined #ruby
<any-key>
split across 10 servers
<workmad3>
nilspetter: web-apps, sysadmin, config management, general scripting, games...
<any-key>
it was fun
<shevy>
what is bad without outputting stuff into a console
<oddmunds>
nilspetter: maybe programming is not for you
<workmad3>
shevy: nothing, as long as the stuff is important
<shevy>
I use ruby to test exam questions for me. when I correctly answered, the result is saved, then I move to new things, repeat and learn
<deryl>
there are gems out there that cover all sorts of areas from network traffic monitoring, to backups, to email mangement, to system administration, to web app;lications, to web services.
<any-key>
nilspetter: what's something you'd like to work on?
<nilspetter>
oddsmunds: doubtful. i've been doing it since i was 12 (I'm 22 now)
<deryl>
find a problem in your existing chain of work and apply ruby to solve it
<any-key>
what interests you?
<oddmunds>
nilspetter: and still you can't see the potential in ruby?
<any-key>
we can help you solve it with ruby
<shevy>
perhaps nilspetter lacks imagination
tomzx [tomzx!~tomzx@dsl-216-221-39-59.aei.ca] has joined #ruby
<any-key>
just go fuck around with ruby, it's fun
<workmad3>
shevy: does it occasionally throw you back a question you have already answered to test your knowledge retention? :)
<any-key>
what do you have to lose?
<shevy>
nilspetter, here is what helped me. I have some interesting things, projects, which I continue to try to grow over time (and make better)
<workmad3>
nilspetter: 12? bit of a late starter :P
<shevy>
workmad3, well... sometimes I reset it a little, so that it asks things which I already know again.
<shevy>
but my great goal is to write a program that writes ruby for me anyway
<workmad3>
shevy: you manually reset it? bah, automate it! :)
<any-key>
it's kind of silly to walk in here and expect us to convince him to use ruby when he has no idea what he wants to accomplish
<oddmunds>
nilspetter: there is one project i'd love for someone to make. i want a terminal email client that has total two-way sync with gmail.
<nilspetter>
any-key: fucking around. yea. i know it's fun. i've been doing it for a while. the problem is to find something that's actually Constructive to do with it. like, something someone would hire someone to do
<nilspetter>
:P
<oddmunds>
for all i care it could be gmail-only. a gmail-client.
<any-key>
nilspetter: what are you interested in?
<shevy>
"Constructive"
<any-key>
just throw out a few topics
<any-key>
we can come up with project ideas
<robyurkowski>
nilspetter: the problem is imagination, clearly, rather than actual functionality
<shevy>
I really dont get it. if ruby scripts help you solve a task, then that is constructive in my book
<robyurkowski>
you don't try to think of a problem
<robyurkowski>
you find a problem, and you try to find a solution
<Avi`>
yeah
<Avi`>
you HAVE problems
<any-key>
we all do
<shevy>
oh
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
<shevy>
I get it
<nilspetter>
haha
<shevy>
nilspetter lives a life without problems
<oddmunds>
nilspetter: do the other languages you know present instant projects?
<Avi`>
must be nice ;)
<robyurkowski>
my first 'serious' problem was duplication of my mp3s by itunes
<shevy>
hehe
<shevy>
oh
<robyurkowski>
find something that is minorly annoying and fix it
<Avi`>
whenever i learna new language or toolkit, i start to see my problems as 'i could solve it THIS way with that new language/toolkit'
<Avi`>
instead of like 'what are some problems i could solve, gosh..'
<any-key>
writing web apps is fun
<robyurkowski>
ruby is nothing more a hammer in a toolbox, sitting beside python, the drain snake
<any-key>
even without rails
<workmad3>
robyurkowski: yeah, that really annoyed me too... I doubt my 'solution' was the same as yours though ;)
<shevy>
I use ruby to handle ffmpeg-conversions. I cant remember the commandline options, so I wrote up something that translates how my brain thinks, into ffmpeg.
<Okasu>
mine was using google translate from CLI
<shevy>
ruby is my glue for everything
<robyurkowski>
haha
<nilspetter>
i guess not... however, I know languages like java are asked for in an infinite number of jobs. obviously it's very useful. except for web/rails, where else is ruby asked for in a job type of context?
<any-key>
I glued my fingers together with ruby :(
norex [norex!~quassel@41-135-90-67.dsl.mweb.co.za] has joined #ruby
<Avi`>
i forgot i had a ruby script that i used to manage interactions with a bunch of command line stuff
<Avi`>
to talk to attached devices for me
<robyurkowski>
nilspetter: it's asked for in places where you don't have 10 levels of management.
<any-key>
nilspetter: I worked for a company that made networking appliances which used ruby extensively
<Avi`>
nilspetter: i use ruby in my job...
<any-key>
especially for testing
<Avi`>
daily
<any-key>
not just rails development
RomD`` [RomD``!~Roman@nrbg-4d0774f1.pool.mediaWays.net] has joined #ruby
<robyurkowski>
me too
<oddmunds>
nilspetter: for work in ruby there's mostly rais jobs. but ruby will fix the thousands of small problems you'll face in any job.
<robyurkowski>
as a sysadmin, too, i use ruby like effing glue
<any-key>
it's a scripting language, that's what they do
<shevy>
see, ruby is really just the better perl
<Avi`>
and im not a web coder or whatever
<shevy>
and when a bank needs an app in java, then obviously it did not want to have it in perl. or ruby. or python
<any-key>
nilspetter: what's a topic in computer science that interests you?
<nilspetter>
hmm.. all good answers btw. thanks for answering :)
<shevy>
HE IS THE MAN WITHOUT INTERESTS
<Okasu>
robyurkowski: you should use bash if you realy sysadmin
stephenjudkins [stephenjudkins!~stephen@97-120-66-208.ptld.qwest.net] has joined #ruby
<robyurkowski>
Okasu: I do use bash quite frequently too
<shevy>
I think in german literature... there was the "Mann ohne Eigenschaften"... man without ... attributes? personality traits? something like that...
<shevy>
wheee
<shevy>
robyurkowski do you write shell scripts?
<any-key>
eigen shaft?
<robyurkowski>
but in programs where I have to have other programmers maintain my code, I use ruby
<robyurkowski>
shevy: not well.
<robyurkowski>
but I do :)
<shevy>
any-key, haha... almost. eigen means "self" ... which is why I hate Eigenclass ...
rramsden [rramsden!~rramsden@p102130.nanpool.mala.bc.ca] has joined #ruby
<any-key>
my shaft?
<any-key>
>.>
<nilspetter>
any-key: i'm on my last year on my comp.sci. bachelor degree atm. Main interests: Human-Computer Interaction; Aritificial Intellignce; Brain-Computer Interface; Algorithms/Datastructure; Design (as in interaction design And eye-candy stuff like colors etc)
<shevy>
lol
<shevy>
any-key, not sure about "Schaften"... hmm cant tell you the origin of that word standalone ...
<Greed>
lahwran, let's fight
<any-key>
nilspetter: I used ruby in my AI class frequently, solved some search problems with it, made good use of the functional programming aspects
<any-key>
nilspetter: there's some good ruby color libraries and whatnot
<shevy>
nilspetter code HAL (from odyssee) in Ruby
<any-key>
I also did a lot of work with collecting and processing large amounts of data
<shevy>
of course he must be intelligent
<any-key>
massive amounts
<oddmunds>
nilspetter: i'm not sure how technical the HCI-thing is, but Ruby lends itself nicely to making DSLs
<any-key>
there's always Shoes for GUI work :P
<shevy>
hmm
<shevy>
does Shoes work nicely?
<any-key>
dunno
<any-key>
it's not super powerful
<shevy>
lol
s_much [s_much!~butt_hurt@c-68-36-123-133.hsd1.nj.comcast.net] has joined #ruby
<shevy>
yeah
<shevy>
I always felt as if _why was just playing and fooling around
<shevy>
:(
<nilspetter>
interaction Design is fun; gui-programming however, usually isn't though (in my experience)...
<any-key>
nope
<any-key>
nilspetter: there's some fun work to be done as far as web programming goes with ruby
<any-key>
I'm not even talking about rails
<any-key>
CGI scripts and smaller frameworks like sinatra
cooper [cooper!~mitchell@unaffiliated/furryfishy] has joined #ruby
<nilspetter>
hmm
<any-key>
they're jolly good fun
apok [apok!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
<shevy>
yeah
<any-key>
lots and lots of web resources with ruby, the web is its bread and butter
<shevy>
and every ruby cgi script can be a standalone ruby class
<shevy>
so you can use it on the console nilspetter!
<any-key>
check out the twitter streaming API, there's a great gem for it that lets you get some great data
<shevy>
I think the problem is that you do not connect things together nilspetter
conickal [conickal!~Adium@67.218.117.238] has quit [#ruby]
<any-key>
I think we've ragged on him plenty guys :P
<shevy>
we'll see
<any-key>
nilspetter: we can assign you some homework
<shevy>
naaaaah
<any-key>
I will
<nilspetter>
sure...?
<shevy>
remember
<shevy>
he has no problems to solve
<shevy>
and now you make him problems :(
<any-key>
nilspetter: use DFS to solve the triangle solitaire puzzle
<any-key>
I did it for my AI class, it's simple and kinda neat
<nilspetter>
ah. sure
<deryl>
ahh yeah what is that mendiant university puzzle site?
<any-key>
ooooh go solve some project euler problems with ruby
<nilspetter>
oh. btw. before you judge me (for not fucking around enough), check out my poker hand scripting:
<shevy>
I have only a few rules but one rule says to never touch code of other people using *eval*
<any-key>
Gekz: because you're too lazy to build a ruby interpreter in JS!!!
<any-key>
get on it
<shevy>
Gekz because javascript is there
<AndChat|>
Shevy irb uses eval;)
<shevy>
damn irb
<shevy>
undocumented stupid shit!
<AndChat|>
Hehe
* any-key
heads home
* shevy
follows any-key
<AndChat|>
Pry uses it too
<shevy>
sorry AndChat| ... am stalking, can't talk
<Okasu>
what toolkits for ruby do you know wxcept tk and shoes?
<shevy>
ruby-gtk
<shevy>
go use it
kennethreitz [kennethreitz!~kennethre@static-71-166-241-209.washdc.east.verizon.net] has joined #ruby
savage-_ [savage-_!~savage-@209.118.197.220] has joined #ruby
<Avi`>
HCI lol
<Avi`>
all the interests sounded like someone in college describing their class lineup basically
<Avi`>
real life rarely coincides with college classes (atleast for me certainly)
<Avi`>
one of my coworkers daughters is going to CMU For HCI
yfeldblum [yfeldblum!~Jay@c-98-218-48-253.hsd1.md.comcast.net] has joined #ruby
<shevy>
what is HCI
<Avi`>
human-computer interactions
<Avi`>
a college way of saying 'UI Design'
<Avi`>
or 'that thing engineers are forced to do because HI is too busy to provide mock ups'
<nilspetter>
robyurkowski: quoute { my first 'serious' problem was duplication of my mp3s by itunes } how did you solve that with ruby? there's no obvious way to control itunes with ruby, is there? :S
<robyurkowski>
nope, but there is a way to control files :)
<robyurkowski>
technically, I could have written applescript, too
<nilspetter>
linux?
<robyurkowski>
windows, too
<robyurkowski>
at the time, I was on windows
mistaker [mistaker!~mistaker@77-253-210-31.ip.netia.com.pl] has joined #ruby
<robyurkowski>
I was 14 years old
<robyurkowski>
so almost 10 years ago now
<nilspetter>
is that practical. wouldn't you have to do OLE32WIN and send stuff trough it in an very awkward un-ruby fashion?
<robyurkowski>
to be honest, it's so long ago i don't even remember
<robyurkowski>
but i'm not sure why you wouldn't just use fileutils
<nilspetter>
oh. yea. my bad
<nilspetter>
i was still thinking of direct link to itunes.. like getting track name and stuff
<nilspetter>
(currenttly playing track)
<robyurkowski>
you can do that with an IDv3 tag reader
<robyurkowski>
or that, you could do with applescript
<robyurkowski>
run as an executable command in ruby and then have that data available to your script
<lantins>
there's gems to let you do that kinda thing nilspetter, it may be a hook into applescript stuff though, remember playing with something like that once =)
<nilspetter>
applescript != ruby
<nilspetter>
ah
<nilspetter>
use both.. that's not convient .. but .. nevertheless possible
mistaker_ [mistaker_!~mistaker@77-253-210-31.ip.netia.com.pl] has joined #ruby
<robyurkowski>
you have to use something that has access to itunes's api
<robyurkowski>
that's just the way programming works
<nilspetter>
hmm.. i believe i used that a couple of years ago actually :P
<lantins>
ruby <-> applescript bridge perhaps, just remember finding it via rubyflow
<robyurkowski>
for apple, that's through applescript or direct cocoa bindings
<nilspetter>
(i just rediscovered my passion for ruby)
<robyurkowski>
you could do it in macruby
<Avi`>
err no
<Avi`>
you just go modify the xml file
<Avi`>
itunes stores its data in a file ruby can parse and manipulate
<Avi`>
that data tells you everything about the library
<shevy>
eeks XML
<Avi`>
*shrug* ruby can parse it.
<robyurkowski>
Avi`: My problem was that, at the time, I had duplicate files, rather than dupe library entries
<Avi`>
it tells you paths to songs etc too, so you canhave ruby delete duplicate songs
<robyurkowski>
this was also circa 2001 >_>
<robyurkowski>
itunes is much better now
<Avi`>
also this is a solved problem
<Avi`>
i can think of atleast 5 tools off the top of my head that deal with managing itunes libraries
<robyurkowski>
haha
<Avi`>
including dupe detection and removal (itunes itself has something for this too)
<robyurkowski>
yep
<robyurkowski>
they built that in
<robyurkowski>
that was a nice feature to have
Lord-Harlot [Lord-Harlot!~Serenity@adsl-83-100-189-243.karoo.KCOM.COM] has joined #ruby
<Avi`>
(im not a big fan of spending my energy recreating wheels so i hate solving solved problems)
<shevy>
hmm
<shevy>
I like solving solved problems
<lantins>
depends on what the problem it is. solving something yourself can be a massive learing op
<shevy>
but only for small problems
<Avi`>
lantins: sure, just depends on the problem
SEToChan [SEToChan!~SEToChan@109.162.80.30] has joined #ruby
<Avi`>
itunes library management doesn't get me going so
<Avi`>
not a problem i want to learn on ;)
<lantins>
lol, agreed
<robyurkowski>
no argument from me :)
<Avi`>
i'd rather do ruby koans
<Avi`>
=)
<shevy>
oh yeah
Revernd [Revernd!~michaelde@wsip-70-168-157-254.oc.oc.cox.net] has joined #ruby
<davidcelis>
project euler problems
<robyurkowski>
one thing i did write recently was an applescript to advance a youtube playlist forward or backward a video
<lantins>
konas?
<lantins>
that like a code kata thing?
stephenjudkins_ [stephenjudkins_!~stephen@97-120-70-119.ptld.qwest.net] has joined #ruby
<davidcelis>
lantins: yep
<lantins>
ah, last time I tried that I wrote a bruteforce sudoku solver in C :-)
<Avi`>
just saying, if you are looking for problems to solve because you lack your own problems
<Avi`>
koans/project euler is a good place to start
kjs3 [kjs3!~kseefried@c-24-99-80-255.hsd1.ga.comcast.net] has joined #ruby
Newbs [Newbs!~textual@host-78-144-71-110.as13285.net] has joined #ruby
<canton7>
don't forget aichallenge.org
kjs31 [kjs31!~kseefried@174.47.62.3] has joined #ruby
mikeycgto [mikeycgto!~mikeycgto@pdpc/supporter/active/mikeycgto] has joined #ruby
andrewhl [andrewhl!~andrew@24-246-15-43.cable.teksavvy.com] has joined #ruby
logic [logic!~logic@unaffiliated/bitch333z] has joined #ruby
<lantins>
notes made... although work is really interesting its good to find a problem that's got nothing to do with the day job