<havenn>
stetho: Ahh, gotcha - was wondering if it was a bundler Gemfile issue.
<havenn>
stetho: A good option: gem install pry
<havenn>
stetho: Then use pry instead of irb. Pry has a command: gem-install mail
altious has joined #ruby
<havenn>
stetho: Your problem is prolly related to apt-get install of Ruby weirdness with gems. I usually just use chruby and ruby-build or rvm to install Ruby on Ubuntu just to avoid that.
<stetho>
havenn: OK, serious question. Do I want to install pry as a beginner? Is it going to make my life easier or just confuse me?
<havenn>
stetho: Yeah, totally install it as a beginner. Pretend it is irb.
statarb3 has quit [Quit: Leaving]
<havenn>
stetho: It doesn't add any difficulty that I can think of. If you want to use a Pry command just type 'help' from within Pry to see the Pry commands.
<havenn>
stetho: A lot of folks: alias irb="pry"
ToTo has quit [Ping timeout: 245 seconds]
<stetho>
OK, I'm sold. Installing pry...
dougireton has joined #ruby
<havenn>
stetho: But yeah, one of those commands is 'gem-install' which installs the gem using the current Ruby and then reloads so it is immediately available in your REPL session.
<swarley>
I tried pry once and now trying to use irb is like beating myself in the head with a hammer
<stetho>
OK. I'm confused now. I installed pry and - without doing anything else:
<stetho>
[1] pry(main)> require 'mail'
<stetho>
=> true
<swarley>
so?
eka has quit [Remote host closed the connection]
<havenn>
stetho: It worked. :)
<stetho>
That implies that pry can see 'mail' but irb can't?
manizzle has quit [Ping timeout: 264 seconds]
<havenn>
stetho: #require returns 'true' if successful, 'false' if already has been loaded, or an error.
cpruitt has quit [Quit: cpruitt]
invisime has quit [Quit: Leaving.]
<swarley>
As havenn said, require returns a value if everything is alright, but it raises a LoadError if the file you're looking for can't be found
<havenn>
stetho: I think it is just that your IRB is somehow borked. Lots of weirdness with the Ubuntu apt-get installed Ruby.
<stetho>
havenn: I understand that.
<stetho>
$ irb
<stetho>
irb(main):001:0> require 'mail'
<stetho>
LoadError: cannot load such file -- mail
<swarley>
stetho; what ruby version
<swarley>
It's probably a require "rubygems" issue
<havenn>
stetho: IRB is looking for the gem somewhere other than where your gems are installed.
<havenn>
stetho: gem -v
Jasko has quit [Read error: Connection reset by peer]
<havenn>
stetho: To update RubyGems: gem update --system
<swarley>
the better test would be if he tells us the ruby version
<havenn>
swarley: Good point.
nomenkun has quit [Remote host closed the connection]
<swarley>
1.8 makes you require rubygems
<stetho>
havenn: That is what I was expecting. Interestingly I can't gem install xxxx I hav to sudo gem install xxxx
<stetho>
Is that relevant?
<swarley>
1.9 does by default
Jasko has joined #ruby
<swarley>
pry requires rubygems by default
<swarley>
So pry would work regardless
<stetho>
$ gem -v
<stetho>
1.8.15
<swarley>
stetho; try irb -rubygems
<havenn>
stetho: gem update --system OR gem install rubygems-update
<swarley>
and then run your require "mail"
<havenn>
swarley: I always forget about the 'require "rubygems"' thing in 1.8. ALWAYS.
<swarley>
I hate that you have to
<swarley>
I understand why you wouldn't, but really it shouldn't matter if you're just requiring standard library files anyway
tps_ has joined #ruby
<swarley>
since the gem paths are pushed instead of unshifted (i believe)
banisterfiend has joined #ruby
thufir_ has quit [Remote host closed the connection]
<stetho>
$ gem update --system
<stetho>
ERROR: gem update --system is disabled on Debian
<stetho>
And also
<stetho>
$ irb -rubygems
<stetho>
irb(main):001:0> require 'mail'
<stetho>
still fails
onibox has joined #ruby
<havenn>
stetho: I'd really recommend switching to your own build of Ruby ASAP. Install chruby, build ruby-1.9.3, done.
<iosctr>
even with good rpm/etc maintainers, they still have to fight against the distro's release schedule/rules/eco-system etc... will simply never measure up.
<swarley>
Also, using irb feels dirty.
<havenn>
stetho: #rvm and #chruby or their websites are very responsive and helpful.
<swarley>
I just switched to chruby/ruby-build today
emergion has joined #ruby
<havenn>
#rbenv #rbfu #ry all empty :P
<swarley>
havenn; shame on you for recommending rvm
<havenn>
swarley: I'm just trying to be impartial. I <3 chruby!!!!
<swarley>
xD rvm is all sorts of.. ew
<yfeldblum>
swarley, y is that
<iosctr>
I have 2 machines - primary on rvm, other on rbenv. Haven't looked into changing either for some time.
<havenn>
chruby is 70 or 80 lines of code, and elegant - even supports fuzzy matching
<swarley>
It's tons of work to make rvm work. I don't like the idea of having to modify main system configurations to make rvm work
<iosctr>
I will say that rbenv provides noticeably quicker script startup.
<swarley>
I had to edit /etc/passwd to make rvm use work
banisterfiend has joined #ruby
<swarley>
And that was a headache in itself
<iosctr>
At some point, I'll probably setup both systems with rbenv - but, I haven't even looked at chruby yet :)
<swarley>
It's just magnitudes simpler to use chruby
<swarley>
iosctr; i considered rbenv, but someone told me to jut go for chruby instead
<swarley>
So far i enjoy it. It's rather simple
<iosctr>
Good news. I'll have to give a look soon.
<iosctr>
Having been using ruby since before such tools existed, I tend to just be happy that everything just works. lol
<stetho>
I honestly expected there to be problems with package installed ruby because, as with everything else, it will be xxx versions behind and have xxx missing. But I didn't expect it to be within the first 48 hours :-(
nomenkun has quit [Remote host closed the connection]
<swarley>
If you just build the packages yourself, it's generally faster and more reliable
miskander has joined #ruby
<swarley>
And most books now a days recommend the use of a ruby version manager due to notorious issues with problems installing with package managers
miskander has left #ruby [#ruby]
miskander has joined #ruby
<yfeldblum>
swarley, u talking about system install or user install?
DatumDrop has joined #ruby
apeiros_ has quit [Remote host closed the connection]
<swarley>
I'm not sure what you're asking
<iosctr>
And generally, everything you do will be running under a specific user anyway. So, setting up ruby for a user account should be fine. Very seldom would you ever need a "system" ruby.
<yfeldblum>
swarley, not sure why you would have to modify /etc/passwd to use rvm
<swarley>
because of the need to have your shell start with --login
<swarley>
I thought it seemed just ridiculous to have to start a new shell every time i wanted to use rvm
<swarley>
i needed to change my default shell to have the --login flag
joeycarmello has quit [Remote host closed the connection]
<swarley>
I've never considered the necessity for a system ruby. But even still, with chruby it installs to /opt/rubies
chord has joined #ruby
<swarley>
So it can be system wide
<yfeldblum>
swarley, why not just source it?
<swarley>
What do you mean
<chord>
Do you guys like exceptions or think they don't add substantial value
DatumDrop has quit [Ping timeout: 255 seconds]
<postmodern>
swarley, -l --login is necessary for loading any /etc/profile.d/ or ~/.bash_profile / ~/.zprofile scripts
<yfeldblum>
swarley, . ~/.rvm/scripts/rvm
<swarley>
chord; that's a broad question. They have their places, mainly.. to show that an error has occured in your code and the program shouldn't continue
<swarley>
Ah. I really just didn't like rvm anyway
emergion has quit [Quit: Computer has gone to sleep.]
<swarley>
That wasn't my only grievance
<swarley>
It doesn't matter anymore anyway. I'm happy with chruby
<postmodern>
swarley, :)
<swarley>
postmodern; good job by the way
charliesome has joined #ruby
<postmodern>
swarley, ty, a lot of research and pondering went into it
<swarley>
Well i think it was well worth it. I find it very useful and not as much work to get the job done
<yfeldblum>
chord, if your program runs into an error and goes on anyway without even bothering to notice, what do you think is likely to happen?
<swarley>
I applaud your choice in keeping the rubies in /opt. Not everyone remember it exists, but it's very useful for keeping programs together that you've installed yourself
<swarley>
remembers*
<chord>
yfeldblum: so how bad is return value errors vs exceptions
<swarley>
It's generally better practice to use Exceptions
<swarley>
But it really depends on the severity of the exception
<yfeldblum>
chord, do you plan on checking for every single possible return value (there could easily be dozens or hundreds) every time you call a function?
<postmodern>
swarley, friends finally convinced me to stop abusing /usr/local, /opt/rubies seemed reasonable, so we could easily glob
<yfeldblum>
chord, do you think that every single check that you right will actually be done correctly?
<swarley>
The main value that denotes an error on return is false or nil
<postmodern>
swarley, still on the fence about ~/.rubies/
hashpuppy has joined #ruby
<swarley>
As far as I can see the only advantage to ~/.rubies would be that it allows you to be sure you never have to use sudo (unless you have a weird setup)
<hashpuppy>
let's say I'm defining a module Util::Math. inside Util::Math I have a function calling Math.sqrt. But it's looking for Util::Math.sqrt
<hashpuppy>
do I just prefix with ::
<swarley>
I think installation to /opt by default would be good, with the option to make it user only with ~/.rubies
hsbt is now known as hsbt_away
<swarley>
hashpuppy; yes
<hashpuppy>
swarley: thanks
Jasko has quit [Read error: Connection reset by peer]
joeycarmello has joined #ruby
io_syl has quit [Quit: Computer has gone to sleep.]
<swarley>
But the way you have it set up is very nice. Using the glob in the rc file
Jasko has joined #ruby
<swarley>
Because then the user can have their own installations if they like somewhere else
dougireton has quit [Quit: Leaving.]
thams has joined #ruby
<swarley>
The only thing that I'm struggling with is that when i install a new ruby version it doesnt show up in the list from `chruby` until I've reloaded the ~/.`$SHELL`rc file
<swarley>
But maybe there is something I missed as far as that goes. And it's not even a big deal
Kuifje has quit [Ping timeout: 252 seconds]
SCommette has quit [Quit: SCommette]
mneorr has joined #ruby
miskander has quit [Quit: miskander]
<postmodern>
swarley, set RUBIES=(/opt/rubies/*)
<postmodern>
swarley, er yeah, you would need to re-load
<swarley>
the only way i can see around that was if there was a function for setting RUBIES instead of a static setting
<postmodern>
swarley, i guess it would be a perf hit if we re-evaled a dir glob after every command
<swarley>
Yeah. It's just something to consider. There are drawbacks no matter what you choose. But in the end its all up to you
cj3kim has quit [Quit: This computer has gone to sleep]
<havenn>
hrm, guess you could opt into the perf hit: alias chruby="export RUBIES=(/opt/rubies/*) chruby"
<havenn>
I think i'd rather source ~/.rc
<postmodern>
havenn, i had issues with exporting Arrays in zsh, but I'm no zsh export :/
<swarley>
yeah, like i said its not a big deal
cascalheira has joined #ruby
<postmodern>
something to think about
dougireton has joined #ruby
<swarley>
well, you can make zsh act like sh
<swarley>
It's all on how you invoke it (I think)
<havenn>
postmodern: unfortunately I'm no zsh expert either! i need to study up.
cascalheira has quit [Client Quit]
<swarley>
I know almost nothing about zsh scripting
<swarley>
Even though i use zsh lol
<havenn>
swarley: ditto
<postmodern>
to the O'Reilly store!
<swarley>
do do doooo!
<swarley>
I know there is a zsh from bash book
<stetho>
I went the rvm route and "require 'mail'" now works. Thank you all for your help. Back to Hello World... for me
<swarley>
or from bash to zsh
<iosctr>
the installers for many programs you may download and install/try-out will typically use /usr/local - so I too tend to use /opt for things I install manually, to keep them separate.
<swarley>
yeah, that's what's recommended
<swarley>
But a lot of people forget that good old /opt is there
<swarley>
I forgot that i installed rubinius there
nanothief has joined #ruby
<iosctr>
Some will use ~/.local/, but I've always used /opt. Whatever's in there, I know I did it :D
<swarley>
yeah... ~/.local always seems scary to me
dmiller has joined #ruby
<swarley>
I have no idea what you would do in windows though
<swarley>
lol
<swarley>
I guess just cry and wait for your linux VM to start up
onibox_ has joined #ruby
onibox_ has quit [Client Quit]
moshee has quit [Remote host closed the connection]
banisterfiend has quit [Remote host closed the connection]
sepp2k1 has quit [Remote host closed the connection]
onibox has quit [Ping timeout: 264 seconds]
SCommette has joined #ruby
<iosctr>
windows? yeah.... run gparted from a livecd, wipe all partitions and start over with linux :) HA!
<swarley>
xD
<swarley>
I've run into the tricky situation of giving my linux partition only 60gb
<swarley>
I meant to give it 100gb
phipes has joined #ruby
<swarley>
I just wanted enough room on my windows partition so that i could have room for games
guns has quit [Ping timeout: 250 seconds]
<swarley>
While I love linux, until Valve puts enough work into steam for linux i can't switch entirely
<iosctr>
I ran dual-boot for many years (Vista/Linux), but booted into windows so seldomly I finally scraped it.
SCommette has quit [Client Quit]
<swarley>
Yeah... I only keep 7 for games occasionally
<postmodern>
ha, im running the Steam beta
<swarley>
I can't get mine to ever load :/
<stetho>
I haven't used a Windows machine since 2009.
<postmodern>
it tries to call gksudo to install Steam updates into /usr/local/
<swarley>
haha
<postmodern>
someone is going to have to talk to them about package management
<iosctr>
I gave up gaming... but yeah, there are still some things... I'd be more tempted to setup a Windows VM to run under Linux if need be.
iamjarvo has joined #ruby
dougireton has quit [Quit: Leaving.]
apok has quit [Quit: apok]
<iosctr>
I ran a windows-based editor under Wine for years, until I finally made the move to VIM - glad I did :)
* swarley
installs steam.deb as we speak
dougireton has joined #ruby
<postmodern>
steam steam://open/games
<swarley>
mmm I love vim
<postmodern>
i think the open beta starts next week
<swarley>
:ooo
gordon1775 has joined #ruby
<swarley>
I really want to try l4d for linux
lolcathost has joined #ruby
Goles has quit [Ping timeout: 265 seconds]
banisterfiend has joined #ruby
samphippen has joined #ruby
Goles has joined #ruby
stetho has quit [Remote host closed the connection]
marr has quit [Ping timeout: 265 seconds]
perun_ has quit [Ping timeout: 264 seconds]
_cheney has quit [Ping timeout: 260 seconds]
ltsstar has quit [Quit: ltsstar]
bwlang has joined #ruby
<iosctr>
I eventually found gaming to be much like watching TV - I start feeling like I'm just wasting time away. When I feel like I need to relax/escape, I've found listening to music more enjoyable.
dmiller has quit [Remote host closed the connection]
<swarley>
I have different moods. Sometimes i really want to play Terraria, or Amnesia. Other times i want to listen to music or watch a movie
seanstickle has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
<iosctr>
I don't feel like my mind is nearly as "engaged", so it can wander - giving my subconscious more opportunity to work on problems... at least, that's the theory :)
bigmac has quit [Ping timeout: 264 seconds]
guns has joined #ruby
joeycarmello has quit [Remote host closed the connection]
bwlang has left #ruby [#ruby]
digifiv5e has quit [Excess Flood]
digifiv5e has joined #ruby
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
gordon1775 has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
<seanstickle>
Weird idea, that there is a non-conscious mind
<iosctr>
:)
perun_ has joined #ruby
<iosctr>
I tend to think of the conscious mind as the foreground process, with the subconscious being multiple background processes :)
<seanstickle>
Cute metaphor.
<seanstickle>
Though deeply inaccurate.
postmodern has quit [Quit: Leaving]
Munto has quit [Read error: Connection reset by peer]
c0rn has joined #ruby
rondale_sc has quit [Quit: rondale_sc]
Jasko has quit [Read error: Connection reset by peer]
Jasko has joined #ruby
bigmac has joined #ruby
<iosctr>
Yes, I'm curious. But, of course, this is not the place for such a discussion :) If you care to shoot me some links though, I do enjoy research into this subject :)
<seanstickle>
It's all about Freud, man.
<seanstickle>
He's got books and books on the subject.
_cheney has joined #ruby
monkegjinni has joined #ruby
hashpuppy has quit [Quit: hashpuppy]
c0rn has quit []
miskander has joined #ruby
nomenkun has joined #ruby
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
banisterfiend has quit [Ping timeout: 246 seconds]
apeiros_ has joined #ruby
Bosox20051 has joined #ruby
hashpuppy has joined #ruby
hashpuppy has quit [Client Quit]
ikaros has quit [Quit: Ex-Chat]
nomenkun has quit [Ping timeout: 264 seconds]
_cheney has quit [Read error: Connection reset by peer]
havenn has quit [Ping timeout: 264 seconds]
joeycarmello has joined #ruby
banisterfiend has joined #ruby
apeiros_ has quit [Ping timeout: 260 seconds]
_cheney has joined #ruby
jjbohn has joined #ruby
SCommette has joined #ruby
slainer68 has joined #ruby
<yfeldblum>
books on a subject =/= knowledge on a subject
<shevy>
ruby far far away WHAT IS WRONG WITH THIS PICTURE
emergion has joined #ruby
g_bleezy has quit [Ping timeout: 264 seconds]
tommyvyo_ has quit [Quit: Computer has gone to sleep.]
<kirotan>
shevy
<kirotan>
that is normal
<kirotan>
we call it 'bias'
<shevy>
:(
mneorr has quit [Remote host closed the connection]
<shevy>
but it's so much higher than ruby, even perl is rated higher
<shevy>
I am gonna fight the perl guys
mneorr has joined #ruby
<kirotan>
that tells you it is bias
havenn has quit [Read error: No route to host]
IceDragon has quit [Quit: Space~~~]
havenn has joined #ruby
dmiller has joined #ruby
aapzak has quit [Ping timeout: 246 seconds]
<reppard>
shevy: python sucks
dmiller has quit [Remote host closed the connection]
<reppard>
python in a nutshell: let's see how many times we can call self
prettymuchbryce has joined #ruby
dmiller has joined #ruby
Targen has quit [Remote host closed the connection]
<shevy>
hehe
Targen has joined #ruby
S1kx has quit [Ping timeout: 248 seconds]
aapzak has joined #ruby
guns has quit [Ping timeout: 265 seconds]
<reppard>
the only good thing about python is that if it didnt exist, we probably wouldn't have ruby =)
dougireton has quit [Ping timeout: 248 seconds]
nari has quit [Ping timeout: 245 seconds]
d2dchat has quit [Remote host closed the connection]
tpe11etier_ has joined #ruby
io_syl has joined #ruby
nipa_r has joined #ruby
<yfeldblum>
big parts of the linux OS's are written in python and perl?
radic has quit [Disconnected by services]
radic_ has joined #ruby
nipa_r has quit [Client Quit]
chriskk has quit [Quit: chriskk]
tpe11etier_ has quit [Client Quit]
statarb3 has quit [Ping timeout: 245 seconds]
tyfighter has joined #ruby
nipar has joined #ruby
alexspeller has joined #ruby
BoomCow has joined #ruby
banisterfiend has quit [Ping timeout: 264 seconds]
bwlang has joined #ruby
rondale_sc has quit [Quit: rondale_sc]
ewag has quit [Ping timeout: 245 seconds]
otters has quit [Quit: WeeChat 0.3.9.2]
banisterfiend has joined #ruby
dxiao has joined #ruby
alexspeller has quit [Ping timeout: 252 seconds]
eka has joined #ruby
dougireton has joined #ruby
centipedefarmer has quit [Remote host closed the connection]
eka has quit [Ping timeout: 264 seconds]
rondale_sc has joined #ruby
guns has joined #ruby
otters has joined #ruby
huoxito has quit [Quit: Leaving]
gbchaosmaster has joined #ruby
jenrzzz has joined #ruby
Squarepy has quit [Quit: Leaving]
emergion has quit [Quit: Computer has gone to sleep.]
swaits has joined #ruby
hsbt is now known as hsbt_away
bwlang has left #ruby [#ruby]
butblack has quit [Quit: butblack]
Mon_Ouie has joined #ruby
banisterfiend has quit [Ping timeout: 250 seconds]
<prettymuchbryce>
I have a question for a ruby expert in here. I have this box on ec2 that I'm trying to run a socket server off of. Is there a good way to make it run even after I close my ssh connection ?
dxiao has quit [Quit: leaving]
<prettymuchbryce>
I'm just using sudo ruby server.rb
<swaits>
you need to run the process in the background
<swaits>
./server.sh &
<swaits>
the ampersand (&) tells the shell to start the job in the background. then it should keep running when you end your interactive terminal.
<swaits>
note, this is not a permanent way to launch the server process. for that you'll want to add it to the rc system (or whatever similar on your OS) and probably use something like daemontools to ensure it stays running.
<swaits>
personally I like the second answer. it's clean and simple.
<swaits>
or just throw a startup script in /etc/init
<prettymuchbryce>
Well crontab is only for shell scripts. So I write a shell script that runs the ruby application I guess ?
phipes has quit [Read error: Connection reset by peer]
aaronmacy has joined #ruby
<swaits>
cron can run anything..
<swaits>
so your cron job could be "/path/to/ruby /path/to/my/script.rb"
codygman_ has joined #ruby
<codygman_>
I'm getting this error on the ruby gem tmuxinator: bad pattern: $:.unshift(File.dirname(__FILE__) + /../lib)
<swaits>
or, if you make your script executable ("chmod +x script.rb"), and make sure the first line of the script is correct (something like "#!/usr/bin/env ruby"), your cron job could just be "/path/to/my/script.rb"
<prettymuchbryce>
You know your stuff swaits
BoomCow has quit [Quit: This computer has gone to sleep]
_alejandro has joined #ruby
<prettymuchbryce>
Okay I'm giving crontab a try. I have @reboot sudo ruby /home/ubuntu/websocketserver/server.rb &
<prettymuchbryce>
moment of truth
<prettymuchbryce>
sudo reboot
jeffreybaird has joined #ruby
<swaits>
oh
<swaits>
did you edit root's cron?
<swaits>
sudo crontab -u root -e
<prettymuchbryce>
Yes
<swaits>
put it in there.. or whatever other privileged user
andrewhl has joined #ruby
BoomCow has joined #ruby
<prettymuchbryce>
oh I just did sudo crontab -e
<swaits>
ok then you won't need the "sudo" in that job.. b/c it'll already be running as a su
<swaits>
were you logged in as root at the time?
emmanuelux has quit [Remote host closed the connection]
<prettymuchbryce>
nope I was logged in as "ubuntu"
dmiller has quit [Ping timeout: 264 seconds]
tyfighter has quit [Quit: tyfighter]
thams has quit [Read error: Connection reset by peer]
<swaits>
well.. that's probably fine. you shouldn't run the server process as root anyway. I'd edit out the "sudo" part.
thams has joined #ruby
<swaits>
also, from cron, you don't need the '&' because all the jobs are launched in the background from there automatically. that said, it should still work with it.
jxriddle has quit [Quit: jxriddle]
otters has quit [Ping timeout: 264 seconds]
otters has joined #ruby
io_syl has quit [Quit: Computer has gone to sleep.]
<iamjarvo>
hi all i am looking for a code review. i was doing ruby kick start session2 challenge 11 and i think i found a bug. it was printing one bottle of beer on the wall twice. here is the pastie http://pastie.org/private/8sedheyishynposbmdlnpa i tried to keep it as close as possible to what was covered in the lesson thank you
<prettymuchbryce>
Actually it's getting the song wrong
<prettymuchbryce>
After you take one down and pass it around you need to declare "Two bottles of beer on the wall" and then start the song again by saying "Two bottles of beer on the wall "
dougireton has quit [Quit: Leaving.]
tyfighter has joined #ruby
dougireton has joined #ruby
<iamjarvo>
prettymuchbryce: i might be caught up in it and missing what you are saying. when i run it with 5 this is what i get http://pastie.org/5537723
Jasko has quit [Read error: Connection reset by peer]
phelps has joined #ruby
jankly has quit [Read error: Connection reset by peer]
<jsilver>
prettymuchbryce: ruby video chat... like webrtc but no plugin and no webpage
<codezombie>
I just can't seem to figure out why it won't work in ruby, but works in php/perl
<swaits>
that permalink has your original RE (which seems to work fine) and some test cases
<prettymuchbryce>
Sorry jsilver I'm not familiar with webrtc.
<codezombie>
swaits: right, the original works fine. The issue is with the DRY example. It's supposed to return the same.
<jsilver>
well, it's Google Chrome Team's attempt to make Skype inside a webpage and it seems a lot of browsers are supporting.. but not sure if Cocoa Nativ Webkit Will Support it
<codezombie>
swaits: try it with this: ^([^aeiou]*)a(?1)e(?1)i(?1)o(?1)u(?1)$
<jsilver>
but I wann allow this functionality in my app.. Maybe i should use WebRTC and a pplugin or something or jsut tried it
emergion has joined #ruby
<swaits>
i did. same error. take the question marks out and error goes away. but of course the RE is wrong at that point
<swaits>
i'm working on it now tho
kiyoura has quit [Quit: Leaving]
<codezombie>
swaits: this is just an excersize for me to brush up on my regex, I just thought it odd that it didn't work in ruby. Figured I'd ask here.
codygman_ has quit [Quit: leaving]
<Hanmac>
backreference does not work like that
<codezombie>
Hanmac: I tried \, instead of the ?, that didn't seem to work either.
adeponte has quit [Remote host closed the connection]
<codezombie>
No idea why I didn't hit up the docs.
* codezombie
is shamed.
<aces1up>
can you get a thread deadlock on ruby Queue class if you have multiple threads trying to pop off jobs from the queue via queue.pop
<Hanmac>
codezombie ... some of the regexskills may not work with ruby 1.9.2 ... you should update
<codezombie>
trying on 1.9.3p327 now
tomsthumb has joined #ruby
m3pow has joined #ruby
elkclone has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
Goles has quit [Ping timeout: 250 seconds]
joeycarmello has joined #ruby
Goles has joined #ruby
mahmoudimus has joined #ruby
<swaits>
yah..
g_bleezy has joined #ruby
kil0byte has quit [Remote host closed the connection]
<swaits>
what you're really trying to do is create a named character class
<swaits>
but, it looks like you're using back references to attempt that, which of course won't work, because the back reference just looks for whatever was ACTUALLY captured.
Averna has quit [Ping timeout: 264 seconds]
joeycarmello has quit [Ping timeout: 250 seconds]
robustus has quit [Ping timeout: 244 seconds]
rippa has joined #ruby
mneorr has quit [Remote host closed the connection]
<swaits>
and so out of curiosity I ran it through Regexp::Optimizer (perl) and it made no improvements to /^[^aeiou]*a[^aeiou]*e[^aeiou]*i[^aeiou]*o[^aeiou]*u[^aeiou]*$/
robustus has joined #ruby
<codezombie>
that makes sense, since the back-reference doesn't get modified
<codezombie>
blah
<codezombie>
thanks swaits
<swaits>
well, it's that the back ref is matching what actually got matched in the first one..
<swaits>
so if the word were zzzaeiou, the back ref for that first group is now "zzz"
<swaits>
so now you could only match something like zzzazzzezzzizzzozzzuzzz
aces1up has quit []
hsbt_away is now known as hsbt
prettymuchbryce has quit [Remote host closed the connection]
swerter has joined #ruby
jsilver has quit [Ping timeout: 264 seconds]
Averna has joined #ruby
arietis has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
<warchicken>
Hanmac, yeah I'm reading that, got a few questions though
<warchicken>
hmn, i'll read first, thanks
<Hanmac>
then i excange the questions with answers :P
<warchicken>
well, this all works through a prompt window
hsbt is now known as hsbt_away
<warchicken>
when does one write something in say, notepad++ to program the language?
<warchicken>
*in the language
Solnse has quit [Ping timeout: 265 seconds]
<warchicken>
I don't really see it :(
dmiller has joined #ruby
<warchicken>
the prompt window is confusing, I thought people coded ruby in text
hsbt_away is now known as hsbt
<Hanmac>
every edior is fine ... syntaxhighlighting only for you, but the normal notepad works too
Takehiro has quit [Read error: Connection reset by peer]
<Hanmac>
warchicken the prompt is used with irb with is an interactive ruby interpreter ... you chould look at it or pry the later twinbrothr :P
<warchicken>
allright
<warchicken>
how do people go from text to a program?
cousine has quit [Remote host closed the connection]
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
spike|spiegel has joined #ruby
<warchicken>
I'm just trying to represent all this
statarb3 has quit [Read error: Connection reset by peer]
dmiller has quit [Ping timeout: 255 seconds]
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
<Hanmac>
warchicken, you could first play with irb ... the text itself is the programm ruby is interpreted so you dont need to compile it
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
<warchicken>
allright, see you again in a few days :p
qwerxy has quit [Quit: offski]
k610 has joined #ruby
joeycarmello has joined #ruby
Slivka has quit [Ping timeout: 248 seconds]
emergion has joined #ruby
hsbt is now known as hsbt_away
Jasko has quit [Read error: Connection reset by peer]
statarb3 has quit [Ping timeout: 252 seconds]
Loaft has quit []
Jasko has joined #ruby
hsbt_away is now known as hsbt
Slivka has joined #ruby
joeycarmello has quit [Ping timeout: 256 seconds]
statarb3 has joined #ruby
rodasc has quit [Ping timeout: 276 seconds]
kesor has joined #ruby
tps_ has joined #ruby
Guest67996 has quit [Read error: Connection timed out]
hsbt has quit [Ping timeout: 246 seconds]
Guest67996 has joined #ruby
hotovson_ has quit [Remote host closed the connection]
io_syl has quit [Quit: Computer has gone to sleep.]
Slivka has quit [Read error: Connection reset by peer]
hotovson has joined #ruby
hsbt has joined #ruby
DaZ has quit [Ping timeout: 245 seconds]
banisterfiend has joined #ruby
hsbt is now known as hsbt_away
timonv has joined #ruby
hsbt_away is now known as hsbt
lolmaus has quit []
Virunga has quit [Remote host closed the connection]
Iszak has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
hotovson has quit [Ping timeout: 255 seconds]
cousine has joined #ruby
DaZ has joined #ruby
aapzak has quit [Ping timeout: 248 seconds]
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
deepeederd has joined #ruby
aapzak has joined #ruby
ltsstar has joined #ruby
banisterfiend has quit [Ping timeout: 260 seconds]
lkba has joined #ruby
crodas has joined #ruby
Iszak has quit []
andreime has quit [Quit: Konversation terminated!]
Averna has joined #ruby
hsbt is now known as hsbt_away
timonv has quit [Remote host closed the connection]
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
jkl1337 has quit [Ping timeout: 264 seconds]
drfreeze has quit [Ping timeout: 252 seconds]
hsbt is now known as hsbt_away
drfreeze has joined #ruby
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
statarb3 has quit [Quit: Leaving]
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
dmiller has joined #ruby
beiter has joined #ruby
hsbt is now known as hsbt_away
nari has joined #ruby
hsbt_away was kicked from #ruby by apeiros_ [stop that]
hsbt has joined #ruby
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
hsbt was kicked from #ruby by apeiros_ [hsbt]
Proshot has joined #ruby
dmiller has quit [Ping timeout: 245 seconds]
explody has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
Proshot is now known as statarb3
statarb3 has quit [Changing host]
statarb3 has joined #ruby
Villadelfia_ has quit [Ping timeout: 250 seconds]
Iszak has joined #ruby
Villadelfia has joined #ruby
rakunHo_ has joined #ruby
Jasko has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
Jasko has joined #ruby
rakunHo has quit [Ping timeout: 245 seconds]
nomenkun has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
Villadelfia has quit [Ping timeout: 265 seconds]
Diger_s has quit [Read error: Connection reset by peer]
kn330 has joined #ruby
warchicken has quit [Read error: Connection reset by peer]
warchicken has joined #ruby
Villadelfia has joined #ruby
<kn330>
from recommendations import critics # Here recommendations.py is a file and critics is a variable (Dictionary/Hash) declared inside it. How do I achieve something similar in Ruby?
Diger_s has joined #ruby
<nanothief>
You can't, pythons import system is more powerful than ruby's. The best you can do is separate the functions/classes into multiple modules, and use something like import 'recommendations'; include Recommendations::Critics
<kn330>
say recommendations.rb has a hash (critics={{},{}} ); I tried 'require "./recommendations.rb" ' which return "true" but the variable 'critics' isn't available :|
<nanothief>
oh nevermind then, didn't realize what you were asking
qwerxy has joined #ruby
qwerxy has quit [Client Quit]
nari has quit [Ping timeout: 245 seconds]
<nanothief>
You could simply put the variable into a method, eg def critics; {{},{}}; end, however, it will be reevaluated every time it is called (may be a problem if the variable is huge)
warchicken has quit [Read error: Connection reset by peer]
warchicken has joined #ruby
gregorg_taf has joined #ruby
Russell^^ has joined #ruby
<apeiros_>
kn330: local variables are local
<apeiros_>
hence the name
<apeiros_>
use a constant if you want it available in another file
JarJar has joined #ruby
gregorg has quit [Read error: Connection reset by peer]
emmanuelux has joined #ruby
darthdeus has joined #ruby
deepeederd has quit [Ping timeout: 255 seconds]
darthdeus has quit [Read error: Connection reset by peer]
darthdeus has joined #ruby
Takehiro has joined #ruby
nari has joined #ruby
nkts has quit []
<kn330>
apeiros_: its like a variable to that file but should be treated as a constant when used by other files. So yes, I've initialised the variable 'critics' with predefined values and plan to use it in other files.
<apeiros_>
kn330: as said, critics is a local variable
<apeiros_>
and local variables are called local because they are, you know, local
yewton has quit [Excess Flood]
<kn330>
Would using a 'module' here be reasonable?
<apeiros_>
kn330: what stops you from just making it a constant?
yewton has joined #ruby
staafl has joined #ruby
tvsutton has quit [Ping timeout: 250 seconds]
<kn330>
apeiros_: what exactly do you mean by 'make it a constant' ? All I want is to keep critics in a separate file and use (read ) it whenever required.
<apeiros_>
kn330: sounds to me like you should get a book and learn ruby basics
<apeiros_>
a constant in ruby is a variable which starts with an uppercase letter
Elhu has joined #ruby
<apeiros_>
Constant, $global, @@class_var, @instance_var, local
Elhu has quit [Client Quit]
tvsutton has joined #ruby
<kn330>
oh! thanks
cousine_ has joined #ruby
<kn330>
I really need to learn a bit more of ruby syntax :|
<kn330>
and btw making it a constant works :D | apeiros_
cousine has quit [Ping timeout: 245 seconds]
Bosma has quit [Ping timeout: 264 seconds]
Guest63506 has quit [Quit: Guest63506]
Bosma has joined #ruby
chussenot has quit [Quit: chussenot]
eka has joined #ruby
chussenot has joined #ruby
ikaros has joined #ruby
braoru has joined #ruby
qwerxy has joined #ruby
qwerxy has quit [Client Quit]
Takehiro has quit [Remote host closed the connection]
k610 has quit [Quit: Leaving]
Goles has quit [Ping timeout: 255 seconds]
dmiller has joined #ruby
Goles has joined #ruby
yewton has quit [Excess Flood]
dmiller has quit [Ping timeout: 252 seconds]
timonv has joined #ruby
yewton has joined #ruby
rakunHo_ has quit [Remote host closed the connection]
alexspeller has joined #ruby
ebouchut has joined #ruby
beiter has quit [Quit: beiter]
bwlang has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
andreime has joined #ruby
Nisstyre-laptop has quit [Ping timeout: 250 seconds]
acrocity has quit [Read error: Connection reset by peer]
acrocity has joined #ruby
akemrir has joined #ruby
entrenador has joined #ruby
atno has quit [Read error: Operation timed out]
Virunga has joined #ruby
nilg has joined #ruby
agarie has quit [Remote host closed the connection]
atno has joined #ruby
nanothief has quit [Ping timeout: 264 seconds]
Guest63506 has joined #ruby
tenmilestereo has joined #ruby
tenmilestereo has quit [Max SendQ exceeded]
tenmilestereo has joined #ruby
Kuifje has joined #ruby
Kuifje has quit [Changing host]
Kuifje has joined #ruby
ebouchut has quit [Quit: This computer has gone to sleep]
nomenkun has quit [Remote host closed the connection]
tvw has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
Elhu has joined #ruby
pavilionXP__ has joined #ruby
pavilionXP has quit [Ping timeout: 245 seconds]
Takehiro has joined #ruby
alexspeller has joined #ruby
lkba has quit [Ping timeout: 264 seconds]
akemrir has quit [Quit: WeeChat 0.3.9.2]
piotr_ has joined #ruby
chussenot has quit [Quit: chussenot]
Sou|cutter has quit [Quit: WeeChat 0.3.7]
dmiller has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
chussenot has joined #ruby
alexspeller has quit [Remote host closed the connection]
entrenador has quit [Quit: leaving]
bjensen has joined #ruby
<bjensen>
"2012-07-30".to_date >> 4 # => Fri, 30 Nov 2012 ; "2012-07-31".to_date >> 4 # => Fri, 30 Nov 2012. Is this a bug?
dmiller has quit [Ping timeout: 260 seconds]
<canton7>
looks like a rails / activesupport question?
Astral has joined #ruby
Astral is now known as Guest79413
nari has quit [Ping timeout: 245 seconds]
JarJar has left #ruby ["Leaving"]
<canton7>
ah no, the #>> is part of stdlib's Date
Guest79413 is now known as Astral_
<shevy>
cool
<shevy>
didnt see that one before
<canton7>
and as november only has 30 days, looks like a design decision
<shevy>
hmmm
<shevy>
isn't the 7. month not november?
d34th4ck3r has quit [Read error: Operation timed out]
hsbt_away has joined #ruby
shikamaru has quit [Ping timeout: 264 seconds]
hsbt_away is now known as hsbt
pmros has joined #ruby
<canton7>
It starts with the 31st July, adds 4 months (making it the 31st November, which is invalid), and starts taking off days until the date becomes valid
<canton7>
at least, that's what it looks like the source does
<canton7>
and it make sense
<shevy>
ah, ok
Jasko has quit [Read error: Connection reset by peer]
Jasko has joined #ruby
joeycarmello has joined #ruby
shikamaru has joined #ruby
hoelzro|away is now known as hoelzro
<bjensen>
you guys think this makes sense?
<bjensen>
Two different dates should not have the same result when using >> IMO
<Banistergalaxy>
Hello again, the only one taking pics i think. I have a few questions to ask. I bought my ticket. Any suggestions on how to do with the same time........ :) I am a beautiful person who is a good idea to have a guy who is a good day at work!
<canton7>
bjeanes, what would you do?
joeycarmello has quit [Ping timeout: 246 seconds]
<shevy>
bjensen but what does >> mean in this context?
<canton7>
"a month" is not particularly well defined
<shevy>
"Returns a date object pointing n months after self. The n should be a numeric value"
<canton7>
You can either roll back a day, or roll forwards a day (which has the same problem and is slightly more confusing imo), or throw an exception, which would just be irritating and would require everying using #>> to check for the exception and manually do something. They'd probably manually do the current behaviour
nomenkun has joined #ruby
bwlang has joined #ruby
<canton7>
If you'd rather add 4*31 days, just use #+
<Banistergalaxy>
Canton a month is a good day at work! I love it when you multiply 4 by 31 to get the most important thing in the morning. It is a little bit of a sudden, but it would take a few days.
nari has joined #ruby
JohnBat26 has joined #ruby
Takehiro has quit [Remote host closed the connection]
qwerxy has joined #ruby
hsbt has quit [Ping timeout: 244 seconds]
hsbt_away has joined #ruby
hsbt_away is now known as hsbt
nari has quit [Ping timeout: 245 seconds]
Xeago has quit [Remote host closed the connection]
malkomalko has joined #ruby
metaproged has joined #ruby
metaproged has left #ruby [#ruby]
banisterfiend has joined #ruby
nomenkun has quit [Remote host closed the connection]
miphe_ has joined #ruby
* apeiros_
still curious for what result bjensen expected…
<banisterfiend>
:<
<apeiros_>
why the sadface, banisterfiend?
<banisterfiend>
apeiros_: trying to figure out what the :v emoticon is
qwerxy has quit [Quit: offski]
Iszak has quit []
jgrevich has joined #ruby
qwerxy has joined #ruby
ToTo has joined #ruby
qwerxy has quit [Client Quit]
wf2f has quit [Ping timeout: 246 seconds]
malkomalko has quit [Read error: Connection reset by peer]
<banisterfiend>
ToTo: watch out ToTo, watch out MaRy, that's not a coconut tree that's the enormous crocodile and he wants to eat you all up!
skcin7 has joined #ruby
malkomalko has joined #ruby
elico has joined #ruby
cousine_ has quit [Remote host closed the connection]
samphippen has joined #ruby
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
gordon1775 has joined #ruby
jxriddle has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
cousine has joined #ruby
Takehiro has joined #ruby
hsbt has quit [Ping timeout: 255 seconds]
banisterfiend has quit [Remote host closed the connection]
cousine has quit [Remote host closed the connection]
dmiller has joined #ruby
hsbt_away has joined #ruby
hsbt_away is now known as hsbt
alexspeller has joined #ruby
dmiller has quit [Ping timeout: 264 seconds]
alexspeller has quit [Ping timeout: 252 seconds]
lolcathost has quit [Ping timeout: 255 seconds]
nomenkun has joined #ruby
nemesit|osx has joined #ruby
pmros has quit [Quit: Konversation terminated!]
Elhu has joined #ruby
bwlang has left #ruby [#ruby]
nemesit has quit [Ping timeout: 246 seconds]
eka has joined #ruby
chaosis has joined #ruby
joeycarmello has joined #ruby
lkba has joined #ruby
vlad_starkov has joined #ruby
Elhu has quit [Client Quit]
Eplemosen has joined #ruby
nick_h has quit [Ping timeout: 256 seconds]
vlad_sta_ has joined #ruby
eka has quit [Ping timeout: 245 seconds]
joeycarmello has quit [Ping timeout: 248 seconds]
freeayu has quit [Remote host closed the connection]
rondale_sc has joined #ruby
vlad_starkov has quit [Ping timeout: 260 seconds]
hsbt has quit [Ping timeout: 248 seconds]
bwlang has joined #ruby
nick_h has joined #ruby
altious has joined #ruby
bwlang has left #ruby [#ruby]
akemrir has joined #ruby
Astral_ has quit [Quit: Leaving]
AlSquirikou is now known as AlSquire
Xeago has joined #ruby
tk___ has quit [Quit: ばいばい]
miskander has joined #ruby
Banistergalaxy has quit [Ping timeout: 245 seconds]
<mitc0185>
I'm trying to install the fcgi gem, but it conks when it can't find fcgiapp.h on the build. I've compiled fastcgi to my home directory -- how do I tell gem to look there for this header?
<waxjar>
quick question: what are the things between the pipes (|these, things|) called in a block? just arguments or do they have a special name?
<heftig>
waxjar: parameters
<waxjar>
thanks
<heftig>
or arguments
timonv_ has quit [Remote host closed the connection]
<nipar>
Thank you iamjarvo, i'll read it
<nipar>
So far, all these sources show first a yield method to call a block, then a lambda method
<nipar>
and I just don't understand
<nipar>
if yield works, why use a lambda
daniel_hinojosa has quit [Ping timeout: 260 seconds]
workmad3 has quit [Ping timeout: 255 seconds]
<nipar>
They all speak of how much better things become with a lambda, how purple unicorns will swoon around my house and offer me coffee when I wake up, cus I used them, and I just don't see what the big deal is
<canton7>
define "then a lambda method". blocks and lambdas follow subtly different rules
<nipar>
Are the 5-lines-of-codes examples they're demonstrating too simple, for me to understand the real benefits of a lambda?
<nipar>
or am I just not thinking in the right way at all
<canton7>
are we talking lambda in the general sense, or a specific ruby lambda?
<nipar>
Good question, now please answer it ;)
<heftig>
nipar: with lambda, do you mean the &foo stuff?
<canton7>
when you say 'lambda' it's hard to know what exactly you're referring to
lolcathost has quit [Quit: brb]
<nipar>
I mean that [person(s) in tutorial(s)] are basically calling a block of code with a yield method
<heftig>
as in, the examples were: def qux; yield; end and def qux(&foo); foo.call; end
<nipar>
then make small changes to the codes, and explain "This is now a lambda! So much better!"
<nipar>
and I don't see where anything got better
<heftig>
nipar: please show me what code you mean
<canton7>
yeah, it's very hard to imagine what you've been reading
<Hanmac>
nipar i use something like this (see the & ) Dir["*"].map(&File.method(:size)).inject(0,:+)
<havenn>
canton7: I thought there was no 'proc' or '->' in 1.8, but dunno.
<Godd2>
Don't let the title deceive you, it's actually not a very advanced reading, and will give you wonderful foundations in understanding Ruby
tomsthumb has quit [Quit: Leaving.]
<havenn>
canton7: Okay, I'm wrong according to IRB. >.>
<canton7>
havenn, apparently `proc` acts like `lambda` in 1.8, but `Proc.new` in 1.9
<nipar>
thx, I keep feeling like I should somehow magically know programming methodology and terms before actually attempting any programming
<havenn>
canton7: aye, confusing!
<nipar>
Too many jump in to coding right away, and not having done much coding before, I keep getting stuck on things like this :>
SCommette has joined #ruby
<canton7>
imo you should really be learning your first language from a good book
<canton7>
there's far too much scope to skip important stuff without realising it otherwise
tommyvyo_ has joined #ruby
timonv has joined #ruby
ikaros has quit [Quit: Ex-Chat]
daniel_hinojosa has joined #ruby
miskander has quit [Quit: miskander]
joeycarmello has joined #ruby
cpruitt has quit [Quit: cpruitt]
Vert has joined #ruby
Elhu has joined #ruby
SCommette has quit [Quit: SCommette]
jenrzzz_ has joined #ruby
<nipar>
I kind of jump between books and movies
<nipar>
Books give a very thorough explanation indeed, but viewing a movie of the same section that im currently on in the book provides an additional means of visual learning, and a second explanation (point of view) of the current parts im learning
quest88 has quit [Quit: quest88]
ebouchut has quit [Quit: This computer has gone to sleep]
kalleth has quit [Remote host closed the connection]
kalleth has joined #ruby
havenn has quit [Remote host closed the connection]
miskander has joined #ruby
gbchaosmaster has joined #ruby
kalleth has quit [Remote host closed the connection]
kalleth has joined #ruby
browndawg has left #ruby [#ruby]
<shevy>
book forces you to do more things on your own though
<shevy>
I even wrote ruby programs on paper at one point
<shevy>
at least conceptually
<burgestrand>
syntax coloring becomes much more interesting that way
<davidcelis>
syntax coloring is a crutch
<gbchaosmaster>
A crutch, but so few reasons not to use it.
ikaros has joined #ruby
<waxjar>
syntax colouring makes everything so much easier
tommyvyo_ has quit [Quit: Computer has gone to sleep.]
timonv has quit [Remote host closed the connection]
rakunHo has joined #ruby
p2w has quit [Ping timeout: 250 seconds]
browndawg has joined #ruby
lolcathost has joined #ruby
jenrzzz_ has quit [Quit: leaving]
<davidcelis>
i never highlight my syntaxes
<davidcelis>
i dont need that handicap shit
kirun has quit [Ping timeout: 250 seconds]
jenrzzz_ has joined #ruby
<Godd2>
davidcelis: It's not a matter of necessity
<gbchaosmaster>
Godd2: +1
<davidcelis>
im not really being serious guys
<davidcelis>
that would be like saying i dont cook my food
<canton7>
this is why we have the sarcasm tag
crackfu has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
vlad_starkov has quit [Remote host closed the connection]
<apeiros_>
which is of course the first line 14 of pry
<apeiros_>
and line 29 reports (pry):19, which is of course the second line of line 14 of pry
<banisterfiend>
thx
mpereira has quit [Ping timeout: 244 seconds]
SCommette has quit [Quit: SCommette]
<banisterfiend>
apeiros_: there is no real correlation between expression number (which is what pry shows in []) and line number, which pry doesn't show by default
<ryanf>
apeiros_: the number in the prompt isn't actually a line number, it's an expression number
<ryanf>
banisterfiend: hi
<banisterfiend>
apeiros_: you can customise your prompt to show the actual line number though
<banisterfiend>
ryanf: yo
<apeiros_>
banisterfiend: will do that. I think expression number is a bad idea then. that will confuse people even more.
<banisterfiend>
apeiros_: we stole that from python, which also shows expression number rather than line number
<banisterfiend>
ipython*
chussenot has joined #ruby
<apeiros_>
so they get useless backtraces too, lovely :-p
<ryanf>
you can do stuff like edit -i 14 to open the whole expression in your editor
<ryanf>
doing something like that by line would be pretty useless
<apeiros_>
ryanf: not the point.
Slivka has joined #ruby
Slivka has quit [Read error: Connection reset by peer]
<apeiros_>
ryanf: yes, but showing expression numbers makes backtraces useless.
rjmt___ has quit [Ping timeout: 264 seconds]
Slivka has joined #ruby
<ryanf>
yes, although you can use cat --ex to see the context of any given backtrace line
<ryanf>
including the (pry) ones
<ryanf>
I agree that it isn't ideal, but I don't think showing all of the line numbers would be a better tradeoff
<banisterfiend>
apeiros_: well i don't usually find backtraces that point to pry code that useful, as stuff defined inside pry (rather than in .rb field) is usually relatively trivial code and it's typically obvious what the cause of the error was
<ryanf>
maybe exposing a way to see your recent pry history with the line numbers would be beneficial
cableray has joined #ruby
<banisterfiend>
apeiros_: but if i really wanna know, i use cat --ex
<banisterfiend>
i typically use cat --ex rather than wtf? in most case anyway
<banisterfiend>
though sometimes i use wtf? first just to find which level of the backtrace i want to cat --ex on
SCommette has joined #ruby
<banisterfiend>
apeiros_: personally, (since if use play -i, gist -i, edit -i a lot) i find expression numbers much more useful that line numbers, so if i had to choose one i'd choose expression numbers, but maybe we should make that clearer in documentation and explain how to change it back to line numbers for ppl who prefer that
<banisterfiend>
since i*
<banisterfiend>
apeiros_: let me show ou some uses of expression numbers brb
slainer68 has joined #ruby
Mon_Ouie has joined #ruby
mercwithamouth has quit [Ping timeout: 255 seconds]
Slivka has quit [Read error: Connection reset by peer]
robinbowes has quit [Quit: Changing server]
Slivka has joined #ruby
joeycarmello has quit [Remote host closed the connection]
miskander has quit [Quit: miskander]
jxriddle has quit [Quit: jxriddle]
robinbowes has joined #ruby
DaZ has quit [Ping timeout: 272 seconds]
burgestrand1 has joined #ruby
[JellyBean] has joined #ruby
nomenkun has joined #ruby
<iamjarvo>
when reading about a subject do you guys take notes? how do you go about trying to remember key points about the topic?
burgestrand has quit [Ping timeout: 265 seconds]
<waxjar>
i like to use those bright markers
<iamjarvo>
im basically looking for some workflows for how you guys learn
jenrzzz has quit [Quit: Lost terminal]
<RubyPanther>
iamjarvo: I try to connect _concepts_ to things I am already familiar with, and where to look up facts and details. Then anything I've looked up more than once while working on a project, I write on a whiteboard.
mike-- has quit [Ping timeout: 265 seconds]
techhelp has joined #ruby
<RubyPanther>
key points are worthless IMO unless they connect to your existing knowledge. For me it is a lot more effective to re-read about a related subject first, so it connects properly, than to take notes that I would have to remember to consult, and I would have to have memorized in order to know when to consult them
<waxjar>
taking notes in full sentences forces you to properly understand things tho, i sometimes try to make concise summaries of the stuff I'm reviewing
<RubyPanther>
Then again I also "studied" for exams in college by reading the chapter reviews on the bus to the test, so any academic could tell you I am an awful source for learning process information
mpereira has joined #ruby
ltsstar has quit [Quit: ltsstar]
thams has quit [Read error: Connection reset by peer]
thams has joined #ruby
nat2610 has joined #ruby
<iamjarvo>
maybe notes should be looked at more as write it down to understand it but not as reference
nat2610 has quit [Client Quit]
deepeederd has quit [Ping timeout: 276 seconds]
main has joined #ruby
[JellyBean] has joined #ruby
[JellyBean] has quit [Excess Flood]
DaZ has quit [Ping timeout: 250 seconds]
nemesit has quit [Ping timeout: 244 seconds]
foohey has quit [Remote host closed the connection]
[JellyBean] has joined #ruby
foohey has joined #ruby
sepp2k1 has joined #ruby
ddd has quit [Quit: Leaving.]
sepp2k has quit [Ping timeout: 264 seconds]
gordon1775 has quit [Ping timeout: 265 seconds]
ddd has joined #ruby
DaZ has joined #ruby
apok has quit [Quit: apok]
generalissimo has joined #ruby
jimeh has joined #ruby
hackerdude has quit [Remote host closed the connection]
lolcathost has quit [Ping timeout: 246 seconds]
razibog has quit [Ping timeout: 272 seconds]
headius has quit [Quit: headius]
[Neurotic] has joined #ruby
[Cupcakes] has joined #ruby
robotmay has quit [Remote host closed the connection]
tyfighter has joined #ruby
aharris6 has joined #ruby
nat2610 has joined #ruby
DatumDrop has joined #ruby
headius has joined #ruby
DaZ has quit [Ping timeout: 255 seconds]
headius has quit [Client Quit]
bradyl0ve has joined #ruby
tomsthumb has quit [Read error: Connection reset by peer]
main has quit [Quit: Leaving]
tommyvyo_ has joined #ruby
main has joined #ruby
DaZ has joined #ruby
jkl1337 has joined #ruby
lurch_ has joined #ruby
tjbiddle has joined #ruby
atmosx has joined #ruby
nat2610 has quit [Quit: Leaving.]
banisterfiend has quit [Remote host closed the connection]
miskander has joined #ruby
banisterfiend has joined #ruby
nemesit has joined #ruby
<atmosx>
Greetings
Nisstyre has quit [Quit: Leaving]
aetcore has quit [Remote host closed the connection]
danneu has joined #ruby
nfx has joined #ruby
deepeederd has joined #ruby
DatumDrop has quit [Ping timeout: 244 seconds]
cek has joined #ruby
<cek>
hi. I want [1, [2,3]].each {|a,b,c| puts a,b,c }.
<cek>
|a, *(b, c)| didn't work.
<banisterfiend>
cek: #each doesn't work like that
mitc0185 has quit [Read error: Connection reset by peer]
mengu has quit [Quit: Konversation terminated!]
<banisterfiend>
cek: ot
mitc0185 has joined #ruby
sjhuang has quit [Ping timeout: 252 seconds]
<banisterfiend>
cek: looks like u just want to do this: a, (b, c) = [1, [2, 3]]
rakunHo has quit [Read error: Connection reset by peer]
syamajala has quit [Remote host closed the connection]
<maetthew>
well perhaps i am a child?
hoelzro|away is now known as hoelzro
Russell^^ has quit [Quit: Russell^^]
<atmosx>
is this the gaming platform?
<maetthew>
yes
joeycarmello has joined #ruby
<RubyPanther>
Ruby helps programmers release their inner child
<maetthew>
^^
<RubyPanther>
If you don't believe me, you probably haven't even made it through Dwemthy's Array yet.
<atmosx>
is there any to put input using 'gets' on a rake task?
<atmosx>
any *way*
jxriddle has quit [Ping timeout: 265 seconds]
<atmosx>
I'm using octopress for blogging and I've configured it to open vim automatically at the proper line once the blog post (simple md file) is created. But I need to fill the tags/categories before, otherwise I have to do an up/down using vim which is annoying
<cek>
how do you get first block return value that's not false or nil from enum list?
xAndy is now known as xandy
techhelp2 has joined #ruby
rondale_sc has quit [Quit: rondale_sc]
mitc0185 has quit [Quit: leaving]
techhelp has quit [Read error: Operation timed out]
lolcathost has joined #ruby
deepeederd has quit []
banisterfiend has quit [Remote host closed the connection]
jrajav has quit [Quit: I tend to be neutral about apples]
S1kx has quit [Remote host closed the connection]
S1kx has joined #ruby
banisterfiend has joined #ruby
maletor has joined #ruby
Monie has joined #ruby
nmabry has joined #ruby
nmabry has left #ruby [#ruby]
My_Hearing has joined #ruby
My_Hearing has joined #ruby
bjensen has quit [Quit: bjensen]
nmabry has joined #ruby
AndChat| has quit [Ping timeout: 272 seconds]
Mon_Ouie has quit [Ping timeout: 272 seconds]
banisterfiend has quit [Ping timeout: 255 seconds]
Jasko has quit [Read error: Connection reset by peer]
Jasko has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]