<ravster>
hey all, I'm using the geocoder gem, and I'd like my script to capture whether I'm getting a timeout or an 'over query limit'. How do I do that? I can't seem to find the parts of the api that describe that.
<bricker>
What's a better pattern for something like this? https://gist.github.com/bricker/6016428 I don't like setting the variable at the top there, it feels messy to me. This is just in a module class method so instance variables don't make sense here.
GeissT has joined #ruby
narcan has joined #ruby
Roa has joined #ruby
Roa has quit [Changing host]
Roa has joined #ruby
ssvo has quit [Ping timeout: 246 seconds]
lnormous has quit [Read error: Connection reset by peer]
cj3kim has quit [Remote host closed the connection]
<matchaw_>
hey all, wondering if someone can help me with something.
ckrailo has joined #ruby
<matchaw_>
"a".split("-")[1].split("_")
<matchaw_>
How would you make something like that not return an error, because I am calling it dynamically, so somethings the string will be correct, sometimes it wont..
<matchaw_>
Actually, I think I got it.. Just check if [1] is null first..
<qiyong>
how do i read the output of another program?
<bnagy>
either `ls` or popen
<bnagy>
or system or...
splittingred has joined #ruby
blarghmatey_ has joined #ruby
cj3kim has joined #ruby
lebek has quit [Ping timeout: 256 seconds]
robbyoconnor has joined #ruby
aeontech has joined #ruby
BillCriswell has quit [Remote host closed the connection]
prezJFK has quit [Remote host closed the connection]
deadalus has quit [Excess Flood]
cj3kim has quit [Ping timeout: 240 seconds]
deadalus has joined #ruby
gyre007 has joined #ruby
nari has quit [Ping timeout: 264 seconds]
tylersmith has joined #ruby
lindenle has joined #ruby
kenneth has quit [Ping timeout: 276 seconds]
xavier23 has joined #ruby
djbkd_ has quit [Remote host closed the connection]
<xavier23>
Hey….. u guys think ruby can ever replace java?
pen has quit [Remote host closed the connection]
gyre007 has quit [Ping timeout: 256 seconds]
theo_ has quit [Ping timeout: 250 seconds]
burlyscudd has joined #ruby
marcdel has joined #ruby
<bnagy>
in theory, why not, in practice hahahah no
JZTech101 has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC]
sambao21 has quit [Quit: Computer has gone to sleep.]
<havenwood>
I hereby declare Java deprecated in favor of JRuby. There, done.
DanKnox_away is now known as DanKnox
kofno has joined #ruby
nettoweb has quit [Quit: nettoweb]
mercwithamouth has quit [Ping timeout: 240 seconds]
robscomputer has joined #ruby
Ripp__ has quit [Quit: This computer has gone to sleep]
robscomputer has quit [Remote host closed the connection]
robscomputer has joined #ruby
fomatin has quit [Quit: Computer has gone to sleep.]
lebek has joined #ruby
rodacato has joined #ruby
machuga|away is now known as machuga
Kruppe has joined #ruby
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kelet has quit [Read error: Connection reset by peer]
smathieu has quit [Remote host closed the connection]
rahult has joined #ruby
echevemaster has joined #ruby
echevemaster has joined #ruby
echevemaster has quit [Changing host]
viszu has quit [Quit: Leaving.]
smathieu has joined #ruby
TonyMergue has quit [Read error: Connection reset by peer]
superscott[8] has quit [Quit: superscott[8]]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
ffranz has quit [Ping timeout: 256 seconds]
burlyscudd has quit [Ping timeout: 268 seconds]
rien has joined #ruby
zeromodulus has quit [Remote host closed the connection]
mansi has joined #ruby
Domon has joined #ruby
smathieu has quit [Ping timeout: 240 seconds]
slyv has joined #ruby
slyv has quit [Max SendQ exceeded]
<xavier23>
Well it seems to have all the features of java..
<xavier23>
If not more
bionoid has joined #ruby
<xavier23>
Also….. man, it is sooo much more pleasant to use ruby
<xavier23>
Hehe
sambao21 has joined #ruby
<rien>
how do I parse a date in ruby 2.0.0?
<rien>
it's not Date.parse, not Date.strptime....
<bnagy>
it doesn't have all the features of the JVM though
zaltekk has joined #ruby
<xavier23>
garbage collection?
<bnagy>
it's a considerably more pleasant language, but MRI compared to JVM is like .. um..
bradhe has joined #ruby
<zaltekk>
is the pickaxe(new edition) the recommended ruby book?
<blandflakes>
the pickaxe book is pretty good
<bnagy>
rien: try require 'date'
<blandflakes>
i've read through it a couple times
<bnagy>
it's a stupid gotcha imho
<havenwood>
xavier23: Ruby's has one GC, not many like the JVM and several orders of magnitude less time put into the GC. But if the JVM is what you're into, JRuby is a first class citizen or if you need absolute native performance there is mirah.
<rien>
but what I mean is there solutions in that SO article don't work either
<bnagy>
it thinks you're asking for 5th of Octodecatober
<havenwood>
earth calendar?
<rien>
bnagy: like I said, I understand they removed support for american dates, but I can't call Date.strptime either, as the SO article I linked suggests.
<bnagy>
havenwood: tell me about mirah! Have you used it?
asteve has joined #ruby
<Lewix>
why would we use to_a on an array
DanKnox has quit [Read error: Connection reset by peer]
<bnagy>
Lewix: only in cases where we weren't sure if it would actually be an array
<blandflakes>
to_a exists for an array because it's part of enumerable
<bnagy>
like maybe it could be a Set
Spami__ has quit [Quit: This computer has gone to sleep]
<havenwood>
bnagy: I've never used it for anything real, just played with it. Just `gem install mirah` from JRuby.
<bnagy>
is it hobby time or does it have legs?
buzzybron has quit [Ping timeout: 240 seconds]
<havenwood>
bnagy: It used to be called "Duby" before "Mirah".
Yakko has joined #ruby
<bnagy>
is there a tl;dr benchmark of some jruby code vs mirah code?
jcarouth` is now known as jcarouth
DanKnox_away has joined #ruby
bklane has joined #ruby
<Lewix>
bnagy: I saw foo.to_a.sum {||item| item.total_price|} knowing that foo is an array. I was wondering what sum is, and most importantly why to_a on an array
vikhyat has joined #ruby
<havenwood>
bnagy: Actually, i've seen it benched against Java (against which it does well) but not against Ruby.
kevinykchan has joined #ruby
DanKnox_away is now known as DanKnox
<blandflakes>
if i want performance in ruby i just write it in C, compile it, and then do system("./a.out")
<bnagy>
blandflakes: good for you, princess
<bnagy>
Lewix: I have NFI what sum is, it could be activesupport or similar evil doing monkeypatching
osvico has quit [Ping timeout: 240 seconds]
wesside has joined #ruby
v1n has quit [Ping timeout: 276 seconds]
djbkd has joined #ruby
__eka__ has quit [Quit: Computer has gone to sleep.]
<Lewix>
bnagy: ya me neither, i'll stick with my inject
<bnagy>
havenwood: yeah I'm just wondering how much the jruby layer costs, especially for stuff that will get bytecode translated (heavy code paths)
bionoid has quit [Remote host closed the connection]
sevenseacat has joined #ruby
<bnagy>
I'll ask one day on #jruby if there's people about :P
niklasb has quit [Ping timeout: 245 seconds]
nari has quit [Ping timeout: 245 seconds]
wmoxam has joined #ruby
Michael_ has quit [Remote host closed the connection]
Michael_ has joined #ruby
<mantas322_>
okay thanks for the suggestions
mantas322_ has quit [Quit: Page closed]
cj3kim has joined #ruby
rockets has joined #ruby
<havenwood>
bnagy: They've really pushed hard for performance with JRuby, using invoke dynamic and other cool stuff.
rockets is now known as zastern_
zastern has quit [Disconnected by services]
zastern_ is now known as zastern
Hare has joined #ruby
<bnagy>
yeah I moved everything over a year ago <3
rodacato has quit [Remote host closed the connection]
<havenwood>
blandflakes: MagLev is super fast single threaded, yeah. I can't wait till 1.9 and 2.0 support comes out!
nari has joined #ruby
<Hare>
Ive got a timer that throws an error once in a while, can someone recommend a fix http://pastebin.com/NF7kN8mR
radic_ has joined #ruby
<havenwood>
Looked like MagLev 1.9 branch was working with Sinatra but not yet Rails. Topaz seems to be coming along briskly as well.
<blandflakes>
Hare, if your time_block ever takes more than 8 seconds you'll have a negative value for sleep
mljsimone|away is now known as mljsimone
mmitchell has quit [Remote host closed the connection]
<Hare>
ah ok, is there a way to work around that.. to allow the time block to exceed 8 seconds if necessary.. or do I just need to increase the repeat interval
sleetdrop has joined #ruby
<blandflakes>
you could take the maximum of 0 and the return value
robustus has quit [Ping timeout: 248 seconds]
<blandflakes>
it depends on what you want to do in that case
Nisstyre has quit [Quit: Leaving]
saarinen has joined #ruby
djbkd has quit [Quit: Leaving]
radic has quit [Ping timeout: 248 seconds]
<blandflakes>
if you want to check mail every 8 seconds or so or whenever the previous check is done, whichever takes longer, you could do sleep([0, seconds - time_block {yield}].max)
<blandflakes>
though there are probably better ways to do that that aren't so spaghetti-code like
ner0x has joined #ruby
robustus has joined #ruby
fridim_ has quit [Read error: Operation timed out]
<Hare>
ok, Ill try that out. thanks
<blandflakes>
though Thread.sleep(-1) would be impressive =p
<blandflakes>
good luck
DanKnox is now known as DanKnox_away
Ripp__ has joined #ruby
<Hare>
Im used to using the lua corona timer.performOnDelay.. really simple to use
<Yakko>
hey guys, can I get some rails love in here? what is a better way to ensure a belongs_to association tries to find a row or returns a new instance instead of nil? something life def address; @address || build_address; end;
<havenwood>
Yakko: Best place to ask is prolly #RubyOnRails.
bionoid has quit [Remote host closed the connection]
Mattix has joined #ruby
<havenwood>
timers.every(5) { check_mail }
tommyvyo has quit [Quit:]
TheTFEF is now known as Nightmare
<havenwood>
s/5/8
luluapple has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
allanm_ has quit [Read error: Connection reset by peer]
Guest86359 has quit [Excess Flood]
tylersmith has quit [Remote host closed the connection]
allanm_ has joined #ruby
takezawa has quit [Ping timeout: 256 seconds]
stack_push has joined #ruby
luluapple has quit [Client Quit]
v1n has joined #ruby
cdelo has quit [Read error: Connection reset by peer]
cdelo_ has quit [Read error: Connection reset by peer]
devoldmx3 has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
ShapeShifter499 has quit [Ping timeout: 240 seconds]
devoldmx has joined #ruby
kofno has quit [Remote host closed the connection]
luluapple has joined #ruby
aces1up has joined #ruby
<aces1up>
hello, i'm looking to test some code by patching a module in a gem, the problem is the function i want to hook / patch, i can't quite figure out the class / module hierchy to properly hook it, in the original function is there some code i add for some sort of reflection to see how i need to hook it?
ShapeShifter499 has joined #ruby
wallerdev has quit [Quit: wallerdev]
Fire-Dragon-DoL has quit [Quit: Leaving.]
devoldmx3 has quit [Ping timeout: 246 seconds]
<havenwood>
aces1up: I really find Pry helpful for exploring around a gem. Link to the method you're trying to call?
burlyscudd has joined #ruby
aarkerio has joined #ruby
LucidDreamZzZ has joined #ruby
hakunin has joined #ruby
aeontech has quit [Quit: aeontech]
mary5030 has quit [Remote host closed the connection]
krainboltgreene has quit [Ping timeout: 240 seconds]
nettoweb has joined #ruby
jalcine- has joined #ruby
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
jalcine- has joined #ruby
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
burlyscudd has quit [Ping timeout: 246 seconds]
<havenwood>
appears you're reopening the method correctly
<xavier23>
anyone here ever find ruby gems a little slow?
<aces1up>
yeh dunno.. maybe its included in a class somewhere else, but yeh thats why i needed the reflection.. without using pry is there any other object. methods i could try to get the hierchy.
<havenwood>
aces1up: Is just modifying the gem an option?
<aces1up>
not really.
Hanmac2 has quit [Ping timeout: 240 seconds]
<aces1up>
it will break other stuff.
mansi has quit [Remote host closed the connection]
<aces1up>
i don't know what all uses it in some other apps.
<havenwood>
lilys1: How can you reproduce it looping?
<aces1up>
so need to patch it JUST in a single app.
mansi has joined #ruby
<aces1up>
I suppose i could make it work, but really don't like that idea..
<havenwood>
lilys1: Play a game against AI and do a particular move?
tkuchiki has quit [Ping timeout: 268 seconds]
<lilys1>
havenwood: after the 5th move, there are times where it keeps repeating "That move was invalid as someone has already moved there. Please enter a valid move" and it keeps on going till stack is too deep
<lilys1>
im wondering if i did my each loop incorrectly
jalcine- has joined #ruby
<lilys1>
i've been looking at it all day. its so weird :(
tomzx_mac_ has joined #ruby
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
mansi has quit [Ping timeout: 264 seconds]
ntus1017 has joined #ruby
blarghmatey_ has quit [Ping timeout: 264 seconds]
tomzx_mac has quit [Ping timeout: 240 seconds]
mljsimone is now known as mljsimone|away
adeponte has joined #ruby
niftylettuce has joined #ruby
<bnagy>
lilys1: try refactoring all the horrible repeated code
scrollback has quit [Remote host closed the connection]
<bnagy>
you'll probably end up fixing the bug by accident
lebek has quit [Ping timeout: 245 seconds]
renderful has quit [Remote host closed the connection]
<lilys1>
bnagy: im a noob at ruby. just started learning a month ago. I am wondering if somehow my methods using "inject" are throwing it off
alvaro_o has quit [Quit: Ex-Chat]
Levin_22 has quit [Quit: Levin_22]
roboguy_ has quit [Remote host closed the connection]
tkuchiki has joined #ruby
mrommelf has joined #ruby
jkline has quit [Quit: jkline]
tommyvyo has joined #ruby
alainus has left #ruby ["Leaving"]
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
<bnagy>
who knows
<havenwood>
lilys1: Haven't found what's causing it yet. Hrm.
arya_ has quit []
vikhyat has joined #ruby
arya_ has joined #ruby
jalcine- has joined #ruby
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
fredjean has quit [Quit: Computer has gone to sleep.]
jalcine- has joined #ruby
tobyo has quit [Read error: Operation timed out]
jalcine- has quit [Excess Flood]
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
<lilys1>
havenwood: thanks for trying
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
kofno has joined #ruby
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
<lilys1>
havenwood: I think i may just submit my project as is, as the deadline is midnight and I have been working on this all day already
kofno has quit [Remote host closed the connection]
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
mrommelf has left #ruby ["Leaving..."]
jarray52 has joined #ruby
kofno has joined #ruby
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
renderful has joined #ruby
sayan has joined #ruby
rickruby has joined #ruby
<jarray52>
In terms of style, is it better to use .map or .collect in Ruby? If I am not mistaken, both do exactly the same thing.
lindenle has quit [Quit: This computer has gone to sleep]
arya_ has quit [Ping timeout: 245 seconds]
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
<jarray52>
Perhaps it is better to ask in which situations should one use map, and in which situations should one use collect.
<bnagy>
jarray52: map is more common
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
<havenwood>
+1 map
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
<havenwood>
lilys1: Yeah, I'm stumped at the moment.
<lilys1>
+1 maps
vikhyat has quit [Ping timeout: 256 seconds]
<bnagy>
jarray52: annoyingly, inject is also way more common than reduce, which is the 'standard' term
<bnagy>
go figure
<havenwood>
i do like #find and #find_all and it seems #detect and #select are more popular
<bnagy>
I hate collect though, it's the one that sounds least like what it does
<bnagy>
lilys1: I would start by not calculating the player in your ai strategy methods, like it can only ever be the CPU making those moves
<bnagy>
at least you can add some validation, then
<jarray52>
bnagy: Thanks.
saarinen has quit [Quit: saarinen]
<bnagy>
lilys1: and I don't think you want each for those ai strategies
<bnagy>
well.. you can but your break logic is icky
<bnagy>
you could use find or something and just get the first match, and then play it
<lilys1>
hmm whats another way I can do it so it goes through every possible winning combinations scenario?
jonahR has joined #ruby
<bnagy>
like you just play the first move that matches the strategy, right?
<lilys1>
hmmm find
<lilys1>
yea
<lilys1>
exactly
<bnagy>
but I am having a hard time not just saying tear the whole thing down :(
mmitchell has quit [Ping timeout: 246 seconds]
vikhyat has joined #ruby
<bnagy>
if you could easily get an anti-diagonal with Matrix I'd just say move to that and do it all with arithmetic on row / column sums :P
<bnagy>
but not useful I know
tommyvyo has quit [Quit:]
akurilin has joined #ruby
<bnagy>
the next refactoring tip I would have is to have your strategy methods just return a proposed move, and a different method execute that move
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
<bnagy>
so on the cpu turn it would be like if (move = instant_win); play move; elsif (move=block_dude) ...
<akurilin>
Quick question. How do I pick a ruby template engine? There are so many and they all seem pretty decent.. Is there some dimension I could compare them on?
<sevenseacat>
akurilin: try them, see which you like best?
<lilys1>
thanks for the tips bnagy i will try to implement them right now starting with find
<Kelet>
If I remember correctly, HAML was pretty slow compared to erb and Slim
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
<sevenseacat>
its slow, but i think its the best.
farus has joined #ruby
<Kelet>
I just use erb because I often 'contract out' the frontend designs to friends of mine, and they know HTML and how to use Javascript with it.
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
<Kelet>
I would probably use Slim otherwise, it's fast and looks pretty good.
tylersmith has joined #ruby
<farus>
what is the best way to set up my requires so that I can run a ruby program without being in the top level code directory?
<bnagy>
farus: turn it into a gem, or use require_relative
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
krisfremen-home has joined #ruby
<akurilin>
Ok thanks for the tips!
michaeldeol has quit [Remote host closed the connection]
<farus>
In my case my configuration stuff lives in config/config.rb my main ruby file is in src/main.rb and my libraries are in lib
smathieu_ has joined #ruby
<farus>
Still I keep having problems getting the darn thing to play nice unless I'm right at the top level
tylersmith has quit [Ping timeout: 240 seconds]
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
<farus>
require relative seems to try and place everything in src when I look at the exceptions when I do try that
dhruvasagar has quit [Ping timeout: 246 seconds]
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
takezawa has joined #ruby
cha1tanya_ has joined #ruby
<farus>
it is vexing to no end that I'm having a harder time deploying my code than I have had writing it.
jalcine- has joined #ruby
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
<bnagy>
farus: did you use require_relative or turn your code into a gem?
sethetter has joined #ruby
smathieu_ has quit [Ping timeout: 246 seconds]
cha1tanya_ is now known as cha1tanya
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
<Kelet>
farus, You can access a previous directory using something like require_relative '../lib/file' afaik
haxrbyte has joined #ruby
<Kelet>
../ meaning parent directory
jalcine- has joined #ruby
eldariof has joined #ruby
splittingred has quit [Quit: splittingred]
ananthakumaran has joined #ruby
<gchristensen>
farus: of all the things I've deployed, every single ruby thing I've ever deployed is like pulling teeth.
ner0x has quit [Quit: Leaving]
Es0teric has quit [Quit: Computer has gone to sleep.]
Hanmac2 has joined #ruby
<[narcan]>
trying to run bundle and i get this Gemfile:10: syntax error, unexpected ':', expecting $end
<[narcan]>
ugh, 1.8.7 it seems. that shouldnt be right
kofno has quit [Remote host closed the connection]
<[narcan]>
probably explains it
<vikhyat>
[narcan]: `gem "resque", '~> 2.0.0.pre.1', :github => 'resque/resque'` would work on 1.8.7 I imagine.
krz has joined #ruby
mrommelf has joined #ruby
vlad_starkov has joined #ruby
lilys1 has quit []
<[narcan]>
ok thanks
wmoxam has quit [Ping timeout: 245 seconds]
haxrbyte has quit [Remote host closed the connection]
<[narcan]>
was setting up on a fresh EC2 instance
<[narcan]>
for some reason assumed it would be ruby 1.9
Hanmac2 has quit [Ping timeout: 240 seconds]
renderful has quit [Remote host closed the connection]
<havenwood>
[narcan]: Or 2.0!
rodacato has joined #ruby
<[narcan]>
well i always expect at least 1 back from the current stable
<havenwood>
[narcan]: Fedora 19, OS X 10.9, Arch, etc are on 2.0.
<[narcan]>
as ya never lucky enough to get the latest heh
<havenwood>
[narcan]: You on Debian?
<[narcan]>
this is AWS's linux distro
<havenwood>
aha
<[narcan]>
based on redhat i think
<havenwood>
yeah, i've never used the amazon box
<[narcan]>
yeah first time here too
<havenwood>
yup, says based on RHEL
vlad_starkov has quit [Ping timeout: 240 seconds]
<bnagy>
the OS that time forgot
<[narcan]>
figured it made sense to use on their platform for support etc
<gchristensen>
[narcan]: they have equally great support on all their images
<gchristensen>
"go with what you know" and all.
<[narcan]>
and also that i'm using the elastic beanstalk on the app itself
Drago has joined #ruby
<[narcan]>
this is just a resque job machine i'm setting up
<[narcan]>
so kinda made sense to try and stick with the one flavour, as dont think you get a choice on the elastic beanstalk
haxrbyte has joined #ruby
<[narcan]>
yeah so there's a ruby 1.9 package available so i can just use that
ner0x has joined #ruby
ner0x has quit [Remote host closed the connection]
TIJ has quit [Ping timeout: 240 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
mrommelf has quit [Remote host closed the connection]
ntus1017 has quit [Remote host closed the connection]
<[narcan]>
though i'm surprised no one suggested for me to use rvm ?
anay has joined #ruby
<[narcan]>
though for whatever reason i tend to like to use what the system has as it just removes a level of dependancy
gsvolt_ has quit [Read error: Connection reset by peer]
iliketurtles has quit [Ping timeout: 256 seconds]
mansi has joined #ruby
<gchristensen>
I've never liked using rvm / rbenv in production. but also, that just swaps the dependency. depending on the system to offer something reasonable, vs. depending on a tool to provide a reasonable system.
Guest43006 has quit [Remote host closed the connection]
<havenwood>
[narcan]: ruby-install/chruby is my poison of choice
<[narcan]>
yeah that's true, though i guess it's because i'm already forced to use the system's tool for everything else
Columcille has joined #ruby
<[narcan]>
well i'm not 'forced', but just because it's far more convenient that building the system from source etc
<sevenseacat>
i use chruby, and ruby-build atm... one day i'll switch to ruby-install because i like how postmodern works
nettoweb_ has joined #ruby
nettoweb has quit [Ping timeout: 246 seconds]
nettoweb_ is now known as nettoweb
iliketurtles has joined #ruby
<[narcan]>
ugh there's always something though, now mysql2 is erroring out when buliding
<[narcan]>
./client.h:16:1: error: static declaration of ‘rb_thread_blocking_region’ follows non-static declaration
Columcil1e has quit [Ping timeout: 245 seconds]
mansi has quit [Ping timeout: 268 seconds]
renderful has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
tatsuya_o has joined #ruby
nomenkun has joined #ruby
RichardBaker has joined #ruby
<Drago>
U recommend this book: Beginning_Ruby_From_Novice_to_Professional_2nd_Edition__2009,Apress ?
<Drago>
to learn Ruby from 0
<[narcan]>
is there a way of skipping a gem file to be installed by bundler if say mysql isnt installed on the system ?
<havenwood>
Drago: Haven't heard of that one.
<sevenseacat>
2009? no.
<Drago>
yep 2009
<havenwood>
sevenseacat: good point
<havenwood>
Drago: Yeah, you MUST get something that covers 1.9.2+
serp` has joined #ruby
<sevenseacat>
yep
andrew has joined #ruby
nettoweb has quit [Read error: Connection reset by peer]
rahult has quit [Ping timeout: 240 seconds]
anay_ has joined #ruby
<Drago>
ok
andrew is now known as Guest70704
<[narcan]>
basically i want to share the Gemfile between these systems, but now mysql2 looks like it's not going to build reckon i'll just try and skip it cause i dont need mysql on this machine anyway
<Drago>
any suggestion
<havenwood>
Drago: 1.8 is deprecated. Very easy to go from 1.9 to 2.0, but might as well start at 2.0. :)
tatsuya_o has quit [Ping timeout: 245 seconds]
* sevenseacat
looks at apps still running on ree
zastern has quit [Remote host closed the connection]
<sevenseacat>
:(
<havenwood>
sevenseacat: eek! hehe
haxrbyte_ has joined #ruby
zastern has joined #ruby
adeponte has quit [Remote host closed the connection]
anay has quit [Ping timeout: 256 seconds]
<Drago>
havenwood: any book u recommend ?
<[narcan]>
skipping that question then, anyone know a recommened way to run resque as a daemon ? seems there's no suggested route...
<havenwood>
Drago: The PickAxe is often recommended (I haven't read it, but mean to). Latest Pickaxe is 4th edition and covers both 1.9/2.0.
rahult has joined #ruby
<farus>
bnagy: no joy on require_relative
<havenwood>
[narcan]: Hrm, I've never used resque. Would running it with God make sense? Maybe the daemonize gem?
<farus>
as soon as I move out of the toplevel directory with the code things blow up.
<[narcan]>
yeah not sure, havent used god
Deele has joined #ruby
anay_ has quit [Ping timeout: 268 seconds]
<[narcan]>
is that the better choice for keeping things running ?
<havenwood>
Drago: I really liked 'The Ruby Programming Language'.
haxrbyte has quit [Ping timeout: 240 seconds]
<havenwood>
Drago: Still slogging through the harder final chapters.
<Drago>
by Matz ?
<Drago>
last edition
<havenwood>
yup
<havenwood>
Drago: It is dense, but great.
<havenwood>
Drago: Ever done programming in any other languages? Or coming to it fresh?
<havenwood>
Drago: Another I hear recommended a lot for newbies is Learn to Program by Chris Pine. Second edition covers Ruby 2.0.
<havenwood>
I haven't read that one either but would like to.
<havenwood>
Jesse Storimer and Avdi Grimm books on Ruby are great.
<Drago>
I was starting with that (by Matz), but I think is for Advanced users maybe
<havenwood>
Drago: yup
djbkd has joined #ruby
<havenwood>
Drago: It is fairly dense. Presumes knowledge.
bklane has quit [Remote host closed the connection]
<havenwood>
Learn to Program would probably be the most introductory, then Pickaxe *may* start introductory but seems to contain a ton of info about the standard library.
<havenwood>
Anyone read Pickaxe lately?
haxrbyte_ has quit [Remote host closed the connection]
<farus>
picaxe is a nice reference
<Kelet>
Although it is not comprehensive at all, and maybe 25% of the content isn't about programming at all, I really enjoyed _why's poignant guide
<havenwood>
I'd like to get the pickaxe just as a reference, yeah,
<havenwood>
Kelet: Yeah, have you checked out the soundtrack he made to go along with the guide?
<Drago>
how u do that, chat with my nickname prefix the line ?
<havenwood>
Kelet: I like a couple of the songs!
<farus>
I only use ruby off and on but picaxe is still very helpful since I'm always forgetting the basics
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Kelet>
havenwood, Nope, I haven't, but now I will
<havenwood>
Kelet: "This book is made of Rabbits and Lemonade, and a French maid I dipped in marmolade!"
<farus>
its usually tab completed drago
<havenwood>
Drago: Yeah, I type "d" then hit tab.
<Kelet>
I honestly probably learned the most Ruby from http://www.ruby-doc.org/ - most methods have examples.
<Kelet>
Or just using ri.
<havenwood>
Or Pry.
ananthakumaran1 has joined #ruby
ananthakumaran has quit [Read error: No route to host]
<farus>
that reminds me I need to figure out why ri chokes on windows under jruby for me
<Kelet>
Hmm never heard of pry looks interesting
<Drago>
havenwood: cool, thx :))
<farus>
I miss emacs integration although ruby-doc.org is nice
<Kelet>
the rubyinstaller ruby does not come with ri docs, I know that for sure.
<Kelet>
They decided to distribute chm docs and not the ri ones :/
<havenwood>
Nice that zzak and others are filling in the docs more and more. 2.0 docs had some more filled in than 1.9 in a couple places I've run accross. Could still use more love though.
<farus>
pry is like what you get with clojure and nrepl or slime in emacs
<farus>
ie awesome
Niichan is now known as NIIKAAAAAAAAAAAN
NIIKAAAAAAAAAAAN is now known as Niichan
moshee- has quit [Ping timeout: 245 seconds]
<farus>
ive been meaning to try out the emacs minor mode for pry but keep being lazy
nomenkun has quit [Remote host closed the connection]
<havenwood>
farus: Ever tried Xiki with Emacs? I'd be curious to actually try that out.
<farus>
no I do remember coming across it though
<havenwood>
farus: yeah, i watched the RubyConf talk but don't use emacs and haven't had a chance to try it
Kruppe has quit [Remote host closed the connection]
sethetter has quit [Ping timeout: 240 seconds]
<havenwood>
farus: what is slime?
fredjean has joined #ruby
renderful has quit [Remote host closed the connection]
<farus>
i've just been pulled back to my primary application and found out that there is a mode that supports razor syntax finally
aeontech has joined #ruby
<havenwood>
heh, my browser shows i've read up on it before - but i have no memory
<farus>
superior lisp interaction mode for emacs
<havenwood>
ahhhh
aeontech has quit [Client Quit]
<havenwood>
right, yeah tons of neat features
Mars` has quit [Ping timeout: 276 seconds]
iliketurtles has quit [Quit: zzzzz…..]
adeponte has joined #ruby
stack_push has quit []
rodacato has quit [Remote host closed the connection]
<farus>
now if only Rosalin would get off the ground so that there was an official repl for c#
matrixis1 is now known as matrixise
Domon has quit [Remote host closed the connection]
moshee has joined #ruby
brennanMKE has quit [Remote host closed the connection]
felixjet_ has joined #ruby
rahult has joined #ruby
smathieu has joined #ruby
FUgaRU has quit [Ping timeout: 246 seconds]
i_s has joined #ruby
northelks has quit [Ping timeout: 246 seconds]
felixjet has quit [Ping timeout: 246 seconds]
camelo has left #ruby [#ruby]
goleldar has quit [Ping timeout: 246 seconds]
northelks has joined #ruby
goleldar has joined #ruby
Guest70704 has quit [Remote host closed the connection]
blz37 has quit [Read error: Connection reset by peer]
akurilin has joined #ruby
vikhyat has quit [Ping timeout: 246 seconds]
lkba has quit [Ping timeout: 276 seconds]
luckyruby has joined #ruby
lkba has joined #ruby
TTilus has quit [Ping timeout: 264 seconds]
rshetty has joined #ruby
TTilus has joined #ruby
Mattix has quit [Quit: Leaving]
lindenle has quit [Quit: This computer has gone to sleep]
mahmoudimus has joined #ruby
Mars` has joined #ruby
Drago has quit [Remote host closed the connection]
brennanMKE has joined #ruby
kenneth has joined #ruby
sleetdrop has joined #ruby
sarkis has quit [Ping timeout: 256 seconds]
_ffio_ has quit [Quit: WeeChat 0.4.1]
Mars1 has joined #ruby
pr0ggie has quit [Ping timeout: 240 seconds]
Al_ has joined #ruby
Mars` has quit [Ping timeout: 268 seconds]
ayaz has joined #ruby
antn has quit [Remote host closed the connection]
ayaz has quit [Client Quit]
ShapeShifter499 has quit [Ping timeout: 240 seconds]
vikhyat has joined #ruby
farus has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
caveat- has quit [Ping timeout: 264 seconds]
dmiller has joined #ruby
Godd2 has joined #ruby
ffio has joined #ruby
caveat- has joined #ruby
<Godd2>
when I type 'gem env' I get this: https://gist.github.com/nicklink483/6017895 . How do I add a path to the GEM PATHS ? Is there some file I can open and type it in?
<Godd2>
I want to add '/usr/lib64/ruby/gems/1.8' right below line 11
codecop has joined #ruby
ShapeShifter499 has joined #ruby
dmiller has quit [Ping timeout: 240 seconds]
<bnagy>
why?
<bnagy>
trying to mix and match a user dir install and a system install is just asking for pain
krainboltgreene has quit [Ping timeout: 264 seconds]
<bnagy>
also, 1.8 is no longer supported
<Godd2>
Im on a shared host
TIJ has joined #ruby
<Godd2>
And one gem isn't seeing that another is installed, and it's driving me insane and I'm grasping at straws at this point
<havenwood>
Godd2: GEM_PATH is a colon-separated list of gem repository directories. You could: GEM_PATH="$GEM_PATH:/new/path"
Domon has joined #ruby
<bnagy>
basically this sounds like "what's the _actual_ problem" squared
iliketurtles has joined #ruby
Mars1 has quit [Ping timeout: 256 seconds]
Mars2 has joined #ruby
<Godd2>
The actual problem is that I don't have enough understanding of the environment in which I'm working to do any kind of diagnostics.
dawkirst has quit [Quit: Leaving]
<Godd2>
But I didn't want to ask for solutions to that since it isn't a Ruby problem ;)
ananthakumaran1 has quit [Quit: Leaving.]
goleldar has quit [Ping timeout: 240 seconds]
TIJ has quit [Read error: Connection reset by peer]
<havenwood>
Godd2: Shared host doesn't sound good if that means you cant install your own packages? EC2 or Azure might be worth looking at. A Linux box on Azure is actually quite easy to setup.
Kar- has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
stormbytes has joined #ruby
<Godd2>
I was just trying to get something quick and dirty set up with Rails, but it looks like Bluehost may not be the easiest place for that.
sambao21 has joined #ruby
sambao21 has quit [Client Quit]
choobie has joined #ruby
choobie has quit [Changing host]
choobie has joined #ruby
Es0teric has joined #ruby
zastern has quit [Read error: Connection reset by peer]
<havenwood>
Godd2: Maybe just do command line stuff locally and deploy to Heroku free tier?
v1n has quit [Ping timeout: 240 seconds]
pranny has joined #ruby
<Godd2>
That's weird. On their website they claim the path to ruby is usr/bin/ruby but 'which ruby' yields /ramdisk/bin/ruby
<Godd2>
Is that a problem?
zastern has joined #ruby
<havenwood>
dunno
<havenwood>
maybe usr is cached to ramdisk, no clue
smathieu has joined #ruby
cads has quit [Ping timeout: 246 seconds]
stormbytes has quit [Client Quit]
<havenwood>
they should upgrade their Ruby though :P
Es0teric has quit [Client Quit]
nmabry has joined #ruby
<havenwood>
Godd2: What distro is it?
tagrudev has joined #ruby
nomenkun has joined #ruby
<Godd2>
distro of Ruby?
rien has quit [Ping timeout: 256 seconds]
<havenwood>
oh, i meant of linux - like debian or centos or whatev?
<bnagy>
holy crap I hope that's centos or something
nomenkun has quit [Ping timeout: 268 seconds]
atno has joined #ruby
<Godd2>
Well I'll tell you the problem I'm having right now. I keep getting htis error: no such file to load -- bundler
<Godd2>
But I have bundler installed, so I thought maybe it jjust wasn't looking in the right place
renderful has quit [Ping timeout: 240 seconds]
axeman- has joined #ruby
dash__ has joined #ruby
gstamp has quit [Quit: Computer has gone to sleep.]
Mars2 has quit [Ping timeout: 246 seconds]
dash_ has quit [Ping timeout: 240 seconds]
<Godd2>
I think I'll just give up and wait until they decide to update Ruby
havenwood has joined #ruby
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
Hanmac has joined #ruby
atmosx has joined #ruby
<havenwood>
Godd2: Oops, battery went dead. Well, was just gunna say if update-alternative, chruby, rvm, or rbenv happen to be system-wide installed you may be in luck - but that seems like a long shot
__sowcow__ has quit [Remote host closed the connection]
adeponte has quit [Ping timeout: 264 seconds]
sailias has joined #ruby
__sowcow__ has joined #ruby
mneorr has joined #ruby
noop has joined #ruby
jonahR has quit [Quit: jonahR]
artemeff has joined #ruby
havenwood has quit [Ping timeout: 240 seconds]
benten has joined #ruby
<benten>
!seen ezmobius
haxrbyte has joined #ruby
haxrbyte_ has joined #ruby
adeponte has joined #ruby
pranny1 has joined #ruby
pranny has quit [Read error: Connection reset by peer]
renderful has quit [Remote host closed the connection]
nari has quit [Ping timeout: 245 seconds]
bionoid has joined #ruby
zastern has quit [Remote host closed the connection]
haxrbyte has quit [Ping timeout: 240 seconds]
JohnBat26 has joined #ruby
pontiki has joined #ruby
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lkba has quit [Ping timeout: 264 seconds]
rahult has joined #ruby
aganov has joined #ruby
v1rr3n has quit [Quit: WeeChat 0.4.1]
SilverKey has joined #ruby
bionoid has quit [Remote host closed the connection]
nari has joined #ruby
ayaz has quit [Quit: Bye!]
chriskk has quit [Quit: chriskk]
__sowcow__ has left #ruby [#ruby]
ayaz has joined #ruby
wesside has quit [Ping timeout: 245 seconds]
andikr has joined #ruby
Domon has quit [Remote host closed the connection]
Domon has joined #ruby
threesome has joined #ruby
renderful has joined #ruby
lele` is now known as lele
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
wesside has joined #ruby
blaxter_ has joined #ruby
smathieu_ has joined #ruby
bradhe has quit [Ping timeout: 256 seconds]
alfreddba has joined #ruby
goodgame has joined #ruby
williamherry has joined #ruby
<alfreddba>
sudo: sorry, a password is required to run sudo in backup gem.so how to supply password when performing backup gem
smathieu_ has quit [Ping timeout: 240 seconds]
bradhe has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
djbkd has quit [Quit: Leaving]
<pontiki>
maybe you want to setup a sudoer that can execute your backup script
flaccid has joined #ruby
blaxter_ has quit [Ping timeout: 240 seconds]
haxrbyte_ has quit [Ping timeout: 240 seconds]
<flaccid>
man ruby oop is like way too many ways to do things. is there a recommended guide on doing OOP? my main requirement is having modules or classes that share certain modules or classes e.g. logger, configuration etc.
Hanmac has joined #ruby
haxrbyte has joined #ruby
nitish has quit [Remote host closed the connection]
<pontiki>
well, "doing OOP" is a gigantic field in itself, there are tons of ways to implement things
<flaccid>
thats the problem
<pontiki>
the ecsatcy and the pain
i_s has quit [Quit: i_s]
<pontiki>
what sort of app are you making?
<pontiki>
because sometimes there are some ways better than others depending on the application
<flaccid>
its a CLI tool. so a common logger and config. a good example of implementing that would be good..
<pontiki>
have you looked at methadone gem?
<flaccid>
pontiki: negative. sounds like i should right?
folton has joined #ruby
<pontiki>
i use it a lot; it's got a lot of those features, and a p.good organization for things
folton has left #ruby [#ruby]
tatsuya_o has joined #ruby
threesome has quit [Ping timeout: 240 seconds]
<pontiki>
if you CLI app is more of a suite type app, a la git, then look at GLI
<pontiki>
or thor
<flaccid>
pontiki: thank you, that is a great help
<pontiki>
sure thing
<pontiki>
Dave's stuff is pretty cool, his book is work reading
<pontiki>
worth*
<pontiki>
lol
stef_204 has joined #ruby
<flaccid>
does look like he has done a lot of things that i want to work out best to do
<flaccid>
what do you mean by a 'suite' type app though pontiki?
* lupine
picks his way through a mass of ruby1.9 incompatibilities
<lupine>
oddly enough, many of them were in tests/ rather than lib/
arietis has joined #ruby
blarghmatey has quit [Ping timeout: 264 seconds]
lebek has joined #ruby
ntus1017 has quit [Remote host closed the connection]
joey133 has quit [Ping timeout: 276 seconds]
BizarreCake has joined #ruby
ewnd9 has quit [Remote host closed the connection]
Yakko has quit [Ping timeout: 264 seconds]
ghanima has quit [Quit: Leaving.]
isale-eko has joined #ruby
SidGBF has joined #ruby
cj3kim has joined #ruby
<SidGBF>
Anyone here could help me with redmine? Or maybe point me a different channel?
Maoko has joined #ruby
lebek has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Maoko>
Did someone use solr with ruby?
senayar_ has joined #ruby
mljsimone|away is now known as mljsimone
Astralum has joined #ruby
mklappstuhl has joined #ruby
jbpros has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
nikeita has quit [Quit: sleep]
<vikhyat>
Maoko: I use the sunspot gem to interface with Solr.
yacks has joined #ruby
johnkary has joined #ruby
<Maoko>
vikhyat, Great! Did you try setting this param EdgeNGramFilterFactory?
grainol has joined #ruby
kung has quit [Quit: Bye!]
sethetter has joined #ruby
senayar has quit [Ping timeout: 256 seconds]
smathieu has joined #ruby
<_br_>
Have to work with a SOAP/WDSL API here and want to bundle it into a nice gem. What kind of SOAP lib would you recommented? Savon? Handsoap? Soap4r? Particularly in terms of speed and ease of use etc. ?
pwnfactory has joined #ruby
<Maoko>
vikhyat, I need to start display results from the first entered char. Tried setting <filter class="solr.EdgeNGramFilterFactory" minGramSize="3" maxGramSize="30"/> this param but it looks like nothing has changed. I'm still getting the results after the 5th char.
pranny1 has joined #ruby
senayar has joined #ruby
TIJ has quit [Ping timeout: 256 seconds]
Mattix has quit [Quit: Leaving]
pranny has quit [Ping timeout: 240 seconds]
senayar has quit [Remote host closed the connection]
senayar_ has quit [Ping timeout: 248 seconds]
dhruvasagar has quit [Ping timeout: 256 seconds]
senayar has joined #ruby
beiter has joined #ruby
<vikhyat>
Maoko: Have you tried it with minGramSize="1"?
beiter has joined #ruby
utdemir has quit [Read error: Connection reset by peer]
maz-dev has joined #ruby
<Maoko>
vikhyat, yup, not working either, I did try setting this up to 3 - 5 - 10 chars and the results are all the same.
sailias has quit [Ping timeout: 240 seconds]
cads has quit [Ping timeout: 240 seconds]
<Maoko>
and, yes, I'm restarting solr after each schema.xml change
<vikhyat>
Maoko: I have it set to 2 and I do get results after entering 2 characters.
<vikhyat>
Maoko: Perhaps you need to re-index?
smathieu has quit [Ping timeout: 240 seconds]
<Maoko>
vikhyat, that might do the trick. Just a sec.
utdemir has joined #ruby
mklappstuhl has quit [Ping timeout: 240 seconds]
ferdev has quit [Quit: ferdev]
<Maoko>
vikhyat, Indeed! Reindexing is a cure for this.
mary5030 has joined #ruby
Maoko has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
alyi has joined #ruby
moura has quit [Quit: Computer has gone to sleep.]
johnkary has quit [Quit: @johnkary]
tk_ has joined #ruby
timonv has quit [Remote host closed the connection]
osvico has quit [Ping timeout: 268 seconds]
maz-dev has quit [Quit: Leaving]
maz-dev has joined #ruby
end_guy has quit [Ping timeout: 240 seconds]
end_guy has joined #ruby
ntus1017 has joined #ruby
mary5030 has quit [Remote host closed the connection]
sambao21 has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
brtdv has joined #ruby
mark_locklear has joined #ruby
viszu has joined #ruby
brtdv has quit [Client Quit]
atyz has quit [Read error: Connection reset by peer]
brtdv has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
gyre007 has quit [Remote host closed the connection]
<_br_>
apeiros: eh? without domain, tld and @ ?
<tobiasvl>
prsn: other way around for what you want: x ? x += 5 : x = 5
<apeiros>
_br_: yes
<_br_>
apeiros: crazy.
<bnagy>
x||=0;x+=5
<apeiros>
@ is only needed if you leave your own network
<prsn>
tobiasvl: well, sure, but the idea is to avoid writing out x so many times
<apeiros>
that said - most smtps don't process mails without @
<_br_>
apeiros: nice catch! :)
Michael_ has joined #ruby
<_br_>
mongag: A good thing to focus on is probably trying to spell check "e.g. gmaail" -> "gmail" etc.
<bnagy>
but in real life it won't work unless it's @x
<_br_>
apeiros: True, that and spf, dkim and all the other mess
<apeiros>
_br_: yupp
senayar_ has joined #ruby
<apeiros>
email address spec stems from ancient times were stuff looked slightly different :)
<_br_>
yep, and everybody thought the world is full of flowers and nobody will do something stupid
<_br_>
good times! :)
<_br_>
mah, I'm getting old.
<apeiros>
^^
<apeiros>
and the internet was comprised of a grand total of about 317 users
mansi has joined #ruby
<_br_>
hehe
senayar_ has quit [Remote host closed the connection]
<mongag>
_br_ let's says it's a "simple" email validator
KevinSjoberg has quit [Ping timeout: 240 seconds]
<mongag>
Why I can't get the email with this regex?
<apeiros>
mongag: lets replace "simple" with "invalid"
senayar_ has joined #ruby
<_br_>
exactly.
NiteRain has quit [Max SendQ exceeded]
<mongag>
aperios: I agree
NiteRain has joined #ruby
hamed_r has quit [Quit: Leaving]
keanehsiao has joined #ruby
<apeiros>
but why it doesn't work the way you wanted was explained already by hoelzro
gyre007 has joined #ruby
senayar has quit [Ping timeout: 256 seconds]
whowantstolivefo has quit [Ping timeout: 264 seconds]
<hoelzro>
using predefined character classes is probably a better bet
<hoelzro>
(but that won't fix the problem I already pointed out)
<tobiasvl>
mongag: [A-Za-z] only matches a SINGLE letter
buzzybron1 has quit [Quit: Leaving.]
<mongag>
lol i missed that
<_br_>
mongag: a good way to learn a bit more about regex.. http://rubular.com/
* hoelzro
typed six lines of help...
<hoelzro>
='(
<hoelzro>
I feel invisible!
<YaNakilon>
x = (x || 0) + 5
<apeiros>
who said that?
* apeiros
hears voices
<mongag>
hoelzro: my apologies
<YaNakilon>
tobiasvl prsn
devoldmx3 has joined #ruby
<mongag>
_br_ thx
<_br_>
apeiros: me too... wonder where hoelzro is ?
<_br_>
mongag: welcome
<_br_>
d(^.^)p \/
<apeiros>
yeah, haven't seen him in a while. sad. he was a great guy.
<_br_>
indeed
<tobiasvl>
who? hoelzro? never heard of him
<tobiasvl>
YaNakilon prsn: that is prettier
devoldmx has quit [Ping timeout: 245 seconds]
Kar- has quit [Remote host closed the connection]
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
premjg_ has quit [Quit: Leaving.]
buzzybron has joined #ruby
premjg_ has joined #ruby
karl___ has joined #ruby
clocKwize has quit [Quit: clocKwize]
<karl___>
Anyone familiar with nokogiri SAX parsing? Doing SAX parsing, I see lots of examples for printing the attributes of a tag, but haven't found any printing the contents of a tag (ie, <name>Karl</name> I want to print "Karl"). Anyone know the proper way to do this?
timonv has joined #ruby
buzzybron has quit [Read error: Connection reset by peer]
atyz has quit [Quit: Leaving...]
Michael_ has quit [Remote host closed the connection]
LaPetiteFromage has joined #ruby
buzzybron has joined #ruby
<james_woods>
j /rails
<james_woods>
Oo
buzzybron has left #ruby [#ruby]
<mongag>
_br_ thx again for the link. Very useful
mansi has quit [Ping timeout: 268 seconds]
lebek has joined #ruby
lebek has quit [Client Quit]
Michael_ has joined #ruby
senayar has joined #ruby
burlyscudd has joined #ruby
lrocksmashtime has quit [Read error: Operation timed out]
clocKwize has joined #ruby
breakingthings has joined #ruby
KevinSjoberg has joined #ruby
senayar has quit [Remote host closed the connection]
<apeiros>
karl___: been a while, but the text-node should be its own event
devoldmx3 has quit [Ping timeout: 264 seconds]
breakingthings has quit [Client Quit]
senayar has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
breakingthings has joined #ruby
kennym_ is now known as kennym
kennym has quit [Changing host]
kennym has joined #ruby
KevinSjoberg has quit [Max SendQ exceeded]
s00pcan has quit [Remote host closed the connection]
breakingthings has quit [Client Quit]
<karl___>
apeiros: Hm, I have an event for the specific node (ie If nodename="name"), i just cant seem to figure out how to access the text inside
wesside has quit [Quit: Computer has gone to sleep.]
sayan has quit [Quit: Leaving]
keanehsiao has joined #ruby
pentameter has joined #ruby
tonini has joined #ruby
beiter has quit [Quit: beiter]
dmiller has quit [Remote host closed the connection]
ravster has joined #ruby
blandflakes has quit [Quit: Leaving]
ananthakumaran has quit [Quit: Leaving.]
Notte has joined #ruby
browndawg has quit [Quit: Leaving.]
sambao21 has quit [Quit: Computer has gone to sleep.]
Akuma has joined #ruby
browndawg has joined #ruby
vlad_starkov has joined #ruby
crankycoder has quit [Quit: leaving]
<karl___>
_br_: thank you; i started playing with ox and it was a bit more intuitive
Akuma has quit [Client Quit]
v1n has joined #ruby
LaPetiteFromage has quit [Quit: LaPetiteFromage]
sambao21 has joined #ruby
jmimi has joined #ruby
Michael_ has quit [Remote host closed the connection]
ksmth has quit []
interactionjaxsn has joined #ruby
JZTech101 has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC]
Akuma has joined #ruby
TheRealPygo is now known as pygospa
aalmenar_ has quit [Ping timeout: 246 seconds]
ereslibre_laptop has quit [Ping timeout: 246 seconds]
vlad_starkov has quit [Ping timeout: 260 seconds]
krz has joined #ruby
Mattix has joined #ruby
cmarques has joined #ruby
julweber has joined #ruby
mklappstuhl has joined #ruby
<Mattix>
Hello
<Mattix>
> (1/2442000000*299792458)**2
<krainboltgreene>
Anyone here use archlinux and do ruby work?
S0da has joined #ruby
<Mattix>
it's returning 0.0
anay has joined #ruby
<Mattix>
any way to increase the precision?
<krainboltgreene>
Turn one into a float?
<hoelzro>
krainboltgreene: I run Arch and have Ruby installed, if that counts =P
cj3kim has joined #ruby
<krainboltgreene>
hoelzro: What's the pro/cons of archlinux, and have you run into any issues with using ruby on it?
crankycoder has joined #ruby
<hoelzro>
krainboltgreene: the pros are high customizability and rolling release (you see new software more quickly)
sweeper has joined #ruby
alfreddba has left #ruby [#ruby]
<hoelzro>
the cons are that it expects you to know a lot, and do pretty much everything yourself
<hoelzro>
and that rolling release aspect can occasionally break your system
<hoelzro>
oh, another pro: the wiki is fantastic
<hoelzro>
probably the best source of linux knowledge these days
<hoelzro>
I don't have any issues running ruby on it, because I have an RVM installation to manage rubies separately from the OS' version
himsin has quit [Quit: himsin]
<krainboltgreene>
That's good to hear.
axl_ has joined #ruby
<krainboltgreene>
Am I correct that the simplest linux is probably debian or ubnutu?
<sweeper>
morning folks. I have a SOA with 4 different services I need to manage on ec2 instances. I'm looking for some tools to glue this all together in a nice way. my current idea is a small ruby daemon that connects to a redis pub/sub when the machine boots, and then spawns services on the host on command
<krainboltgreene>
In terms of handholding.
<hoelzro>
ubuntu is probably the simplest
<Akuma>
hello, I'm having lots of issues installing sqlite3 gem on windows with ruby 2.0.0-p247 x64: I've installed the dll in the bin dir of ruby also tried to compile sqlite3 from source and using --with-sqlite3-include and --with-sqlite3-lib
<hoelzro>
debian doesn't do a lot of handholding
vlad_starkov has joined #ruby
<Akuma>
I can't seem to get past the error: checking for sqlite3_libversion_number() in -lsqlite3... no
<sweeper>
only problem with this idea is that redis is one of the services I'd like to manage :P
vlad_starkov has quit [Remote host closed the connection]
LaPetiteFromage has joined #ruby
* sweeper
spreads LaPetiteFromage over a bagel
cj3kim has quit [Ping timeout: 245 seconds]
codecop has quit [Remote host closed the connection]
corehook__ has quit [Ping timeout: 246 seconds]
S0da has quit [Ping timeout: 276 seconds]
corehook_ has quit [Ping timeout: 264 seconds]
S0da has joined #ruby
niklasb has joined #ruby
jbpros has quit [Quit: jbpros]
ChristianS has quit [Excess Flood]
Davey has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
ChristianS has joined #ruby
TIJ has joined #ruby
<_br_>
krainboltgreene: What difference does the distribution make? Its like ice cream.
<krainboltgreene>
_br_: The more handholding, the better.
anay has quit [Remote host closed the connection]
<_br_>
krainboltgreene: Handholding? Arch is no good idea then.
v1n has quit [Read error: Operation timed out]
<ericwood>
Arch slaps your hand and scolds you for trying to hold hands with it
<hoelzro>
indeed
<hoelzro>
you have to win Arch over ;)
rickruby has quit [Remote host closed the connection]
<_br_>
Arch? Meh new kids stuff. Gentoo is still where the buzz is ^^.
<ericwood>
arch is a classy mistress
vlad_starkov has joined #ruby
<hoelzro>
or mister, if that's what you prefer ;)
freerobby has joined #ruby
r0bgleeson has joined #ruby
<_br_>
That being said though, you should all be using freebsd :)
<ericwood>
hehe
<ericwood>
I'm on OS X, close enough?
<_br_>
darwin? yeah
jlast has joined #ruby
<Xsheller>
хуй
supergiantrobot has joined #ruby
JZTech101 has joined #ruby
johnnyfuchs has joined #ruby
denver has joined #ruby
<hoelzro>
even translated to an english keyboard layout that inputs makes no sense...
arietis has quit [Quit: Computer has gone to sleep.]
dhruvasagar has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
anay has joined #ruby
anay has quit [Remote host closed the connection]
anay has joined #ruby
arietis has joined #ruby
r4nd0m1 has joined #ruby
sarkis has joined #ruby
joey133 has joined #ruby
nikeita has quit [Quit: sleep]
sambao21 has joined #ruby
<krainboltgreene>
Gotta get me a freebsd iso.
<krainboltgreene>
iamge
maxmanders has joined #ruby
dawkirst has joined #ruby
sambao21 has quit [Client Quit]
DaniG2k has quit [Quit: Leaving.]
Dekade has quit [Read error: Connection reset by peer]
anay has quit [Ping timeout: 246 seconds]
aedorn has joined #ruby
brennanMKE has joined #ruby
Dekade has joined #ruby
brennanMKE has quit [Read error: Connection reset by peer]
<Akuma>
I have a vm running linux, I want to do my development on windows
<Akuma>
kind of beats the purpose
<aedorn>
You compiled SQLite yourself?
<lectrick>
Akuma: Back when I had to work on windows, I remember even having trouble just getting simple tools like rsync to work, I had to use Cygwin which felt hacky
<Kelet>
Akuma, Ah, I can help you with SQLite on windows :)
<Akuma>
through devkit cygwin
ffranz has joined #ruby
<Kelet>
Akuma, do you have Rubyinstaller ruby 2.0 or what?
<Kelet>
Sorry, missed the convo
<lectrick>
Akuma: looks like Kelet can hook you up, good luck
<Akuma>
I installed Ruby 2.0.0 x64 and devkit
blackmesa has joined #ruby
<Akuma>
lectrick: thanks
<lectrick>
Akuma: it's a nice language once you get all the parts you need working :)
sambao21 has quit [Quit: Computer has gone to sleep.]
<Akuma>
lol, agreed
<lectrick>
Akuma: Sublime Text is a nice editor, I believe there's a windows version
<Kelet>
Download both of those and put all of the contents in an easy to find directory like C:\SQlite3
<Kelet>
(You can delete the directory afterwards)
<Akuma>
gimme a sec, right before you talked to me I was deleting my install and starting over
s00pcan has quit [Remote host closed the connection]
<Akuma>
I need a couple of mins to put back Ruby and devkit
<aedorn>
x86 vs x64 though
<Kelet>
Akuma, I can't guarantee my method will work for x64
<Akuma>
we'll try :)
mklappstuhl has quit [Remote host closed the connection]
<Kelet>
But I've done this multiple times for x86 fine
sleetdrop has joined #ruby
<Kelet>
It's a littler trickier to get some things working on Windows, but Ruby is definitely quite Windows-capable as are most gems
mary5030 has joined #ruby
<lectrick>
If I have some Ruby code that I want to run in the browser and am too lazy to manually translate to JS, what's the current best Ruby-to-JS solution out there?
<Kelet>
Akuma, You _will_ find that some gems need compilation and special attention more for x64 than x86 though
s00pcan has joined #ruby
dmiller has quit [Ping timeout: 240 seconds]
mikecmpbll has joined #ruby
<Kelet>
For example, nokogiri has a nice precompiled x86 gem, whereas for x64 you have to devkit it up
freerobby has quit [Quit: Leaving.]
tagrudev has quit [Remote host closed the connection]
andikr has quit [Read error: Connection reset by peer]
<Kelet>
SQLite3 requires special attention on both x86 and x64 for Windows though, and all platforms really.
<Kelet>
Or rather it needs to compile stuff
<Akuma>
is it a big difference to use x86 vs x64?
<Akuma>
or can I just install Ruby 2 as x86 on x64
<Kelet>
I would just recommend x86 for ease of use, I don't think you'd see any performance differences and x64 will likely use a bit more memory
<Akuma>
and skip the headache
<Kelet>
Yes
<Kelet>
I would recommend that
asteve has joined #ruby
senayar_ has joined #ruby
<Akuma>
Kelet: gimme a sec, removing ruby x64 and installing x86 with devkit
<Kelet>
Make sure you choose the mingw64-32 devkit
krainboltgreene has quit [Quit: krainboltgreene]
DestinyAwaits has quit [Read error: Connection reset by peer]
allaire has joined #ruby
DestinyAwaits has joined #ruby
fernandoaleman has joined #ruby
senayar_ has quit [Remote host closed the connection]
senayar_ has joined #ruby
RORgasm has quit [Read error: Connection reset by peer]
RORgasm has joined #ruby
senayar has quit [Ping timeout: 248 seconds]
corehook_ has joined #ruby
corehook__ has joined #ruby
senayar_ is now known as senayar
Michael_ has joined #ruby
<Kelet>
Also, in terms of text editors, if you want something free and open source and lightweight, Textadept might work for you. I made a post about it last night: http://www.reddit.com/r/learnprogramming/comments/1ify2k/are_there_any_lightweight_ides_that_are_somewhere/cb4989y - It has a nice ruby mode with decent autocompletion, calltips, etc. I'm actually working on something like inf-ruby for it, so it's "smart" about it (but it will probably be a while before it's
<Kelet>
done)
lrocksmashtime has quit [Ping timeout: 256 seconds]
moura has joined #ruby
<[narcan]>
ok, i'm starting to hate god
<Akuma>
ok, ruby and dev kit are installed and json gem installs fine
<mjc_>
BlakeRG: however do look at the other functions that are available, like iso8601, xmlschema, rf2822, etc. If you need one of those formats it is much clearer what you mean when you use those, rather than a format string
<BlakeRG>
thanks mjc_ - i was assuming there would be a single document with all of the possible format options across the entire ruby spectrum
BillCriswell has joined #ruby
sambao21 has joined #ruby
anay_ has quit [Remote host closed the connection]
cha1tanya has joined #ruby
jprovazn has quit [Quit: Leaving]
Kruppe has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Remote host closed the connection]
banghouse2 has joined #ruby
terrellt has joined #ruby
_veer has quit [Ping timeout: 240 seconds]
<[narcan]>
is it worth / possible trying to run god via the bundler environment
banghouse2 is now known as banghouse
<[narcan]>
or should i just setup the system gem config
michael_mbp is now known as zz_michael_mbp
smathieu has joined #ruby
pyoor has quit [Quit: leaving]
<BlakeRG>
Do i ever need to require a code class in my scripts?
<BlakeRG>
the DateTime object didn't seem to work in IRB unless i required it
rektide has joined #ruby
renderful has quit [Remote host closed the connection]
<atmosx>
okay the prob is I'm calling a module which does Sequel.connect all the time, but I'm out of ideas how to implement something that calls Sequel.connect just once.. hm
<atmosx>
I'll post to the ml
tommyvyo has quit [Quit:]
burlyscudd has quit [Quit: Leaving.]
eka has joined #ruby
Michael_ has quit [Read error: Connection reset by peer]
keanehsiao has quit [Ping timeout: 260 seconds]
pinage404 is now known as zz_pinage404
TIJ has quit [Quit: Konversation terminated!]
Michael_ has joined #ruby
pedestrian has quit [Quit: WeeChat 0.4.1]
pedestrian1 has joined #ruby
pedestrian1 has quit [Client Quit]
pedestrian has joined #ruby
<Morrolan>
atmosx: There's #sinatra, by the way.
comrade_ has joined #ruby
<Morrolan>
... which you seem to be part of already.
khushildep has quit [Quit: khushildep]
comrade_ has quit [Read error: Connection reset by peer]
<atmosx>
Morrolan: it's not a sinatra problem it's a design problem
JZTech101 has joined #ruby
<Morrolan>
Oh, then something must've changed while I had dinner.
<atmosx>
Morrolan: sure, dinner is good
<atmosx>
Morrolan: I wrote a module to use as a helper, which makes the MySQL calls via sequel. Problem is that I call it through the sinatra app each time, creates a new object
comrade_ has joined #ruby
<atmosx>
Morrolan: and MySQL then stalls because it gets too many open connections
<atmosx>
I could move the entire file into application.rb and not call an external object every time but it's not elegant at all, so I'm trying to figure out how can I call db = Sequel.connect("") just once...
Kruppe has quit [Ping timeout: 268 seconds]
<MrZYX>
singleton pattern?
Appineer has joined #ruby
premjg_ has joined #ruby
Appineer has left #ruby [#ruby]
maxmanders has joined #ruby
<atmosx>
MrZYX: singleton is the scope of a class? Not exactly sure what singleton is, I'm reading the wrod more and more lately
Hanmac2 has joined #ruby
RobW_ has joined #ruby
<MrZYX>
look it up, it's a very basic pattern
mattsgarrison_ has joined #ruby
jsatk has quit [Remote host closed the connection]
<atmosx>
MrZYX: oh that's excatly what I need apparently: If a system only needs one instance of a class, and that instance needs to be accessible in many different parts of a system, you control both instantiation and access by making that class a singleton. < - http://c2.com/cgi/wiki?SingletonPattern
<MrZYX>
yes
premjg_ has quit [Ping timeout: 240 seconds]
Hanmac2 has quit [Ping timeout: 240 seconds]
<atmosx>
awesome, let's read some more then
rsahae has quit [Quit: rsahae]
maxmanders has quit [Ping timeout: 240 seconds]
infecto has joined #ruby
alex__c2022 has quit [Read error: Operation timed out]
infecto has quit [Client Quit]
devinus has joined #ruby
infecto has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
rshetty has quit [Ping timeout: 252 seconds]
interactionjaxsn has joined #ruby
<MrZYX>
the other way to solve your particular problem is using a connection pool
<atmosx>
MrZYX: which solution is more natural/elegant/widely used?
angusiguess has joined #ruby
nomenkun has joined #ruby
saarinen has joined #ruby
<MrZYX>
a singleton is very easy to do but can be a bottleneck, especially if you need a thread safe application
saarinen has quit [Client Quit]
<atmosx>
why so?
cj3kim has quit [Remote host closed the connection]
snearch has joined #ruby
realDAB has quit [Quit: realDAB]
alex__c2022 has joined #ruby
<MrZYX>
because either one thread has to wait for an existing request to finish or they might even interfere
saarinen has joined #ruby
angusigu1ss has quit [Ping timeout: 248 seconds]
<atmosx>
doesn't singleton handle this events?
graft has joined #ruby
interactionjaxsn has quit [Ping timeout: 240 seconds]
<atmosx>
well it my case is database pooling, so I can't see how they will interfere, it's ms and having 2 connections at the same time seems highly unlikely hmmm
<goleldar>
hello
<atmosx>
not to mention that I wanna try and see how it works heh
<goleldar>
I am trying to think of a variable name for a canonical representation of a string variable
<monban>
is there a global variable I can refference to see what build of Ruby I am on? specifically I am trying to figure out whether I'm on 64 or 32 bit ruby at runtmie
nomenkun has quit [Ping timeout: 246 seconds]
eldariof has joined #ruby
<MrZYX>
monban: RUBY_PLATFORM
Ry0_ has joined #ruby
tonini has joined #ruby
<monban>
thanks MrZYX !
michael_mbp is now known as zz_michael_mbp
[narcan] has quit [Quit: Leaving...]
Zeeraw has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
pontiki has joined #ruby
havenwood has joined #ruby
hadifarnoud has joined #ruby
<pontiki>
i'm trying to use ActiveRecord outside of Rails, according to a few blog posts all I need is to require active_record and sqlite3, but it's throwing errors: lib = File.join(File.dirname(__FILE__),'lib')
<pontiki>
spec = Gem::Specification.new do |s| s.name = 'resume_builder' s.version = ResumeBuilder::VERSION s.author = 'Tamara Temple' s.email = 'tamouse@gmail.com' s.homepage = 'http://tamouse.github.io/resume_builder' s.platform = Gem::Platform::RUBY s.summary = 'A set of commands to build a resume web site and various other forms' s.files = `git ls-files`.split($/) s.require_paths << 'lib' s.has_rdoc =
Alina-malina has joined #ruby
<hadifarnoud>
I wrote a ruby scrip that gets latest links from Pocket and open the new one in your browser as you send it to pocket. https://github.com/hadifarnoud/Send-it-to-my-screen it sill needs more work. anyone care to help?
<pontiki>
i'm trying to use ActiveRecord outside of Rails, according to a few blog posts all I need is to require active_record and sqlite3, but it's throwing errors: https://gist.github.com/tamouse/dab034fd49bfc2edb143
<pontiki>
crap
<pontiki>
sorry
ferdev has joined #ruby
<apeiros>
might need active_support/core_ext too
wrhall has joined #ruby
s3m73x has quit [Quit: I'm using a Free IRC Bouncer from BNC4FREE - http://bnc4free.com/]
jarray52 has joined #ruby
altivec has joined #ruby
staafl has joined #ruby
pontiki was kicked from #ruby by apeiros [cross-posting without telling that you are cross-posting is not welcome - this is only a kick, not a ban]
devinus has quit [Quit: devintorr.es]
michaeldeol has quit [Remote host closed the connection]
wrhall is now known as whall
whall is now known as willh
<atmosx>
weird I can't reproduce the issue on the mac
DestinyAwaits has quit [Quit: Leaving]
<atmosx>
mysql gets just 1 instance every time.
aramus_ has joined #ruby
<aramus_>
Hello, how does one check if a strng does NOT match a regular expression? !=~ does not seem to work.
willh is now known as wrsh
robscomputer has joined #ruby
<MrZYX>
unless ?
michaeldeol has joined #ruby
<jarray52>
Is there an easy way to call a superclass method in Ruby? The superclass method has a different name than the subclass method from which it is called.
moura has quit [Quit: Computer has gone to sleep.]
spider-mario has joined #ruby
twoism has quit [Remote host closed the connection]
<aramus_>
MrZYX: Duh moment for me, thanks.
zz_michael_mbp is now known as michael_mbp
Michael_ has quit [Read error: Connection reset by peer]
axeman- has quit [Remote host closed the connection]
rsahae has joined #ruby
Michael_ has joined #ruby
beiter has joined #ruby
interactionjaxsn has joined #ruby
<apeiros>
jarray52: just use the name
BlakeRG has left #ruby [#ruby]
adambeynon has quit [Quit: Computer has gone to sleep.]
<jarray52>
apeiros: The problem is that the subclass also has a method by the same name. I want to call the superclass method. Not the subclass method.
<apeiros>
jarray52: then you did it wrong.
<apeiros>
this is not how you design classes.
realDAB has joined #ruby
<apeiros>
if you need the unaltered functionality, don't add a method of the same name.
Pandee has joined #ruby
Zolo has quit [Remote host closed the connection]
aramus_ has left #ruby [#ruby]
goshakkk has joined #ruby
goshakkk has quit [Remote host closed the connection]
realDAB has quit [Client Quit]
<atmosx>
okay the problem is either nginx or unicorn
goshakkk has joined #ruby
<atmosx>
but since unicorn standalone doesn't have any issues my bets are on nginx
<jarray52>
apeiros: The problem arises due to the use of the Devise gem in Rails and due to Rails conventions. The subclass method I need to bipass in this particular case is necessary. Anyways, I have a workaround that involves replicating code. So, there is no easy way to bipass the subclass method and jump directly to the superclass method in this case?
premjg_ has joined #ruby
<atmosx>
and I found it, didn't had mutex on
<apeiros>
jarray52: there is, but I'm pretty sure you're doing it wrong. anyway, if you insist on doing it wrong, here is how:
sambao21 has quit [Quit: Computer has gone to sleep.]
Ripp__ has joined #ruby
xardas has quit [Changing host]
xardas has joined #ruby
<RobW_>
apeiros: Thanks. They were working unescaped on Rubular, so thought I'd ask.
rien has joined #ruby
<hadifarnoud>
I wrote a ruby scrip that gets latest links from Pocket and open the new one in your browser as you send it to pocket. https://github.com/hadifarnoud/Send-it-to-my-screen it sill needs more work. anyone care to help?
Xuerian has quit [Quit: No Ping reply in 180 seconds.]
dankest has quit [Quit: dankest]
<RobW_>
Won't break anything to escape them too, so.
Bira_ is now known as bira
bira is now known as Bira
Xuerian has joined #ruby
dankest has joined #ruby
beiter has quit [Quit: beiter]
sambao21 has joined #ruby
sarkis has quit [Quit: leaving]
<jarray52>
mjc_: Adding multiple(5) different login pages to a Rails application using Devise. Devise has a new method that calls super. That works for the first login page and renders the new view. Now, I want to add a method second_new that calls the Devise new function but bipasses the new in the subclass.
premjg_ has quit [Ping timeout: 240 seconds]
zeade has joined #ruby
alvaro_o has joined #ruby
<apeiros>
that sounds different from what you asked before, though…
rodacato has quit [Remote host closed the connection]
<apeiros>
and I'd wonder if Devise didn't provide a nicer way to do what you want.
tjbiddle has joined #ruby
<mjc_>
pretty sure it does provide a much nicer way
<wrsh>
why overwrite the super method at all then?
devinus has joined #ruby
<wrsh>
instead of calling super, you could just call the name of the super method in both
<wrsh>
but I don't know much about devise, so there is likely a nicer solution than that
<jarray52>
apeiros: I broke the task down into pieces(perhaps incorrectly). Now, I'm realizing that even if I can call a superclass method and bipass the subclass method, there will be a problem.
<apeiros>
it's bypass btw.
sambao21 has quit [Client Quit]
maxmanders has quit [Quit: Computer has gone to sleep.]
emmanuelux has joined #ruby
<apeiros>
bipass would mean two-pass…
comrade_ has quit [Quit: Konversation terminated!]
<jarray52>
apeiros: Thanks... that looked wrong when I typed it... but couldn't figure out exactly what was wrong.
<tjbiddle>
Hey guys - How would I define this in CanCan syntax: ( can :build, ProjectEnvironment if name != 'prod' )
xavier23 has quit [Quit: xavier23]
<jarray52>
wrsh: That's a good solution. Solves my first problem, but it won't work for another reason. Devise renders the new view.
<apeiros>
tjbiddle: I think #rubyonrails is better suited for cancan questions
<tjbiddle>
apeiros: Woops - I actually thought I was in there. Thanks!
jorge_ has joined #ruby
rodacato has joined #ruby
<jarray52>
In any case, this is starting to look like a rails question and not a Ruby question anymore.
rezzack has joined #ruby
rodacato has quit [Remote host closed the connection]
sambao21 has joined #ruby
browndawg has quit [Quit: Leaving.]
rodacato has joined #ruby
mattsgarrison_ has quit [Remote host closed the connection]
sayan has joined #ruby
nikeita has quit [Quit: sleep]
mattsgarrison_ has joined #ruby
tonini has quit [Remote host closed the connection]
jorge_ has quit [Ping timeout: 240 seconds]
tonini has joined #ruby
blackmes1 is now known as blackmesa
infecto has quit [Quit: Leaving.]
antn has quit [Remote host closed the connection]
allaire has quit [Quit: allaire]
Banistertab has joined #ruby
R3dy has joined #ruby
<R3dy>
Is there an easier way to go from one string position to the end, easier then string[10,string.size] for example
<havenwood>
R3dy: string[10, -1]
<R3dy>
like in Python I know you can do string[10:]
<R3dy>
havenwood: thanks!
vikhyat has quit [Ping timeout: 246 seconds]
dmiller has joined #ruby
ner0x has joined #ruby
Zolo has joined #ruby
lkba has joined #ruby
_bart has quit [Remote host closed the connection]
altivec has quit [Ping timeout: 248 seconds]
nikeita has joined #ruby
huoxito has joined #ruby
niklasb has joined #ruby
<R3dy>
say havenwood does that work for arrays as well
<havenwood>
R3dy: yup
<R3dy>
i think that is really what I am wanting and that doesn't appear to produce the same value
<apeiros>
havenwood: 10..-1
<R3dy>
ah .. isnetad of ,
<R3dy>
perfect
<R3dy>
thanks
corehook_ has quit [Ping timeout: 246 seconds]
corehook__ has quit [Ping timeout: 246 seconds]
<havenwood>
apeiros: oh, duh!
dmiller has quit [Ping timeout: 276 seconds]
<havenwood>
apeiros: haven't had coffee yet, thanks...
<apeiros>
np :)
<havenwood>
R3dy: listed to apeiros!
<havenwood>
(Actually, always listed to apeiros over me, hehe. That is a good rule of thumb.)
<Kelet>
Change the [] to an {} and instead of @mixtape_tags =... line, do something like @mixtape_tags[mixtape_tag_xfref.id] = mixtape_tag_value
<SVetter_>
i want to output the value of "value" based on the mixtape_tag_xref.id
<Kelet>
or something
_md has joined #ruby
robscomputer_ has joined #ruby
<MrZYX>
the generic answer is to just build an array of what you want to output so that you can just output it without having logic to filter it (again)
_md has quit [Client Quit]
jerius has quit [Read error: Operation timed out]
robscomputer has quit [Ping timeout: 264 seconds]
<SVetter_>
well i tried that
<SVetter_>
but ran into a problem
Emmanuel_Chanel has joined #ruby
<SVetter_>
the mixtape_tag_xref.id can be smith like 100 +
<MrZYX>
since this smells like rails, the rails way to do it is @mixtape_tags = MixtapeTag.where(id: @mixtape_tag_xrefs.map(&:mixtape_tag)) and @mixtape_tags.each do |tag| puts tag.whatever_probably_name; end
<SVetter_>
and if I create an array, ruby seems to fill all the keys until 100 + with NIL
<aedorn>
So... good chairs besides Steelcase Leap and Herman Miller anything? and I guess not ErgoHuman either (out of budget *sigh*)
<MrZYX>
don't use the id as an index
<MrZYX>
just fill the array up with the values
Hanmac2 has quit [Ping timeout: 276 seconds]
mklappstuhl has joined #ruby
breakingthings has quit [Quit: breakingthings]
julweber has joined #ruby
mklappstuhl has quit [Write error: Broken pipe]
v0n has quit [Ping timeout: 268 seconds]
codecop has quit [Remote host closed the connection]
m8 has quit [Quit: Sto andando via]
pkill has joined #ruby
mklappstuhl has joined #ruby
dhruvasagar has quit [Ping timeout: 248 seconds]
supergiantrobot_ has joined #ruby
iliketurtles has joined #ruby
goshakkk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wmoxam has quit [Ping timeout: 240 seconds]
postmodern has joined #ruby
wrsh has joined #ruby
Emmanuel_Chanel has quit [Quit: Leaving]
<SVetter_>
alright
<SVetter_>
did the latter
<SVetter_>
:)
<SVetter_>
i will just manage without the id in the index
<apeiros>
"ruby seems to fill all the keys until 100 + with NIL" that's how arrays work
JZTech101 has quit [Write error: Connection reset by peer]
BillCriswell has quit [Remote host closed the connection]
<SVetter_>
well
<SVetter_>
isn't PHP for example able to just randomly accept an index for an array?
<apeiros>
there are array-like structures which allow you to not fill "unused" space, but those aren't arrays, only array-likes
<apeiros>
lol php
atyz has quit [Quit: Leaving...]
<apeiros>
prime example of developers using the *entirely* wrong name for the datastructure
<MrZYX>
SVetter_: PHP confuses hashes and arrays
<apeiros>
no, php's arrays are NOT arrays. despite the name.
<SVetter_>
i see
jkline has quit [Quit: jkline]
<SVetter_>
so by definition an array can not take these values
<apeiros>
they're some weird mix of hashtables, arrays and sparse-arrays.
<SVetter_>
good to know
<SVetter_>
thank you!
tatsuya_o has joined #ruby
goleldar has quit [Ping timeout: 246 seconds]
rdg has joined #ruby
Banistertab has quit [Ping timeout: 240 seconds]
otherj is now known as fleischgewehr
ixti has joined #ruby
<apeiros>
that said, rubys "Hash" is a slight misnomer too. a hash is a value, not a datastructure (see Object#hash). Hash really is a HashMap or a HashTable
jonahR has joined #ruby
goleldar has joined #ruby
<SVetter_>
hashmap is what my book sais too
<SVetter_>
*says
ixti has quit [Client Quit]
ixti has joined #ruby
<SVetter_>
thanks for the advice!
Banistertab has joined #ruby
<MrZYX>
well think hash map if we say hash and are talking about ruby, don't we? :P
<MrZYX>
*we all
<terrellt>
Eh
<apeiros>
those who know about what they're talking? sure
<terrellt>
Until I run into someone using a hash function.
<apeiros>
but I've had the question here why there's Object#hash and Hash
sarkis has joined #ruby
<apeiros>
and there's quite a lot of rubyists who have no idea how a HashMap actually works and what Hash's relation to #hash and #eql? is
<apeiros>
(which I find perfectly acceptable btw. - while it's good to know it's not necessary for everybody)
cdelo has joined #ruby
Y_Ichiro has quit [Remote host closed the connection]
Y_Ichiro has joined #ruby
Y_Ichiro has quit [Changing host]
Y_Ichiro has joined #ruby
mansi has joined #ruby
alex__c2022 has quit [Quit: alex__c2022]
fomatin has quit [Remote host closed the connection]
<terrellt>
apeiros: I did not know that hash keys had to accept a hash parameter. Of course it makes sense, just hadn't thought of it.
fomatin has joined #ruby
<terrellt>
Er, had to have a hash function.
jorge_ has joined #ruby
rdg_ has joined #ruby
<SVetter_>
are you guys professional ruby programmers?
asobrasil has left #ruby [#ruby]
Y_Ichiro has quit [Remote host closed the connection]
<terrellt>
Many of us are.
<apeiros>
I am, can't speak for the others.
Emmanuel_Chanel has joined #ruby
sethetter has quit [Quit: Lost terminal]
<SVetter_>
may I ask what companies you are working at? are you maybe freelancing?
rdg has quit [Ping timeout: 240 seconds]
rdg_ is now known as rdg
<terrellt>
I work for a university.
pothibo has joined #ruby
<flaccid>
i'm a professional ruby programmer but prefer python
alex__c2022 has joined #ruby
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pkill>
what constitutes a professional programmer? ... i make money at my job too? lol
<flaccid>
one that gets paid to code?
<terrellt>
That would be my definition.
julweber has quit [Remote host closed the connection]
tvw has quit []
<flaccid>
its like asking whats a professional slut?
<apeiros>
SVetter_: financial company
<flaccid>
thats called a hooker
mercwithamouth has quit [Ping timeout: 264 seconds]
Y_Ichiro has joined #ruby
Y_Ichiro has joined #ruby
Y_Ichiro has quit [Changing host]
<terrellt>
To be fair, the majority of my ruby work is in Rails. A few gems to support it and a couple scripts too, but by and large it's Rails work.
<apeiros>
pkill: a professional programmer is somebody who's profession is to program
<apeiros>
obvious, no?
froy has quit [Ping timeout: 246 seconds]
sambao21 has joined #ruby
rsahae has joined #ruby
jorge_ has quit [Ping timeout: 240 seconds]
<flaccid>
rails is a framework for ruby, so thats still ruby
<apeiros>
sadly, most professional ruby work is rails and/or other webstuff
froy has joined #ruby
goleldar has quit [Read error: Connection reset by peer]
<SVetter_>
interesting that there are so many different areas you work in
<apeiros>
flaccid: while that's technically true, rails is somewhat its own universe.
tomzx_mac has joined #ruby
<pkill>
yes, it's obvious. just seems silly to call yourself a professional in one language versus others
rdg has quit [Client Quit]
fleischgewehr has quit []
<apeiros>
it's gotten less bad, but still…
goleldar has joined #ruby
<terrellt>
apeiros: Do you use ruby for other purposes, primarily?
<SVetter_>
since I still hear Java at every company I come across
<apeiros>
pkill: why?
tylersmith has quit [Remote host closed the connection]
<apeiros>
pkill: it's perfectly sane to be e.g. a professional java programmer but a hobbyist ruby programmer.
<pkill>
eh, i guess
<apeiros>
I don't see how that's silly
<pkill>
but as soon as you write some java at work, you're a professional at it
<terrellt>
Mm. I think consistency counts too. I've fixed some Java stuff for this job, but I'm not a professional java developer.
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
<apeiros>
yes, that makes you a professional java programmer, but not a professional ruby programmer.
<terrellt>
But anyways, if we want to make any money we're "software engineers," no?
<apeiros>
(that was @ pkill, not @ terrellt)
atyz has joined #ruby
<pkill>
heh exactly terrellt
marr has quit [Ping timeout: 262 seconds]
lnormous has joined #ruby
<apeiros>
terrellt: our job ads read had 'ruby' in the title
<apeiros>
-read
alex__c2022 has quit [Ping timeout: 246 seconds]
alex__c2022_ has joined #ruby
atyz has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
helvete has joined #ruby
<terrellt>
Know what consistently trips me up in ruby?
marr has joined #ruby
<terrellt>
The lack of ++.
monkegji_ has joined #ruby
<terrellt>
I understand why it's not there, but still.
<apeiros>
1 char trips you up?
<terrellt>
Yes. It's a tricksy char.
<apeiros>
or do you want the actual behavior of ++?
<terrellt>
I expect the behavior.
<apeiros>
i.e. ++i vs. i++
<apeiros>
in loops and wherever
<terrellt>
Yes, that.
<terrellt>
Rather than i += 1
baordog has quit [Remote host closed the connection]
razi has quit [Quit: Leaving.]
elux has quit [Quit: Leaving...]
<zaltekk>
i = i++;
<apeiros>
it's actually one of the things I consider bad about ++, that many are unaware of execution order
sambao21 has quit [Quit: Computer has gone to sleep.]
robscomputer has joined #ruby
monkegjinni has quit [Ping timeout: 252 seconds]
Zolo has quit [Remote host closed the connection]
robscomputer has quit [Read error: Connection reset by peer]
mercwithamouth has joined #ruby
robscomputer has joined #ruby
<terrellt>
apeiros: Mostly I just expect to be able to increment an integer via ++. The execution order stuff is useful for shortcuts, but I tend to avoid it for that reason.
obs has joined #ruby
<apeiros>
+=1 isn't that hard to get used to :-p
SVetter_ has quit [Quit: SVetter_]
<wrsh>
and it's more general
<apeiros>
besides, ruby provides so many constructs where you never need +=1 either
<terrellt>
I didn't say it was - I just slip fairly often and do ++.
<wrsh>
you can use it for *=
<wrsh>
etc
end_guy has quit [Ping timeout: 240 seconds]
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
robscomputer has quit [Changing host]
robscomputer has joined #ruby
<apeiros>
e.g. Integer#upto, #downto, #times etc.
tacos1de has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
end_guy has joined #ruby
<apeiros>
or Enumerator#with_index, or Enumerable#each_with_index etc.
robscomputer_ has quit [Ping timeout: 268 seconds]
<wrsh>
true, if you never want to increment an integer, you shouldn't have to
sambao21 has joined #ruby
splittingred has quit [Quit: splittingred]
blackmesa has joined #ruby
DrCode has quit [Ping timeout: 240 seconds]
Krajsnick has quit [Remote host closed the connection]
smathieu has quit [Remote host closed the connection]
Lewix has joined #ruby
Nss has quit [Ping timeout: 240 seconds]
sambao21 has quit [Client Quit]
cj3kim has quit [Remote host closed the connection]
alex__c2022_ has quit [Quit: alex__c2022_]
cj3kim has joined #ruby
sambao21 has joined #ruby
jonahR has quit [Quit: jonahR]
romdi` has joined #ruby
gyre007 has quit [Remote host closed the connection]
sambao21 has quit [Client Quit]
noimagination has joined #ruby
sambao21 has joined #ruby
drakedouay has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
noimagination has quit [Remote host closed the connection]
romdi has quit [Ping timeout: 248 seconds]
colonolGron has quit [Quit: Lost terminal]
<drakedouay>
How do you verify a password using bcrypt? I wrote 'BCrypt::Password.create(password)', but I am not sure how to verify the password later. Each time I run create, I get a different hash so I cannot compare them directly
saarinen has quit [Quit: saarinen]
Pandee has quit [Ping timeout: 268 seconds]
Pandee has joined #ruby
camt has joined #ruby
<Paradox>
420 glaze it donut
iliketurtles has joined #ruby
premjg_ has joined #ruby
<Paradox>
BipolarBear0 likes glazing donuts
workmad3 has quit [Ping timeout: 260 seconds]
<terrellt>
drakedouay: Bcrypt::Password overrides == to accept a string.
takezawa has quit [Remote host closed the connection]
<Paradox>
BipolarBear0 likes windows 8
<terrellt>
drakedouay: You should be able to do Password.new(Password.create(password)) == password