m00nlight has quit [Quit: Konversation terminated!]
m00nlight_ has joined #ruby
yasushi has joined #ruby
burlyscudd has joined #ruby
ValicekB has joined #ruby
w4pm has quit [Ping timeout: 248 seconds]
tylersmith has quit [Ping timeout: 245 seconds]
robbyoconnor has joined #ruby
dayepa has quit [Quit: dayepa]
chagar_ has joined #ruby
jayferd is now known as jayferd|afk
<chagar_>
#rubyon rails
chagar_ has quit [Client Quit]
centrx has quit [Quit: Leaving]
centrx has joined #ruby
dayepa has joined #ruby
stkowski has joined #ruby
panzer has quit [Quit: Ex-Chat]
eka has joined #ruby
Megtastique has joined #ruby
dayepa1 has joined #ruby
lioninawhat has quit [Ping timeout: 245 seconds]
Megtastique has quit [Client Quit]
chrisseaton has quit []
danshultz has quit [Remote host closed the connection]
dayepa has quit [Ping timeout: 276 seconds]
dayepa1 has quit [Ping timeout: 276 seconds]
mr_red has quit [Ping timeout: 272 seconds]
dayepa has joined #ruby
yoshie902a has joined #ruby
<yoshie902a>
I've defined an attr_accessor value called quantity, it's a big decimal and I'm wondering there is a way to limit the stored value to round to 10 digits
eka has quit [Quit: Computer has gone to sleep.]
_mtr has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dayepa1 has joined #ruby
clevermatt has joined #ruby
<bnagy>
yoshie902a: still haven't managed to read the documentation?
prxq_ has joined #ruby
mehlah has quit [Quit: Leaving...]
<bnagy>
I mean, it's been days, right?
<benzrf>
yoshie902a: write your own setter instead of using accessor
carif has joined #ruby
<yoshie902a>
bnagy: that's what I originally did, but keep getting some weird errors and thought there might be another way
burlyscudd has quit [Quit: Leaving.]
maletor has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
ValicekB has quit [Ping timeout: 272 seconds]
dayepa has joined #ruby
<yoshie902a>
benzrf: If there is not, I'll just have to create a setter.
deens has joined #ruby
prxq has quit [Ping timeout: 252 seconds]
wij has quit [Remote host closed the connection]
zz_jrhorn424 is now known as jrhorn424
diegoviola has joined #ruby
dayepa1 has quit [Ping timeout: 276 seconds]
meatherly has joined #ruby
dayepa1 has joined #ruby
deens has quit [Read error: Operation timed out]
axl_ has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
okinomo has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aspires has quit []
dayepa has joined #ruby
vongrippen has joined #ruby
clevermatt has quit [Remote host closed the connection]
meatherly has quit [Ping timeout: 252 seconds]
jamesaanderson has joined #ruby
jamesaanderson has quit [Max SendQ exceeded]
dayepa1 has quit [Ping timeout: 276 seconds]
jamesaanderson has joined #ruby
simoz3 has joined #ruby
dayepa1 has joined #ruby
marcgg has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
yasushi has quit [Remote host closed the connection]
jamesaanderson has quit [Client Quit]
mr_red has joined #ruby
okinomo has quit [Ping timeout: 260 seconds]
BraddPitt has quit [Ping timeout: 260 seconds]
nfk has quit [Quit: yawn]
ValicekB has joined #ruby
mary5030 has joined #ruby
marcgg_ has quit [Ping timeout: 248 seconds]
dayepa has joined #ruby
mlpinit has quit [Remote host closed the connection]
fijimunkii has quit [Ping timeout: 272 seconds]
dayepa1 has quit [Ping timeout: 276 seconds]
clevermatt has joined #ruby
tylersmith has joined #ruby
mary5030 has quit [Remote host closed the connection]
jamesaanderson has joined #ruby
okinomo has joined #ruby
psyl0n has quit [Remote host closed the connection]
aspires has joined #ruby
dayepa1 has joined #ruby
agjacome_ has quit [Quit: Reconnecting]
jamesaanderson has quit [Client Quit]
agjacome has joined #ruby
gja has joined #ruby
psyl0n has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
ValicekB has quit [Ping timeout: 272 seconds]
wij has joined #ruby
fijimunkii has joined #ruby
Jake232 has joined #ruby
agjacome has quit [Client Quit]
agjacome has joined #ruby
wij has quit [Remote host closed the connection]
framling has quit [Quit: See ya]
alexfreidah has quit [Ping timeout: 246 seconds]
dayepa1 has quit [Ping timeout: 276 seconds]
okinomo has quit [Ping timeout: 246 seconds]
dayepa has joined #ruby
kebabski has joined #ruby
okinomo has joined #ruby
recurrence has joined #ruby
kewubenduben has quit [Read error: Connection reset by peer]
recurrence has quit [Max SendQ exceeded]
recurrence has joined #ruby
firewater5 has joined #ruby
<firewater5>
benzrf: Hey, you here by chacne?
dayepa1 has joined #ruby
Guest84070 has quit [Remote host closed the connection]
<MrZYX>
well, you're leaving an open file handle there, strip line by line, then use force to build one big array of stripped lines and then join that array
<zxd>
node = 'debian' , if node.any?('fedora', 'rhel', 'debian') ... this isn't right syntax is it?
<MrZYX>
jxport: the question is, what do you want to do with that big, comma separated string?
<MrZYX>
zxd: no it's not
<jxport>
MrZYX: sending it to stdout would be file - I'd ultimately probably redirect it to another file
<jxport>
I can let bash handle the lazy writing
dayepa1 has quit [Ping timeout: 276 seconds]
<MrZYX>
zxd: we yet have not a single clue about your data structure, so it's hard to come up with suggestions
<workmad3>
olivier_bK: so, what exactly are you trying to do?
<zxd>
workmad3: I want to see if anyone of these ('fedora', 'rhel', 'debian') is in platform_family
<zxd>
if node['platform_family'].include?('fedora', 'rhel', 'debian') use any? here instead of inclide? ?
<workmad3>
zxd:
<workmad3>
no, reverse it
<canton7-mac>
workmad3, typed '/join #ruby', started typing '/join #ruby-lang', got as far as the '/join #' before xchat helpfully switched the window to #ruby, the '/join #' got left in the previous channel's input box and you guys got the remainer... :$
<workmad3>
if %w(fedora rhel debian).include?(node['platform_family'])
<shevy>
"I do love Python as a language and especially the direction it's heading in."
mengu has quit [Changing host]
mengu has joined #ruby
Hanmac1 has joined #ruby
marcgg has joined #ruby
<shevy>
"And we both agreed that Ruby's blocks are amazing design but for many reasons don't work that well in Python in its current design."
klip has quit [Quit: leaving]
klip has joined #ruby
<shevy>
some more epic quotes
<shevy>
"The indentation based syntax of the language was often criticized, but seeing how many languages now show up with exactly that as a feature (think HAML, CoffeeScript and many more) shows that it's well received."
<shevy>
:)
Hanmac has quit [Ping timeout: 252 seconds]
<shevy>
then the mood falls down
<georges>
i am sure it is an interesting read, but I meant more like a speedy guide to ruby for a python programmer
<shevy>
"I stopped looking forward to Python releases"
fphilipe has quit [Read error: Connection reset by peer]
thenovices has quit [Remote host closed the connection]
<shevy>
python code is strange
<georges>
and a quick python->ruby translations of most commonly used idioms would be nice to have
<zxd>
what does @ mean in ruby @results = @results.to_s + "run" , in perl it means array
fphilipe has joined #ruby
<georges>
python does have a lot of annoying things, yeah
DeanH has joined #ruby
dayepa1 has joined #ruby
DeanH has quit [Max SendQ exceeded]
<waxjar>
zxd: @ followed by some characters is an instance variable
shime has quit [Ping timeout: 252 seconds]
<zxd>
what does instance mean?
<zxd>
waxjar
<workmad3>
zxd: this is probably a good time to learn some ruby btw
<workmad3>
zxd: plenty of good tutorials out there
<zxd>
workmad3: yea
dayepa has quit [Ping timeout: 276 seconds]
<waxjar>
does python not have instances?
<workmad3>
zxd: and IRC isn't a good tutorial area... it's good for questions, troubleshooting and clarification, not first-time learning
<workmad3>
waxjar: zxd is doing chef sysadmin stuff
<waxjar>
ah
<workmad3>
or rather, attempting to do chef sysadmin stuff ;)
polaco_zZz is now known as polaco
<zxd>
it's impossible to do chef without knowing ruby
<zxd>
they lie on the chef docs
Hanmac1 has quit [Ping timeout: 272 seconds]
dayepa has joined #ruby
<zxd>
bummer
popl has quit [Ping timeout: 272 seconds]
<workmad3>
zxd: you can use chef without knowing ruby... but you can't write cookbooks without knowing ruby
<zxd>
or debug any error
dayepa1 has quit [Ping timeout: 276 seconds]
<workmad3>
zxd: do you do coding in any language?
yasushi has joined #ruby
<workmad3>
zxd: as I know the chef docs claim you don't need to know ruby, but I don't think they claim you can get away without knowing a coding language of some form
jamesaanderson has joined #ruby
dayepa1 has joined #ruby
kobain has joined #ruby
hypnosb has quit [Ping timeout: 252 seconds]
gopat has joined #ruby
ahmedelg_ has joined #ruby
apeiros has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
ixti has joined #ruby
dayepa has joined #ruby
ValicekB has joined #ruby
clamstar has quit [Quit: Computer has gone to sleep.]
RaCx has quit [Quit: Computer has gone to sleep.]
Kar- has quit [Ping timeout: 245 seconds]
mklappstuhl has joined #ruby
fedez77 has joined #ruby
clamstar has joined #ruby
polaco has left #ruby [#ruby]
dayepa1 has quit [Ping timeout: 276 seconds]
vallieres_ has quit [Quit: Computer has gone to sleep.]
ahmedelgabri has quit [Ping timeout: 252 seconds]
dayepa1 has joined #ruby
alexfreidah has joined #ruby
ahmedelg_ has quit [Remote host closed the connection]
danijoo has quit [Read error: Connection reset by peer]
dayepa has quit [Ping timeout: 276 seconds]
danijoo has joined #ruby
zeeraw has joined #ruby
dayepa has joined #ruby
mak|idle is now known as makkura
Hanmac has joined #ruby
Targen has joined #ruby
marcgg_ has joined #ruby
dayepa1 has quit [Ping timeout: 276 seconds]
gja has quit [Quit: This computer has gone to sleep]
jlast has joined #ruby
ms_steampunk has joined #ruby
_Andres has quit [Ping timeout: 248 seconds]
razibog has joined #ruby
gja has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
kobain_ has joined #ruby
RaCx has joined #ruby
marcgg has quit [Ping timeout: 252 seconds]
dayepa has joined #ruby
emocakes has quit [Quit: Leaving...]
sailias has joined #ruby
Sid05 has joined #ruby
fire has quit [Ping timeout: 260 seconds]
sailias has quit [Client Quit]
_Andres has joined #ruby
IceDragon has joined #ruby
kobain has quit [Ping timeout: 245 seconds]
sailias has joined #ruby
sailias has quit [Client Quit]
hypnosb has joined #ruby
sailias has joined #ruby
kobain_ is now known as kobain
momomomomo has joined #ruby
dayepa1 has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
Ox6abe has joined #ruby
DouweM has joined #ruby
fire has joined #ruby
tannerburson has joined #ruby
dayepa has joined #ruby
himsin has quit [Quit: himsin]
tharindu has joined #ruby
aryaching has joined #ruby
rubyracer has quit [Ping timeout: 252 seconds]
dayepa1 has quit [Ping timeout: 276 seconds]
dayepa1 has joined #ruby
Xeago has quit [Remote host closed the connection]
CorySimmons has joined #ruby
nw has quit [Quit: leaving]
Sid05 has quit [Read error: Connection reset by peer]
nw has joined #ruby
Sid05 has joined #ruby
<CorySimmons>
Hey guys, I'm trying to make a basic shell script in Ruby (just using a lot of `exec`). I'm trying to pass variables to an exec statement but I don't think they're getting passed. Here's my couple lines of code so far: http://pastie.org/8629444 How can I get Ruby variables into an exec statement?
thenovices has joined #ruby
vallieres_ has joined #ruby
ohwhoa has joined #ruby
senayar_ has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
ctp_ has joined #ruby
ctp_ has quit [Client Quit]
<tobiasvl>
use ""
<mikecmpbll>
CorySimmons: for string interpolation you need to use double quotes "#{}"
dayepa has joined #ruby
VinceThePrince has joined #ruby
<IceDragon>
CorySimmons: place the command into a string first and print it to the console, or use "system" with your own IOs
lioninawhat has joined #ruby
p8952 has quit [Ping timeout: 260 seconds]
VinceThePrince has quit [Client Quit]
<CorySimmons>
Ah, I'm such a newb. Totally newb mistake
w4pm has joined #ruby
dayepa1 has quit [Ping timeout: 276 seconds]
<CorySimmons>
IceDragon: You mean `require system` ?
<IceDragon>
if the latter returns nothing then you have a PATH problem
bobrenjc93 has joined #ruby
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<IceDragon>
olivier_bK: what is this problem?
<CorySimmons>
inkscape totally works from CLI. I just ran the command I'm trying in Ruby with absolute paths and such and it worked as expected.
<IceDragon>
oh
vlad_starkov has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
sambao21 has joined #ruby
<CorySimmons>
:)
<CorySimmons>
inorite?!
<IceDragon>
"Ruby with absolute paths"
<CorySimmons>
?
`MArceLL` has quit []
thenovices has quit []
<IceDragon>
absolute as in /usr/bin/inkscape
thenovices has joined #ruby
<CorySimmons>
No, I mean, I ran `inkscape /Users/cory/Dropbox/Sandbox/foo_tests/uploadables/illustrator_new.ai --export-plain-svg=/Users/cory/Dropbox/Sandbox/foo_tests/tests_old/results/illustrator_new.svg`
<CorySimmons>
From Terminal, and it worked
dayepa has quit [Ping timeout: 276 seconds]
vlad_sta_ has joined #ruby
fphilipe has quit [Remote host closed the connection]
thenovices has quit [Client Quit]
mary5030 has joined #ruby
yfeldblum has joined #ruby
thenovices has joined #ruby
<IceDragon>
oh, you're using a Mac
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
coderhs has quit [Ping timeout: 260 seconds]
fphilipe has joined #ruby
kreantos has joined #ruby
bobrenjc93 has quit [Client Quit]
<IceDragon>
> has no idea what to do now
Mars has joined #ruby
<CorySimmons>
lol okay thanks anyway
dayepa has joined #ruby
Mars is now known as Guest5768
<CorySimmons>
Is it possible that Ruby doesn't have access to the `inkscape` command?
dayepa1 has quit [Ping timeout: 276 seconds]
<IceDragon>
once again, I point at your internal $PATH
<IceDragon>
ruby might not be importing your PATH variable properly
<mikecmpbll>
CorySimmons: what's the actual error?
<workmad3>
IceDragon: or, more likely, it's being run in such a way that it doesn't get a login shell and so the shell doesn't have the appropriate path
<CorySimmons>
mikecmpbll: image_manipulation.rb:5:in `exec': No such file or directory - inkscape (Errno:: from image_manipulation.rb:5:in `<main>'
zigomir has quit [Remote host closed the connection]
<workmad3>
CorySimmons: did you just recently install inkscape?
<CorySimmons>
Yes
<CorySimmons>
And I'm using rbenv if that makes a difference
vlad_starkov has quit [Ping timeout: 252 seconds]
<workmad3>
CorySimmons: and if so, did you reload the shell you're running that file in since install?
mary5030_ has joined #ruby
zigomir has joined #ruby
<mikecmpbll>
^
<CorySimmons>
Oh, yes
mengu has quit [Remote host closed the connection]
<CorySimmons>
And restarted my computer and everything
dayepa1 has joined #ruby
zigomir has quit [Read error: Connection reset by peer]
<workmad3>
CorySimmons: how are you running the ruby process that errors?
mary5030 has quit [Read error: Connection reset by peer]
zigomir has joined #ruby
<CorySimmons>
workmad3: What do you mean exactly?
<CorySimmons>
`ruby image_manipulation.rb`
fphilipe has quit [Ping timeout: 245 seconds]
Hobogrammer_ has quit [Ping timeout: 276 seconds]
<CorySimmons>
Should I try sudo'ing it?
<workmad3>
CorySimmons: no
nowthatsamatt has joined #ruby
freerobby has joined #ruby
<IceDragon>
D8< Though shall not sudo within a ruby program
<workmad3>
CorySimmons: does 'which inkscape' give you anything after that errors?
<workmad3>
CorySimmons: right, so inkscape isn't on your PATH
<CorySimmons>
I mean, I can use it from the command line
<CorySimmons>
Wtf right?
<CorySimmons>
That command I posted above completely works
<CorySimmons>
But yeah, apparently it's not in my PATH somehow?
<workmad3>
CorySimmons: how about 'type inkscape' ?
dayepa1 has quit [Ping timeout: 276 seconds]
RaCx has joined #ruby
dayepa1 has joined #ruby
<CorySimmons>
workmad3: inkscape is a function with definition; function inkscape; /Applications/Inkscape.app/Contents/Resources/bin/inkscape $argv; end
<workmad3>
CorySimmons: aha, there we go :D
<workmad3>
CorySimmons: inkscape isn't a command on your PATH, it's a function in your shell
<CorySimmons>
Ah I see
<mikecmpbll>
lmao
<CorySimmons>
An alias
<CorySimmons>
:D
<workmad3>
CorySimmons: no
<workmad3>
CorySimmons: an alias would work
<CorySimmons>
Well, a function that kinda acts like an alias right?
<workmad3>
CorySimmons: yeah, it's basically an alias written by someone who has no fucking clue what to do in a shell :)
<IceDragon>
oliver_bK: check your gist, I just commented on it
<mikecmpbll>
nice debugging, workmad3.
Sid05 has quit [Ping timeout: 252 seconds]
<CorySimmons>
workmad3: haha, I think I wrote it
<workmad3>
CorySimmons: hehe
dayepa has quit [Ping timeout: 276 seconds]
<workmad3>
CorySimmons: sorry for the insult then... but :P ;)
<IceDragon>
workmad3: Ruby detective!
dayepa has joined #ruby
jamesaanderson has joined #ruby
<workmad3>
CorySimmons: I'd suggest you either add that location to your PATH or provide a way in your script to push in an absolute path to inkscape
<workmad3>
IceDragon: shell detective more like ;)
<workmad3>
CorySimmons: or you could create a script '/usr/local/bin/inkscape' with the lines '#!/bin/bash; pushd /Applications/Inkscape.app/Contents/Resources/bin; inkscape $*; popd'
RaCx has quit [Quit: Computer has gone to sleep.]
dayepa has quit [Ping timeout: 276 seconds]
<workmad3>
CorySimmons: where ; is a newline
coderhs has joined #ruby
<CorySimmons>
Can't I just symlink it like suggested?
<CorySimmons>
What's the diff?
<workmad3>
CorySimmons: you could, but that script will ensure that the cwd for the script is correct regardless of the way you invoke it
ms_steampunk has quit [Quit: sleeeep]
dayepa has joined #ruby
nomenkun has joined #ruby
<workmad3>
CorySimmons: it'll probably work either way
<workmad3>
CorySimmons: ah, you're using fish shell? ok, then I'd suggest you try the wrapper script then
tylersmith has joined #ruby
<CorySimmons>
workmad3: Which one is the wrapper script?
<CorySimmons>
alias inkscape="/Applications/Inkscape.app/Contents/Resources/bin/inkscape" ?
<workmad3>
CorySimmons: no, the one I suggested
<CorySimmons>
Ahh
<CorySimmons>
So genius :)
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dayepa1 has quit [Ping timeout: 276 seconds]
renklaf has quit [Ping timeout: 260 seconds]
Xeago has quit [Read error: Connection reset by peer]
<CorySimmons>
Do those have extensions on them, or do I just `touch /usr/local/bin/inkscape`?
tesuji has quit [Ping timeout: 245 seconds]
tobago has quit [Remote host closed the connection]
Xeago has joined #ruby
dayepa1 has joined #ruby
noop has quit [Ping timeout: 272 seconds]
pedda has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
<workmad3>
CorySimmons: well, you want to put the stuff I suggested into /usr/local/bin/inkscape
<CorySimmons>
workmad3: Yeah I just touch/edited it
renklaf has joined #ruby
<CorySimmons>
Getting: unknown command 'inkscape' now though
<workmad3>
CorySimmons: you know you don't need to touch a file before editing it, right? :)
<CorySimmons>
I think it's probably an issue with Fish
Jetchisel has quit [Quit: "Unfortunately time is always against us" -- *Morpheus*]
DaniG2k has joined #ruby
<CorySimmons>
workmad3: Oh yeah, I forgot :)
dayepa has joined #ruby
<lastWhisper_>
hey guys, if I'm running a cucumber test suite, and my ruby process is getting higher after each scenario, like 900mb. if I were to put a binding.pry in the middle, and do GC.enable;GC.start, would that bring the process's memory down at all? or no? Am I looking at the problem the wrong way?
ahmedelgabri has quit [Remote host closed the connection]
Xeago has quit [Ping timeout: 276 seconds]
<CorySimmons>
workmad3: Works!!!
<CorySimmons>
Thank you so much
<workmad3>
CorySimmons: np
<workmad3>
now back to figuring out my own scripting needs :)
OdNairy has joined #ruby
dayepa1 has quit [Ping timeout: 276 seconds]
dayepa has joined #ruby
Advocation has joined #ruby
Hanmac1 has quit [Ping timeout: 272 seconds]
lmickh has joined #ruby
snath has quit [Ping timeout: 248 seconds]
starkhalo has joined #ruby
blandflakes has joined #ruby
dayepa1 has joined #ruby
<CorySimmons>
workmad3: Let me know if you need an image :)
jlast_ has joined #ruby
nettoweb has joined #ruby
aletip has joined #ruby
gja has joined #ruby
jlast_ has quit [Read error: Connection reset by peer]
jlast_ has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
blandflakes_ has joined #ruby
<CorySimmons>
Anyone know how to get all these execs to run at the same time? http://pastie.org/pastes/8629575/text For instance, if I run this `ruby image_manipulation.rb` it will execute the first `exec` then not proceed to the next one.
<CorySimmons>
IceDragon: Is this an instance where I'd use `system` or `IO`?
rickruby has joined #ruby
<IceDragon>
in the ruby process?
tagrudev has quit [Remote host closed the connection]
blandflakes has quit [Disconnected by services]
blandflakes_ is now known as blandflakes
<IceDragon>
I think its still limited to single process
<IceDragon>
CorySimmons: try placing an & after the command
krz has quit [Read error: Operation timed out]
<IceDragon>
that will fork it to the background
dayepa has joined #ruby
mechanicles has joined #ruby
tannerburson has quit [Quit: tannerburson]
jlast has quit [Ping timeout: 260 seconds]
camilasan has quit []
Macaveli has quit [Read error: Connection reset by peer]
<havenwood>
thaifood: You need DevKit to build C extensions on Windows.
Es0teric has quit [Quit: Nigga, im OUTIE 5000]
<thaifood>
i installed devkit
<havenwood>
thaifood: oh, looks like you already have it, aye
dayepa has joined #ruby
<yan_>
anyone know if it's possible for bundler to package+install all to local dir? similar to python's virtualenv. i'm trying to grab all dependencies to a project, but 'bundle package' is insisting on installing all the dependencies to the system first
gja has quit [Quit: This computer has gone to sleep]
CorySimmons has quit [Quit: Leaving.]
centrx has joined #ruby
dayepa1 has quit [Ping timeout: 276 seconds]
Guest47036 has quit [Ping timeout: 276 seconds]
gopat has quit [Remote host closed the connection]
CorySimmons has joined #ruby
bean has joined #ruby
razibog has quit [Ping timeout: 272 seconds]
<thaifood>
is livereload gem broken ?
<thaifood>
is that what it means ?
meatherly has joined #ruby
<havenwood>
thaifood: it very possibly doesn't compile on windows, i don't know. you might want to submit an Issue to them.
<thaifood>
ok thanks
dayepa1 has joined #ruby
<havenwood>
yan_: `bundle --deployment` will install the gems into a local `vendor/` folder
<havenwood>
CorySimmons: I mean do you want them to all run at the same time in parallel on their own core if available? If so, fork. Or just concurrently, if so thread. Or just one after the other, no need for parallelism or concurrency.
lfox has joined #ruby
dayepa1 has joined #ruby
Spami has joined #ruby
h_kon has quit [Remote host closed the connection]
Emmanuel_Chanel has quit [Ping timeout: 260 seconds]
<havenwood>
CorySimmons: If they don't need to be run at once, just run one after the other (can't do that with exec, since you'll kill the parent process).
aspiers has quit [Quit: WeeChat 0.4.1]
meatherly has quit [Read error: Connection reset by peer]
<havenwood>
CorySimmons: Try one after another, running the command inside backticks ``, or #system instead of #exec.
<LastWhisper>
Whenever I visit a page using my cucumber test, my ruby process get a lot higher in memory, is there a way to avoid it doing that? ^^ Any settings I can change or so ?
shaunbaker has joined #ruby
Fly80 has joined #ruby
sassamo has joined #ruby
r0bby_ is now known as robbyoconnor
<havenwood>
CorySimmons: Like `ls` or system('ls')
<IceDragon>
LastWhisper: avoid using ruby for C oriented data (like huge arrays)
meatherly has joined #ruby
aspiers has joined #ruby
<IceDragon>
otherwise, nope :x
<LastWhisper>
Hmm
ahmedelgabri has joined #ruby
<shevy>
IceDragon but I wanna use ruby for EVERYTHING
<IceDragon>
shevy: BUT YOU CANTZ
Emmanuel_Chanel has joined #ruby
<shevy>
when I go to toilet, I wanna use ruby
<havenwood>
LastWhisper: Why is it using a lot of memory? Headless browser testing or something?
<shevy>
when I eat a cheeseburger, I wanna use ruby
<LastWhisper>
yeah havenwood
dayepa has quit [Ping timeout: 276 seconds]
<LastWhisper>
but the driver processors are okay
<LastWhisper>
it's really just the ruby process
<IceDragon>
shevy: You use perl and python for that, just watch out for the camel poo and bite marks
<LastWhisper>
like every time i refresh that page
<havenwood>
LastWhisper: Tried with Ruby 2.1?
<LastWhisper>
it grows by like 30mb
terrellt has joined #ruby
<IceDragon>
shevy: ruby is what you use to breakfast, lunch and dinner
<LastWhisper>
nah not yet, we have a gem that doesnt like 2.1 yet
Hanmac1 has joined #ruby
<LastWhisper>
Does 2.1 optimize GC for that or something?
<havenwood>
LastWhisper: 2.1.1 will prolly be the sweet spot for upgrade. ;)
<IceDragon>
LastWhisper: it might be caching something
kpshek has joined #ruby
<havenwood>
LastWhisper: Really nice GC improvements. Would help with stop the world issues but if it'd reduce memory usage I don't know.
figgleberry has joined #ruby
jlast_ has quit [Remote host closed the connection]
<LastWhisper>
let me look into caching actually, IceDragon
dayepa1 has quit [Ping timeout: 276 seconds]
senj has joined #ruby
<LastWhisper>
havenwood: haha alright I will try it out locally, I guess ^.^
dayepa has joined #ruby
jlast has joined #ruby
Hanmac has quit [Ping timeout: 245 seconds]
gja has quit [Quit: This computer has gone to sleep]
jlast has quit [Read error: Connection reset by peer]
jlast has joined #ruby
jlast has quit [Remote host closed the connection]
<CorySimmons>
Ha. Figured it out. IceDragon this was one of those times where I solely needed `system` to make it work
jlast has joined #ruby
freezey has quit [Remote host closed the connection]
<apeiros>
IceDragon: I'm sorry, you're too cold for me to screw you :)
p8952 has quit [Ping timeout: 272 seconds]
<IceDragon>
I wouldn't want to be either way :x
Hobogrammer has joined #ruby
jayg_ has quit [Client Quit]
dayepa1 has quit [Ping timeout: 276 seconds]
w4pm has joined #ruby
dayepa has joined #ruby
Xeago_ has quit [Remote host closed the connection]
ce_afk is now known as cescalante
juarlex has joined #ruby
<zxd>
hi
<IceDragon>
hi
<zxd>
is there a perldoc equivalent to ruby?
<IceDragon>
rdoc, yard etc..etcc?
<apeiros>
rdoc & yard
psst has quit [Ping timeout: 248 seconds]
<hoelzro>
ri
<apeiros>
I think there's others, but those two have probably the highest quality
<IceDragon>
and a few other obscure ones
<apeiros>
ah, ri is the reader for rdocs
<apeiros>
hoelzro: funny, I first read that as "hi" :D
nari has quit [Ping timeout: 252 seconds]
<hoelzro>
heh
heidi has joined #ruby
Xeago has joined #ruby
dayepa1 has joined #ruby
nemesit|znc has quit [Ping timeout: 246 seconds]
<LastWhisper>
IceDragon: I tried out w/ and without caching
aspires has joined #ruby
maz-dev has left #ruby [#ruby]
jhaals has quit [Ping timeout: 272 seconds]
<IceDragon>
and the verdict?
LekeFly has joined #ruby
<LastWhisper>
IceDragon: and it seems like they both grow regardless of it being on or off,... but if I have GC turned on it's not happening
<LastWhisper>
Sadly it looks like I'll have to leave GC on during my cucumber runs
<LastWhisper>
slowing it all down :<
MrZYX|off is now known as MrZYX
<IceDragon>
might be a memory leak, or just turn the GC on and off from time to time
rickruby has joined #ruby
psyl0n has quit [Remote host closed the connection]
w4pm has quit [Ping timeout: 252 seconds]
<hoelzro>
zxd: are you looking for guidance on writing docs, or reading them?
jhaals has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
dayepa has joined #ruby
<LastWhisper>
The thing that bugs me is... if I turn GC off, and then turn it on again later, it "cleans up" but doesn't lower the memory... e.g. Process is 900 mb, GC is off, Scenario ends, I turn GC on, next scenarios do not grow, it stays around 900mb. BUT; If I leave GC on from the start, the process doesn't grow past 400mb
_Andres has quit [Read error: Connection reset by peer]
nemesit|znc has joined #ruby
<hoelzro>
LastWhisper: that's because it marks the memory as free for Ruby to use, but it doesn't return it to the OS
<LastWhisper>
Is there a way to force it to return it? :(
<hoelzro>
no
mnemon has quit [Quit: No Ping reply in 180 seconds.]
<LastWhisper>
GC.please_return_memory_thanks
<hoelzro>
it's because of how memory allocation from the OS works
mnemon has joined #ruby
<hoelzro>
(at least on Linux)
<LastWhisper>
mmk
tylersmith has quit [Remote host closed the connection]
<LastWhisper>
Also that's another thing...
<LastWhisper>
I develop these tests on OSX
<IceDragon>
GC.gimme_back_my_mbs_kthxbye
<IceDragon>
if only ruby had some more humor in the GC
<IceDragon>
;(
<LastWhisper>
but run them on travis ci which is linux
RaCx has quit [Quit: Computer has gone to sleep.]
<hoelzro>
OS X's memory managment probably functions similarly
<IceDragon>
I don't there is anyway to forcefully invoke the GC
rickruby has quit [Remote host closed the connection]
<IceDragon>
GC.collect_noah
<IceDragon>
based on what a friend of mine said, OSX will allocate all the memory it needs at once
<IceDragon>
and will never let it go :x
dayepa1 has quit [Ping timeout: 276 seconds]
<IceDragon>
translation: it hordes it
<hoelzro>
OS X, or Ruby?
marcoecc has quit [Ping timeout: 245 seconds]
<centrx>
GC.start ?
dayepa1 has joined #ruby
<zxd>
hoelzro: readin
<hoelzro>
Ruby will free() things when it GC's them
<hoelzro>
zxd: then you want ri
<IceDragon>
OSX
<hoelzro>
but depending on how free() works, it may not return it to the OS
<hoelzro>
a lot of implementations assume that if you needed it once, you'll need it again
noname001__ has quit [Ping timeout: 272 seconds]
senayar_ has joined #ruby
<IceDragon>
centrix: oh yeah
<hoelzro>
also, if you're allocating memory by increasing the program break, you probably can't just lower it again
<apeiros>
LastWhisper: there's no point in giving memory back to the OS
dayepa has quit [Ping timeout: 276 seconds]
Mars has joined #ruby
<apeiros>
LastWhisper: any decently modern OS will not care how many MB of memory a process wants. remember, not all is mapped to actual physical memory.
nemesit|znc has quit [Max SendQ exceeded]
Mars is now known as Guest20277
<hoelzro>
apeiros: that's an excellent point; thanks for pointing it out
<hoelzro>
hopefully your objects aren't scattered across virtual memory =)
nemesit|znc has joined #ruby
<IceDragon>
oh crap, spaghetti mappings
dayepa has joined #ruby
Virtualize has joined #ruby
rickruby has joined #ruby
<LastWhisper>
apeiros: Well, I was deferring GC previously in my runs, and my ruby process was hitting 2600mb on travis, and our travis RAM limit is 3 GB... so ... it was swapping around 1 gb, and crashing
<apeiros>
hoelzro: I think even that doesn't matter much. how it aligns on pages is the only relevant thing. not an expert, though.
guilund has quit []
andikr has quit [Remote host closed the connection]
<hoelzro>
apeiros: right, I mean if you have your objects scattered across many pages
<apeiros>
LastWhisper: ah well, yes, *that* would be an issue :)
dayepa1 has quit [Ping timeout: 276 seconds]
arturaz has quit [Ping timeout: 276 seconds]
senayar has quit [Ping timeout: 252 seconds]
<hoelzro>
it's better to have two objects right next to each other than 4K away
drumusician has quit [Read error: Operation timed out]
dayepa1 has joined #ruby
Fractional has joined #ruby
<apeiros>
LastWhisper: odd that it crashes. I'd expect "soft" memory limits to work the same as hard ones
<apeiros>
i.e., it shouldn't crash. just get slower.
<Fractional>
apeiros: I've a question for you.
<LastWhisper>
I believe it was crashing due to travis's actual hardware limitations, like, outside the VM
<Fractional>
apeiros: How would you do a method that removes dublets of a number in an array?
yfeldblum has quit [Ping timeout: 245 seconds]
<apeiros>
and slower only too when it actually uses more physical memory than available
<LastWhisper>
I'm also not sure it was ruby crashing or anything like that, I think it was just travis killing the process b/c of high swaps
jlast_ has joined #ruby
<IceDragon>
Fractional: array.uniq
<apeiros>
LastWhisper: yeah, still, an app shouldn't crash due to insufficient physical memory
<Fractional>
IceDragon: We have to write the method ourselfs.
colonolGron has joined #ruby
Guest20277 has quit [Ping timeout: 245 seconds]
<IceDragon>
boo hoo
<apeiros>
Fractional: with such questions, I want to see your approach first ;-)
<Fractional>
apeiros: Roger
<LastWhisper>
I agree apeiros. Just doing my best to figure out this whole issue and how to optimize it ^.^
dayepa has quit [Ping timeout: 276 seconds]
einarj_ is now known as einarj
zigomir has quit [Remote host closed the connection]
<apeiros>
LastWhisper: yeah, sure. you can't change that it crashes, so it's not helpful that it *shouldn't* :)
<shevy>
Fractional can't you just use .uniq
jlast has quit [Ping timeout: 252 seconds]
zigomir has joined #ruby
<mikecmpbll>
rake tasks get killed when there's insufficient memory.
dayepa has joined #ruby
ahmedelg_ has joined #ruby
phansch has quit [Ping timeout: 245 seconds]
mneorr has quit [Remote host closed the connection]
lorelei_ has joined #ruby
phansch has joined #ruby
Xeago has quit [Remote host closed the connection]
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mneorr has joined #ruby
burlyscudd has joined #ruby
dayepa1 has quit [Ping timeout: 276 seconds]
senj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Fractional>
shevy: No, we're working with array algorithms in class atm :P
<shevy>
hmm
RaCx has joined #ruby
<Fractional>
I solved it but its not very ruby-like.
ahmedelgabri has quit [Ping timeout: 272 seconds]
<Fractional>
Did it the way I would have done it in C++. Please come with ruby feedback ;)
vallieres_ has quit [Quit: Computer has gone to sleep.]
<soahccc>
Fractional: well ruby like would be .uniq or using Set =)
rickruby has quit [Remote host closed the connection]
mneorr has quit [Ping timeout: 272 seconds]
senj has joined #ruby
<shevy>
I keep on thinking over and over again that writing bindings for ruby must be significantly more work than in the other languages
<apeiros>
Fractional: deleting from an array while iterating over it will break your code
momomomomo has quit [Quit: momomomomo]
<Fractional>
apeiros: How is that so? Works perfectly :P
gemmy has joined #ruby
<apeiros>
Fractional: it will skip entries
<apeiros>
consider this: you iterate over [1,2,3,4] starting at 0, at index 1 you delete index 1, your array is now [1,3,4] - what's the next number you'll access?
dayepa1 has quit [Ping timeout: 276 seconds]
<Fractional>
It doesn't break the code though. (No crashes, no wrongly returned values etc.)
<LastWhisper>
apeiros: one of my coworkers just brought up a good point... that essentially my process might show up saying it's using 900mb, but the only real memory it's using is much lower than that, it has 900mb allocated for it, but that doesnt mean it's actually using all of that, I think you guys explained that to me as well but now it makes double the sense :)
itadder_ has joined #ruby
<itadder_>
back at work
<bilbo_swaggins>
j = i + 1
<itadder_>
it a monday so much work
<bilbo_swaggins>
just say that
radic has quit [Read error: No route to host]
<itadder_>
brb
radic has joined #ruby
<apeiros>
LastWhisper: yes, that's what I said wrt physical memory ;-)
dayepa1 has quit [Ping timeout: 276 seconds]
gja has quit [Quit: This computer has gone to sleep]
<apeiros>
and that's the reason why ruby won't return memory to the OS (because it doesn't, or rather shouldn't, matter)
senayar_ has quit [Remote host closed the connection]
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
senayar has joined #ruby
<Fractional>
Can someone help me translate this code into each_with_index loops?
<apeiros>
Fractional: I'd only convert the outer `for` into each_with_index
<apeiros>
Fractional: the inner you can convert to a max.down_to(min) loop
<apeiros>
if you do it in that order, you get rid of your "deletion destroys order" problem too
sambao21 has quit [Quit: Computer has gone to sleep.]
mklappstuhl has quit [Remote host closed the connection]
dayepa has quit [Ping timeout: 276 seconds]
CorySimmons has quit [Quit: Leaving.]
<shevy>
apeiros will micro-perfect your code Fractional
<bilbo_swaggins>
okay now I see what you're trying to do
<apeiros>
i.e., if you delete from the back/end, it will not interfere with your iteration
kreantos has quit [Ping timeout: 252 seconds]
<bilbo_swaggins>
Why not use a set/#uniq? Just for a challenge?
<shevy>
then your tutor will say "hey, this was written by an expert, not you. YOU FAILED THUSLY!"
MindfulMonk has quit [Ping timeout: 248 seconds]
mityaz has joined #ruby
<apeiros>
Fractional: anyway, you showed my your implementation, I'll show you how I'd do it: require 'set'; def array_uniq(ary); ary.to_set.to_a; end
sambao21 has joined #ruby
Hanmac has joined #ruby
dayepa has joined #ruby
dscrd has joined #ruby
CorySimmons has joined #ruby
burlyscudd has quit [Quit: Leaving.]
heftig has quit [Quit: Quitting]
nvrch has quit [Quit: nvrch]
<apeiros>
if that's considered cheating, then: def array_uniq(ary); ary.each_with_object({}) { |item, hash| hash[item] = true }.keys; end
<apeiros>
if we can't assume ordered arrays and should have a stable (== order retaining) uniq method:
timonv has quit [Remote host closed the connection]
e62 has joined #ruby
<apeiros>
def array_uniq(ary); seen={}; result = []; ary.each { |item| next if seen[item]; seen[item] = true; result << item }; result; end
maletor has joined #ruby
<apeiros>
all of these versions are O(n) in complexity, compared to yours which is O(n^2)
Hanmac1 has quit [Ping timeout: 252 seconds]
noop has joined #ruby
fedez77 has joined #ruby
dayepa1 has quit [Ping timeout: 276 seconds]
<apeiros>
(or actually worse, since delete_at also as O(n) tied costs, just with a very small K)
<Fractional>
Sorry, there's something getting me confused with the index and name of the object in the each_with_index loop. Do you think you could make an example of the way I did it in for loops?
<Hanmac>
apeiros: lets add yield into the method ;P
Xeago has joined #ruby
dayepa1 has joined #ruby
<apeiros>
Hanmac: ok: #yield
tharindu is now known as tharindu|away
<apeiros>
each_uniq would actually be a nice method :)
<TMM>
I'm using 'grape' to make a REST api and it's working well, but it appears that trying to have a resource with dots in the name is a problem. Has anyone ever tried this?
tharindu|away is now known as tharindu
<TMM>
resource :certificate_status do ....... required :certificate_status, :type => String, .... seems to always make Grape thing that the resource doesn't exist, and my handler doesn't get called
dayepa1 has quit [Ping timeout: 276 seconds]
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
heidi has quit [Quit: Leaving.]
CaptainJet has joined #ruby
wildroman2 has quit [Remote host closed the connection]
dayepa has joined #ruby
troyready has joined #ruby
RaCx has quit [Ping timeout: 260 seconds]
Hanmac1 has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
dkamioka has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
p8952 has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
gja has joined #ruby
gja has joined #ruby
momomomomo has joined #ruby
vim_shim_ is now known as manfred_macx
dayepa has joined #ruby
<soahccc>
hmm can I safely clear a mutex in it's synchronize block or is this a bad idea?
lethjakman has joined #ruby
mikecmpbll has quit [Ping timeout: 252 seconds]
aryaching has quit []
LiohAu has joined #ruby
<lethjakman>
hey, so I'm looking at getting confident ruby, are there any better books for ruby? I have the basics down pretty well, but I want to get more advanced, and I'd like to see more specific ruby design patterns
dayepa1 has quit [Ping timeout: 276 seconds]
<LiohAu>
what does the [ ] syntax means here ? 'wait_for_elements_exist([trait])'
mercwithamouth has quit [Ping timeout: 260 seconds]
<soahccc>
LiohAu: array
RaCx has quit [Quit: Computer has gone to sleep.]
phansch has quit [Quit: Leaving]
timonv has joined #ruby
<LiohAu>
soahccc: oh it's only creating an array with "trait" as only item right?
JustinAiken has joined #ruby
<soahccc>
yes
<bilbo_swaggins>
lethjakman: "Design patterns in ruby"
<bilbo_swaggins>
"ruby for pentesters"
<lethjakman>
LiohAu: is trait declared earlier? cause that's not a string.
aryaching has joined #ruby
<lethjakman>
bilbo_swaggins: that sounds very interesting...
<soahccc>
lethjakman: I would recommend looking at actual projects and how they do stuff.
<lethjakman>
wouldn't have even thought to have looked for that, but I have a feeling I would enjoy it.
dkamioka has joined #ruby
gr33n7007h has joined #ruby
<lethjakman>
soahccc: that's what I've currently been doing
<LiohAu>
lethjakman: sure it's a method
mansi has quit [Remote host closed the connection]
vallieres_ has joined #ruby
mansi has joined #ruby
dayepa1 has joined #ruby
kep has joined #ruby
<lethjakman>
bilbo_swaggins: can you link me? I'm not sure I'm finding the exact book you're looking at.
<soahccc>
lethjakman: That way you see a whole bunch of different ways rather than the one which is preferred by the books author
<shevy>
so we now know that most ruby guys use spaces and not tabs
Sawbones has quit [Ping timeout: 272 seconds]
Hobogrammer_ has joined #ruby
timonv has quit [Read error: Connection reset by peer]
<bilbo_swaggins>
I thought that was The Thing for a long time
timonv has joined #ruby
dayepa1 has quit [Ping timeout: 276 seconds]
mansi has quit [Ping timeout: 276 seconds]
Ox6abe has quit [Remote host closed the connection]
<shevy>
the data in "Whitespace around operators, colons, { and }, after commas, semicolons" seems wrongful
<shevy>
it insinuates that
<shevy>
a,b = 1, 2
<shevy>
is more popular than
<shevy>
a, b = 1, 2
<bilbo_swaggins>
I always put a space after a comma
<MrZYX>
yeah, it mixes too many things
dayepa1 has joined #ruby
Sawbones has joined #ruby
<bilbo_swaggins>
I don't really like the convention of { block spacing }
mneorr has quit [Remote host closed the connection]
<bilbo_swaggins>
I.think {|this| looks better}
IcyDragon has joined #ruby
SilentLapNix has joined #ruby
mengu has quit [Ping timeout: 252 seconds]
pushpak has joined #ruby
dkamioka has joined #ruby
<MrZYX>
I guess {|foo| is more popular than { |foo| and you do that all the time in ruby, so that's why that block is more popular
<bilbo_swaggins>
but I'll follow conventions for their own sake
mneorr has joined #ruby
zxd has quit [Ping timeout: 276 seconds]
<shevy>
bilbo_swaggins yes, I also do that, on that site though it is grouped together with other things
mklappstuhl has joined #ruby
Txandy has joined #ruby
<shevy>
curious that they found that
<shevy>
def some_method arg1, arg2
<bilbo_swaggins>
okay let's put it up for a vote
<shevy>
is more popular than
<shevy>
def some_method(arg1, arg2)
Hobogrammer has quit [Read error: Connection reset by peer]
<bilbo_swaggins>
real world Ruby usage, do you write { |blocks| like this } or {|like| this}
<shevy>
second
<Fuzai>
first
<MrZYX>
third
IceDragon has quit [Ping timeout: 272 seconds]
<shevy>
there is no third!
<MrZYX>
{|foo| bar }
<Fuzai>
next?
<bilbo_swaggins>
oh I definitely omit parentheses in method definitions
<shevy>
oh
dayepa has quit [Ping timeout: 276 seconds]
DouweM has quit [Ping timeout: 276 seconds]
<shevy>
bilbo_swaggins added a "foo}"
carraroj has joined #ruby
IcyDragon is now known as IceDragon
cescalante is now known as ce_afk
<bilbo_swaggins>
I like to use parens more like ((method parameter).method + value)
ghr has quit [Quit: Computer has gone to sleep.]
<gr33n7007h>
why is arg not being assigned to lang?
JustinAiken has left #ruby [#ruby]
einarj has quit [Remote host closed the connection]
<bilbo_swaggins>
I probably do a lot of things with Ruby syntax that professionals would cringe about
<gr33n7007h>
can't lang be mutated or something
dayepa has joined #ruby
pen has joined #ruby
zipper has quit [Quit: leaving]
einarj has joined #ruby
<gr33n7007h>
ahhh!
Mars has joined #ruby
<shevy>
gr33n7007h just unfreeze your string object like via .dup
dayepa1 has quit [Ping timeout: 276 seconds]
maletor has joined #ruby
Hobogrammer_ has quit [Ping timeout: 272 seconds]
dkamioka_ has joined #ruby
Mars is now known as Guest14996
mneorr has quit [Ping timeout: 246 seconds]
<MrZYX>
gr33n7007h: search points to a frozen string, also .captialize! returns nil if it doesn't change the string, so use search.capitalize to workaround both problems
poulson has quit [Remote host closed the connection]
dkamioka has quit [Ping timeout: 272 seconds]
<shevy>
bilbo_swaggins did you always omit parens when doing method definition in ruby?
<gr33n7007h>
right so I can use dup on lang variable
<gr33n7007h>
trying one minute
<MrZYX>
gr33n7007h: .capitalize (opposed to .capitalize!) already returns a copy, no need to dup it again
dayepa1 has joined #ruby
<bilbo_swaggins>
shevy, to be consistent, yes
<shevy>
hmm
<shevy>
so you never had to actively make a conscious decision pro or contra that
Sawbones has quit [Remote host closed the connection]
<Hanmac1>
gr33n7007h: are you 100% sure you want "search.capitalize!" in the line? i mean it does not make any sense
binaryhat has joined #ruby
drumusician has joined #ruby
saarinen has joined #ruby
juarlex has quit [Remote host closed the connection]
deens has joined #ruby
<shevy>
gr33n7007h you use .capitalize 3 times there in like 5 lines of code, it is better to add a new variable: capitalized = foo.capitalize, then used that variable
<MrZYX>
I'd like to always omit parents around method definitions, but ruby -wc makes yellow dots if I do def foo &block :(
<shevy>
gr33n7007h also use a better pastie, please :(
juarlex has joined #ruby
<Hanmac1>
gr33n7007h: another good idea: put "search.capitalize" in a line before the if, like shevy says
vongrippen has joined #ruby
<shevy>
deserves you right MrZYX :>
dayepa has quit [Ping timeout: 276 seconds]
<shevy>
Hanmac1 do you omit parens in method definitions when there is at least one arg?
<Hanmac1>
shevy hm no, i prefer them with () except there is no arg
<gr33n7007h>
Right here is where im at the dup method works, but should I add search.capitalize before the if or keep with dup
<MrZYX>
there's no need for a dup in this code
dayepa has joined #ruby
<shevy>
Hanmac1 \o/
<shevy>
gr33n7007h use .dup when you have commandline arguments given to you like via ARGV
<workmad3>
shevy: I really hate method definitions that drop the parens :(
<shevy>
workmad3 I too!
dayepa1 has quit [Ping timeout: 276 seconds]
<shevy>
save for 0 argument method definitions
<shevy>
hmm
<workmad3>
yeah
<shevy>
define_method wants parens
<MrZYX>
workmad3: so you hate 60% of the ruby code apparently :P
sLi_ has joined #ruby
<shevy>
60% seems like an awful lot
<shevy>
let me inspect apeiros' habit in this regard ...
* shevy
installs butler ...
<workmad3>
MrZYX: this is dropping the parens in the definition, not the call
<yekta>
Hello, how might I encode special characters like an umlaut as the html attribute in Ruby 1.9.3? I've tried `name.encode(:xml => :text)` and `name.encode(:xml => :attr)` but those do not work.
sambao21 has quit [Quit: Computer has gone to sleep.]
dayepa1 has joined #ruby
<apeiros>
Jamo: maybe you haven't set the terminal to utf-8 correctly?
Hobogrammer_ has joined #ruby
vedic has joined #ruby
pcasaretto has quit [Quit: pcasaretto]
<Jamo>
soahccc: thanks for the link
<Jamo>
qhartman: maybe - ill check my settings (I use iterm2)
Guest12645 has quit [Remote host closed the connection]
kevind__ has joined #ruby
<soahccc>
Jamo: readline also fixes some other things like delete key
smathieu has quit [Remote host closed the connection]
gemmy has quit [Quit: leaving]
smathieu has joined #ruby
<Jamo>
actually delete works in irb
<Jamo>
bt ill try that
dayepa has quit [Ping timeout: 276 seconds]
<vedic>
Hi guys, need an advice. How do you automate your billing? If you want to provide REST API access to customers, how do you automate the billing for that
TMM has quit [Quit: Ex-Chat]
deens has quit [Remote host closed the connection]
dayepa has joined #ruby
<Jamo>
lol - i was usin 1.9.3, and when I changed to 2.0.* it started to work...
Kar- has quit [Ping timeout: 272 seconds]
<Jamo>
feeling stupid :D
<MrZYX>
2.1 is released, go grab it ;P
ahmedelg_ has quit [Ping timeout: 260 seconds]
wedgeV has joined #ruby
<Xeago>
vedic: what do you mean?
Emmanuel_Chanel has quit [Ping timeout: 272 seconds]
SilentLapNix has quit [Ping timeout: 272 seconds]
dayepa1 has quit [Ping timeout: 276 seconds]
maroloccio has quit [Quit: WeeChat 0.4.2]
kevind_ has quit [Ping timeout: 276 seconds]
<shevy>
MrZYX but my yaml files! :(
<MrZYX>
port them to psych already
LiohAu has quit [Ping timeout: 272 seconds]
Zai00 has quit [Quit: Zai00]
mneorr has joined #ruby
sandGorgon has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
rdark has quit [Quit: leaving]
wedgeV has quit [Quit: wedgeV]
echevemaster has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
carraroj has quit [Quit: Konversation terminated!]
avril14th has quit [Read error: Connection reset by peer]
rezzack has joined #ruby
gja has joined #ruby
thenovices has joined #ruby
yfeldblum has joined #ruby
doodleha_ has joined #ruby
<bilbo_swaggins>
Ruby's parentheses work beautifully, though they are nuanced.
<bilbo_swaggins>
itadder_: Ruby is easy to learn the basics of, challenging to master the full toolset and pitfalls, and, optionally, black-belt level programming awaits beyond that
<bilbo_swaggins>
just depends how many potential code maintainers you'd like to exclude
itadder_ has quit [Read error: Connection reset by peer]
<shevy>
idiots arguing over a dead language's spelling
dayepa has joined #ruby
<shevy>
speaking about dead things
<shevy>
Hanmac, how is rxw coming along?
nanoyak has joined #ruby
<apeiros>
Hanmac: yeah, I retweeted that ;-)
<centrx>
shevy, Most of the words in the sentence you just used are Latin
<shevy>
centrx cool, the old romans must have understood me then :-)
<shevy>
I always knew learning latin was a waste of time ;-)
baschtmobil has quit [Ping timeout: 272 seconds]
dayepa1 has quit [Ping timeout: 276 seconds]
<havenwood>
i had a lorem ipsum up years back for a medical board page for them to take a look at, and they called concerned saying that physicians couldn't generally speak latin
sambao21 has quit [Quit: Computer has gone to sleep.]
<shevy>
hehe
paul_k has joined #ruby
<shevy>
they can calculate the world but when it comes to languages, sweat is on their foreheads
DFieldFL has quit [Remote host closed the connection]
ghr has joined #ruby
dayepa1 has joined #ruby
Hanmac1 has joined #ruby
<shevy>
Hanmac it feels as if compiling ruby from source takes longer and longer the higher the version
snath has joined #ruby
mercwithamouth has joined #ruby
mando_ has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
<shevy>
how do mac users get the latest ruby? do they install from a package?
zxd has joined #ruby
deens has joined #ruby
Hanmac has quit [Ping timeout: 276 seconds]
<havenwood>
shevy: `brew install ruby` or `brew install ruby-install chruby` or RVM are common routes
burlyscudd has quit [Quit: Leaving.]
dayepa has joined #ruby
<shevy>
brew will compile from source for them?
jonathanwallace has quit [Quit: ZNC - http://znc.in]
<havenwood>
shevy: yes
<havenwood>
shevy: ruby-2.1.0
<havenwood>
shevy: or `brew install ruby20` etc
Lewix has joined #ruby
burlyscudd has joined #ruby
mando has quit [Ping timeout: 276 seconds]
rudisimo has joined #ruby
dayepa1 has quit [Ping timeout: 276 seconds]
Ox6abe has joined #ruby
mando_ has quit [Ping timeout: 246 seconds]
bricker has joined #ruby
ndrei has joined #ruby
lfox has quit [Ping timeout: 245 seconds]
Liquid-- has joined #ruby
coderhs has joined #ruby
dayepa1 has joined #ruby
<havenwood>
shevy: or you can grab the precompiled binary for your OS X, courtesy of mpapis
yfeldblum has quit [Remote host closed the connection]
<havenwood>
(since whole point is not compiling binaries >.>)
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
jbueza has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
smathieu has quit [Read error: Connection reset by peer]
dscrd has quit [Quit: .]
fedesilva has joined #ruby
dayepa1 has joined #ruby
moted has quit [Quit: moted]
deens has quit [Remote host closed the connection]
smathieu has joined #ruby
wildroman2 has joined #ruby
ahmedelg_ has joined #ruby
moted has joined #ruby
ahmedelgabri has quit [Ping timeout: 252 seconds]
w4pm has joined #ruby
Mars has joined #ruby
Mars is now known as Guest66909
dayepa has quit [Ping timeout: 276 seconds]
deens has joined #ruby
dayepa has joined #ruby
Txandy is now known as Txandy|away
mando has joined #ruby
unixpro1970 has joined #ruby
dayepa1 has quit [Ping timeout: 276 seconds]
juarlex has quit [Remote host closed the connection]
dayepa1 has joined #ruby
<Fuzai>
http://hastebin.com/xeboximawi.rb I've been able to access the class constants with Freetable:: just fine, however if I try to call a class function it claims to not exist. Is there a way to call a class method without creating an instance of the class?
juarlex has joined #ruby
nwertman has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
<MrZYX>
Fuzai: you don't define a class method (hint: it's a method on the class)
<Fuzai>
ok
<MrZYX>
also your indentation is broken and that code... has room for improvement :P
<Fuzai>
it's vim -> sublime messing with it. I started playing with sublime again this morning
dayepa has joined #ruby
<Hanmac1>
Fuzai look at bake = values.zip(types)
<MrZYX>
looks like mixed tabs/spaces, try hitting ctrl+shift+p convert to spaces
pwh has quit []
<shevy>
Fuzai long live sublime! \o/
mocfive_ has joined #ruby
senayar_ has joined #ruby
<shevy>
Fuzai down with the tabs!
dayepa1 has quit [Ping timeout: 276 seconds]
<shevy>
MrZYX posted a link for usage... let me find it...
<shevy>
but the next example isn't on a single line!
<shevy>
and there is no example for {} on multiple lines
w4pm has quit [Ping timeout: 245 seconds]
Hobogrammer_ has joined #ruby
dayepa1 has joined #ruby
RaCx has joined #ruby
juarlex has quit [Ping timeout: 276 seconds]
Guest66909 has quit [Remote host closed the connection]
<apeiros>
funny, from `Avoid do...end when chaining` follows `use {} when you care about the result` :-D
jokke has quit [Quit: WeeChat 0.4.2]
acrussell has quit [Quit: Leaving.]
dayepa has quit [Ping timeout: 276 seconds]
<apeiros>
and from `Always use do...end for … DSLs` follows the other part of my rationale: "use do/end when you care about the side-effect"
nwertman has joined #ruby
dayepa has joined #ruby
baroquebobcat has joined #ruby
<shadoi>
It says NOT to use {} on multiple lines
<shadoi>
it says to use {} when chaining a do..end
ww26 has quit [Ping timeout: 245 seconds]
<apeiros>
actually I shouldn't have left away the other two cases. they fit as well: `Always use do...end for "control flow", "method definitions", … DSLs`
kewubenduben has quit [Ping timeout: 272 seconds]
<apeiros>
yeah, I disagree on the former of those two
burlyscudd has quit [Quit: Leaving.]
<apeiros>
the latter fits my own rationale (as explained)
ww26 has joined #ruby
<shadoi>
*nod*
<shadoi>
I'm not sure I even like doing chaining
Hobogrammer has quit [Ping timeout: 272 seconds]
<shadoi>
I always try to avoid it
jokke has joined #ruby
<shevy>
shadoi are you saying that you don't like optionparser's
<apeiros>
select.map.uniq.whatever # done that quite a bit
<shevy>
end.parse!(ARGV)
<shadoi>
no I mean chaining blocks/procs
rootshift has joined #ruby
<apeiros>
I do tent to assign to lvars more often nowadays, to make the code easier to understand, though.
finnnnnnnnnnn has quit [Quit: finnnnnnnnnnn]
dayepa1 has quit [Ping timeout: 276 seconds]
rootshift has quit [Client Quit]
<shadoi>
yeah I try to use locals for anything where I'd chain a block/proc
dayepa1 has joined #ruby
<apeiros>
shadoi: yeah, select.map.… left the blocks away. should have written select { … }.map { … }.uniq.whatever # done that quite a bit
freezey has quit [Remote host closed the connection]
Thanatermesis has quit [Read error: Connection reset by peer]
<shadoi>
yeah sometimes it's clear enough to do
freezey has joined #ruby
<shadoi>
and to be clear, sometimes I break my own rules if it just makes sense in that context :)
<apeiros>
mhm
gopat has joined #ruby
<apeiros>
blindly following rules isn't wise either.
<apeiros>
all rules have their limits. no rule is perfect.
<apeiros>
(that's a perfect rule which applies unlimitedly)
dayepa has quit [Ping timeout: 276 seconds]
<shevy>
is that a rule that no rule is perfect
Hobogrammer_ has quit [Ping timeout: 245 seconds]
nettoweb has quit [Quit: nettoweb]
<apeiros>
it's a law, and therefore exempt of itself as it's not a rule :D
<shadoi>
lol
dayepa has joined #ruby
<shevy>
shadoi yeah, I find that in ruby one tends to favour what may fit into the code at the given time
<shadoi>
It's part of why I use Ruby
<shadoi>
I don't believe rules belong in the parser
<shadoi>
style rules
nerium has joined #ruby
cbetta_afk is now known as cbetta
ambushsabre has joined #ruby
<apeiros>
you should use lisp
<shevy>
shadoi are you saying that you think indentation-based languages like python got it all wrong?
gregoriokusowski has quit [Quit: gregoriokusowski]
<shadoi>
no it just annoys the shit out of me
<shevy>
hehehe
<apeiros>
^^
<nerium>
Is it possible to tell event machine to start more threads?
nettoweb has joined #ruby
<apeiros>
pythons indentation requirement drove me away back in the day. now I find it genius…
dayepa1 has quit [Ping timeout: 276 seconds]
zegerjan has joined #ruby
Hobogrammer_ has joined #ruby
<shadoi>
Yeah, we use python for most stuff
dayepa1 has joined #ruby
Mars has joined #ruby
<shevy>
genius?
TMM has joined #ruby
<shadoi>
But I still get pissed off at it
Mars is now known as Guest7625
ambushsabre has quit [Client Quit]
dayepa has quit [Ping timeout: 276 seconds]
<_tpavel>
i keep hearing/seeing people using python for random automation and stuff. Why is is better than say Ruby?
monkegjinni has quit [Ping timeout: 260 seconds]
luckyruby has joined #ruby
predator217 has quit [Ping timeout: 245 seconds]
<yxhuvud>
because they know it better
RaCx has quit [Quit: Computer has gone to sleep.]
relix has joined #ruby
mando has quit [Ping timeout: 260 seconds]
simoz3 has joined #ruby
figgleberry has quit [Remote host closed the connection]
soulcake has quit [Ping timeout: 260 seconds]
dayepa1 has quit [Ping timeout: 276 seconds]
<_tpavel>
BTW, I have an open question: what's the quirkiest thing you did with Ruby?
figgleberry has joined #ruby
<Fuzai>
I had a threesome with Ruby
<shadoi>
It's included with every distribution by default now, it's somewhat faster in various situations, and it's just far easier to find people who know it well.
<apeiros>
Fuzai: with ruby and bunga?
ahmedelg_ has quit []
<Fuzai>
:)
dayepa1 has joined #ruby
<luckyruby>
after_validation :geocode, if: ->(obj){ obj.address.present? and obj.address_changed? }
securitycrush has quit [Remote host closed the connection]
burlyscudd has quit [Ping timeout: 260 seconds]
stetho has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Liquid-- has joined #ruby
Hobogrammer has quit [Ping timeout: 272 seconds]
tannerburson has joined #ruby
dayepa has joined #ruby
mocfive has joined #ruby
deens has quit [Remote host closed the connection]
dayepa1 has quit [Ping timeout: 276 seconds]
<Underbyte>
quick question: given a request.body, is there an easy way to copy that request and post it to a different URL?
finnnnnnnnnnn has joined #ruby
gusblan has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
<centrx>
Underbyte, You mean like a redirect?
<lectrick>
Does anyone know of a gem or publicly accessible Ruby codebase that pervasively uses the compositional (as opposed to OO inheritance) pattern?
<Underbyte>
centrix: kind of. Basically what we have now is a little application that takes POST's coming in from an API and persists them in an SQL database. What i'm trying to do is to copy that request and send it off to our Splunk Server for further analysis
sLi_ has quit [Remote host closed the connection]
<Underbyte>
so i don't want to destroy the original request, merely clone it and send the clone off to another server
rudisimo has quit [Quit: Leaving.]
dayepa has joined #ruby
<lectrick>
I've been using it on this or that object but I've noticed things can get difficult when your compositional object has to work with other collaborators stuck in giant inheritance trees, and I want to see how it looks when it's done from the get-go
<Underbyte>
(i don't really care about the originating IP stuff or anything like that)
rudisimo has joined #ruby
<centrx>
Underbyte, You could use Marshal to convert the entire object into a byte stream...
pehlert has joined #ruby
Spami_ has quit [Quit: Leaving]
Hobogrammer has joined #ruby
<centrx>
lectrick, Do you have a link explaining this composite pattern? It looks like inheritance to me
<Underbyte>
what? i'm already using Sequel for the request, why would i have to go that complicated? does sequel not do async posts?
<centrx>
Underbyte, I don't know about Sinatra, you just said you were sending it away for "analysis"
tylersmith has quit [Read error: Connection reset by peer]
<centrx>
Underbyte, Isn't there just a method like: request.body.to_s to stringify the body?
dayepa has quit [Ping timeout: 276 seconds]
tylersmith has joined #ruby
<lectrick>
centrx: basically when you create a class, you don't inherit from anything, but in that class' initializer, you give it the object it delegates to, or wraps. similar to a parent relationship in inheritance, but different
<Hanmac>
centrx: composite: for sample in a widget system when you have a TextCtrl with a PickerButton, and you want to but them into a special parent that keeps the theme of them (with Font and backgroundColor) in sync ... so the widget does neigher have TextCtrl nor the PrickerButton as parent, but have them as elements
<lectrick>
centrx: the advantage is you can achieve pervasive "true unit test" coverage without too much difficulty
Hobogrammer_ has joined #ruby
bean has joined #ruby
dayepa has joined #ruby
<Underbyte>
centrx: I'm not sufficently skilled in ruby (i'm a C guy) to find the answer to this by myself, but literally all i'm trying to do is to take an incoming request, and send it off (via a POST) to another web interface. I can't see this taking more then one or two lines of code.
pehlert has quit [Ping timeout: 260 seconds]
teddyp1cker has joined #ruby
ctp has quit [Read error: Connection reset by peer]
monkegjinni has quit [Remote host closed the connection]
<shevy>
two lines of code!
<shevy>
now that is a challenge
spyderman4g63 has quit []
wij has quit []
dayepa1 has quit [Ping timeout: 276 seconds]
dayepa1 has joined #ruby
popl has quit [Quit: And then there are people who prefer to look their fate in the eye.]
krawchyk has quit []
TMM has quit [Quit: Ex-Chat]
nanoyak has quit [Quit: Computer has gone to sleep.]
<shevy>
I dont even remember the syntax... ri String#downcase I suppose
fphilipe has joined #ruby
maggeg is now known as geggam
atmosx has joined #ruby
smathieu has quit [Remote host closed the connection]
Fire-Dragon-DoL has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
dayepa has joined #ruby
blackmesa has joined #ruby
figglebe_ has quit [Ping timeout: 272 seconds]
cbetta_afk is now known as cbetta
Xeago has quit [Ping timeout: 276 seconds]
subbyyy__ has quit [Ping timeout: 272 seconds]
geggam is now known as notgeggam
g3orge has quit [Quit: WeeChat 0.4.2]
danshultz has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
subbyyy__ has joined #ruby
danshultz has joined #ruby
Lewix has joined #ruby
notgeggam is now known as geggam
<hoelzro>
ri String.downcase also works
<hoelzro>
do you have a better way of viewing docs from the command line?
dayepa1 has quit [Ping timeout: 276 seconds]
Virtualize has quit [Quit: Leaving...]
fphilipe has quit [Ping timeout: 252 seconds]
dayepa1 has joined #ruby
sLi__ has joined #ruby
petertretyakov has quit [Remote host closed the connection]
sLi__ is now known as sLi_
smathieu has joined #ruby
aspires has quit []
brianpWins has joined #ruby
<shevy>
no
gusblan has quit [Read error: Connection reset by peer]
aspires has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
gusblan has joined #ruby
lkba has joined #ruby
<atmosx>
Greetings
<atmosx>
hello shevy
CogitoErgoSum has quit [Ping timeout: 252 seconds]
Lewix has quit [Ping timeout: 245 seconds]
danshultz has quit [Ping timeout: 245 seconds]
sheap has joined #ruby
jlast_ has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
jlast has joined #ruby
CogitoErgoSum has joined #ruby
sheap has left #ruby [#ruby]
finnnnnnnnnnn has quit [Quit: finnnnnnnnnnn]
<shevy>
hey atmosx
Animawish has quit [Quit: Animawish]
<shevy>
are you continuing with your project in ruby?
Virtualize has joined #ruby
dayepa has joined #ruby
<atmosx>
shevy: not exactly. I have an alpha version of my 'metro' project right now.. But needs polishing. No time this week, I have a medicinal chemistry exam on Thursday and I'm getting paranoid
<atmosx>
over it
<atmosx>
...
<shevy>
cool
cbetta is now known as cbetta_afk
dayepa1 has quit [Ping timeout: 276 seconds]
<shevy>
I had one half a year ago
<atmosx>
structures, alterations, etc. never ends
<atmosx>
how did it went?
nettoweb has quit [Quit: nettoweb]
RaCx has quit [Ping timeout: 272 seconds]
burlyscudd has joined #ruby
<atmosx>
I need to somehow handle an exception on a helper and I don't know how to do it..
DouweM has joined #ruby
tylersmith has quit [Read error: Connection reset by peer]
tibuda has joined #ruby
psyl0n has joined #ruby
<atmosx>
I mean, I don't understand which way is the correct way.
Virtualize has quit [Client Quit]
tylersmith has joined #ruby
deens has joined #ruby
<atmosx>
I raised an exception but that sucks too.
<shevy>
the questions were really fucked up...
gusblan has quit [Remote host closed the connection]
dayepa1 has joined #ruby
vlad_sta_ has quit [Ping timeout: 252 seconds]
<atmosx>
yes ours are fucked up too.
juarlex has joined #ruby
RaCx has joined #ruby
<shevy>
one question was like this: "describe the differences between transition-state inhibitors and high-energy-intermediate inhibitors"
<atmosx>
I have 8 tests upon which I'm studying and they have ~ 100 possible structures with possibly different conformations. I was average-to-bad at organic chemistry so for me this is nightmare
<shevy>
hehe
<atmosx>
shevy: oh shit, you had open questions too?
<shevy>
yeah
olivier_bK has joined #ruby
albertgrala has quit [Quit: Leaving]
<atmosx>
The most fucked I came across was to explain what special type of chirality a compound (nifepiredine IIRC) has
<atmosx>
and why
assurbanipal has joined #ruby
<shevy>
cool
<shevy>
never heard of nifepiredine before
<shevy>
what special type does it have? several chirality centers?
dayepa has quit [Ping timeout: 276 seconds]
<atmosx>
Theory is not that hard, the thing is that I have to remember too many structures becuase we have only 45 minutes, which basically means that systematic names are out of question for compounds like erythromycin
<shevy>
"14-membered lactone ring with ten asymmetric centers"
<shevy>
cool
IceyEC has quit [Quit: IceyEC]
<shevy>
how would I be able to find all centers O_O
<atmosx>
hahaha, we have in class this guy... really good friend of mine, he is like a chemistry genious
heftig has quit [Quit: Quitting]
monkegjinni has joined #ruby
<Hanmac>
bad that i dont have a bio-chemistry laboratory ... *i am waiting how shevy react to that ;P *
einarj has quit [Remote host closed the connection]
<shevy>
Hanmac most lab work is boring and repetitive
<atmosx>
in his notes (he passed the exam last week and took a C) erythromycin (take a good look at the structure, don't even try to learn it)
mansi has joined #ruby
dayepa1 has quit [Ping timeout: 276 seconds]
<Hanmac>
shevy yeah and thats my problem with them :(
<atmosx>
Hanmac: why, should you? What do you do? I thought watching and reviewing animes was what people paid you for!
dayepa1 has joined #ruby
subbyyy__ has quit [Ping timeout: 272 seconds]
<atmosx>
I'd kill to be a professional programmer
<shevy>
Hanmac I guess most programming can be pretty boring too. Are you paid to write java?
<atmosx>
instead of reading javascript, ruby, C (building arduino projects) I'm burning myself learnign mechanism of actions of Cox1-2/aspirin etc.
<atmosx>
blah
petey has quit [Remote host closed the connection]
<shevy>
yeah atmosx
sergicles has quit [Quit: sergicles]
<makkura>
atmosx: I wouldn't. :P
<Hanmac>
atmosx: i dont get paid for watching animes ;P ... if i could i would try to cross plants with animals and look what would happen ;P
<shevy>
atmosx I think 95% of the jobs out there suck
* makkura
is technically a professional programmer.
<atmosx>
Hanmac: you monster
mityaz has quit [Quit: See ya!]
<shevy>
lol
<atmosx>
makkura: you don't like it?
DeanH has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
<atmosx>
makkura: how many $$$ you make per year?
RaCx has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
<makkura>
atmosx: There's some joy in it but there's a lot of tedium as well as a lot of making things at the whim of people higher in the chain of managment.
dayepa has joined #ruby
<Hanmac>
atmosx: just image trees that walk away if the climatic in the area is not humid enough anymore ;P
fgo has joined #ruby
<geggam>
devops .... with chef... aka ruby ..can get you 175k/yr in san francisco right now
<bnagy>
Hanmac: banana herbs kind of do that
<geggam>
with experience
<makkura>
I'm at the low end of things at 42 to 44k. My area is on the low end to begin with as well. Costal regions are MUCH better.
kaldrenon has quit [Remote host closed the connection]
<atmosx>
geggam: 175k/year? me or paul graham?
<makkura>
Plus side is cost of living is lower here.
<geggam>
hunh ?
sassamo has quit [Remote host closed the connection]
<geggam>
who is paul graham ?
prc has joined #ruby
mocfive has joined #ruby
mansi has quit [Read error: Connection reset by peer]
<atmosx>
geggam: a Lisp hacker basically, but I don't think ruby would pose a challenge... it's the guy who crates news.ycombinator.com
sassamo has joined #ruby
mansi has joined #ruby
dayepa1 has quit [Ping timeout: 276 seconds]
<geggam>
you will spend 40-60k/yr on housing in san francisco tho atmosx
i_s has joined #ruby
<atmosx>
geggam: aaah
<atmosx>
still
<geggam>
and that isnt really nice :)
<shevy>
damn expensive
<atmosx>
where I live, if you make 30k/year you're rich.
dayepa1 has joined #ruby
<atmosx>
shevy: he said 175k/y
deens has quit [Remote host closed the connection]
kobain has joined #ruby
<geggam>
that is high end devops
<geggam>
120-150 is normal
<atmosx>
you'll be left with 115k a year it's not *low wage*
<makkura>
atmosx: I had a friend that did work as a consultant from a low cost of living area and did well due to that.
<atmosx>
geggam: how would you define a high-end devop?
<atmosx>
devop = developer?
<geggam>
developer with operations
<Hanmac>
bnagy i found cancer cells very interesting ... they are like the spoiled teenager under the cells ... "you tell the cell to die, and the cell says No, just from pure contrariness" ;P
tkuchiki has joined #ruby
<geggam>
its a hybrid thing
<shevy>
Hanmac but they can kill people!!!
<bnagy>
working from cheap countries is Win. \o/ ;)
<shevy>
are you still in nepal
<atmosx>
makkura: well sure, I read stories about people travlling through thailand and landing expensive jobs in the other side of the world, everything is possible but I'm not sure I'm up to the task.
<bnagy>
no, Marshall Islands now
mklappstuhl has joined #ruby
<geggam>
crap... forgot i was tunneled into ec2 brb
geggam has quit [Quit: Leaving]
<shevy>
bnagy you are like a hermit, you live in extreme, distant areas. only north and south pole are missing... ;)
dayepa has quit [Ping timeout: 276 seconds]
<makkura>
atmosx: aye, me either. There's a lot of additional work as an outside consultant since you'd have to, as they say, wear many hats that are not your specialty.
sivoais has quit [Ping timeout: 272 seconds]
geggam has joined #ruby
<shevy>
atmosx a guy here works like 9 months here, then makes 3 months holiday in thailand. it's cheap there for him
<bnagy>
shevy: travel from here is awful though. Nepal was actually pretty well connected
dik_dak has joined #ruby
<atmosx>
thailand? that silly old pedophile
tkuchiki has quit [Remote host closed the connection]
phinfonet has joined #ruby
dayepa has joined #ruby
<atmosx>
Nepal?
<atmosx>
do they have an internet connection in Nepal?
benlieb has joined #ruby
<bnagy>
I just used the 3G
<bnagy>
you can get adsl but it's really bad
tkuchiki has joined #ruby
<Hanmac>
my fam is travling next month to shanghai ... (but i dont have time for that sadly)
mklappstuhl has quit [Remote host closed the connection]
phansch has joined #ruby
<atmosx>
ah okay since 2008 it's a republic
dayepa1 has quit [Ping timeout: 276 seconds]
sLi_ has quit [Remote host closed the connection]
<benlieb>
I'm getting this error when trying to install the ruby debugger gem: i686-apple-darwin11-gcc-4.2.1: error trying to exec 'as': execvp: No such file or directory
thenovices has quit [Remote host closed the connection]
<atmosx>
bnagy: you're american or Nepali?
petey has joined #ruby
<bnagy>
yeah, but the govt is still kinda messed up
<bnagy>
I am neither of those things
sLi_ has joined #ruby
<atmosx>
bnagy: How did you end to nepal then?
Hobogrammer_ has joined #ruby
<benlieb>
anyone have an idea why?
rehat has quit [Ping timeout: 248 seconds]
nanoyak has quit [Quit: Computer has gone to sleep.]
<bnagy>
benlieb: something is broken, but it's hard to tell what just from that
<bnagy>
I thought ruby debugger was old and crusty though
MrThePlague has quit []
shime has joined #ruby
<bnagy>
atmosx: my wife was based there with the IFRC ( red cross )
<benlieb>
bnagy: i thought so too. this page recommends it.
<benlieb>
if I recall, that path is made by macports
<shevy>
ddd the FHS does not really mandate much
dayepa has quit [Ping timeout: 276 seconds]
<ddd>
it does mandate /opt as an expected location for 3rd party applications
alexim has quit [Quit: bye]
<Hanmac>
benlieb: imo the gcc version is a bit smelly ... last time i used rvm on mac, i used mac ports to get newest clang and gcc versions (Yes it can make a difference when you compile ruby with clang or gcc)
gusblan has joined #ruby
dayepa has joined #ruby
<benlieb>
actually made by homebrew on further inspection
<shevy>
"The following directories, or symbolic links to directories, must be in /usr/local"
<shevy>
ohhh
RubyPanther has quit [Ping timeout: 252 seconds]
<shevy>
the symlink requirement, so actually it can be symlinks too
<shevy>
does not seem to state where the symlink should be
dayepa1 has quit [Ping timeout: 276 seconds]
<benlieb>
I can't even tell from that error what the dir is that can't be found
<shevy>
benlieb nah it is a problem in execvp
* Hanmac
waves jedi-like with his hand: "this are not the dirs you are looking for"
ferr has quit [Ping timeout: 248 seconds]
dayepa1 has joined #ruby
<ddd>
Locally installed software must be placed within /usr/local rather than /usr unless it is being installed to replace or upgrade software in /usr.
heftig has joined #ruby
pskosinski has quit [Quit: Til rivido Idisti!]
diegoviola has joined #ruby
cescalante is now known as ce_afk
<ddd>
now that was a change from before because /opt OR /usr/local was used for that
<shevy>
what about /opt
<benlieb>
shevy: so what might i do to get the debugger installed?
<ddd>
now they've changed to just /usr/local/
<shevy>
benlieb no idea, I dont use a mac sorry. but if it would be linux, the problem would be related to binutils 80%, or gcc 15%
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ddd>
The use of /opt for add-on software is a well-established practice in the UNIX community. The System V Application Binary Interface [AT&T 1990], based on the System V Interface Definition (Third Edition), provides for an /opt structure very similar to the one defined here.
CogitoErgoSum has quit [Ping timeout: 245 seconds]
<ddd>
The directories /opt/bin, /opt/doc, /opt/include, /opt/info, /opt/lib, and /opt/man are reserved for local system administrator use. Packages may provide "front-end" files intended to be placed in (by linking or copying) these reserved directories by the local system administrator, but must function normally in the absence of these reserved directories.
<ddd>
The directories /opt/bin, /opt/doc, /opt/include, /opt/info, /opt/lib, and /opt/man are reserved for local system administrator use. Packages may provide "front-end" files intended to be placed in (by linking or copying) these reserved directories by the local system administrator, but must function normally in the absence of these reserved directories.
dayepa has joined #ruby
<ddd>
damn it
<shevy>
echo!
<shevy>
you are drunk again!
<ddd>
I meant to say, Programs to be invoked by users must be located in the directory /opt/<package>/bin or under the /opt/<provider> hierarchy. If the package includes UNIX manual pages, they must be located in /opt/<package>/share/man or under the /opt/<provider> hierarchy, and the same substructure as /usr/share/man must be used.
<shevy>
or your cat handles the keyboard
<shevy>
cool
<shevy>
they recommend a /opt/name scheme?
simoz4 has quit [Ping timeout: 272 seconds]
<shevy>
like /opt/ruby/bin
<ddd>
hehe naa, I thought I'd actually copied to the clipboard, but hadn't replaced like i thought
<ddd>
yeah
<ddd>
or /opt/rubymin-<version/bin
pwh has joined #ruby
rootshift has joined #ruby
<ddd>
for any 3rd party or self written apps the local admin wants to make use of I would guess, from the definition of /opt's use
<ddd>
which kind of links into the use of /usr/local
<shevy>
hehehe
<shevy>
hey
<shevy>
as long as /usr/local/games is mandatory, I am happy
dayepa1 has quit [Ping timeout: 276 seconds]
depesz has joined #ruby
<ddd>
which in an arcane way IS beautiful when you look at /usr/local/opt as it hits both standards.
<ddd>
hah!
<shevy>
right but
<shevy>
the /usr/local/opt is not mandatory
<depesz>
Hi. i'd like to run shell command and get its output, but I can't really use `` because args can be potentially unsafe. What is the correct way to do it?
thumpba_ has quit [Remote host closed the connection]
dayepa1 has joined #ruby
fgo has quit [Remote host closed the connection]
<ddd>
no, /usr/local is mandatory. /opt *was* mandatory, the conventioned, and now i guess purely optional
<ddd>
s/the /then /
teddyp1cker has quit [Remote host closed the connection]
nanoyak has joined #ruby
petey has quit [Remote host closed the connection]
<soahccc>
Hmm Mutex in trap is no good because it needs to be reentrant. Therefore ruby 2 raises and ThreadError (instead of deadlock eventually). But Monitor is reentrant so shouldn't I be able to use it?
klaut has quit [Remote host closed the connection]
dayepa has quit [Ping timeout: 276 seconds]
petey has joined #ruby
kirun has quit [Quit: Client exiting]
colonolGron has quit [Read error: Connection reset by peer]
dayepa has joined #ruby
breakingthings has quit []
diegoviola has quit [Ping timeout: 248 seconds]
dayepa1 has quit [Ping timeout: 276 seconds]
colonolGron has joined #ruby
petey_ has joined #ruby
petey has quit [Read error: Connection reset by peer]
dayepa1 has joined #ruby
shime has quit [Ping timeout: 246 seconds]
gregoriokusowski has quit [Quit: gregoriokusowski]
FDj has joined #ruby
thumpba has joined #ruby
FDj has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
dayepa has quit [Ping timeout: 276 seconds]
smathieu has quit [Remote host closed the connection]
dayepa has joined #ruby
eval-in has quit [Remote host closed the connection]
pel_daniel has quit [Ping timeout: 260 seconds]
eval-in has joined #ruby
smathieu has joined #ruby
<benlieb>
is there an alternative to ruby-debug?
ambushsabre has joined #ruby
io_syl has joined #ruby
w_alexus is now known as w_alexus[afk]
RubyPanther has joined #ruby
rootshift has quit [Quit: rootshift]
dayepa1 has quit [Ping timeout: 276 seconds]
dayepa1 has joined #ruby
brianpWins has quit [Quit: brianpWins]
<grvgr>
benlieb: for ruby 2.0?
<benlieb>
grvgr: yeah
<benlieb>
it looks like pry can do what i need… I think
lorelei_ has joined #ruby
<grvgr>
benlieb: bye bug claims support for 2.0. i haven't tested it though.
<grvgr>
byebug*
phipes has quit [Remote host closed the connection]
claymore has quit [Quit: Leaving]
smathieu has quit [Ping timeout: 252 seconds]
dayepa has quit [Ping timeout: 276 seconds]
dayepa has joined #ruby
<ddd>
yes debugger gem is the alternative
<ddd>
which i mentioned to you in #RubyOnRails
grvgr has quit [Quit: grvgr]
phipes has joined #ruby
<blackmesa>
is there an alternative to FileUtils.cd(File.dirname(__FILE__)) ?
mocfive has quit [Remote host closed the connection]
dayepa1 has quit [Ping timeout: 276 seconds]
coderhs has quit [Ping timeout: 265 seconds]
mocfive has joined #ruby
mark_locklear has quit [Ping timeout: 248 seconds]
mansi has quit [Ping timeout: 272 seconds]
dayepa1 has joined #ruby
fantazo has quit [Ping timeout: 248 seconds]
nhhagen has joined #ruby
fantazo_ has quit [Ping timeout: 276 seconds]
smathieu has joined #ruby
Virtualize has joined #ruby
simoz4 has joined #ruby
brianpWins has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
dayepa has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
clamstar has quit [Quit: Computer has gone to sleep.]
mocfive has quit [Ping timeout: 245 seconds]
b00stfr3ak has joined #ruby
asteros has quit [Quit: asteros]
darthdeus has quit [Read error: Connection reset by peer]
<shevy>
blackmesa well, Dir.chdir
dayepa1 has quit [Ping timeout: 276 seconds]
<shevy>
best would be if one would never have to change directory of course
darthdeus has joined #ruby
IceDragon has quit [Ping timeout: 252 seconds]
lockweel has joined #ruby
<bnagy>
and it's very hard to envision when one _would_ have to
lfox has quit [Quit: ZZZzzz…]
asteros has joined #ruby
dayepa1 has joined #ruby
<blackmesa>
shevy: I saw something like .$ dirname somewhere, which acted in the same way
<blackmesa>
or .$ basename I gues
Attic has joined #ruby
<bnagy>
why do you think you need to change working directory?
dayepa has quit [Ping timeout: 276 seconds]
thumpba has quit [Remote host closed the connection]
Attic has left #ruby [#ruby]
<blackmesa>
in a ruby script I want to load a file from a directory
<bnagy>
so do that
thumpba has joined #ruby
workmad3 has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
<bnagy>
if you want to require ruby files there's require_relative
nettoweb has joined #ruby
<shevy>
blackmesa $: perhaps ?
<bnagy>
if it's some other kind of file then you can use dirname(__FILE__) as you have above
prc has quit [Quit: Leaving.]
jedimind has quit [Disconnected by services]
dayepa has joined #ruby
<ddd>
load "#{File.join(File.dirname(__FILE__), "/config/environment.rb")}" and you can require_relative like bnagy is mentioning
danshultz has joined #ruby
yedimind has joined #ruby
dayepa1 has quit [Ping timeout: 276 seconds]
juarlex has quit [Remote host closed the connection]
juarlex has joined #ruby
nanoyak has joined #ruby
<nhhagen>
I'm planing to write an application on top of elasticsearch, the only interface will be http/json. Can anyone recommend a webservice framework to use? I have looked at rails, but it feels a bit relation db centric.
thumpba has quit [Ping timeout: 246 seconds]
<shevy>
perhaps sinatra
thumpba has joined #ruby
dayepa1 has joined #ruby
<shevy>
the rails guys on #RubyOnRails may know a lot more about that in general btw
<blackmesa>
thx all
<shevy>
I dunno why it is in ruby that, rather than trying to adjust old code I wrote, I find it much easier to rewrite from scratch :(
gregoriokusowski has joined #ruby
<bnagy>
I wasn't aware that rails was relational-centric though
tvw has joined #ruby
<MrZYX>
shevy: I think that's not limited to ruby, but rather is the extra effort you spend with that lower in ruby, thus you do it earlier
deens has joined #ruby
subbyyy__ has quit [Ping timeout: 245 seconds]
makkura is now known as mak|idle
fphilipe has joined #ruby
<nhhagen>
shevy: thx
baordog_ has quit [Remote host closed the connection]
dayepa has quit [Ping timeout: 276 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dayepa has joined #ruby
danshultz has quit [Ping timeout: 260 seconds]
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wildroman2 has joined #ruby
phansch has quit [Quit: Leaving]
baschtmobil has quit [Ping timeout: 272 seconds]
kevind has quit [Read error: Connection reset by peer]
centrx has quit [Quit: Leaving]
juarlex has quit [Ping timeout: 272 seconds]
kevind has joined #ruby
asteros has quit [Quit: asteros]
doodlehaus has quit [Remote host closed the connection]
dayepa1 has quit [Ping timeout: 276 seconds]
IceDragon has joined #ruby
dayepa1 has joined #ruby
DeanH has joined #ruby
simoz4 has quit [Read error: Connection timed out]
fphilipe has quit [Ping timeout: 246 seconds]
deens has quit [Ping timeout: 272 seconds]
sailias has quit [Ping timeout: 272 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
meatherly has quit [Remote host closed the connection]
Alina-malina has quit [Ping timeout: 272 seconds]
dayepa has quit [Ping timeout: 276 seconds]
meatherly has joined #ruby
fedesilva has quit [Read error: Connection reset by peer]
nateberkopec has quit [Quit: Leaving...]
dayepa has joined #ruby
DeanH has quit [Client Quit]
dayepa1 has quit [Ping timeout: 276 seconds]
DeanH has joined #ruby
thenovices has joined #ruby
dayepa1 has joined #ruby
atmosx has quit [Quit: Lost in trance]
meatherly has quit [Ping timeout: 260 seconds]
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
sergicles has joined #ruby
mary5030 has quit [Ping timeout: 245 seconds]
pranny has quit [Quit: Leaving.]
momomomomo has quit [Quit: momomomomo]
monkegjinni has quit [Ping timeout: 252 seconds]
dayepa has quit [Ping timeout: 276 seconds]
dayepa has joined #ruby
rootshift has joined #ruby
fedesilva has joined #ruby
ss_ has joined #ruby
gusblan has quit [Remote host closed the connection]
dayepa1 has quit [Ping timeout: 276 seconds]
asteros has joined #ruby
thenovices has quit [Ping timeout: 272 seconds]
dayepa1 has joined #ruby
Kar- has quit [Ping timeout: 276 seconds]
aryaching has joined #ruby
<benlieb>
using ruby 2.0.0p247, `puts` is adding <br /> to my console and command line? What's up? How can I stop this?
TheShaun has joined #ruby
Alina-malina has joined #ruby
<TheShaun>
Hey, anyone know of a good pentest framework for testing a rails app?
carif has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
<Jamo>
metaspoloit or nessus maybe
<Jamo>
*metasploit
depesz has left #ruby ["WeeChat 0.4.2"]
dayepa has joined #ruby
<Jamo>
or armitage
juarlex has joined #ruby
<MrZYX>
benlieb: do you mean a newline, or literally a <br /> ?
parduse has quit [Ping timeout: 272 seconds]
<TheShaun>
cheers, Jamo!
<shevy>
benlieb that sounds weird
<benlieb>
MrZYX: literally <br />, but I think that some gem must have redefined it. Because outside of the rails console, it's not doing it.
<benlieb>
ugly
<shevy>
benlieb something must taint your code there IMO
<postmodern>
Jamo, metasploit is more of a network/system pentesting tool
<benlieb>
probably the awesome_print gem grrr
<shevy>
yeah, I think some gem leaks into that benlieb - I have had almost the same behaviour once myself
subbyyy__ has joined #ruby
dayepa1 has quit [Ping timeout: 276 seconds]
<benlieb>
not awesome
<shevy>
hehehe
<postmodern>
TheShaun, you probably want to use something like Burp Suite or Arachni
<shevy>
I did not like the colours so I went with pp instead
<kenndel>
Hey guys is there a rails channel here on freenode aswell? I just got an internship doing rails and i'd like to be idling the resource just in case
<workmad3>
kenndel: #rubyonrails
<workmad3>
kenndel: we don't bite... hard
<kenndel>
Nice thanks
phinfonet has joined #ruby
<kenndel>
haha go easy on me!
dayepa has joined #ruby
wgosling has joined #ruby
Azure has quit [Quit: My MBP went to sleep.]
aspires has joined #ruby
brianpWins has quit [Quit: brianpWins]
m8 has quit [Quit: Sto andando via]
<shevy>
kenndel at what type of company if I may ask? (don't need to know the name)
petey_ has quit [Remote host closed the connection]
dayepa1 has quit [Ping timeout: 276 seconds]
burlyscudd has quit [Quit: Leaving.]
<kenndel>
They run a few different sites but the one I'll be helping out is a ticketing website for concerts
asteros has quit [Quit: asteros]
<shevy>
cool
pardusf has joined #ruby
parduse is now known as Guest33950
pardusf has quit [Changing host]
pardusf has joined #ruby
pardusf is now known as parduse
asteros has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
dayepa has joined #ruby
Guest33950 has quit [Ping timeout: 272 seconds]
<kenndel>
I've never actually worked with ruby before so I've been doing internet tutorials for a few weeks now to get ready
centrx has joined #ruby
flubba has joined #ruby
yiati has quit [Remote host closed the connection]
alexherbo2 has quit [Quit: WeeChat 0.4.3-dev]
Xeago has joined #ruby
dayepa1 has joined #ruby
alexherbo2 has joined #ruby
<shevy>
am I drunk ?
<shevy>
x = "foo-----bar"
<shevy>
splitted = x.split '-'
Guedes0 has joined #ruby
grvgr has quit [Quit: grvgr]
<shevy>
splitted[0...-2].join('-') # => "foo---"
<shevy>
sorry
<shevy>
splitted[0..-2].join('-') # => "foo----"
<shevy>
I am missing one -
Guedes0 has left #ruby [#ruby]
dayepa has quit [Ping timeout: 276 seconds]
alekst has quit [Quit: Computer has gone to sleep.]
pen has quit [Read error: Connection reset by peer]