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/
carlyle [carlyle!~carlyle@cpe-076-182-009-124.nc.res.rr.com] has joined #ruby
Natch| [Natch|!~natch@178.73.218.202] has joined #ruby
Schmidt [Schmidt!~lsc@h-11-69.a254.priv.bahnhof.se] has joined #ruby
ryanf [ryanf!~revfitz@50.0.160.40] has joined #ruby
banister`sleep [banister`sleep!~baniseter@122.63.158.90] has joined #ruby
jay_zawrotny [jay_zawrotny!~Jay@c-68-43-28-43.hsd1.mi.comcast.net] has joined #ruby
palcu [palcu!~alex@89.122.187.223] has quit ["Leaving"]
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby
palcu [palcu!~alex@89.122.187.223] has joined #ruby
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
otakutom_ [otakutom_!~otakutomo@zaq771a4b1b.zaq.ne.jp] has joined #ruby
<burgestrand>
Just make the action empty, it’ll post to the current page
<burgestrand>
shevy: also won’t work if you use some kind of front controller (which most people do nowadays), so don’t write it like that
<shevy>
ah
<shevy>
I am not writing PHP
<shevy>
but I want to port something
<shevy>
and I can't concentrate on it :(
<shevy>
but you know
<shevy>
I think embedding code like that is quite terrible
<burgestrand>
Looks like ERB to me
<burgestrand>
:p
HNDavid [HNDavid!~david@pool-173-48-127-244.bstnma.fios.verizon.net] has joined #ruby
<shevy>
yeah that too
<shevy>
I think I am beginning to hate it
<shevy>
hmm something else... when you want to modify a core class of ruby
<shevy>
like add a method to class String
<shevy>
do you put that into a special file or directory?
apok [apok!~apok@adsl-99-17-207-25.dsl.pltn13.sbcglobal.net] has joined #ruby
<burgestrand>
I put it in a module and include it into the target
<burgestrand>
the module itself I place in a special file
<shevy>
do you use some convention for the name of that module or where the file resides?
<shevy>
so far it seems I put it into core/extensions.rb
<shevy>
or core/string.rb core/object.rb and so on
<shevy>
hmmm
<burgestrand>
I usually put it into core_ext/string.rb
<burgestrand>
… now that I think of it I probably got that from activesupport
<shevy>
okay
mengu [mengu!~mengu@95.13.68.170] has joined #ruby
mengu [mengu!~mengu@unaffiliated/mengu] has joined #ruby
dotnull [dotnull!~dot_null@173-22-95-4.client.mchsi.com] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
ngng [ngng!~ng@c-98-210-117-31.hsd1.ca.comcast.net] has joined #ruby
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby
hunterloftis [hunterloftis!~hunter@cpe-071-075-103-203.carolina.res.rr.com] has joined #ruby
<hunterloftis>
Just started with ruby. Finally got 1.9.3 to install on snow leopard - but the 'ruby' command still points to 1.8.7. Is there a way to get rvm to replace /usr/bin/ruby with the current version?
<burgestrand>
hunterloftis: did you install it with RVM?
<hunterloftis>
burgestrand: yes
<burgestrand>
hunterloftis: because you should not try to replace your system ruby, you can switch to using the 1.9.3 with ”rvm use 1.9.3”
<burgestrand>
hunterloftis: if you remove/replace or otherwise modify your system ruby bad things can happen :)
jcrocetta [jcrocetta!~joe@ool-435501b5.dyn.optonline.net] has joined #ruby
finsdelosmundos [finsdelosmundos!~brunchole@110.64.103.97.cfl.res.rr.com] has joined #ruby
<hunterloftis>
so when I 'use 1.9.3' what does that do exactly? Does it provide an alias somewhere?
<burgestrand>
hunterloftis: I believe it just modifies some paths and adjusts some environment variables
<jcrocetta>
best Ruby GUI toolkit?
<hunterloftis>
(just tried it and now 'which ruby' points to the more specific 1.9.3 in .rvm, so thanks!)
gen0cide_ [gen0cide_!~TigerBloo@Wilkins3.static.monkeybrains.net] has joined #ruby
<burgestrand>
hunterloftis: you can also do ”rvm use --default 1.9.3” to have 1.9.3 always be your default
<burgestrand>
hunterloftis: (it’s what I do)
<hunterloftis>
awesome will do
<burgestrand>
hunterloftis: keep in mind you don’t want to use ”sudo” with any ruby-related command when using RVM, as you will lose the environment RVM has set up for you
<hunterloftis>
very good to know!
<burgestrand>
hunterloftis: so, for example, never do ”sudo gem install …” :)
<burgestrand>
(just do ”gem install”, since RVM is installed in ~/.rvm you should never need to use sudo for ruby again)
<hunterloftis>
nice
<burgestrand>
hunterloftis: and finally, if you ever want to switch back to system ruby you can do ”rvm use system”
fismo [fismo!~fismo@cpe-24-193-156-28.nyc.res.rr.com] has joined #ruby
<shevy>
jcrocetta ruby gtk
v3n0m [v3n0m!~v3n0m@pD9FBE9DB.dip.t-dialin.net] has joined #ruby
<jcrocetta>
thanks shevy
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
<jcrocetta>
do you use Glade shevy?
<shevy>
nope. I hate XML and don't use it
<jcrocetta>
o
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.42] has joined #ruby
dyer [dyer!~dyer@108-193-172-174.lightspeed.tukrga.sbcglobal.net] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
<shevy>
jcrocetta yeah
<jcrocetta>
thanks
<jcrocetta>
I'm wondering shevy ... am I barking up the wrong tree if i want to build a desktop app .. a simple data tracking app ... like a gym membership application ... your thoughts
<shevy>
sounds boring but why not ;)
<shevy>
if your requirement is that you must use ruby, and you must write a desktop app, then you dont have that many choices
<shevy>
there is ruby-qt too
<shevy>
and tk
<jcrocetta>
well this is more me pushing myslef to use Ruby
<jcrocetta>
I'm tired of .NET
<shevy>
aha
<shevy>
for me it was easier, I used ruby to write many small scripts and eventually used it more and more (save for some larger projects initially)
<jcrocetta>
well I cant afford .NET anymore LOL
<jcrocetta>
Seems that Ruby is more focused on web development Rails
<shevy>
I use ruby since almost 8 years without rails
<jcrocetta>
o wow
<jcrocetta>
so you have extensive GUI experience
<shevy>
hmm
<jcrocetta>
i trust GTK is the way to go then
<shevy>
not really, I dont like the existing GUIs
<shevy>
I want one language to rule them all
<shevy>
including the WWW
dotnull [dotnull!~dot_null@173-22-95-4.client.mchsi.com] has joined #ruby
<jcrocetta>
for now GTK is the way to go I guess
<shevy>
go start with hello world example ;)
<jcrocetta>
will do ..
<jcrocetta>
appreciate the help
h4mz1d [h4mz1d!~hamfz@adsl-072-148-022-091.sip.bhm.bellsouth.net] has joined #ruby
brownies [brownies!~brownies@unaffiliated/brownies] has quit [#ruby]
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
milkpost_ [milkpost_!~dec@173-28-195-157.client.mchsi.com] has joined #ruby
humanpipecleaner [humanpipecleaner!~chatzilla@ip68-227-12-51.lv.lv.cox.net] has joined #ruby
jbw [jbw!~jbw@dsl-044-084.cust.imagine.ie] has joined #ruby
<shevy>
dunno
<shevy>
I would hate it
<shevy>
it's not a class!
kstephens [kstephens!~kstephens@173-15-46-105-Illinois.hfc.comcastbusiness.net] has joined #ruby
ly- [ly-!~ly_@unaffiliated/ly-] has joined #ruby
<Okasu>
hah, lol
freelanceful [freelanceful!~jamesfend@c-71-228-225-167.hsd1.tn.comcast.net] has joined #ruby
albedoa [albedoa!~albedoa@ip68-108-106-30.lv.lv.cox.net] has joined #ruby
<shevy>
it is almost always better to structurize the code in such a way that it can be reused lateron easily
<jcrocetta>
anyone know where node.h file resides
<finsdelosmundos>
⎀_⎀ ⌫_⌦
aknagi [aknagi!~aknagi@cpc17-hitc6-2-0-cust206.9-2.cable.virginmedia.com] has joined #ruby
Rod [Rod!~Rod@12.130.119.26] has joined #ruby
v0n [v0n!~v4n@bas1-montreal19-1177820429.dsl.bell.ca] has joined #ruby
burgestrand1 [burgestrand1!~burgestra@81-229-85-235-no66.tbcn.telia.com] has joined #ruby
<aknagi>
Hi. Does anyone understand why [][1234] and {}[1234] return nil?
dcarper_ [dcarper_!~dcarper@173-87-162-66.dr01.mrtn.wv.frontiernet.net] has joined #ruby
<burgestrand1>
aknagi: because #[] for both hash and array return nil by default if accessing an element that does not exist
<burgestrand1>
jcrocetta: node.h of what?
<finsdelosmundos>
so is RoR a cheap dig at the japanese guy who invented Ruby?
<finsdelosmundos>
i mean come on.. it looks like LOL
<aknagi>
burgestrand1, Ahh - thanks.
<finsdelosmundos>
and it's often joked that japanese can't pronounce L's
dbgster [dbgster!~dbgster@CPE0013f7b7170c-CM0013f7b71708.cpe.net.cable.rogers.com] has joined #ruby
<jcrocetta>
i just installed gtk2 through my Ubuntu software center ... probably a bad idea
<sparc>
d00m
<jcrocetta>
and i was doing a Hello World app just to get started with GTK
<jcrocetta>
I got an error in the log while trying to load GTK ... something about missing node.h
<burgestrand>
jcrocetta: sounds like you’re missing some development library of something
oponder [oponder!~oponder@145-118-116-102.fttx.bbned.nl] has joined #ruby
<jcrocetta>
let me clarify after installing gtk2 through the ubuntu software center i went googled and decided to sudo gem install gtk2 .. during that process it got stuck ... pointed me to my mkmf.log file where I found I am missing node.h
jasdeepjaitla [jasdeepjaitla!~jasdeepja@c-98-207-73-250.hsd1.ca.comcast.net] has joined #ruby
nowthatsamatt [nowthatsamatt!~nowthatsa@adsl-98-85-31-238.mco.bellsouth.net] has joined #ruby
GreaseMonkey [GreaseMonkey!~gm@unaffiliated/greasemonkey] has joined #ruby
BrianE [BrianE!~brian@87.115.115.247] has joined #ruby
<jcrocetta>
this might bethe answer
<jcrocetta>
libgtk2.0-dev
<burgestrand>
jcrocetta: which version of ruby are you using?
<jcrocetta>
1.9.2
humanpipecleaner [humanpipecleaner!~chatzilla@ip68-227-12-51.lv.lv.cox.net] has quit [#ruby]
colint [colint!~ColinT@69-11-97-130.regn.static.sasknet.sk.ca] has joined #ruby
<burgestrand>
jcrocetta: your issue comes from installing the glib2 gem, but that libgtk2.0-dev thing might be what you’re missing indeed
<jcrocetta>
yea it looks like it's working ... i'll be sure in a few moments
<burgestrand>
but "node.h" sounds awfully… strange
Rod [Rod!~Rod@12.130.119.26] has joined #ruby
<jcrocetta>
awesome ... don't know how but it works
<jcrocetta>
gtk2 is working for me
<jcrocetta>
thanks guys
<burgestrand>
Sweet, node.h might be a part of gtk2 then
<heftig>
nope
<burgestrand>
or, well, ought to be
<heftig>
it's part of ruby
<burgestrand>
Yeah, but it’s not exported from ruby, is it?
<burgestrand>
Like, placed in the include directory for C include directive
milkpost_ [milkpost_!~dec@173-28-195-157.client.mchsi.com] has joined #ruby
sparc [sparc!sparc@68.186.35.162] has quit [#ruby]
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby
<jcrocetta>
hmmm i think i'm getting far ahead of my experience
<linduxed>
burgestrand: under "update or install"
syamajala [syamajala!~syamajala@c-75-68-106-118.hsd1.ma.comcast.net] has joined #ruby
<burgestrand>
linduxed: that’s the silliest thing I’ve ever heard
<burgestrand>
linduxed: or, well, probably not, but close :p
<linduxed>
well... that's reassuring in a way
<jcrocetta>
lets say i wanted to deploy to a windows machine .. is that a nightmare?
<burgestrand>
linduxed: it’s possibly for old versions of rails where gem dependency management was hell
<linduxed>
oh i see
<burgestrand>
linduxed: nowadays most people use Bundler, and it does not matter which gems you have installed on your system since bundler will take care of the dependencies for you
<linduxed>
yeah, i've noticed that on the few rails projects i've looked on, all use bundler
<burgestrand>
linduxed: RVM gemsets are basically isolating gems, so you can swap out *all* gems… kind of like keeping all gems in a backpack and changing backpack depending on the circumstance
<linduxed>
and i'm to use bundle exec for pretty much everything
<shevy>
jcrocetta it is doable. my ruby scripts work on windows too. but you are expecting an end user to do something he knows nothing about right?
<burgestrand>
linduxed: either way, you should be okay :)
<linduxed>
burgestrand: oh, but then there's no explicit harm in updating it all then
<linduxed>
another thing then
<shevy>
jcrocetta I think there are ways to try to bundle everything up into one file but I dont know myself. but then again I dont care about users who dont run ruby either
<jcrocetta>
so there are ways ok ... thats cool
<linduxed>
i updated it all, got rails up to 3.1.3, but when i run "rails server" in my recently created rails app, it still says "Rails 3.0.1 application" in the server window
<jcrocetta>
some way i can get it on a users desktop
<jcrocetta>
if there's a will
<linduxed>
is there something i need to do with gem? maybe rvm?
<burgestrand>
linduxed: bundler again
<linduxed>
to update the application
<linduxed>
oh
<linduxed>
just run bundler install?
<shevy>
sure, they need ruby though. with ruby they can use "gem"
<burgestrand>
linduxed: in the Gemfile, you list all gems that your rails application needs, when you then first ”bundle install”, bundler will create a Gemfile.lock
<shevy>
though I think only ruby is the real dependency they need, the rest you could do via scripts anyway, even running gem
<burgestrand>
linduxed: in this Gemfile.lock, all the gems and their dependencies, are listed with the explicit version that you installed
<linduxed>
burgestrand: oh so if i remove the lock-file, i can update it all with bundle install?
<burgestrand>
linduxed: so anyone running ”bundle install” will have the *exact* same versions of the gem
<jcrocetta>
are there any articles on deployment out there?
<burgestrand>
linduxed: what you should do is ”bundle update rails”, and it will only update rails to the most recent version allowed in your Gemfile
<linduxed>
burgestrand: ok
<burgestrand>
(and any necessary libraries that rails depends on, that is, it will attempt to do a conservative gem update)
<linduxed>
well...
<shevy>
jcrocetta hmm
<linduxed>
tbh i don't know if i should update and what effects that would have
<burgestrand>
linduxed: if you remove your Gemfile.lock, or type only ”bundle update”, it will update *all* of the gems in the Gemfile as far as possible, which might cause issues
<linduxed>
burgestrand: so... not so much harm done :-P
<burgestrand>
linduxed: it will only affect you if you rely on something from the gems that might have changed if you updated the gems, say if one of those gems breaks backwards-compatibility or takes away a feature that you need
<burgestrand>
linduxed: of course, the gems themselves also have dependencies that may be defined too loosely, and while it might say it works with the_other_gem version 2.3, it might actually not, but you can’t really foresee that :)
Rod [Rod!~Rod@12.130.119.26] has joined #ruby
<linduxed>
burgestrand: well that's not very likely, considering the most advanced stuff i've done is generating a model...
<burgestrand>
linduxed: ;)
<linduxed>
i'll do a bundle update, see where that gets me
<burgestrand>
linduxed: but as far as your system installation and stuff goes you’re safe, you won’t screw up your ruby installation
alphabitcity [alphabitcity!~Adium@cpe-24-193-14-186.nyc.res.rr.com] has joined #ruby
raffivar [raffivar!~raffivar@77.125.244.236] has joined #ruby
<linduxed>
eeeerrrr
* burgestrand
knocks on wood
<linduxed>
what the...
SterNiX [SterNiX!~LessIsMor@unaffiliated/nu253r/x-0655220] has joined #ruby
<jcrocetta>
did you see that alpha-demo.rb shevy?
<linduxed>
bundle update, and it says "Using rails (3.0.1)"
<linduxed>
why is that??
<linduxed>
i thought i updated to 3.1.3
<shevy>
jcrocetta dont think so
<burgestrand>
linduxed: look in your Gemfile, what does the line with rails say to you?
<linduxed>
or something like that
<burgestrand>
linduxed: keep in mind, bundler restricts your application to *only* those gems allowed from within the Gemfile
<shevy>
bundler is now your prison
<burgestrand>
(which is extremely helpful)
<linduxed>
burgestrand: oh there it is, a line with explicit version
Rod_ [Rod_!~Rod@12.130.119.26] has joined #ruby
<jcrocetta>
in the ruby-gtk2/examples/misc folder
<burgestrand>
linduxed: bump it up to something sane :)
<jcrocetta>
just cool seeing a transparent circular window
<linduxed>
burgestrand: should i have a static version there?
<burgestrand>
linduxed: since rails is a very central part to any application it makes sense to lock it down quite tightly, because even the smallest change could have a big impact on any application
<linduxed>
or should i remove the version altogether and rely on the lockfile?
<burgestrand>
linduxed: naw, at the very least I would explicitly state 3.1.X
wookiehangover [wookiehangover!~wookiehan@c-67-161-138-118.hsd1.co.comcast.net] has joined #ruby
<linduxed>
well i've got 3.2.0.rc1 installed
<burgestrand>
linduxed: because there’s no guarantee your application will work with 3.2.X
<burgestrand>
linduxed: use that to develop on then! :)
Fezzler [Fezzler!~anonymous@cpe-075-190-168-034.carolina.res.rr.com] has joined #ruby
<linduxed>
ok!
<linduxed>
hmmm
<linduxed>
so i should change '3.0.1' to 3.2.x ?
<linduxed>
with the quotes that is
<burgestrand>
linduxed: '~> 3.2.0' *might* work, and will allow any 3.2.X, but I’m not sure that’ll include pre-releases like rails 3.2 is
<burgestrand>
linduxed: you’re fine just setting it on 3.2.0.rc1, when rails 3.2.0 is released you can just change it again
<linduxed>
there we go
<linduxed>
latest rails
<linduxed>
i dunno if it's a good idea, but it sure doesn't matter on this project
<burgestrand>
\o/
<linduxed>
hahaha
<linduxed>
reloaded the page
<linduxed>
OHGOD-internal server error
<linduxed>
hahaha
<burgestrand>
;)
<linduxed>
well
<linduxed>
better redo it all
<burgestrand>
don’t forget to restart the server if you change the gems
<linduxed>
oh i did
<linduxed>
that's when it blew up
<burgestrand>
and since it’s a big leap from 3.0 to 3.2, you might want to… redo it all :P
<linduxed>
haha, yeah
<burgestrand>
luckily it goes a lot faster the second time :)
<linduxed>
top error = [2011-12-31 03:32:14] ERROR NoMethodError: undefined method `debug_rjs=' for ActionView::Base:Class
<linduxed>
ooooh how nice
<linduxed>
it bundles sass!
<burgestrand>
and coffee script :)
<linduxed>
i might not be good with ruby or rails, but i've coded some sass
<linduxed>
very nice to see that included
<linduxed>
although i've heard that people use scss instead of sass :-(
<burgestrand>
hehe, I do ;)
<linduxed>
what's the point then? :-(
<burgestrand>
I use it for two things: hierarchy and compass :p
<linduxed>
yeah compass was what i used it in too!
<linduxed>
but the thing is that sass was a big leap to make css more readable
<burgestrand>
I find the sass syntax a bit hard to read, but both the designery guys at work prefer sass because that way they know at least it’s not normal CSS they are using
<burgestrand>
hehe
<linduxed>
i don't see what people would want to do such a small jump as scss when they could go all the way
<linduxed>
i mean... it's not like it's that hard
<ryanf>
scss isn't a small jump, it's all the stuff that's actually important
<burgestrand>
I did sass a while, but never been a fan of indentation-based languages
s14 [s14!~nick@ool-18b934ee.dyn.optonline.net] has joined #ruby
<ryanf>
plus if you're migrating from normal css, it is a lot more convenient, obviously
<burgestrand>
I like coffee script, but that’s out of necessity and not the indentation scheme
<burgestrand>
have my issues with python too ^^
<linduxed>
ryanf: yes, that's true, but then again you could do the extra jump and also lose the old, clunky look of css :-S
<linduxed>
that's my look at it at least
<ryanf>
also scss is the default syntax now
<linduxed>
burgestrand: oh i really like python too... i guess i'm too young to have issues with forced indentation :-P
<burgestrand>
:p
<linduxed>
ryanf: yeah i read that... it made me a bit sad
<burgestrand>
As long as it’s not more than 4 lines I’m okay with it
<burgestrand>
… or somewhere thereabout
<linduxed>
ryanf: i saw sass as an opportunity to move away from the clunky style of css, instead it got even more engrained in a way
<burgestrand>
even then it gets hard to follow where I am D:
<ryanf>
burgestrand: that's kind of a weird problem to have. don't you mostly look at indentation to see where you are anyway?
<burgestrand>
ryanf: I do, problem comes when I’m closing scopes
<burgestrand>
ryanf: say, knowing what’s an if-statement body and what’s the method body
<ryanf>
yeah that's fair
<ryanf>
that especially bugs me with coffeescript since it borrowed ruby's 2-space standard
notbrent [notbrent!~notbrent@sunstone105.s.subnet.rcn.com] has joined #ruby
<burgestrand>
I’m not saying it’s 100% clear in ruby either, but the ”end” and ”}” helps somewhat
<ryanf>
I think 4 is a lot more readable without explicit block endings
jcrocetta [jcrocetta!~joe@ool-435501b5.dyn.optonline.net] has quit [#ruby]
<burgestrand>
hm, never tried using 4 spaces, I should do that sometime
<ryanf>
my coworker has been arguing for 3 but that's just too weird
<burgestrand>
heh, not doing that one
dyer [dyer!~dyer@108-193-172-174.lightspeed.tukrga.sbcglobal.net] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
<waxjar>
4 spaces sucks if you like your lines to be ≤ 80 characters
<ryanf>
yeah I wouldn't want to use 4 in ruby because there's so much nesting
<ryanf>
I feel like I nest a lot less in coffeescript/js though
<waxjar>
yea, i use 4 when writing javascript, mostly because text mate does that automatically for me
Rod_ [Rod_!~Rod@12.130.119.26] has joined #ruby
joe-mac1 [joe-mac1!~mickysanc@pool-96-237-27-29.bstnma.east.verizon.net] has joined #ruby
<joe-mac1>
say I instantiate a singleton object using the regular singleton lib, how can I make that instance available globally? (it's a configuration class)
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby
<burgestrand>
joe-mac1: what do you mean available globally?
<burgestrand>
joe-mac1: using Singleton from stdlib, it’ll always be YourClass.instance I believe
<joe-mac1>
burgestrand: so, in the main file of the library I do this
<joe-mac1>
I am a systems engineer, mostly write scripts and small OO tools, first time I am writing a real live app with ruby
<joe-mac1>
been waiting to have this opportunity for a while now
<joe-mac1>
eventually I'd love to do nothing but code in ruby heh, it's so fun
<burgestrand>
always fun to do new things
<joe-mac1>
yea definitetly, it's always the funnest thing for me to code in ruby
<joe-mac1>
so being that this is going to be teaching me a lot more techniques, it's awesome
wpgreenway [wpgreenway!~wpgreenwa@c-98-193-194-48.hsd1.tn.comcast.net] has joined #ruby
otakutomo [otakutomo!~otakutomo@zaq771a4b1b.zaq.ne.jp] has joined #ruby
<joe-mac1>
is there anything you can think of that focus on giving you the type of knowledge to go from where I'm at with knowing ruby for tools and scripting and whatnot, and getting into a more professional development position
<joe-mac1>
I have ruby best practices which seems pretty good
<joe-mac1>
wel, I have safari, so I have anything safari has
<joe-mac1>
and by anything, I meant book, idk how I missed that word
zulax [zulax!~radarwork@99-120-232-161.lightspeed.iplsin.sbcglobal.net] has joined #ruby
nowthatsamatt [nowthatsamatt!~nowthatsa@adsl-98-85-31-238.mco.bellsouth.net] has joined #ruby
apok [apok!~apok@64.134.223.49] has joined #ruby
ryanf_ [ryanf_!~ryanf@198.sub-174-254-208.myvzw.com] has joined #ruby
blueadept [blueadept!~blueadept@72.21.137.199] has joined #ruby
blueadept [blueadept!~blueadept@unaffiliated/blueadept] has joined #ruby
SterNiX [SterNiX!~LessIsMor@unaffiliated/nu253r/x-0655220] has joined #ruby
<burgestrand>
joe-mac1: making stuff
<burgestrand>
essentially branching out from there :)
joe-mac1 [joe-mac1!~mickysanc@pool-96-237-27-29.bstnma.east.verizon.net] has joined #ruby
youdonotexist [youdonotexist!~youdonote@c-67-166-121-94.hsd1.ut.comcast.net] has joined #ruby
burgestrand [burgestrand!~burgestra@81-229-85-235-no66.tbcn.telia.com] has joined #ruby
otakutom_ [otakutom_!~otakutomo@zaq771a4b1b.zaq.ne.jp] has joined #ruby
tyler- [tyler-!~tyman@173-12-219-189-Fresno.hfc.comcastbusiness.net] has joined #ruby
th3g33k [th3g33k!~Adium@121.54.54.45] has joined #ruby
BrianJ [BrianJ!~textual@pool-108-18-204-94.washdc.fios.verizon.net] has joined #ruby
ryanf [ryanf!~ryanf@198.sub-174-254-208.myvzw.com] has joined #ruby
banister`sleep [banister`sleep!~baniseter@122.56.204.252] has joined #ruby
x0F_ [x0F_!~x0F@unaffiliated/x0f] has joined #ruby
milkpost_ [milkpost_!~dec@173-28-195-157.client.mchsi.com] has joined #ruby
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.47] has joined #ruby
radic [radic!~radic@dslb-178-002-212-123.pools.arcor-ip.net] has joined #ruby
jbhewitt [jbhewitt!~jbhewitt@c122-108-214-224.rochd4.qld.optusnet.com.au] has joined #ruby
MUILTR [MUILTR!~MLINTH@adsl-98-80-240-75.mcn.bellsouth.net] has joined #ruby
<Banistergalaxy>
Asher do you love me
<Asher>
no i've moved on
<Banistergalaxy>
It's it because I'm a jew
<Asher>
no it's because i am
monxxx [monxxx!~monx@74.72.177.65] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
monxxx [monxxx!~monx@74.72.177.65] has quit ["Leaving"]
<Banistergalaxy>
I have s fistful of daffodils
<Banistergalaxy>
Do you hear?
<Asher>
i can hear their muffled screams
<Banistergalaxy>
A peacocks feather
finsdelosmundos [finsdelosmundos!~brunchole@110.64.103.97.cfl.res.rr.com] has quit ["qwerty"]
<Banistergalaxy>
I'm chinese
<Banistergalaxy>
A chinese jew
<Banistergalaxy>
My names is xiang bloom
ly- [ly-!~ly_@unaffiliated/ly-] has joined #ruby
andrewhl [andrewhl!~andrew@24-246-15-43.cable.teksavvy.com] has joined #ruby
<v0n>
hey,
ryh [ryh!~ryh@216.228.48.198] has joined #ruby
<v0n>
when is it better to call a module Utils or Helpers to group some useful methods but not directly related to the project?
rethaw [rethaw!~textual@c-98-234-116-174.hsd1.ca.comcast.net] has joined #ruby
<Banistergalaxy>
V0n don't call it anything
<Banistergalaxy>
Keep it anonymous
<Banistergalaxy>
Anonymous module
<rethaw>
A JSON-like object is given to me as an array of JSON objects
<v0n>
Banistergalaxy, how does that work?
jasdeepjaitla [jasdeepjaitla!~jasdeepja@c-98-207-73-250.hsd1.ca.comcast.net] has joined #ruby
<rethaw>
like [{ "a" : b} , {"c": d} … ]
<rethaw>
json parse doesn't seem to be giving the results I would want
<rethaw>
i.e. its a string at the top level, parsed = JSON.parse(response)
<Banistergalaxy>
V0n it can't be explained only known/intuited, youre not advanced enough yet
<Banistergalaxy>
It's more of a feeling
<v0n>
Banistergalaxy, I just read the doc, that's not complicated, but what's the point between having a fred = Module.new {} and module Fred; end?
<v0n>
hum ok, you just declare it where you need it so it is not requirable from somewhere else, right?
ryanf [ryanf!~ryanf@198.sub-174-254-208.myvzw.com] has joined #ruby
arvindravi [arvindravi!~arvind@115.184.63.197] has joined #ruby
rramsden [rramsden!~rramsden@207.216.52.184] has joined #ruby
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
banister`sleep [banister`sleep!~baniseter@122.63.135.223] has joined #ruby
<CodeZombie>
I'm starting to have this java server side code I'm interfacing with
<CodeZombie>
this encoding issue keeps cropping up
<CodeZombie>
the server sends data encrypted, and once encrypted is in UTF-16LE, however if I try to do any regex, or manipulation of the string in any way, ruby throws an "Encoding::CompatibilityError"
<CodeZombie>
changing the encoding via encode, or force_encoding to anything other than UTF-16LE puts out an unworkable string
th3g33k [th3g33k!~Adium@121.54.54.41] has joined #ruby
mdel [mdel!~mdel@pool-71-175-17-16.phlapa.fios.verizon.net] has joined #ruby
<yfeldblum>
encrypted data must always be treated as bytes, not as text; your encrypted data must be in ASCII_8BIT encoding (which is just binary, i.e. null-encoding)
<yfeldblum>
why is java giving you a java string with encrypted data, rather than a java byte-array with encrypted data?
<CodeZombie>
yfeldblum: I wish I could answer that, I didn't write the java side :/
<CodeZombie>
yfeldblum, if I was to do "puts data" in my console, the text actually displays correctly, but if I try to do anything else with it, it errors"
banister`sleep [banister`sleep!~baniseter@122.63.135.223] has joined #ruby
<yfeldblum>
that's not encrypted...
<CodeZombie>
yfeldblum, this is after decryption
<CodeZombie>
using openssl::cipher for decryption/encryption
<yfeldblum>
oh, that's fine, java encrypted some text for you with its favored encoding
<yfeldblum>
you decrypted it back to java's favored encoding
<yfeldblum>
now you transcode it
<CodeZombie>
would you have any reference links on where to start? I have to say, I'm not familiar with dealing with many encoding types.
<yfeldblum>
you first #force_encoding to the encoding java used, then you can #encode to another encoding (in ruby-1.9)
<CodeZombie>
quite a bit of data missing from that
<yfeldblum>
no, but it is known to discard data following the terminal =
<yfeldblum>
in base64, the = marks the beginning of the terminal padding, i.e., the end of the input
<CodeZombie>
ah
<CodeZombie>
I see what he did there
<CodeZombie>
the response codes are encrypted, and encoded on their own, and added
<CodeZombie>
split("=="), took care of that
<CodeZombie>
thanks again yfeldblum, you're becoming my personal savior :D
ryanf [ryanf!~revfitz@adsl-71-141-89-169.dsl.snfc21.sbcglobal.net] has joined #ruby
xuser [xuser!~xuser@unaffiliated/xuser] has joined #ruby
xuser [xuser!~xuser@unaffiliated/xuser] has quit [#ruby]
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
dcarper_ [dcarper_!~dcarper@173-87-162-66.dr01.mrtn.wv.frontiernet.net] has joined #ruby
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
brownies [brownies!~brownies@unaffiliated/brownies] has quit [#ruby]
SterNiX [SterNiX!~LessIsMor@unaffiliated/nu253r/x-0655220] has joined #ruby
bnewton [bnewton!~bnewton@cpe-66-68-94-56.austin.res.rr.com] has joined #ruby
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
Indian_ [Indian_!~Indian@unaffiliated/londonmet050] has joined #ruby
Cervajz [Cervajz!~Cervajz@opensuse/member/Cervajz] has joined #ruby
ghosTM55 [ghosTM55!~ghosTM55@li279-245.members.linode.com] has joined #ruby
youdonotexist [youdonotexist!~youdonote@c-67-166-121-94.hsd1.ut.comcast.net] has joined #ruby
guest_ [guest_!~guest@c-24-34-195-237.hsd1.ma.comcast.net] has joined #ruby
yLimitMedia [yLimitMedia!~arman@adsl-70-232-210-230.dsl.irvnca.sbcglobal.net] has joined #ruby
sonkei [sonkei!~sonkei@d14-69-26-171.try.wideopenwest.com] has joined #ruby
<yLimitMedia>
hello all, i need some help with the following... I have an array of regex expressions. How can I match a variable against this array, stopping to iterate and returning true if any of array's elements match the variable?
<yLimitMedia>
anything more elegant than a each block?
davidcelis [davidcelis!~david@c-67-169-13-95.hsd1.ca.comcast.net] has joined #ruby
tilde` [tilde`!~tilde@adsl-ull-221-117.42-151.net24.it] has joined #ruby
banister`sleep [banister`sleep!~baniseter@115.189.240.38] has joined #ruby
<savage->
cool.
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby
<banister`sleep>
savage-: cool
poindontcare [poindontcare!~user@cloudbovina.bovinasancta.com] has joined #ruby
xpot [xpot!~xpot@166-70-100-198.ip.xmission.com] has joined #ruby
me345 [me345!~me345@adsl-71-131-128-130.dsl.sntc01.pacbell.net] has joined #ruby
thone [thone!~thone@g230186102.adsl.alicedsl.de] has joined #ruby
ryanf_ [ryanf_!~revfitz@adsl-64-160-39-203.dsl.snfc21.pacbell.net] has joined #ruby
surrealLogic [surrealLogic!~surreal@60.58.126.208.dyn.southslope.net] has joined #ruby
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
johnduhart [johnduhart!~quassel@46.105.138.12] has joined #ruby
sonkei [sonkei!~sonkei@d14-69-26-171.try.wideopenwest.com] has joined #ruby
azbarcea [azbarcea!~quassel@79.114.87.45] has joined #ruby
Spockz [Spockz!~Spockz@ip12-101-208-87.adsl2.static.versatel.nl] has joined #ruby
shevy [shevy!~shevy@178-190-194-56.adsl.highway.telekom.at] has joined #ruby
surrealLogic [surrealLogic!~surreal@60.58.126.208.dyn.southslope.net] has joined #ruby
surrealL1gic [surrealL1gic!~surreal@60.58.126.208.dyn.southslope.net] has joined #ruby
surrealLogic [surrealLogic!~surreal@60.58.126.208.dyn.southslope.net] has joined #ruby
Romance [Romance!~b@unaffiliated/yusuke] has joined #ruby
banister`sleep [banister`sleep!~baniseter@115.189.227.251] has joined #ruby
eFfeM [eFfeM!~frans@a2038.upc-a.chello.nl] has joined #ruby
<eFfeM>
hi, anyone an idea on how to install ruby-sinatra on ubuntu 11.10? It fails because it cannot meet a dependency on ruby-rack (known issue, ubuntu Bug #843734 )
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
<Romance>
hmm
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
<ryanf_>
you really, really, really don't want to be installing ruby libraries with apt-get
<ryanf_>
that's what rubygems is for
akemrir [akemrir!~akemrir@cpe-109-197-96-47.docsis.tczew.net.pl] has joined #ruby
johnduhart [johnduhart!~quassel@46.105.138.12] has joined #ruby
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
<eFfeM>
ryanf_: I'm a n00b :-)
<eFfeM>
should I just do gem install sinatra instead ?
caveat- [caveat-!hoax@gateway/shell/bshellz.net/x-pkckhixffuevcswt] has joined #ruby
surrealLogic [surrealLogic!~surreal@60.58.126.208.dyn.southslope.net] has joined #ruby
<eFfeM>
(the rack gem is already installed, sinatra gem does not seem to exist)
<eFfeM>
hm, should be there according to the website
shtirlic [shtirlic!~shtirlic@188.134.7.124] has joined #ruby
th3g33k [th3g33k!~Adium@121.54.54.33] has joined #ruby
rippa [rippa!~rippa@93-181-234-105.adsl.yaroslavl.ru] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
yxhuvud [yxhuvud!mongo@h-17-181.a149.priv.bahnhof.se] has joined #ruby
MekkisFreenode [MekkisFreenode!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
Liothen_ [Liothen_!~liothen@24-119-65-28.cpe.cableone.net] has joined #ruby
Liothen [Liothen!~liothen@pdpc/supporter/professional/liothen] has joined #ruby
cachemoney [cachemoney!~cachemone@71-94-132-42.static.mtpk.ca.charter.com] has joined #ruby
surrealLogic [surrealLogic!~surreal@60.58.126.208.dyn.southslope.net] has joined #ruby
Tuxist [Tuxist!~quassel@dyndsl-085-016-110-217.ewe-ip-backbone.de] has joined #ruby
jonathan___ [jonathan___!~jonathan@121.33.143.110] has joined #ruby
<jonathan___>
Hi all
SterNiX [SterNiX!~LessIsMor@unaffiliated/nu253r/x-0655220] has joined #ruby
<jonathan___>
I'm doing my first gem, I have problem with my gem dependencies
<jonathan___>
How to declare it in the gempsec file ?
<jonathan___>
I did : s.add_runtime_dependency "colored"
<jonathan___>
but when I do my gem build it says that it can't find the require colored
Mahoek [Mahoek!~Mahoek@ip51ceb6d4.adsl-surfen.hetnet.nl] has joined #ruby
tilde` [tilde`!~tilde@adsl-ull-221-117.42-151.net24.it] has joined #ruby
hukl [hukl!~hukl@pdpc/supporter/professional/hukl] has joined #ruby
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby
banister`sleep [banister`sleep!~baniseter@115.189.141.12] has joined #ruby
<gener1c>
hey
<gener1c>
i am trying to validate my hand made rss
<gener1c>
and for some reason in one line i get an invalid token error
carbncl [carbncl!~carbncl@bne75-3-82-225-142-80.fbx.proxad.net] has joined #ruby
<gener1c>
i cant see whats illegal about it :/
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
smgt [smgt!~simon@76.156.216.81.static.m-dp.siw.siwnet.net] has joined #ruby
<gener1c>
encoding...
otakutomo [otakutomo!~otakutomo@zaq771a4b1b.zaq.ne.jp] has joined #ruby
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby
replore [replore!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby
surrealLogic [surrealLogic!~surreal@60.58.126.208.dyn.southslope.net] has joined #ruby
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
stayarrr [stayarrr!~olivererx@dslb-178-009-059-241.pools.arcor-ip.net] has joined #ruby
surrealLogic [surrealLogic!~surreal@60.58.126.208.dyn.southslope.net] has joined #ruby
surrealLogic [surrealLogic!~surreal@60.58.126.208.dyn.southslope.net] has joined #ruby
paissad [paissad!~paissad@89-92-16-151.hfc.dyn.abo.bbox.fr] has quit ["Leaving"]
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
wedtm [wedtm!~wedtm@204-195-3-141.wavecable.com] has joined #ruby
surrealLogic [surrealLogic!~surreal@60.58.126.208.dyn.southslope.net] has joined #ruby
MekkisFreenode [MekkisFreenode!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
dootdoot [dootdoot!~dootdoot@static-50-53-52-25.bvtn.or.frontiernet.net] has joined #ruby
v4s [v4s!~v4s@static-112-8.blueline.mg] has joined #ruby
MekkisFreenode [MekkisFreenode!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
jarjar_prime [jarjar_prime!~mjarjoura@50-76-61-133-ip-static.hfc.comcastbusiness.net] has joined #ruby
banister_ [banister_!~baniseter@122.56.192.213] has joined #ruby
replore [replore!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
lkba [lkba!~AndChat@aaqp107.neoplus.adsl.tpnet.pl] has joined #ruby
fantazo [fantazo!~fantazo@85-127-19-208.dynamic.xdsl-line.inode.at] has joined #ruby
Seisatsu [Seisatsu!~seisatsu@adsl-99-60-6-112.dsl.pltn13.sbcglobal.net] has joined #ruby
lkba [lkba!~AndChat@aaqp107.neoplus.adsl.tpnet.pl] has joined #ruby
th3g33k [th3g33k!~Adium@121.54.54.33] has joined #ruby
Guest70255 [Guest70255!~LessIsMor@2.176.219.102] has joined #ruby
azbarcea___ [azbarcea___!~quassel@79.114.14.180] 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
lkba [lkba!~AndChat@aaqp107.neoplus.adsl.tpnet.pl] has joined #ruby
th3g33k [th3g33k!~Adium@121.54.54.33] has joined #ruby
<v4s>
anyone ?
hukl [hukl!~hukl@pdpc/supporter/professional/hukl] has joined #ruby
raffivar [raffivar!~raffivar@93-173-180-61.bb.netvision.net.il] has joined #ruby
anoNxeRo [anoNxeRo!~LessIsMor@unaffiliated/nu253r/x-0655220] has joined #ruby
Jackneill [Jackneill!~Jackneill@unaffiliated/jackneill] has joined #ruby
palcu [palcu!~alex@89.122.187.223] has joined #ruby
cousine [cousine!~cousine@196.221.242.180] has joined #ruby
kakashi_ [kakashi_!~kakashi_@nltk/kakashi] has joined #ruby
aantix [aantix!~jjones@70-36-141-115.dsl.dynamic.sonic.net] has joined #ruby
jimmyy111 [jimmyy111!jimmy@218.59.107.108] has joined #ruby
marcol [marcol!~marcol@adsl-ull-47-223.50-151.net24.it] has joined #ruby
guest_ [guest_!~guest@c-24-34-195-237.hsd1.ma.comcast.net] has quit ["Leaving"]
eFfeM [eFfeM!~frans@a2038.upc-a.chello.nl] has quit [#ruby]
marcol [marcol!~marcol@adsl-ull-47-223.50-151.net24.it] has joined #ruby
eldariof [eldariof!~CLD@95.84.5.25] has joined #ruby
Schmidt [Schmidt!~lsc@h-11-69.a254.priv.bahnhof.se] has joined #ruby
banister`sleep [banister`sleep!~baniseter@115.189.11.77] has joined #ruby
jamiemill [jamiemill!~jamiemill@78-86-4-116.zone2.bethere.co.uk] has joined #ruby
eldariof [eldariof!~CLD@95.84.56.204] has joined #ruby
v4s [v4s!~v4s@static-112-8.blueline.mg] has joined #ruby
jimmyy111 [jimmyy111!jimmy@112.238.26.196] has joined #ruby
vmatiyko [vmatiyko!~vmatiyko@178.121.154.149] has joined #ruby
vmatiyko [vmatiyko!~vmatiyko@178.121.154.149] has quit [#ruby]
dbgster [dbgster!~dbgster@CPE0013f7b7170c-CM0013f7b71708.cpe.net.cable.rogers.com] has joined #ruby
banister_ [banister_!~baniseter@115.189.7.211] has joined #ruby
Cervajz [Cervajz!~Cervajz@opensuse/member/Cervajz] has joined #ruby
raffivar [raffivar!raffivar@93-173-180-61.bb.netvision.net.il] has joined #ruby
fungoat [fungoat!~fungoat@184.91.163.230] has joined #ruby
th3g33k [th3g33k!~Adium@121.54.54.33] has joined #ruby
johanhsfy [johanhsfy!~johan@81-225-127-57-no201.tbcn.telia.com] has joined #ruby
berserkr [berserkr!~david@212.122.111.205.dyn.user.ono.com] has joined #ruby
fridim_ [fridim_!~fridim@2a01:e35:2ece:f2d0:223:4eff:fe6c:c754] has joined #ruby
workmad3 [workmad3!~workmad3@host-84-13-69-129.opaltelecom.net] has joined #ruby
kakashi_ [kakashi_!~kakashi_@nltk/kakashi] has joined #ruby
RafiX [RafiX!~jedras11@aefm52.neoplus.adsl.tpnet.pl] has joined #ruby
<RafiX>
hi
RafiX [RafiX!~jedras11@aefm52.neoplus.adsl.tpnet.pl] has quit [#ruby]
th3g33k [th3g33k!~Adium@121.54.54.33] has joined #ruby
stringoO [stringoO!~JLstring@CPE001346cbe31b-CM00111ae502a8.cpe.net.cable.rogers.com] has joined #ruby
dbgster [dbgster!~dbgster@CPE0013f7b7170c-CM0013f7b71708.cpe.net.cable.rogers.com] has joined #ruby
raffivar [raffivar!raffivar@93-173-180-61.bb.netvision.net.il] has joined #ruby
notbrent [notbrent!~notbrent@sunstone105.s.subnet.rcn.com] has joined #ruby
senny [senny!~senny@77-56-67-120.dclient.hispeed.ch] has joined #ruby
banister`sleep [banister`sleep!~baniseter@115.189.149.147] has joined #ruby
tvo [tvo!~tvo@katapult/developer/tvo] has joined #ruby
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby
ikaros [ikaros!~ikaros@dslb-188-107-221-154.pools.arcor-ip.net] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
KaZ- [KaZ-!~amir@76.89.182.137] has joined #ruby
<raffivar>
hi
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
mcpierce|afk [mcpierce|afk!~mcpierce@99-178-171-244.lightspeed.rlghnc.sbcglobal.net] has joined #ruby
dql [dql!~dql@58.38.82.18] has joined #ruby
raffivar [raffivar!raffivar@93-173-180-61.bb.netvision.net.il] has joined #ruby
Jakee` [Jakee`!~Jakee`@195.59.12.239] has joined #ruby
hukl [hukl!~hukl@pdpc/supporter/professional/hukl] has joined #ruby
<linduxed>
hey guys, sorry if it's a little OT, but i had this simple rails question: if i've got a newly created rails project and want to make a git repo out of it, do i just do a "git add ." or are there some files that i have no reason to include?
madsgraphics [madsgraphics!~madsgraph@labs.madsgraphics.com] has joined #ruby
raffivar [raffivar!raffivar@93-173-180-61.bb.netvision.net.il] has joined #ruby
`brendan [`brendan!~b@66-208-246-34-ubr02b-waldlk01-mi.hfc.comcastbusiness.net] has joined #ruby
<`brendan>
morning
notbrent [notbrent!~notbrent@sunstone105.s.subnet.rcn.com] has joined #ruby
<raffivar>
morning
Manhose [Manhose!~Manhose@bl17-17-151.dsl.telepac.pt] has joined #ruby
<burgestrand>
linduxed: I believe rails makes a .gitignore for you with commonly unwanted files
<burgestrand>
linduxed: log/ and tmp/ directories, as well as any db/*.sqlite file
yakko [yakko!~quassel@189-10-123-190.bsace702.dsl.brasiltelecom.net.br] has joined #ruby
smgt [smgt!~simon@mmx.flattr.net] has joined #ruby
raffivar [raffivar!raffivar@93-173-180-61.bb.netvision.net.il] has joined #ruby
dql [dql!~dql@58.38.82.18] has joined #ruby
notbrent [notbrent!~notbrent@sunstone105.s.subnet.rcn.com] has joined #ruby
_raffivar_ [_raffivar_!raffivar@93-173-180-61.bb.netvision.net.il] has joined #ruby
rpowell [rpowell!~rpowell@CPE-58-164-72-158.lns1.ken.bigpond.net.au] has joined #ruby
rpowell [rpowell!~rpowell@CPE-58-164-72-158.lns1.ken.bigpond.net.au] has joined #ruby
jbpros [jbpros!~jbpros@199-177-112-217.dyn.adsl.belcenter.be] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
<linduxed>
burgestrand: oh, you're right, it did
gianlucadv [gianlucadv!~gianlucad@host87-78-dynamic.50-79-r.retail.telecomitalia.it] has joined #ruby
smgt [smgt!~simon@76.156.216.81.static.m-dp.siw.siwnet.net] has joined #ruby
jimmyy111 [jimmyy111!jimmy@112.238.26.196] has joined #ruby
th3g33k [th3g33k!~Adium@121.54.54.33] has joined #ruby
marcol [marcol!~marcol@adsl-ull-141-205.50-151.net24.it] has joined #ruby
Clooth [Clooth!~Clooth@193-64-22-158-nat.elisa-mobile.fi] has joined #ruby
lkba [lkba!~AndChat@dwh4.neoplus.adsl.tpnet.pl] has joined #ruby
Manhose [Manhose!~Manhose@bl17-17-151.dsl.telepac.pt] has joined #ruby
raffivar [raffivar!~raffivar@77.125.244.236] has joined #ruby
rpowell [rpowell!~rpowell@CPE-58-164-72-158.lns1.ken.bigpond.net.au] has joined #ruby
lkba [lkba!~AndChat@dwh4.neoplus.adsl.tpnet.pl] has joined #ruby
whaity [whaity!~whaity@cpc13-lewi14-2-0-cust680.2-4.cable.virginmedia.com] has joined #ruby
rpowell [rpowell!~rpowell@CPE-58-164-72-158.lns1.ken.bigpond.net.au] has joined #ruby
<whaity>
hello
<th3g33k>
howdy
<shevy>
ydwoh
QKO [QKO!~reaVer@83.98.249.142] has joined #ruby
pantsman [pantsman!~pantsman@2.27.111.48] has joined #ruby
pantsman [pantsman!~pantsman@pdpc/supporter/active/pantsman] has joined #ruby
jwmann [jwmann!~Adium@modemcable242.110-201-24.mc.videotron.ca] has joined #ruby
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
azbarcea_ [azbarcea_!~quassel@79.114.115.14] has joined #ruby
otakutomo [otakutomo!~otakutomo@zaq771a4b1b.zaq.ne.jp] has joined #ruby
dql [dql!~dql@58.38.82.18] has joined #ruby
mcpierce|afk [mcpierce|afk!~mcpierce@99-178-171-244.lightspeed.rlghnc.sbcglobal.net] has joined #ruby
cesario [cesario!u2444@gateway/web/irccloud.com/x-hwiokzuuomlkegzb] has joined #ruby
dyer [dyer!~dyer@108-193-172-174.lightspeed.tukrga.sbcglobal.net] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
SterNiX [SterNiX!~LessIsMor@unaffiliated/nu253r/x-0655220] has joined #ruby
Knodi [Knodi!~Knodi@c-68-43-246-216.hsd1.mi.comcast.net] has joined #ruby
_2easy [_2easy!~nofuture@89-79-244-137.dynamic.chello.pl] has joined #ruby
replore_ [replore_!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby
ly- [ly-!~ly_@unaffiliated/ly-] has joined #ruby
otakutomo [otakutomo!~otakutomo@zaq771a4b1b.zaq.ne.jp] has joined #ruby
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
BrianE [BrianE!~brian@87.115.115.247] has joined #ruby
Jake232 [Jake232!~textual@5e02187b.bb.sky.com] has joined #ruby
amacgregor_ [amacgregor_!~amacgrego@CPE00222dcb0a53-CM00222dcb0a4f.cpe.net.cable.rogers.com] has joined #ruby
iamjarvo [iamjarvo!~Adium@c-71-230-13-201.hsd1.nj.comcast.net] has joined #ruby
jimmyy111 [jimmyy111!jimmy@112.238.26.196] has joined #ruby
zakwilson [zakwilson!~quassel@c-69-180-70-100.hsd1.fl.comcast.net] has joined #ruby
Manhose [Manhose!~Manhose@bl17-17-151.dsl.telepac.pt] 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
replore_ [replore_!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby
akemrir [akemrir!~akemrir@cpe-109-197-96-47.docsis.tczew.net.pl] has joined #ruby
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby
ryh [ryh!~ryh@216.228.48.198] has joined #ruby
ph^ [ph^!~ph^@cm-84.212.225.74.getinternet.no] has joined #ruby
dyer [dyer!~dyer@108-193-172-174.lightspeed.tukrga.sbcglobal.net] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
dotnull [dotnull!~dot_null@173-22-95-4.client.mchsi.com] has joined #ruby
ksinkar [ksinkar!~ksinkar@115.242.10.27] has joined #ruby
<iamjarvo>
when generating a csv from a database is it possible to automatically get the headers from the column names
andrewhl [andrewhl!~andrew@24-246-15-43.cable.teksavvy.com] has joined #ruby
tomzx [tomzx!~tomzx@dsl-132-26.aei.ca] has joined #ruby
replore [replore!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby
Manhose [Manhose!~Manhose@bl17-17-151.dsl.telepac.pt] has joined #ruby
gener1c [gener1c!~gener1c@unaffiliated/gener1c] has joined #ruby
fayimora [fayimora!~fayimora@95.175.159.4] has joined #ruby
PragCypher [PragCypher!~kapone@208.157.149.45] has joined #ruby
oponder [oponder!~oponder@145-118-116-102.fttx.bbned.nl] has joined #ruby
replore [replore!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby
gianlucadv [gianlucadv!~gianlucad@host175-49-dynamic.1-79-r.retail.telecomitalia.it] has joined #ruby
kirun [kirun!~kirun@78-86-154-194.zone2.bethere.co.uk] has joined #ruby
<Tasser>
iamjarvo, sure, write them yourself ;-)
<iamjarvo>
Tasser: haha thats what i did
<iamjarvo>
was wondering if there is a slicker
otakutomo [otakutomo!~otakutomo@zaq771a4b1b.zaq.ne.jp] has joined #ruby
<mikekelly>
am I right in thinking block.call is slower than yield ?
<Tasser>
indeed
<mikekelly>
but they're effectively equivalent in terms of function ?
v0n [v0n!~v4n@bas1-montreal19-1177820429.dsl.bell.ca] has joined #ruby
waxjar [waxjar!~waxjar@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
wpgreenway [wpgreenway!~wpgreenwa@c-98-193-194-48.hsd1.tn.comcast.net] has joined #ruby
<Tasser>
should be
<mikekelly>
yield?
<mikekelly>
or how it is ?
flip_digits [flip_digits!~textual@c-71-199-243-97.hsd1.fl.comcast.net] has joined #ruby
wpgreenway [wpgreenway!~wpgreenwa@c-98-193-194-48.hsd1.tn.comcast.net] has quit [#ruby]
danishman2 [danishman2!~test@188.183.159.158] has joined #ruby
Skaag_ [Skaag_!~Skaag@cpe-67-247-51-89.nyc.res.rr.com] has joined #ruby
kakashi_ [kakashi_!~kakashi_@nltk/kakashi] has joined #ruby
Fraeon [Fraeon!~kzer-za@virgo.dreamhost.com] has joined #ruby
russfrank [russfrank!~asdf@ool-44c0b5f6.dyn.optonline.net] has joined #ruby
frogstarr78 [frogstarr78!~frogstarr@lan.viviotech.net] has joined #ruby
albedoa [albedoa!~albedoa@ip68-108-106-30.lv.lv.cox.net] has joined #ruby
Yingjie_Cui [Yingjie_Cui!~chatzilla@124.126.130.194] has joined #ruby
caveat- [caveat-!hoax@gateway/shell/bshellz.net/x-fgoogqnakludpfat] has joined #ruby
CannedCorn [CannedCorn!~textual@adsl-108-132-112-41.mia.bellsouth.net] has joined #ruby
Tachyon [Tachyon!~tach@81.200.61.23] has joined #ruby
<iamjarvo>
i have [1,2,3, array_variable] how do i make that array_variable comma separate to be part of the array
<Jay_Levitt>
Should I be able to do $stdout.reopen after Process.daemon? It doesn't seem to be working, but of course I can't tell why, 'cause...
replore_ [replore_!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby
<waxjar>
iamjarvo: [1,2,…].flatten
Murr_ [Murr_!~murr@84-73-204-122.dclient.hispeed.ch] has joined #ruby
Exar [Exar!~Exar@adsl-184-32-228-159.mia.bellsouth.net] has joined #ruby
Exar [Exar!~Exar@adsl-184-32-228-159.mia.bellsouth.net] has quit [#ruby]
sbanwart [sbanwart!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
<Jay_Levitt>
..would it help if I edited the script on the same machine I was running it on?
Witide [Witide!~Exar@adsl-184-32-228-159.mia.bellsouth.net] has joined #ruby
v4s [v4s!~v4s@41.204.101.56] has joined #ruby
Martiini [Martiini!~martin@88-196-141-145-dsl.rpl.estpak.ee] has joined #ruby
BrianE [BrianE!~brian@87.115.115.247] has joined #ruby
Murr_ [Murr_!~murr@84-73-204-122.dclient.hispeed.ch] has joined #ruby
<iamjarvo>
waxjar: thanks
sbanwart [sbanwart!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
bier [bier!~bier@p54A5A606.dip.t-dialin.net] has joined #ruby
th3g33k [th3g33k!~Adium@121.54.54.33] has joined #ruby
replore [replore!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby
vandemar [vandemar!syndicate@2001:470:1f10:56b::4] has joined #ruby
bluOxigen [bluOxigen!ssf@115.167.121.191] has joined #ruby
bluOxigen [bluOxigen!ssf@unaffiliated/bluOxigen] has joined #ruby
eldariof [eldariof!~CLD@95.84.36.130] has joined #ruby
ThatSnail [ThatSnail!~chatzilla@c-98-249-235-171.hsd1.fl.comcast.net] has joined #ruby
notbrent [notbrent!~notbrent@sunstone105.s.subnet.rcn.com] has joined #ruby
havenn [havenn!~skipper@pool-72-67-31-69.lsanca.fios.verizon.net] has joined #ruby
replore_ [replore_!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby
king313 [king313!~king313@60.Red-79-158-65.staticIP.rima-tde.net] has joined #ruby
king313 [king313!~king313@unaffiliated/king313] has joined #ruby
kakashi_ [kakashi_!~kakashi_@nltk/kakashi] has joined #ruby
manizzle [manizzle!~manizzle@adsl-99-91-42-119.dsl.pltn13.sbcglobal.net] has joined #ruby
Martiini [Martiini!~martin@88-196-141-145-dsl.rpl.estpak.ee] has joined #ruby
Sir_Rai [Sir_Rai!~rai@84.127.26.172.dyn.user.ono.com] has joined #ruby
notbrent [notbrent!~notbrent@sunstone105.s.subnet.rcn.com] has joined #ruby
<Sir_Rai>
Hi there
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
boxi [boxi!ssf@115.167.121.191] has joined #ruby
eignerchris [eignerchris!~eignerchr@71-222-114-71.ptld.qwest.net] has joined #ruby
eldariof [eldariof!~CLD@79.126.90.243] has joined #ruby
vitoravelino [vitoravelino!~rockhampt@187.64.90.129] has joined #ruby
vitoravelino [vitoravelino!~rockhampt@unaffiliated/vtr] has joined #ruby
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby
<Sir_Rai>
Im new in ruby, I installed tmuxinator with "gem install txuminator" and it run ok, but im curious that i havent the bin folder on .gem local environment, just a cache folder
BrianJ [BrianJ!~textual@pool-108-18-204-94.washdc.fios.verizon.net] has joined #ruby
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
me345 [me345!~me345@adsl-71-131-128-130.dsl.sntc01.pacbell.net] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
replore_ [replore_!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby
booginga [booginga!~booginga@cpe-69-206-151-178.hvc.res.rr.com] has joined #ruby
Sir_Rai [Sir_Rai!~rai@84.127.26.172.dyn.user.ono.com] has quit [#ruby]
dcarper__ [dcarper__!~dcarper@74-47-80-92.br1.mrtn.wv.frontiernet.net] has joined #ruby
frogstarr78 [frogstarr78!~frogstarr@lan.viviotech.net] has joined #ruby
Jake232 [Jake232!~textual@5e02187b.bb.sky.com] has joined #ruby
Schmidt [Schmidt!~lsc@h-11-69.a254.priv.bahnhof.se] has joined #ruby
Manhose [Manhose!~Manhose@bl17-17-151.dsl.telepac.pt] has joined #ruby
Tachyon [Tachyon!~tach@81.200.61.23] has joined #ruby
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
dootdoot [dootdoot!~dootdoot@static-50-53-52-25.bvtn.or.frontiernet.net] has joined #ruby
marcol [marcol!~marcol@ppp-99-46.26-151.libero.it] has joined #ruby
jay_zawrotny [jay_zawrotny!~Jay@50-77-200-126-static.hfc.comcastbusiness.net] has joined #ruby
sgaedu [sgaedu!~ar@masq61.gtn.ru] has joined #ruby
eldariof [eldariof!~CLD@95.84.32.204] has joined #ruby
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby
mjejwa [mjejwa!~me345@adsl-71-131-128-130.dsl.sntc01.pacbell.net] has joined #ruby
ReTFEF [ReTFEF!JS@cpe-173-88-110-115.columbus.res.rr.com] has joined #ruby
h4mz1d [h4mz1d!~hamfz@adsl-072-148-022-091.sip.bhm.bellsouth.net] has joined #ruby
matled- [matled-!~matled@85.131.246.184] has joined #ruby
replore [replore!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby
alanp [alanp!~quassel@206-248-132-240.dsl.teksavvy.com] has joined #ruby
samxor [samxor!samxor@70.32.34.103] has joined #ruby
monban [monban!~gatekeepe@awesome-opossum.com] has joined #ruby
bluOxigen [bluOxigen!ssf@unaffiliated/bluOxigen] has joined #ruby
mattp_ [mattp_!~mattp_@intma.in] has joined #ruby
Radar [Radar!~Radar@li96-112.members.linode.com] has joined #ruby
Reikoku [Reikoku!~reikoku@gateway/tor-sasl/reikoku] has joined #ruby
pradeepto [pradeepto!~quassel@juno.xinh.org] has joined #ruby
larsx_ [larsx_!~larsx@85.19.221.250] has joined #ruby
sapht [sapht!~sapht@83.233.30.24] has joined #ruby
<v0n>
what a module private method becomes when this a class includes this module?
thone [thone!~thone@g230186102.adsl.alicedsl.de] has joined #ruby
<v0n>
-this
gf3 [gf3!~gf3@unaffiliated/gf3] has joined #ruby
erenrich [erenrich!erenrich@thalia.ugcs.caltech.edu] has joined #ruby
babinho [babinho!~babinho@babinho.net] has joined #ruby
syntaxritual [syntaxritual!~shiva@li115-146.members.linode.com] has joined #ruby
chilversc_ [chilversc_!~chris@about/csharp/regular/KeeperOfTheSoul] has joined #ruby
soycamo [soycamo!~camo@198.202.31.180] has joined #ruby
meder [meder!shogun@li131-142.members.linode.com] has joined #ruby
kivi [kivi!~joni@ec2-79-125-13-112.eu-west-1.compute.amazonaws.com] has joined #ruby
sie [sie!sie@shells.mycrosoft.us] has joined #ruby
mxweas [mxweas!~max@c-24-7-45-147.hsd1.ca.comcast.net] has joined #ruby
Okasu [Okasu!~okasu@s094127069016.m.truevds.ru] has joined #ruby
sgaedu [sgaedu!~ar@masq61.gtn.ru] has joined #ruby
amacgregor_osx [amacgregor_osx!~amacgrego@CPE00222dcb0a53-CM00222dcb0a4f.cpe.net.cable.rogers.com] has joined #ruby
tdmackey [tdmackey!~tdmackey@booleanhaiku.com] has joined #ruby
xoebus [xoebus!~xoebus@193.62.81.27] has joined #ruby
Jb__ [Jb__!~jb@ks364797.kimsufi.com] has joined #ruby
TheNumb [TheNumb!thenumb@gateway/shell/mydevil.net/x-zlreqtrbikqaooaa] has joined #ruby
lokkju [lokkju!~lokkju@unaffiliated/lokkju] has joined #ruby
havenn [havenn!~skipper@pool-71-189-193-36.lsanca.fios.verizon.net] has joined #ruby
<havenn>
y
dnyy [dnyy!u2106@gateway/web/irccloud.com/x-yguknwsrjtejysso] has joined #ruby
zenergi [zenergi!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
GSpotAssassin [GSpotAssassin!u4086@gateway/web/irccloud.com/x-cjahienbheluarqa] has joined #ruby
voodoofish [voodoofish!~voodoowin@99.190.173.175] has joined #ruby
<Tachyon>
:)
ksinkar [ksinkar!~ksinkar@115.242.12.27] has joined #ruby
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
pantsman [pantsman!~pantsman@2.27.111.48] has joined #ruby
pantsman [pantsman!~pantsman@pdpc/supporter/active/pantsman] has joined #ruby
chilversc_ [chilversc_!~chris@about/csharp/regular/KeeperOfTheSoul] has joined #ruby
eulyix [eulyix!~charles@host86-128-235-61.range86-128.btcentralplus.com] has joined #ruby
tenderloaf [tenderloaf!~tenderloa@ip98-168-217-189.om.om.cox.net] has joined #ruby
<eulyix>
I'm struggling with blocks & iterators. I want to list all structurally distinct binary trees, I have some code here http://codepad.org/c0XTp38K but I don't know what the Ruby of way of specifying the left and right trees is. I want them to step over the recursive call like iterators
mengu [mengu!~mengu@unaffiliated/mengu] has joined #ruby
waxjar [waxjar!~waxjar@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
<eulyix>
The CLU code would look a bit like this: http://codepad.org/ef0RtEpk - where the Tree data structure is typical.
king535 [king535!~king313@unaffiliated/king313] has joined #ruby
workmad3 [workmad3!~workmad3@host-84-13-69-129.opaltelecom.net] has joined #ruby
goodieboy [goodieboy!~goodieboy@c-68-57-35-79.hsd1.va.comcast.net] has joined #ruby
jamiemill [jamiemill!~jamiemill@78-86-4-116.zone2.bethere.co.uk] has joined #ruby
wpgreenway [wpgreenway!~wpgreenwa@c-98-193-194-48.hsd1.tn.comcast.net] has joined #ruby
nerdy_ [nerdy_!~textual@66-44-118-195.c3-0.grg-ubr1.lnh-grg.md.cable.rcn.com] has joined #ruby
dcarper_ [dcarper_!~dcarper@173-87-162-66.dr01.mrtn.wv.frontiernet.net] has joined #ruby
<waxjar>
is there a way to check if a method has been called from inside a module / outside it?
TheNumb [TheNumb!thenumb@gateway/shell/mydevil.net/x-osxnybdbwsjyqzbu] has joined #ruby
Sliker [Sliker!~ponies@117.93.112.87.dyn.plus.net] has joined #ruby
Araxia_ [Araxia_!~Araxia@c-24-22-63-1.hsd1.or.comcast.net] has joined #ruby
TheNumb [TheNumb!thenumb@unaffiliated/thenumb] has joined #ruby
TheNumb [TheNumb!thenumb@gateway/shell/mydevil.net/x-osxnybdbwsjyqzbu] has joined #ruby
j3r0m3 [j3r0m3!~j3r0m3@c-76-105-54-37.hsd1.ca.comcast.net] has joined #ruby
bluOxigen [bluOxigen!ssf@115.167.121.191] has joined #ruby
bluOxigen [bluOxigen!ssf@unaffiliated/bluOxigen] has joined #ruby
yekta [yekta!~yekta@c-24-1-182-219.hsd1.il.comcast.net] has joined #ruby
vraa [vraa!~vraa@99-20-202-44.lightspeed.hstntx.sbcglobal.net] has joined #ruby
davidcelis [davidcelis!~david@c-76-115-58-79.hsd1.or.comcast.net] has joined #ruby
hukl [hukl!~hukl@pdpc/supporter/professional/hukl] has joined #ruby
<shevy>
waxjar hmm not an easy one I suppose
<shevy>
you'd probably have to keep check of where a module is defined, and guessing from that
<shevy>
a :defined_where? method would be nice
redwinter [redwinter!~mike@64-83-239-32.dhcp.stcd.mn.charter.com] has joined #ruby
andrewhl [andrewhl!~andrew@69-165-152-207.dsl.teksavvy.com] has joined #ruby
replore_ [replore_!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby
Manhose [Manhose!~Manhose@bl17-17-151.dsl.telepac.pt] has joined #ruby
lkba [lkba!~AndChat@dwh4.neoplus.adsl.tpnet.pl] has joined #ruby
<redwinter>
I have a string with multiple "-" characters in a row. How do I delete the repetitions? e.g. "ua---48ah--sud-a" -> "ua-48ah-sud-a"
youdonotexist [youdonotexist!~youdonote@67.166.121.94] has joined #ruby
<rippa>
redwinter: String#squeeze
<redwinter>
rippa: That is so much easier than I thought. Thank you!
ryanf [ryanf!~revfitz@adsl-67-122-210-207.dsl.pltn13.pacbell.net] has joined #ruby
Jake232 [Jake232!~textual@5e0e23d9.bb.sky.com] has joined #ruby
mjwelchphd [mjwelchphd!~mike@pool-96-229-26-114.lsanca.fios.verizon.net] has joined #ruby
zenergi_ [zenergi_!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
nkbuff [nkbuff!~nkbuff@dslb-178-005-209-169.pools.arcor-ip.net] 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>
hellp
<new_ruby_program>
i have a question can someone please help a novice ruby programmer>
<new_ruby_program>
what is a string vs string literal?
<mjwelchphd>
a string is a sting, i.e., x="this is a string"
<mjwelchphd>
x is a string (now), and "this is a string" is a literal
cousine [cousine!~cousine@196.221.242.180] has joined #ruby
<mjwelchphd>
if you then say x=5, now x is a Fixnum
<new_ruby_program>
so is x the string?
<mjwelchphd>
you can also have a fixed literal, i.e., MYSTRING = "this is a string"
<mjwelchphd>
x is a variable that contains the string assigned to it
ryan_marsh [ryan_marsh!~ryan_mars@99-160-193-138.lightspeed.hstntx.sbcglobal.net] has joined #ruby
<new_ruby_program>
hold on, so for the first example, the string is "this is a string" correct?
<mjwelchphd>
yes
<new_ruby_program>
but it's also the string literal? i dont get that. is string and string literal same thing then?
<Okasu>
this is a string" - object, x - pointer to the object
<mjwelchphd>
x is a variable, and can contain any kind of value, so when we say x="this is a string", x contains that string until we change x by assigning something else to it
<ryanf>
a string literal is just a string that is directly in the source file
<ryanf>
with quotes around it
<mjwelchphd>
yes, that is correct. x "points" to the string object.
<ryanf>
"literal" in general means a value that you typed into the source file directly
<mjwelchphd>
yes
<mjwelchphd>
if we say x=5, 5 is an object of type Fixnum, and x is made to point to that object
<mjwelchphd>
in ruby, all data are objects
zenergi [zenergi!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
<mjwelchphd>
all objects are instantiations of a class
chrisja [chrisja!~chris@5ac7d92c.bb.sky.com] has joined #ruby
<new_ruby_program>
x is the variable holding 5, which is the object.. i understand that but im still confused about the string literal thing, what does ryanf mean by "a string literal is a string is directly in the source file"
<new_ruby_program>
what is "source file"
<new_ruby_program>
sorry for my dumb questions, im still new at programming
<mjwelchphd>
a literal is a value you define literally, i.e., a literal string is one in quotes, a variable string is a variable pointing to a string
<ryan_marsh>
new_ruby_program: Your questions are not dumb. You might find your answers faster by reading "The Well-Grounded Rubyist". That's where I started and it helped me a lot.
replore [replore!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby
<mjwelchphd>
there is no such thing as a dumb question
<new_ruby_program>
im reading beginning ruby from novice to professional right now
<mjwelchphd>
yes, there are a lot of useful ruby tutorials online for free
<new_ruby_program>
just started learning yesturday
<ryan_marsh>
new_ruby_program: good luck!
<new_ruby_program>
im 17 years old and i hope to be professional when i grow up.. this is what i want to do :)
<mjwelchphd>
ruby is no different than anything else: guitar, sociology, computers, whatever: learning takes DOING and practice
<mjwelchphd>
tru installing irb and practicing on that
* ryan_marsh
loves IRB
<Okasu>
new_ruby_program: try ruby koans
<Okasu>
new_ruby_program: wait, no
<Okasu>
forget about ruby and learn C
<Okasu>
for the first language its a better choice than ruby
<mjwelchphd>
new_ruby_program, what OS are you using?
<mjwelchphd>
ruby is a better choice than c because it's easier to learn the concept of Object Oriented Programing Systems (OOPS)
<new_ruby_program>
Windows 7 Home Premium
<mjwelchphd>
when you installed ruby, irc should have installed also, have you tried it?
<Reikoku>
Can anyone point me in the right direction? I want to make a drawing program with Ruby and have no idea how to start
<Okasu>
mjwelchphd: it's means nothing, he must rebuild his brain for programming and start with C its OK
<Okasu>
new_ruby_program: read SICP anyway
<mjwelchphd>
ok Okasu, just my opinion after working as a programmer for over 50 years
<Okasu>
lol
<Reikoku>
Why start with C?
<Reikoku>
C is physically painful :P
<Okasu>
you opinion invalid and whole your life is wrong in that way Ж)
<new_ruby_program>
mjwelchphd can you look at this: puts "Hello, World!" ...is Hello, World! the string?
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby
<mjwelchphd>
everybody has a favorite language, and i finally setteled on ruby because i'm building a web site for processing medical bills
<eulyix>
new_ruby_program, no "Hello, World!" is the string.
<mjwelchphd>
C is the language you use when you need heavy CPU based computing, like simulations and such
<Okasu>
new_ruby_program: no, it's a object
<mjwelchphd>
Ruby is about 15 times SLOWER than C because it's an interpretive language, but for some things, it's just easier
<new_ruby_program>
wait, so a string is with quotation marks included?
<Okasu>
mjwelchphd: 15? do you know about mandelbrot benchmark?
<eulyix>
Yes, that's the syntax of strings.
<mjwelchphd>
new_ruby_program, yes, Hello, World! is the string expressed as a literal
<eulyix>
No, "Hello, World!" is the string literal.
<Okasu>
mjwelchphd: for people who whants make sites for food ruby it's ok for 1st lang, but he if only 17 and he must have a chois to do real things
<mjwelchphd>
Okasu, no -- what can you tell me about it? sounds interesting
<mjwelchphd>
okasu, ruby can help teach OOPS, which is an important concept for a beginning programmer -- of course, there are other ways to learn it also
<eulyix>
OOPS is no more important than any other paradigm...
<eulyix>
*OOP
<mjwelchphd>
okasu, thanks for that -- i'll study it in detail later
<eulyix>
The most important thing you can do as a beginner is study several paradigms.
<new_ruby_program>
hey just wondering are any of you guys millionaires? just wondering.. most of the millionaires are software programmers that;s why im learning
max_ [max_!~max@c-71-204-121-215.hsd1.ga.comcast.net] has joined #ruby
<eulyix>
That's a terrible premise.
<mjwelchphd>
eulyix, please explain why you feel that way
<Okasu>
new_ruby_program: too fat, stop it already
<mjwelchphd>
eulyix, what would you recommend?
<eulyix>
mjwelchphd, if you've only programmed in a OOP paradigm for 50 years, you're horrifically brain damaged. Exposure to several paradigms helps you write better programs.
<Reikoku>
Has anyone got any experience using drawing functions in WxRuby?
Synthead [Synthead!~max@c-71-204-121-215.hsd1.ga.comcast.net] has joined #ruby
<mjwelchphd>
programmers are seldom rich -- a lot of programming is done overseas, especially in places like India where they speak english, and they earn far less than programmers in the US
zenergi_ [zenergi_!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
<new_ruby_program>
i was just wondering if you make good money from this. But i really want to learn because i want to be an inovator. I want to create things , creat software apps etx
<Okasu>
if you whant became uberbattleprogrammer your path should look like math → SICP → scheme → ... → profit
<mjwelchphd>
there are lots of programmers in countries outside the US who are excellent at what they do
<eulyix>
Okasu, or ... -> academia =/= profit ;)
<eulyix>
SICP is an excellent book to start with.
<mjwelchphd>
Okasu, that's not the path I follwed -- maybe that's why I'm poor
<Okasu>
mjwelchphd: yep
<eulyix>
If you want to make a lot of money, get a maths degree and head to wall street.
<Reikoku>
Finance degree is easier, same route
<mjwelchphd>
if you get a math degree, it must be a Ph.D. or it won't be good for much
<eulyix>
Reikoku, yes, but you'll be at a disadvantage to applicants with a strong maths background
<new_ruby_program>
im good in school, still in highschool and have 4.39 gpa and super excellent scores etc but school is my backup. i want to be a programmer
<eulyix>
mjwelchphd, bollocks.
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby
replore_ [replore_!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby
<mjwelchphd>
my background is business programming
<eulyix>
That's why you're talking shit.
<Reikoku>
eulyix: Might be different there, i live in London and banks here love finance majors
<Reikoku>
I nearly did a finance degree but it sounded very very dull
<new_ruby_program>
okay i get it now syntax of strings include quotation marks , so "Hello, World!" is a string
<mjwelchphd>
new_ruby_program, don't discount a good university program, like mathematics
Liothen [Liothen!~liothen@pdpc/supporter/professional/liothen] has joined #ruby
<Reikoku>
new_ruby_program: Yes
<eulyix>
Reikoku, my experience says otherwise, both in the UK and abroad. The most successful graduates to finance placements are typically Maths/Physics majors.
<new_ruby_program>
thanks for the help guys
<Reikoku>
new_ruby_program: If you want to become a good programmer, university is a good idea if only for the three easy years you get to spend honing your ability
goodieboy [goodieboy!~goodieboy@c-68-57-35-79.hsd1.va.comcast.net] has joined #ruby
<Reikoku>
eulyix: I can only speak from the experience of the members of my family who work in that industry, most of whom are finance graduates, one maths graduate
<mjwelchphd>
eulyix, it's true that i wished I had finished my math degree which i started... oh well, too late now 'cause i'm 68 years old and i already have a Ph.D.and not going back
<Reikoku>
mjwelchphd: What do you have a PhD in?
<new_ruby_program>
ok thanks for the help and advice guys good bye. time to continue studying!
<eulyix>
mjwelchphd, it's never too late.
<mjwelchphd>
Reikoku, Business Administration
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby
<Reikoku>
mjwelchphd: I'm planning to go onto a masters, is it worth it? I'm in computer science
<mjwelchphd>
any of you guys know Exim?
<eulyix>
Reikoku, depends what you want to do.
<eulyix>
Industry doesn't really care.
<eulyix>
Academia does.
<Reikoku>
eulyix: I want to get into industry, really
<Reikoku>
Just feels like a very competitive area and I'm not sure if a masters would benefit me
<mjwelchphd>
Reikoku, I think it is, but it all depends... for example, Bill Gates was a Harvard drop out, and he's righ -- I have a Ph.D. and I'm poor
<mjwelchphd>
rich
<Reikoku>
I'm an Imperial College second year, and poor :P
<mjwelchphd>
Reikoku, you can't compete with cheap programming overseas... they're good, too
wpgreenway [wpgreenway!~wpgreenwa@c-98-193-194-48.hsd1.tn.comcast.net] has joined #ruby
<Reikoku>
So how do you compete?
<eulyix>
Reikoku, don't listen to that. There are plently opportunities, some of the most interesting are young startups. Business programming, yeah, that gets thrown overseas.
<mjwelchphd>
i think few programmers get rich because they know how to program, they get rich when they develop a killer app or idea
<mjwelchphd>
Reikoku, I don't -- i use programming just to help my wife run her business
<Okasu>
mjwelchphd: it's good, you love your wife and help her
* Okasu
jelly
<mjwelchphd>
yeah, eulyix is probably right -- scientific programming is more an in-house type of thing
Dreamer3 [Dreamer3!~Dreamer3@74-134-34-116.dhcp.insightbb.com] has joined #ruby
<mjwelchphd>
i wished i had finished my math degree and gone into scientific programming... eulyix is right about that
<Reikoku>
I might go into AI
<eulyix>
That's not what I'm implying... Scientific programming is niche. There are loads of opportunities out there.
Linux [Linux!~Linux@pool-173-58-89-188.lsanca.fios.verizon.net] has joined #ruby
<Reikoku>
Right now I'm just trying to clone MS Paint but have no idea where to start
<mjwelchphd>
but frankly, i've done every kind of programming you can imagine, and on machines you've never heard of, and i'm burned out -- i'd rather get into fiction writing, but there's little money in that unless you're a fiction superstar
<Reikoku>
Think I might use GtkRuby
<Reikoku>
Gtk & Ruby
<Reikoku>
I got into programming for all the wrong reasons using asm :P
fungoat [fungoat!~fungoat@184.91.163.230] has joined #ruby
<mjwelchphd>
on the other hand, i'm retired, and i can spend my time anyway i want to
<Okasu>
mjwelchphd: noone blame you, oldman
<mjwelchphd>
i loved asm on the IBM 360
<mjwelchphd>
okasu, thanks
<Reikoku>
I loved asm until I found AMD CAL
Skaag [Skaag!~Skaag@cpe-67-247-51-89.nyc.res.rr.com] has joined #ruby
<shevy>
I dont know what is either but I am going to hate both
<Reikoku>
And using GPUs for hash breaking
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby
<Reikoku>
CAL is the machine-level language to interface with ATI GPUs
<Reikoku>
It's not fun but it is fast
<mjwelchphd>
there are so many languages and products out there, it's a smorgasbord for programmers, but some programmers want to make money, and that requires having an employer or client
<shevy>
enter the PHP
Mon_Ouie [Mon_Ouie!~Mon_Ouie@subtle/user/MonOuie] has joined #ruby
<Reikoku>
I hate php :<
zenergi [zenergi!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
<mjwelchphd>
PHP is a mature language, works well, but also has its limitations
<shevy>
mature like a centenarian
<shevy>
and almost as fast as one
<mjwelchphd>
i prefer ruby over php, but RoR is a pain in the ass to make work -- i couldn't get it to run on shared hosted servers, had to go to a slice and do it the RoR way
<Reikoku>
I have several dedicated servers, have never touched RoR
<mjwelchphd>
a shared hosted server is $7/mo, but it costs me $25 a month for a slice on slicehost.com
<Reikoku>
I used to sell VPS hosting
<mjwelchphd>
RoR is ok, but I found an anomoly that made me scratch my head
<ryanf>
yeah trying to do rails on shared hosting without shell access is a really bad idea
<ryanf>
I actually tried it once, out of curiosity
replore_ [replore_!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby
<Reikoku>
Someone help me with Gtk and Ruby? :S or any tool kit
<mjwelchphd>
RoR Activerecord remembers every SQL query yo execute, and if you run the same one twice, it returns the result set from the first query
<Reikoku>
I really need to make a simple drawing area
<mjwelchphd>
guess they decided that databases are static...
<ryanf>
mjwelchphd: only within a single request
<mjwelchphd>
Reikoku, what OS are you using?
<ryanf>
I assume it does some kind of cache breaking if you save stuff to a table
<Reikoku>
mjwelchphd: Linux
ph^ [ph^!~ph^@cm-84.212.225.74.getinternet.no] has joined #ruby
<Reikoku>
mjwelchphd: Slackware Linux
<mjwelchphd>
I found that drawing on linux (which is what i use) is very involved
<Reikoku>
That's what I've heard
<mjwelchphd>
I use SuSE Linux Enterprise Desktop
<mjwelchphd>
you have to use the X libraries, and I looked at it, but it was complicated, and i couldn't take the time to figure it out 'cause i was working on my ruby project
<Reikoku>
Yeah, apparently I need to set up a drawing area then catch the mouse
<mjwelchphd>
seems everything is sooo complicated these days
<Reikoku>
But I can't find a good API document for WxRuby
<mjwelchphd>
too much for my old brain
CannedCorn [CannedCorn!~textual@adsl-108-132-112-41.mia.bellsouth.net] has joined #ruby
<mjwelchphd>
ya, documetation for anything can be a severe problem
cooper [cooper!~mitchell@c-50-129-95-89.hsd1.il.comcast.net] has joined #ruby
cooper [cooper!~mitchell@unaffiliated/furryfishy] has joined #ruby
<mjwelchphd>
i had the same documentation problem trying to use gems that create PDF files... the gems might be brilliant, but without good docs, they're useless
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
gentz [gentz!ilab@ancient.webfoundation.net] has joined #ruby
surrealLogic [surrealLogic!~surreal@173-19-78-42.client.mchsi.com] has joined #ruby
<mjwelchphd>
ok, i gotta go... i have to figure out how to debug Exim 'cause I can't find anyone who knows anything
mjwelchphd [mjwelchphd!~mike@pool-96-229-26-114.lsanca.fios.verizon.net] has quit [#ruby]
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has joined #ruby
zenergi [zenergi!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
new_ruby_program [new_ruby_program!~new_ruby_@pool-173-58-89-188.lsanca.fios.verizon.net] has joined #ruby
replore_ [replore_!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby
<new_ruby_program>
help i have another question, what is interpolation? is it the process of inserting result of an expression in a string literal?
<new_ruby_program>
using #{and}?
<rippa>
yes
<new_ruby_program>
thanks. just making sure
<Jake232>
new_ruby_program: "2 + 2 = #{2+2}"
<new_ruby_program>
yep that is interpolation
<Jake232>
Yep :)
<new_ruby_program>
the #(2+2) will show as 4
<Jake232>
Yea
<ryanf>
yes, curly brackets though
<ryanf>
#{2+2}
<new_ruby_program>
yea
nerdy_ [nerdy_!~textual@66-44-118-195.c3-0.grg-ubr1.lnh-grg.md.cable.rcn.com] has joined #ruby
<new_ruby_program>
also, just to make sure that i understand string literals correctly now. string literal means strings embedded in a code correct? so for example: puts "2 + 2 = #{2+2}" is a string literal?
rramsden [rramsden!~rramsden@s64-180-62-209.bc.hsia.telus.net] has joined #ruby
<new_ruby_program>
wait, "2 + 2 = #(2+2)" is the string literal?
<ryanf>
yes
<ryanf>
whereas if you did str = "2 + 2 = #{2+2}"
<ryanf>
and then puts str
<ryanf>
"str" in "puts str" is not a string literal
<ryanf>
it's a variable
yekta_ [yekta_!~yekta@c-24-1-182-219.hsd1.il.comcast.net] has joined #ruby
Synthead [Synthead!~max@c-71-204-121-215.hsd1.ga.comcast.net] has joined #ruby
blueadept [blueadept!~blueadept@unaffiliated/blueadept] has joined #ruby
zmanfx [zmanfx!~zmanfx@cpe-71-65-103-175.woh.res.rr.com] has joined #ruby
pac1 [pac1!~pac1@pool-96-233-75-235.bstnma.fios.verizon.net] has joined #ruby
replore [replore!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby
surrealLogic [surrealLogic!~surreal@173-19-78-42.client.mchsi.com] has joined #ruby
chrisja [chrisja!~chris@5ac7d92c.bb.sky.com] has quit [#ruby]
cachemoney [cachemoney!~cachemone@71-94-132-42.static.mtpk.ca.charter.com] has joined #ruby
IrishGringo [IrishGringo!~chatzilla@c-71-229-99-200.hsd1.fl.comcast.net] has joined #ruby
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
albedoa [albedoa!~albedoa@ip68-108-106-30.lv.lv.cox.net] has joined #ruby
andrewhl [andrewhl!~andrew@69-165-152-207.dsl.teksavvy.com] has joined #ruby
zakwilson [zakwilson!~quassel@c-69-180-70-100.hsd1.fl.comcast.net] has joined #ruby
crodas [crodas!~crodas@git.crodas.org] has joined #ruby
Tachyx [Tachyx!~tach@81.200.61.23] has joined #ruby
replore_ [replore_!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby
rpowell [rpowell!~rpowell@CPE-58-164-72-158.lns1.ken.bigpond.net.au] has joined #ruby
wpgreenway [wpgreenway!~wpgreenwa@c-98-193-194-48.hsd1.tn.comcast.net] has joined #ruby
cousine [cousine!~cousine@196.221.242.180] has joined #ruby
GreaseMonkey [GreaseMonkey!~gm@unaffiliated/greasemonkey] has joined #ruby
syamajala [syamajala!~syamajala@c-75-68-106-118.hsd1.ma.comcast.net] has joined #ruby
j05h [j05h!~Adium@99-58-59-32.lightspeed.austtx.sbcglobal.net] has quit [#ruby]
Rod [Rod!~Rod@c-66-176-254-147.hsd1.fl.comcast.net] has joined #ruby
trend [trend!~trend@97-81-69-219.dhcp.athn.ga.charter.com] has joined #ruby
zenergi_ [zenergi_!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
<Clooth>
HAPPY NEW YEAR!
replore [replore!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby
zenergi [zenergi!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
new_ruby_program [new_ruby_program!~new_ruby_@pool-173-58-89-188.lsanca.fios.verizon.net] has joined #ruby
Spockz [Spockz!~Spockz@ip12-101-208-87.adsl2.static.versatel.nl] has joined #ruby
notbrent [notbrent!~notbrent@sunstone105.s.subnet.rcn.com] has joined #ruby
danishman2 [danishman2!~test@188.183.159.158] has joined #ruby
ciopte7 [ciopte7!~thomascio@cpe-071-071-047-213.triad.res.rr.com] has joined #ruby
robbyoconnor [robbyoconnor!~wakawaka@guifications/user/r0bby] has joined #ruby
v0n [v0n!~v4n@bas1-montreal19-1177820429.dsl.bell.ca] has joined #ruby
zenergi [zenergi!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
mengu [mengu!~mengu@unaffiliated/mengu] has joined #ruby
sdimkov [sdimkov!~sdimkov@46.10.78.243] has joined #ruby
Wroathe [Wroathe!~Wroathe@173-17-249-11.client.mchsi.com] has joined #ruby
lapinferoce [lapinferoce!~lapinfero@log77-5-88-164-148-73.fbx.proxad.net] has joined #ruby
<Wroathe>
Ok say I have a string like, "This is {6U} almost always {1I2G} going to end well." and I want to replace all occurences of {} with specific HTML based on the contents so it might be like "This is <img src="6.jpg" /><ul></ul> almost always..."
<Wroathe>
What would be the most efficient way to do that
<Wroathe>
Basically I need to match all occurences of {} and then perform a series of operations on that string and then replace it back into the original string
<Okasu>
why {}?
<Wroathe>
I just picked it because it's different than any other possible text.
<Okasu>
maybe #{var} better?
<shevy>
Wroathe i think ruby will do substitutions on every #{}
<Wroathe>
No, {6U} is part of the string
<Wroathe>
Not a code block to be executed on.
<Wroathe>
I'm getting those strings from an external source.
<Okasu>
Wroathe: gsub with regex
wpgreenway [wpgreenway!~wpgreenwa@c-98-193-194-48.hsd1.tn.comcast.net] has joined #ruby
cousine [cousine!~cousine@196.221.242.180] has joined #ruby
<Wroathe>
Well is there a way to capture all occurences? or do I just have to do a loop?
replore [replore!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby
<Wroathe>
Because there could be as many as 6 or 7 of those {} chunks in my strings.
Wroathe [Wroathe!~Wroathe@173-17-249-11.client.mchsi.com] has quit [#ruby]
robbyoconnor [robbyoconnor!~wakawaka@guifications/user/r0bby] has joined #ruby
dyer [dyer!~dyer@108-193-172-174.lightspeed.tukrga.sbcglobal.net] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
Wroathe [Wroathe!~Wroathe@173-17-249-11.client.mchsi.com] has joined #ruby
jbrokc [jbrokc!~jbrokc@c-98-228-139-230.hsd1.il.comcast.net] has joined #ruby
<Okasu>
sorry for my broken english :)
<Okasu>
maybe with "m" modifier?
<Okasu>
//m e.g
<davidcelis>
?
<Okasu>
is in ruby regexp analog for 'g' modifier?
<Okasu>
can't use my brain now, sorry
<Okasu>
happy new year :)
tilde` [tilde`!~tilde@adsl-ull-221-117.42-151.net24.it] has joined #ruby
<Tachyx>
HNY!
<Tachyx>
:)
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby
Cervajz [Cervajz!~Cervajz@opensuse/member/Cervajz] has joined #ruby
codelurker [codelurker!~codelurke@c-65-96-208-17.hsd1.ma.comcast.net] has joined #ruby
jbrokc [jbrokc!~jbrokc@c-98-228-139-230.hsd1.il.comcast.net] has quit [#ruby]
trend [trend!~trend@97-81-69-219.dhcp.athn.ga.charter.com] has joined #ruby
<QKO>
HAPPY NEW YEAR EVERYONE!!!!
<shevy>
indeed
new_ruby_program [new_ruby_program!~new_ruby_@pool-173-58-89-188.lsanca.fios.verizon.net] has joined #ruby
notbrent [notbrent!~notbrent@sunstone105.s.subnet.rcn.com] has joined #ruby
replore [replore!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby
zastaph [zastaph!zastaph@unaffiliated/zastaph] has joined #ruby
<Wroathe>
Have any of you guys taken a chance to dig through some of the Rails modules? I've gotta say there's some beautiful code in here.
<Wroathe>
It's almost exciting to see pretty code like this.
akem [akem!~akem@unaffiliated/akem] has joined #ruby
<shevy>
Wroathe rails code beautiful?
<Wroathe>
?
<Wroathe>
What are you asking me?
<shevy>
ok
<shevy>
Wroathe, Rails code really does have some beautiful parts?
<Wroathe>
It's obviously a matter of opinion but some of the underlying ruby code that goes into the different modules of Rails is fun to look at.
<Wroathe>
I was just poking around the different tag_helper files in ActionView
rramsden [rramsden!~rramsden@s64-180-62-209.bc.hsia.telus.net] has joined #ruby
notbrent [notbrent!~notbrent@sunstone105.s.subnet.rcn.com] has joined #ruby
albedoa [albedoa!~albedoa@ip68-108-106-30.lv.lv.cox.net] has joined #ruby
tilde` [tilde`!~tilde@adsl-ull-221-117.42-151.net24.it] has joined #ruby
otakutomo [otakutomo!~otakutomo@zaq771a4b1b.zaq.ne.jp] has joined #ruby
Spockz [Spockz!~Spockz@ip12-101-208-87.adsl2.static.versatel.nl] has joined #ruby
PragCypher [PragCypher!~kapone@208.157.149.45] has joined #ruby
Yingjie_Cui [Yingjie_Cui!~chatzilla@124.126.130.194] has joined #ruby
ThatSnail [ThatSnail!~chatzilla@c-98-249-235-171.hsd1.fl.comcast.net] has quit [#ruby]
ph^ [ph^!~ph^@cm-84.212.225.74.getinternet.no] has joined #ruby
al3xnull [al3xnull!~al3xnull@h216.18.130.174.dynamic.ip.windstream.net] has joined #ruby
moshee [moshee!~moshee@unaffiliated/moshee] has joined #ruby
ryh [ryh!~ryh@216.228.48.198] has joined #ruby
Rod [Rod!~Rod@c-66-176-254-147.hsd1.fl.comcast.net] has joined #ruby
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
Cervajz_ [Cervajz_!~Cervajz@93.99.93.150] has joined #ruby
mdel [mdel!~mdel@pool-71-175-17-16.phlapa.fios.verizon.net] has joined #ruby
hukl [hukl!~hukl@pdpc/supporter/professional/hukl] has joined #ruby
<Wroathe>
Ok so I have this string "trololo" lets say I want to count all occurences of "ol" in this string (2) how would I go about doing that without using scan?
<Wroathe>
I don't like the idea of creating a new array just to count substrings. There's gotta be a better way.