apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste >3 lines of text on gist.github.com || Rails is in #rubyonrails || Log: http://irclog.whitequark.org/ruby
<ryanf> _cb: "rails00"
<_cb> in the folder I am at?
<GarethAdams> _cb: the 'rails00' you type is a path from your current location
ephemerian has quit [Quit: Leaving.]
<GarethAdams> _cb: you could type `rails new ~/Sites/rails00` if you wanted
randomautomator has quit [Remote host closed the connection]
fayimora has quit [Quit: Be back in a gifii]
<GarethAdams> _cb: but because you didn't give any other directory it uses the current directory. The same as `mkdir rails00` compared to `mkdir ~/Sites/rails00`
nazty has joined #ruby
Stalkr_ has quit [Quit: Leaving...]
<_cb> Great explanation. Thanks!
mdszy has quit [Quit: bye for now]
brianpWins has quit [Quit: brianpWins]
Targen has quit [Ping timeout: 245 seconds]
<aces1up> does ruby start up faster if you have a lot of requires, and the requires have the full path to the file rather than just the file and then using make a large load_path of all the directories to look in?
Maniacal has quit [Quit: Leaving]
bradhe has quit [Remote host closed the connection]
clam has joined #ruby
<clam> What is a good book for learning ruby 1.9?
<_cb> Strange rails new rails00 is creating a new folder instead of a rails00. That is why I could not find it
<clam> I see beginning ruby is considered a good book, but some reviews say it does not cover 1.9
banghouse has quit [Ping timeout: 244 seconds]
<_cb> rails rails00 creates the rails00 folder. Ok, I can roll with that.
<GarethAdams> _cb: that's rails 2 behaviour
<GarethAdams> _cb: you need to install rails 3 to get the behaviour as we described
mikeric has joined #ruby
<_cb> @#$ just spent the better part of an hour installing rails on ubuntu. ARgh!!
hakunin has joined #ruby
sailias has joined #ruby
bosphorus has joined #ruby
jesly__ has quit [Ping timeout: 252 seconds]
mikeric has quit [Client Quit]
reuf has joined #ruby
reuf has quit [Read error: Connection reset by peer]
<_cb> just want to get my feet wet on Ruby & Rails. Big diff between rails 3 and rails 2?
<GarethAdams> yes
<seanstickle> Don't use 2
<_cb> Using Ubuntu can I simply install 3 over 2?
<GarethAdams> gem install rails
IcyDragon has joined #ruby
CaptainJet has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
benson has quit [Remote host closed the connection]
jlogsdon has quit [Remote host closed the connection]
robotmay has joined #ruby
SegFaultAX|work2 has quit [Ping timeout: 252 seconds]
niku4i has joined #ruby
IceDragon has quit [Ping timeout: 246 seconds]
<_cb> Ok installing. Have a background on C,Delphi (Object Oriented Pascal), Basic, Assembler, PHP,Javascript.. Ruby looks somewhat similar to those languages. Never worked with a framework. What are the gotchas?
IcyDragon is now known as IceDragon
pting has quit [Quit: Ex-Chat]
mikeric has joined #ruby
iamjarvo has joined #ruby
pdtpatrick_ has quit [Quit: pdtpatrick_]
williamcotton__ has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
williamcotton has quit [Ping timeout: 252 seconds]
williamcotton_ is now known as williamcotton
williamcotton is now known as 15SACAX4T
williamcotton__ is now known as 18VAAZHEB
adeponte has quit [Remote host closed the connection]
tiripamwe has quit [Ping timeout: 246 seconds]
subbyyy has joined #ruby
subbyyy has quit [Max SendQ exceeded]
ckrailo has quit [Quit: Computer has gone to sleep.]
subbyyy has joined #ruby
<GarethAdams> _cb: Rails is opinionated software. It likes you to do things its way
robotmay has quit [Remote host closed the connection]
chessguy has joined #ruby
cbuxton has joined #ruby
owned_ has joined #ruby
indian has joined #ruby
ken_barber1 has joined #ruby
<_cb> That's what I am reading. Advantage of frameworks is that they are 'opinionated', disadvantages are that they are 'opinionated'.
zeromodulus has quit [Ping timeout: 246 seconds]
_cb is now known as _cb_afk
<richo> like most opinions it's very dependant on whether or not they align with your own
mrsolo has quit [Quit: Leaving]
ken_barber has quit [Ping timeout: 246 seconds]
zrail has joined #ruby
cdavaz has quit [Quit: cdavaz]
davidcelis has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
jgrevich has quit [Read error: Connection reset by peer]
cdavaz has joined #ruby
jgrevich has joined #ruby
cdavaz has quit [Read error: Connection reset by peer]
ken_barber1 is now known as ken_barber
cdavaz has joined #ruby
manizzle has quit [Ping timeout: 246 seconds]
yonggu has joined #ruby
zeromodulus has joined #ruby
cdavaz has quit [Client Quit]
cakehero has joined #ruby
sailias has quit [Quit: Leaving.]
cdavaz has joined #ruby
mdszy has joined #ruby
bradhe has joined #ruby
frogstarr78 has joined #ruby
cdavaz has quit [Ping timeout: 250 seconds]
ianbrandt has quit [Quit: ianbrandt]
<shevy> there is still a learning cost associated with it. in order to make use of advantages, you need to know quite a few things
yonggu has quit [Ping timeout: 246 seconds]
Gavilan has joined #ruby
khakimov has joined #ruby
savage- has quit [Remote host closed the connection]
null- has joined #ruby
banisterfiend has quit [Ping timeout: 246 seconds]
baroquebobcat has quit [Ping timeout: 240 seconds]
QaDeS_ has joined #ruby
niku4i has quit [Remote host closed the connection]
niku4i has joined #ruby
QaDeS has quit [Ping timeout: 246 seconds]
banisterfiend has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
niku4i has quit [Ping timeout: 248 seconds]
<mdszy> urgh
* mdszy tries to make this work
noganex has quit [Ping timeout: 248 seconds]
bradhe has quit [Remote host closed the connection]
khakimov has quit [Quit: Computer has gone to sleep.]
noganex has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
zodiac1111 has joined #ruby
<mdszy> argh
<mdszy> apparently
<mdszy> conditionals in C
<mdszy> make zero sense
<mdszy> at all
niku4i has joined #ruby
<shevy> why not
<shevy> if (bla)
<shevy> else (ble)
<shevy> and you can omit end!!!
<xiphiasx_> hi
<shevy> hi xiphisex
<xiphiasx_> C is ok
btanaka has quit [Remote host closed the connection]
<xiphiasx_> it makes me sad a lot though
yugui_zzz is now known as yugui
<mdszy> well for some reason
<mdszy> this is ALWAYS evalutating to true
<mdszy> if(((a + b + c) == SUM) && ((a ^ 2 + b ^ 2) == (c ^ 2)))
<mdszy> I'm gonna try in Ruby
<mdszy> where SUM is 1000
<mdszy> maybe the universe makes sense there
dnyy has quit [Read error: Connection reset by peer]
<shevy> hehe
<xiphiasx_> heh
<mdszy> ARGH
<mdszy> if (a + b + c == sum) && (a ** 2 + b ** 2 == c ** 2)
<xiphiasx_> i'm doing this
<mdszy> why, ruby, why?!?
Iszak has quit [Quit: Page closed]
<xiphiasx_> going to make a binding to ruby eventually
<mdszy> it's doing the same :V
<xiphiasx_> (perhaps it'll even be better than OptionParser!)
wallerdev has joined #ruby
<mdszy> okay, I have no clue what's wrong with this
<mdszy> anyone have any ideas as to why this is just printing 0?
<mdszy> and I know, boatloads of superflous parens
yugui is now known as yugui_zzz
<xiphiasx_> evil
Chryson has joined #ruby
<shevy> it seems to loop but very slowly
cdavaz has joined #ruby
pdtpatrick_ has joined #ruby
<mdszy> shevy: but it should never print "0"
<shevy> well be happy man
<shevy> it only prints 0
<mdszy> brb
<shevy> now if you turn it around, perhaps then it works
pdtpatrick_ has quit [Client Quit]
<mdszy> back
Snardbafulators has joined #ruby
<Snardbafulators> Tired of niggers? Sick of their monkeyshines? We are too! Join Chimpout Forum! http://www.chimpout.com/forum At Chimpout we are NOT white supremacists! I myself am a Mexican! Basically, if you are not a NIGGER and you hate NIGGERS, we welcome you with open arms! Join Chimpout Forum today! http://www.chimpout.com/forum
theRoUS_ has quit [Remote host closed the connection]
<mdszy> wat
<shevy> some spam attack on freenode
<mdszy> well, added this line
<mdszy> next if a == 0 || b == 0 || c == 0
<mdszy> didn't print zero :v
htroyack has joined #ruby
<shevy> lol
<shevy> I dont know what you are doing but are you sure this is the only way?
ghvandoorn has quit [Quit: Leaving]
<Snardbafulators> Tired of niggers? Sick of their monkeyshines? We are too! Join Chimpout Forum! http://www.chimpout.com/forum At Chimpout we are NOT white supremacists! I myself am a Mexican! Basically, if you are not a NIGGER and you hate NIGGERS, we welcome you with open arms! Join Chimpout Forum today! http://www.chimpout.com/forum
<shevy> god
<shevy> someone ban this spammer
<mdszy> shevy: I have no clue which way is the best XD
<Snardbafulators> Tired of niggers? Sick of their monkeyshines? We are too! Join Chimpout Forum! http://www.chimpout.com/forum At Chimpout we are NOT white supremacists! I myself am a Mexican! Basically, if you are not a NIGGER and you hate NIGGERS, we welcome you with open arms! Join Chimpout Forum today! http://www.chimpout.com/forum
<shevy> how can he simulate Notice
<mdszy> or just turn off outside-channel-messages
mfridh has quit [Ping timeout: 255 seconds]
<mdszy> it's probably just sending a message to a channel, despite not being in it
<mdszy> which is possible, and there's a channel mode that can be set to prevent it
<mdszy> I think I got it
<shevy> the channel here is kinda orphaned
bigoldrock has quit [Quit: Leaving.]
<denysonique> like
<mdszy> yay
<mdszy> the answer: 31875000
<shevy> wat
<shevy> did you let the script run for a long time?
<mdszy> ~20-30 seconds
<mdszy> maybe a minute
<mdszy> well, it worked
* mdszy shrugs
shadoi has joined #ruby
<Snardbafulators> fucking repaste this spam in #freenode to report fuckers Tired of niggers? Sick of their monkeyshines? We are too! Join Chimpout Forum! http://www.chimpout.com/forum At Chimpout we are NOT white supremacists! I myself am a Mexican! Basically, if you are not a NIGGER and you hate NIGGERS, we welcome you with open arms! Join Chimpout Forum today! http://www.chimpout.com/forum
fixl has joined #ruby
IceDragon has quit [Ping timeout: 246 seconds]
otters has quit [Quit: WeeChat 0.3.8]
<erichmenge> wtf is a monkeyshine?
otters has joined #ruby
<mdszy> who knows
<Snardbafulators> monkeyshine is typical nigger behavior
<Snardbafulators> learn more at Chimpout Forum!
<mdszy> OMG ITS A REAL PERSON :V
<mdszy> GTFO :V
<shevy> Snardbafulators: soon you'll get perma banned
<Snardbafulators> go for it you niggerloving bitch
<mdszy> bum-bum-bummmmm
<Snardbafulators> n
<Snardbafulators> i
<Snardbafulators> g
<Snardbafulators> g
<Snardbafulators> e
<Snardbafulators> r
<Snardbafulators> s
<Snardbafulators> _
<Snardbafulators> a
<Snardbafulators> r
<mdszy> solution!
<Snardbafulators> e
<Snardbafulators> _
<otters> oh
<Snardbafulators> n
<otters> for fuck's sake
<mdszy> /ignore
<Snardbafulators> o
<Snardbafulators> t
<mdszy> boom, done
<Snardbafulators> _
<Snardbafulators> h
<Snardbafulators> u
<mdszy> I love /ignore
<Snardbafulators> m
yonggu has joined #ruby
<Snardbafulators> a
<shevy> mdszy: way too much to type
<Snardbafulators> n
<Snardbafulators> s
<mdszy> shevy: Hm?
<Snardbafulators> Tired of niggers? Sick of their monkeyshines? We are too! Join Chimpout Forum! http://www.chimpout.com/forum At Chimpout we are NOT white supremacists! I myself am a Mexican! Basically, if you are not a NIGGER and you hate NIGGERS, we welcome you with open arms! Join Chimpout Forum today! http://www.chimpout.com/forum
<erichmenge> It is a bit strange #ruby would be subject to this.
<denysonique> Snardbafulators: do you code in Ruby btw?
<shevy> Snardbafulators: go get a job man
<erichmenge> Seems a bit out of a page of #warez666 or something
<otters> why the hell are there so many anti-"nigger" spam coalitions on freenode
JustinCampbell has quit [Remote host closed the connection]
<mdszy> who knows, just /ignore it XD
<GarethAdams> if you ignore him he'll die or something
iamjarvo has quit [Quit: Computer has gone to sleep.]
jameshyde has joined #ruby
<shadoi> bummer, sepp and apeiros are both offline
Snardbafulators has quit [K-Lined]
<banisterfiend> Snardbafulators: that chimpout.com/forum link doesnt work
<GarethAdams> too slow!
RORgasm has joined #ruby
yonggu has quit [Quit: yonggu]
td123 has joined #ruby
<mdszy> I'm glad I don't have to see what this dude is saying
RORgasm has quit [Ping timeout: 246 seconds]
<banisterfiend> mdszy: he left a while ago now :) K-Lined
<mdszy> ah, fun
Spooner has quit [Ping timeout: 246 seconds]
liluo has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
sebicas has quit [Quit: sebicas]
patient has quit [Quit: leaving]
nari has joined #ruby
sailias has joined #ruby
zodiac1111 has quit [Ping timeout: 244 seconds]
_cb_afk is now known as _cb
ingo86 has joined #ruby
pk1001100011 has quit [Quit: I've got a feeling there's a fish in the floor; I'd better squish it or he'll swim out the door; Sometimes they take me for a walk in the sun; I see my fish and I have to run]
<ingo86> hello, i have some problems compiling a gem because on Ubuntu I have the format-security flag enabled
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
<ingo86> so gcc reports me an error. Is there a workaround to compile that gem without that flag enabled?
<ingo86> i guess i should set the flag like this gem install gem_name --build-flags ??
<ingo86> the next syntax is obscure for me
_cb has quit [Ping timeout: 244 seconds]
yoklov has quit [Quit: computer sleeping]
<shadoi> ingo86: you can pass additional options using '--' after all gem options
Hanmac1 has joined #ruby
<ingo86> shadoi, is there a list of available build flags?
mucker has quit [Read error: Operation timed out]
<shadoi> ingo86: depends on the gem.
<ingo86> shadoi: it's eventmachine
<shadoi> ingo86: you probably need to look at the output from the failed build to see what options are available
Hanmac has quit [Ping timeout: 250 seconds]
<shadoi> or look at the source for the gem.
shadoi has left #ruby [#ruby]
shadoi has joined #ruby
<mdszy> it kinda sucks when you have something that should probably just take a long time, and you have to trust that it's not stuck XD
cdavaz has quit [Quit: cdavaz]
<shadoi> mdszy: there are ways to know :)
<mdszy> shadoi: of course, putting puts statements in everywhere? :P
iamjarvo has joined #ruby
<shadoi> mdszy: use a thread that provides state info
<shadoi> listens on a socket or something, lots of ways.
<offby1> "debugging with printf". It was good enough for my granddaddy
* mdszy shrugs
cmaujean has quit [Quit: cmaujean]
<shadoi> I have started having a thread for a control socket on all of my daemons and long-running processes.
otters has quit [Ping timeout: 240 seconds]
otters has joined #ruby
<ingo86> shadoi: umm, i'm not sure i can pass that parameter to eventmachine
<ingo86> shadoi: it's the format-error on compilation, which i am able to set as a cflag, but then ruby gems doesn't look at that and try a compilation without
<shadoi> ingo86: it's a generic way to pass build options to any gem that builds C extensions
mxweas_ has joined #ruby
minijupe has joined #ruby
friskd has joined #ruby
minijupe has quit [Client Quit]
<ingo86> shadoi: already tried with no results
<ingo86> shadoi: i will open a bottle of wine when i solve this issue, it's about 4 hours that i'm over it
<shadoi> wine is fine, but liquor is quicker.
vitor-br has quit [Quit: Saindo]
apok_ has joined #ruby
niku4i has quit [Remote host closed the connection]
_cb has joined #ruby
niku4i has joined #ruby
apok has quit [Ping timeout: 246 seconds]
zodiac1111 has joined #ruby
apok_ has quit [Ping timeout: 250 seconds]
niku4i has quit [Ping timeout: 244 seconds]
<offby1> *ahem*
<offby1> "Candy is dandy, but liquor is quicker".
elitheeli has joined #ruby
<banisterfiend> offby1: sup hanchrow
voodoofish430 has quit [Quit: Leaving.]
Schmidt has quit [Ping timeout: 246 seconds]
linduxed has quit [Ping timeout: 246 seconds]
Natch has quit [Ping timeout: 248 seconds]
CmdrTallen has joined #ruby
Icoin has quit [Quit: Icoin]
nopolitica has quit [Quit: Leaving.]
yoklov has joined #ruby
fridim_ has joined #ruby
artOfWar has quit [Remote host closed the connection]
<offby1> weekend!!
ken_barber has quit [Remote host closed the connection]
cdavaz has joined #ruby
<ingo86> shadoi: it's 4 am and i've done it, thank for your points
<offby1> I am ashamed to admit that my "pry" prompt is back down to 146. Hadda reboot it for some reason or other, but it was up in the 900s.
<banisterfiend> offby1: haha cool
SegFaultAX has quit [Quit: Lost terminal]
<banisterfiend> offby1: we're pushing a new release soon, it contains features that should excite u
SegFaultAX has joined #ruby
<ingo86> shadoi: btw, sudo gem install eventmachine -- --with-cflags=\"-O2 -pipe -march=native -w\"
zodiac1111 has quit [Ping timeout: 240 seconds]
<shadoi> ingo86: cool :)
seanstickle has quit [Quit: Nihil sub sole novum]
ingo86 has quit [Quit: This computer has gone to sleep]
noganex has quit [Ping timeout: 248 seconds]
<offby1> banisterfiend: the most exciting feature I could imagine would be unifying the documentation commands -- so that I wouldn't have to remember the difference between "show-doc" and "ri" (in fact, I don't know what the difference _is_)
mengu has quit [Read error: Connection reset by peer]
noganex has joined #ruby
indian has quit [Ping timeout: 248 seconds]
owned_ has quit [Ping timeout: 248 seconds]
obryan has quit [Quit: Konversation terminated!]
cdavaz has quit [Quit: cdavaz]
<_cb> after sudo gem install rails --version 3.0.0 I type rails -v and get bash: /usr/bin/rails: No such file or directory. What did I do wrong?
bradhe has joined #ruby
<offby1> _cb: perhaps "ruby" isn't on root's PATH
<offby1> just a guess
prometheus has quit [Quit: leaving]
<_cb> If I type ruby -v I get ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux]
eywu has quit [Quit: Leaving.]
ryanf has quit [Quit: leaving]
ryannielson has joined #ruby
wmoxam has joined #ruby
<offby1> how about it you type "sudo ruby -v" ?
<offby1> if you get the same (or even a similar) result, then I'm out of ideas.
<offby1> If not, though, that suggests you should modify root's PATH
<GarethAdams> …or, try and use something like `rvm` which lets you have user-based ruby installs without needing root
<GarethAdams> environment setup is much more annoying than it should be
<offby1> yep
<offby1> Python and Perl have their equivalents to rvm. Probably any language worth using does.
<offby1> Each reinvents that particular wheel :-|
<_cb> GarethAdams amen to that. I think I am going to un-install and re-install.
<offby1> Unix is great and all, but it's forty f***ing years old. Its assumptions have become invalid.
sebicas has joined #ruby
emmanuelux has quit [Ping timeout: 246 seconds]
<GarethAdams> _cb: I would say, forget about your existing ruby install. Install rvm, follow its instructions and then *never again* type `sudo` when doing anything to do with ruby or gems
<GarethAdams> rvm will sit totally alongside any existing install without touching it
monkegjinni has quit [Remote host closed the connection]
CmdrTallen has quit [Quit: Leaving]
jimeh has quit [Ping timeout: 240 seconds]
robotmay has joined #ruby
byronb has joined #ruby
khakimov has joined #ruby
nateberkopec has joined #ruby
GeekOnCoffee_ is now known as GeekOnCoffee
kevinbond has joined #ruby
mxweas_ has quit [Quit: Computer has gone to sleep.]
cdavaz has joined #ruby
manizzle has joined #ruby
robotmay has quit [Ping timeout: 246 seconds]
nateberkopec has quit [Read error: Connection reset by peer]
clam has quit [Quit: Lost terminal]
<offby1> at some point I think it's even safe to _uninstall_ the ruby that comes with your distro.
<offby1> I suspect you should wait until you've got rvm working, though
<GarethAdams> OS X for example advises not to do that, because some native tools may rely on it being there
<GarethAdams> s/native/existing/
headius has quit [Quit: headius]
<bricker88> Can anybody see here why $1 and $2 are nil? https://gist.github.com/3108896
<_cb> I think I have my system all messed up. Other than re-installing ubuntu what is the best way to clean up all the ruby/rails install?
<GarethAdams> _cb: installing rvm should have given you a clean ruby install to play with
<offby1> bricker88: I'm not 100% certain that gsub sets $1 $2 etc. Are you?
<offby1> Perhaps only =~ and similar set them
<bricker88> offby1: Yes, I have had it working before.
zodiac1111 has joined #ruby
<offby1> hm
<offby1> bricker88: in any case, you've got a "match" that you're ignoring; perhaps there are equivalents to $1 and $2 inside it, in attributes or something
QaDeS_ has quit [Quit: Ex-Chat]
<GarethAdams> if you have a match object, then match[1] and match[2] will be correct instead of $1 and $2
* offby1 nods gravely
<offby1> figgered
nari has quit [Ping timeout: 245 seconds]
<bricker88> offby1: GarethAdams: It's not actually a Match object though: https://gist.github.com/3108901
<GarethAdams> ok, the gsub documentation says "In the block form, the current match string is passed in as a parameter, and variables such as $1, $2, $`, $&, and $‘ will be set appropriately"
<offby1> that doesn't surprise me
<GarethAdams> so if your variables are nil then there's something dodgy with the content that's being matched
tomb has quit [Quit: Computer has gone to sleep.]
hunglin has joined #ruby
<_cb> ok got rvm v 1.14.5 what next?
<bricker88> GarethAdams: well, I checked it on Rubular and it matched correctly, and besides if there wasn't a match then the block would get run
<GarethAdams> bricker88: `raise match if $1.nil`
khakimov has quit [Ping timeout: 246 seconds]
<GarethAdams> bricker88: `raise match if $1.nil?`
nari has joined #ruby
<bricker88> let me see, good idea
<GarethAdams> _cb: have you followed the instructions from the end of the rvm installer?
khakimov has joined #ruby
nwest has joined #ruby
CmdrTallen has joined #ruby
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
<bricker88> GarethAdams: It raises the match string properly
<GarethAdams> and that string is?
<offby1> it seems odd that you're using gsub! without, as far as I can tell, specifying a replacement text
<bricker88> offby1: the replacement text is whatever the block evaluates to
<banisterfiend> offby1: 'ri' is even needed, IMO pry'd show-doc command overrides it
<banisterfiend> offby1: basically, pry has its own internal documentation system that i wrote from scratch that is faster and better than 'ri' (IMO, as it doesnt need docs to be pregenerateed). I only provided 'ri' for people who are used to that or prefer its output (which is diff. to show-doc's output)
<banisterfiend> offby1: basicaly *always* jsut use show-doc
<banisterfiend> offby1: isn't even needed*
<mdszy> banisterfiend: you wrote pry? :O
<banisterfiend> mdszy: Yeah
<mdszy> why did I not know this
<mdszy> Thank you!
<mdszy> Pry is awesome :D
<banisterfiend> thx
<banisterfiend> :)
_cb has quit [Quit: Leaving]
<GarethAdams> banisterfiend: and there was you complaining about getting no recognition ;)
<bricker88> GarethAdams: here: http://rubular.com/r/pNWKcdTlCl
<offby1> banisterfiend: that's good; I never understood "ri" and always used show-doc
<bricker88> GarethAdams: the test string there is exactly what gets raised
wmoxam has quit [Ping timeout: 265 seconds]
kebun has joined #ruby
<banisterfiend> offby1: sweet, one potential advantage in 'ri' though is that it can show docs for methods/classes that aren't loaded into the REPL, whereas show-doc acn only work with files that are already require'd
<offby1> meh
<offby1> I tend to have everything loaded up after 900 interactions :)
<banisterfiend> offby1: btw you can use the ? shortcut for show-doc
<mdszy> banisterfiend: holy crap ,did you write all that documentation yourself?
radic has quit [Ping timeout: 246 seconds]
<offby1> bricker88: could you paste a _complete_ example, that I can run without thinking, and see what you're seeing?
<banisterfiend> mdszy: no, documentation already exists as method/class comments, i just wrote the code to extract it, process and display it
<mdszy> Ahh, okay.
khakimov has quit [Ping timeout: 244 seconds]
<offby1> I am trying to kludge up a string that will match your regexp and match the subsequent code do something interesting, but it's tough sledding.
<mdszy> Very cool!
kedai has quit [Ping timeout: 250 seconds]
<bricker88> offby1: I could but I think it would take more time to set that up than it will for me to just figure it out… I was just hoping I was doing something obviously wrong
mxweas_ has joined #ruby
<offby1> *shrug*
<offby1> it's a trade-off, as are most things.
<bricker88> indeed
<offby1> Feel free to paste the xscript if you get that desperate :)
<bricker88> thank you for the help anyways
<offby1> Often in preparing the repro case, you stumble into the answer on your own. And if not, then you've made it super-easy for someone else to help
typicalRunt has joined #ruby
stefanp has joined #ruby
stefanp has joined #ruby
stefanp has quit [Changing host]
kevinbond has quit [Quit: kevinbond]
jeff_sebring has joined #ruby
khakimov has joined #ruby
zodiac1111 has quit [Ping timeout: 248 seconds]
zodiac1111 has joined #ruby
erichmenge has quit [Quit: erichmenge]
stefanp_ has quit [Ping timeout: 265 seconds]
ringotwo has quit [Remote host closed the connection]
nilg has joined #ruby
[Tyrant] has quit []
banisterfiend has quit [Remote host closed the connection]
jfelchner has quit [Ping timeout: 246 seconds]
khakimov has quit [Ping timeout: 250 seconds]
radic has joined #ruby
khakimov has joined #ruby
Schmidt has joined #ruby
crankycoder has joined #ruby
AndChat| has joined #ruby
otters has quit [Quit: Leaving]
otters has joined #ruby
zodiac1111 has quit [Ping timeout: 244 seconds]
fridim_ has quit [Ping timeout: 246 seconds]
elitheeli has quit [Quit: elitheeli]
<bricker88> offby1: It's being caused by ActionView's "simple_format", which does perform some regular expression but I'm surprised that it affects those $1 and $2 variables
<fowl> every match will set those
Juul has joined #ruby
<bricker88> fowl: But I'm calling simple_format and gsub at the same scope, so if anything I thought the variables would get overwritten when gsub! was called (after simple_format)
<bricker88> And why are they nil, and not the value of the other gsub?
<bricker88> from* the other gsub
<bricker88> it's all so confusing
richo has quit [Quit: laterz]
* bricker88 cries
<fowl> i wouldnt rely on $1, $2, $', $` etc because they're global
<fowl> if you're trying to match use #match and you'll have the match in an object
<bricker88> fowl: do I have another option when passing a block to gsub?
cdavaz has quit [Quit: cdavaz]
<bricker88> fowl: indeed
<fowl> "In the block form, the current match string is passed in as a parameter"
<fowl> from the api
<bricker88> fowl: Yeah but in this case I only care about the match variables. It's okay, I'll just use match
g_rotbart has quit [Remote host closed the connection]
linduxed has joined #ruby
cdavaz has joined #ruby
kevinbond has joined #ruby
RORgasm has joined #ruby
sailias has quit [Ping timeout: 246 seconds]
davidpk has quit [Quit: Computer has gone to sleep.]
mxweas_ has quit [Quit: Computer has gone to sleep.]
zodiac1111 has joined #ruby
RORgasm has quit [Ping timeout: 246 seconds]
banghouse has joined #ruby
tommyvyo has joined #ruby
<bricker88> fowl: I wonder if I could use $~. I might try it, or I might just stick with the match method
td123 has quit [Quit: WeeChat 0.3.8]
bricker88 has quit [Quit: Leaving.]
mikeric has quit [Quit: mikeric]
ben_alman has quit [Excess Flood]
Hanmac1 is now known as Hanmac
M3nti0n is now known as M3nti0n|off
apok has joined #ruby
mxweas_ has joined #ruby
mxweas_ has quit [Client Quit]
ewag has joined #ruby
clam has joined #ruby
<clam> Are there any ruby books with excercises?
<clam> Both Eloquent Ruby/Pickaxe contain no end of chapter excercises
<bertfo> not sure about books, but there is ruby koans
<clam> yeah I have that
kevinbond has quit [Quit: kevinbond]
<clam> =(
kebun has quit [Ping timeout: 250 seconds]
ben_alman has joined #ruby
clam has quit [Client Quit]
mdszy has quit [Quit: nini]
h4mz1d has joined #ruby
Dennis_ is now known as Croms
clam has joined #ruby
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ryannielson has quit [Read error: Connection reset by peer]
apok has quit [Quit: apok]
mockra has joined #ruby
panpainter has joined #ruby
igotnolegs has joined #ruby
ewag has quit [Quit: leaving]
ewag has joined #ruby
abra has quit [Ping timeout: 276 seconds]
nwest has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
mxweas_ has joined #ruby
abra has joined #ruby
verto|off is now known as verto
iamjarvo has joined #ruby
ewag has quit [Client Quit]
dhruvasagar has joined #ruby
ewag has joined #ruby
mockra has quit [Remote host closed the connection]
ewag has quit [Client Quit]
ewag has joined #ruby
<clam> Zed Shaw's book moves really slow(Well speaking from the python version), I'll check it out
jarred_ has quit [Quit: jarred_]
araujo has quit [Quit: Leaving]
<CmdrTallen> Just checking that I have this straight. Ruby has only six basic built-in classes; Fixnum, Bignum, String, Range, Array and Hash. Is this correct? I am just surprised by this.
nilg has quit [Read error: Connection reset by peer]
davidpk has joined #ruby
Bofu has joined #ruby
<Hanmac> CmdrTallen the guy who told you this was lying
<CmdrTallen> well thats not good then. I was surprised to read that here -> http://www.humblelittlerubybook.com/book/
Bofu2U has quit [Ping timeout: 244 seconds]
ananthakumaran has joined #ruby
verto is now known as verto|off
savage- has joined #ruby
Juul has quit [Ping timeout: 265 seconds]
<Hanmac> yeah thats very un-informative :P
h4mz1d has quit [Read error: Operation timed out]
<bperry> Hanmac: what would you say it had besides those that is a *basic* type
<bperry> or primitive
<bperry> depending on your nomenclature
cdavaz has quit [Quit: cdavaz]
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
<Hanmac> what about true, false and nil? and the curresponding classes :P
<bperry> ok, boolean
<bperry> I would argue nil is the absence of a type but fair point
<bperry> I think the author just lef one out
<bperry> unless true and false are represented in memory as a fixnum
<bperry> which would make the author's statement accurate
typicalRunt has quit [Ping timeout: 248 seconds]
jarred has joined #ruby
<Hanmac> oO the author tells about symbol, but never what a symbol "is" oO
jesly__ has joined #ruby
<Hanmac> i collect all my classes and get this: [Object, Module, Class, BasicObject, NilClass, Data, TrueClass, FalseClass, Encoding, String, Symbol, Numeric, Integer, Fixnum, Float, Bignum, Array, Hash, Struct, Regexp, MatchData, Range, IO, File, Dir, Time, Random, Proc, Method, UnboundMethod, Binding, Enumerator, RubyVM, Thread, ThreadGroup, Mutex, Fiber, Rational, Complex]
<bperry> yeah, those aren't all primitive or basic types
<bperry> we should ignore the basic type nomenclature because it describes the types poorly, they are primitives
<fowl> bperry, ruby doesnt have types
<fowl> it doesnt have primitives
<fowl> it doesnt have distinct ints
<bperry> not true
jgrevich_ has joined #ruby
jgrevich has quit [Read error: Connection reset by peer]
jgrevich_ is now known as jgrevich
<bperry> we run into typing issues all the time at work
<bperry> using ruby
<fowl> then you need an ergonomic keyboard
<Hanmac> bperry to confuse you, ruby strings are storred differently depending on the size of the string (in MRI)
<erikwb> kinesis keyboard dude
<bperry> heh
<erikwb> 1) don't use vi, it fucking suck
<erikwb> s
<erikwb> 2) kinesis
<bperry> we have a few guys using kinesis
<erikwb> 3) emacs
<bperry> and emacs
<bperry> heh
<erikwb> ====> good programmer!
<bperry> O use qwerty and vim
<bperry> I*
<Hanmac> i prefer qwertz
<erikwb> as a good programmer who uses emacs and kinesis - and who is prone to zealotry
centipedefarmer has joined #ruby
<erikwb> i can confidently say
<erikwb> switch to dvorak, and you will code better.
<erikwb> unless you already code better in which case you have an equivalent argument.
centipedefarmer has quit [Client Quit]
<Hanmac> i use eclipse ... its better when you wrap something
<erikwb> Hanmac: what's wrap something mean
<Hanmac> c++ lib => ruby ext
<erikwb> to run on jruby?
<Hanmac> nope. i prefer MRI (or rubinius)
jgrevich_ has joined #ruby
jgrevich has quit [Read error: Connection reset by peer]
jgrevich_ is now known as jgrevich
<erikwb> why's eclipse good for writing native ruby bindings?
<erikwb> i mean it's a good ide but i never figured it'd be good for that in particular
dhruvasagar has quit [Ping timeout: 246 seconds]
<fowl> erikwb, its good because it allows you to input text and save files
<erikwb> EDIT.COM but for hackers!
perryh_away is now known as perryh
<fowl> also it gives you a few minutes to meditate while you wait for it to start
mxweas_ has quit [Quit: Computer has gone to sleep.]
perryh is now known as perry
<Hanmac> erikwb if you have a bigger lib then its good (i monstly look over hundrents of header files)
hayer has quit [Ping timeout: 248 seconds]
kyktommy has joined #ruby
h4mz1d has joined #ruby
andoriyu has quit [Quit: This computer has gone to sleep]
Boffers has joined #ruby
ringotwo has joined #ruby
<shadoi> fowl: best reason I've ever heard to use eclipse. lol
igotnolegs has quit [Quit: Computer has gone to sleep.]
jgrevich has quit [Read error: Connection reset by peer]
Bofu has quit [Ping timeout: 255 seconds]
jgrevich has joined #ruby
ringotwo has quit [Remote host closed the connection]
kyktommy has quit [Quit: kyktommy]
<bperry> dont forget workspace refreshing
a_a_g has joined #ruby
<shadoi> personally I like all the icons and buttons to click on before I try to find my keyboard again.
<Hanmac> try to wrap/bind something like OGRE without IDE
<Hanmac> (and swig is NOT an option)
Axsuul has quit [Ping timeout: 246 seconds]
<clam> in ruby does everyone have to be inside a method?
<clam> or can I just quickly put it inside a class?
<clam> I'm trying to experiment with the array[x,y] thing to understand it more
<Hanmac> clam you could also use the toplevel object, so it looks more fuctional or procudual then OO
<clam> What is that/How do I do it
<Hanmac> just without methods
savage- has quit [Remote host closed the connection]
banisterfiend has joined #ruby
<clam> Is there any reason for an array = [0, 1, 2 ,3 ,4 ,5] that doing puts "#{array[2,4]}" will print 2,3,4,5
<clam> and include the 5 and not just four
<clam> like array[2,2] does 2,3
<fowl> clam, array[x, y] is start at x, y is the length
<shadoi> clam: if you want exclusive range use ...
<shadoi> array[2…4]
khakimov has quit [Ping timeout: 248 seconds]
<fowl> ie you want 3 elements array[2,3]
<fowl> if you want element #2 to #4 its array[2..4]
<clam> Oh okay, that makes sense, thanks. I was just going through koans
<fowl> strings work the same way, "herro"[1,3] #=> "err"
htroyack has quit []
mahmoudimus has joined #ruby
mxweas_ has joined #ruby
khakimov has joined #ruby
Ionic` has quit [Ping timeout: 240 seconds]
cantonic_ has joined #ruby
<CmdrTallen> Interesting, are all user defined classes "partial" (to use C# vernacular) in ruby?
andrewhl has joined #ruby
<fowl> CmdrTallen, they can be reopened yes
<fowl> but thats not limited to user defined classes
<fowl> you can add methods to Kernel if you want
<CmdrTallen> so no concept of "sealed" or "protected" classes then I take it.
jarred has quit [Quit: jarred]
zodiac1111 has quit [Ping timeout: 244 seconds]
h4mz1d has quit [Ping timeout: 252 seconds]
<banisterfiend> CmdrTallen: what's a sealed class?
cantonic has quit [Ping timeout: 248 seconds]
cantonic_ is now known as cantonic
<bperry> CmdrTallen: no, only private methods
<offby1> CmdrTallen: short answer: no :-)
<CmdrTallen> Very interesting indeed.
hunglin has quit [Quit: Leaving.]
<banisterfiend> bperry: you can kind of define private classes in 1.9.3
<fowl> CmdrTallen, check this out http://pastebin.com/tMRKEdXF
<fowl> turns out you can freeze classes lol
<fowl> but dont do it because you'll get shot
Weems has joined #ruby
<CmdrTallen> banisterfiend: a "sealed" class is a class that cannot be modified nor can it be inherited from, sorry again its a C# reference. Trying to learn Ruby for a work project.
crankycoder has quit [Remote host closed the connection]
<banisterfiend> CmdrTallen: well, you can make it so the class raises an exception when another class inherits from it
h4mz1d has joined #ruby
<banisterfiend> CmdrTallen: classes have an inherited() hook, and u could just raise Exception in there
<Hanmac> c++11 has similar, you could make a class final, so you cant inherit from it
<CmdrTallen> banisterfiend: ah interesting idea.
bricker88 has joined #ruby
<banisterfiend> CmdrTallen: but rather than bringing c# idioms across to ruby, u could learn ruby idioms instead ;)
<CmdrTallen> banisterfiend: well thats what I am attempting to do, but I have to start with what I know to get there.
<Hanmac> frozing or blocking classes from modifing is an bad idea imo
<banisterfiend> CmdrTallen: buy "eloquent ruby"
<banisterfiend> CmdrTallen: it gives you a good overview of idiomatic ruby
a_a_g has quit [Quit: Leaving.]
tk_ has joined #ruby
tk___ has joined #ruby
<CmdrTallen> banisterfiend: thanks for the tip I will check it out. I am suppose to give some LOE Monday on getting "up to speed" to do a RoR project. So far I am thinking something like "less than 6 months" ;)
<davidcelis> the rails source https://github.com/rails/rails is a good thing to look at for idiomatic ruby code too
<davidcelis> lol jk those jerks make their own idioms
<banisterfiend> CmdrTallen: LOE?
<davidcelis> CmdrTallen: LOE?
<CmdrTallen> banisterfiend: sorry "Level Of Effort" I spend too much time talking to managers.
undersc0re has joined #ruby
<banisterfiend> CmdrTallen: will ruby be your first dynamic language?
<CmdrTallen> banisterfiend: I am familiar with Python and JS so not really.
<banisterfiend> col
<banisterfiend> bbl
banisterfiend has quit [Remote host closed the connection]
burgestrand has quit [Quit: Leaving.]
<Hanmac> hm i dont think rails is good for learning ruby ...
h4mz1d has quit [Ping timeout: 248 seconds]
nachtwandler has joined #ruby
Ethan has quit [Ping timeout: 248 seconds]
<davidcelis> Hanmac: hey bro
<davidcelis> remember when predicates used to return false/true instead of nil/0 ?
<davidcelis> i don't
jarred has joined #ruby
quest88 has joined #ruby
<Hanmac> i remember times when ext are builded with swig ...
<fowl> do you remember your 3rd birthday
<davidcelis> fowl: i wish
<davidcelis> i wish i remembered three years ago man
<fowl> uncle harold got wasted and made an ass of himself as usual
<davidcelis> worst infantile amnesia ever
EzeQL has quit []
<Hanmac> fowl i remember moments when i was five
mahmoudimus has quit [Quit: Computer has gone to sleep.]
bburton_ has joined #ruby
bburton has quit [Ping timeout: 245 seconds]
hunglin has joined #ruby
mistofvongola has quit [Ping timeout: 246 seconds]
mistofvongola has joined #ruby
wallerdev has quit [Quit: wallerdev]
jarred has quit [Quit: jarred]
choffstein has quit [Remote host closed the connection]
tk_ has quit [Quit: ばいばい]
itnomad has quit [Quit: Leaving]
Axsuul has joined #ruby
tfitts has quit [Read error: Connection reset by peer]
tfitts has joined #ruby
CaptainJet has quit []
_bart has quit [Ping timeout: 240 seconds]
_bart_ has joined #ruby
andoriyu has joined #ruby
Draco_ has joined #ruby
ananthakumaran has quit [Ping timeout: 244 seconds]
ananthakumaran has joined #ruby
wvms has left #ruby [#ruby]
mxweas_ has quit [Ping timeout: 252 seconds]
mxweas has quit [Ping timeout: 246 seconds]
fugit_ has quit [Ping timeout: 244 seconds]
iamjarvo has quit [Quit: Computer has gone to sleep.]
nachtwandler has quit [Ping timeout: 246 seconds]
mxweas has joined #ruby
mxweas_ has joined #ruby
Juul has joined #ruby
jgrevich has quit [Ping timeout: 246 seconds]
jameshyde has quit [Remote host closed the connection]
andoriyu has quit [Quit: This computer has gone to sleep]
jgrevich has joined #ruby
mpereira has quit [Ping timeout: 248 seconds]
noyb has joined #ruby
dekroning has joined #ruby
mrdodo has joined #ruby
eywu has joined #ruby
jgrevich_ has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
a_a_g has joined #ruby
jgrevich has quit [Ping timeout: 240 seconds]
ananthakumaran has quit [Quit: Leaving.]
fugit has joined #ruby
jgrevich_ has quit [Ping timeout: 248 seconds]
mistofvongola has quit [Quit: WeeChat 0.3.7]
dekroning has quit [Ping timeout: 244 seconds]
jgrevich has joined #ruby
noyb has quit [Ping timeout: 244 seconds]
hunglin has quit [Quit: Leaving.]
Morkel has joined #ruby
zodiac1111 has joined #ruby
ryanf has joined #ruby
Whoop has quit [Ping timeout: 264 seconds]
hakunin has quit [Read error: Connection reset by peer]
Draco_ has quit [Ping timeout: 246 seconds]
hakunin has joined #ruby
jgrevich_ has joined #ruby
jgrevich has quit [Read error: Connection reset by peer]
jgrevich_ is now known as jgrevich
mikeric has joined #ruby
jgrevich has quit [Client Quit]
jgrevich has joined #ruby
sdwrage has quit [Quit: geekli.st/programmer]
ananthakumaran has joined #ruby
Juul_ has joined #ruby
sebicas has quit [Quit: sebicas]
Juul has quit [Ping timeout: 265 seconds]
andrewhl has quit [Remote host closed the connection]
perry is now known as perryh_away
banisterfiend has joined #ruby
banisterfiend` has joined #ruby
khakimov has joined #ruby
AndChat| has quit [Ping timeout: 248 seconds]
jgrevich has quit [Ping timeout: 250 seconds]
banisterfiend` has quit [Remote host closed the connection]
banisterfiend has quit [Ping timeout: 265 seconds]
banisterfiend has joined #ruby
Niamkik has joined #ruby
jesly__ has quit [Ping timeout: 246 seconds]
lxsameer has joined #ruby
lxsameer has quit [Max SendQ exceeded]
jgrevich has joined #ruby
mikeric has quit [Quit: mikeric]
qo is now known as qb
banisterfiend has quit [Remote host closed the connection]
banisterfiend has joined #ruby
jgrevich_ has joined #ruby
friskd has quit [Ping timeout: 265 seconds]
jgrevich has quit [Ping timeout: 265 seconds]
jgrevich_ is now known as jgrevich
banisterfiend has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
Fretta has quit [Quit: Fretta]
Squee-D has joined #ruby
banisterfiend has joined #ruby
jesly__ has joined #ruby
quest88 has quit [Quit: quest88]
manizzle has quit [Remote host closed the connection]
manizzle has joined #ruby
eywu has quit [Quit: Leaving.]
panpainter has quit [Ping timeout: 244 seconds]
lxsameer has quit [Ping timeout: 248 seconds]
saschagehlich has joined #ruby
zodiac1111 has quit [Ping timeout: 255 seconds]
timonv has joined #ruby
zommi has joined #ruby
RORgasm has joined #ruby
cloud|windoze has joined #ruby
cloud|windoze has quit [Client Quit]
RORgasm has quit [Ping timeout: 246 seconds]
bosphorus has quit [Remote host closed the connection]
bricker88 has quit [Remote host closed the connection]
foofoobar has joined #ruby
<foofoobar> Hi, I'm looking for a solid way to build a GUI with ruby for windows/osx.
<foofoobar> Does someone have a suggestion? I found a few, but most of them is a) stopped updating or b) still under heavy development and has a lacking support of all default widgets
<Kwpolska> foofoobar: what about gtk or qt?
<foofoobar> Kwpolska: Is this cross platform?
<Kwpolska> (although gtk is a mess)
<Kwpolska> foofoobar: of course. windows, linux and osx are supported, other systems too.
crates has quit [Remote host closed the connection]
RichieEvan has quit [Ping timeout: 248 seconds]
jfelchner has joined #ruby
crates has joined #ruby
zodiac1111 has joined #ruby
RichieEvan has joined #ruby
<Kwpolska> foofoobar: google for QtRub
<Kwpolska> QtRuby*
<foofoobar> ty, will have al look at this
ryanf has quit [Quit: leaving]
duper has quit [Read error: Connection reset by peer]
mrdodo has quit [Remote host closed the connection]
<foofoobar> Kwpolska: So if I want to create an desktop application and give it to a friend of mine, he also has to install qt + qt4-ruby right?
<Kwpolska> yup
<foofoobar> No way to bundle this?
<Kwpolska> although through use of magic you could bundle it
workmad3 has joined #ruby
yoklov has quit [Quit: computer sleeping]
<foofoobar> Bundle with something like rubytoexe?
<Kwpolska> maybe, don’t know.
emptiness has quit [Ping timeout: 248 seconds]
subbyyy has quit [Quit: Leaving.]
<Kwpolska> for example, Source Filmmaker uses qt. I see files like qtcore4.dll, qtgui4.dll, qtnetwork4.dll and qtwebkit4.dll. I also see python26.dll and friends.
<Kwpolska> so it’s possible to do.
<Kwpolska> The OS X bundle system used to distribute stuff is also going to let you do that. And Linux folks should have QT installed already. And if not, they’ll do it manually.
lxsameer has joined #ruby
vladr has joined #ruby
Helius has joined #ruby
Juul_ has quit [Ping timeout: 246 seconds]
zommi has quit [Remote host closed the connection]
emptiness has joined #ruby
Parabol has joined #ruby
jgrevich has quit [Quit: jgrevich]
Squee-D has quit [Read error: Connection reset by peer]
Squee-D has joined #ruby
_bart_ has quit [Quit: _bart_]
araujo has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
emptiness has quit [Ping timeout: 265 seconds]
emptiness has joined #ruby
bradhe has quit [Remote host closed the connection]
monkegjinni has joined #ruby
<fowl> foofoobar, http://ocra.rubyforge.org/
vladr has quit [Ping timeout: 248 seconds]
Squee-D has quit [Ping timeout: 260 seconds]
Morkel has quit [Quit: Morkel]
robotmay has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
dangerousdave has joined #ruby
foofoobar has quit [Quit: bb]
ringotwo has joined #ruby
bradhe has joined #ruby
workmad3 has joined #ruby
bradhe has quit [Remote host closed the connection]
rippa has joined #ruby
monkegjinni has quit [Remote host closed the connection]
zodiac1111 has quit [Ping timeout: 265 seconds]
khakimov has quit [Quit: Computer has gone to sleep.]
mobilegamelabs has joined #ruby
Whoop has joined #ruby
a_a_g has quit [Quit: Leaving.]
thecreators has quit [Remote host closed the connection]
GeekOnCo- has quit [Read error: Connection reset by peer]
GeekOnCoffee has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
zodiac1111 has joined #ruby
monkegjinni has quit [Ping timeout: 265 seconds]
burgestrand has joined #ruby
jesly__ has quit [Ping timeout: 246 seconds]
<fasta> How do I obtain a tar.gz ruby on rails package?
andoriyu has joined #ruby
<fasta> Alternatively, where do gem files end up?
<shevy> .gem files are installed on your SITE DIR locally
<shevy> debian typically changes that default, but on systems where the ruby binary is at /usr/bin
<shevy> one should be able to find all gem files at:
<shevy> /usr/lib/ruby/gems/1.9.1/cache/
<shevy> /usr/lib/ruby/gems/*/cache/
<shevy> where * is the API version number
<shevy> so if you do a "gem install rails", the gems should be all put up there
<Hanmac> some gems are installed as debian packages, but ruby gems could detect them too
<fasta> Why exactly does gem install require root?
yxhuvud has joined #ruby
<fasta> Is that because it is then more effective at distributing exploits?
<Kwpolska> fasta: because you’re installing it to /usr/?
<fasta> Kwpolska: how do I install things somewhere else?
<fasta> Kwpolska: and why doesn't it do that by default?
<fasta> Kwpolska: because if I run it as a normal user, it simply fails.
<fasta> (It tries to even download things and then it simply raises an exception)
<fasta> It should simply say 'use --foo-option to install as normal user'.
<fasta> Defaults like these are terrible.
zodiac1111 has quit [Ping timeout: 246 seconds]
krz has quit [Quit: krz]
<fasta> Oh, look someone made the same suggestion in.... 2006.
<Kwpolska> fasta: git install --user-install
<fasta> I suppose it must be really, really hard to add two lines of code.
mneorr has joined #ruby
<fasta> Kwpolska: yeah, Google also tells me; I would prefer it if a program didn't need a google query to work.
timonv has quit [Remote host closed the connection]
<fasta> Judging from other results it appears that it still fails in some cases.
<fasta> I.e., it is 'work' to set it up in a decent way.
<fasta> Really, what is the rationale to require root by default?
lkba has quit [Ping timeout: 265 seconds]
<Kwpolska> fasta: gem help install; no google needed
<fowl> lol
<fasta> Kwpolska: asking google is faster than doing that.
<Kwpolska> fasta: learn linux standards.
<fasta> Kwpolska: lol
tommyvyo has joined #ruby
<fowl> my gems are in ~/.gem or ~/.rbenv/version/.../gems
<fasta> Kwpolska: gem help install is not a linux standard.
<fasta> Kwpolska: manpages are.
<Kwpolska> fasta: --help is also a standard.
<Kwpolska> de facto.
<fasta> Kwpolska: and requiring more rights by default is retarded.
<fasta> Kwpolska: and also has nothing to do with Linux.
mxweas_ has quit [Quit: Computer has gone to sleep.]
<Kwpolska> fasta: this is for multi-user environments.
<fowl> fasta, stop ;_;ing
<fowl> it makes you look weak
RichieEvan has quit [Quit: RichieEvan]
RichieEvan has joined #ruby
<fasta> fowl: it is completely valid criticism.
<shevy> fasta: all you need to do is download the .gem file somewhere. it is an archive, like .tar.gz. once you have the .gem file, you can backup, reinstall etc.. etc..
<fasta> I have no need for 'how things can be worked around'-explanations right now.
blast_hardcheese has quit [Quit: ZNC - http://znc.sourceforge.net]
<fowl> fasta, so post a new issue, no use in crying over it
<fasta> It's really simple. The way it works now is stupid. Period.
gentz has joined #ruby
chimkan has joined #ruby
objlinks has joined #ruby
chimkan has quit [Client Quit]
<fowl> protip: don't use system ruby use rvm or rbenv or rbfu or configure --prefix
blacktulip has joined #ruby
<fasta> A child could predict that you can't trust a ruby developer with root.
<shevy> do you use redhat
snearch has joined #ruby
<fasta> shevy: I use lots of systems.
pygospa has joined #ruby
<shevy> ok so you use distribution ruby
<shevy> go ask them about help
<fowl> i can't be arsed to configure gems so i'm gonna bitch about it
<fasta> I was more curious to hear how the gem developers could be this stupid.
<shevy> fasta please do the world a favour and not use ruby
<shevy> it'll for the better for everyone
<fasta> shevy: please do the world a favour and remove Ruby from the WWW.
cirwin has joined #ruby
<shevy> I have no issues at all. gems work beautifully here as it does for many others
<fasta> No security problems, no hipsters.
<shevy> but since you are a distribution user, go ask your distribution
<shevy> whoa, the world is so insecure I AM GONNA DIE! my name is fasta and I am an IRC cowboy
<fasta> Also note how my original question has not been answered.
<fasta> I simply asked where I could obtain a tarball.
<shevy> all I see is rants from you
<fasta> A tarball for ruby on rails.
<shevy> "tarballs" what does that even mean
<shevy> you want a .tar.gz ?
<shevy> and nothing but a .tar.gz ?
<fowl> fasta, did it ever occur to you that you could just clone the repo
mrdodo has joined #ruby
<shevy> to unpack a gem, do "gem unpack *.gem"
<shevy> then you can create a tarball from this directory
<fasta> fowl: no, it didn't, because cloning a repo gives me more information than I am interested in.
<fasta> Some systems support creating a tarball from the master.
<fasta> Normal people make these things called 'releases'.
<shevy> and a .gem is not a 'release'?
<fowl> shevy, gems are scary :(
<shevy> lol
<fowl> you can't trust a gem that thousands of people have installed without problems
<shevy> I guess fasta never extracted a .gem so far
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
<fasta> If a 'gem' is just a tar.gz, then it is retarded to call them not simply like that.
<fasta> It adds nothing.
<shevy> ok he is just ranting
<fowl> you add nothing
<fowl> lul
Parabol has quit [Quit: Parabol]
<fowl> go away troll, we're trying to idle in here
<shevy> fasta: I dont get your complaint. if you dislike .gem, simply repackage it to a format of your liking
<fasta> shevy: I am not the one who introduced this change.
<shevy> ok why do you use tar.gz then
<shevy> why not tar.xz
<fasta> shevy: why should I fix something someone else broke?
<shevy> no, you saw the question
<shevy> why tar.gz rather than tar.xz
lkba has joined #ruby
<fasta> shevy: they could just tell people to install atool. Problem solved.
<shevy> atool requires perl
<fasta> shevy: but no... ruby wants to reinvent the wheel.
<shevy> why should ruby depend on perl?
thone_ has quit [Ping timeout: 252 seconds]
<shevy> what is your rational for that?
mrdodo has quit [Ping timeout: 248 seconds]
<fasta> shevy: because I doubt people care about that.
RichieEvan has quit [Quit: RichieEvan]
<shevy> normal users are happy to stay within the distribution world
monkegjinni has joined #ruby
RichieEvan has joined #ruby
<fowl> if you're so scared just install your distribution's rails package
<shevy> distributions create all sorts of ad-hoc solution and they are incompatible to one another purposely
<shevy> fasta: explain why debian's ruby is not compatible with fedora's ruby for instance
<shevy> yeah
<banisterfiend> fasta: a gem is not just a .tar.gz, it has a bunch of metadata
<fasta> shevy: are you logged in as root?
<shevy> you are a weak man fasta, please stick to the distribution world
xbob has joined #ruby
<fasta> shevy: is that some kind of sick joke?
RichieEvan has left #ruby [#ruby]
lkba has quit [Client Quit]
thone has joined #ruby
<Mon_Ouie> fasta: Anyway, complaining about how things are now here won't help anything
<shevy> fasta: what kind of joke? I compile everything I use from source myself. Ruby scripts aid me in that, everywhere, all the time.
fangwen has joined #ruby
<Mon_Ouie> If you want it to change, file a feature request on rubygem's repo
<fasta> shevy: that you are logged in as root for irc and try to tell me something about security.
<fowl> Mon_Ouie, filing an issue is not an option
<fasta> shevy: that's just hilarious.
<shevy> fasta: security OMG OMG OMG
<shevy> I am gonna die
<fowl> Mon_Ouie, if you can't get instant feedback, its not a gratifying troll
<shevy> did you use a .gem already fasta ?
<fasta> shevy: I have used rvm in the past, and compiled ruby from source.
<fasta> shevy: douche bag.
<shevy> I dont use rvm and recommend people to not use it
<shevy> fasta you compiled ruby from source? really?
<shevy> then we could be friends still
<fasta> shevy: and I compiled Squeak from source.
<fasta> shevy: and tons of other systems I use.
<shevy> \o/
<shevy> I begin to like you
<fasta> shevy: I act like I do, because I am not impressed.
<fasta> shevy: not because I am ignorant.
<fasta> shevy: although it might be hard to see the difference.
<shevy> that's good, that shows a willingness to learn
<fasta> There isn't much to learn anymore for me.
<shevy> oh
fangwen has quit [Client Quit]
<fasta> Only crappy systems which other people have learned.
<fasta> have created*
<fasta> Good systems don't require 'learning'.
<shevy> indeed
<shevy> microsoft windows
<fasta> I think that some parts of Microsoft Windows are indeed vastly superior to anything in the Linux world.
<fasta> For example, firewall configuration.
<fasta> I could do that without reading any manual.
<fasta> In Linux that's just not going to happen.
pk1001100011 has joined #ruby
<fasta> Lots of things in Windows are really bad, like shipping with the bare minimum of software.
yonggu has joined #ruby
<fasta> Anyway, I am not telling anything new here.
<shevy> thought you cared about security yet you like windows. hmmm.
<fasta> shevy: what?
<fasta> shevy: I didn't even say that.
zodiac1111 has joined #ruby
<fasta> shevy: I said that Windows has some superior parts.
<shevy> but it doesnt require any learning
<fasta> shevy: which is why that part is superior, yes.
<shevy> the best security is the one without learning
<shevy> OpenBSD
<fasta> shevy: stop trolling.
<fasta> shevy: or continue, I will just put you on ignore.
<shevy> "Only two remote holes in the default install"
<shevy> no please don't put me on ignore
davidpk has quit [Quit: Computer has gone to sleep.]
<fasta> shevy: ok, slightly more productive: you don't suggest rvm, so what do you recommend?
jfelchner has quit [Ping timeout: 252 seconds]
<shevy> fasta: an installation scheme similar to the one gobolinux uses and always source installations
<shevy> fasta: only very few people will want to go through that though
zodiac1111 has quit [Ping timeout: 265 seconds]
<shevy> fasta: most people who come here and have ruby-related install problems use the system ruby from debian/ubuntu. for most of them, using RVM makes things a lot easier
objlinks has quit [Ping timeout: 248 seconds]
zearuby has joined #ruby
yugui_zzz is now known as yugui
ringotwo has quit [Remote host closed the connection]
nyuszika7h has quit [Ping timeout: 246 seconds]
Stalkr_ has joined #ruby
SirFunk has quit [Ping timeout: 246 seconds]
workmad3 has quit [Ping timeout: 248 seconds]
araujo has quit [Read error: Connection reset by peer]
araujo has joined #ruby
robotmay has quit [Remote host closed the connection]
zzw has joined #ruby
pygospa has quit [Disconnected by services]
pygospa has joined #ruby
SirFunk has joined #ruby
<zzw> hi all i'm new
<Stalkr_> Anyone know why I get this error? https://gist.github.com/3108270
<shevy> hi zzw
RORgasm has joined #ruby
apeiros_ has joined #ruby
<shevy> Stalkr_: because @zstream was not defined or set to anything other than nil
<shevy> and invoking a method on nil usually will fail
<shevy> one hacky way to "fix" this could be to change that line to this instead: "@zstream.close if @zstream"
<shevy> the right way to fix is to ensure that @zstream is always meaningfully set though
monkegjinni has quit [Ping timeout: 246 seconds]
davidpk has joined #ruby
<shevy> (or raise an error before. or tell users how they should use this piece of software properly.)
<Stalkr_> I didn't write the file though, I am just following a guide
<Stalkr_> I can try change it tho
<shevy> yeah, the code is a bit odd IMO
RORgasm has quit [Ping timeout: 246 seconds]
<Stalkr_> def unbind; @zstream.close if @zstream; end
<Stalkr_> Is that what it should be?
<shevy> if it is an official guide though, you could perhaps file a bug report
<shevy> well. that should get rid of that specific error
<shevy> it's hackish though
<Stalkr_> I will try :-)
<Stalkr_> It doesn't crash now, but it doesn't do what it is supposed to either :-/
<Stalkr_> I will try some more Googling, thanks tho :-)
<shevy> yeah, it probably tries to inflate something or package/unpackage something...
<shevy> so it must have failed at some point earlier
<Stalkr_> It looks like it does get the information, even though it fails
<Stalkr_> That's weird
blacktulip has quit [Remote host closed the connection]
Deele has joined #ruby
<Hanmac> shevy when i have a {key => [...]} because of group_by exist better ways then .select {|k,v| v.size > 1 } ?
<bnagy> v.any? ?
<apeiros_> not equivalent
<apeiros_> [true].any? == ([true].size > 1) # => false
<apeiros_> [false, false, false].any? == ([false, false, false].size > 1) # => false
<Hanmac> i get an hash with array as values ... but i only want this arrays with are bigger then 1
<apeiros_> Hanmac: your select is fine IMO
<apeiros_> it's concise.
<Hanmac> PS: i write an duplicate finder
Helius has quit [Remote host closed the connection]
<apeiros_> I usually find duplicates using a seen hash
<Hanmac> i mean file duplicates
<apeiros_> seen = Hash.new(0); items.each do |item| seen[item] += 1 end; seen.select { |k,v| v > 1 }
<apeiros_> should be the same principle. especially if you can do it with group_by.
burgestrand has quit [Ping timeout: 265 seconds]
<apeiros_> assuming that by "file duplicates" you mean you have a couple of paths and want to test them for whether they have the same content - create a small class with a good #hash and a good #eql? method
<Hanmac> i mean duplicated files in the same dir http://pastebin.com/dZz2w9sj
<apeiros_> hash could be calculated from size + md5/sha1 probes. eql? could be tested in a similar fashion
<apeiros_> yeah. what I said then.
<apeiros_> personally I'd use a probing approach instead of doing all on the whole file. I'd only resort to whole-file when probes say it's identical.
<apeiros_> e.g. size -> md5 of first 1kb + last 1kb -> full file comparison. depending on what your performance requirements are…
Stalkr_ has quit [Quit: Leaving...]
<Hanmac> hm ... about the first & last 1kb you could be right ...
RichieEvan has joined #ruby
burgestrand has joined #ruby
zzw has quit [Quit: Leaving]
<apeiros_> class FileDuplicateCandidate; def initialize(path); @path = path; @size = File.size(@path); end; def md5; @md5 ||= …use skip to get first & last kb… end; def eql?(other); size == other.size && md5 == other.md5 && self.class.same_content(@path, other.path); end; end
mahmoudimus has joined #ruby
<apeiros_> in same_content I'd read chunks of blocks and compare them. less harsh on memory.
objlinks has joined #ruby
<apeiros_> if you have that, you can use the FileDuplicateCandidate as hash key and push the paths as values. then do your select and you get a hash with the paths to identical files as values.
<Hanmac> what i pastie was only the first thought :P but thanks for the ideas
davidpk has quit [Quit: Computer has gone to sleep.]
x0F__ has joined #ruby
x0F__ is now known as x0F
mahmoudimus has quit [Quit: Computer has gone to sleep.]
x0F_ has quit [Ping timeout: 248 seconds]
yonggu has quit [Quit: yonggu]
workmad3 has joined #ruby
seoaqua has quit [Quit: Leaving]
burgestrand has quit [Quit: Leaving.]
hayer has joined #ruby
hayer has quit [Client Quit]
zearuby has quit [Ping timeout: 246 seconds]
mikeric has joined #ruby
Icoin has joined #ruby
Guest82415 has quit [Quit: Leaving]
Guest74178 has quit [Read error: Connection reset by peer]
kaneda has joined #ruby
kaneda is now known as Guest87823
workmad3 has quit [Ping timeout: 252 seconds]
monkegjinni has joined #ruby
dangerousdave has quit [Quit: Leaving...]
n1x has joined #ruby
gry has quit [Quit: gone]
lxsameer has quit [Ping timeout: 244 seconds]
ttilley is now known as ttilley_off
Spooner has joined #ruby
yugui is now known as yugui_zzz
<shevy> sorry, was eating
<shevy> also had half a half liter of beer, which wasn't the brightest idea, now I feel sleepy
<shevy> Hanmac: I dunno, usually I prefer to have a method like ".foo" rather than "foo_by" because of the '_', I really dont like typing it in the middle of a method name :)
<shevy> .select vs. group_by
<shevy> .reject ... vs ... .reject_if (god, I hate the latter... does it even exist?)
kevinfagan has joined #ruby
kidoz has joined #ruby
workmad3 has joined #ruby
<Hanmac> .select vs .find_all, .group_by does not have an other name
<shevy> aha
<shevy> yeah, dont like .find_all much
mneorr has quit [Quit: Leaving.]
mneorr has joined #ruby
lxsameer has joined #ruby
twinturbo has joined #ruby
zastaph has joined #ruby
nyuszika7h has joined #ruby
Emmanuel_Chanel has quit [Quit: Leaving]
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
lxsameer has quit [Ping timeout: 250 seconds]
lxsameer has joined #ruby
mechanic has joined #ruby
<mechanic> Hi,I have a quick good practice question: If I have a model which inherits from ActiveLDAP(Similar to ActiveRecord), what is considered a good practice that could be helpful to testing? Would it make sense to have something like class BusinessObject which does the business stuff and then class PersistentBusinessObject , and write BusinessObject to delegate some methods like find and save to the persistence layer?
<mechanic> (already asked in #rails, but seems that everyone is taking a nap)
<apeiros_> while I can't answer your question - #rails is the wrong channel, it's #rubyonrails
<apeiros_> or #ror
lxsameer has quit [Ping timeout: 246 seconds]
<mechanic> ah
mechanic is now known as TheMechanic
TheMechanic is now known as the_mechanic
<fflush> bon jour tout le monde
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
grekkos has joined #ruby
grekkos is now known as Guest72650
AlbireoX` has quit [Remote host closed the connection]
<gogiel> the_mechanic: in rails by default you don't any business layer
the_mechanic has quit [Quit: the_mechanic]
AlbireoX has quit [Quit: IRC crashed.]
workmad3 has quit [Read error: Operation timed out]
lxsameer has quit [Ping timeout: 252 seconds]
Seventoes has left #ruby [#ruby]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
kyktommy has joined #ruby
tomb has joined #ruby
g_rotbart has joined #ruby
ringotwo has joined #ruby
lxsameer has quit [Ping timeout: 246 seconds]
jimeh has joined #ruby
snearch has quit [Quit: Verlassend]
lewis1711 has joined #ruby
mechanic has joined #ruby
mechanic is now known as the_mechanic
mneorr has quit [Quit: Leaving.]
<shevy> dumdedum
<the_mechanic> gogiel: I am just wondering if there is any opinion about either creating model extensions of proxy like models
<gogiel> the_mechanic: you can do whatever you like. you can seperate logic
piggybox has quit [Quit: piggybox]
<gogiel> create proxy model, or sperate loginc into module and include it
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<the_mechanic> gogiel: yes I know I can do whtever I like, my question was about what is considered better/best practice
<the_mechanic> if there is a convention or a ruby or rail way to do things I rather not invent my own
kirun has joined #ruby
<shevy> well
Morkel has joined #ruby
<shevy> the rubyonrails guys would know best about what they recommend for their apps
<shevy> I myself would rather like to use something in where questions like that one can't really come up at all
<the_mechanic> shevy: example?
lxsameer has quit [Ping timeout: 248 seconds]
RORgasm has joined #ruby
blackhawk has joined #ruby
<shevy> the_mechanic: I don't know ror so I can't judge. for my own code though, I use things I can understand very well
<shevy> most of the time I write classes. not much def self.foo parts though, which rails seems to love
<blackhawk> hey wts up?
<shevy> most of my larger classes have a .run and a .reset method. the second to reset its state again, the .run method to start the "work"
<shevy> about subclassing vs. modules
blackhawk has left #ruby [#ruby]
<shevy> I feel the two contradict each other slightly :\
lxsameer has joined #ruby
<shevy> the project I am rewriting now, I used to subclass from class Base
<shevy> and now... I find myself back to use a module instead suddenly
<the_mechanic> I like using modules to put functions which are cross objects
<shevy> yeah but you could subclass too!
<the_mechanic> well not in this particular case
<shevy> why not?
RORgasm has quit [Ping timeout: 246 seconds]
<the_mechanic> because these objects don't have a common starting point. what they do have is ':has_many' and that is method I put out in a module
objlinks has left #ruby [#ruby]
<shevy> aha
<shevy> rails is odd
lxsameer has quit [Ping timeout: 265 seconds]
<shevy> :has_sugar
mobilegamelabs has quit [Quit: (NEW! iPhone version is released) http://www.MGGGGG.com/ap Angry Polygon - my first Android/iOS/Mac game!]
<the_mechanic> you can replace has_many with CommonObjectsCollection
RichieEvan has quit [Quit: RichieEvan]
<the_mechanic> and this wont be rails specific
<the_mechanic> the syntactic sugar is sweet though :)
lewis1711 has left #ruby [#ruby]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
blacktulip has joined #ruby
Morkel has quit [Quit: Morkel]
lxsameer has quit [Ping timeout: 248 seconds]
cascalheira has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
mneorr has joined #ruby
kyktommy has quit [Quit: kyktommy]
maxok has joined #ruby
lxsameer has quit [Ping timeout: 246 seconds]
owned_ has joined #ruby
indian has joined #ruby
amoe has joined #ruby
fridim_ has joined #ruby
emmanuelux has joined #ruby
M3nti0n|off is now known as M3nti0n
<shevy> I dunno
<shevy> it seems to be a way to composite object which matz did not seem to have encouraged initially
cads has joined #ruby
lxsameer has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
<banisterfiend> shevy: my uncle works at the circus circus hotel, u know what that is? he drives around a yellow Lamborghini with a horse on it, u know what i mean? people take YEARS AND YEARS to do this, u dont just waltz on in...i'll never find someone to love me and my beautiful face...
kozy has joined #ruby
vectorshelve has joined #ruby
<vectorshelve> any good reference for ruby threads basics ?
<shevy> banisterfiend when I was little, my dad rented a chrome-bluish lamborghini
<shevy> we had it for about 3 years or something like that, then it got too costly
mengu has joined #ruby
<shevy> vectorshelve: dunno if there is much to it
zearuby has joined #ruby
wmoxam has joined #ruby
<shevy> loop { Thread.new { sleep 1; puts 'Hello from world to vectorshelve.' }.join }
<vectorshelve> shevy: I need to solve a solution was thinking if I could use threads to optimize the process
lxsameer has quit [Ping timeout: 248 seconds]
<shevy> the pickaxe has a simple example "how to download multiple files at the same time via ruby"
robotmay has joined #ruby
<kn330> What would be the best way to remove duplicates[1] from a csv. || [1]: All columns except one have same values.
strife25 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
lxsameer has joined #ruby
<kn330> e.g. [ [alpha,china,4] , [alpha,china,5] , [beta, canada, 4]] << here entries 1 and 2 are duplicates
<vectorshelve> http://pastie.org/4255070 any idea... I did it in the normal oop method.. but what if there are millions of input lines.. then will thread be good ?.\
<vectorshelve> shevy: expert opinino
<vectorshelve> opinion*
vladr has joined #ruby
<wmoxam> kn330: 1 and 2 have a different 3rd value
Stalkr_ has joined #ruby
<kn330> wmoxam: All columns except one have same values.
<kn330> I mentioned it in my question
lxsameer has quit [Ping timeout: 246 seconds]
JustinCampbell has joined #ruby
igaiga has joined #ruby
<fowl> kn330, if you want [alpha, china, 4] and [alpha, china, 5] to be considered equal i suggest you create a class for them
<fowl> kn330, also thats not position 1 and 2, its 0 and 1
<kn330> fowl: yeah 0 and 1
lxsameer has joined #ruby
araujo has quit [Ping timeout: 246 seconds]
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
<Mon_Ouie> [ [:alpha,:china,4], [:alpha,:china,5] , [:beta, :canada, 4]].uniq { |ary| ary[0, 2] }
<kn330> fowl: How would a class help?
<Nowaker> what is the ruby way to define a class (class Breadcrumb, instance variables: name, url) to automatically get a proper '==' method? I don't like writing == method by hand.
<Mon_Ouie> Nowaker: Maybe you can use the Struct class
<Mon_Ouie> Breadcrumb = Struct.new(:name, :url)
<Mon_Ouie> (also implements hash equality and other stuff fore free)
<fowl> kn330, you have an array of arrays, if you're comparing arrays by themselves (aside from the way mon ouie just showed) those two would never be equivalent
<Nowaker> Mon_Ouie: but I need some methods in my class, is it possible to extend a struct?
<fowl> kn330, however if you call them a SexyObj then you _can_ set the parameters for equality to disregard the last field (define method eql?)
<Mon_Ouie> It accepts a block — and even if it didn't, you can always reopen a class in Ruby
<weeb1e> Nowaker: class Foo < Struct(:name, :url);
<fowl> i suppose you could define eql? for each member of the array without making a class for them, but that would be silly
<Nowaker> weeb1e, Mon_Ouie: thanks
<Mon_Ouie> weeb1e: That's a bad idea; consider what happens when you reload your code.
lxsameer has quit [Ping timeout: 246 seconds]
<weeb1e> Ok well I assume in many cases code would not be reloaded
robotmay has quit [Remote host closed the connection]
<Mon_Ouie> But still, why do that over just Struct.new(…) do … end which doesn't need to create two classes?
<kn330> fowl: yeah, those 2 are not 'equivalent' literally
<weeb1e> Nowaker: You could just use a class, class Foo; attr_accessor :name, :url; def initialize(attrs); attrs.each {|k,v| instance_variable_set("@#{k}", v) } end end
<fowl> kn330, right but if you make them SexyObj you can define eql? to your own standards/needs
<apeiros_> weeb1e: assumptions are the bane of programming.
<apeiros_> especially bad assumptions
<fowl> SexyObj is just an example, feel free to use it
<kn330> I'm not exactly sure how Mon_Ouie 's query would work. (forgive my noobness)
<kn330> fowl: SexyObj sounds cool!
<Nowaker> Mon_Ouie: to keep code clean, I prefer named classes instead of nameless Structs
<weeb1e> Ah well it would depend on the use case, for a short running script you would have less to worry about, but yeah
<Mon_Ouie> Nowaker: "nameless structs"?
choffstein has joined #ruby
<apeiros_> weeb1e: you have a perfect alternative. there's no reason to use the broken way.
<apeiros_> even in a short script.
vlad_starkov has joined #ruby
<fowl> Nowaker, consider that when you do class X < Struct.new(...) You're actually inheriting from an anonymous struct you just created that will never get used
<Nowaker> weeb1e: yeah, but I don't really like writing this on my own, if I can use struct or any other approach to get it 'for free' :-)
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<weeb1e> apeiros_: Which alternative would you use? Define a constant for the struct and reopen it?
<Mon_Ouie> kn330: uniq accepts a block. It is passed an element of the collection, and it returns the object that should actually be used for comparison
<fowl> Nowaker, however, X = Struct.new(...) is not an anonymous struct.. it's X.. you named it yourself
<apeiros_> weeb1e: Mon_Ouie told you
<apeiros_> weeb1e: 14:13 Mon_Ouie: But still, why do that over just Struct.new(…) do … end which doesn't need to create two classes?
<banisterfiend> apeiros_: sup dawg
<apeiros_> banisterfiend: working. on saturday. s'bad.
<weeb1e> Ok so then what I just said...
<banisterfiend> apeiros_: just released a new pry version that provides all your prompt stuff, i'll show u what i gave u (it's not really documented as we might change the api in future version, it's just an easter egg 4 u)
<fowl> apeiros always says he's working when he's really farting around on the internet
<apeiros_> fowl: same thing
<banisterfiend> apeiros_: here's what u have to work with: http://cl.ly/2e3A2u432T3h3d113h09
bburton_ has left #ruby ["Leaving..."]
<apeiros_> banisterfiend: cool! gotta experiment with that tomorrow.
bburton has joined #ruby
<banisterfiend> np
<apeiros_> openstruct to be able to add new members without too much hassle?
seanstickle has joined #ruby
<banisterfiend> apeiros_: i just really like open structs :)
<banisterfiend> not sure why i used it over a regular struct..
n1x has quit [Ping timeout: 246 seconds]
<the_mechanic> +1 for openstructs
<apeiros_> funny, my own xml builder is lots faster than nokogiri's with deep nesting, but about the same fast for lots of children…
lxsameer has quit [Ping timeout: 246 seconds]
<apeiros_> openstructs are mem-leaks, though :-/
<apeiros_> each instance creates code, and code isn't (or wasn't at least - maybe that has changed?) gc'ed
<Nowaker> fowl: oh... great. Mon_Ouie: fowl explained. Struct.new is nameless for me, X = Strct.new is not nameless
choffstein has quit [Remote host closed the connection]
<apeiros_> Nowaker: I think the common term is anonymous ;-)
<apeiros_> btw., Struct.new("SomeName", :mem1, :mem2, …)
* Hanmac is now known as nameless
<apeiros_> --> creates Struct::SomeName
<Mon_Ouie> Except that creates Struct::SomeName, not SomeName
Parabol has joined #ruby
weeb1e is now known as Struct
<Nowaker> apeiros_: yeah, i just didn't want to use java namings, to hide the fact i'm a java programmer ;-)
<apeiros_> Mon_Ouie: yes. just to show that you don't have to assign yourself to get it named.
<banisterfiend> apeiros_: why wasn't it gc'd?
Struct is now known as weeb1e
<Hanmac> Nowaker, and now we should sorry for you?
<apeiros_> don't know. probably laziness by the implementors.
<apeiros_> do you happen to know whether it is now gc'ed?
<banisterfiend> no
cascalheira has quit [Ping timeout: 255 seconds]
jimeh has quit [Ping timeout: 255 seconds]
aruntomar has joined #ruby
<shevy> apeiros_: you working on ruby on rails related things again?
<apeiros_> shevy: worse
ZachBeta has joined #ruby
<apeiros_> I'm writing an EWS library (EWS is Microsoft Exchange's SOAP API)
<seanstickle> I believe that's what Apple Mail uses to interact with Exchange.
<banisterfiend> seanstickle: sup stick
<apeiros_> quite possible
<seanstickle> Why MSFT doesn't just let people use ActiveSync instead is somewhat disappointing.
<fflush> apeiros_: hey
<seanstickle> hey banisterfiendhorseyface
<apeiros_> hi fflush
<banisterfiend> seanstickle: u my girl?
<banisterfiend> fflush: hey can u give me ops on this chan ? we get a tonne of spammers and trolls here
<seanstickle> banisterfiend: huh?
<banisterfiend> fflush: and we dont have enough ops straddling enough time zones to cope with it
<seanstickle> Don't do it!
<seanstickle> He'll use his OP powers to turn the channel into a PRY extension
<fflush> PRY?
<banisterfiend> fflush: http://pry.github.com :P
timonv has joined #ruby
<fflush> oh
<banisterfiend> fflush: i'm in NZ timezone btw, so im usually awake when the trolls are about, but EUs are not :P
vladr has quit [Ping timeout: 248 seconds]
<fflush> baI will add you as +v :)
g_rotbart has quit [Remote host closed the connection]
<banisterfiend> fflush: my point was we need more ops in a great number of timezones :)
vladr has joined #ruby
<banisterfiend> fflush: i can paste all the spam/trolls we're getting recently if u like, it usually lasts for 1-2 hours ,and it's a guy writing a tonne of racist spam and ascii art on the chan with a variety of bots/clones
<banisterfiend> it happens about once a day or so
<banisterfiend> fflush: dont particularly care if you op me, but someone in an antipodean timezone needs ops :)
<fflush> banisterfiend: I will look into it, thanks for the advise
<fflush> I am trying to be more involved with the channel
<seanstickle> That and $2 gets you a cup of coffee
<fflush> s/advise/advice/g
minijupe has joined #ruby
<kn330> I need to compare the values of 2 consecutive elements in an array. This is what i tried but getting a NoMethodError | http://pastie.org/4255176
<shevy> somehow I never managed to like coffee
<apeiros_> kn330: take a look at each_cons and each_slice
<shevy> kn330: and what does people array look like?
mdszy has joined #ruby
<kn330> shevy: its basically an array of arrays
andrewhl has joined #ruby
_bart has joined #ruby
mdszy has quit [Client Quit]
ZachBeta has quit [Quit: Computer has gone to sleep.]
kidoz has quit [Quit: Ухожу я от вас]
<shevy> hmm
Axsuul has quit [Ping timeout: 248 seconds]
<shevy> would be easier to provide a full sample. unless you got it solved already
<shevy> oh damn... I have a xml file
<shevy> <dependencies>
<shevy> <dep package="glib"/>
<shevy> hmm is it possible to turn this line noise into yaml?
<kn330> e.g. [ [alpha,china,4] , [alpha,china,5] , [beta, canada, 4]] << shevy . Here I need to compare p[0][2] and p.next[0][2] if
vectorshelve has quit [Ping timeout: 245 seconds]
<shevy> ok
<Tasser> shevy, sure ;-)
<shevy> banisterfiend: what are you doing ;)
<weeb1e> fffffffffffffffff can't dump IO (TypeError)
<weeb1e> There is no IO :(
wmoxam has quit [Ping timeout: 246 seconds]
codezombie has quit [Quit: Leaving...]
<shevy> kn330: I recommend to always use pp
niklasb has joined #ruby
<shevy> so that your own datastructures do not confuse you
capoerista has joined #ruby
ZachBeta has joined #ruby
<weeb1e> How can an array be considered as IO to Marshal? :|
<shevy> hmm also not sure why you use .collect rather than .each
capoerista has quit [Client Quit]
Natch has joined #ruby
apeiros_ has quit [Remote host closed the connection]
sebastorama has quit [Ping timeout: 248 seconds]
mneorr has quit [Quit: Leaving.]
mucker has joined #ruby
mucker has quit [Client Quit]
mucker has joined #ruby
Markvilla has joined #ruby
mneorr has joined #ruby
mengu has quit [Remote host closed the connection]
<shevy> Tasser: hmm... is there a simple way to do so?
<shevy> I am tempted to write a small class that does that
<shevy> but I dont want to parse the XML on my own
<shevy> and I hate rexml too much to use it
maxok has quit [Quit: Linkinus - http://linkinus.com]
_cb has joined #ruby
Natch_j has joined #ruby
<_cb> last night I installed rails and rails -v responded with 3. This morning I try rails -v and tells me it can't find gem rails. Assume a path thing. How do I troubleshoot?
kvirani has joined #ruby
jesly__ has joined #ruby
kvirani has quit [Remote host closed the connection]
akem has quit [Ping timeout: 246 seconds]
Natch has quit [Ping timeout: 255 seconds]
the_mechanic has quit [Quit: the_mechanic]
<fowl> _cb, check $PATH ?
<_cb> What should I have in path. What folders is rail in ?
joast has quit [Quit: Leaving.]
<fowl> _cb, where is ruby installed
centipedefarmer has joined #ruby
<shevy> _cb usually it is installed into ruby SITE PATH. do you use a crappy ruby variant though, like debian system ruby?
Natch_j has quit [Ping timeout: 246 seconds]
<_cb> Ok if I do ruby -v it gives me ruby 1.8.7
<_cb> ruby -v gives me ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux]
zearuby has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
<_cb> ok google says to try gem install railties --pre. Let's see what happens
workmad3 has joined #ruby
iamjarvo has joined #ruby
RORgasm has joined #ruby
joast has joined #ruby
dhruvasagar has joined #ruby
vitor-br has joined #ruby
igaiga has quit [Remote host closed the connection]
Jrz has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
RORgasm has quit [Ping timeout: 246 seconds]
<_cb> in /usr/local/lib/site_ruby I have 1.8 and 1.9.1, how would i navigate to rails?
<fowl> _cb, see if its in /usr/local/bin
<shevy> that is horrible
chessguy has quit [Remote host closed the connection]
<shevy> the path you give us only makes sense if you compiled ruby from source with default prefix /usr/local
<_cb> yes it is ;) but going to /usr/local/bin and typing rails -v still gives me /usr/local/lib/site_ruby :(
<shevy> how can this be? did you compile on your own?
<_cb> shevy I followed some instructions from the internet. Wanted to get my feet wet on rails did not expect the installation to be this complicated
<shevy> ok I still don't know how you installed it
choffstein has joined #ruby
<shevy> I tell you how I do it - I compile ruby from source, into prefix /usr. then I do "gem install rails" and rails will be installed.
<shevy> I once tried to follow a guide that used bundler. bundler broke for me and did not work.
dhruvasagar has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
<dhodgkin> bundler has been giving me issues for the past two days.. it's acting finicky like it has a choice.
<fowl> _cb, i dont understand your problem, running /usr/local/bin/rails returns /usr/local/lib/site_ruby ?? can you pastebin the output
<_cb> http://pastebin.com/MVt75Uiq has the commands I tped
bier has quit [Ping timeout: 244 seconds]
emmanuelux has quit [Ping timeout: 246 seconds]
Helius has joined #ruby
choffstein has quit [Ping timeout: 246 seconds]
<_cb> Sorry /usr/local/bin/rails returns bin_path': can't find gem rails ([">= 0"]) with executable rails
<fowl> _cb, well, if you installed ruby through apt it should be in /usr/bin right ?
Jake232 has joined #ruby
<dhodgkin> _cb: what does, which rails, give you?
<_cb> I think ruby is ok. ruby -v gives me ruby 1.8.7 rails gives me can't find gem rails ([">= 0"]) with executable rails
<dhodgkin> _cb: run 'which rails'
<dhodgkin> it shoudl tell you where rails is located
<_cb> which rails give me /usr/local/bin so rails installed
<_cb> What does can't find gem rails ([">= 0"]) with executable rails mean?
Whoop has quit [Quit: brb]
nari has quit [Ping timeout: 245 seconds]
Whoop has joined #ruby
Whoop has quit [Changing host]
Whoop has joined #ruby
<dhodgkin> I think that may be an issue with rubygems.. it has trouble finding the version info of a gem. and will give that error. I believe.. I may be wrong.
ananthakumaran has quit [Quit: Leaving.]
<_cb> In /usr/local/lib/site_ruby I have 1.8 and 1.9.1 directories. Should I have both? If not, how do I tell the system to use 1.9.1?
<fowl> _cb, you confuse me, you speak of running 1.8 yet that pastebin says you installed 1.9, yet if you installed with the package manager surely it would not end up in /usr/local, I'm thoroughly confused
<_cb> fowl I have made several attempts at trying to install rails. Last night I think one of the attempts installed 1.8
<dhodgkin> _cb: try /usr/bin/ruby1.9.1 -v
ZachBeta has quit [Quit: Computer has gone to sleep.]
bier has joined #ruby
<_cb> /usr/bin/ruby1.9.1 -v gives me /usr/bin/ruby1.9.1 -v
<_cb> I think that when I type rails ruby 1.8 is starting and that is causing the problem. (wild guess)
<dhodgkin> if it gives you version info then you can just change the /usr/bin/ruby symlink to point to ruby1.9.1 instead of ruby1.8
* Hanmac points to update-alternatives --config ruby
<dhodgkin> ^^ that too :)
bowlowni has joined #ruby
<Xethron> I have a function that replaces a word with another word of the same length
<_cb> Argh!! After Hanmac suggestiion ruby -v gives me /usr/bin/ruby1.9.1 -v but rails -v still gives me /usr/local/lib/site_ruby/1.9.1/rubygems.rb:317:in `bin_path': can't find gem rails ([">= 0"]) with executable rails
<Xethron> But I want to keep the case of the first word
<Hanmac> update-alternatives --config gem
<Xethron> So, like if HelLo gets replased with meets it should make it MeeTs
vectorshelve has joined #ruby
<_cb> Hanmac it gives me There is only one alternative in link group gem: /usr/bin/gem1.9.1 Nothing to configure.
<Tasser> what's the name of that pry extension that does start a console on test fail again?
<Hanmac> _cb there are bad stuff in /usr/local
<banisterfiend> Tasser: plymouth
ZachBeta has joined #ruby
<_cb> How do I fix? I was hoping to program in Rails not spend a ton of time trying to install
<cirwin> banisterfiend: I used that the other day
<banisterfiend> cirwin: how was it
<Nowaker> both A and B modules have sth() method. I included both modules in my class. How to call explicitly A.sth() and B.sth()? I remember it's possible, but forgot to the way to do that, and I couldn't find it in google
<cirwin> very exciting
<Tasser> banisterfiend, pry-test ? :-)
<cirwin> instead of inserting a binding.pry
<cirwin> i just inserted a require 'plymouth'
cousine_ has joined #ruby
<banisterfiend> cirwin: it's still pretty rough and ready, needs work
<cirwin> I still want it to catch errors as well as failures
bowlowni has quit [Ping timeout: 244 seconds]
<banisterfiend> cirwin: u were using it with rspec?
<cirwin> yeah
<fowl> Nowaker, the method from A (or whichever you included first) would be overwritten
<banisterfiend> cirwin: btw has sam made good use of the siguser hack?
<cirwin> I think so
cousine_ has quit [Remote host closed the connection]
<cirwin> he was trying to track down a memory leak with it
<Tasser> does anyone have a better ruby-mode than the original one for emacs? this one sucks balls...
<banisterfiend> nice, it's actually really cool and should probably be publicized more
<cirwin> apparently he got confused because pry's _out_ array was retaining some objects he didn't expect
<cirwin> banisterfiend: yeah
<banisterfiend> cirwin: hmm, maybe we should get _out_ to only retain dups or something
<cirwin> nah
<cirwin> I just told him to set the config variable to 0
<Xethron> I have a function that replaces a word with another word of the same length, but I want to keep the case of the first word. So, like if HelLo gets replased with meets it should make it MeeTs
<Hanmac> Norwaker: A.instance_method(:sth).bind(obj).call(args)
<Xethron> Anyone know how?
<_cb> how do I look at what bin_path has?
zearuby has joined #ruby
<fowl> Xethron, ruby doesnt have a method to do that, you're going to have to write it on your own
<dhodgkin> _cb: echo $PATH
<Xethron> fowl: ok, but how to I check the case of a letter?
<Xethron> I can only convert it
<zearuby> I banned on #RubyonRails, who can help me?
<Xethron> zearuby: why?
<Xethron> I'm assuming you're banned coz you acted like a tard....
awarner has joined #ruby
dhruvasagar has quit [Ping timeout: 250 seconds]
<Xethron> join #freenode
<_cb> what does can't find gem rails ([">= 0"]) with executable rails mean? Assume that when I type rails -v rails is trying to start something and it can't
<Hanmac> Xenthron: "aBc".each_char.zip("xyz".each_char).map{|x,y| x.match(/[A-Z]/) ? y.upcase : y}.join #=> "xYz"
<zearuby> Xethron: I send lots of code 2 month ago
<_cb> Ok, maybe my best bet is to un-install rails and re-install. What is the best way to do that?
<fowl> zearuby, nobody in here will unban you, #freenode isnt going to help either, your only chance now is to pray to the Gods or use a different channel like #ror
<Xethron> Hanmac: You're a genious!!!
<Xethron> zearuby: join #freenode
<Xethron> fowl: lol
<fowl> Hanmac, if you just give out code like aids nobody will learn anything.
<dhodgkin> _cb: try 'sudo gem install railties' before trying a reinstall
Nowaker has quit [Ping timeout: 246 seconds]
Mchl has quit [Quit: ZNC - http://znc.sourceforge.net]
<Xethron> fowl: lol
Nowaker has joined #ruby
<_cb> same problem even after sudo gem install railties
<zearuby> Xethron: and then?
<Xethron> zearuby: This is a ruby channel!
<dhodgkin> hmm... guess a reinstall is worth a try
<Xethron> Not IRC...
<Xethron> well, that didn't make any sense
<_cb> What is the best way to reinstall?
kevinfagan has quit [Quit: Linkinus - http://linkinus.com]
kevinfagan has joined #ruby
xbob has quit [Quit: This computer has gone to sleep]
<dhodgkin> _cb: try this 'sudo gem regenerate_binstubs'
<Hanmac> _cb did you have any in /usr/local/bin?
<Hanmac> remove all what looks after ruby from the /usr/local/ dirs (if you dont need it)
ZachBeta has quit [Quit: Computer has gone to sleep.]
<_cb> sudo gem regenerate_binstubs gives me unknown command regenerate
<_cb> Hanmac any what in /usr/local/bin?
vladr has quit [Ping timeout: 246 seconds]
TomJ has joined #ruby
nachtwandler has joined #ruby
<dhodgkin> _cb: Im lost.. sorry I was unable to help
bluOxigen has joined #ruby
bluOxigen has quit [Changing host]
bluOxigen has joined #ruby
noyb has joined #ruby
Mchl has joined #ruby
TomJ has quit [Remote host closed the connection]
<_cb> dhodkin that makes 2 of us that are lost :( Thanks for trying. I think I am going to try a re-install. Trying to figure out how to clean everything so I have a clean install.
<Hanmac> _cb did you build ruby yourself?
<_cb> Hanmac http://pastebin.com/MVt75Uiq has the internet instructions I used
philips_ has quit [Excess Flood]
philips_ has joined #ruby
vladr has joined #ruby
* Hanmac thinks that rubygems may play a bad game ... remove it from /usr/local/bin
<shevy> this is the problem with internet instructions
<shevy> however
<shevy> apt-get uses /usr prefix
<shevy> you never explained how you installed into /usr/local prefix
<_cb> Hanmac you mean update_rubygems? There is not a rubygems in /usr/local/bin
awarner has quit [Remote host closed the connection]
<Hanmac> is there anything else in usr/local/bin?
lkba has joined #ruby
<_cb> Hanmac bundle rackup rake rdoc thor tt erubis rails rake2thor ri tilt update_rubygems
<Hanmac> i think something plays bad games, because of this: /usr/local/lib/site_ruby/1.9.1
<Hanmac> this is not the currect site_ruby dir for your opinion
<GarethAdams> _cb: you didn't go for rvm in the end?
<_cb> GarethAdams not sure how to do that.
<GarethAdams> _cb: https://rvm.io/
Bonkers has quit [Ping timeout: 264 seconds]
<_cb> GarethAdams will that work at the point I am at now or do I need to un-install and re-install?
<GarethAdams> as I said last night, you install it into your user space and it sits alongside any existing ruby install you have
ananthakumaran has joined #ruby
lxsameer has joined #ruby
workmad3 has joined #ruby
minijupe has quit [Quit: minijupe]
ZachBeta has joined #ruby
<_cb> rvm -v returns rvm 1.14.5 but rails -v still returns can't find gem rails ([">= 0"]) with executable rails
JustinCampbell has quit [Remote host closed the connection]
cakehero has joined #ruby
LennyLinux has joined #ruby
shevy has quit [Ping timeout: 246 seconds]
apeiros_ has joined #ruby
kirun_ has joined #ruby
cakehero has quit [Client Quit]
Jake232 has quit [Quit: Computer has gone to sleep.]
kirun has quit [Ping timeout: 265 seconds]
cads has quit [Ping timeout: 246 seconds]
Bonkers has joined #ruby
typicalRunt has joined #ruby
ringotwo has quit [Remote host closed the connection]
fixl has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
cads has joined #ruby
centipedefarmer has quit [Quit: This computer has gone to sleep]
gmci has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
xbob has joined #ruby
Asher has quit [Ping timeout: 246 seconds]
workmad3 has quit [Read error: Operation timed out]
Emmanuel_Chanel has joined #ruby
nateberkopec has joined #ruby
Natch has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
zastaph has quit []
shevy has joined #ruby
nateberkope has joined #ruby
nateberkopec has quit [Read error: Connection reset by peer]
verto|off is now known as verto
vladr has quit [Ping timeout: 250 seconds]
kirun_ is now known as kirun
vladr has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
zearuby has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
Mchl has quit [Quit: ZNC - http://znc.sourceforge.net]
typicalRunt has left #ruby [#ruby]
centipedefarmer has joined #ruby
Mchl has joined #ruby
bluOxigen has quit [Ping timeout: 246 seconds]
nateberkope has quit [Quit: Linkinus - http://linkinus.com]
nateberkopec has joined #ruby
cakehero has joined #ruby
kirun has quit [Ping timeout: 260 seconds]
Asher has joined #ruby
sanket has joined #ruby
CannedCorn has joined #ruby
mneorr has left #ruby [#ruby]
sanket has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
dhruvasagar has joined #ruby
indian has quit [Ping timeout: 252 seconds]
owned_ has quit [Ping timeout: 252 seconds]
kn330 has quit [Ping timeout: 240 seconds]
rekenerd has joined #ruby
nicoulaj has joined #ruby
Asher has quit [Ping timeout: 248 seconds]
araujo has quit [Ping timeout: 255 seconds]
ZachBeta has joined #ruby
flip_digits has joined #ruby
wvms has joined #ruby
vladr has quit [Ping timeout: 250 seconds]
heftig_ has joined #ruby
heftig has quit [Disconnected by services]
vladr has joined #ruby
heftig_ is now known as heftig
pabloh has joined #ruby
nari has joined #ruby
choffstein has joined #ruby
lxsameer has quit [Quit: Leaving]
rekenerd has quit [Quit: Leaving]
CannedCorn has quit [Quit: Computer has gone to sleep.]
patient has joined #ruby
cdavaz has joined #ruby
nari has quit [Ping timeout: 265 seconds]
apeiros_ has quit [Remote host closed the connection]
zastaph has joined #ruby
Natch_b has joined #ruby
Natch has quit [Read error: Connection reset by peer]
Natch_b is now known as Natch
piggybox has joined #ruby
abdulkarim has joined #ruby
hayer has joined #ruby
ringotwo has joined #ruby
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
RORgasm has joined #ruby
Helius has quit [Remote host closed the connection]
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
RORgasm has quit [Ping timeout: 246 seconds]
Draco_ has joined #ruby
cdavaz has quit [Quit: cdavaz]
<vectorshelve> ................................................................
cakehero has quit [Quit: Computer has gone to sleep.]
cdavaz has joined #ruby
<GarethAdams> _cb: have you tried to install rails since you installed rvm?
<_cb> yes. I think the problem is either with .bash_login or .profile
<GarethAdams> _cb: what's the problem at the moment?
<Hanmac> _cb there is an rails in /usr/local/bin ... i dont think this is the right place for that
emmanuelux has joined #ruby
<_cb> I type rails -v and get /usr/local/lib/site_ruby/1.9.1/rubygems.rb:317:in `bin_path': can't find gem rails ([">= 0"]) with executable rails (Gem::GemNotFoundException) from /usr/local/bin/rails:19:in `<main>'
vladr has quit [Ping timeout: 244 seconds]
<GarethAdams> _cb: pastie me the output of `gem env` and `gem list`
vladr has joined #ruby
sdwrage has joined #ruby
Ionic` has joined #ruby
<GarethAdams> _cb: and show me the output of `rvm current` (but that should be one line so paste that here)
snearch has joined #ruby
JohnBat26 has joined #ruby
ken_barber has joined #ruby
<GarethAdams> _cb: you haven't finished setting up RVM yet
tobym_ has joined #ruby
<_cb> GarethAdams rvm current system
<GarethAdams> ok, let me clarify then
<GarethAdams> you have installed rvm but you haven't installed any versions of ruby into user-space
<GarethAdams> run `rvm install 1.9.3` and you'll get the clean ruby install you were looking for
eywu has joined #ruby
<offby1> \o/
<offby1> / \
<offby1> ~
<GarethAdams> _cb: then you can type `rvm use 1.9.3 --default` to change your default ruby to the RVM one. You can always type `rvm use system` at a later date to change back to the OS install
<_cb> GarethAdams, installing. Thanks for the help. Am a programmer not a computer tech so somewhat at a loss when doing this installs
<GarethAdams> _cb: as an aside, pastebin.com is pretty ugly, can be slow and has loads of irritating adverts. pastie.org is nicer :)
mockra has joined #ruby
<_cb> Will remember that, thanks.
tobym_ has quit [Remote host closed the connection]
<fowl> I wish the ruby site would endorse rvm/rbenv/rbfu
fflush has quit [Remote host closed the connection]
<fowl> would save a lot of people a lot of trouble
<_cb> I wish the top result of ubuntu rails install was a good set of instructions
wallerdev has joined #ruby
henn1nk has joined #ruby
<GarethAdams> _cb: let me know when the install is done
<henn1nk> i have a string where i would like to replace content. images = [ "img1", "img2", "img3" ]; text = text.gsub(/!!/) { |index| images[index.to_i] } but this just replaces everytime !! to img1
<henn1nk> how do i have to change this?
ianbrandt has joined #ruby
vladr has quit [Ping timeout: 248 seconds]
oscardelben has joined #ruby
vladr has joined #ruby
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
<_cb> Still compiling
cakehero has joined #ruby
<henn1nk> ok got it
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
gogiel has quit [Ping timeout: 244 seconds]
gogiel has joined #ruby
yoklov has joined #ruby
workmad3 has joined #ruby
_cb is now known as _cb_afk
subbyyy has joined #ruby
sebicas has joined #ruby
Natch has left #ruby [#ruby]
vladr has quit [Ping timeout: 248 seconds]
vladr has joined #ruby
jesly__ has quit [Ping timeout: 246 seconds]
quest88 has joined #ruby
_cb_afk is now known as _cb
<_cb> GarethAdams intall is complete ;) rails -v still gives the same error :(
<GarethAdams> sure, now you have a clean version of ruby, with no gems, see what `gem list` has now
<GarethAdams> then you can `gem install rails` (*without* sudo, always without sudo now you have a user-space ruby)
sepp2k has joined #ruby
<_cb> GarethAdams installing rails. gem list http://pastie.org/4256037
<icy`> hm, how can i match 1 through 10 ? sadly \d is 0 through 9 ;P
<_cb> Error: While executing gem ... (Gem::FilePermissionError)
<_cb> You don't have write permissions into the /usr/lib/ruby/gems/1.9.1 directory
<offby1> \b(1|2|3|4|5|6|7|8|9|10)\b :-)
<offby1> stupid but probably effective -- and easy to understand too
<offby1> icy`: also, maybe, see if you can parse the string as an integer, and then see if it's > 0 and <= 10
<offby1> *shrug*
<offby1> lotta options
<GarethAdams> _cb: what does `rvm current` show you now?
<offby1> mmm ... icecream
* icy` ponders
<_cb> GarethAdams ruby-1.9.3-p194
<GarethAdams> _cb: unusual. `which gem`?
<_cb> GarethAdams /usr/bin/gem
<GarethAdams> that's not right
<_cb> :(
<_cb> maybe things got messed up on prior installs?
<GarethAdams> when you installed rvm, there should have been some instructions for things to add to your profile, or to `source`, do you remember seeing those?
<icy`> offby1, ok, so ([1-9]|10) then? ;P
<offby1> that looks reasonable
<icy`> thanks
<offby1> you might want to put \b (or whatever the thing is that means "word boundary") on either side of it
<Tasser> offby1, is that unicode?
<offby1> regexes need testing even more than other kinds of code
maek has joined #ruby
<offby1> 'cuz they're so obscure
<offby1> Tasser: actually it's emacs-flavored regexes; it might well not work in ruby
<icy`> i dont understand the point of the word boundary
<_cb> GarethAdams you mean when I did rvm install 1.9.3 --default ?
<offby1> every language has its own regex thingy :-(
<Tasser> offby1, emacs-falvored?
<offby1> icy`: do you want your regex to match "wallaby999" ?
<GarethAdams> _cb: no, before that when you first installed rvm
<offby1> Tasser: yep. Emacs has its own syntax for regexes, subtly different from everyone else's.
<icy`> it will never match wallaby999 o.O
<Mon_Ouie> \b works fine in Ruby's regexps
<offby1> and I've used Emacs for so long that i just think that way
<_cb> GarethAdams no. I have been trying so many things
<offby1> Mon_Ouie: OK
mockra has quit [Remote host closed the connection]
<icy`> i was just asking for a small piece =P
<icy`> the whole thing will not be /([1-9]|10)/ obviously ;P
<offby1> *shrug*
<offby1> not obvious at all
<offby1> anyway, my earlier point stands: write tests that demonstrate that your regexes are doing what you expect
<offby1> and eat your vegetables
<offby1> don't fidget when I'm talking to you
<offby1> and stop tracking mud across my nice clean kitchen floor
<icy`> checking in rubular and irb =D
<Nowaker> fowl: a.d. http://pastebin.com/2TCsrZQR - but there *is* a way to call this "hidden" method from module (i'm sure, i read the code a few months ago), and the question is how.
twock has joined #ruby
jesly__ has joined #ruby
<GarethAdams> _cb: I'm trying to PM you with more info
<fowl> Nowaker, Hanmac told you, it involves rebinding the method
<Nowaker> fowl: ah, ok, I was taking a look on highlights only, will se now
ryanf has joined #ruby
<Hanmac> module.instance_method(sym).bind(obj).call(args)
<henn1nk> text.sub(/foo.*/, $1) $1 doesn't work... how can i access the found content?
<offby1> maybe it's $0 ?
<offby1> note my nick :)
<GarethAdams> henn1nk: you don't have any capture groups in that regex, so there won't be a match 1
<Hanmac> hm no $0 is the program name
* Hanmac dont like the $n
<henn1nk> $0 is wrong
<henn1nk> $1 is empty
<henn1nk> .-(
<offby1> then what GarethAdams said: try text.sub(/(foo.*)/, $1)
<Mon_Ouie> It should be '\1'
<offby1> that too :)
<offby1> also rtfm
<Mon_Ouie> Arguments are evaluated before the method call, i.e. before the regexp is used
* offby1 ducks
<offby1> so here's a random question. Why is the process environment accessible through a variable named ENV, and not one named $ENV? I wasted five or ten minutes yesterday because I just assumed the variable's name was $ENV
<offby1> I mean it's global by definition, so ...
sailias has joined #ruby
<offby1> also, my brain is corrupted by Perl, in which I think it's %ENV
<fowl> offby1, dont duck, ppl come in here and ask a question and people jst give the answer.. "how do I turn two arrays into a hash where array1 is the keys and array2 is the values multiplied by 4??" then some joker gives them the line of code and they're like "awesome thanks!" so now their problem is fixed but they learned nothing
<offby1> heh
imami|afk is now known as banseljaj
<offby1> fowl: but sometimes all people _want_ is the quick fix. Who am I to lecture them against their will?
<henn1nk> this is "my" regexp:
<offby1> "Hold still, I'm not done talking!"
<maek> im going through the pine.fm 'learn to program' ruby book and Im stuck on one of the 'try this' Its asking to make an Orangetree class and I wanted to learn something about inheritance so Im trying a class Tree followed by class OrangeTree. long story longer. I cant even figure out how to set 'setup vars' for my Tree class. Any idea why these methods arent working? http://pastebin.com/x1LhZEzA
<henn1nk> i would like to replace !(cool)! with !image(cool)!
<fowl> offby1, i'm not saying lecture, but you could point them to the API docs or a blog example or something (you know, one of those things thats the top 3 results of google)
<offby1> so what's stopping you?
<fowl> offby1, otherwise you're just a code monkey who works for free for strangers, little more than a code whore
<offby1> fowl: on the other hand I don't want to expend too much effort -- typing "rtfm" is easier than actually finding the proper citation
<offby1> I don't mind being a code monkey a little bit, when I feel like it.
<GarethAdams> being a code whore doesn't help anyone
<maek> whores get paid no?
h4mz1d has joined #ruby
bglusman has joined #ruby
vladr has quit [Ping timeout: 248 seconds]
<fowl> whores != hookers
mockra has joined #ruby
<fowl> well
<fowl> maybe it should be code slut
twock has quit [Quit: Lost terminal]
vladr has joined #ruby
<GarethAdams> I like it
dhruvasagar has quit [Ping timeout: 255 seconds]
Asher has joined #ruby
<maek> the thing thats confusing me about this is all the code (from what I can tell) works in irb like @height += @growth_rate - for some reason setting @growth_rate = 1 right after the class Tree line doesnt work?
dekroning has joined #ruby
<fowl> maek, if you do class Tree; @ivar = value you're actually setting an instance variable on the class
<maek> not the object?
<Nowaker> maek: according to http://pastebin.com/x1LhZEzA - what you do is add @growth_rate (which is nil!) to @height (1). nil + 1 is undefined, thus exception is thrown
<maek> along the lines of what you were just talking about. where can I read. im a bit unsure what to even google for
<fowl> right, you should put it in initialize() then it will belong to the Tree instance
<fowl> maek, sure, 1 sec
Fretta has joined #ruby
<maek> fowl: oh ok. that makes sense
<maek> I thougth @var was always instance vars
<Nowaker> and yes, should be in initialize
vectorshelve has quit [Ping timeout: 245 seconds]
mockra has quit [Remote host closed the connection]
<Hanmac> maek yeah, but classes could have instance_vars too
<maek> so you never really want to setup shop outside initialize?
<Nowaker> maek: @var outside instance methods is using @var on self.class :)
Jrz has quit [Quit: Computer has gone to sleep.]
<maek> ok. over my head at this point but make some amount of sense
<fowl> maek, you might want a class to have instance variables, its perfectly fine because classes are instances of Class
<maek> thanks all
<maek> fowl: can you think of an easy example of what that would be for?
<maek> be used for.
<Xethron> Heya. I have a function that collects a whois... But, I want to be able to run it as var = whois("nick") and then allow it to return the complete whois.... However, it has to wait for all the lines to be sent from the server. How can I get it to be stuck in a loop until I get "End of Whois" from server?
n1x has joined #ruby
<Xethron> Just a link to some information would be nice
h4mz1d has quit [Ping timeout: 248 seconds]
ananthakumaran has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
<fowl> maek, class Tree; @instances = []; def self.new(*args); obj = super(*args); @instances << obj; end; def self.instances() @instances; end; end
ananthakumaran has joined #ruby
<maek> fowl: I think I saw super man as I watched that go over my head ;) ill chew on that for a bit. Thanks
<fowl> im still looking for a good article
<maek> thanks
cdavaz has quit [Quit: cdavaz]
TheGabspectacle has joined #ruby
sailias has quit [Quit: Leaving.]
bradhe has joined #ruby
<maek> fowl: thank you very much
Niamkik has quit [Quit: leaving]
mockra has joined #ruby
<icy`> hi, i'm trying to reuse the same objects -- is this possible if i'm doing an assignment like @results = SomeClass.new ? http://pastie.org/4256155
snearch has quit [Quit: Verlassend]
TheShadowFog has quit [Remote host closed the connection]
mikeycgto has joined #ruby
mikeycgto has quit [Changing host]
mikeycgto has joined #ruby
kyrylo has joined #ruby
mockra has quit [Remote host closed the connection]
<icy`> is there some way to have @results stay the same object, if its value is changing
<Hanmac> fowl about your link: the parser on the page is broken :P
<fowl> Hanmac, the code highlighting? looks fine to me
cdavaz has joined #ruby
<Hanmac> "class << Person" is parsed as Herodoc with it isnt
<fowl> ah yea it is lol
_cb has quit [Quit: Leaving]
<fowl> icy`, you could use String#replace
sebicas has quit [Quit: sebicas]
oscardelben has quit [Quit: oscardelben]
<fowl> x = "Sup"; p x.object_id; x.replace "yo momma"; p x.object_id
<icy`> it's not even a String; i just made that small example
soulcake has quit [Quit: ZNC - http://znc.in]
mockra has joined #ruby
<fowl> icy`, you will want it to make a new object for each result
soulcake has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
<fowl> think about it, if you store the results of your first search somewhere then you update the results object with a whole new search the results you stored (being the same object) will update also, so your saved search for fishysticks now contains information about fire hydrants
vladr has quit [Ping timeout: 246 seconds]
<icy`> i dont care about the first search anymore
<icy`> i just dont want it creating those few extra objects in memory for subsequent searches
vladr has joined #ruby
<offby1> damn, I wouldn't worry about that
<TheGabspectacle> Come one, come all! ##gabsplace is now open for business! The BEST utility bot ever around, Cadence, will cater to your every English, math, and reference lookup needs! The room has the most versatile academic bot you have EVER seen on Freenode! Come to ##gabsplace today! :-D
<icy`> maybe i'm just misunderstanding how it works ;P object x is created anyway, and i'm assigning it to results. so that means old results needs to be garbage collected, and then results = x ?
AlbireoX has joined #ruby
<fowl> yeah i wouldnt worry about it, but it is possible.. dont reassign @results in search() but instead tell it to update with new information
jfelchner has joined #ruby
dekroning has quit [Read error: Connection reset by peer]
codezombie has joined #ruby
td123 has joined #ruby
TheGabspectacle has quit [K-Lined]
<fowl> icy`, the garbage collection happens behind the scenes and you probably wont even notice it (if you do its like a millisecond hiccup not a big deal)
abdulkarim has quit [Ping timeout: 255 seconds]
umttumt has joined #ruby
<offby1> mistrusting the gc is sort of like ... I dunno ... double checking the built-in math operators or something.
<offby1> at some point you have to just trust your platform or else you've go nuts
slink has joined #ruby
<offby1> s/you've/you'll/
joshman_ has joined #ruby
liluo has quit [Remote host closed the connection]
<icy`> i guess
savage- has joined #ruby
<icy`> so there's no way to freeze @results to have a certain object_id , and then have every other object bow down to its wishes? ;P
joshman_ has quit [Client Quit]
<offby1> I suspect there is.
<offby1> In fact, isn't it called "freeze"?
<icy`> nah that's for making it immutable
workmad3 has joined #ruby
AlbireoX has quit [Quit: IRC crashed.]
ZachBeta has quit [Quit: Computer has gone to sleep.]
marco has joined #ruby
<Mon_Ouie> So you want to be unable to change the object the ivar refers to?
<Hanmac> offby1 & icy` with freeze you could freeze the object, not the variable
<Tasser> icy`, you can't
<icy`> ok
<Tasser> icy`, trust your library users to have a grain of intelligence
<Tasser> or rather, to use it
maletor has joined #ruby
henn1nk has quit [Quit: WeeChat 0.3.7]
brianpWins has joined #ruby
jesly__ has quit [Ping timeout: 244 seconds]
pabloh has quit [Quit: Ex-Chat]
maletor has quit [Ping timeout: 244 seconds]
maletor has joined #ruby
workmad3 has quit [Ping timeout: 265 seconds]
vladr has quit [Ping timeout: 250 seconds]
marco has quit [Ping timeout: 245 seconds]
maletor has quit [Ping timeout: 252 seconds]
vladr has joined #ruby
<shevy> hehe
<Tasser> anyone knows how to best implement a map score using reduce?
fridim_ has quit [Ping timeout: 246 seconds]
mockra has quit [Remote host closed the connection]
<Tasser> hmm, map.with_object works better imp
<Tasser> ehh imo
evilsushi has joined #ruby
nopolitica has joined #ruby
jesly__ has joined #ruby
<Hanmac> Tasser map.with_object does not work, you need each_with_object().map
ryanf_ has joined #ruby
awarner has joined #ruby
cableray has quit [Quit: cableray]
friskd has joined #ruby
mxweas_ has joined #ruby
evilsushi has quit [Read error: No route to host]
friskd has quit [Remote host closed the connection]
<Tasser> yep
__DL__ has joined #ruby
gogiel has quit [Ping timeout: 255 seconds]
gogiel has joined #ruby
ananthakumaran1 has joined #ruby
savage- has quit [Remote host closed the connection]
rexpraseo has joined #ruby
evilsushi has joined #ruby
<Hanmac> Tasser i know my enumerable methods :P
ananthakumaran has quit [Ping timeout: 244 seconds]
<rexpraseo> new to irc
<shevy> hi rexpraseo
<rexpraseo> hi shevy
ananthakumaran1 has quit [Client Quit]
thecreators has joined #ruby
ananthakumaran has joined #ruby
<rexpraseo> <shevy> hi shevy
rexpraseo has quit [Client Quit]
gnarmis has joined #ruby
<shevy> and there he goes again
maletor has joined #ruby
jrajav has joined #ruby
sdwrage has quit [Quit: geekli.st/programmer]
ZachBeta has joined #ruby
sebicas has joined #ruby
slink has left #ruby [#ruby]
iamlacroix has joined #ruby
vladr has quit [Ping timeout: 252 seconds]
vladr has joined #ruby
gnarmis has quit [Remote host closed the connection]
gnarmis has joined #ruby
maletor has quit [Ping timeout: 255 seconds]
gogiel has quit [Ping timeout: 244 seconds]
AlbireoX has joined #ruby
gogiel has joined #ruby
ryanf_ has quit [Quit: leaving]
mneorr has joined #ruby
ken_barber has quit [Remote host closed the connection]
sdwrage has joined #ruby
ken_barber has joined #ruby
vitor-br has quit [Quit: Saindo]
nachtwandler has quit [Read error: Connection reset by peer]
gogiel has quit [Client Quit]
gogiel has joined #ruby
amacgregor_osx has joined #ruby
maletor has joined #ruby
mohits has joined #ruby
jesly__ has quit [Ping timeout: 252 seconds]
mpereira has joined #ruby
khakimov has joined #ruby
jonathanwallace has quit [Read error: Connection reset by peer]
hadees has joined #ruby
jonathanwallace has joined #ruby
manizzle has quit [Read error: Connection reset by peer]
manizzle has joined #ruby
clayjar has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
blazes816 has joined #ruby
andrewhl has quit [Remote host closed the connection]
kevinbond has joined #ruby
<n1x> How do I start rdb within emacs? (Not sure if the question belongs here)
andrewpthorp has quit [Quit: Linkinus - http://linkinus.com]
sebicas has quit [Quit: sebicas]
jesly__ has joined #ruby
maxok has joined #ruby
Markvilla has quit [Ping timeout: 244 seconds]
wallerdev has quit [Quit: wallerdev]
iamlacroix has quit [Remote host closed the connection]
wallerdev has joined #ruby
<shevy> rdb?
<Hanmac> i think he means a ruby debugger
Axsuul has joined #ruby
nachtwandler has joined #ruby
vladr has quit [Ping timeout: 248 seconds]
<n1x> shevy, I'm using rdb from terminal, but I want something like gdb which runs inside emacs with some debugging interface
yoklov has quit [Quit: computer sleeping]
k_89 has joined #ruby
vladr has joined #ruby
n8ji has joined #ruby
Draco__ has joined #ruby
kidoz has joined #ruby
n8ji is now known as ngoldman
centipedefarmer has quit [Quit: This computer has gone to sleep]
Draco_ has quit [Ping timeout: 246 seconds]
fowl is now known as fowl-afk
jackiechan0 has joined #ruby
jackiechan0 has quit [Remote host closed the connection]
manizzle has quit [Ping timeout: 250 seconds]
<shevy> hmm
headius has joined #ruby
mrFrog has joined #ruby
mxweas_ has quit [Quit: Computer has gone to sleep.]
ngoldman has quit [Remote host closed the connection]
andrewhl has joined #ruby
chrxn_ has joined #ruby
mucker has quit [Quit: leaving]
Guest72650 has quit [Ping timeout: 265 seconds]
<blazes816> is there a reason there isn't a split! method? or that I can't find anything about it if it's out there?
<seanstickle> What would you expect that to do?
M3nti0n has left #ruby ["Ik ga weg"]
<blazes816> a = 'a/b'.split! # Now a is ['a', 'b']
<blazes816> 'a/b'.split!('/') rather
<Hanmac> this works too: a = 'a/b'.split
Speed is now known as Speeda
<blazes816> of course
ElderFain has quit [Ping timeout: 272 seconds]
<blazes816> I just figured it would exist
jesly__ has quit [Ping timeout: 252 seconds]
<blazes816> idk why
<Hanmac> an split! method cant exist, because it must change its class wich is not possible in ruby
<seanstickle> Are there other ! methods that change the type of an object in-place?
<seanstickle> Ah, well, there you go
<blazes816> I guess that makes sense. I never thought about that.
Parabol has quit [Quit: Parabol]
<Hanmac> ps ! methods are only marked with ! when there is an non-! variant too
<blazes816> I knew that
<offby1> oh really?
<blazes816> I remember seeing a thing about something scanning through all the docs
<blazes816> to ensure
<Hanmac> like map works for all Enumerable, but map! only works for Array
rekenerd has joined #ruby
<blazes816> so if ruby implemented c-style strings, we could have split!!
iamjarvo has joined #ruby
<Tasser> Hanmac, it is, ask banisterfiend ;-)
zeromodulus has quit [Ping timeout: 255 seconds]
<Hanmac> blazes816 if you want you scould inform yourself how the ruby strings are stored in the C site ... there is a magic border there the ram/cpu needed by the string increase
ElderFain has joined #ruby
<blazes816> Hanmac: yeah i've read about that.
<Tasser> blazes816, beware of rails - they think of `!` differently
wallerdev has quit [Quit: wallerdev]
<Hanmac> PS: becarefull about the return value of ! methods ... some return nil, when they do nothing (so its not a good idea to chain ! methods)
eph3meral has joined #ruby
zeromodulus has joined #ruby
<blazes816> that i know. i'm not a total nooblet. i just...don't think all the time
Speeda is now known as Speed
wallerdev has joined #ruby
yoklov has joined #ruby
headius has quit [Quit: headius]
mrFrog has left #ruby [#ruby]
seanstickle has quit [Quit: Nihil sub sole novum]
banseljaj is now known as imami|afk
<offby1> heh, "nooblet"
<offby1> Use "nooblet" in a sentence: Before I roast a chicken, I make sure to remove the nooblets.
<Hanmac> its a combination from noob and tripplet, so it means three noobs :P
15SACAX4T has quit [Quit: 15SACAX4T]
chrxn_ has quit [Ping timeout: 246 seconds]
clayjar has left #ruby ["WeeChat 0.3.7"]
<offby1> "Nooblet Oblige"
Targen has joined #ruby
workmad3 has joined #ruby
<blazes816> needless to say, it's not a good thing.
evilsushi has quit [Ping timeout: 265 seconds]
emmanuel__ has joined #ruby
emmanuel__ has quit [Read error: Connection reset by peer]
vladr has quit [Ping timeout: 265 seconds]
_justin has joined #ruby
vladr has joined #ruby
maxok has quit [Quit: Linkinus - http://linkinus.com]
<offby1> Well, chicken livers fry up nicely.
sdwrage has quit [Quit: geekli.st/programmer]
nopolitica has quit [Quit: Leaving.]
tk___ has quit [Quit: ばいばい]
grekkos has joined #ruby
grekkos is now known as Guest5382
evilsushi has joined #ruby
brianpWins has quit [Ping timeout: 255 seconds]
<blazes816> offby1: not in my house they don't
aruntomar has quit [Quit: Leaving]
mrdodo has joined #ruby
kevinfagan has quit [Quit: Linkinus - http://linkinus.com]
hunglin has joined #ruby
RORgasm has joined #ruby
abdulkarim has joined #ruby
davidpk has joined #ruby
<shevy> lol
<shevy> scannnnnn
<shevy> I wrote an archive scanner
RORgasm has quit [Ping timeout: 245 seconds]
<Xethron> RORgasm lol
__DL__ has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
<shevy> hmm perhaps I am going to write a RoR app eventually
<blazes816> shevy: hurry before it's too late!
reuf has joined #ruby
philips_ has quit [Excess Flood]
reuf has quit [Read error: Connection reset by peer]
cpruitt has joined #ruby
philips_ has joined #ruby
vladr has quit [Ping timeout: 246 seconds]
centipedefarmer has joined #ruby
vladr has joined #ruby
centipedefarmer has quit [Client Quit]
<shevy> hmmm yea
mrdodo has quit [Remote host closed the connection]
gnarmis_ has joined #ruby
sdwrage has joined #ruby
gnarmis has quit [Ping timeout: 255 seconds]
gnarmis_ is now known as gnarmis
blacktulip has quit [Remote host closed the connection]
horrror has joined #ruby
kirun has joined #ruby
evilsushi has quit [Ping timeout: 265 seconds]
turgu1 has joined #ruby
nachtwandler has quit [Ping timeout: 248 seconds]
cantonic has quit [Quit: cantonic]
ryanf_ has joined #ruby
byronb has quit [Ping timeout: 248 seconds]
hunglin has quit [Quit: Leaving.]
mohits has quit [Read error: Connection reset by peer]
cdavaz has quit [Quit: cdavaz]
ananthakumaran has quit [Quit: Leaving.]
blazes816 is now known as blazes816_
mohits has joined #ruby
null- has joined #ruby
resure has joined #ruby
null- has left #ruby [#ruby]
saschagehlich has quit [Quit: saschagehlich]
mohits has quit [Read error: Connection reset by peer]
fridim_ has joined #ruby
vladr has quit [Ping timeout: 248 seconds]
perryh_away is now known as perryh
brianpWins has joined #ruby
vladr has joined #ruby
Stalkr_ has quit [Ping timeout: 240 seconds]
centipedefarmer has joined #ruby
JayBlack has joined #ruby
<JayBlack> Anyone here with Watir experience?
turgu1 has quit [Quit: turgu1]
williamcotton has joined #ruby
k_89 has quit [Ping timeout: 255 seconds]
centipedefarmer has quit [Ping timeout: 240 seconds]
monkegjinni has quit [Remote host closed the connection]
Jrz has joined #ruby
iamjarvo has quit [Quit: Computer has gone to sleep.]
sepp2k has quit [Remote host closed the connection]
rdx has joined #ruby
ttilley_off is now known as ttilley
Draco_ has joined #ruby
Draco_ has quit [Read error: Connection reset by peer]
Draco_ has joined #ruby
LiquidInsect has quit [Remote host closed the connection]
Draco_ has quit [Remote host closed the connection]
hunglin has joined #ruby
monkegjinni has joined #ruby
rodorgas has joined #ruby
mpereira has quit [Ping timeout: 248 seconds]
mohits has joined #ruby
Draco__ has quit [Ping timeout: 265 seconds]
resure has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 265 seconds]
cads is now known as somehow
QaDeS has joined #ruby
bertfo has quit [Quit: leaving]
fayimora has joined #ruby
rippa has quit [Ping timeout: 248 seconds]
rodorgas has quit [Read error: Connection reset by peer]
JayBlack has quit [Quit: Page closed]
workmad3 has quit [Ping timeout: 265 seconds]
imami|afk is now known as banseljaj
Squee-D has joined #ruby
somehow is now known as cads
aruntomar has joined #ruby
rodorgas has joined #ruby
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
yy is now known as awayy
LennyLinux has quit [Ping timeout: 240 seconds]
otters has quit [Read error: Connection reset by peer]
fowl-afk is now known as fowl
saschagehlich has joined #ruby
Dreamer3 has quit [Quit: Computer has gone to sleep.]
Spooner has quit [Ping timeout: 246 seconds]
sebastorama has joined #ruby
mpereira has joined #ruby
rodorgas has quit [Ping timeout: 246 seconds]
Xethron has quit [Changing host]
Xethron has joined #ruby
rekenerd has quit [Quit: Leaving]
ajsie has joined #ruby
ajsie has left #ruby [#ruby]
gnarmis has quit [Quit: gnarmis]
ajsie has joined #ruby
ajsie has left #ruby [#ruby]
indian has joined #ruby
indian has quit [Changing host]
indian has joined #ruby
snearch has joined #ruby
owned_ has joined #ruby
nopolitica has joined #ruby
JohnBat26 has quit [Ping timeout: 265 seconds]
vladr has quit [Ping timeout: 255 seconds]
hayer has quit [Remote host closed the connection]
vladr has joined #ruby
Spooner has joined #ruby
sebicas has joined #ruby
awarner has quit [Remote host closed the connection]
Criztian has joined #ruby
awayy is now known as yy
yoklov has quit [Quit: computer sleeping]
aruntomar has quit [Ping timeout: 246 seconds]
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
centipedefarmer has joined #ruby
td123 has quit [Read error: Operation timed out]
oxyxian has joined #ruby
evilsushi has joined #ruby
_justin has quit [Ping timeout: 246 seconds]
macgregor_ has joined #ruby
codezombie has quit [Quit: Linkinus - http://linkinus.com]
emmanuelux has quit [Ping timeout: 246 seconds]
tiripamwe has joined #ruby
classix has quit [Ping timeout: 248 seconds]
bluOxigen has joined #ruby
sebastorama has quit [Quit: Computer has gone to sleep.]
<shevy> not me
ryanf has quit [Quit: broken pipes |||]
<shevy> but I know a bit about water
andoriyu has quit [Quit: This computer has gone to sleep]
Parabol has joined #ruby
gnarmis has joined #ruby
Spooner_ has joined #ruby
horrror has quit [Quit: horrror]
srji has joined #ruby
owned_ has quit [Ping timeout: 255 seconds]
Spooner has quit [Ping timeout: 246 seconds]
indian has quit [Ping timeout: 246 seconds]
oxyxian has quit [Quit: oxyxian]
Spooner_ is now known as Spooner
vladr has quit [Ping timeout: 246 seconds]
vladr has joined #ruby
workmad3 has joined #ruby
RORgasm has joined #ruby
evilsushi has quit [Read error: Connection reset by peer]
seanstickle has joined #ruby
srji_ has joined #ruby
srji has quit [Ping timeout: 265 seconds]
sepp2k has joined #ruby
sdwrage has quit [Quit: geekli.st/programmer]
hunglin has quit [Quit: Leaving.]
syamajala has joined #ruby
RORgasm has quit [Ping timeout: 246 seconds]
srji_ has quit [Client Quit]
mrdodo has joined #ruby
Guest12946 is now known as mksm
mohits has quit [Ping timeout: 265 seconds]
mksm has quit [Changing host]
mksm has joined #ruby
oxyxian has joined #ruby
sebastorama has joined #ruby
obryan has joined #ruby
blast_hardcheese has joined #ruby
Jrz has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
mikeric has quit [Quit: mikeric]
vladr has quit [Ping timeout: 246 seconds]
vladr has joined #ruby
tomb has quit [Quit: Computer has gone to sleep.]
TorpedoSkyline has joined #ruby
banseljaj is now known as imami|afk
sailias has joined #ruby
<shevy> let's get the RubyOS working
n1x has quit [Quit: "Night!"]
sdwrage has joined #ruby
<shevy> via mruby first I suppose
hunglin has joined #ruby
<shevy> lol
tatsuya_o has joined #ruby
<shevy> this is what google gave me for mRuby suddenly:
cdavaz has joined #ruby
<shevy> "A monomeric variant of the red fluorescent protein eqFP611, mRuby, is described."
<shevy> it glows red... :P
Speed has quit [Remote host closed the connection]
emmanuelux has joined #ruby
<mksm> Hello. Can Thread.exclusive {} be used instead of mutex.synchronize {} ?
gnarmis has quit [Quit: gnarmis]
iamjarvo has joined #ruby
Parabol has quit [Quit: Parabol]
mikeric has joined #ruby
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
<clam> When an array has 3 dots [0...2] is that the same thing as two dotss
<cirwin> no
<cirwin> three dots is an inclusive range
<cirwin> and two dots is exclusive
chris-pp has joined #ruby
<cirwin> otherway about
alanp has joined #ruby
balki has joined #ruby
<cirwin> (1...3).to_a == [1, 2]
testxyz has joined #ruby
<cirwin> (1..3).to_a == [1, 2, 3]
testxyz has left #ruby [#ruby]
twinturbo has quit [Quit: twinturbo]
obryan has quit [Read error: Connection reset by peer]
obryan has joined #ruby
balki_ has quit [Ping timeout: 248 seconds]
alanp_ has quit [Ping timeout: 248 seconds]
Guest72356 has quit [Ping timeout: 246 seconds]
brianpWins has quit [Ping timeout: 240 seconds]
brianpWins has joined #ruby
akem has quit [Ping timeout: 255 seconds]
xbob has quit [Quit: Leaving]
nicoulaj has quit [Quit: nicoulaj]
chris-pp has left #ruby [#ruby]
kevinbond has quit [Quit: kevinbond]
mdszy has joined #ruby
EddieS has joined #ruby
EddieS is now known as Guest51050
<offby1> mksm: good question
eywu has quit [Quit: Leaving.]
fayimora has quit [Ping timeout: 248 seconds]
vladr has quit [Ping timeout: 248 seconds]
fayimora has joined #ruby
vladr has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
khakimov has quit [Quit: Computer has gone to sleep.]
yxhuvud has quit [Ping timeout: 248 seconds]
bricker88 has joined #ruby
<bricker88> I'm having some encoding issues using Nokogiri. I'm taking a block of text and turning it into a DocumentFragment, doing some stuff to it, and then turning it back into a string of HTML. Somewhere in that process, some special characters aren't getting encoded properly. For example, the "curly" quotation marks are getting turned into `â??` or `Â`.
Spooner_ has joined #ruby
jrajav has quit [Quit: The best darkness is strange and surprising]
ij has quit [Read error: Connection reset by peer]
burgestrand has joined #ruby
sebastorama has quit [Remote host closed the connection]
Spooner has quit [Ping timeout: 248 seconds]
<offby1> eww
<offby1> bricker88: sounds like an excellent candidate for a short simple repro recipe
Spooner_ is now known as Spooner
sebastorama has joined #ruby
<clam> Why is it that hash.keys.class returns Array as the class, but not Hash
<bricker88> offby1: I think I'm having deja vu :-p
<clam> the hash is hash = { :one => "uno", :two => "dos" }
<burgestrand> clam: because array.keys is the list of keys for the array.
<burgestrand> Why would you need a hash for it?
<mdszy> clam: hash.keys is an array.
<bricker88> offby1: In this case I will do that because it should be quick
<burgestrand> …err, list of keys for the hash.
<mdszy> hash.class is Hash, obviously
<clam> so hash.class is Hash but hash.keys is Array?
<mdszy> Obviously.
<clam> I see, back to Koans I guess
gmci has joined #ruby
<burgestrand> clam: but only because hash has defined keys to be an array.
<mdszy> clam: if you looked at what `hash.keys` actually WAS, you'd have some sort of clue.
<iamjarvo> when you guys come across a handy snippet of code, how do you go about saving it?
wmoxam has joined #ruby
<clam> I am looking at the ruby documentation I was just sort of surprised, I had thought .keys was a submethod of Hash
<burgestrand> iamjarvo: simplenote, but I don’t come across many of those
vladr has quit [Ping timeout: 240 seconds]
<mdszy> clam: It is. But it RETURNS an array.
<mdszy> What the heck is a "submethod"?
<clam> but I appreciate the condescension
<mdszy> There are just methods.
<mdszy> That return stuff.
<clam> Sorry for the terminology
<mdszy> And hash.keys returns an array.
<clam> I got it, than ks.
<mdszy> And so you're not looking at hash.class, you're looking at hash.keys.class
<mdszy> keys = hash.keyes
<mdszy> if you had
<mdszy> *keys
<iamjarvo> burgestrand does it allow you to tag and what not?
<offby1> allan.keyes
<mdszy> keys.class # => Array
vladr has joined #ruby
<burgestrand> iamjarvo: yep, but I don’t use the special tagging behaviour. I just add words to the note since the note search is using fulltext-search, so whatever words I add to any note becomes keywords for that note.
<burgestrand> iamjarvo: using this to edit the notes on Mac OS http://notational.net/
<iamjarvo> cool
mengu has joined #ruby
<iamjarvo> thanks burgestrand
<burgestrand> \o.
clam is now known as calm
reuf has joined #ruby
reuf has quit [Read error: Connection reset by peer]
mikeric has quit [Quit: mikeric]
cdavaz has quit [Read error: Connection reset by peer]
bbloom_ has joined #ruby
cdavaz has joined #ruby
vertroa has joined #ruby
bbloom has quit [Ping timeout: 244 seconds]
bbloom_ is now known as bbloom
snearch has quit [Quit: Verlassend]
ryanf_ has quit [Ping timeout: 246 seconds]
sebastorama has quit [Quit: Computer has gone to sleep.]
noganex has quit [Ping timeout: 265 seconds]
vladr has quit [Ping timeout: 252 seconds]
noganex has joined #ruby
vladr has joined #ruby
cirwin has quit [Ping timeout: 265 seconds]
nari has joined #ruby
macgregor_ has quit [Ping timeout: 246 seconds]
workmad3 has quit [Ping timeout: 265 seconds]
burgestrand has quit [Quit: Leaving.]
mrdodo has quit [Remote host closed the connection]
enroxorz has quit [Quit: Leaving]
twinturbo has joined #ruby
<bricker88> offby1: I've determined that it's being caused by Rails' `simple_format`… that's the second time in two days that helper has burned me
Dreamer3 has joined #ruby
cdavaz has quit [Quit: cdavaz]
Deele has quit [Disconnected by services]
bluOxigen has quit [Ping timeout: 248 seconds]
De`off has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
noyb has quit [Ping timeout: 244 seconds]
twinturbo has quit [Ping timeout: 246 seconds]
ryanf has joined #ruby
brianpWins has quit [Quit: brianpWins]
vertroa has quit [Read error: Connection reset by peer]
bbloom has quit [Quit: Computer has gone to sleep.]
jeff_sebring has quit [Quit: Leaving]
Spooner has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
bbloom has joined #ruby
Spooner has joined #ruby
baphled has joined #ruby
sdwrage has quit [Read error: Connection reset by peer]
<amacgregor_osx> Hi . I'm trying to use activerecord outside a rails app, so far I been able to get a little success
vertroa has joined #ruby
<amacgregor_osx> my current issue is getting my Rake file to execute my migrations
<amacgregor_osx> I keep getting
<amacgregor_osx> undefined method `adapter_method' for nil:NilClass
Spooner has quit [Client Quit]
sdwrage has joined #ruby
<maek> this is valid ruby, yes? 1 == 1 ? puts a : puts b
Spooner has joined #ruby
<maek> cant get ternary if to work
vertroa has quit [Client Quit]
vertroa has joined #ruby
Draco_ has joined #ruby
vertroa has left #ruby [#ruby]
<amacgregor_osx> my Rakefile looks like http://hastebin.com/qayatakana.rb
<GarethAdams> maek: no, you need to put parentheses around the puts() arguments
<seanstickle> maek: no, that is not value
vertroa has joined #ruby
<seanstickle> valid
<seanstickle> Or just do puts 1 == 1 ? a : b
<maek> GarethAdams, seanstickle: thanks
blazes816_ is now known as blazes816
kirun has quit [Quit: Client exiting]
sdwrage has quit [Ping timeout: 244 seconds]
monkegjinni has quit [Remote host closed the connection]
sebicas has quit [Read error: Connection reset by peer]
De`off has quit [Quit: Client excited]
sebicas has joined #ruby
Criztian has quit [Remote host closed the connection]
alex65`mac has joined #ruby
baphled has quit [Quit: leaving]
vertroa has quit [Read error: Connection reset by peer]
baphled has joined #ruby
cpruitt has quit [Quit: cpruitt]
vertroa has joined #ruby
vladr has quit [Ping timeout: 265 seconds]
vladr has joined #ruby
baphled_ has joined #ruby
baphled has quit [Ping timeout: 252 seconds]
sailias has quit [Ping timeout: 246 seconds]
subbyyy has quit [Read error: Connection reset by peer]
zastaph has quit []
baphled_ has quit [Client Quit]
calm has quit [Quit: Lost terminal]
baphled has joined #ruby
chaingun has joined #ruby
igaiga has joined #ruby
ElderFain has quit [Ping timeout: 272 seconds]
<shevy> dumdedum
fayimora has quit [Quit: Be back in a gifii]
<shevy> low activity this weekend
fayimora has joined #ruby
<shevy> what's up... everyone on holidays or something like that?
chaingun has quit [Client Quit]
stkowski_ has joined #ruby
* Ionic` cuddles shevy
<Ionic`> shevy: oh, don't irc as root
EzeQL has joined #ruby
baphled has quit [Quit: leaving]
baphled has joined #ruby
obryan has quit [Read error: Connection reset by peer]
obryan has joined #ruby
saschagehlich has quit [Quit: saschagehlich]
andoriyu has joined #ruby
Draco_ has quit [Read error: No route to host]
Draco_ has joined #ruby
reuf has joined #ruby
AlbireoX_ has joined #ruby
subbyyy has joined #ruby
subbyyy has quit [Max SendQ exceeded]
subbyyy has joined #ruby
subbyyy has quit [Max SendQ exceeded]
awarner has joined #ruby
cdavaz has joined #ruby
ken_barber has quit [Remote host closed the connection]
subbyyy has joined #ruby
subbyyy has quit [Max SendQ exceeded]
subbyyy has joined #ruby
RORgasm has joined #ruby
ken_barber has joined #ruby
Protected has joined #ruby
tomb has joined #ruby
RORgasm has quit [Ping timeout: 246 seconds]
ElderFain has joined #ruby
ryanf has quit [Quit: broken pipes |||]
<shevy> why not
Squee-D has quit [Ping timeout: 260 seconds]
gnarmis has joined #ruby
hadees_ has joined #ruby
Squee-D has joined #ruby
<obryan> has anybody ever had luck with using mongoid and formtastic?
ryanf has joined #ruby
hadees has quit [Ping timeout: 252 seconds]
hadees_ is now known as hadees
vladr has quit [Ping timeout: 244 seconds]
g_rotbart has joined #ruby
vladr has joined #ruby
Targen has quit [Ping timeout: 246 seconds]
ZachBeta has quit [Quit: Computer has gone to sleep.]
<shevy> not used either of these
tewecske has quit [Quit: Leaving.]
<obryan> ah well
<obryan> PHP it is then
Squee-D has quit [Ping timeout: 260 seconds]
vertroa has quit [Read error: Connection reset by peer]
vertroa has joined #ruby
igaiga has quit [Remote host closed the connection]
<shevy> hehe
<blazes816> missed this conversation but I hope that was sarcasm
<blazes816> lol
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
<shevy> where are the times where people used to write everything from scratch!
<blazes816> nice
<obryan> i used to program in scratch
<obryan> or was that assembler
<obryan> blazes816: i was asking if anybody'd had luck with using mongoid and formtastic
<blazes816> obryan: I read it. Very funny sir. you should quit programming and hit the comedy store
vertroa has quit []
alex65`mac has quit [Remote host closed the connection]
<shevy> never heard formtastic before
<shevy> seems a bit like the ultimate killer features if one can not survive without them though
mikeric has joined #ruby
eywu has joined #ruby
ZachBeta has joined #ruby
stevechiagozie has joined #ruby
erichmenge has joined #ruby
Tricks has quit [Read error: Connection reset by peer]
<RubyPanther> luck is exactly what they will need, too
Tricks has joined #ruby
<shevy> RubyPanther! you are back!
<RubyPanther> Are you sure?
stevechiagozie has quit [Remote host closed the connection]
cpruitt has joined #ruby
<shevy> yeah
<shevy> you are never going to leave us anymore either
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mobilegamelabs has joined #ruby