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/
cousine [cousine!~cousine@196.221.242.180] has joined #ruby
thomascioppettin [thomascioppettin!~thomascio@cpe-071-071-047-213.triad.res.rr.com] has joined #ruby
cachemoney [cachemoney!~cachemone@71-94-132-42.static.mtpk.ca.charter.com] has joined #ruby
kennethreitz [kennethreitz!~kennethre@c-24-127-96-129.hsd1.va.comcast.net] has joined #ruby
redgetan [redgetan!~reg@CPE0023bee17c0e-CM0023bee17c0b.cpe.net.cable.rogers.com] has joined #ruby
<multi_io>
do the ruby 1.9.x introduce Ruby language modifications over 1.9.0?
<multi_io>
*the ruby 1.9.x releases
akem [akem!~akem@164.15.85.79.rev.sfr.net] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
<yakko>
multi_io: they changed hash :(
<heftig>
1.9.1 changed the C api
flip_digits [flip_digits!~textual@c-71-199-243-97.hsd1.fl.comcast.net] has joined #ruby
ryan_marsh [ryan_marsh!~ryan_mars@99-160-193-138.lightspeed.hstntx.sbcglobal.net] has joined #ruby
carbncl [carbncl!~carbncl@bne75-3-82-225-142-80.fbx.proxad.net] has joined #ruby
Schmidt [Schmidt!~lsc@h-11-69.a254.priv.bahnhof.se] has joined #ruby
workmad3 [workmad3!~workmad3@host-84-13-69-129.opaltelecom.net] has joined #ruby
jthomas__ [jthomas__!~jthomas@c-98-222-28-137.hsd1.il.comcast.net] has joined #ruby
hunterloftis [hunterloftis!~hunter@cpe-071-075-103-203.carolina.res.rr.com] has joined #ruby
rramsden [rramsden!~rramsden@s64-180-62-209.bc.hsia.telus.net] has joined #ruby
<Mon_Ouie>
There have been changes to the way constants are looked up
kiwnix [kiwnix!~kiwnix@82.158.154.223.dyn.user.ono.com] has joined #ruby
td123 [td123!~tom@archlinux/trusteduser/td123] has quit ["WeeChat 0.3.6"]
looopy [looopy!~looopy@pool-141-156-49-128.washdc.btas.verizon.net] has joined #ruby
jessemc [jessemc!~jessemc@S0106602ad0702c43.ed.shawcable.net] has joined #ruby
_dink [_dink!~anonymous@c-68-52-194-205.hsd1.tn.comcast.net] has joined #ruby
tightwork [tightwork!~tightwork@50-57-89-237.static.cloud-ips.com] has joined #ruby
havenn [havenn!~skipper@pool-72-67-31-69.lsanca.fios.verizon.net] has joined #ruby
_dink_ [_dink_!~anonymous@c-68-52-194-205.hsd1.tn.comcast.net] has joined #ruby
<multi_io>
looks like under 1.8, $: include ".", while under 1.9 it doesn't.
<multi_io>
or is that my environment? :-O
<shevy>
multi_io yeah that was changed
<shevy>
I think something about including the current path is unsafe or that
Manhose [Manhose!~Manhose@bl17-17-151.dsl.telepac.pt] has joined #ruby
tightwork [tightwork!~tightwork@50-57-89-237.static.cloud-ips.com] has joined #ruby
<multi_io>
shevy: ok
<multi_io>
I see
andrewhl [andrewhl!~andrew@24-246-15-43.cable.teksavvy.com] has joined #ruby
tightwork [tightwork!~tightwork@50-57-89-237.static.cloud-ips.com] has joined #ruby
bnewton [bnewton!~bnewton@cpe-66-68-94-56.austin.res.rr.com] has joined #ruby
tightwork [tightwork!~tightwork@50-57-89-237.static.cloud-ips.com] has joined #ruby
skrewler [skrewler!~skrewler@76-220-40-103.lightspeed.sntcca.sbcglobal.net] has joined #ruby
mpabst [mpabst!~mpabst@50-81-140-212.client.mchsi.com] has joined #ruby
nate_h [nate_h!~husimon@c73-208.rim.net] has joined #ruby
tightwork [tightwork!~tightwork@50-57-89-237.static.cloud-ips.com] has joined #ruby
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby
tightwork [tightwork!~tightwork@50-57-89-237.static.cloud-ips.com] has joined #ruby
jbw [jbw!~jbw@dsl-044-084.cust.imagine.ie] has joined #ruby
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby
<multi_io>
in 1.8, if I wanted to "unrequire" a previously required module, it was $".delete "module.rb"
<multi_io>
after that, 'require "module"' would load and run the module's code again.
jessemc [jessemc!~jessemc@S0106602ad0702c43.ed.shawcable.net] has joined #ruby
<multi_io>
in 1.9, it doesn't?
dyer [dyer!~dyer@108-193-172-174.lightspeed.tukrga.sbcglobal.net] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
retnuh [retnuh!~huntercla@adsl-184-36-106-72.asm.bellsouth.net] has joined #ruby
antonishen [antonishen!~antonishe@adsl-76-249-17-228.dsl.klmzmi.sbcglobal.net] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
<shevy>
hmm
tightwork [tightwork!~tightwork@50-57-89-237.static.cloud-ips.com] has joined #ruby
<shevy>
multi_io good question
<shevy>
I actually never saw $".delete before myself
a|i [a|i!~ali@unaffiliated/ai/x-9091534] has joined #ruby
viuo [viuo!~viuo@staticline41439.toya.net.pl] has joined #ruby
<a|i>
I'm using 2 gems which define different classes/modules with the same name.
<a|i>
how to resolve this conflict?
<waxjar>
require the first one, give it a new class name using New < Original, then require the second one?
<waxjar>
idk if that would work, its pretty ugly anyway.
<a|i>
waxjar: one of them is a class, the other is a module.
<a|i>
the first gem was written rather poorly, it doesn't have any modules.
<burgestrand>
multi_io: it does, but $" contains the full path to module.rb, not the relative one
<a|i>
waxjar: does NewClassname < OldClassName remove the old class name too?
<waxjar>
no, it just extends newClassname with the methods of OldClassName
<a|i>
waxjar: the problem is the second gem defined a module named OldClassName
SterNiX [SterNiX!~LessIsMor@unaffiliated/nu253r/x-0655220] has joined #ruby
<burgestrand>
a|i: you can assign one of them to another constant, remove the constant, and then require the other one
<burgestrand>
a|i: I think that’s what waxjar is thinking, but his way of writing it is wrong
<a|i>
burgestrand: how to do that assignment?
<burgestrand>
a|i: keep in mind, it may so happen that other pieces of either of those gems rely on that constant, so it’s still a hack and is very likely to break something
<waxjar>
that was my thinking yeah
<multi_io>
burgestrand: ah...
<multi_io>
indeed
<multi_io>
so this was changed too then
<multi_io>
in 1.8 it contains the relative path
<multi_io>
shevy: I need it in some unit tests here to re-initialize the environment before each test. I would stay away from such hackery in production code I think :P
ly-_ [ly-_!~ly_@251.200.193.77.rev.sfr.net] has joined #ruby
albedoa [albedoa!~albedoa@ip68-108-106-30.lv.lv.cox.net] has joined #ruby
QaDeS [QaDeS!~mklaus@frbg-5d84f8c6.pool.mediaWays.net] has joined #ruby
viuo [viuo!~viuo@staticline41439.toya.net.pl] has joined #ruby
meh [meh!62fdbf5d@gateway/web/freenode/ip.98.253.191.93] has joined #ruby
jessemc [jessemc!~jessemc@S0106602ad0702c43.ed.shawcable.net] has joined #ruby
<shevy>
hmm
<shevy>
would be nice to re-assign modules upon loading
<shevy>
or even wrap loaded code into modules on the fly
looopy [looopy!~looopy@pool-141-156-49-128.washdc.btas.verizon.net] has joined #ruby
_|christian|_ [_|christian|_!~christian@201.240.192.232] has joined #ruby
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has joined #ruby
looopy [looopy!~looopy@pool-141-156-49-128.washdc.btas.verizon.net] has joined #ruby
<linduxed>
what's the difference between "rake db:migrate" and "rake db:migrate db:test:clone" ?
viuo [viuo!~viuo@178.181.102.224.nat.umts.dynamic.t-mobile.pl] has joined #ruby
<linduxed>
i assume it does some test, and clones something, but i can't figure out what
colint [colint!~ColinT@69-11-97-130.regn.static.sasknet.sk.ca] has joined #ruby
THE_GFR|WORK [THE_GFR|WORK!~THE_GFR_W@76.164.19.2] has joined #ruby
antonishen [antonishen!~antonishe@adsl-76-249-17-228.dsl.klmzmi.sbcglobal.net] has joined #ruby
nykc [nykc!~nykc@99-40-62-66.lightspeed.clmboh.sbcglobal.net] has joined #ruby
ly- [ly-!~ly-@251.200.193.77.rev.sfr.net] has joined #ruby
RenatoSilva [RenatoSilva!~nouser@186.205.140.94] has joined #ruby
ly- [ly-!~ly-@unaffiliated/ly-] has joined #ruby
ly- [ly-!~ly-@unaffiliated/ly-] has quit [#ruby]
ly- [ly-!~ly-@unaffiliated/ly-] has joined #ruby
<burgestrand>
linduxed: the second one will run two rake tasks, the first one only one
fungoat [fungoat!~fungoat@184.91.163.230] has joined #ruby
RenatoSilva [RenatoSilva!~nouser@186.205.140.94] has quit [#ruby]
<nykc>
I am having issues with setting up my environment in Linux Mint for whatever reason.
<nykc>
installed Rails 3.1.0 through rvm and it apparently worked
<linduxed>
burgestrand: ok
<burgestrand>
linduxed: if this is rails, the first second one will run migrations on your development database (default working environment), and then clone the new resulting schema to your test database — you use a different database for development as opposed to the one in testing, so it’s good to do this
<nykc>
when I create a rails new test_app and cd to director
<burgestrand>
nykc: rails through rvm? how?
<nykc>
gem install rails
<linduxed>
burgestrand: ok, thank you
_|christian|_ [_|christian|_!~christian@201.240.192.232] has joined #ruby
<linduxed>
burgestrand: just saw the command in an alias, wanted to know what it was for
<nykc>
everything installed okay but when i did a rails server and went to localhost:3000
<burgestrand>
linduxed: most often you do db:test:prepare though, which is same as :clone but it clones the structure from the development environment only, db:test:clone clones it from the *current* environment database
<nykc>
I got an unable to load
<linduxed>
burgestrand: i'm afraid that's a bit too advanced for me at the moment, but a lot anyway
<burgestrand>
linduxed: :)
<burgestrand>
linduxed: sorry, I meant to tell you to scroll to section 3.1.1 too
<burgestrand>
linduxed: first hit on google with a description of the rake task
v0n [v0n!~v4n@bas1-montreal19-1177820429.dsl.bell.ca] has joined #ruby
new_ruby_program [new_ruby_program!~new_ruby_@pool-173-58-89-188.lsanca.fios.verizon.net] has joined #ruby
albedoa [albedoa!~albedoa@ip68-108-106-30.lv.lv.cox.net] has joined #ruby
<burgestrand>
nykc: when you do ”rails server”, what does it say?
antonishen [antonishen!~antonishe@adsl-76-249-17-228.dsl.klmzmi.sbcglobal.net] has quit [#ruby]
new_ruby_program [new_ruby_program!~new_ruby_@pool-173-58-89-188.lsanca.fios.verizon.net] has joined #ruby
ryanf [ryanf!~revfitz@adsl-67-122-210-207.dsl.snfc21.pacbell.net] has joined #ruby
<nykc>
I am reinstalling I will let you know in a sec. Thank you
<savage->
burgestrand: do you like to create attr_reader/writer/accessor for instances variables that you don't expose outside of the internals of your class? Or do you refer to the @instance_variable name everywhere directly?
SterNiX [SterNiX!~LessIsMor@unaffiliated/nu253r/x-0655220] has joined #ruby
<burgestrand>
savage-: attr_* — for one it allows me to document my expectations of the instance member, and it allows me to change the implementation with minimal impact on the rest of the code :)
<burgestrand>
savage-: like, I can use YARD to actually define what the instance variable will contain and why it’s there
MissionCritical [MissionCritical!~MissionCr@unaffiliated/missioncritical] has joined #ruby
<savage->
burgestrand: great, that's what I've been doing as well. I'm also speciyfing the attr_* within 'private'.
<burgestrand>
savage-: mostly for the reader though, I’m not really that strict when it comes to the writer which is probably stupid of me :p
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
<savage->
lol
<burgestrand>
then again I mostly only set things from the initializer :)
<savage->
true :)
<linduxed>
burgestrand: hey, is there a difference between <% foobar %> and <% foobar -%> ?
<burgestrand>
linduxed: I believe the latter one cuts off the trailing newline
<linduxed>
i've notived that a plugin inserts the -
<linduxed>
*noticed
<linduxed>
burgestrand: hmmm, any idea why that would be made standard instead of without the minus?
<burgestrand>
perhaps it might even cut off trailing whitespace
Banistergalaxy [Banistergalaxy!~AndChat@118.82.185.158] has joined #ruby
<burgestrand>
linduxed: HTML does care about whitespace at times, for example between tags; if you make a horizontal list with ol/li elements, the whitespace you often place between the li-elements (one li on each line) will actually put a space between each item
<burgestrand>
linduxed: cutting it off would pack those elements tightly together
<linduxed>
hmm, true
<burgestrand>
linduxed: kind of hard to explain what it does in words :p
<linduxed>
no i think i understand
<linduxed>
i mean, i see the value in cleaning off whitespace
<linduxed>
i was just surprised that this function that previously entered the former now enters the latter
SterNiX [SterNiX!~LessIsMor@unaffiliated/nu253r/x-0655220] has joined #ruby
<linduxed>
(vim-ragtag plugin from tpope, if you're curious what i'm talking about)
<burgestrand>
oh :)
<burgestrand>
well, that’d be it I guess, often when aligning HTML code in your editor you don’t really want it to affect the content on the page
<burgestrand>
you want the white-space to be insignificant, so it makes sense for it to be the default
theRoUS [theRoUS!~KenCoar@apache/committer/coar] has joined #ruby
<burgestrand>
this is all under the assumption that it actually *does* clear off trailing whitespace :p
<linduxed>
sounds like this minus is nothing but good...
<new_ruby_program>
hello, can somebody please take a look at this: puts "Hello, World!" is "Hello, World!" a string literal or just a regular string
<new_ruby_program>
i heard a string literal is embedded directly into code, so is this a literal then>
<burgestrand>
new_ruby_program: I’d say it’s both :p
<burgestrand>
new_ruby_program: I’d even say it’s the same thing
<v0n>
hi
<v0n>
a personal OutOfBoundsException should inherit from Exception or StandardError?
THE_GFR|WORK [THE_GFR|WORK!~THE_GFR_W@76.164.19.2] has joined #ruby
<burgestrand>
new_ruby_program: or, well, not the same; a string literal is a string, but a string is not *necessarily* a string literal
<new_ruby_program>
ahh i see that makes sense now :)
nerdy_ [nerdy_!~textual@66-44-118-195.c3-0.grg-ubr1.lnh-grg.md.cable.rcn.com] has joined #ruby
<burgestrand>
new_ruby_program: a = "Hello, world!" — a is a variable, it contains a string, in some contexts you would say ”a” is a string (even though it just refers to a string, the string is not *in* a, a points to it); whereas "Hello, world!" *is* a string, and it *is* a string literal
Gryyt [Gryyt!g@unaffiliated/gryyt] has joined #ruby
<linduxed>
burgestrand: hmmm, yeah i checked the code for the plugin, it's correctly input, it's no error... the minus is to be added at the end of these tags
<linduxed>
burgestrand: so i guess that feature was put in for a good reason
<burgestrand>
v0n: probably from StandardError
<burgestrand>
v0n: I say probably because I don’t know the context, but most likely StandardError; unless you have a good reason not to inherit from it
<v0n>
burgestrand, I don't mind, I'm just looking for the best practice :) thanks
<burgestrand>
v0n: then definitely StandardError :)
<new_ruby_program>
burgestrand: "Hello, World!" by itself is a string literal because it's by itself right? puts "Hello, World!
<new_ruby_program>
" is also a string literal because its also by itself
<new_ruby_program>
a = "Hello, world!" is just a regular string because it's a string being referenced by a variable?
<nykc>
burgestrand: /home/nykc/.rvm/gems/ruby-1.9.3-p0/gems/execjs-1.2.13/lib/execjs/runtimes.rb:47:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
<new_ruby_program>
lol am i right?
<v0n>
burgestrand, so maybe it should better be called OutOfBoundsError, isn't it?
<burgestrand>
new_ruby_program: yes, yes, not *entirely*
baniseterfiend` [baniseterfiend`!~baniseter@118.82.185.158] has joined #ruby
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
<burgestrand>
nykc: add gem 'therubyracer' to your Gemfile, bundle install and then start again :)
<burgestrand>
nykc: you can also install nodejs on your computer if you prefer that approach, the link in the error contains some additional information
<burgestrand>
new_ruby_program: a = "Hello, world!" is itself an expression, a is a variable that references "Hello, world!", the string (and in this case) literal
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
<new_ruby_program>
A regular string would be the string a variable references, right? or so I have been told by a ruby-forum.com member
<burgestrand>
v0n: ah, yes, it’s also common for errors to be suffixed by Error
tshauck [tshauck!~tshauck@98.156.55.148] has joined #ruby
<ryanf>
holy crap
<ryanf>
still with the string literals?
<new_ruby_program>
var = "string" => "string" # this is the string referenced by 'var'
<burgestrand>
new_ruby_program: yeah, sure
abstrakt [abstrakt!~abstrakt@gateway/tor-sasl/abstrak1] has joined #ruby
<burgestrand>
new_ruby_program: most often you don’t make the distinction between string and string literal though, it’s rarely relevant
<abstrakt>
so it seems that ruby 1.9.3 no longer has Array#inject?
<abstrakt>
what is the replacement for this?
<abstrakt>
reject?
<burgestrand>
abstrakt: it does
<burgestrand>
abstrakt: Array#reduce is an alias available in 1.9
<nykc>
burgestrand: Thank you... nodejs did the trick
<burgestrand>
nykc: the reason you got the error is because you were missing a way to compile coffee-script to javascript — rails 3.1 has coffee-script in the Gemfile by default, and it uses ExecJS to find a coffee-script compiler
<burgestrand>
(actually it’s just finding something that it can use to run the coffee-script compiler with)
Gryyt [Gryyt!g@unaffiliated/gryyt] has quit [#ruby]
p0y [p0y!~p0y@122.52.126.66] has joined #ruby
<nykc>
burgestrand: makes sense
<burgestrand>
but ExecJS will be happy with nodejs, therubyracer, and a a bunch of other things that are listed in its readme
<nykc>
I also installed therubyracer
<nykc>
Cool time to learn Rails :) thanks again for the help
syamajala [syamajala!~syamajala@c-75-68-106-118.hsd1.ma.comcast.net] has joined #ruby
<burgestrand>
nykc: enjoy :) there’s also #ror channel for rails-related issues
<nykc>
I'll look into. I am crossing over from Python/PHP so I can't wait to see what I have been missing
_|christian|__ [_|christian|__!~christian@190.233.132.118] has joined #ruby
meh [meh!62fdbf5d@gateway/web/freenode/ip.98.253.191.93] has quit [#ruby]
mrapple [mrapple!~mrapple@bzflag/player/MrAppleComputer] has quit [#ruby]
THE_GFR|WORK [THE_GFR|WORK!~THE_GFR_W@76.164.19.2] has joined #ruby
<a|i>
any idea how to force a ruby gem to fetch its submodules upon install?
<a|i>
but it doesn'r work without the :git option.
ewag [ewag!~ewagner@s247.n194.n222.n216.static.myhostcenter.com] has joined #ruby
<burgestrand>
a|i: I’m not sure you can do it without fetching it from :git as there’s no information about the submodules that way; why are you trying to fetch submodules without using git?
trend [trend!~trend@97-81-69-219.dhcp.athn.ga.charter.com] has joined #ruby
<a|i>
burgestrand: I just pushed the gem to rubygems.
<linduxed>
burgestrand: care to answer a simple question?
abstrakt [abstrakt!~abstrakt@gateway/tor-sasl/abstrak1] has quit ["Leaving"]
<burgestrand>
a|i: rubygems have nothing to do with git, it packages all files from the file list into the gem, nothing about git is saved in it
<burgestrand>
linduxed: you should know better than to ask to ask by now :)
<a|i>
burgestrand: can the gem be configured so that at some point it can fetch the submodules?
<linduxed>
burgestrand: in this guide http://guides.rubyonrails.org/getting_started.html i get told that after extracting a piece of code to a partial, i should just do a <% render :partial => 'comment' %>
<linduxed>
whoops
<linduxed>
<%=
<linduxed>
however
<new_ruby_program>
how long does it take to start programming complex applications? I just started getting into software programming two days ago and I started with ruby. Just wondering btw
<burgestrand>
a|i: no, rubygems is completely oblivious to git — in your .gemspec there is a gem.files = something directive, it tells rubygems what files are part of the gem
<linduxed>
my plugin also adds ", :collection => @post.comments" before the %>
<burgestrand>
a|i: gem.files should contain all files that are part of your gem; if it’s the `git ls-files` line from bundler it does not contain files from within submodules
<linduxed>
turns out that without the :collection stuff, it won't work
<savage->
wow
<savage->
guys, don't forget about Enumerable#slice_before and Enumerable#chunk.
<linduxed>
so the plugin helped me out in this case... but i wouldn't have figured this out otherwise
<linduxed>
burgestrand: so the question i have is: why is this not mentioned (am i using a "too new" version of rails?) and what does it _mean_?
<burgestrand>
new_ruby_program: you can start immediately, but even the most die-hard programmers learn better ways to do things every day, if you look at your code that you write today in a month and vomit in disgust and want to re-write it you’re doing it right
oponder [oponder!~oponder@145.118.116.102] has joined #ruby
<a|i>
burgestrand: my gem uses a huge non-gem, but git-maintained library, no point in copying the whole lib in my gem. any other ways?
<linduxed>
new_ruby_program: really depends on what you consider complex
<burgestrand>
a|i: nope, no other ways, if you want it in your gem you put the files in your gem
<linduxed>
new_ruby_program: if you're aiming for creating a new github or twitter... then yeah that can take a while
<a|i>
:(
<linduxed>
new_ruby_program: so much so that we won't be able to telly you how long
<burgestrand>
a|i: you could possibly make the library itself into its’ own gem (it’s what therubyracer does for the v8 library)
<burgestrand>
a|i: but that just splits it into two gems, the actual files you have to include won’t be very different
<linduxed>
new_ruby_program: to be honest, it's not even that wise to set that kind of goal if you're two days in, that won't help you in any way
<new_ruby_program>
yes i am aiming to create a social network site!
<linduxed>
haha
<a|i>
burgestrand: maintaining the library is a pain, it keeps get updates every day.
<new_ruby_program>
that's exactly what i want to do
<new_ruby_program>
or planning to do
<burgestrand>
linduxed: could you summarize your question? I got a bit lost :)
<linduxed>
new_ruby_program: well, i'm not trying to discourage you, you ought to have visions, but set a lot smaller goals
<linduxed>
new_ruby_program: then you'll get there, step by step
<linduxed>
new_ruby_program: finish some tutorials first, create smaller projects, maintain them, expand upon them, and most importantly - refactor
<burgestrand>
a|i: sorry, I know of no other way, the whole point of a gem version is that it’s expected to stay the same unless you install a new version of it or its dependencies :p
codefriar [codefriar!~codefriar@cpe-098-026-012-134.nc.res.rr.com] has joined #ruby
IrishGringo [IrishGringo!~chatzilla@c-71-229-99-200.hsd1.fl.comcast.net] has joined #ruby
<linduxed>
burgestrand: i'm doing a partial. in the tutorial it omits ", :collection => @post.comments" inside the <%= render.... %>
<linduxed>
burgestrand: but my plugin added that automatically when extracting the partial
<linduxed>
burgestrand: turns out the plugin knew that it was needed, without it the stuff dies
<linduxed>
burgestrand: this is not mentioned in the tutorial
<linduxed>
burgestrand: yes
<linduxed>
burgestrand: 2 questions
<linduxed>
burgestrand: 1. why is this not mentioned? (too new rails?)
<linduxed>
burgestrand: 2. what does it mean, that thing about collection
<new_ruby_program>
alright thanks for the advice :) I am an ambitious person, that is all :) I will create smaller projects, but my main goal will be a social networking site! :)
<linduxed>
new_ruby_program: sure go ahead!
slide [slide!~slide@unaffiliated/slide] has joined #ruby
<burgestrand>
linduxed: 1: not sure, I’d expect that to work
<slide>
How can I use SSL in Ruby? I found something with a 'start_tls' method but I dont know where that is coming from
nerdy_ [nerdy_!~textual@66-44-118-195.c3-0.grg-ubr1.lnh-grg.md.cable.rcn.com] has joined #ruby
<linduxed>
burgestrand: a little clarification for 1.
ewag [ewag!~ewagner@s247.n194.n222.n216.static.myhostcenter.com] has joined #ruby
<burgestrand>
linduxed: 2: collection means you’ll render a partial for each item in it, it tells rails that you don’t want to render it just once, but once for *every* item in the collection, it also means that the partial itself needs to be written in a way so that it’s aware it’s being rendered for a collection
<linduxed>
burgestrand: in the tutorial, they go about doing it without the :collection at all
<burgestrand>
linduxed: don’t you just hate the magic behind the covers sometimes
<linduxed>
burgestrand: ok then that was what i suspected from seeing the code
<linduxed>
burgestrand: if you mean stuff that happens that you don't know about... can be irritating yes
<linduxed>
at least if it's not obvious
<burgestrand>
linduxed: in the tutorial, the name of the partial is inferred from the model_name (I believe) of the "collection", I’m not sure what rails will consider a collection (if it responds to #each would maybe be a sane choice?), that’s why they can leave it out
<burgestrand>
linduxed: if your partial follows another name, you’ll need to specify it with :partial
trend [trend!~trend@97-81-69-219.dhcp.athn.ga.charter.com] has joined #ruby
<linduxed>
brownies: how can i try calling it?
<brownies>
you can read the code and tell me what happens
<linduxed>
just by typing some address?
<brownies>
there are 4 lines of code in the destroy method
<brownies>
just use... your brain.
crodas [crodas!~crodas@git.crodas.org] has joined #ruby
<linduxed>
shit
<linduxed>
no man i'm stumped here
<linduxed>
it's _exactly_ like their code... and it doesn't work
<linduxed>
i'm most confused why it instist on using the show action
<shevy>
there are two possibilities
<linduxed>
*insists
<shevy>
either you suck. or their code is wrong
crodas [crodas!~crodas@git.crodas.org] has joined #ruby
<linduxed>
shevy: probably the first one :-)
<shevy>
don't rule out the other choice too soon
<shevy>
however ... I think at a tutorial that is exposed to many people out there, they would fix any error quite quickly
crodas [crodas!~crodas@git.crodas.org] has joined #ruby
<linduxed>
nothing short of incredible, this is
<linduxed>
i don't even understand why the hell show is in the picture
<linduxed>
i mean i guess you could expect it to use show for rendering it all after the destroy, but the link_to says to go to the post_path!
<linduxed>
i don't get it, i just don't
<mattyohe>
"The destroy action will find the post we are looking at, locate the comment within the @post.comments collection, and then remove it from the database and send us back to the show action for the post."
<mattyohe>
so...
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
<linduxed>
mattyohe: so while it does mention the show action... why is it looking for it inside the CommentsCotroller?
<linduxed>
i can't wrap my brain around that
THE_GFR|WORK [THE_GFR|WORK!~THE_GFR_W@76.164.19.2] has joined #ruby
jasdeepjaitla [jasdeepjaitla!~jasdeepja@c-98-207-73-250.hsd1.ca.comcast.net] has joined #ruby
Sliker [Sliker!~ponies@194.28.113.87.dyn.plus.net] has joined #ruby
x0F__ [x0F__!~x0F@unaffiliated/x0f] has joined #ruby
THE_GFR|WORK [THE_GFR|WORK!~THE_GFR_W@76.164.19.2] has joined #ruby
trend [trend!~trend@97-81-69-219.dhcp.athn.ga.charter.com] has joined #ruby
<linduxed>
ok i think i get it a bit now
<linduxed>
so the comment partial contains the line <%= link_to 'Destroy Comment', [comment.post, comment], :confirm => 'Are you sure?', :method => :delete %>
kenperkins [kenperkins!~textual@50-47-18-37.evrt.wa.frontiernet.net] has joined #ruby
<linduxed>
i now assume that the [comment.post, comment] sends the link_to to the showing of the comment
<linduxed>
hence the show command which rails tries to get to in the comment controller
tomzx [tomzx!~tomzx@dsl-216-221-39-59.aei.ca] has joined #ruby
<linduxed>
but then again, why does it ignore the :method => :delete then?
<linduxed>
gaaaah
<linduxed>
i'm so confused
THE_GFR|WORK [THE_GFR|WORK!~THE_GFR_W@76.164.19.2] has joined #ruby
<banisterfiend>
linduxed: cant u join some rails channel
<banisterfiend>
probably more help there
<linduxed>
banisterfiend: yeah you're right
<linduxed>
maybe it's the 5 o'clock in the morning that's messing my thinking up...
<shevy>
where u live
<linduxed>
shevy: sweden
<shevy>
hah like burgestrand
<banisterfiend>
burgestrand is norwegian i think
<banisterfiend>
hmm or maybe he's swedish
<banisterfiend>
scandiwigian
thismat [thismat!~thismat@66-190-79-183.dhcp.dntn.tx.charter.com] has joined #ruby
<shevy>
man, burge borg burg ... castle!
<shevy>
skapelsen!!!
<shevy>
thor wauki!
THE_GFR|WORK [THE_GFR|WORK!~THE_GFR_W@76.164.19.2] has joined #ruby
thomascioppettin [thomascioppettin!~thomascio@cpe-071-071-047-213.triad.res.rr.com] has joined #ruby
visof [visof!~visof@41.196.196.150] has joined #ruby
<visof>
hello
<visof>
i have two files, one which i defined a class and i want to use it in the other file and add in the other file require 'file1' to can use class but i got error said error load file1
<visof>
what is that?
<multi_io>
visof: if you're using Ruby 1.9, try require './file1'
<visof>
ah ok
<multi_io>
require doesn't search in the current directory by default anymore.
<multi_io>
(this was changed from 1.8 to 1.9)
sonkei [sonkei!~sonkei@d14-69-26-171.try.wideopenwest.com] has joined #ruby
thecreators [thecreators!~rskagy@cpe-65-27-201-203.cinci.res.rr.com] has joined #ruby
<visof>
i tried ./file1 but i got the same error
jessemc_ [jessemc_!~jessemc@S010678cd8e6f175f.ed.shawcable.net] has joined #ruby
<ryanf>
do require_relative 'file1'
<ryanf>
require './file1' isn't a good solution to that problem
<ryanf>
because it relies on your working directory being the same as the directory with the code in it, which could easily not be the case
zenergi [zenergi!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
mxweas [mxweas!~max@c-24-7-45-147.hsd1.ca.comcast.net] has joined #ruby
tnk1 [tnk1!~tnk@ip72-195-134-180.ri.ri.cox.net] has joined #ruby
* tnk1
is away: Gone away for now
<multi_io>
visof: name the file roman.rb, not just roman
<visof>
omg
<visof>
ok
THE_GFR|WORK2 [THE_GFR|WORK2!~THE_GFR_W@76.164.19.2] has joined #ruby
<visof>
multi_io: thanks , that fixed the problem
<multi_io>
visof: :-P
THE_GFR|WORK2 [THE_GFR|WORK2!~THE_GFR_W@76.164.19.2] has quit [#ruby]
<multi_io>
...so, in 1.9, a proc can be called with any number of arguments, no matter how it is defined?
<multi_io>
whereas in 1.8, you get ArgumentError if the number of arguments doesn't match the proc's definition
<banisterfiend>
multi_io: no
looopy [looopy!~looopy@pool-141-156-49-128.washdc.btas.verizon.net] has joined #ruby
<banisterfiend>
multi_io: in 1.8 a real proc doesnt care about arity either
<banisterfiend>
multi_io: it's just that the 'proc' method in 1.8 is an alias for lambda
<banisterfiend>
multi_io: create a real proc in 1.8 using Proc.new { }
init[1] [init[1]!~dlevel@shellium/member/buffer] has joined #ruby
<visof>
when i run ruby code first time it run slow but when run it again it run faster than the first time, is that true? , because interpreter cache the values?
<init[1]>
hi, i'm planning to buy a book on ruby. what is you suggestion on most upto date reference to learn ruby ? Programming Ruby 1.9: The Pragmatic Programmers' Guide (Facets of Ruby) is of 2009
<visof>
init[1]: this book is great ruby book
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
<visof>
init[1]: i'm learning from it
jessemc [jessemc!~jessemc@S010678cd8e6f175f.ed.shawcable.net] has joined #ruby
<linduxed>
OH FFS
Marco [Marco!~marco@pat32.dartmouth-secure.border1-cfw.Dartmouth.EDU] has joined #ruby
<linduxed>
better allow javascript next time on localhost:3000 if i want rails to fucking work
<linduxed>
GAAAH
<linduxed>
well that's a lesson learned... only an hour later
<init[1]>
visof, will the year of publication matter. ?
<init[1]>
i mean ROR, is kinda dynamic. does ruby has such syndrome ?
<multi_io>
banisterfiend: ok, thanks
cooper [cooper!~mitchell@unaffiliated/furryfishy] has joined #ruby
<multi_io>
is that the only difference between procs and lambdas?
<visof>
init[1]: i guess no, that's my view , the people want to learn C as example maybe use K & R book that is sorta very old book
<init[1]>
visof, ha i get i now, by what you mean. So it is still safe to learn from Pragmatic. I believe ruby still has the same stuff in Pragamatic right ?
<init[1]>
i get it^
<init[1]>
soory for my lame question. I worried about the time spend. I shouldn't spend time on outdated stuff.
<visof>
init[1]: yeah i mean yeah you can learn from that book, sorry for my English
<init[1]>
visof, alright thanks :)
<visof>
init[1]: Is Ruby your first programming language you willlearn?
Skaag [Skaag!~Skaag@cpe-67-247-51-89.nyc.res.rr.com] has joined #ruby
<init[1]>
visof, no i'm a OOps guy from Java, quite familiar with C and C++ aswell. :)
<hemanth>
is it the right channel to ask about ruby waitr?
<visof>
init[1]: ok
<shevy>
init[1] the only real way to learn ruby is to write ruby scripts and code
<Bonkers>
is there an easy way to mock out time in a test::unit test? I need to control what Time.now returns
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
<shevy>
I liked the pickaxe from around ... 2006 (not the first edition, was it the second?), the one around 2009 I didnt like that much... not sure why. it just didnt feel that special anymore
hydraulix [hydraulix!~hydraulix@c-24-126-117-251.hsd1.md.comcast.net] has joined #ruby
<init[1]>
shevy, :) yes i agree.
otakutom_ [otakutom_!~otakutomo@zaq771a4b1b.zaq.ne.jp] has joined #ruby
<shevy>
metaprogramming in ruby was ok
<shevy>
it's hard to say how it is for others because like 50% of it was not new to me
<shevy>
so someone new to it may profit from those books more
otakutomo [otakutomo!~otakutomo@zaq771a4b1b.zaq.ne.jp] has joined #ruby
<Gekz>
I'm surprised I didn't like ruby when I first tried it
<shevy>
Gekz hmm
<shevy>
I still don't like certain ruby code out there
<shevy>
mostly code with @@
<shevy>
or *eval*
<Gekz>
yes
<shevy>
or lots of $vars
<Gekz>
I think that's what stoppe dme
<Gekz>
I had to find someone to convince me to give it another go
<davidcelis>
$dont_do_this
<davidcelis>
$please
<shevy>
you can write really really horrible code in ruby :(
<davidcelis>
you can write really horrible code in any language
<Gekz>
it's very perlesque
<Gekz>
it's more difficultto write ugly code in Python I've found
<Gekz>
which is why I used it
<shevy>
davidcelis, yeah not sure about how much
<Gekz>
much more difficult to write code as concisely as I wanted.
otakutom_ [otakutom_!~otakutomo@zaq771a4b1b.zaq.ne.jp] has joined #ruby
<shevy>
when I look at perl code and compare it to python code, 80% of the time I find the perl code uglier
<Gekz>
Python not having the retry keyword blows my mind.
<Gekz>
perl is almost always uglier
<Gekz>
because it has _so much syntax_
otakutomo [otakutomo!~otakutomo@zaq771a4b1b.zaq.ne.jp] has joined #ruby
<shevy>
perl is like the granddaddy of scripting languages
<mitchty>
meh, perls fine for what it does
<Gekz>
and by god does it show.
<mitchty>
i think people confuse syntax for beauty
hydraulix [hydraulix!~hydraulix@c-24-126-117-251.hsd1.md.comcast.net] has quit [#ruby]
<Gekz>
code readability is all that matters.
<multi_io>
I've found that Ruby is the better Perl :P
<Gekz>
I'd agree with that I guess.
<multi_io>
i.e. you can write Perlish code in Ruby, and if you do, it's easier that doing it in Perl...
init[1] [init[1]!~dlevel@shellium/member/buffer] has joined #ruby
<mitchty>
you can write java in almost any language, doesn't mean you should
<Gekz>
I just like how object oriented it is
<Gekz>
I'm a Java and Python guy
<Gekz>
it has the best bits of both I reckon.
<multi_io>
yeah I didn't mean to say you should write perl in ruby
<Gekz>
also, I'm not sure what @@ means in ruby
<multi_io>
but e.g. Perl is said to be good at text processing. And it is. But Ruby is better at it. So Ruby is the better Perl :)
<QaDeS>
Gekz, you might like coffeescript, too ;)
<mitchty>
effectively @@var is a class singleton variable
<Gekz>
QaDeS: I hate the hell out of coffeescript
<mitchty>
multi_io: not entirely accurate, perls regex parser is quite a bit more turing complete
<multi_io>
I kinda like the OOP in Perl though
<Gekz>
mitchty: er, what.
<QaDeS>
how come?
<multi_io>
mitchty: yeah, maybe
thecreators [thecreators!~rskagy@cpe-65-27-201-203.cinci.res.rr.com] has joined #ruby
<mitchty>
Gekz: it means for class Foo, it will be the same across any instance of Foo, its not local to the one class
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
<Gekz>
mitchty: so it's a class attribute, not an instance attribute.
<shevy>
perl OOP $this->bla();
<shevy>
hmm no thank you, I stick with ruby
<Gekz>
perl was quite a bit like C in a lot of ways
<mitchty>
Gekz: yes, basically, but the pattern is effectively singletons
<Gekz>
mitchty: how so
<shevy>
perl didn't care much about syntax :)
<shevy>
perl is still faster than ruby and python though
krz [krz!~foobar@unaffiliated/krz] has joined #ruby
<Dante2>
And there's the brick wall. :( The instructions simply said to unpack the gems file into a directory and run "ruby setup.rb". Just did that and I got an error
<Dante2>
ruby: No such file or directory -- setup.rb (LoadError)
<durre>
on ubuntu, after some gem installations I get errors like: Invalid gemspec in [/var/lib/gems/1.8/specifications/compass-0.11.6.gemspec]: invalid date format in specification: "2011-12-24 00:00:00.000000000Z" ... I know how to manually fix this, but I want to avoid it alltogether. why does this happen?
<lateau_>
Dante2: what is it try to install?
<Dante2>
The gems file. rubygems-update-1.8.12.gem
<Dante2>
But I thik I just realized another error on my part.
<csmrfx>
I guess at this point most people will tell you: "Use rvm"
xjiujiu [xjiujiu!~quassel@218.77.14.195] has joined #ruby
awesome [awesome!~awesome@212.62.202.84.customer.cdi.no] has joined #ruby
<lateau_>
Dante2: just try to "gem install" instead unpack the gem file
<lateau_>
on same path the file is.
<banisterfiend>
csmrfx: hey carl
<csmrfx>
oh I see you're on vista
<csmrfx>
banisterfiend: hny bahn-hofs-fiendQ
kakashi_ [kakashi_!~kakashi_@nltk/kakashi] has joined #ruby
<banisterfiend>
csmrfx: my real brother (carl stephen mair, i.e csm) is here right now, so my loneliness is plugged finally and i may stop calling you carl for the short duration he's here
Araxia__ [Araxia__!~Araxia@c-24-22-63-1.hsd1.or.comcast.net] has joined #ruby
<Dante2>
Well I'll be a son of a blue nosed gopher. It worked. It actually worked. 1 Gem installed
<csmrfx>
banisterfiend: you should consult him about changing your nick to bahnhofsfriend
<lateau_>
Dante2: good. now check the gem version with gem —version
<Dante2>
1.8.11
<banisterfiend>
csmrfx: he's drunk probably not a good time to ask
waxjar [waxjar!~waxjar@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
<csmrfx>
lol get him to sign deeds
<banisterfiend>
csmrfx: he's weeping in the corner with a photoalbum haunted by memories of past girlfriends
mafolz [mafolz!~mafolz@dhcp50-210.start.uni-saarland.de] has joined #ruby
<Dante2>
currently updating gems
<Dante2>
says I need build tools
<csmrfx>
"It's so easy to leave me, all alone with the mamm'ries..."
<lateau_>
Dante2: good
<Dante2>
gave a couple links to follow to install build tools. Gonna give it a shot.
<Dante2>
lateau: A tad bit nervous. It's telling me to take files out not concernig legacy dev-kits... given that I have ruby 1.9.3 are legacy files something I need to be concerned about?
<csmrfx>
imo no
<csmrfx>
but some things that work on 1.8 just might not work on some other v
<Dante2>
Well, I guess the bottom line question is really this: If i just run the installer and get an error after the fact, can I simply remove the files mentioned on the site and have everything run smoothly?
<csmrfx>
ok, I see. I dont know. I dont know what files.
pen [pen!~pen@dhcp1.csie.ntu.edu.tw] has joined #ruby
<lateau_>
Dante2: unfortunately i don't have a idea about it...
<Dante2>
Whelp, guess I'm gonna find out the hard way. ;)
<lateau_>
ok :)
<lateau_>
may be there a some other hard way with compiling ruby instead using ruby-installer. :)
<Dante2>
Perhaps. My script seems to run now, thought..... perhaps I'll worry about messing with the devkit at a later date.
<Dante2>
After this I have to install rails. That promises to be a real blast.
vmatiyko [vmatiyko!~vmatiyko@178.120.67.145] has joined #ruby
<banisterfiend>
csmrfx: carl
<Dante2>
Thank you everyone for all of your help. =D It's late and I'm going to hit the hay.
stoffus [stoffus!~stoffus@2001:9b0:1:dead:129a:ddff:fe58:6835] has joined #ruby
<lateau_>
have a good day :)
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
Schmidt [Schmidt!~lsc@h-11-69.a254.priv.bahnhof.se] has joined #ruby
Dante2 [Dante2!4721a6e9@gateway/web/freenode/ip.71.33.166.233] has quit [#ruby]
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
bluOxigen [bluOxigen!ssf@unaffiliated/bluOxigen] has joined #ruby
freelanceful [freelanceful!~jamesfend@c-71-228-225-167.hsd1.tn.comcast.net] has joined #ruby
<freelanceful>
hey guys, does CanCan work for limiting access for roles? for instance, I have workers and buyers and they each access different pages and parts...
<freelanceful>
also right now, any buyer can edit any project by simply typing it in the URL.. how shall I limit that? use CanCan?
shevy [shevy!~shevy@213-33-13-171.adsl.highway.telekom.at] has joined #ruby
zommi [zommi!quassel@nat/ibm/x-oeinryvisniehnha] has joined #ruby
<csmrfx>
banisterfiend: summin up?
Jackneill [Jackneill!~Jackneill@unaffiliated/jackneill] has joined #ruby
durre [durre!~kvirc@217-212-242-4.customer.telia.com] has joined #ruby
robertjpayne [robertjpayne!~robertjpa@122.58.169.214] has joined #ruby
bintut [bintut!~bintut@cm61.sigma15.maxonline.com.sg] has joined #ruby
frerich [frerich!~frerich@mail.froglogic.com] has joined #ruby
frerich [frerich!~frerich@kde/raabe] has joined #ruby
Deiu [Deiu!~deiu@unaffiliated/deiu] has joined #ruby
Deiu [Deiu!~deiu@unaffiliated/deiu] has quit [#ruby]
eldariof [eldariof!~CLD@95.84.56.1] has joined #ruby
aantix [aantix!~jjones@70-36-141-115.dsl.dynamic.sonic.net] has joined #ruby
libertyprime [libertyprime!~libertypr@182.236.125.102] has joined #ruby
kakashi_ [kakashi_!~kakashi_@nltk/kakashi] has joined #ruby
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby
skim1776 [skim1776!~sergey@95.56.183.160] has joined #ruby
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby
durre [durre!~kvirc@217-212-242-4.customer.telia.com] has joined #ruby
tobym [tobym!~tobym@c-24-128-127-47.hsd1.vt.comcast.net] has joined #ruby
<hemanth>
anyone working with "watir-webdriver/extensions/alerts" ?
PaciFisT [PaciFisT!~PeaCE@CPE0023be436752-CM0023be436750.cpe.net.cable.rogers.com] has joined #ruby
`gregorg` [`gregorg`!~Greg@unaffiliated/gregorg] has joined #ruby
mohits [mohits!~mohit@unaffiliated/mohits] has joined #ruby
ghosTM55 [ghosTM55!~ghosTM55@li279-245.members.linode.com] has joined #ruby
jbpros [jbpros!~jbpros@188.188.78.231] has joined #ruby
tilde` [tilde`!~tilde@host226-185-dynamic.23-79-r.retail.telecomitalia.it] has joined #ruby
Cyrus [Cyrus!~Cyrus@unaffiliated/cyrus] has joined #ruby
ly- [ly-!~ly-@unaffiliated/ly-] has joined #ruby
nicoulaj [nicoulaj!~nicoulaj@V10K2.bull.fr] has joined #ruby
xpot [xpot!~xpot@166-70-100-198.ip.xmission.com] has joined #ruby
<hemanth>
browser.alert not working with watir-webdriver/extensions/alerts!
PaciFisT [PaciFisT!~PeaCE@CPE0023be436752-CM0023be436750.cpe.net.cable.rogers.com] has joined #ruby
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
durre [durre!~kvirc@217-212-242-4.customer.telia.com] has joined #ruby
Barakas [Barakas!~v@77.242.201.52] has joined #ruby
mohits [mohits!~mohit@unaffiliated/mohits] has joined #ruby
manizzle [manizzle!~manizzle@adsl-99-91-42-119.dsl.pltn13.sbcglobal.net] has joined #ruby
xec [xec!~xec@2a00:10b0:1:1002:5ab0:35ff:fef8:6a01] has joined #ruby
cachemoney [cachemoney!~cachemone@71-94-132-42.static.mtpk.ca.charter.com] has joined #ruby
elliot98 [elliot98!~elliot@IGLD-84-229-15-130.inter.net.il] has joined #ruby
elliot98 [elliot98!~elliot@unaffiliated/elliot98] has joined #ruby
Schmidt [Schmidt!~lsc@h-79-136-103-158.na.cust.bahnhof.se] has joined #ruby
crayfishx [crayfishx!~craig@78.129.240.7] has joined #ruby
shtirlic [shtirlic!~shtirlic@188.134.7.124] has joined #ruby
probst [probst!~probst@bumblebee.cl.cam.ac.uk] has joined #ruby
Clooth [Clooth!~Clooth@GGYKMMDCXCVII.gprs.sl-laajakaista.fi] has joined #ruby
Schmidt [Schmidt!~lsc@h-79-136-103-158.na.cust.bahnhof.se] has joined #ruby
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby
mohits1 [mohits1!~mohit@115.113.153.226] has joined #ruby
mohits [mohits!~mohit@unaffiliated/mohits] has joined #ruby
berserkr [berserkr!~david@212.122.111.205.dyn.user.ono.com] has joined #ruby
jbpros [jbpros!~jbpros@d515285E6.access.telenet.be] has joined #ruby
crayfishx [crayfishx!~craig@78.129.240.7] has joined #ruby
tvo [tvo!~tvo@katapult/developer/tvo] has joined #ruby
moshee [moshee!~moshee@unaffiliated/moshee] has joined #ruby
SterNiX [SterNiX!~LessIsMor@unaffiliated/nu253r/x-0655220] has joined #ruby
abstrusenick [abstrusenick!~abstrusen@bb220-255-36-18.singnet.com.sg] has joined #ruby
deband [deband!~wewilknow@189.38.230.215] has joined #ruby
dekroning [dekroning!~dekroning@541B931D.cm-5-4c.dynamic.ziggo.nl] has joined #ruby
deband [deband!~wewilknow@189.38.230.215] has quit [#ruby]
apok [apok!~apok@96.24.67.22] has joined #ruby
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby
vmatiyko [vmatiyko!~vmatiyko@178.120.67.145] has joined #ruby
vitoravelino [vitoravelino!~rockhampt@187.64.90.129] has joined #ruby
vitoravelino [vitoravelino!~rockhampt@unaffiliated/vtr] has joined #ruby
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby
xec [xec!~xec@188.95.241.142] has joined #ruby
xec [xec!~xec@2a00:10b0:1:1002:5ab0:35ff:fef8:6a01] has joined #ruby
jamiemill [jamiemill!~jamiemill@78-86-4-116.zone2.bethere.co.uk] has joined #ruby
Natanaiel [Natanaiel!~Unknown@unaffiliated/natanaiel] has joined #ruby
<Natanaiel>
how can I set a folder in local system as a source in Gemfile?
<waxjar>
why would you use the Gemfile for that?
SterNiX [SterNiX!~LessIsMor@unaffiliated/nu253r/x-0655220] has joined #ruby
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has joined #ruby
<Natanaiel>
to install all the required gem files automaticly. I have all of them in my localsystem, but I don't want to install them one by one
<Natanaiel>
waxjar: ^^
<waxjar>
it's not really what Bundler is intended for.
<waxjar>
do you have .gems or just folders of code?
durre [durre!~kvirc@217-212-242-4.customer.telia.com] has joined #ruby
<Natanaiel>
waxjar: my real problem is I want to install snorby gem files with bundle install on a system that I have no internet
<Natanaiel>
so I've download gems files and copy them into cache folder
<Natanaiel>
but when I run bundle install it wants to connect to a source on the internet
<waxjar>
you could install them to a directory in your project folder on a machine you have internet on and transfer it to the machine without internet
<waxjar>
or write a simple ruby script that installs all .gems in directory x (an each block with system("gem i #{gem}") maybe)
<Natanaiel>
so can't I specify a file as a source?!
pen [pen!~pen@wl065.cc.ntu.edu.tw] has joined #ruby
QaDeS [QaDeS!~mklaus@frbg-5d84f8c6.pool.mediaWays.net] has joined #ruby
<phrame>
so @var gets you the variable, and self.var invokes the method that returns the variable
<Gekz>
phrame: correct.
<phrame>
okay
<phrame>
cool cool
<banisterfiend>
phrame: but in ruby @var is private, all ivars are private, so the only way to access it from outside the object is through a getter/setter
<phrame>
yeah
<phrame>
are they not inherited by children then?
<Gekz>
banisterfiend: can you be a tool and do something like self.x = 9
<Gekz>
would that make it public
<banisterfiend>
Gekz: how would that make it public
<banisterfiend>
phrame: ivars are not inherited in ruby
<phrame>
would that change the reference of .x away from the ivar x
<Gekz>
that was _my_ question :P
<banisterfiend>
no, that sets the ivar to 9
<banisterfiend>
assuming u have attr_accessor :x
<Gekz>
banisterfiend: oh I see, I just tested what I said
yellow5 [yellow5!~yellow5@levicole.xen.prgmr.com] has joined #ruby
<Gekz>
Python is what i'd call "weakly object oriented"
<phrame>
would you be able to uh
<Gekz>
I like how ruby makes methods and attributes distinct
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has joined #ruby
<phrame>
change x into an alias for 9 and dereference the ivar that used to be x
<phrame>
or are they essentially the same thing
<banisterfiend>
phrame: i think y ou're confusing objects and variables
<phrame>
probably :p
<Gekz>
banisterfiend: ooh, you might be able to answer my question. I have an 136MB XML file that I want to query with a webapp. Would it be saner to just convert it into SQL or is there a nice way I could do this?
<banisterfiend>
Gekz: no idea
<Gekz>
blah
<banisterfiend>
Gekz: ask in #ruby-lang
<Gekz>
how does that differ to this channel?
<banisterfiend>
it's more official
<Gekz>
moar
skim1776 [skim1776!~sergey@95.56.183.160] has quit [#ruby]
zbrown [zbrown!~zbrown@rufius.xen.prgmr.com] has joined #ruby
flippingbits [flippingbits!~anonymous@ip-81-210-178-39.unitymediagroup.de] has joined #ruby
palcu [palcu!~alex@89.122.187.223] has joined #ruby
abstrusenick [abstrusenick!~abstrusen@bb220-255-36-18.singnet.com.sg] has joined #ruby
ixti [ixti!~ixti@80.31.118.40] has joined #ruby
p0y [p0y!~p0y@182.18.249.40] has joined #ruby
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby
azbarcea_ [azbarcea_!~quassel@79.114.115.193] has joined #ruby
RomD` [RomD`!~Roman@nrbg-4d076620.pool.mediaWays.net] has joined #ruby
burgestrand [burgestrand!~burgestra@81-229-85-235-no66.tbcn.telia.com] has joined #ruby
need_shell [need_shell!~need_shel@122.160.42.91] has joined #ruby
<need_shell>
Hi all
<need_shell>
I need help, please be kind :)
<burgestrand>
linduxed: you managed to get around your non-working destroy? :)
<need_shell>
I am writing a small ruby script which should read first 50 words from a very long single line
<need_shell>
I am trying using regex for this but am unable to write one properly
p0y [p0y!~p0y@182.18.249.40] has joined #ruby
<need_shell>
So could please somebody help me with that
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby
Spockz [Spockz!~Spockz@84.245.46.110] has joined #ruby
<burgestrand>
need_shell: you’ll be more likely to get help if you show us a minimal example of what you’ve tried, and explain what you expect it to do and then explain what it does instead
<need_shell>
ok.
whaity [whaity!~whaity@cpc13-lewi14-2-0-cust680.2-4.cable.virginmedia.com] has joined #ruby
pen [pen!~pen@140.112.30.137] has joined #ruby
<need_shell>
For now, I have just three lines of code
<need_shell>
these
<need_shell>
file = File.read("output.txt")
<need_shell>
match = file.scan(/^(...){0,50}/)
<need_shell>
print match
<need_shell>
output.txt contains dump from a network stream
<need_shell>
I am trying to read first 50 words (or 200 characters) from the file
<need_shell>
my regex is surely wrong, I need help regarding the regex
<nd___>
/\w{0,50}/ <-- like this?
<burgestrand>
\w is a word character, not a word in itself; you’d probably be better of matching the boundaries between words (most likely a single whitespace)
workmad3 [workmad3!~workmad3@host-84-13-69-129.opaltelecom.net] has joined #ruby
<need_shell>
that is the problem its a hex output..something likethis
<need_shell>
may be first 300 characters may also do for me
<burgestrand>
there’s also the case that scan will give you an array, and for a very long line this could prove to be a lot of unneeded work (and take much longer than it needs to), but it could also be the case that your very long line is not really very long at all and it might not be a problem
<nd___>
Might it be easier here to just trim each line to the first x characters?
<need_shell>
burgerstrand: it is really long, may be 1000 "words" in form of 0x33
<need_shell>
nd___: its a single line..I intend to read first 50 words or 300 characters first, then next ones till EOF
<burgestrand>
need_shell: I still don’t understand what your actual input is and what your output should be
akem [akem!~akem@unaffiliated/akem] has joined #ruby
<need_shell>
my input is a file which contains a single line of hex in the form......,0xa8,0x01,0x32,0x68,0x02,0x00,0x11,0x5c,0x89,0xe6,0x6a,0x10,0x56,0x57,
<burgestrand>
need_shell: okay, then in this input, what constitutes a word?
<need_shell>
it is a single line which is _really_ long....may be 5000 characters
<need_shell>
the commas? Am I wrong assuming that?
<need_shell>
I mean ,0x5c, is a word
<burgestrand>
need_shell: you’re wrong assuming us assuming that, but alright, so assuming you were looking for just five words, would the output be ['0xA8', '0x01', '0x32', '0x68', '0x02']?
<burgestrand>
or do you want the commas included as well?
<burgestrand>
what about if there’s multiple commas between each word?
<need_shell>
there will be no multiple commas and yes the commas are required as well
<need_shell>
the output is machine generated
<need_shell>
it would be ok if we can read first, say 200, characters
Tuxist [Tuxist!~quassel@dyndsl-085-016-196-179.ewe-ip-backbone.de] has joined #ruby
<need_shell>
I was using File instead of file
<need_shell>
damn caps
<need_shell>
thanks all
<need_shell>
:)
mengu [mengu!~mengu@unaffiliated/mengu] has joined #ruby
sinuc_ [sinuc_!~sinuc@irssi.sinuc.boxnet.eu] has joined #ruby
Sliker [Sliker!~ponies@46.208.206.144] has joined #ruby
durre [durre!~kvirc@217-212-242-4.customer.telia.com] has joined #ruby
_md [_md!~mduarte@cpc4-finc13-2-0-cust568.4-2.cable.virginmedia.com] has joined #ruby
freenodiz [freenodiz!~IceChat77@unaffiliated/freenodiz] has joined #ruby
Manhose [Manhose!~Manhose@bl17-17-151.dsl.telepac.pt] has joined #ruby
<freenodiz>
How would you compare in speed,system performance ,etc,a rails app with nginx as a proxy and unicorn vs a drupal(pressflow) install ,with nginx and varnish ?
xpot [xpot!~xpot@166-70-100-198.ip.xmission.com] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
mogria [mogria!~mogria@19-232.62-81.cust.bluewin.ch] has joined #ruby
p0y [p0y!~p0y@112.210.58.225] has joined #ruby
vmatiyko [vmatiyko!~vmatiyko@178.120.67.145] has joined #ruby
waxjar [waxjar!~waxjar@82-170-1-70.ip.telfort.nl] has joined #ruby
ikaros [ikaros!~ikaros@dslb-188-107-221-154.pools.arcor-ip.net] has joined #ruby
poseid [poseid!52877a23@gateway/web/freenode/ip.82.135.122.35] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
<poseid>
i am looking at a sample Rails project, where there is a class Role and a class Reference::Role
philcrissman [philcrissman!~philcriss@206.57.45.116] has joined #ruby
<poseid>
i am wondering why you would have the difference....
<poseid>
i have the impression that in Reference::Role there are setup some shortcuts
<poseid>
e.g. you can write something like this: role.administrator?
<poseid>
the code is: define_method("#{role}?") { name == role.to_s }
<poseid>
in the reference class you define the initial roles: TYPES = [ :administrator, :artist, :producer, :subscriber, :visitor ]
<csmrfx>
no
<csmrfx>
the author of the class has predefined those
<poseid>
ok, reference model predefines the roles...
<poseid>
sorry for my confusion, but would it be possible to extend that class dynamically...
<csmrfx>
you did notice those are in diff modules
<poseid>
e.g. extending TYPES array after the classes have been loaded?
<csmrfx>
I think it is possible
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby
<linduxed>
burgestrand: yeah, i did
<linduxed>
burgestrand: turns out rails wants its javascript....
<linduxed>
burgestrand: i had noscript blocking scripts from localhost, which didn't exactly help
<poseid>
csmrfx: what would be the implications of not using different modules?
<poseid>
for that reference part and the concrete part
<poseid>
that reference part looks somewhat like meta-definitions
<csmrfx>
imo that would imply a different use for the classes
<linduxed>
burgestrand: figuring out what the hell was going on wasn't the best time i've had... it hit me after an hour of googling when someone was speaking of the need to load some custom js to make his site work
p0y [p0y!~p0y@112.210.58.225] has joined #ruby
p0y_ [p0y_!~p0y@182.18.249.40] has joined #ruby
<poseid>
ok... will do some experiments... thanks for dicussions
gen0cide_ [gen0cide_!~TigerBloo@c-76-126-176-33.hsd1.ca.comcast.net] has joined #ruby
Spockz [Spockz!~Spockz@84.245.46.110] has joined #ruby
rippa [rippa!~rippa@87-253-25-62.pppoe.yaroslavl.ru] has joined #ruby
`brendan [`brendan!~b@66-208-246-34-ubr02b-waldlk01-mi.hfc.comcastbusiness.net] has joined #ruby
<`brendan>
morning folks
gen0cide_ [gen0cide_!~TigerBloo@c-76-126-176-33.hsd1.ca.comcast.net] has joined #ruby
gen0cide_ [gen0cide_!~TigerBloo@c-76-126-176-33.hsd1.ca.comcast.net] has joined #ruby
gen0cide_ [gen0cide_!~TigerBloo@c-76-126-176-33.hsd1.ca.comcast.net] has joined #ruby
jbpros [jbpros!~jbpros@d515285E6.access.telenet.be] has joined #ruby
rmenn [rmenn!cb91b57a@gateway/web/freenode/ip.203.145.181.122] has joined #ruby
tcurdt [tcurdt!~tcurdt@dslb-188-097-069-059.pools.arcor-ip.net] has joined #ruby
<rmenn>
Hey i have a quick question - i have ruby wrapper script to run a particular command but i am unable to see the output generated by the execution, what is the best way to do this
kreantos [kreantos!~simon@95.232.110.3] has joined #ruby
<kreantos>
v+
cousine [cousine!~cousine@196.221.242.180] has joined #ruby
flippingbits [flippingbits!~anonymous@ip-81-210-178-39.unitymediagroup.de] has joined #ruby
BrianE [BrianE!~brian@87.115.115.247] has joined #ruby
<burgestrand>
linduxed: :)
<burgestrand>
linduxed: the reason is because you can’t send put/delete requests from most browsers at all (and even if you could, it’d be with a form with the appropriate method set); and your browser defaults to a GET request
madsgraphics [madsgraphics!~madsgraph@mail.11labo.net] has joined #ruby
hzlocky_ [hzlocky_!~me@dynamic-vpdn-93-125-15-168.telecom.by] has joined #ruby
<visof>
when i run ruby code first time it run slow but when run it again it run faster than the first time, is that true? , because interpreter cache the values?
<burgestrand>
visof: no
<shevy>
visof ruby runs faster when it rides a pony
<`brendan>
what kinda pony?
yakko [yakko!~quassel@200-140-84-9.bsace702.dsl.brasiltelecom.net.br] has joined #ruby
abstrusenick [abstrusenick!~abstrusen@bb220-255-36-18.singnet.com.sg] has joined #ruby
<linduxed>
burgestrand: oh yeah... i read somewhere that someone a long time ago thought DELETE would be too dangerous to allow as a signal to send
Marco [Marco!~marco@pat32.dartmouth-secure.border1-cfw.Dartmouth.EDU] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
p0y [p0y!~p0y@112.210.58.225] has joined #ruby
sbanwart [sbanwart!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
akem [akem!~akem@164.15.85.79.rev.sfr.net] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
thomascioppettin [thomascioppettin!~thomascio@cpe-071-071-047-213.triad.res.rr.com] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
jwmann [jwmann!~Adium@modemcable242.110-201-24.mc.videotron.ca] has joined #ruby
bluOxigen [bluOxigen!~noreply@unaffiliated/bluOxigen] has joined #ruby
Manhose [Manhose!~Manhose@bl17-17-151.dsl.telepac.pt] has joined #ruby
Manhose_ [Manhose_!~Manhose@bl17-17-151.dsl.telepac.pt] has joined #ruby
<burgestrand>
linduxed: it would be dangerous if it was sent by merely visiting a link, same reason to why you need to use forms to send POST requests with browsers (interestingly enough, I believe many browsers support GET/POST/PUT/DELETE for XHR requests)
trivol [trivol!~aurelien@ip-178.net-89-2-84.rev.numericable.fr] has joined #ruby
vraa [vraa!~vraa@c-76-30-135-64.hsd1.tx.comcast.net] has joined #ruby
pencilcheck [pencilcheck!~pen@dhcp1.csie.ntu.edu.tw] has joined #ruby
p0y [p0y!~p0y@182.18.249.40] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
senny [senny!~senny@77-56-67-120.dclient.hispeed.ch] has joined #ruby
provideal [provideal!~hornp@p4FFF85E5.dip.t-dialin.net] has joined #ruby
<visof>
burgestrand: is ruby faster than python?
vraa [vraa!~vraa@h188.182.213.151.dynamic.ip.windstream.net] has joined #ruby
bnewton [bnewton!~bnewton@cpe-66-68-94-56.austin.res.rr.com] has joined #ruby
Yu\2 [Yu\2!~Yu@2001:638:504:f1f6:213:77ff:feb6:afb0] has joined #ruby
<shevy>
burgestrand: can you shower my cat?
thecreators [thecreators!~rskagy@cpe-65-27-201-203.cinci.res.rr.com] has joined #ruby
<yakko_watch_dhh>
visof: it's more OO than python
devdazed [devdazed!~russ_nyc@static-96-239-59-191.nycmny.fios.verizon.net] has joined #ruby
pietro_ [pietro_!~pietro@2-227-162-47.ip187.fastwebnet.it] has joined #ruby
Manhose [Manhose!~Manhose@bl17-17-151.dsl.telepac.pt] has joined #ruby
maasha [maasha!82e1d361@gateway/web/freenode/ip.130.225.211.97] has joined #ruby
<maasha>
Hi, I want to dump a data structure to disk and restore it. What fast methods do we have for that?
akem [akem!~akem@unaffiliated/akem] has joined #ruby
stayarrr [stayarrr!~olivererx@dslb-178-009-059-241.pools.arcor-ip.net] has joined #ruby
<skim1776>
iamjarvo, that's now exactly what I'm searching for, I need to learn how code is structured within project, how code is tested, what are the most useful patterns, etc.
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby
<confounds>
ah
<confounds>
there's probably not a single source for all that
<iamjarvo>
ooo you just want to read source
<confounds>
skim1776 maybe look at some popular, smaller gems
<skim1776>
confounds, not perfect code, but close to it
Marco [Marco!~marco@pat32.dartmouth-secure.border1-cfw.Dartmouth.EDU] has joined #ruby
dch4pm4n [dch4pm4n!~d@gateway/tor-sasl/dchapman1988] has joined #ruby
thomascioppettin [thomascioppettin!~thomascio@cpe-071-071-047-213.triad.res.rr.com] has joined #ruby
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
vmatiyko [vmatiyko!~vmatiyko@178.120.67.145] has quit [#ruby]
Marco [Marco!~marco@Marco-2.Kiewit.Dartmouth.EDU] has joined #ruby
bbttxu [bbttxu!~adam@nt8rsctf1.unt.ad.unt.edu] has joined #ruby
Silker [Silker!~ponies@46.208.206.144] has joined #ruby
Skaag [Skaag!~Skaag@cpe-67-247-51-89.nyc.res.rr.com] has joined #ruby
bbttxu [bbttxu!~adam@nt8rsctf1.unt.ad.unt.edu] has joined #ruby
johanhsfy [johanhsfy!~johan@c-887471d5.012-52-6c756e10.cust.bredbandsbolaget.se] has joined #ruby
Cervajz [Cervajz!~Cervajz@opensuse/member/Cervajz] has joined #ruby
skim1776 [skim1776!~sergey@95.56.123.168] has joined #ruby
jmaister [jmaister!~jmaister@unaffiliated/jmaister] has joined #ruby
Sliker_ [Sliker_!~ponies@46.208.206.144] has joined #ruby
danheberden [danheberden!~danheberd@li225-35.members.linode.com] has joined #ruby
workmad3 [workmad3!~workmad3@host-84-13-69-129.opaltelecom.net] has joined #ruby
conor_ireland [conor_ireland!~conor_ire@89.100.121.49] has joined #ruby
idarkside [idarkside!~YourNick@5e0eccf0.bb.sky.com] has joined #ruby
Pip [Pip!~Pip@pppoe-188-187-43-137.volgograd.ertelecom.ru] has joined #ruby
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby
<idarkside>
hi
<idarkside>
im looking for some advice
p0y_ [p0y_!~p0y@112.210.58.225] has joined #ruby
provideal [provideal!~hornp@p4FFF85E5.dip.t-dialin.net] has joined #ruby
<shevy>
idarkside we can help especially with sex-related issues
<idarkside>
lol
bnewton [bnewton!~bnewton@cpe-66-68-94-56.austin.res.rr.com] has joined #ruby
<idarkside>
im wanting get GET a url within a siriproxy plugin is this achevable?
waxjar [waxjar!~waxjar@82-170-1-70.ip.telfort.nl] has joined #ruby
<idarkside>
shevy
codefriar [codefriar!~codefriar@cpe-098-026-012-134.nc.res.rr.com] has joined #ruby
<shevy>
I dont know what is siriproxy
Witide [Witide!~Witide@adsl-65-9-107-116.mia.bellsouth.net] has joined #ruby
dcarper_ [dcarper_!~dcarper@50-73-187-102-pennsylvania.hfc.comcastbusiness.net] has joined #ruby
<shevy>
but I am going the easy route and say it is not possible
<idarkside>
lol
<idarkside>
i knw its possible just not entirely sure where to start
<confounds>
start at the beginning
<idarkside>
i can give u a copy of the example plugin for the proxy
luxurymode [luxurymode!~luxurymod@rrcs-184-75-21-21.nyc.biz.rr.com] has joined #ruby
<idarkside>
ok siriproxy is for the iphone 4s allows custom commands via siri
<fluke_>
well I know roughly what it does and when trying to run a method it works. But with binding there is probably some subtlety like what is bind to self. Since I am a little bit rusty on this meta stuff I thought it will be piece of cake for you guys :-)
<fluke_>
but thanks anyway
<fluke_>
I will experience a little and get back here if I crack it
<shevy>
aha
<shevy>
fluke_, "These binding objects can be passed as the second argument of the Kernel#eval method, establishing an environment for the evaluation."
<shevy>
hmm
<shevy>
I guess for instance_eval it is a bit similar
<shevy>
using yield I suppose
<fluke_>
shevy: yes this is actually what I wanna do. I want to start a Ripl session with a particular binding
<fluke_>
but these two commands obviously return different bindings and off the top of my head I do not know why
<shevy>
fluke_ the man to know it all about bindings is banisterfiend, have a look at pry https://github.com/pry/pry there is a lot of magic in it
<fluke_>
shevy: thanks
vraa_ [vraa_!~vraa@h136.231.29.71.dynamic.ip.windstream.net] has joined #ruby
<shevy>
hmm
<shevy>
anyone have a need for a ruby script that generates a xorg.conf file?
a|i [a|i!~ali@unaffiliated/ai/x-9091534] has joined #ruby
<a|i>
how to test a gem from irb?
<a|i>
trying load 'main-gem-file' doe snot work in irb.
<shevy>
which version
<shevy>
require 'rubygems' first then try again but what kind of gem is it anyway
<a|i>
shevy: I'm developing a gem, and I want to test it in irb, before installing it.
<a|i>
shevy: so the gem is not installed yet.
<shevy>
a|i you are writing a gem yourself? you can install it locally too
joast [joast!~rick@76.178.187.164] has joined #ruby
<shevy>
I usually use setup.rb
<a|i>
shevy: yes, but I don't want to keep installing it.
<a|i>
any other ways of requiring it in irb?
<fluke_>
if it is your gem I would consider using bundler. Than you can really speed up the change use loop
Jay_Levitt [Jay_Levitt!~Jay_Levit@home.jay.fm] has joined #ruby
<fluke_>
you can tell bundler to use the gem from a place on disk not from your gem library
<fluke_>
bundle console will go into irb with preloaded gem
<a|i>
fluke_: I do use bundler, the question is, how to load my under development gem (which is not installed locally) from irb?
lateau_ [lateau_!~lateau@KD125054233174.ppp-bb.dion.ne.jp] has joined #ruby
<fluke_>
require 'bundler/setup'
<fluke_>
require 'yourgem'
<fluke_>
this does not work?
<a|i>
thank you!
<fluke_>
np
Carmivore [Carmivore!~carmivmor@ec2-174-129-144-205.compute-1.amazonaws.com] has joined #ruby
moshee [moshee!~moshee@c-50-135-229-127.hsd1.wa.comcast.net] has joined #ruby
moshee [moshee!~moshee@unaffiliated/moshee] has joined #ruby
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
stringoO [stringoO!~JLstring@CPE001346cbe31b-CM00111ae502a8.cpe.net.cable.rogers.com] has joined #ruby
<nd____>
I'm using /CONTEXT[^\}]*\}/m to match several lines in a string with grep, but I get no match. Changing it to e.g. /CONTEXT[^\}]*\{/m which only matches the first of the multiple lines, it works. So does multiline-mode not work with grep?
Yu\2 [Yu\2!~Yu@ubi-1-50-40.zif.uni-bielefeld.de] has joined #ruby
ChampS_ [ChampS_!~ChampS@p54B4A3A0.dip.t-dialin.net] has joined #ruby
looopy [looopy!~looopy@static-71-166-232-207.washdc.east.verizon.net] has joined #ruby
* tnk1
is back.
bier [bier!~bier@p54A5A7AD.dip.t-dialin.net] has joined #ruby
<nd____>
Ah, the »trick« is to use scan… so I assume grep works for each line…
ryan_marsh [ryan_marsh!~ryan_mars@99-160-193-138.lightspeed.hstntx.sbcglobal.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
burgestrand [burgestrand!~burgestra@81-229-85-235-no66.tbcn.telia.com] has joined #ruby
Marco [Marco!~marco@Marco-2.Kiewit.Dartmouth.EDU] has joined #ruby
savage- [savage-!~savage-@209.118.197.220] has joined #ruby
new_ruby_program [new_ruby_program!~new_ruby_@pool-173-58-89-188.lsanca.fios.verizon.net] has joined #ruby
visof [visof!~visof@41.196.196.150] has joined #ruby
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has joined #ruby
dasfugufish [dasfugufish!~Adium@174-27-233-214.slkc.qwest.net] has joined #ruby
<jmaister>
I have a question regarding Nokogiri: How can I retrive the content of the HTML body (with HTML) but omit the body tags?
<jmaister>
If i use @body = doc.at_xpath("//body").content, I do get the content, but all HTML is stripped as well
kenperkins [kenperkins!~textual@174-24-180-141.tukw.qwest.net] has joined #ruby
colint [colint!~ColinT@64.9.146.220] has joined #ruby
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby
colint_ [colint_!~ColinT@69-11-97-130.regn.static.sasknet.sk.ca] has joined #ruby
janissary [janissary!405a0bb2@gateway/web/freenode/ip.64.90.11.178] has joined #ruby
johnduhart [johnduhart!~quassel@46.105.138.12] has joined #ruby
visof [visof!~visof@41.196.196.150] has joined #ruby
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby
dv310p3r [dv310p3r!~dv310p3r@c-98-203-41-91.hsd1.fl.comcast.net] has joined #ruby
aknagi [aknagi!~aknagi@cpc7-dals14-2-0-cust243.hari.cable.virginmedia.com] has joined #ruby
apok [apok!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
flippingbits_ [flippingbits_!~anonymous@ip-81-210-178-39.unitymediagroup.de] has joined #ruby
syamajala [syamajala!~syamajala@c-75-68-106-118.hsd1.ma.comcast.net] has joined #ruby
Tachyon [Tachyon!~tach@81.200.61.23] has joined #ruby
p1d [p1d!~p1d@dslb-088-067-029-131.pools.arcor-ip.net] has joined #ruby
nekid [nekid!~nekid@c-24-6-170-1.hsd1.ca.comcast.net] has joined #ruby
trend [trend!~trend@97-81-69-219.dhcp.athn.ga.charter.com] has joined #ruby
apucacao [apucacao!~apucacao@thelevel.com] has joined #ruby
michael__ [michael__!~michael@213.8.57.217] has joined #ruby
savage- [savage-!~savage-@209.118.197.220] has joined #ruby
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby
jthomas_ [jthomas_!~jthomas@c-98-222-28-137.hsd1.il.comcast.net] has joined #ruby
* tnk1
is away: Gone away for now
eldariof [eldariof!~CLD@79.126.106.73] has joined #ruby
IceD^ [IceD^!~iced@178.120.182.103] has joined #ruby
BrianE [BrianE!~brian@87.115.115.247] has joined #ruby
yfeldblum [yfeldblum!~Jay@c-98-218-48-253.hsd1.md.comcast.net] has joined #ruby
tomzx [tomzx!~tomzx@dsl-216-221-39-59.aei.ca] has joined #ruby
Witide_ [Witide_!~Witide@adsl-65-8-193-202.mia.bellsouth.net] has joined #ruby
notbrent [notbrent!~notbrent@67.217.136.130] has joined #ruby
somebody_ [somebody_!~notbrent@67.217.136.130] has joined #ruby
notbrent [notbrent!~notbrent@67.217.136.130] has joined #ruby
somebody_ [somebody_!~notbrent@67.217.136.130] has joined #ruby
grilix [grilix!~grilix@r201-217-153-162.ir-static.anteldata.net.uy] has joined #ruby
Cervajz [Cervajz!~Cervajz@opensuse/member/Cervajz] has joined #ruby
sgaedu [sgaedu!~ar@masq61.gtn.ru] has joined #ruby
<burgestrand>
IceD^: I believe Array#uniq might go on #hash and #eql to compare identity of entries
jay_zawrotny [jay_zawrotny!~Jay@50-77-200-126-static.hfc.comcastbusiness.net] has joined #ruby
kakashi__ [kakashi__!~kakashi_@nltk/kakashi] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
<rippa>
burgestrand: yep, #hash
ZellFaze [ZellFaze!~Zell@pool-108-8-0-178.hgrtmd.east.verizon.net] has joined #ruby
<ZellFaze>
I'm coming to Ruby from PHP. Can constants be DONELIKETHIS or do they have to be DoneLikeThis? What is the prefer means of naming constants if both are acceptable.
<shevy>
ZellFaze the only convention is that the first character must be capitalized
<shevy>
so Foo is a constant FOO is as is FoO
<shevy>
usually though most will use a CONSTANT_LIKE_THIS for constants
<shevy>
BASE_DIR = '/tmp'
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
<ZellFaze>
Excellent. Just like in PHP. I was hoping for that. The Ruby book I am reading right now uses ThisMethodOfCapitalization for constants instead of THIS_ONE.
<robyurkowski>
ZellFaze: most ruby books are notoriously out of date with community standards :)
<shevy>
CamelCase like that is usually for ruby classes
<robyurkowski>
but i've honestly never seen CamelCase for actual constants
<shevy>
class FooBar # and the file is then usually called foo_bar.rb
<shevy>
but ZellFaze see, class Foo <-- is also a constant
<shevy>
you wont see many doing class FOO though
adnan [adnan!~king@108-215-232-154.lightspeed.hstntx.sbcglobal.net] has joined #ruby
<ZellFaze>
I see. Classes are done using ThisStyle and constants that are str, int, etc. are done using THIS_STYLE?
<shevy>
usually yeah
<ZellFaze>
Again, just like in PHP (and also Java, and C++).
<ZellFaze>
Beautiful.
<ZellFaze>
Are regular variable types (int, str, etc.) done like_this or likeThis?
<shevy>
downcased all
<burgestrand>
ZellFaze: snake_case
<shevy>
every now and then someone breaks a convention though
<shevy>
qtruby for instance uses ...
<shevy>
setWidth
<shevy>
for method calls though
<burgestrand>
ZellFaze: same with method names, they are also snake_case
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby
<shevy>
ZellFaze my favourite variable name is _
<ZellFaze>
I can live with that. Thank you guys again. My new job requires I learn Ruby and I want to make sure my coding style fits with convention.
<ZellFaze>
That is a legal variable?
<shevy>
yeah
<shevy>
but I like it because I dont have to come up with any name
<shevy>
I use it for throwaway stuff though
<shevy>
usually variable names should make sense :)
<ZellFaze>
I usually use tmp for such things.
<burgestrand>
ZellFaze: only used for variables you are not going to use, but even then it’s confusing
<shevy>
hehe I used to do
<shevy>
at one point I even used _tmp
<shevy>
until I decided I hate that
<burgestrand>
(at times)
<ZellFaze>
Why did you prepend a _?
<shevy>
dunno, cant remember
<shevy>
it made the code uglier though
ChampS_ [ChampS_!~ChampS@p54B4C906.dip.t-dialin.net] has joined #ruby
<ZellFaze>
Aye.
tvo [tvo!~tvo@katapult/developer/tvo] has joined #ruby
<shevy>
what kind of job is it though if I may ask? rails related?
<ZellFaze>
I am the IT person for a small medical research (pathology) place.
pantsman [pantsman!~pantsman@2.25.208.118] has joined #ruby
pantsman [pantsman!~pantsman@pdpc/supporter/active/pantsman] has joined #ruby
<ZellFaze>
Most of their systems are written in Ruby and they would like them to work together a bit better.
<robyurkowski>
i think _ are generally used to denote variables that are temporary to a class or method in a library that may have conflicts with defined methods or instance variables
<ZellFaze>
I presume I will also have to learn Rails for the frontend portion. I honestly don't yet know the scope of this project. I start work there tomorrow and their makeshift IT person is going to let me know what is going on.
<robyurkowski>
i.e. if you have a class Elephant with a method called #name, you wouldn't want to use 'name' as a variable outside the context of calling that method
<ZellFaze>
Is there not something like "this" in Ruby?
<shevy>
coll ZellFaze
<robyurkowski>
ZellFaze: self :)
<shevy>
i mean
<shevy>
cool, not coll
<shevy>
I am surprised they were using Ruby
<robyurkowski>
but a lot of times you don't need 'self'
<shevy>
yeah
<shevy>
def foo
<any-key>
you can use @
<shevy>
self.some_other_method
<shevy>
end
<shevy>
but you can omit it almost always
<ZellFaze>
In Java and in PHP I almost always make it explicit.
<ZellFaze>
Just a personal preference of mine.
<shevy>
ok but how do you do it really
<shevy>
it is something like ...
<shevy>
$this->foo("bla");
<shevy>
right?
<robyurkowski>
ZellFaze: like i said, most of the time, you don't need to explicitly use it
<shevy>
in ruby
<shevy>
foo 'bla'
<robyurkowski>
ruby uses @variable for instance variables
<ZellFaze>
shevy: Yes. Like that.
<robyurkowski>
it's only when you have something like... class MyClass; def foo; "foo"; end; end; and you're writing a new method that needs to assign to a temporary variable 'foo'
<robyurkowski>
in that situation you might write _foo
<robyurkowski>
it's bad usage, but it does happen from time to time
<shevy>
def set_foo(i); @foo = i; end ... or ... via attr* shortcuts ... attr_accessor :foo (though that creates .foo=(i) and not set_
<robyurkowski>
yeah, don't use set_foo, that's just gross :P
<shevy>
:)
<ZellFaze>
Globabl constants. Would $Constant (or $CONSTANT) be a global constant or just a global variable?
<shevy>
nono
<burgestrand>
$var is a global variable, constants are always global
<robyurkowski>
that's just weird
<burgestrand>
ZellFaze: ^
<shevy>
$FOO is just a global variable
<ZellFaze>
Alright.
<shevy>
though I dont know anyone who uses that
<shevy>
it looks ugly :/
<burgestrand>
$LOAD_PATH
<shevy>
OH
<shevy>
oh ...
<shevy>
:(
<ZellFaze>
So what do you do if you need a constant inside of a class?
<burgestrand>
$LOADED_FEATURES… and so on :)
<shevy>
yeah I remember now ... $: $` and so on
<robyurkowski>
ZellFaze: a constant specific to that class or a constant from outside the class?
<shevy>
I can't remember their meaning without looking at a reference
<burgestrand>
ZellFaze: modules (and classes) namespace their constants if defined inside them
<robyurkowski>
as a general rule of thumb, don't use $ unless you know why you have to use it
<shevy>
I remember I used $this when I wrote PHP classes years ago
<burgestrand>
ZellFaze: @variable ~= $this->variable, as well as self::$variable
<burgestrand>
ZellFaze: PHP has no equivalent to the @@variable
<shevy>
hmm so they are the same?
<ZellFaze>
No.
<shevy>
ok one moment need to get my head wrapped around it still
<ZellFaze>
self::$variable is shared by all instances of a class. $this->variable is local to a particular instance.
<shevy>
aha
<ZellFaze>
self::$variable is a static variable (they also exist in Java in the same fashion) $this->variable is an instance variable (again, they also exist in java is you know that language)
josemota [josemota!~josemota@2.81.221.31] has joined #ruby
<ZellFaze>
So there is no PHP equivalent to @@?
<burgestrand>
ZellFaze: nope
<shevy>
remember the 98% rule!
<shevy>
hmm I should write a script that scans through github ruby scripts and counts the % of @@ used
<waxjar>
i found out about TomDoc recently, really nice
logic [logic!~logic@unaffiliated/bitch333z] has joined #ruby
<shevy>
but I also got tired of describing every method... so these days, I document when the method is important, or when a design decision was made, and explaining that
<shevy>
and I dont document the really small methods
<ZellFaze>
Do block inherit variables from outside them?
<ZellFaze>
Or do they have to be explicitly passed with ||
<shevy>
what do you mean with inherit
<waxjar>
yes
<shevy>
you can scope to the variable outside
<robyurkowski>
ZellFaze: they scope outside but not vice versa
<shevy>
a = "foo"; array.each {|i| puts a }
<robyurkowski>
a method defined inside the block is in a deeper scope
<shevy>
vs.
<shevy>
a = "foo"; array.each {|a| puts a }
paissad [paissad!~paissad@89-92-16-151.hfc.dyn.abo.bbox.fr] has joined #ruby
<shevy>
you should give block arguments good names ZellFaze
<ZellFaze>
Wouldn't that be better done with () instead of yield? When would one make use of yield?
daniel_hinojosa [daniel_hinojosa!~danno@67-0-103-21.albq.qwest.net] has joined #ruby
<shevy>
hmm
<shevy>
you can continue to use () without a problem
<shevy>
but you can additionally use a block to any method as well
<shevy>
I dunno really
<ZellFaze>
Also so the function defines what can be put into ||, you just get to name it. You can't pass arbitrary items. (But you needn't either because the block uses the same vars as outside it).
<shevy>
I just know I love them
<shevy>
you can use a subset of Ruby without any problem
<shevy>
oh yeah good point from robyurkowski
<shevy>
{} is also a hash
<shevy>
hash = { 'cat' => 'mouse' }
jbpros [jbpros!~jbpros@122-178-112-217.dyn.adsl.belcenter.be] has joined #ruby
<shevy>
hash['cat'] # => "mouse"
<ZellFaze>
I've decided Ruby is it's own family. Usually I can classify languages into families (C, ASM, PERL, etc.) but Python and Ruby now have thrown me for a loop in being very very different from everything else.
<ZellFaze>
Oh.
<ZellFaze>
Gotcha. So {} is not just used for blocks but also arrays?
<robyurkowski>
ZellFaze: Ruby is the result of Perl and Smalltalk making babies.
<shevy>
ZellFaze hashes!
<robyurkowski>
you see the perl on the first level, but the smalltalk comes out the more you use it
<shevy>
array = [ "abc", "def" ]
xybre [xybre!x@minion.xeitek.com] has joined #ruby
<shevy>
array[0] # => "abc"
<robyurkowski>
ZellFaze: Hashes, or sometimes called Dictionaries
<ZellFaze>
So hashes are associative arrays?
<robyurkowski>
associative arrays
<shevy>
Hashes!!!
<shevy>
hehe
<ZellFaze>
Beautiful.
<shevy>
well yeah
<shevy>
but I call them hashes all the time
<robyurkowski>
datatype review:
<robyurkowski>
1. Integers / Floats
<robyurkowski>
2. Strings
idarkside [idarkside!~YourNick@5e0eccf0.bb.sky.com] has joined #ruby
<robyurkowski>
3. Symbols, which are interned strings
<shevy>
PHP seems to prefer to call them arrays
<robyurkowski>
4. Arrays
<robyurkowski>
4. Hashes (assoc. arrays)
<robyurkowski>
5. Regex
<robyurkowski>
day-to-day, that's it
<shevy>
hey
<shevy>
you have 2x 4.
<robyurkowski>
oops
<robyurkowski>
my bad :)
<ZellFaze>
How do symbols work. I've seen you guys use them a few times.
<ZellFaze>
But I don't yet quite grasp them.
<shevy>
I think smalltalk has something ruby doesn't quite have
<shevy>
that environment thing
<robyurkowski>
ZellFaze: they're like strings that are declared once and kept in memory
<shevy>
symbols are boring
<robyurkowski>
you know any C?
<shevy>
that's the most important point to remember about them
* ZellFaze
squeezes fingers together.
<ZellFaze>
About this much.
<robyurkowski>
basically, they're an immutable string
<ZellFaze>
Ok.
<shevy>
totally boring
<robyurkowski>
which makes them very memory-efficient
<ZellFaze>
That much I do know.
<shevy>
they are often used in hashes
Carmivore [Carmivore!~carmivmor@ec2-184-72-134-164.compute-1.amazonaws.com] has joined #ruby
<shevy>
{ :foo => "bla"}
jbpros [jbpros!~jbpros@54-178-112-217.dyn.adsl.belcenter.be] has joined #ruby
<ZellFaze>
That makes sense.
<burgestrand>
and often it does not matter if you use a symbol or a string
<robyurkowski>
they're used where any sort of uncomplicated text is used repeatedly
<ZellFaze>
Can you delete them from memory?
<burgestrand>
no
<burgestrand>
Once used, they stay.
<shevy>
you cant really do much with memory & ruby
<robyurkowski>
there'd be no point in doing so anyway
<shevy>
I think the GC will collect unusued variables sometimes
Cyrus [Cyrus!~Cyrus@cpe-173-173-106-235.satx.res.rr.com] has joined #ruby
Cyrus [Cyrus!~Cyrus@unaffiliated/cyrus] has joined #ruby
<shevy>
or unreferenced ones
<robyurkowski>
ZellFaze: most times you won't have to delete variables
<robyurkowski>
GC will grab it pretty quick
<shevy>
but I guess if you really have a need for speed, there is no way around C anyway
<shevy>
and remember! perl is faster than ruby anyway
<ZellFaze>
I know, but occasionally I've run into situations where it is useful (don't ask me for any offhand, I just remember looking up how to do it once in PHP).
<shevy>
and boy, lua!!! that's travelling at lightning speed
<ZellFaze>
x86 assembly is the way to go.
<ZellFaze>
:P
<robyurkowski>
eff x86
<shevy>
MenuetOS!
<robyurkowski>
direct bytecode
<burgestrand>
ZellFaze: there’s no way to explicitly free an object, banisterfiend made a gem for it but as far as I know it’s a hack
<robyurkowski>
not an OS, but close enough for most people
<shevy>
it's a little bit a hybrid model
<shevy>
grep -v <-- uses C grep
<robyurkowski>
any other specific questions, ZellFaze?
<ZellFaze>
Not at the moment, but I'm sure I will have more.
<shevy>
imagine if all the language on an OS could be contained in a ruby-like fashion
<shevy>
oops
<shevy>
I mean
<shevy>
if all the *LOGIC
xybre [xybre!~xybre@minion.xeitek.com] has joined #ruby
<ZellFaze>
I'm reading a book on Ruby and also trying to keep up on #bitcoin-dev, so it might be a bit before I have another question. But I'm sure I will have more.
<shevy>
would be easier to understand than the underlying C, if you have a good convention that makes sense
<ZellFaze>
Nothing beats having someone explain something to you for learning. (Especially with code examples)
<shevy>
remember! the only way to learn ruby is to write ruby
<burgestrand>
One thing does; writing it yourself
<shevy>
:)
<ZellFaze>
Indeed.
<waxjar>
hah, i wrote a little bit coin tool in ruby
<robyurkowski>
best thing to do is to challenge yourself
<robyurkowski>
make me a program that picks teams of two from a random array of players in no more than 7 lines.
<robyurkowski>
I've done it in 5
<robyurkowski>
that wasn't the most efficient it could be done either :D
<banisterfiend>
u could do it in 1 i think
<robyurkowski>
well, yes, but not using semicolons.
<ZellFaze>
I saw the line " require 'net/http'" and wanted to know exactly how that worked.
<burgestrand>
ZellFaze: it’ll look through the array of $LOAD_PATH, which is a list of directories, and then try to find the file relative to any of those directories
Cervajz [Cervajz!~Cervajz@opensuse/member/Cervajz] has joined #ruby
<ZellFaze>
Was it like Java in that we assume a certain directory structure? Or was that just a core library type thing so we don't need to specify its location.
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has joined #ruby
<ZellFaze>
Beautiful.
<burgestrand>
ZellFaze: require will look through $LOADED_FEATURES before trying to require the file, if it’s in there it will not be loaded again, otherwise it will load (and execute) the file, and then put it into $LOADED_FEATURES
<burgestrand>
ZellFaze: load does not check $LOADED_FEATURES, and it also does not automatically append file extension to required files, require will use any valid extension and try to load it if found
<ZellFaze>
That explains the lack of file extension.
<ZellFaze>
And Gems from what I gathered are a type of library? Kind of like PEAR is for PHP?
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has quit [#ruby]
s0ber_ [s0ber_!~s0ber@114-36-236-160.dynamic.hinet.net] has joined #ruby
y3llow_ [y3llow_!~y3llow@114-36-236-160.dynamic.hinet.net] has joined #ruby
<robyurkowski>
ZellFaze: actually, similar to PEAR, but better because they don't require root user access
<robyurkowski>
so long as rubygems is installed globally, you're laughing
<ZellFaze>
Beautiful.
<ZellFaze>
I hate asking for PEAR packages that aren't installed to be installed.
<robyurkowski>
it's also used more frequently and has a wider variety of packages
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby
y3llow [y3llow!~y3llow@114-36-236-160.dynamic.hinet.net] has joined #ruby
trivol [trivol!~aurelien@ip-178.net-89-2-84.rev.numericable.fr] has joined #ruby
y3llow [y3llow!~y3llow@114-36-236-160.dynamic.hinet.net] has joined #ruby
elliot98 [elliot98!~elliot@IGLD-84-229-15-130.inter.net.il] has joined #ruby
flippingbits_ [flippingbits_!~anonymous@ip-81-210-178-39.unitymediagroup.de] has joined #ruby
Cervajz_ [Cervajz_!~Cervajz@93.99.93.150] has joined #ruby
elliot98 [elliot98!~elliot@unaffiliated/elliot98] has joined #ruby
madsgraphics [madsgraphics!~madsgraph@labs.madsgraphics.com] has joined #ruby
indeterminate [indeterminate!~sei@user-3c2h3m6.cable.mindspring.com] has joined #ruby
skmidry [skmidry!~skmidry@c-50-132-95-135.hsd1.wa.comcast.net] has joined #ruby
monban [monban!~gatekeepe@awesome-opossum.com] has joined #ruby
pietro__ [pietro__!~pietro@2-227-162-47.ip187.fastwebnet.it] has joined #ruby
Drakx [Drakx!~dunno@unaffiliated/drakx] has joined #ruby
<ZellFaze>
shevy, robyurkowski, burgestrand: I mentioned a PHP challenge we did some months ago.
<ZellFaze>
I found one of the solutions. <?php $temperature = 23;($i="temperature")&&$$i<20|$$i>25||print"Room $i is between 20 and 25";?>
jbpros [jbpros!~jbpros@54-178-112-217.dyn.adsl.belcenter.be] has joined #ruby
<ZellFaze>
The rules were, $temperature had to == 23. And the output had to be "Room temperature is between 20 and 25"
monban [monban!~gatekeepe@awesome-opossum.com] has joined #ruby
axl_ [axl_!~axl@97-127-66-239.mpls.qwest.net] has joined #ruby
al3xnull [al3xnull!~al3xnull@cpe-76-188-178-7.neo.res.rr.com] has joined #ruby
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby
monban [monban!~gatekeepe@awesome-opossum.com] has joined #ruby
<pantsman>
what was the challenge? to obfuscate the code?
<mattyohe>
heh
<ZellFaze>
To make it as compact as possible.
<ZellFaze>
You were talking about making a team thing in under 7 lines, this was something similar we did.
<ZellFaze>
We measured out solution in characters though.
<ZellFaze>
Er rather they.
<waxjar>
use echo instead of print, save one character
youdonotexist [youdonotexist!~youdonote@c-67-166-121-94.hsd1.ut.comcast.net] has joined #ruby
<ZellFaze>
Aye, this wasn't the final solution. Just the first one that someone found.
<pantsman>
turn on short tags, and open with just <?
senny [senny!~senny@77-56-67-120.dclient.hispeed.ch] has joined #ruby
<ZellFaze>
In the final solution we did some crazy stuff with <?=
<ZellFaze>
Thus eliminating echo even.
<waxjar>
clever
somebody_ [somebody_!~notbrent@67.217.136.130] has joined #ruby
notbrent [notbrent!~notbrent@67.217.136.130] has joined #ruby
<ZellFaze>
We had it down to 50 some odd characters I think.
<ZellFaze>
It was afew months ago.
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has joined #ruby
<banisterfiend>
ZellFaze: isn't it humiliating to do somethign likethat in PHP though, cos even if you win, you lose
<banisterfiend>
;)
<banisterfiend>
s/something like that/anything at all
<ZellFaze>
I enjoy PHP a lot. I'm coming to Ruby from PHP because of my new job.
<ZellFaze>
It was just a coding challenge between some friends.
<mattyohe>
well, hopefully you've learned that PHP is a pretty crummy language
<ZellFaze>
It has its faults.
<banisterfiend>
i dont know much about php other than the worst programmers in the world use it
<ZellFaze>
Nah, they use BASIC. :P
<ZellFaze>
But lets not bash languages. Ruby is good, PHP is good, they are all good (with very few exceptions, see mindfuck). But all languages have faults.
<mattyohe>
ZellFaze: no, they use PHP :)
<al3xnull>
ZellFaze: Agreed. Crummy programmers in general write crummy code.
<banisterfiend>
ZellFaze: isn't the only thing going for php that it's ubiquitous not that it's good?
<banisterfiend>
i.e it's found everywhere, popularity is not a measure of whether something is good
<mattyohe>
All that needs to happen is someone needs to make a ruby version of a "drupal
<mattyohe>
and then ruby becomes the most popular
<mattyohe>
that's the only reason php is so "widely used"
nowthatsamatt [nowthatsamatt!~nowthatsa@adsl-98-85-31-238.mco.bellsouth.net] has joined #ruby
<ZellFaze>
Also phpBB and MediaWiki. :P
<mattyohe>
right
<mattyohe>
and joomla etc
<mattyohe>
Just need a platform that people can easily install.
Zanacross [Zanacross!~Serenity@adsl-178-78-86-205.karoo.kcom.com] has joined #ruby
<al3xnull>
WordPress. phpMyAdmin
<mattyohe>
That's the only reason. Not because it's a good language.
<ZellFaze>
It is good for what it is meant to do.
<mattyohe>
I think you're missing the point.
<mattyohe>
but meh.
<ZellFaze>
Just as Ruby is good for it is meant to do.
rramsden [rramsden!~rramsden@s64-180-62-209.bc.hsia.telus.net] has joined #ruby
<banisterfiend>
ZellFaze: that kitsch argument "everything is good" is kind of lame. I don't think people say the particular PHP libraries/frameworks are necessarily bad, but that the language itself is badly designed.
<banisterfiend>
you can kind of muddle your way through even if the language is bad, just so long as teh frameworks/libraries are OK
<ZellFaze>
I just don't feel like arguing about whether PHP is a good language.
<mattyohe>
yeah, honestly I really think something like Drupal now is really pretty good nowadays (version 7), but being built on PHP is really a hinderance. It would be wonderful if there was a "drupal" on top of ruby/rails, but there isn't?
<ZellFaze>
I personally enjoy it. But that doesn't mean others will.
<banisterfiend>
ZellFaze: what other languages do you know well beside php?
<ZellFaze>
VisualBasic (had to learn for a previous job) and I used to know PERL well, but at this point I am very rusty from lack of use.
<ZellFaze>
I also know MUSH Code fairly well. Although that language is insane and very single purpose.
<mattyohe>
Ew. Yeah, you might change your mind about php and others after you use a language like Ruby :)
<ZellFaze>
I used to tutor Java as well.
kaos379 [kaos379!~kaos@39-54.202-68.tampabay.res.rr.com] has joined #ruby
milkpost_ [milkpost_!~dec@173-28-195-157.client.mchsi.com] has joined #ruby
<banisterfiend>
ZellFaze: hehe, well if visualbasic is your primary experience i'm sure you'll think php is ok, perhaps teh same is true with perl. If you knew a decent language such as python, c#, even C maybe you'd be less apt to settle for php
<ZellFaze>
Perhaps.
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
<mattyohe>
Enjoy Ruby :D
chrisja [chrisja!~chris@5ac7d92c.bb.sky.com] has joined #ruby
<pantsman>
PHP was great in the early web when dynamic sites only needed to be individual pages put through an interpreter to add some scripting. To make anything 'modern' with PHP involves a huge amount of bootstrapping on the web server side, e.g. apache rewrites. That smells a bit.
flip_digits [flip_digits!~textual@c-76-122-14-228.hsd1.fl.comcast.net] has joined #ruby
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
<kaos379>
Grrr, trying to make an engine for a 2d platformer game.
* kaos379
bangs head on desk
bbttxu [bbttxu!~adam@nt8rsctf1.unt.ad.unt.edu] has joined #ruby
Marco [Marco!~marco@Marco-2.Kiewit.Dartmouth.EDU] has joined #ruby
<banisterfiend>
kaos379: what library are you using
<kaos379>
gosu
vraa [vraa!~vraa@99-20-202-44.lightspeed.hstntx.sbcglobal.net] has joined #ruby
<banisterfiend>
ZellFaze: sorry i have an aversion to PHP, whenever i've met PHP programmers at parties or whatever they've always been supreme idiots; and a nuber of them appear to have stumbled into programming by accident on their way as designers; as a result they seem to lack basic programming knowledge (that a compsci degree would give them) and just have a general lack of interest or appreciation for programming in general.
<banisterfiend>
kind of annoyed me
<ZellFaze>
I learned my first programming language at 8 (it was a form of BASIC). I don't have a compsci degree yet, but I do have a very technical background.
<ZellFaze>
I am A+, CCENT, and CCNA. And I taught a CCNA class for 2 semesters.
<ZellFaze>
I've never worked a job that wasn't some sort of IT.
<kaos379>
I ws 14 when I decided to lern a programming language. It was very basic. It was called ROBO programming. Megazuex had it in its system.
<kaos379>
*was, learn. (my keyboard is messed up.)
vitoravelino [vitoravelino!~rockhampt@unaffiliated/vtr] has joined #ruby
<kaos379>
anyone here into software developement?
<yxhuvud>
nope. most people in here like gemstones and geology.
<kaos379>
really? I like gemstones, too.
<waxjar>
geology is for nerds. i'm hardcore into linguistics.
moshee [moshee!~moshee@unaffiliated/moshee] has joined #ruby
monban [monban!~gatekeepe@awesome-opossum.com] has joined #ruby
<kaos379>
I saw this book in Amazon.com. The book of ruby seems different from what people code in the understanding style.
<pantsman>
which book?
kjs3 [kjs3!~kseefried@174.47.62.3] has joined #ruby
flippingbits [flippingbits!~anonymous@ip-81-210-178-39.unitymediagroup.de] has joined #ruby
youdonotexist [youdonotexist!~youdonote@c-67-166-121-94.hsd1.ut.comcast.net] has joined #ruby
<any-key>
I learned programming from TI83 calculator BASIC
<burgestrand>
kaos379: book of ruby? ninja on the front?
canton7 [canton7!50e59235@gateway/web/freenode/ip.80.229.146.53] has joined #ruby
h4mz1d [h4mz1d!~hamfz@99-0-57-199.lightspeed.tsclal.sbcglobal.net] has joined #ruby
<robyurkowski>
any-key: TI86 basic; high-five.
<any-key>
o/
<any-key>
I still instictively remember the menu shortcuts for all the commands...
<any-key>
prgm -> 7 was END
<any-key>
prgm -> 4 was FOR (I think)
<any-key>
prgm -> left -> 3 was DISP
<any-key>
prgm -> left -> 2 was OUTPUT
* any-key
stops
<robyurkowski>
haha
<robyurkowski>
it's been ten years
<robyurkowski>
all i did was program games in calc
<ZellFaze>
It was right.
<ZellFaze>
Not left.
<ZellFaze>
:P
nekid [nekid!~nekid@c-24-6-170-1.hsd1.ca.comcast.net] has joined #ruby
<any-key>
ZellFaze: heh, I suck at directions
<ZellFaze>
Left would bring you into the programs list so that you could call other programs as functions.
nonotza [nonotza!~nonotza@66.246.94.130] has joined #ruby
<any-key>
yep
<any-key>
I'm pretty sure programming on that little screen had negative effects on my eyesight
<any-key>
probably why I'm nearsighted :P
mmokrysz1 [mmokrysz1!~mmokrysz@5e04b38f.bb.sky.com] has joined #ruby
* any-key
wonders if someone has ported Vim to the TI83
milkpost_ [milkpost_!~dec@173-28-195-157.client.mchsi.com] has joined #ruby
trend [trend!~trend@97-81-69-219.dhcp.athn.ga.charter.com] has joined #ruby
Spockz [Spockz!~Spockz@84.245.46.110] has joined #ruby
berkes [berkes!~ber@a83-163-58-51.adsl.xs4all.nl] has joined #ruby
<shevy>
hehe
<shevy>
I'd wish there would be a ruby-vim editor
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby
mmokrysz1 [mmokrysz1!~mmokrysz@5e04b38f.bb.sky.com] has quit [#ruby]
waxjar [waxjar!~waxjar@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
* tnk1
is back.
looopy [looopy!~looopy@static-71-166-232-207.washdc.east.verizon.net] has joined #ruby
geaif [geaif!~geaif@AToulouse-554-1-40-57.w92-149.abo.wanadoo.fr] has joined #ruby
sross [sross!~sross@cpe-66-66-19-90.rochester.res.rr.com] has joined #ruby
j3r0m3 [j3r0m3!~j3r0m3@173-160-19-241-Sacramento.hfc.comcastbusiness.net] has joined #ruby
sross [sross!~sross@cpe-66-66-19-90.rochester.res.rr.com] has joined #ruby
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has joined #ruby
<linduxed>
hey guys, i've got a project that i just started up, but quickly realized that i'm not good enough at ruby or rails to actually START
<linduxed>
i'm not sure what to do, and how to get going
flippingbits_ [flippingbits_!~anonymous@ip-81-210-178-39.unitymediagroup.de] has joined #ruby
<banisterfiend>
linduxed: tell your employer you're a fraud and quit voluntarily
ColdShot [ColdShot!~aColdshot@CPE0026f3a1ccc0-CM0026f3a1ccbd.cpe.net.cable.rogers.com] has joined #ruby
<banisterfiend>
:D
<linduxed>
banisterfiend: haha, thx
<waxjar>
is it a complicated project?
<linduxed>
waxjar: not very much so
<linduxed>
waxjar: if you read the README on that page you should pretty much be able to envision the entire page
<banisterfiend>
linduxed: hehe, just buy a book, there's a bunch of good ones, i recommend 'eloquent ruby' (if you're programmed before) or 'learn to program' (if u havent)
<linduxed>
banisterfiend: hmmm, really?
<linduxed>
banisterfiend: i just wanted to start coding now
<waxjar>
if it's simple i suggest looking into sinatra. it's light and powerful and a lot easier than rails.
<shevy>
then write ruby code!
<banisterfiend>
linduxed: probably good to have a good on hand i'd say
<banisterfiend>
linduxed: as a reference at least
<shevy>
go find any task on your computer you want to automate and then start writing
Witide_ [Witide_!~Witide@adsl-65-8-194-102.mia.bellsouth.net] has joined #ruby
<linduxed>
shevy: well the thing is that i've already written most of the logic for this once before
<linduxed>
so i kinda know how to create the logic, but i'm not sure where to put the stuff inside a rails framework
<shevy>
than it is even easier
<shevy>
python is quite close to ruby in a way
<linduxed>
and that's beside the point that i'm not that comfortable with ruby yet
<shevy>
class Mineral: def __init__(self, name, price): # almost the same in ruby... class Mineral; def initialize(name, price), and inside initialize set the @ivars
jbpros [jbpros!~jbpros@54-178-112-217.dyn.adsl.belcenter.be] has joined #ruby
<shevy>
oh
<shevy>
rails
<shevy>
well even then I'd recommend to dive into ruby alone for a while
<linduxed>
shevy: hmm, might be ture
<linduxed>
*true
<linduxed>
hey!
<linduxed>
if i implement that code somehow
<linduxed>
in ruby that is
<shevy>
I dont know where things have to be in rails... app ... model ... view ... somewhere it has to be hehe
<linduxed>
basically port that python code to ruby
<linduxed>
is it easy to somehow squeeze that into rails?
<shevy>
it's very straight forward
<linduxed>
that business logic?
<shevy>
if the ruby code works, sure
<linduxed>
ok
<shevy>
you just keep in mind what has to be displayed, and what should stay internal
<shevy>
rather than for element in list: perhaps you'd do
<shevy>
list.each
paissad [paissad!~paissad@89-92-16-151.hfc.dyn.abo.bbox.fr] has quit ["Leaving"]
<shevy>
hmm what is // ?
<linduxed>
i think it was division rounded down
* tnk1
is away: Gone away for now
<linduxed>
shevy: yeah, it's floor division
workmad3 [workmad3!~workmad3@host-84-13-69-129.opaltelecom.net] has joined #ruby
<shevy>
hmm
<shevy>
a floor division
<shevy>
with floats? like 1.0 ?
<shevy>
1.0 / 0.5 # => 2.0
<shevy>
in ruby
<shevy>
or wouldn't that be the same in python too?
<linduxed>
in pyhton3 this happens (my code is python2 but i do import from future on the division):
<linduxed>
>>> 1.0 // 0.4
<shevy>
oh yeah
<linduxed>
2.0
<linduxed>
>>> 1.0 / 0.4
<shevy>
I wanted to learn python too
<linduxed>
2.5
<shevy>
but I got tired of the version differences
<linduxed>
well
<shevy>
I'd wish there would be a language like ruby, but radically simpler
<linduxed>
hmmm
vbernetr [vbernetr!~vbernetr@vbr.nexen.net] has joined #ruby
<linduxed>
i'd say that there still isn't much reason to care too much about python3
<shevy>
hehe
<shevy>
perl5 vs. perl6
alindeman [alindeman!~adml@pudge.ithought.org] has joined #ruby
nowthatsamatt [nowthatsamatt!~nowthatsa@adsl-98-85-31-238.mco.bellsouth.net] has joined #ruby
probst [probst!~probst@bumblebee.cl.cam.ac.uk] has joined #ruby
Count_Niedar [Count_Niedar!~nnscript@ip68-231-248-182.hr.hr.cox.net] has joined #ruby
xoebus [xoebus!~xoebus@193.62.81.27] has joined #ruby
kivi [kivi!~joni@ec2-79-125-13-112.eu-west-1.compute.amazonaws.com] has joined #ruby
centipedefarmer [centipedefarmer!~centipede@74-84-107-90.client.mchsi.com] has joined #ruby
chrxn [chrxn!chrxn@69.4.233.32] has joined #ruby
klaas [klaas!klaas@simply.kla.as] has joined #ruby
norm [norm!~norm@ip-128-239-142-7.v4.wm.edu] has joined #ruby
irk3z [irk3z!~irek@78.47.187.53] has joined #ruby
xsdg [xsdg!~xsdg@SIPB-VM-99.MIT.EDU] has joined #ruby
mikejw [mikejw!~mike@falcor.vm.bytemark.co.uk] has joined #ruby
mahlon [mahlon!mahlon@martini.nu] has joined #ruby
_bat [_bat!~bat@68-71-141-194.servers.zerigo.net] has joined #ruby
swi7ch_ [swi7ch_!~addamh@li204-188.members.linode.com] has joined #ruby
<linduxed>
the problem (or good thing, depending on how you see it) is that shit just won't move from 2.x (which is normally 2.6 or 2.7) until the major libraries are ported
psino [psino!~psino@unaffiliated/psino] has joined #ruby
<linduxed>
for instance
<linduxed>
twisted, the biggest and afaik best networking library is still not ported to p3
<shevy>
I'd wish making a programming language would be easier
skrewler [skrewler!~skrewler@209.213.206.58] has joined #ruby
<linduxed>
and until that happens, there's a shitton of projects that won't budge
<linduxed>
so there's STILL no reason to use p3
<linduxed>
which in a way is unfortunate, because there are many interesting things there, and many sane corrections
<linduxed>
on the other hand... you avoid the problem which i've always thought the ruby community has, which is constant movement in the versions
<linduxed>
the stable in python world is _really_ stable because they're in a deadlock, sortof
<linduxed>
so no movement in versions, for sure
crayfishx [crayfishx!~craig@78.129.240.7] has joined #ruby
<kjs3>
Programmers want a consistent, enforced, long lived version of a language right up till the point they get it (see: Ada). :-)
<linduxed>
kjs3: haha, i don't know that story, unfortunately
clockwize [clockwize!~clockwize@5ac85c0d.bb.sky.com] has joined #ruby
<shevy>
hmm
<shevy>
only two last things stop me from moving to 1.9.3. one is Encoding, the other are circular requires somehow breaking a project
ZellFaze [ZellFaze!~Zell@pool-108-8-0-178.hgrtmd.east.verizon.net] has quit [#ruby]
havenn [havenn!~skipper@pool-108-0-191-51.lsanca.fios.verizon.net] has joined #ruby
tesmar [tesmar!~tesmar@adsl-98-69-191-124.rmo.bellsouth.net] has joined #ruby
zbrown [zbrown!~zbrown@rufius.xen.prgmr.com] has joined #ruby
yellow5 [yellow5!~yellow5@levicole.xen.prgmr.com] has joined #ruby
MissionCritical [MissionCritical!~MissionCr@unaffiliated/missioncritical] has joined #ruby
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby
syamajala [syamajala!~syamajala@c-75-68-106-118.hsd1.ma.comcast.net] has joined #ruby
thomascioppettin [thomascioppettin!~thomascio@cpe-071-071-047-213.triad.res.rr.com] has joined #ruby
bosphorus [bosphorus!~bosphorus@88.235.91.7] has joined #ruby
minijupe [minijupe!~benlieb@adsl-74-250-185-38.ard.bellsouth.net] has joined #ruby
zulax [zulax!~radarwork@99-120-232-161.lightspeed.iplsin.sbcglobal.net] has joined #ruby
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
Manhose [Manhose!~Manhose@bl17-17-151.dsl.telepac.pt] has joined #ruby
<yfeldblum>
why do you have circular requires ...
bigkm [bigkm!~bigkm@203-206-185-71.perm.iinet.net.au] has joined #ruby
kennethreitz [kennethreitz!~kennethre@c-24-127-96-129.hsd1.va.comcast.net] has joined #ruby
AndChat| [AndChat|!~AndChat@118.82.185.158] has joined #ruby
kevinbond [kevinbond!~kevinbond@91.218.205.68.cfl.res.rr.com] has joined #ruby
j3r0m3 [j3r0m3!~j3r0m3@173-160-19-241-Sacramento.hfc.comcastbusiness.net] has joined #ruby
ben_alman [ben_alman!~cowboy@awesome.benalman.com] has joined #ruby
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
mengu [mengu!~mengu@unaffiliated/mengu] has joined #ruby
<shevy>
yfeldblum not sure
<shevy>
I think some file is calling itself somewhere
<shevy>
or some other file that is calling itself
<shevy>
is there any recommendation how to layout a project including the requires?
mdel [mdel!~mdel@pool-71-175-17-16.phlapa.fios.verizon.net] has joined #ruby
wingie [wingie!~wingie@c-5eeaaa34-74736162.cust.telenor.se] has joined #ruby
wingie [wingie!~wingie@c-5eeaaa34-74736162.cust.telenor.se] has quit ["WeeChat 0.3.5"]
<yfeldblum>
shevy, rule #1 is take extreme care to understand the whole project and make sure that you can represent its class-level dependencies as a directed acyclic graph, that is, throughout the whole project, if X depends on Y (even indirectly) then Y is never allowed to depend on X (even indirectly)
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
nonotza [nonotza!~nonotza@66.246.94.130] has joined #ruby
<shevy>
hmm hmm hmm
<shevy>
somehow it hasn't yet quite made click in my head :(
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.44] has joined #ruby
new_ruby_program [new_ruby_program!~new_ruby_@pool-173-58-89-188.lsanca.fios.verizon.net] has joined #ruby
<new_ruby_program>
what does this mean: def initialize(player_name)
<UdontKnow>
idarkside: you want to be the server or the client?
<idarkside>
well the server is already in place i just want my ruby script to trigger that url
<idarkside>
the server dose the rest so client :)
<UdontKnow>
you want to $HTTP_VERB an http url :)
<idarkside>
a=on returns DeviceStatus=2
<UdontKnow>
right
<UdontKnow>
probably a GET or POST
<idarkside>
a=off returns DeviceStatus=3
<idarkside>
yeah get i thought
<UdontKnow>
right. well, you can use too many things for that. open-uri is one that is pretty easy to use
Marco [Marco!~marco@Marco-2.Kiewit.Dartmouth.EDU] has joined #ruby
<UdontKnow>
you can get easier, harder, more complex or simpler. too many tools for the job :)
minijupe [minijupe!~benlieb@adsl-74-250-185-38.ard.bellsouth.net] has joined #ruby
<idarkside>
could you mock up an example if possible
<UdontKnow>
just take a look at the rdoc from open-uri
<UdontKnow>
cannot get simpler than that
<idarkside>
im going to intergrate it in to a siriproxy plugin just wondering what was best for job and correct format and thanks
akem [akem!~akem@unaffiliated/akem] has joined #ruby
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
workmad3 [workmad3!~workmad3@host-84-13-69-129.opaltelecom.net] has joined #ruby
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has joined #ruby
milkpost_ [milkpost_!~dec@173-28-195-157.client.mchsi.com] has joined #ruby
<slide>
How do I get zlib bindings for ruby? Specifically im getting an error when running a third party program, its failing saying "dyld: lazy symbol binding failed:Symbol not found: _SSL_library_init"
<UdontKnow>
slide: that doesnt look like zlib, more like openssl. try using strace and catching what call failed, should be an open() to a .so* file on linux
crodas [crodas!~crodas@git.crodas.org] has joined #ruby
ly- [ly-!~ly-@unaffiliated/ly-] has joined #ruby
<slide>
hrm im on a mac, not sure how to get that
<Okasu>
slide: like on a linux
zakwilson_ [zakwilson_!~quassel@c-69-180-70-100.hsd1.fl.comcast.net] has joined #ruby