estan has quit [Read error: Connection reset by peer]
carlyle has quit [Remote host closed the connection]
icole has joined #ruby
arubin has joined #ruby
dayepa1 has quit [Quit: dayepa1]
nhhagen has quit [Ping timeout: 268 seconds]
dayepa has joined #ruby
ozzloy has quit [Ping timeout: 264 seconds]
shinobi_one_ has left #ruby [#ruby]
Targen has joined #ruby
newUser1234 has joined #ruby
cofin has joined #ruby
snearch has quit [Quit: Verlassend]
philcrissman has quit [Remote host closed the connection]
kofno has joined #ruby
cloke_ has joined #ruby
estan has joined #ruby
hogeo has quit [Remote host closed the connection]
cloke has quit [Ping timeout: 264 seconds]
cloke_ is now known as cloke
mmitchell has joined #ruby
newUser1234 has quit [Remote host closed the connection]
Ontolog has quit [Remote host closed the connection]
lyanchih has joined #ruby
helvete has joined #ruby
RORgasm has joined #ruby
v0n has joined #ruby
lyanchih has quit [Client Quit]
aryasam has joined #ruby
lyanchih has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
rupee has quit [Quit: Leaving]
bricker`LA has joined #ruby
lupinstein has joined #ruby
idkazuma has joined #ruby
RORgasm has quit [Ping timeout: 258 seconds]
banjara has quit [Quit: Leaving.]
d11wtq has joined #ruby
falood_ has joined #ruby
jamie_ca_ has quit [Ping timeout: 245 seconds]
wedgex has joined #ruby
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
jzig has joined #ruby
cat22 has joined #ruby
bradhe_ has quit [Remote host closed the connection]
jlast has quit [Remote host closed the connection]
wedgex has quit [Remote host closed the connection]
falood has quit [Ping timeout: 272 seconds]
jamie_ca_ has joined #ruby
airtonix_ is now known as airtonix
wroathe has joined #ruby
emmanuelux has quit [Quit: emmanuelux]
Xeago has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
tealmage has joined #ruby
Hanmac1 has joined #ruby
jimg has joined #ruby
mfridh has quit [Read error: Operation timed out]
Kricir has joined #ruby
Hanmac2 has quit [Ping timeout: 245 seconds]
ckrailo has quit [Quit: Computer has gone to sleep.]
dhruvasagar has joined #ruby
stkowski has quit [Quit: stkowski]
thomasle_ has quit [Remote host closed the connection]
helvete has quit [Quit: Leaving...]
thomasl__ has joined #ruby
tealmage has quit [Ping timeout: 272 seconds]
estan has quit [Read error: Connection reset by peer]
nik_-_ has quit [Quit: nik_-_]
graydot has quit [Quit: graydot]
thomasl__ has quit [Ping timeout: 260 seconds]
jimg has quit [Remote host closed the connection]
yshh has joined #ruby
Davey has joined #ruby
travisjeffery has joined #ruby
mikepack has quit [Remote host closed the connection]
yshh has quit [Remote host closed the connection]
yshh has joined #ruby
rakl has quit [Quit: sleeping]
Kricir has quit [Remote host closed the connection]
ZachBeta has quit [Quit: Computer has gone to sleep.]
travisjeffery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Leighton has quit [Quit: Leaving]
jduan1981_ has joined #ruby
twoism has quit [Remote host closed the connection]
athst has quit [Quit: athst]
v0n has quit [Ping timeout: 248 seconds]
nezumi has quit [Read error: Operation timed out]
estan has joined #ruby
pskosinski has quit [Quit: pskosinski]
icole has quit [Remote host closed the connection]
jduan1981 has quit [Ping timeout: 246 seconds]
travisjeffery has joined #ruby
dallasm has joined #ruby
lyanchih has quit [Quit: lyanchih]
dallasm has quit [Remote host closed the connection]
jduan1981_ has quit [Ping timeout: 276 seconds]
slainer68 has joined #ruby
havenwood has quit [Remote host closed the connection]
bigmac has quit [Quit: Leaving]
jdunck has quit [Quit: Computer has gone to sleep.]
cloke has quit [Quit: cloke]
athst has joined #ruby
ozzloy has joined #ruby
ozzloy has quit [Changing host]
ozzloy has joined #ruby
lyanchih has joined #ruby
pevjan has quit [Remote host closed the connection]
jovy88 has quit [Read error: Connection reset by peer]
slainer68 has quit [Ping timeout: 252 seconds]
ctienrsg_ has joined #ruby
jovy88 has joined #ruby
cloke has joined #ruby
vertroa has joined #ruby
rickruby has joined #ruby
chipotle_ has quit [Quit: cya]
ctienrsg has quit [Ping timeout: 264 seconds]
cloke has quit [Client Quit]
jzig has quit [Ping timeout: 264 seconds]
SAUCYSALAMANDER has quit [Ping timeout: 256 seconds]
wedgex has joined #ruby
xargoon has quit [Ping timeout: 256 seconds]
SAUCYSALAMANDER has joined #ruby
vlad_starkov has joined #ruby
vertroa has quit [Client Quit]
jacktrick has quit [Quit: Leaving]
falood_ has quit [Remote host closed the connection]
Fediddy has joined #ruby
jzig has joined #ruby
mercwithamouth has quit [Ping timeout: 260 seconds]
infecto has quit [Quit: Leaving]
xargoon has joined #ruby
ozzloy has quit [Ping timeout: 245 seconds]
vertroa has joined #ruby
vlad_starkov has quit [Ping timeout: 245 seconds]
jdunck has joined #ruby
niklasb has quit [Ping timeout: 256 seconds]
vertroa has quit [Client Quit]
wedgex has quit [Remote host closed the connection]
LaPetiteFromage has joined #ruby
vertroa has joined #ruby
estan has quit [Ping timeout: 272 seconds]
travisjeffery has quit [Ping timeout: 268 seconds]
v0n has joined #ruby
Voodoofish430 has quit [Quit: Leaving.]
lyanchih has quit [Ping timeout: 245 seconds]
ctienrsg has joined #ruby
Nuck has quit [Ping timeout: 245 seconds]
ZachBeta has joined #ruby
hamakn has joined #ruby
graydot has joined #ruby
jimg has joined #ruby
Nuck has joined #ruby
Nuck has quit [Changing host]
Nuck has joined #ruby
<jaybe>
is the mac os x gcc compiler that comes with xcode/command line tools sufficient to compile and run ruby?
ctienrsg_ has quit [Ping timeout: 264 seconds]
lyanchih has joined #ruby
<jaybe>
(10.8.3 Mountain Lion)
werdnativ has quit [Ping timeout: 276 seconds]
athst has quit [Quit: athst]
v0n has quit [Ping timeout: 245 seconds]
pandy has quit [Read error: Connection reset by peer]
nezumi has joined #ruby
pandy has joined #ruby
estan has joined #ruby
SqREL has quit [Ping timeout: 248 seconds]
sambao21 has joined #ruby
Domon has joined #ruby
<arubin>
jaybe: I know that I have been able to compile several version of Ruby using rbenv install, but I am not sure whether it is using gcc or clang.
rezzack has quit [Quit: Leaving.]
<jaybe>
arubin, by default, apple mac os x uses llvm-gcc-4.2
<arubin>
jaybe: I recommend using homebrew to install rbenv and ruby-build.
rickmasta has joined #ruby
<arubin>
Then use rbenv install to compile Ruby.
<arubin>
Unless you have a more specific need.
<jaybe>
arubin, indeed ruby does compile, but i also read that the default llvm-gcc-4.2 compiles a buggy implementation and recommends installing a stand alone gcc
<arubin>
Heard from whom?
ZachBeta has quit [Quit: Computer has gone to sleep.]
pevjan has joined #ruby
aryasam has quit [Read error: Connection reset by peer]
<jaybe>
arubin, i read about it from a few various resources regarding ruby environments for mac
aryasam has joined #ruby
dayepa has quit [Quit: dayepa]
ctienrsg_ has joined #ruby
Nautes has quit [Ping timeout: 276 seconds]
Kosmonavt has joined #ruby
ctienrsg has quit [Ping timeout: 264 seconds]
<postmodern>
jaybe, use ruby-build to compile ruby
<postmodern>
jaybe, it's what rbenv uses under the hood
<jaybe>
postmodern, yes; indeed; however, the discussion surrounds whether or not the default apple mac os x gcc (llvm-gcc-4.2) produces stable results versus installing and using a stand alone and more modern gcc.
Mortchek has joined #ruby
<postmodern>
jaybe, OSX ships with old software
jetblack has joined #ruby
<postmodern>
jaybe, llvm-gcc was deprecated in favour of clang
mikestok has joined #ruby
jamie_ca_ has quit [Ping timeout: 272 seconds]
dayepa1 has joined #ruby
falood has joined #ruby
jamie_ca_ has joined #ruby
dayepa1 has quit [Client Quit]
sleetdrop has joined #ruby
<jaybe>
postmodern, will `rbenv install` properly reference the upgraded brew libraries without explicitly specifying?
dayepa1 has joined #ruby
<postmodern>
jaybe, i don't think so. I think you have to specify CONFIGURE_OPTS for that
ckrailo has joined #ruby
tealmage has joined #ruby
<jaybe>
postmodern, rbenv documentation makes no mention whatsoever regarding choosing libraries, etc.
<postmodern>
jaybe, also i don't think ./configure will check inside homebrew's root
jetblack has quit [Quit: leaving]
<codezombie>
shouldn't wrap_parameters work in test environment?
<codezombie>
whoops
<codezombie>
wrong chan
dayepa1 has quit [Client Quit]
<jaybe>
postmodern, so… to do this properly… on mac os x (10.8.3)… should i use ruby-build manually, with brew' updated libs/flags… and then set rbenv ROOT environment variable to wherever i installed the ruby builds, so that rbenv can do its magic?
jzig has quit [Ping timeout: 264 seconds]
<postmodern>
jaybe, depends on whether your using rbenv, or just ruby-build and install into /usr/local
estan has quit [Read error: Connection reset by peer]
megha has joined #ruby
<postmodern>
jaybe, also i think you can do CONFIGURE_OPTS="--with-foo-dir=..." rbenv install ...
Kosmonavt has quit [Quit: Leaving]
TMM has quit [Ping timeout: 245 seconds]
jhn has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
baba has quit [Ping timeout: 255 seconds]
<postmodern>
jaybe, although it might be easier to just run Ubuntu/Fedora in a VM
<postmodern>
jaybe, but of them have ruby 1.9 packages, and updated versions of openssl
jnoob22 has quit [Remote host closed the connection]
helvete has joined #ruby
<jaybe>
postmodern, what about just using brew' ruby version(s)? presuming it's always better to self compile to optimize, etc.?
<postmodern>
jaybe, also could do that
jduan1981 has joined #ruby
<postmodern>
jaybe, ruby-2.0.0 will run faster if you compile with CFLAGS="-O3"
tealmage has quit [Ping timeout: 276 seconds]
rickruby has quit [Remote host closed the connection]
philcrissman has joined #ruby
dayepa1 has joined #ruby
<jaybe>
postmodern, sigh… ok - may i please understand your opinion re: the best way to go about this? and back to the gcc discussion… agree llvm-gcc is outdated… so - does that mean i should install a stand alone modern gcc before doing any of this?
chipotle_ has joined #ruby
philcrissman has quit [Remote host closed the connection]
<postmodern>
jaybe, my personal opinion is just use a Linux distro :P
* arubin
has no problems with just using rbenv install...
<postmodern>
jaybe, `yum install ruby` gives me 1.9.3p392, and it's patched to install gems into ~/.gem/ for normal users
bradhe has joined #ruby
<postmodern>
arubin, if you want to install 2.0.0, you have to do that openssl cacert trick
<jaybe>
i don't have any 'problems' doing that either, however, it's leveraging old compilers and libraries, and has been reported to result in an unstable environment with issues.
robustus|Off has quit [Ping timeout: 255 seconds]
<arubin>
postmodern: It installed fine for me.
<arubin>
jaybe: It is not leveraging old compilers.
<jaybe>
compiled and installed != optimized and or problem free
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<arubin>
Nothing uses gcc on OS X these days.
tjbiddle has joined #ruby
<jaybe>
arubin, on mac os x it is/would be
<arubin>
jaybe: Everything uses clang.
<postmodern>
llvm-gcc is gcc
jetblack has joined #ruby
<postmodern>
jaybe, did you install the CommandLine Tools?
<jaybe>
postmodern, yes
<postmodern>
jaybe, it should give you a recent version of clang
helvete has quit [Ping timeout: 272 seconds]
<jaybe>
perhaps i'm referencing outdated documentation and the llvm-gcc issue is not longer an issue
bradhe has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
ozzloy has joined #ruby
ozzloy has quit [Changing host]
ozzloy has joined #ruby
<jaybe>
postmodern, i use linux for prod/staging, etc. but my personal box/laptop, and what i often peck out work/development on is os x… and i'd prefer to just work/live natively. is there a reasonably small, optimized, not-annoying VM you fancy?
<arubin>
jaybe: Then why is squeezing every last bit of performance out of ruby a concern?
<postmodern>
jaybe, you should checkout vagrant for standing up a ubuntu VM image
TMM has joined #ruby
TMM has quit [Changing host]
TMM has joined #ruby
pevjan has quit [Remote host closed the connection]
idkazuma has quit [Remote host closed the connection]
<jaybe>
arubin, as i stated from the get-go, my quest is not to enhance performance; my quest is to understand and ensure installing and compiling ruby on mac os x, with default compilers and libraries, are not and will not be problematic.
<postmodern>
jaybe, it runs a head-less VM, and sshes in to it for you
<arubin>
jaybe: I have not found rbenv install to create any problems.
robustus has joined #ruby
<arubin>
I have JRuby, Rubinius, MRI 1.9 and 2.0 installed.
<postmodern>
arubin, i have seen it have issues for others
<arubin>
postmodern: What kind of issues?
<postmodern>
arubin, mostly due to issues with system libraries being detected instead of homebrew versions
<postmodern>
arubin, openssl issues with ruby-2.0
<jaybe>
arubin, yes; - i get it that you've had no problems. thing is - i've read reports there have been problems with some gems and advanced development. furthermore, i've experienced failed rake tests on the mac, whereas the same tests do not fail on a linux box with similar versioning. hence my concerns and questions.
<postmodern>
arubin, but i think they modifies the ruby-build scripts, to download/compile it's own version of openssl and link against that
<postmodern>
arubin, but this creates potential problems, since your ruby is now using a different copy of openssl, than the system or homebrew's
pkrnj has quit [Quit: Computer has gone to sleep.]
<jaybe>
postmodern, recent rbenv properly detects and installs ssl 1.x to ~/.rbenv/* prior to installing/compiling ruby; so that's covered
estan has joined #ruby
<jaybe>
postmodern, but yes/nod - re: your point about differing compiled against ssl vs. system
<postmodern>
where as on linux, the package manager provides modern versions of openssl, readline, bash, etc
<postmodern>
the crux of the problem is that homebrew upgrade/override the system libraries
<postmodern>
*can't
<jaybe>
postmodern, … can't/won't; right
ngoldman has joined #ruby
<arubin>
For good reasons.
<postmodern>
indeed
<jaybe>
.
jblack_ has quit [Ping timeout: 255 seconds]
<postmodern>
wish OSX came with a package manager
<arubin>
postmodern: I expect it to become more and more like iOS until they kill off their recent popularity with developers.
Domon has quit [Remote host closed the connection]
tealmage has joined #ruby
Domon has joined #ruby
dayepa1 has quit [Quit: dayepa1]
<jaybe>
postmodern, so i suppose i should look at a simple VM and my enjoyed flavour of linux. you mentioned vagrant. i'll look into that.
jokke has quit [Ping timeout: 264 seconds]
<jaybe>
it's a bit frustrating, because as arubin states, it *appears* to work fine. and it does work pretty well/fine. however, when one edges out into development, with various gems, and getting near the edge, things start to behave differently, and tests fail, etc. … and that's an issue in the long run.
mikestok has quit [Quit: Computer has gone to sleep.]
jokke has joined #ruby
decoponio has joined #ruby
<arubin>
Vagrant uses VirtualBox.
<arubin>
It is nice when it is setup.
Z_Mass has joined #ruby
<jaybe>
arubin, i'm seriously tempted to 'put up with' the inconsistencies so that i may stay on my enjoyable candy os x.
<jaybe>
i fear i'm too lazy and impatient to deal with VM, config, managing, launching, waiting, etc. … lol pathetic
pkrnj has joined #ruby
<jaybe>
postmodern, i'm going to experiment a bit with the library linking flags, rbenv/ruby-build, and see if that makes a difference.
spalenza has quit [Remote host closed the connection]
ngoldman has quit [Read error: Connection reset by peer]
sambao21 has quit [Quit: Computer has gone to sleep.]
v0n has quit [Ping timeout: 255 seconds]
jamie_ca_ has quit [Ping timeout: 246 seconds]
ngoldman has joined #ruby
megha has quit [Ping timeout: 255 seconds]
estan has joined #ruby
newUser1234 has quit [Remote host closed the connection]
aryasam_ has joined #ruby
aryasam has quit [Read error: Connection reset by peer]
banjara has joined #ruby
pevjan has joined #ruby
jdunck has quit [Ping timeout: 268 seconds]
jamesfung14 has quit [Ping timeout: 255 seconds]
jamie_ca_ has joined #ruby
wmoxam has joined #ruby
miroatme_1 has joined #ruby
rickmasta has quit [Quit: Leaving...]
miroatme_1 is now known as miroatme_
jdunck has joined #ruby
spalenza has joined #ruby
lyanchih has quit [Quit: lyanchih]
megha has joined #ruby
RORgasm_ has joined #ruby
radic has joined #ruby
ttt has joined #ruby
dhruvasagar has quit [Ping timeout: 258 seconds]
lyanchih has joined #ruby
Proshot has quit [Ping timeout: 276 seconds]
aryasam_ has quit [Quit: Bye]
radic_ has quit [Ping timeout: 252 seconds]
RORgasm_ has quit [Ping timeout: 258 seconds]
yannis has quit [Quit: yannis]
reset has quit [Ping timeout: 245 seconds]
supernullset has joined #ruby
chipotle_ has quit [Quit: cya]
ZachBeta has joined #ruby
cyong has joined #ruby
wmoxam has quit [Ping timeout: 268 seconds]
chessguy has joined #ruby
cyong has quit [Remote host closed the connection]
cyong has joined #ruby
bean has quit [Quit: Computer has gone to sleep.]
estan has quit [Read error: Operation timed out]
wmoxam has joined #ruby
codemonkey010101 has joined #ruby
jimg has joined #ruby
Heimann has joined #ruby
helvete has joined #ruby
lyanchih has quit [Quit: lyanchih]
<Heimann>
I am doing a class project where I need to brute force a couple of MD5 password hashes in ruby and match them against passwords in a txt file, can anyone point me in the right direction on how to go about this?
codemonkey010101 has quit [Remote host closed the connection]
<Heimann>
The passwords are very simple, like: Password and God
bubblehead has quit [Remote host closed the connection]
codemonkey010101 has joined #ruby
cyong has left #ruby [#ruby]
jimg has quit [Ping timeout: 272 seconds]
jokke has quit [Ping timeout: 268 seconds]
jamie_ca_ has quit [Ping timeout: 245 seconds]
lyanchih has joined #ruby
cooldman224 has joined #ruby
helvete has quit [Ping timeout: 276 seconds]
voodoofish has quit [Quit: Leaving]
jamie_ca_ has joined #ruby
ossareh has quit [Ping timeout: 248 seconds]
idkazuma has joined #ruby
wmoxam has quit [Ping timeout: 252 seconds]
decoponio has quit [Quit: Leaving...]
lupinstein has quit [Ping timeout: 248 seconds]
<nanothief>
Heimann: require 'digest/md5'; Digest::MD5.hexdigest('test') returns the md5 hash of 'test'. Then you need is to get a word list (on mac/linux you should find some in /usr/share/dict, otherwise use google), and get the words into an array (eg File.read('words').split("\n")). The rest is should be pretty simple
v0n has joined #ruby
estan has joined #ruby
lupinstein has joined #ruby
<Heimann>
nanothief: yeah that's pretty much what i've done so far, i'm pretty sure we're not supposed to use a word list but rather brute force it, how would I write a hexdigest that iterates through the alphabet + special characters until there's a match?
travisjeffery has joined #ruby
<jaybe>
arubin, from stephenson: "Recent versions of OS X have dropped gcc in favor of clang. This works fine for Ruby 1.9+ but not for older Rubies. "
sambao21 has joined #ruby
mmitchell has quit [Remote host closed the connection]
supernullset has left #ruby [#ruby]
twoism has quit [Remote host closed the connection]
mmitchell has joined #ruby
twoism has joined #ruby
<nanothief>
Heimann: using a word list is brute forcing it. Attempting to iterate through every single word combination would take far too long. Eg for a 8 letter password (like "password"), there are 26^8 combinations, or 208,827,064,576 (~ 209 billion). Your program will never finish if you do it like that
mmitchel_ has joined #ruby
mmitchell has quit [Read error: Connection reset by peer]
<Heimann>
Hm, it says: "The script should then start generating passwords, starting with single character, and then two characters, etc."
codemonkey010101 has quit [Remote host closed the connection]
<arubin>
jaybe: Okay. I do not use older versions.
bean has joined #ruby
jokke has joined #ruby
lupinstein has quit [Read error: Operation timed out]
travisjeffery has quit [Ping timeout: 255 seconds]
jamie_ca_ has quit [Ping timeout: 246 seconds]
<nanothief>
I'm not sure then, you'll have to check with your teacher on what is allowed.
cyong has joined #ruby
graydot has quit [Ping timeout: 248 seconds]
wsterling has quit [Remote host closed the connection]
jamie_ca_ has joined #ruby
wsterling has joined #ruby
osvico has quit [Ping timeout: 260 seconds]
benwoody has joined #ruby
Kricir has joined #ruby
jdunck has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby
rakl has joined #ruby
estan has quit [Read error: Connection reset by peer]
mmitchel_ has quit [Remote host closed the connection]
mmitchell has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
Axs has joined #ruby
kofno has quit [Remote host closed the connection]
jamie_ca_ has quit [Ping timeout: 256 seconds]
josedonizetti has joined #ruby
rakl has quit [Client Quit]
jamie_ca_ has joined #ruby
vlad_starkov has quit [Ping timeout: 245 seconds]
voodoofish has joined #ruby
<MouseTheLuckyDog>
If I am running in multiple loops how can I brerak out of two?
<MouseTheLuckyDog>
s/brerak/break/
lyanchih has quit [Quit: lyanchih]
alexgordon has quit [Quit: Computer has gone to sleep.]
mmitchell has quit [Ping timeout: 264 seconds]
miroatme_ has quit [Quit: Leaving.]
Kricir has quit [Remote host closed the connection]
_cheney3 has joined #ruby
ariedler has quit [Remote host closed the connection]
joofsh has quit [Remote host closed the connection]
brianpWins has joined #ruby
alexgandy has joined #ruby
lyanchih has joined #ruby
josedonizetti has quit [Quit: josedonizetti]
estan has joined #ruby
r0bby has joined #ruby
Randomage has joined #ruby
dhruvasagar has joined #ruby
athst has joined #ruby
r0bby_ has joined #ruby
travisjeffery has joined #ruby
codemonkey010101 has joined #ruby
travisjeffery has quit [Client Quit]
idkazuma has quit [Remote host closed the connection]
Z_Mass has quit [Quit: Leaving]
emadrid9 has joined #ruby
emadrid9 has quit [Client Quit]
jamie_ca_ has quit [Ping timeout: 268 seconds]
codemonkey010101 has quit [Remote host closed the connection]
DementedInsanity has quit [Quit: Leaving]
jamie_ca_ has joined #ruby
DementedInsanity has joined #ruby
DementedInsanity has quit [Changing host]
DementedInsanity has joined #ruby
r0bby has quit [Ping timeout: 272 seconds]
zeade has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
alexgandy has quit [Quit: alexgandy]
athst has quit [Ping timeout: 268 seconds]
alexgandy has joined #ruby
rickmasta has joined #ruby
kiri has quit [Ping timeout: 245 seconds]
alexgandy has quit [Client Quit]
girija has joined #ruby
ocnam has joined #ruby
SAUCYSALAMANDER has quit [Ping timeout: 264 seconds]
SAUCYSALAMANDER has joined #ruby
v0n has quit [Read error: Operation timed out]
kiri has joined #ruby
Heero has joined #ruby
athst has joined #ruby
BizarreCake has joined #ruby
estan has quit [Read error: Connection reset by peer]
<TTilus>
make it a method and return?
josedonizetti has joined #ruby
<TTilus>
MouseTheLuckyDog: ^
banghouse has quit [Remote host closed the connection]
cooldman224 has quit [Remote host closed the connection]
d-snp has quit [Read error: Operation timed out]
twoism has quit [Ping timeout: 255 seconds]
d-snp has joined #ruby
a_a_g has joined #ruby
lyanchih has quit [Quit: lyanchih]
splittingred has quit [Quit: splittingred]
krz has joined #ruby
estan has joined #ruby
Tectonic has joined #ruby
chrishough has quit [Quit: chrishough]
daniel_hinojosa has quit [Ping timeout: 248 seconds]
wmoxam has joined #ruby
Heimann has quit [Remote host closed the connection]
tonini has joined #ruby
locriani has quit [Remote host closed the connection]
yacks has joined #ruby
jamie_ca_ has quit [Ping timeout: 264 seconds]
locriani has joined #ruby
jamie_ca_ has joined #ruby
philcrissman has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
tomzx_mac has quit [Ping timeout: 260 seconds]
brianpWins has quit [Quit: brianpWins]
sambao21 has joined #ruby
reset has joined #ruby
rakl has joined #ruby
Domon has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
estan has quit [Read error: Connection reset by peer]
sambao21 has quit [Quit: Computer has gone to sleep.]
tylersmith has quit [Remote host closed the connection]
d11wtq_ios has joined #ruby
kofno has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
jamie_ca_ has quit [Ping timeout: 276 seconds]
jamie_ca_ has joined #ruby
pevjan has quit [Remote host closed the connection]
pevjan has joined #ruby
brianpWins has joined #ruby
jamie_ca_ has quit [Ping timeout: 245 seconds]
rickmasta has quit [Quit: Leaving...]
estan has joined #ruby
kofno has quit [Ping timeout: 258 seconds]
philcrissman has joined #ruby
altker128 has joined #ruby
jamie_ca_ has joined #ruby
mmitchell has joined #ruby
ngoldman has quit [Quit: good all the nights]
d11wtq_ios has quit [Remote host closed the connection]
ehaliewicz has joined #ruby
tonini_ has joined #ruby
falood has quit [Remote host closed the connection]
r0bby_ is now known as robbyoconnor
mmitchell has quit [Ping timeout: 258 seconds]
Kricir has joined #ruby
chrishough has joined #ruby
tonini has quit [Ping timeout: 248 seconds]
chessguy has quit [Remote host closed the connection]
<jaybe>
sebastianb, pretty slick; re: vagrant/virtual; thanks for enlightenment
RORgasm has joined #ruby
_cheney3 is now known as _cheney
tjbiddle has quit [Quit: tjbiddle]
Kricir has quit [Ping timeout: 272 seconds]
d2dchat has quit [Remote host closed the connection]
bubblehead has joined #ruby
jamie_ca_ has quit [Ping timeout: 264 seconds]
RORgasm has quit [Ping timeout: 258 seconds]
josedonizetti has quit [Quit: josedonizetti]
jamie_ca_ has joined #ruby
chandankumar has joined #ruby
dmiller has quit [Remote host closed the connection]
lyanchih has joined #ruby
cyong has quit [Quit: Leaving.]
estan has quit [Read error: Connection reset by peer]
akhet has quit [Remote host closed the connection]
Tectonic has quit [Quit: Tectonic]
jduan1981 has joined #ruby
Spami_ has joined #ruby
jamie_ca_ has joined #ruby
wunz_ has quit [Read error: Operation timed out]
wsterling has quit [Remote host closed the connection]
tundrax has joined #ruby
lyanchih has quit [Quit: lyanchih]
helvete has quit [Ping timeout: 276 seconds]
wroathe has quit [Ping timeout: 272 seconds]
estan has joined #ruby
emergion has joined #ruby
wmoxam has quit [Ping timeout: 255 seconds]
BizarreCake has quit [Ping timeout: 272 seconds]
josedonizetti has joined #ruby
GeissT has joined #ruby
Domon has joined #ruby
twoism has quit [Remote host closed the connection]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
emergion has quit [Ping timeout: 264 seconds]
corehook has joined #ruby
bigmac has joined #ruby
<sebastianb>
jaybe: yw :)
athst has quit [Quit: athst]
jamie_ca_ has quit [Ping timeout: 276 seconds]
<bigmac>
any one read about LD_PRELOAD
<jaybe>
sebastianb, i could see how understanding that, and creating ones ideal setup, then reusing … could be very handy. would be nice to keep everyday desktop environment/system clean and clear from dev cruft too.
bigmac is now known as i8igmac
codecop has quit [Remote host closed the connection]
jamie_ca_ has joined #ruby
<sebastianb>
jaybe: it's great if you need to write/test something in different environment than currently on your desktop
spalenza_ has joined #ruby
<jaybe>
sebastianb, perhaps i'm overlooking, but, i don't seem to find a list of available remote boxes/distributions available. e.g. debian, *bsd, etc. am i overlooking something obvious?
mockra has quit [Remote host closed the connection]
estan has quit [Read error: Connection reset by peer]
dmiller has quit [Ping timeout: 258 seconds]
corehook has quit [Ping timeout: 256 seconds]
jimg has joined #ruby
megha has quit [Quit: WeeChat 0.4.0]
spalenza_ has quit [Read error: Connection reset by peer]
spalenza has joined #ruby
vlad_starkov has quit [Ping timeout: 260 seconds]
dmiller_ has quit [Ping timeout: 258 seconds]
corehook has joined #ruby
<sebastianb>
g'nite folks
* sebastianb
&
wroathe has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
estan has joined #ruby
girija has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby
kofno has joined #ruby
falood has joined #ruby
cofin has quit [Quit: cofin]
wsterling has joined #ruby
falood has quit [Remote host closed the connection]
ARCADIVS has joined #ruby
echevemaster has quit [Ping timeout: 264 seconds]
sayan has joined #ruby
tylersmith has joined #ruby
lyanchih has joined #ruby
newTech has quit [Quit: newTech]
nomenkun has joined #ruby
kofno has quit [Ping timeout: 272 seconds]
lambsread has quit [Ping timeout: 252 seconds]
girija has joined #ruby
newTech has joined #ruby
wroathe has quit [Ping timeout: 256 seconds]
spalenza has quit [Remote host closed the connection]
Fediddy has quit []
pevjan has quit [Remote host closed the connection]
workmad3 has joined #ruby
tylersmith has quit [Ping timeout: 264 seconds]
wsterling has quit [Ping timeout: 272 seconds]
<whowantstolivefo>
guys, i've done play with the ruby koans, whats my next stage to understand better ruby fundamentals ?
<tobiasvl>
whowantstolivefo: i don't know what "the ruby koans" offer, but did you feel during playing with them that you wanted to learn more about some aspect?
tjbiddle has joined #ruby
jhn has quit [Ping timeout: 264 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
dhruvasagar has quit [Ping timeout: 255 seconds]
apeiros has quit [Remote host closed the connection]
<whowantstolivefo>
tobiasvl: you might be know that i wanna learn ruby... since a few months i play with the different examples and i didnt figure out fundamental good, and i've asked and speak with some guys that help people here and they suggested me to koans for beginning and understanding snyax this is why i finished it.. i have some knowledge and koans made me understand some part of ruby.
pevjan has joined #ruby
Hanmac has quit [Quit: Leaving.]
tonini_ has quit [Ping timeout: 248 seconds]
josedonizetti has quit [Quit: josedonizetti]
tagrudev has joined #ruby
<whowantstolivefo>
tobiasvl: and now what next suggest for me :) ?
Hanmac1 has quit [Ping timeout: 248 seconds]
<tobiasvl>
no idea, i don't know what "koans" cover
<tobiasvl>
but start making some ruby programs maybe?
Hanmac has joined #ruby
chandankumar has quit [Quit: Leaving]
<whowantstolivefo>
tobiasvl: http://rubykoans.com/ <<< if you see this maybe understand me better
vlad_starkov has quit [Remote host closed the connection]
ttt_ has joined #ruby
ttt has quit [Read error: Connection reset by peer]
workmad3 has quit [Read error: Operation timed out]
estan has quit [Read error: Connection reset by peer]
Nahra has quit [Remote host closed the connection]
bean has quit [Quit: Computer has gone to sleep.]
girija has quit [Read error: Connection reset by peer]
chrishough has quit [Quit: chrishough]
kil0byte has joined #ruby
Umren has joined #ruby
tonini has joined #ruby
lambsread has joined #ruby
abhinavmehta has joined #ruby
ehaliewicz has quit [Read error: No route to host]
<abhinavmehta>
How to find for standard ruby classes, like Time.rb?
mklappstuhl has quit [Remote host closed the connection]
nanothief has joined #ruby
krz has joined #ruby
tjbiddle has joined #ruby
Hanmac1 has joined #ruby
a_a_g has quit [Quit: Leaving]
wsterling has quit [Ping timeout: 255 seconds]
a_a_g has joined #ruby
rdark has joined #ruby
mahmoudimus has joined #ruby
Heero has quit [Ping timeout: 260 seconds]
tjbiddle has quit [Quit: tjbiddle]
helvete has joined #ruby
r0bgleeson has quit [Ping timeout: 258 seconds]
workmad3 has joined #ruby
monkegjinni has joined #ruby
pithagorians has quit [Read error: Operation timed out]
pduin has joined #ruby
iMadper has quit [Ping timeout: 264 seconds]
arietis has joined #ruby
krz has quit [Quit: krz]
estan has quit [Read error: Connection reset by peer]
lyanchih has quit [Quit: lyanchih]
haxrbyte has joined #ruby
andikr has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
mafolz has joined #ruby
pevjan has quit [Remote host closed the connection]
JohnBat26 has joined #ruby
apeiros has joined #ruby
kil0byte has quit [Remote host closed the connection]
a_a_g has quit [Quit: Leaving.]
nignaztic has quit [Ping timeout: 256 seconds]
estan has joined #ruby
teclator has quit [Ping timeout: 255 seconds]
nhhagen has joined #ruby
kofno has joined #ruby
mklappstuhl has joined #ruby
kil0byte has joined #ruby
ipalaus has joined #ruby
jamie_ca_ has quit [Quit: Computer has gone to sleep.]
freeayu has quit [Read error: Connection reset by peer]
sayan has quit [Ping timeout: 272 seconds]
freeayu has joined #ruby
nhhagen has quit [Ping timeout: 256 seconds]
kofno has quit [Ping timeout: 245 seconds]
nhhagen has joined #ruby
pevjan has joined #ruby
kil0byte has quit [Ping timeout: 256 seconds]
dr_bob has joined #ruby
wallerdev has quit [Quit: wallerdev]
bigkevmcd has joined #ruby
tonini has quit [Ping timeout: 248 seconds]
RORgasm has joined #ruby
freeayu has quit [Ping timeout: 255 seconds]
mklappstuhl has quit [Remote host closed the connection]
freeayu has joined #ruby
filipe has joined #ruby
monkegjinni has quit [Remote host closed the connection]
<canton7>
Eiam, re the #inject discussion last night...
RORgasm has quit [Ping timeout: 272 seconds]
jbpros has joined #ruby
<canton7>
#inject accepted a symbol before the Symbol#to_proc stuff existed. It was a very common use-case to want to e.g. sum an array, so #inject provided a special shortcut
mneorr has joined #ruby
seoaqua has joined #ruby
<canton7>
(note that you can only pass one of a few number of symbols to #inject - not just any symbol with the same name as a method)
tonini has joined #ruby
peta_ has quit [Quit: peta_]
jimg has quit [Remote host closed the connection]
estan has quit [Read error: Connection reset by peer]
<canton7>
then people decided they wanted the ability to pass a symbol representing a method to lots of functions, and for lots of symbols
<canton7>
and so Symbol#to_proc was invented, and #inject supported that too
monkegjinni has joined #ruby
<canton7>
so nowadays you don't need to call e.g. inject(:+) at all - just use inject(&:+). The former is legac
<canton7>
*legacy
nomenkun has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
helvete has quit [Read error: Connection reset by peer]
helvete has joined #ruby
benlieb has joined #ruby
SqREL has joined #ruby
tonini has quit [Ping timeout: 248 seconds]
<Mon_Ouie>
Sure you can pass any method name to inject, as long as the accumulator responds to it.
ttt_ has quit [Read error: Connection reset by peer]
bubblehead has quit [Ping timeout: 276 seconds]
ttt has joined #ruby
nhhagen has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
estan has joined #ruby
Hien has quit [Ping timeout: 256 seconds]
m8 has joined #ruby
Leighton has joined #ruby
<canton7>
Mon_Ouie, funky! Was that the case before Proc#to_symbol ?
<Mon_Ouie>
Sure
monkegjinni has joined #ruby
ipalaus has quit [Ping timeout: 258 seconds]
lyanchih has joined #ruby
<Mon_Ouie>
It just sends the method to the current accumulator value instead of calling the proc
tvw has quit [Read error: Connection reset by peer]
bubblehead has joined #ruby
tvw has joined #ruby
m8 has quit [Max SendQ exceeded]
<canton7>
fair. Nice, obvious way to do it :)
m8 has joined #ruby
pithagorians has joined #ruby
Soliah has joined #ruby
wsterling has joined #ruby
ipalaus has joined #ruby
wsterling has quit [Ping timeout: 245 seconds]
mfridh has joined #ruby
tealmage has joined #ruby
unflores has joined #ruby
pevjan has quit [Remote host closed the connection]
filipe has quit [Read error: Operation timed out]
tealmage has quit [Ping timeout: 268 seconds]
kreantos has joined #ruby
elaptics`away is now known as elaptics
jprovazn has joined #ruby
threesome has joined #ruby
megha has joined #ruby
Coffers has joined #ruby
CaptainKnots has quit [Ping timeout: 246 seconds]
estan has quit [Read error: Connection reset by peer]
sleetdrop has quit [Ping timeout: 268 seconds]
tjbiddle has joined #ruby
Nisstyre-laptop has quit [Ping timeout: 272 seconds]
tonini has joined #ruby
sleetdrop has joined #ruby
helvete has quit [Quit: Leaving...]
Plumm3R has joined #ruby
Plumm3R has quit [Client Quit]
timonv has joined #ruby
tommyvyo has quit [Quit:]
chandankumar has joined #ruby
Hien has joined #ruby
filipe has joined #ruby
admin0 has joined #ruby
Randomage2 has joined #ruby
CaptainKnots has joined #ruby
d11wtq has quit [Ping timeout: 268 seconds]
estan has joined #ruby
timmow has joined #ruby
wargasm1 has quit [Ping timeout: 246 seconds]
scrr_ has quit [Quit: leaving]
Randomage has quit [Ping timeout: 272 seconds]
admin0 has left #ruby [#ruby]
Sargun_ has quit [Changing host]
Sargun_ has joined #ruby
Sargun_ is now known as Sargun
tjbiddle has quit [Quit: tjbiddle]
kil0byte has joined #ruby
forlin has joined #ruby
predator117 has quit [Ping timeout: 264 seconds]
altivec has joined #ruby
kke has joined #ruby
leonidlm has joined #ruby
MisterPostIT has joined #ruby
<kke>
does someone know how the old mysql gem works? i can't get any results for joined tables, results.fetch_hash(true) gives me "users.name" => "john" etc, but there's no keys for joined tables
adac has joined #ruby
pi3r has joined #ruby
blacktulip has joined #ruby
rodasc is now known as crodas
r0bgleeson has joined #ruby
rickruby has quit [Ping timeout: 258 seconds]
Hien has quit [Ping timeout: 264 seconds]
charliesome has joined #ruby
smoak has quit [Ping timeout: 246 seconds]
arietis has quit [Quit: Computer has gone to sleep.]
pagios has joined #ruby
Astralum has quit [Read error: Connection reset by peer]
altker128 has quit [Read error: Operation timed out]
nfk has joined #ruby
helvete has joined #ruby
Astralum has joined #ruby
<hoelzro>
kke: what's the SQL you're running?
znake has joined #ruby
mr0wl has quit [Quit: leaving]
estan has quit [Read error: Connection reset by peer]
predator117 has joined #ruby
senayar has joined #ruby
timonv has quit [Remote host closed the connection]
zifeitong has joined #ruby
adac has quit [Ping timeout: 255 seconds]
ctienrsg_ has joined #ruby
ctienrsg has quit [Ping timeout: 264 seconds]
MisterPostIT has quit [Ping timeout: 264 seconds]
camilasan has joined #ruby
hamed_r has joined #ruby
altker128 has joined #ruby
zekefast has joined #ruby
zekefast has quit [Max SendQ exceeded]
zekefast has joined #ruby
zekefast has quit [Max SendQ exceeded]
smoak has joined #ruby
Evixion has quit [Ping timeout: 256 seconds]
Spami_ has quit [Quit: This computer has gone to sleep]
vlad_starkov has joined #ruby
ghr has joined #ruby
buscon has joined #ruby
estan has joined #ruby
nhhagen has joined #ruby
vlad_starkov has quit [Ping timeout: 272 seconds]
casheew has quit [Read error: Connection reset by peer]
io_syl has quit [Quit: Computer has gone to sleep.]
zeade1 has joined #ruby
Hien has joined #ruby
casheew has joined #ruby
tagrudev has quit [Ping timeout: 272 seconds]
krainboltgreene has quit [Ping timeout: 260 seconds]
r0bgleeson has quit [Ping timeout: 245 seconds]
nhhagen has quit [Ping timeout: 260 seconds]
adac has joined #ruby
zeade has quit [Ping timeout: 258 seconds]
casheew has quit [Read error: Connection reset by peer]
wsterling has joined #ruby
brianpWins has quit [Quit: brianpWins]
arietis has joined #ruby
haxrbyte_ has joined #ruby
clocKwize has joined #ruby
casheew has joined #ruby
Spooner has joined #ruby
codecop has quit [Remote host closed the connection]
codecop has joined #ruby
casheew has quit [Read error: Connection reset by peer]
persand has quit [Ping timeout: 264 seconds]
wsterling has quit [Ping timeout: 276 seconds]
persand has joined #ruby
<clocKwize>
Morning
haxrbyte has quit [Ping timeout: 272 seconds]
ctp_ has joined #ruby
ephemerian has joined #ruby
troessner has joined #ruby
casheew has joined #ruby
DouweM has joined #ruby
ctp has quit [Ping timeout: 245 seconds]
estan has quit [Read error: Connection reset by peer]
skattyadz has joined #ruby
Yakko_ has joined #ruby
reset has quit [Read error: Operation timed out]
benlieb has quit [Quit: benlieb]
Proshot has joined #ruby
yakko has quit [Ping timeout: 256 seconds]
ckrailo has quit [Quit: Computer has gone to sleep.]
blf has joined #ruby
<blf>
Suppose that I have a field which should store only things which can be treated as strings. Is it acceptable (and common practice?) to test for #to_s when setting the field value?
krainboltgreene has joined #ruby
<blf>
Is there a better way to ensure I'm only storing a string?
pen has quit [Remote host closed the connection]
wargasm has joined #ruby
vlad_starkov has joined #ruby
adac has quit [Ping timeout: 256 seconds]
persand_ has joined #ruby
persand has quit [Ping timeout: 276 seconds]
persand_ is now known as persand
Khazix has joined #ruby
altivec has quit [Quit: Computer has gone to sleep.]
<hoelzro>
so Hash's aren't really hashes any more?
<tobiasvl>
pandy: namespace resolve
Hanmac has quit [Ping timeout: 255 seconds]
<Spooner>
pandy, You can use test_data.to_yaml which feels more Rubyish
idkazuma has quit [Remote host closed the connection]
<hoelzro>
(╯°□°)╯︵ ┻━┻
<pandy>
great, I keep seeing :: everywhere though
<tobiasvl>
pandy: it's the namespace resolution operator
wsterling has quit [Ping timeout: 264 seconds]
<pandy>
thanks
<Spooner>
It should be YAML.dump though. It is a method in a module, so should be . - a module/class in a module/class uses :: (though they are technically interchangeable)
<pandy>
I see now!
<pandy>
Wish people would stop trying to be clever and keep the syntax the same :P
<tobiasvl>
the same?
<tobiasvl>
:: is ruby syntax though
lambsread has quit [Read error: Operation timed out]
<tobiasvl>
"It gives you the ability to access things that the . operator won't such as constants, modules or non instance methods. It also can remove ambiguity when dealing with local and global variables."
rickmasta has quit [Quit: Leaving...]
arturaz has quit [Remote host closed the connection]
tealmage has quit [Ping timeout: 245 seconds]
Mon_Ouie has quit [Ping timeout: 260 seconds]
<Hanmac1>
pandy: about ::,
<Hanmac1>
::b is a method call, ::b() is a method call too
<Hanmac1>
::B is a constant lookup, but ::B() is a method call
<Hanmac1>
that is specialy important because there are Array as a Constant, and Array() as a method
blueocean has joined #ruby
falood has quit [Remote host closed the connection]
haxrbyte has quit [Read error: Connection reset by peer]
jbpros has quit [Quit: jbpros]
emergion has quit [Quit: Computer has gone to sleep.]
mmitchell has joined #ruby
estan has joined #ruby
lyanchih has quit [Quit: lyanchih]
camilasan has quit [Remote host closed the connection]
khismetix has quit [Ping timeout: 256 seconds]
<Hanmac1>
blueocean: what about: MAX_RETRIES.times { url = get_url; break url if url }
<blueocean>
Hanmac1: oou, nice one. What if I wanna log/raise something when the max_retries is reached? Should I use return instead of break and raise after the loop?
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
rdark has quit [Quit: leaving]
nari_ has joined #ruby
postmodern has quit [Quit: Leaving]
dhruvasagar has joined #ruby
Banistergalaxy has joined #ruby
rdark has joined #ruby
tommyvyo has quit [Quit:]
mark_locklear has joined #ruby
sleetdrop has quit [Ping timeout: 260 seconds]
DouweM has quit [Read error: Connection reset by peer]
<Banistergalaxy>
Hi boys
buscon has joined #ruby
lyanchih has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
dr_bob1 has quit [Quit: Leaving.]
d3c has joined #ruby
estan has joined #ruby
lyanchih has quit [Client Quit]
tonini has joined #ruby
zph has joined #ruby
zph has quit [Excess Flood]
DouweM has joined #ruby
osvico has joined #ruby
JohnBat26|2 has quit [Read error: Connection timed out]
khismetix has quit [Ping timeout: 260 seconds]
atmosx has joined #ruby
ExxKA has joined #ruby
tonini has quit [Ping timeout: 248 seconds]
a_a_g has joined #ruby
akhet has quit [Remote host closed the connection]
khismetix has joined #ruby
arturaz has quit [Quit: Leaving]
d3c has quit [Ping timeout: 255 seconds]
d3c_ has joined #ruby
tommyvyo has joined #ruby
monkegji_ has quit [Read error: Connection reset by peer]
ttt has quit [Remote host closed the connection]
nhhagen_ has joined #ruby
monkegjinni has joined #ruby
iMadper has quit [Ping timeout: 245 seconds]
ctienrsg has quit [Read error: Connection reset by peer]
ctienrsg has joined #ruby
dhruvasagar has quit [Ping timeout: 245 seconds]
nhhagen_ has quit [Ping timeout: 246 seconds]
arya has joined #ruby
dhruvasagar has joined #ruby
Nigel_ is now known as G
becom33 has joined #ruby
<becom33>
Im having a trouble with ruby regex I have a string like "<div> <?php echo $_GET['name'] </div>" and I want to catch the "$_GET['name']" and replace it with fix($_GET['name'])
<becom33>
can some one help me with this ?
pevjan has quit [Remote host closed the connection]
Elfix has quit [Read error: Operation timed out]
<hoelzro>
becom33: what's your current regex?
tms has quit [Quit: Konversation terminated!]
obs has quit [Quit: Konversation terminated!]
<becom33>
I don't have one :/
casheew has quit [Read error: Connection reset by peer]
ctp has quit [Read error: Connection reset by peer]
casheew has joined #ruby
yalue has joined #ruby
jzig has joined #ruby
dr_bob has joined #ruby
ctp has joined #ruby
<hoelzro>
well, that's a good way to start =)
estan has quit [Read error: Connection reset by peer]
<ChristianS>
becom33: are you expecting this channel to do your (home)work for you?
corehook has quit [Ping timeout: 272 seconds]
tommyvyo has quit [Quit:]
sambao21 has joined #ruby
<dp>
what's the easiest way to find indices that are common through multiple arrays?
spalenza has joined #ruby
Elfix has joined #ruby
mikestok has quit [Quit: Computer has gone to sleep.]
<becom33>
ChristianS,
<becom33>
p "<div> <?php echo $_GET['name'] </div>".gsub /\$_GET/, 'fix($_GET' this is what I was trying
pandy has quit [Remote host closed the connection]
<becom33>
but the problem is ['name'] value name is dynamic it changes . so I though I can use * in their but doesnt work that way ither
casheew has quit [Read error: Connection reset by peer]
schaerli has quit [Remote host closed the connection]
<injekt>
becom33:
Macaveli has joined #ruby
<becom33>
injekt, wait let me try that
<injekt>
dp: huh?
casheew has joined #ruby
nari_ has quit [Ping timeout: 245 seconds]
arya has joined #ruby
niklasb has joined #ruby
kil0byte has quit [Remote host closed the connection]
<dp>
injekt: I have several arrays of strings being generated. I need to find the strings that are common to any of the arrays, and put them in another, "higher-level" array
workmad3 has quit [Ping timeout: 260 seconds]
casheew has quit [Read error: Connection reset by peer]
<injekt>
dp: common in terms of what?
mmozuras has joined #ruby
<dp>
injekt: that there is a string "test123" in any index, in more than one of the arrays
estan has joined #ruby
carloslopes has joined #ruby
mljsimone has quit [Ping timeout: 272 seconds]
d3c_ has quit [Read error: Connection reset by peer]
MrZYX is now known as MrZYX|off
ariedler has quit [Remote host closed the connection]
<injekt>
dp: you're going to have to check every array for each iteration, maybe use String#include? to check if those strings include the string you're currently scanning
jzig has quit [Ping timeout: 264 seconds]
nezumi has joined #ruby
<hoelzro>
dp: common to any of the arrays, or all of the arrays?
machuga is now known as machuga|away
<dp>
hoelzro: any
<hoelzro>
dang
ariedler has joined #ruby
D4T has joined #ruby
casheew has joined #ruby
<dp>
injekt: the string is going to be different. imagine this
<dp>
pseudo code
arya_ has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
d3c has joined #ruby
<dp>
for each value in arr1; for each value2 in arr2; if value == value2 { add value to high_arr; }
<injekt>
oh you're looking for equality?
<dp>
but there will be tens to hundreds of arrays
<injekt>
not index?
kil0byte has joined #ruby
mmozuras has quit [Ping timeout: 258 seconds]
<becom33>
injekt,
<dp>
yes. same string in any of the arrays
dhruvasagar has joined #ruby
<injekt>
you can probably use Array#&
<injekt>
but tens to hundreds of arrays, this isn't going to be fast
ravster has joined #ruby
arya has quit [Ping timeout: 256 seconds]
<becom33>
in "$name = $_POST['name'];".sub(/(\$_POST[^\s]+)/, 'fix(\1)') . the output comes as "$name = fix($_POST['name'];)" I want the ; to be outside the fix() . I mean only the $_POST['dynamic_value'] chould be replaced
<injekt>
becom33: that matches $_ followed by anything until ;
<injekt>
which is what [^;] is doing
arya has joined #ruby
wroathe has joined #ruby
<injekt>
match anything EXCEPT ;
<injekt>
just like the one I wrote before was [^\s] - match anything except whitespace
JohnBat26|2 has joined #ruby
arya_ has quit [Ping timeout: 245 seconds]
MisterPostIT has quit [Ping timeout: 264 seconds]
matchaw has joined #ruby
invisime1 has joined #ruby
ctp_ has joined #ruby
tk___ has joined #ruby
schaerli has joined #ruby
JohnBat26|3 has joined #ruby
<becom33>
injekt, I'm sorry I should have been more clear about this before . the inputs for the regex are dynamic . its possible the string might not contain ; . the only thing I was looking for to replace $_POST['name'] with fix($_POST['name']) . 'name' also can be dynamic since in PHP its a parameter
jzig has joined #ruby
<injekt>
I know what it is, if you're going to ask questions please be as precise as possible
<injekt>
otherwise this happens, wasting both of our time :)
ctienrsg has quit [Read error: Connection reset by peer]
arya_ has joined #ruby
MrZYX|off is now known as MrZYX
ctienrsg has joined #ruby
malou_ has quit [Ping timeout: 272 seconds]
<becom33>
injekt, yes I know
JohnBat26 has quit [Ping timeout: 264 seconds]
<becom33>
what I explained before it the whats actually Im looking for
<becom33>
the strings can be looks like "somthingsomthing$_POST['name']somthingsomthing" still it should replace $_POST['name'] with fix($_POST['name'])
ctp has quit [Ping timeout: 256 seconds]
<becom33>
oki
codemonkey010101 has joined #ruby
altivec has joined #ruby
casheew has quit [Read error: Connection reset by peer]
<injekt>
you can strip it and make it a little more simple, but lets be honest, getting it this far has taken long enough
arya has joined #ruby
<becom33>
injekt, alright thanks
<becom33>
lemme try this out
ctp_ has quit [Ping timeout: 245 seconds]
poga has joined #ruby
JohnBat26|3 has quit [Ping timeout: 246 seconds]
casheew has quit [Read error: Connection reset by peer]
RORgasm has joined #ruby
arya_ has quit [Ping timeout: 264 seconds]
<becom33>
injekt, its working fine :D thank you very much
arya_ has joined #ruby
yshh has joined #ruby
estan has quit [Read error: Connection reset by peer]
casheew has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
kpshek has quit []
kil0byte_ has joined #ruby
yashshah_ has quit [Ping timeout: 276 seconds]
arya has quit [Ping timeout: 248 seconds]
JohnBat26|3 has joined #ruby
casheew has quit [Read error: Connection reset by peer]
mikestok has joined #ruby
falood has joined #ruby
falood has quit [Remote host closed the connection]
wolcanus has joined #ruby
RORgasm has quit [Ping timeout: 245 seconds]
wsterling has joined #ruby
kil0byte has quit [Ping timeout: 260 seconds]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
pskosinski has joined #ruby
wroathe has quit [Ping timeout: 264 seconds]
arya has joined #ruby
adambeynon has joined #ruby
leonidlm has joined #ruby
falood has joined #ruby
falood has quit [Remote host closed the connection]
newUser1234 has joined #ruby
casheew has joined #ruby
csaunders has joined #ruby
yshh has quit [Read error: Connection reset by peer]
yshh has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
estan has joined #ruby
Caius has quit [Quit: ""]
Caius has joined #ruby
wsterling has quit [Ping timeout: 255 seconds]
casheew has quit [Read error: Connection reset by peer]
arya has quit [Ping timeout: 245 seconds]
<dp>
ok. I've got all of my arrays compiled to a single multi-d array. is there a way to loop all possible combinations of pairs? IE, arr[0] and arr[1], and arr[0] and arr[2], etc, all the way up to arr[100] and arr[99]?
includex has joined #ruby
Shrink has quit [Remote host closed the connection]
Macaveli has quit [Read error: Connection reset by peer]
lambsread has joined #ruby
estan has quit [Read error: Connection reset by peer]
<Debaser>
hi, is there a method which transform [1, 1, 3, 4, 1, 3, 3, 4] in [[1,1], [3], [4], [1], [3,3], [4]] (which group every consecurtive similare elements in the same sub-array) ?
mmitchel_ has joined #ruby
<lupine>
probably nothing built-in
buscon has joined #ruby
wroathe has joined #ruby
ipalaus has quit [Ping timeout: 255 seconds]
<lupine>
you could do it with a quick select though
<Debaser>
ok, I'm actually new to ruby and am looking for to most "rubyest" way to do it :)
tchebb has joined #ruby
<charliesome>
lupine, Debaser: there is something built in
<lupine>
last = nil ; result = ary.select {|elem| r = ( last == elem ) ; last = elem ; r } would do what you want, I think, but I'd be interested to see the built-in
<lupine>
of course I do. "the boss doesn't see it as a priority"
<withnale>
is there an easy way to merge two YAML files? I thought I could just .merge the resulting loaded structures but that will only merge at the top level not lower levels.
<lupine>
well, how do you want to handle conflicts ?
buscon has quit [Quit: Leaving]
<charliesome>
lupine: he'll see it as a priority in a year or so when the cost of remaining on 1.8 is ridiculous
<lupine>
mm, probably
d2dchat has joined #ruby
<lupine>
but we're not there yet
<charliesome>
how stubborn is your boss being about it?
ravster has left #ruby [#ruby]
nricciar has quit [Quit: Leaving]
<charliesome>
have you tried laying out the reasons why you should upgrade?
* lupine
wouldn't mind getting to use all the shinies in 1.9
<lupine>
now wheezy's out, we might start getting somewhere with it
wroathe has joined #ruby
persand has quit [Quit: persand]
<kapowaz>
wanted: somebody with experience implementing Warden in a Ruby app (not via Devise).
<kapowaz>
I'm trying to get my head around how to handle authentication failures so that I can classify an authentication failure (e.g. wrong credentials vs user account is locked etc.)
<julianhurley>
it's pretty good, I'm about 60% through
jduan1981 has joined #ruby
nwertman_ has quit [Ping timeout: 264 seconds]
jzig has quit [Ping timeout: 268 seconds]
<MrZYX>
withnale: a deep merge implementation is very easy, probably not worth a gem :)
<MrZYX>
and you can exactly define the behaviour on conflicts if you do it on your own
<lupine>
eh, you can always vendor it in
<apeiros>
MrZYX: I have a generic deep_merge which takes a block to deal with conflicts
<apeiros>
just like merge
jamesfung14 has joined #ruby
<withnale>
aperios: got a gist?
<MrZYX>
apeiros: then submit it to stdlib or core :P
tk___ has quit [Quit: ばいばい]
kil0byte_ has joined #ruby
<apeiros>
aperios has no gists
Macaveli has quit [Read error: Connection reset by peer]
arya has quit [Ping timeout: 248 seconds]
hiroyuki has joined #ruby
<lectrick>
OK so I need something from Ruby. I want a method that I give a block. When I yield to that block, I want this method to tell me a FULL benchmark- how long the block took to run is too trivial. I want to know the # of objects generated, their classes and sizes (if available), and
<lectrick>
... the actual memory consumed by running that block. if possible. not sure if that is, in pure ruby.
v0n has joined #ruby
clocKwize has quit [Read error: Connection reset by peer]
<lectrick>
I can GC.stop, count all the objects, take the difference and GC.start and output that I guess, but I wonder if there is a more clever solution
yshh has joined #ruby
kil0byte has quit [Ping timeout: 248 seconds]
jzig has joined #ruby
<lectrick>
I still think there is too much opacity around the "cost of doing business" in Ruby. It is nice to not have to worry about memory use... until you do have to worry
yshh has quit [Remote host closed the connection]
estan has quit [Read error: Connection reset by peer]
yshh has joined #ruby
<lectrick>
apeiros: banisterfiend: any thoughts?
<hoelzro>
the cost of using a HLL =)
interactionjaxsn has joined #ruby
* lupine
recalls a very cool gem that tracked this kind of thing in exquisite detail
<hoelzro>
it would be nice if you could plug into the allocator
<lectrick>
hoelzro: OK, fine, admittedly. But if you want to know that info, it should be easily accessible
<hoelzro>
lectrick: oh, I agree
wmoxam has joined #ruby
Tarential has quit [Excess Flood]
<lectrick>
hoelzro: Yes. It would. I think you can have both ease of use AND visibility into the inner workings, too.
Tarential has joined #ruby
Umren has quit [Ping timeout: 258 seconds]
izelnakri has joined #ruby
<lectrick>
I am seeing so many issues lately having to do with a bit of code exploding in memory use and nobody caught it because the tools just aren't there or easy to use
akemrir has quit [Ping timeout: 264 seconds]
izelnakri has left #ruby [#ruby]
<lectrick>
:: mumbles something about using exception handling as flow control being even worse than a code smell ::
interactionjaxsn has quit [Remote host closed the connection]
Tricon has joined #ruby
<hoelzro>
hehe
interactionjaxsn has joined #ruby
<lupine>
but I honestly can't remember what it was
yashshah has joined #ruby
miroatme_ has quit [Quit: Leaving.]
mneorr has quit [Ping timeout: 255 seconds]
johnnyfuchs has joined #ruby
tagrudev has quit [Quit: Me = Awesome]
<hoelzro>
wow
<hoelzro>
I'm surprised to see so much malloc in the Ruby source
<apeiros>
lectrick: busy @ work, sry
<julianhurley>
hoelzro: Would you recommend something else?
<lectrick>
apeiros: it's ok, i am too haha
<lupine>
memprof ?
<hoelzro>
julianhurley: well, that depends; are you new to programming?
interactionjaxsn has quit [Read error: No route to host]
sander^work has quit [Read error: Connection reset by peer]
<hoelzro>
(also, I haven't looked at Beginning Ruby, so I have no opinion on it)
interactionjaxsn has joined #ruby
sander^work has joined #ruby
<julianhurley>
No, I'm from a PHP + Javascript background...I'm actually getting on pretty well, it's just that damn ::
<lectrick>
I apologize for my rant. I actually <3 Ruby. This is just a class of bugs I've seen a lot of lately
<julianhurley>
which I sort of get now
miroatme_ has joined #ruby
<julianhurley>
:P
<tobiasvl>
julianhurley: PHP has :: too? what do you mean
Virunga has quit [Remote host closed the connection]
<lupine>
lectrick, if memprof is the one I'm thinking of, I used it successfully to track down a number of this kind of issue
DouweM has joined #ruby
<julianhurley>
I never used it
<lupine>
(massive string object proliferation in my case)
interactionjaxsn has quit [Read error: Connection reset by peer]
Targen has joined #ruby
<lectrick>
hoelzro: binding.pry is pretty fuckin sweet, but that's all banisterfiend's labor of love
<hoelzro>
indeed
<hoelzro>
that's the thing about open source - things only get done if they interest someone
<lectrick>
i hope that fucker commits to core. if not i will have to beat down some asians. because open source is no panacea- you can have the best code and if some arrogant greybeard doesn't like you, you will still have to put on your salesman/politician suit and lobby
rdark has quit [Ping timeout: 245 seconds]
Mortchek has quit [Remote host closed the connection]
<lectrick>
code does not stand on its own evidence. actually the big lesson of life is that nothing does. If you just hand someone the truth, they will not take it at face value. You have to massage it in.
<hoelzro>
yeah, it's a shame
<MrZYX>
given that it's surprising that religion works at all :P
<lectrick>
"here, here is the truth. don't you see it?" "ah, no, well... yeah, but if I allow this into core it will make me look bad right now, so go work on some gems for a while or something"
rdark has joined #ruby
<wmoxam>
lectrick: FORK IT
dmiller has joined #ruby
a_a_g has quit [Quit: This computer has gone to sleep]
<wmoxam>
;)
arya has joined #ruby
<hoelzro>
so make sure you work with a language that allows cool stuff to be done outside of core ;)
jbpros has quit [Quit: jbpros]
Mortchek has joined #ruby
<lectrick>
MrZYX: Religion got one thing right- Evangelizing is something that you have to do even outside religion.
<lectrick>
wmoxam: hahaha right?
<lectrick>
People's damn worldviews and egos are the ultimate problem
<wmoxam>
lectrick: that goes both ways
<wmoxam>
"my code is truth" is often a product of ego :p
<lectrick>
:: mumbles something that rhymes with meineheier manson ::
tonini has joined #ruby
Mortchek has quit [Remote host closed the connection]
<lectrick>
how am i not surprised that zed shaw came up with "code fisting" lol
Mortchek has joined #ruby
sleetdrop has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
arya has quit [Ping timeout: 276 seconds]
<MouseTheLuckyDog>
Is there a way to require a ruby file without extension in the local directory?
dhruvasagar has joined #ruby
<lectrick>
MouseTheLuckyDog: Some won't like you doing it, but require_relative "the_file" should work
ctienrsg_ has joined #ruby
rickruby has joined #ruby
tonini has quit [Ping timeout: 248 seconds]
kil0byte has joined #ruby
<lectrick>
MouseTheLuckyDog: Ruby path management is a pain. I usually write helper methods to not pollute my entire repo with "path information"
<MouseTheLuckyDog>
lectrick, tried it. Does work. tried it with strace, shows that ruby tries to load "file.rb" and "file.so" but not "file".
<lectrick>
MouseTheLuckyDog: Oh. You want a non-extensioned file. Why?
<banisterfiend>
MouseTheLuckyDog: use 'load'
<banisterfiend>
MouseTheLuckyDog: load "./hello"
<lectrick>
The problem with "load" is it will always load
<lectrick>
Even if it's already loaded
<lectrick>
"require" only requires once
ctienrsg_ has left #ruby [#ruby]
ctienrsg has quit [Ping timeout: 256 seconds]
<lectrick>
MouseTheLuckyDog: You didn't have to use strace, you could have probably just read the docs for that, that's how I knew that lol
ner0x has joined #ruby
Raydiation has joined #ruby
<Raydiation>
is there a way to overwrite /etc/gemrc by providing a local file? im getting * WARNING: Found --user-install in /etc/gemrc, please remove it, as it will break rubygems in RVM.
<MouseTheLuckyDog>
lectrik wasn't hard to use strace and easier then finding it in the docs.
<ner0x>
If I have an array of keys and an array of values associated to those keys is there a way to merge them easily so they are 1:1?
estan has quit [Read error: Connection reset by peer]
altivec has quit [Quit: Computer has gone to sleep.]
rickruby has quit [Read error: Operation timed out]
<lectrick>
Raydiation: hmmm. maybe a .gemrc in your ~ ?
<lectrick>
MouseTheLuckyDog: Use your favorite tool I guess :)
<nemesit|znc>
i've found Dir.glob('tasks/*.rake').each { |r| import r } to import external rake files but it only works if i substitute import with load…i know nothing about ruby is it ok to just use load or could it cause problems?
iano_ has joined #ruby
jprovazn has quit [Quit: Leaving]
<Raydiation>
lectrick: nope, does not work
<Raydiation>
still getting the warning
pduin has quit [Remote host closed the connection]
altivec has joined #ruby
lyanchih has joined #ruby
robscomputer has joined #ruby
wedgex has joined #ruby
miroatme_ has joined #ruby
robscomputer has quit [Remote host closed the connection]
a_a_g has joined #ruby
robscomputer has joined #ruby
carloslopes has quit [Remote host closed the connection]
Nenor has joined #ruby
<lectrick>
Raydiation: Not sure. Never dealt with that error locally. I assume you googled... Also make sure your PATH is correct
_maes_ has joined #ruby
alexgandy has joined #ruby
<Raydiation>
lectrick: hm, ok ty
estan has joined #ruby
jovy88 has quit [Read error: Connection reset by peer]
Virunga has joined #ruby
peta_ has joined #ruby
jovy88 has joined #ruby
pi3r has quit [Quit: Leaving]
miroatme_ has quit [Ping timeout: 252 seconds]
jzig has quit [Ping timeout: 252 seconds]
bradhe has quit [Remote host closed the connection]
_nitti has quit [Remote host closed the connection]
linusoleander has joined #ruby
linusoleander has left #ruby [#ruby]
schaerli has quit [Remote host closed the connection]
newTech has joined #ruby
dmiller has quit [Remote host closed the connection]
DouweM has quit [Ping timeout: 246 seconds]
adambeynon has quit [Quit: Computer has gone to sleep.]
jlast has joined #ruby
stoic_squirrel has joined #ruby
jzig has joined #ruby
_nitti has joined #ruby
bluenemo has quit [Read error: Connection reset by peer]
<MrZYX>
or you register a catch all hook and do it yourself
estan has joined #ruby
<Spooner>
Hanmac2, I didn't say it should be in core, but it does seem to be something that is sometimes useful (seen it asked for at least twice in #ruby).
bradhe has joined #ruby
carloslopes has joined #ruby
jonathanwallace has quit [Quit: WeeChat 0.4.0]
nomenkun has quit [Ping timeout: 272 seconds]
Concheror has joined #ruby
jzig has joined #ruby
brotatos has quit [Read error: Operation timed out]
<lectrick>
shevy: considering how often this sort of thing is done, I doubt it's worthless effort :)
Asher has quit [Ping timeout: 245 seconds]
<injekt>
that makes complete sense
<shevy>
the pickaxe lied to me
dmiller has quit [Ping timeout: 276 seconds]
<shevy>
it said '' is faster than ""
<lectrick>
injekt: you read the source code, i bet
lambsread has quit [Ping timeout: 260 seconds]
<shevy>
I will bookmark this
<injekt>
lectrick: no, I know that creating one string is faster than creating a string, concating to it, or creating a string and then creating another string
<shevy>
so that every new generation of ruby guys can see that the pickaxe lies
<cout>
lectrick: maybe
<cout>
lectrick: the profile doesn't give me a breakdown, unfortunately :(
jduan1981 has quit [Quit: jduan1981]
icole has joined #ruby
<injekt>
lectrick: try using one single string and concating to it n times, << will probably win
jonathanwallace has quit [Ping timeout: 260 seconds]
<injekt>
unfortunately the benchmark is a poor comparison for the reasons to use << vs +
<lectrick>
cout: yeah, i was just bitching about that this morning here. an easy language-level way to see mem consumption of a block
thomaslee has quit [Read error: Operation timed out]
obs has quit [Quit: Konversation terminated!]
mfridh has quit [Read error: Operation timed out]
jamie_ca_ has joined #ruby
yshh has quit [Remote host closed the connection]
blaxter has joined #ruby
pithagorians has joined #ruby
erry__ has joined #ruby
d3ijw3l has quit [Quit: leaving]
pipework has joined #ruby
arya has quit [Read error: Connection reset by peer]
erry is now known as Guest94131
Guest94131 has quit [Killed (morgan.freenode.net (Nickname regained by services))]
erry__ is now known as erry
arya has joined #ruby
philcrissman has joined #ruby
ramblex has quit [Remote host closed the connection]
mafolz has quit [Ping timeout: 276 seconds]
estan has joined #ruby
locriani has joined #ruby
catphish has joined #ruby
<catphish>
are there any widely used alternative yaml parsers?
kennyvb has joined #ruby
ghr has quit [Quit: Computer has gone to sleep.]
zommi has joined #ruby
dmiller has joined #ruby
<MrZYX>
what's wrong with Psych?
dmiller_ has joined #ruby
dmiller_ has quit [Remote host closed the connection]
<catphish>
might look at RbYAML
<catphish>
MrZYX: i'm not sure, i'm having some network code hang when using psych
dhruvasagar has quit [Ping timeout: 255 seconds]
dmiller_ has joined #ruby
dmiller_ has quit [Remote host closed the connection]
shadoi has quit [Quit: Leaving.]
echevemaster has joined #ruby
echevemaster has quit [Changing host]
echevemaster has joined #ruby
alexwh has joined #ruby
senayar has quit [Remote host closed the connection]
dmiller_ has joined #ruby
mfridh has joined #ruby
dmiller__ has joined #ruby
dmiller__ has quit [Remote host closed the connection]
dmiller_ has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
Nisstyre has quit [Quit: Leaving]
dmiller_ has joined #ruby
dhruvasagar has joined #ruby
dmiller has quit [Ping timeout: 258 seconds]
thomasle_ has joined #ruby
icecandy has joined #ruby
mattbl has joined #ruby
dr_bob has left #ruby [#ruby]
sprites has joined #ruby
wedgex has quit [Remote host closed the connection]
jzig has quit [Ping timeout: 276 seconds]
thomaslee_ has joined #ruby
sprites has quit [Client Quit]
schaerli has joined #ruby
tylersmith has joined #ruby
KevinSjoberg has joined #ruby
dmiller has joined #ruby
geggam has quit [Remote host closed the connection]
jonathanwallace has quit [Ping timeout: 258 seconds]
chrisja has joined #ruby
tjbiddle_ has joined #ruby
<Eiam>
canton7: neat.. interesting bit of history.
Virunga has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
Virunga has joined #ruby
j0hnnY has joined #ruby
persand has joined #ruby
persand has quit [Client Quit]
arietis has quit [Quit: Computer has gone to sleep.]
twoism has joined #ruby
dmiller_ has quit [Ping timeout: 258 seconds]
_br_ has quit [Quit: leaving]
timmow has quit [Ping timeout: 252 seconds]
locriani has quit [Remote host closed the connection]
dmiller has quit [Ping timeout: 256 seconds]
tjbiddle has quit [Ping timeout: 256 seconds]
tjbiddle_ is now known as tjbiddle
jzig has joined #ruby
tealmage has joined #ruby
tealmage has quit [Remote host closed the connection]
estan has quit [Read error: Connection reset by peer]
Virunga has quit [Ping timeout: 252 seconds]
tealmage has joined #ruby
icecandy has quit [Remote host closed the connection]
nahiluhmot has left #ruby ["Leaving..."]
johchri has joined #ruby
johchri has quit [Client Quit]
Xeago has joined #ruby
johchri has joined #ruby
Evixion has joined #ruby
khismetix has joined #ruby
rupee has joined #ruby
arietis has joined #ruby
<lectrick>
I wrote this a month ago or so to help profile memory consumption. I just noticed that it doesn't stop/start the GC, oh well: https://gist.github.com/pmarreck/5245761 cc injekt dr_bob cout shevy wmoxam
MrZYX is now known as MrZYX|off
BBonifield has joined #ruby
<lectrick>
I will be the first to admit that it is 1) probably ugly, and 2) spends a lot of logic not stepping on itself :)
altivec has quit [Quit: Computer has gone to sleep.]
madb055 has joined #ruby
jesteracer has quit [Quit: Computer has gone to sleep.]
dmiller has joined #ruby
noodl has quit [Ping timeout: 256 seconds]
Spami_ has quit [Quit: This computer has gone to sleep]
<lectrick>
But hey, it has inline test coverage. And by "test coverage" I mean "one big test method with a bunch of asserts" :)
noodl has joined #ruby
Mon_Ouie has joined #ruby
elaptics is now known as elaptics`away
zeade has joined #ruby
DarthGandalf has quit [Ping timeout: 256 seconds]
saispo has quit [Ping timeout: 256 seconds]
steeve1 has quit [Ping timeout: 256 seconds]
Skelz0r has quit [Ping timeout: 256 seconds]
<julianhurley>
Getting on well with databases, but where exactly are they stored? In the sqlite gem? They're not in my project's directory?
Yakko_ has quit [Read error: Connection reset by peer]
<julianhurley>
apologies for noobishness
Skelz0r has joined #ruby
<banisterfiend>
julianhurley: it's stored in a file on disk
<julianhurley>
banisterfiend: And the location of this elusive file?
yakko has joined #ruby
<lectrick>
julianhurley: it depends on the database. sqlite db's are stored in <rails project root>/db/ I believe. MySQL are stored in /usr/local/var/mysql (if installed via Homebrew on OS X, at least)
<banisterfiend>
julianhurley: that's up to you and the framework you're using
threesome has quit [Read error: Connection reset by peer]
altivec has joined #ruby
corehook has quit [Ping timeout: 264 seconds]
itman_ has joined #ruby
<banisterfiend>
julianhurley: but it should be a .sql file somewhere in your project folder
jdunck has joined #ruby
schaerli has quit [Remote host closed the connection]
bluOxigen has quit [Read error: Connection reset by peer]
thibauts has joined #ruby
nmeum1 has joined #ruby
<lectrick>
julianhurley: if you're using rails, I mean
itman has quit [Read error: Operation timed out]
backjlack has quit [Read error: Operation timed out]
companion_ has joined #ruby
companion has quit [Read error: Operation timed out]
nmeum has quit [Read error: Operation timed out]
thibauts_ has quit [Read error: Operation timed out]
Niamkik has quit [Remote host closed the connection]
sideshowcoder has quit [Read error: Operation timed out]
Niamkik has joined #ruby
<julianhurley>
Yes, using rails. It's appeared in my root directory. I think Finder lagged :L
<julianhurley>
thanks a lot chaps
companion_ is now known as companion
companion has quit [Changing host]
companion has joined #ruby
backjlack has joined #ruby
steeve1 has joined #ruby
DarthGandalf has joined #ruby
xardas has quit [Changing host]
xardas has joined #ruby
Liquid-- has joined #ruby
bluOxigen has joined #ruby
threesome has joined #ruby
<peta_>
How can I apply a range object to an array? e.g. r = (0..1), a = [1,2,3,4,5] -- something like a[r].each {|e| kungfoo }
<shevy>
peta_ a range has a START and an END
<shevy>
array[3..5]
T|ASK has joined #ruby
<Liquid-->
hello, anyone know how to have a ruby script enter a password when prompted? I have a script that logs into remote servers but each server will prompt for a password.
<T|ASK>
HI
estan has joined #ruby
<banisterfiend>
peta_: just like shevy said: a[r].each
banjara has quit [Quit: Leaving.]
<shevy>
array = [1,2,3,4,5] # => [1, 2, 3, 4, 5]
<shevy>
r = 3..5 # => 3..5
<shevy>
array[r] # => [4, 5]
<peta_>
yes yes
<shevy>
that's the cool part of ruby peta_
<peta_>
omg .. i was sure to have tried this syntax array[r].each ...
SAUCYSALAMANDER has quit [Ping timeout: 260 seconds]
<shevy>
enjoy and remember these for the days when you use the dark parts of ruby
<shevy>
when the keyword "meta" is used, you know you are on the dark side
<shevy>
also when "eval" is part of an API, you are very much in the dark
<peta_>
yes sir
<shevy>
the dark side of ruby is not as much fun as the dark side for Luke Skywalker you see
<shevy>
or his dad, I forgot who was good and who was evil
miroatme_ has joined #ruby
<shevy>
his dad probably wrote python scripts
sprites has joined #ruby
dmiller has quit [Remote host closed the connection]
athst has joined #ruby
sprites has quit [Client Quit]
fermion has joined #ruby
<catphish>
Liquid--: if you don't mind console echo, use gets
dmiller has joined #ruby
<catphish>
if you do mind, there are gems that can do it, but no standard ruby way afaik
MrZYX|off is now known as MrZYX
brianpWins has joined #ruby
sideshowcoder has joined #ruby
brotatos has quit [Quit: WeeChat 0.4.1-dev]
philcrissman has quit [Remote host closed the connection]
sprites has joined #ruby
Eldariof-ru has joined #ruby
brotatos has joined #ruby
Nautes has joined #ruby
T|ASK has left #ruby [#ruby]
ananthakumaran has joined #ruby
niklasb has quit [Read error: Operation timed out]
soulcake has joined #ruby
ossareh has joined #ruby
jdunck has quit [Quit: Computer has gone to sleep.]
chiel has quit [Quit: Lost terminal]
dmiller has quit [Ping timeout: 258 seconds]
ephemerian has quit [Quit: Leaving.]
<Liquid-->
catphish: thank you! what would be an example code snippet using gets? you are saying that the password will be displayed on the console if I use gets? So the only way to hide it would be to use a custom gem?
jdunck has joined #ruby
<catphish>
Liquid--: correct
<catphish>
Liquid--: i think you just do: password = gets
icole has quit [Remote host closed the connection]
<markalanevans>
but i don't understand the syntax for headers: {Accept: "text/html"}
danman has joined #ruby
<markalanevans>
or params: {field1: "a field"},
Ontolog has quit [Ping timeout: 268 seconds]
<Quadlex>
markalanevans: That's the "New" hash syntax
<MrZYX>
it's the 1.9 of writing {:field1 => "a field" }
<Quadlex>
When you have symbol keys, you can instead place the colon at the end of the symbol
<Quadlex>
Apparently it looks "more natural"
<Quadlex>
I think it's an abombination
nhhagen has quit [Remote host closed the connection]
<markalanevans>
Wow. Totally not more natural.
BizarreCake has quit [Ping timeout: 246 seconds]
<MrZYX>
in 2.0 you also pass keyword arguments that way (if the method expects it, otherwise it'll be a hash)
<lectrick>
Unless you've used json...
nhhagen has joined #ruby
yacks has joined #ruby
<shevy>
markalanevans you can use the old way
<markalanevans>
Well I want to be hip.. i guess.
<Quadlex>
NOOOOO
<shevy>
really
<wuest>
markalanevans: do what feels natural to you :p
<markalanevans>
So basically putting the : after the words.
<Quadlex>
You want to be comfortable and have people be able to read your code
<shevy>
only because you wanna be hip
<markalanevans>
means its part of a hash
<shevy>
:(
<danman>
hey is array.delete breaking ruby's method naming convention? array.delete actually deletes from array. Shouldn't there be a array.delete! method to change the content of the array, like compact!, gsub!, uniq!?
chrishough has joined #ruby
<markalanevans>
no more typing the {}
<Quadlex>
I totally understand the desire to be hip:P
<shevy>
markalanevans I think I hate you
<markalanevans>
haha
<akhet>
you dont hate anyone shevy
<Quadlex>
markalanevans: You still need the hash braces
<shevy>
mark_locklear, no, the {} can be omitted sometimes, regardless of the syntax
<wuest>
Quadlex: not in all cases.
banisterfiend has quit [Read error: Connection reset by peer]
<shevy>
def foo(input = nil)
<markalanevans>
Quadlex: yea there are no braces in the example
<shevy>
end
jhn has joined #ruby
colonolGron has joined #ruby
<Quadlex>
wuest: Only when an argument though, right?
<shevy>
foo( { :key => 'value' } )
<MrZYX>
danman: the convention is, if there's a ! version of the method, the non ! version will not modify the receiver
<markalanevans>
so apparently i can leave off the braces.
<shevy>
foo( :key => 'value' )
<shevy>
foo( key: 'value' )
<wuest>
Quadlex: yeah.
<shevy>
markalanevans yes but that has nothing to do with the : syntax
<wuest>
And only for the terminal argument.
<markalanevans>
?
<MrZYX>
danman: you won't find a bang version if there's no non-bang version in core ruby
chrishunt has joined #ruby
<shevy>
markalanevans the rails fanbois wanted key: 'value'
colonolGron has quit [Client Quit]
<workmad3>
shevy: you missed out 'foo({key: 'value'})' as an example ;)
colonolGron has joined #ruby
<Quadlex>
markalanevans: method calls which are written METHOD( ARG1, ARG2, { A3 => X, A4 => Y}, BLOCK }
niceguyjames has quit [Quit: Computer has gone to sleep.]
<Quadlex>
Or any variation thereov
<shevy>
Quadlex is a mathematician :D
<Quadlex>
Can drop the hash braces
<shevy>
can I bang a version?
<Quadlex>
And it will assume everything after the 2nd last argument (exccluding the block) is a hash
dmiller has joined #ruby
<Quadlex>
shevy: uh no?
<danman>
MrZYX: I would have to say that's non-intuitive. What if I don't want to change the array?
<shevy>
I just liked the all caps there :D
<shevy>
GOTO START
<markalanevans>
but in their case they have method(arg1, arg2, key1: "value1", key2: "value2", arg3)
estan has quit [Read error: Connection reset by peer]
sea6ear has joined #ruby
<shevy>
well markalanevans, that depends
<markalanevans>
it just seems weird to leave off the {}
<shevy>
def method(*input)
<shevy>
^^^ all can be optional now
gaahrdner has joined #ruby
<shevy>
you do not have to leave off the {}
<shevy>
if it confuses you, keep using it!
KJM has joined #ruby
<markalanevans>
right but you can, and thats just confusing
skattyadz has quit [Quit: skattyadz]
<shevy>
you can do a lot of whacky stuff in ruby, that's true
vlad_starkov has joined #ruby
<shevy>
and 90% of the ruby code written by others I hate
<markalanevans>
what if i did : method(arg1, arg2, key1: "value1", key2: "value2", arg3, key3: "value3")
<shevy>
what is that
<shevy>
is that even valid syntax what you try to do here?
<markalanevans>
would key3 be apart of the hash?
<MrZYX>
danman: usually #reject
<shevy>
I have no idea what that is haha
girija has joined #ruby
<shevy>
but intuitively, it looks invalid syntax
<shevy>
any project needing such a method call must be deleted
KJM has left #ruby [#ruby]
<markalanevans>
i guess what i'm saying is how is that by leaving off the {} but still separating the values with commas ruby isn't interpreting those as separate params rather than making it a hash.
<shevy>
ok, so 3 hashes as input to that method?
<markalanevans>
no no
<markalanevans>
so going back to the original pastie
<shevy>
markalanevans, honestly, 99% of the code I see where {} is left off is either by accepting only one argument, or by having the last argument to the method be a hash
dmiller has quit [Ping timeout: 245 seconds]
<shevy>
def foo( :cat => 'tom' }
<shevy>
oops
<shevy>
that was a bad example
<workmad3>
markalanevans: that's calling a method with a url and a hash of options
<workmad3>
markalanevans: but some of the keys in that hash point to nested hashes, which always need the {} wrapping them
<shevy>
markalanevans I think he must have something like: def initialize(bla, *options)
carloslopes has joined #ruby
<workmad3>
shevy: he has 'def initialize(url, options = {})'
rezzack has joined #ruby
<shevy>
hmm
asteve has joined #ruby
<shevy>
no * ?
<slash_nick>
active support has the #extract_options!
pkrnj has quit [Ping timeout: 264 seconds]
<workmad3>
shevy: why would he need a variable length array arg?
browndawg has quit [Quit: Leaving.]
<workmad3>
shevy: it's a string and a hash being passed in
<MrZYX>
or def initialize(url, method: 'get', body: nil, etc
locriani has quit [Read error: Connection reset by peer]
<workmad3>
markalanevans: exactly the same thing, yes
tealmage has quit [Remote host closed the connection]
icecandy has joined #ruby
bluOxigen has joined #ruby
<shevy>
the second is better
<MrZYX>
because you're more used to it
arietis has quit [Quit: Computer has gone to sleep.]
locriani has joined #ruby
<shevy>
because it requires less brain processing time
banisterfiend has joined #ruby
<Quadlex>
shevy: I just wanted to make it clear
<banisterfiend>
Quadlex: make what clear
<shevy>
Quadlex :D
<markalanevans>
so does that mean that the ruby interpreter is looking at each param being passed and assumes that if it is postfixed with a : then it should be part of the methods defined second param and is a hash
l3ck has joined #ruby
<workmad3>
markalanevans: no
<Quadlex>
banisterfiend: an example I was giving
vlad_starkov has quit [Ping timeout: 252 seconds]
<markalanevans>
and then the next param that doesn't end with : is the next param.
<shevy>
trying to understand the ruby parser is like trying to understand madness
<markalanevans>
right, but thats pretty much what it must be doing
<Quadlex>
markalanevans: OK, so lets ignore block for now
<Quadlex>
If a method has 4 arguments
<workmad3>
markalanevans: an implicit hash param has to be the last argument to a method
khismetix has quit [Quit: Computer has gone to sleep.]
<Quadlex>
And you supply 4 exactly OR more then 4
codemonkey010101 has quit [Remote host closed the connection]
l3ck has quit [Client Quit]
<markalanevans>
params in a method separate by commas should be separate params, but in this case it must be looking at params with a given postfix ":" and and do something with it...
<Quadlex>
The parser will assume the last one is a hash
gyre007 has quit [Ping timeout: 258 seconds]
codemonkey010101 has joined #ruby
blueOxigen has quit [Ping timeout: 264 seconds]
<workmad3>
markalanevans: and what the parser does is essentially go 'does this syntax match an inline hash token?' if it does, then the rest of the arguments need to also be hashey
<Quadlex>
It can do this because the method you're calling has a signature with 4 arguments
<workmad3>
markalanevans: and they all get gathered together into a single hash and passed as that
<Quadlex>
This ONLY works for the final argument (That's not a block)
<markalanevans>
Ok one sec i'm going to look at the object signature. one sec
<markalanevans>
I really want to understand this because its been confusing me.
<workmad3>
markalanevans: 'foo bar: "baz"' and 'foo :bar => "baz"' are both identical too btw
juarlex has quit [Ping timeout: 252 seconds]
<Quadlex>
It's one of those things that is "easy" once you've been doing it a while
<ericwood>
rocketships are better than that silly json notation
<Quadlex>
But when you're new there are lots of weird things to remember
<Quadlex>
ericwood: EXACRTLY
<workmad3>
markalanevans: in the same way that 'foo = {bar: "baz"}' and 'foo = {:bar => "baz"}' are identical hash declarations
<Quadlex>
...spelling
Liquid-- has quit [Quit: Computer has gone to sleep.]
<ericwood>
=> => => pew pew pew
qohelet_ has joined #ruby
<Quadlex>
Rocketships are exciting
<Quadlex>
Colons are shitty
<Quadlex>
Do you want your code to be exciting, or shitty?
<ericwood>
both.
<workmad3>
unless you're using named parameters in ruby 2, anyway :)
<ericwood>
I would like to have my cake and eat it
<Morrolan>
Do you want your code to be as explosive as a rocket?
twoism has quit [Read error: Connection reset by peer]
<Zelest>
Colons are shitty by design :D
twoism has joined #ruby
<workmad3>
I personally would prefer the ruby json-esque notation if it was actually json-esque
<markalanevans>
So basicaly ruby got rid of => in hash declarations
juarlex has joined #ruby
<markalanevans>
to be simply key: "value
<Morrolan>
Only when the keys are symbols.
<markalanevans>
kinda like json
<Quadlex>
Morrolan: Yes. I want it to blast the user off on a magical space adventure
<workmad3>
markalanevans: ruby introduced a shorthand for symbol-keys
<Morrolan>
Quadlex: Remind me never to use your software. :o
<Quadlex>
That's another reason I hate it
estan has joined #ruby
<ericwood>
=>
<Quadlex>
"YAY ANOTHER SPECIAL CASE"
<workmad3>
markalanevans: => is still valid, and needed if you want to use anything other than a symbol as a key
<ericwood>
just use it for everything because it's more explicit...
<ericwood>
maybe that's just me, though
<workmad3>
ericwood: it's not any more explicit
<ericwood>
bah!
<shevy>
markalanevans it did not get "rid" of it because the old way still works
<workmad3>
ericwood: {foo: "bar"} is explicitly a hash literal with a single k-v pair, key == :foo, value == "bar"
<markalanevans>
Most likely i will just use it. But i think i get it now. Just want to be able to understand what i'm reading as i dissect gems.
<shevy>
I use => all the time and never :
monkegjinni has joined #ruby
<slash_nick>
"foo": => "bar" is valid?
* slash_nick
tries
<workmad3>
ericwood: it's less general, slightly less verbose, and is annoyingly close to json while still ensuring copy-pasting json into irb will spew errors all over your screen
<workmad3>
ericwood: but it's the same level of explicitness ;)
zommi has quit [Remote host closed the connection]
Neomex has joined #ruby
Neomex has quit [Client Quit]
<shevy>
slash_nick I hope not
stoic_squirrel has joined #ruby
<slash_nick>
shevy: rest easy
<shevy>
slash_nick hehe
<ericwood>
things would be easier if y'all just agreed with me
<ericwood>
just sayin'
<slash_nick>
I completely assumed markalanevans: was a symbol
<workmad3>
ericwood: you took the words right out of my fingers ;)
<shevy>
ericwood only if you agree with matz
* ericwood
bows before Matz shrine
<shevy>
hehehe
qohelet_ has quit [Quit: qohelet_]
<banisterfiend>
what shall we talk baout
<ericwood>
ruby
<workmad3>
incidentally, if you write coffeescript solidly for about 3 months, you tend to end up using foo: "bar" in ruby :(
codemonkey010101 has quit [Quit: codemonkey010101]
<ericwood>
the same thing we talk about every night, banisterfiend
<ericwood>
RUBY
<workmad3>
ericwood: how to take over the world... with RUBY!!!
<ericwood>
been there, done that
<banisterfiend>
workmad3: i've been doing a fair bit of coffeescript recently via marionette.js
<ericwood>
it was boring
<banisterfiend>
workmad3: i like it, but it's a real pain when you try to move code around
codemonkey010101 has joined #ruby
* ericwood
has been doing marionette as well, sans coffeescript
<workmad3>
ericwood: do it again, but this time use excessive metaprogramming ;)
<Quadlex>
How about we talk about... Why Rubyists don't tend to do integration testing of their web apps
mneorr has quit [Remote host closed the connection]
<banisterfiend>
ericwood: the nice thing about marionette/backbone is that the coffeescript class model matches up to the backbone one
<ericwood>
I do need to work on my meta skillz
<banisterfiend>
ericwood: so you can just use 'class Blah' rather than the Blah.Blah.extend() jazz u have to do in other MVC frameworks
<ericwood>
banisterfiend: my coworkers would not be happy if I suddenly switched langs :P
<ericwood>
but I like extend() !!!!
<workmad3>
banisterfiend: yeah, I can see that... I'm still trying to get vim to play nice with coffeescript indentation... until that happens, then ]p won't work for moving it :(
<Quadlex>
Canonical ruby: a method called do_the_things taking an optional :all argument
<banisterfiend>
ericwood: it would literally take your team about 3 days to switch to coffeescript
<Quadlex>
That then does whatever you, as the original author, think the next guy should WANT to do
codemonkey010101 has quit [Client Quit]
<banisterfiend>
ericwood: and if you're using rails you can just tap a .js.coffee on the end of the new files ,and let sprockets deal with it
<Quadlex>
I still want .rb.coffee
<ericwood>
yeah but my coworkers have to deal with the code :P
<ericwood>
and we're having enough trouble as it is reprogramming them all to use marionette as it is!
<workmad3>
ericwood: if they can do javascript, they can do coffeescript
<ericwood>
I'm sure
codemonkey010101 has joined #ruby
<ericwood>
they're capable, we just don't have the time right now
<banisterfiend>
workmad3: multiple cursors help (in emacs)
<workmad3>
:)
<ericwood>
so leave me be!
<banisterfiend>
ericwood: which widget set are you using? kendo ui?
juarlex has quit [Read error: Connection reset by peer]
<workmad3>
banisterfiend: it's more that when I ask vim to indent a coffeescript file, it decides that every line should be an extra level of indent compared to previously :(
<ericwood>
banisterfiend: we use a modified boostrap
<banisterfiend>
ericwood: the creator of marionette is on the kendo ui team so the kendo widgets work great with backbone/marionette
juarlex has joined #ruby
SeanTAllen has joined #ruby
<ericwood>
we have lotsa bootstrappy stuff, in addition to a lot of our own kit
nhhagen_ has joined #ruby
<workmad3>
banisterfiend: not sure how multiple cursors help with bad indent rules
Leighton has joined #ruby
<banisterfiend>
workmad3: well when you mess up indentation (say when u're moving large chunks of code around between methods/classes) i find it useful to just tweak the indentation
<workmad3>
banisterfiend: that's what ]p does ;) 'paste and reindent' :)
<banisterfiend>
workmad3: how does it know how far to reindent?
Guest62682 is now known as banghouse
<banisterfiend>
it's so ambiguous
mattbl has joined #ruby
<banisterfiend>
multiple cursors allows me to do that manually since editors often mess it up
<shevy>
ericwood what languages do you or your co-workers use?
<ericwood>
we're a rails shop
blacktulip has quit [Remote host closed the connection]
<workmad3>
banisterfiend: well, if the indent rules worked properly in my vim setup, then it would take it from context
<ericwood>
so, all of the languages you'd expect from a rails shop
lkba has joined #ruby
<Quadlex>
What syntax do you guys like to use for multiline blocks of text you need to output to the console?
<banisterfiend>
Quadlex: do/end
<banisterfiend>
wait
<workmad3>
Quadlex: heredocs
<banisterfiend>
heredocs
mneorr has joined #ruby
rton has left #ruby [#ruby]
ixti has joined #ruby
xardas has quit [Read error: Connection reset by peer]
icole has quit [Remote host closed the connection]
rton has joined #ruby
alexgandy has joined #ruby
ixti has quit [Client Quit]
<banisterfiend>
workmad3: but i think the point is that there's almost never enough context to figure it out definitely, emacs doesnt try to figure it out either
codemonkey010101 has quit [Quit: codemonkey010101]
<banisterfiend>
you'd need some pretty sophisticated scripts to figure it out maybe
<banisterfiend>
and even then it would just be a guess in many cases, since there's many cases where it will always be ambiguous
<workmad3>
banisterfiend: possibly, I'm hopeful that my vim-coffeescript plugin will be modded by the authors to have better indent rules eventually :)
<workmad3>
banisterfiend: until then, it's just 'p' then visual-block select it and manually > or < it
<banisterfiend>
workmad3: which client side js MVC are you using?
joofsh has joined #ruby
<workmad3>
banisterfiend: you asked this previously I believe ;) the project a lot of my CS is in isn't using a JS MV* framework
<workmad3>
banisterfiend: it's more of a hand-rolled visual hierachy roughly analogous to a document-presenter thing
<banisterfiend>
workmad3: yeah i figured i might have, ah, probably cos you didnt mention one it didnt stick
<workmad3>
banisterfiend: which we migrated too when we just couldn't get ember to stay stable (too many interactions that caused bad, uncontained cascades :( )
<workmad3>
s/too/to
<workmad3>
if we redid it, would possible consider backbone
<banisterfiend>
workmad3: you should check out marionette, im finding it really elegant
<workmad3>
*possibly
<banisterfiend>
yeah backbone+marionette
<banisterfiend>
marionette is the shiz
<rking>
banisterfiend: Did you post code re: marionette?
<banisterfiend>
rking: what?
<rking>
Do you have public code that uses it?
robbyoconnor has quit [Max SendQ exceeded]
<rking>
A gist or repo.
<banisterfiend>
rking: ah not yet really
<banisterfiend>
rking: but there's lots of it around
<banisterfiend>
one sec ill find you some
robbyoconnor has joined #ruby
<workmad3>
banisterfiend: would be a pretty major rebuild now though... we've got essentially 3 major js apps in the project now, totalling about 4k lines of cs
estan has quit [Read error: Connection reset by peer]
altivec has quit [Quit: Computer has gone to sleep.]
evenix_ has joined #ruby
<banisterfiend>
workmad3: seems crazy you guys would have so much cs and not have decided on a framework early on
generali_ has joined #ruby
<banisterfiend>
but i guess u tried ember and it didnt work out, from the sounds of it
<workmad3>
banisterfiend: yeah, pretty much it
evenix_ has quit [Remote host closed the connection]
<banisterfiend>
workmad3: backbonerails.com
<rking>
Ugh I'm such a CoffeeScript snob.
<banisterfiend>
workmad3: get your boss to buy it :)
evenix has quit [Read error: Connection reset by peer]
<rking>
After looking at some JS this week that's such a delight.
robscomputer has joined #ruby
evenix has joined #ruby
<rking>
Hanmac: Why does the conveyor move differently than the tables?
altivec has joined #ruby
<workmad3>
banisterfiend: we'd also been working on 2 of the apps in parallel, one smaller one was the one we started with ember and didn't work out, the other one was mostly done by a guy who'd done a lot of UI work in other languages, and went with a style he knew would work and stay stable as he built on it
tealmage has joined #ruby
codemonkey010101 has joined #ruby
<banisterfiend>
workmad3: cool
mr0wl has quit [Quit: leaving]
<workmad3>
banisterfiend: so when ember was being a real PITA with event containment, it made a certain amount of sense to spend about 4 days rewriting it to a style we already knew was working with our stuff :)
evenix_ has joined #ruby
evenix_ has quit [Remote host closed the connection]
robbyoconnor has quit [Ping timeout: 264 seconds]
<Hanmac>
rking: "You are right, this is a violation of the laws of physics. I'll -notify the physics police"
evenix has quit [Read error: Connection reset by peer]
RORgasm has quit [Remote host closed the connection]
<workmad3>
rking: heh :) I wrote some javascript this week
<rking>
banisterfiend: What is the relationship of Marionnette vs. Backbone?
<workmad3>
rking: directly into the text editor in a html macro in confluence :)
<rking>
Hanmac: I didn't say that. It's possible that the top of the table is at a different depth with respect to the viewer, and the tables hover above the lower part of the band.
<banisterfiend>
rking: same as between padrino and sinatra, except marionette doesn't suck.
<Quadlex>
Ouch
megha has joined #ruby
<rking>
workmad3: Are you OK?
<banisterfiend>
not saying that padrino sucks, i've never used it, but that's what i've been told :)
<Quadlex>
I hate when people pick on stylistic things in os code
<workmad3>
s/this week/last week
<workmad3>
rking: it was kinda fun... sort of like I imagine driving a real wreck of a car is
<rking>
Quadlex: Who did that?
<Hanmac>
rking: this was a quote, now its your turn to google that ,P
<workmad3>
not that I know what any sort of driving was
<workmad3>
*any sort of driving is like
<rking>
Hanmac: Which quote?
<workmad3>
bleh, brain isn't working right
locriani has quit [Read error: Connection reset by peer]
baba has quit [Ping timeout: 276 seconds]
<banisterfiend>
rking: IMO marionette could/should be huge. It stands up to ember.js/angular in terms of reduction of boiler plate, but of course it's much easier from the already large number of backbone users to migrate to
<banisterfiend>
for the*
<Hanmac>
rking: this one in the ""
<banisterfiend>
Hanmac: are you james baxter?
<banisterfiend>
Hanmac: do you know who james baxter is
freerobby has quit [Read error: Connection reset by peer]
rakm has joined #ruby
<Hanmac>
banisterfiend: the bubble is the father ;P
estan has joined #ruby
<banisterfiend>
Hanmac: most likely :) something terrible happens to the baby though
<banisterfiend>
bbl
banisterfiend has quit [Remote host closed the connection]
fmcgeough has quit [Quit: fmcgeough]
<Quadlex>
rking: Actually, that reminds me, my VERY FIRST FOSS commit, I was told off for not following their desired style
<Quadlex>
They didn;t have a styleguide
alexgandy has quit [Ping timeout: 248 seconds]
<shevy>
hehe
alexgandy has joined #ruby
<shevy>
I guess most of the styleguides are what most people will do after some years
<shevy>
like after ten years of coding, people tend to indent in a certain way
<shevy>
two spaces if they are smart per level of indent
Hanmac has quit [Ping timeout: 246 seconds]
<Spooner>
4 spaces is fine too. 1 tab is sorta horrid (but I have to do that for my main client, which is a pain) ;)
CamonZ has quit [Ping timeout: 245 seconds]
Nenor has quit [Remote host closed the connection]
tealmage has quit [Remote host closed the connection]
decentrality has joined #ruby
<ChristianS>
Spooner: set your visual tabwidth to 2 and you'll be fine (more or less)
zommi has joined #ruby
<Spooner>
ChristianS, I've set it to 4, which is Python normal (it is a Python client, because I can find those, unlike Ruby ones :D). The problem comes with terrible pasties or online repository browsing...or accidentally mixing spaces in :(
dangerousdave has joined #ruby
<Spooner>
Main problem, however, is having to change the setting in my editor for other clients who aren't muppets :D
jamie_ca_ has quit [Ping timeout: 258 seconds]
<Spooner>
Gives me something to moan about though!
<ChristianS>
lol, i understand
slainer68 has joined #ruby
jamie_ca_ has joined #ruby
miroatme_ has joined #ruby
ramblex has quit [Remote host closed the connection]
cyberarm has joined #ruby
rep0st has joined #ruby
alvaro_o has joined #ruby
nomenkun_ has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
sandGorgon has quit [Ping timeout: 258 seconds]
<rking>
Quadlex: URL?
<rep0st>
so i am assigning 116 characters to a variable called bob using %{}. seems like when i pass it to system(bob) it inserts a new line character which breaks what i'm trying to do. Is that as designed?
nomenkun has joined #ruby
alvaro_o has quit [Client Quit]
<banisterfiend>
rking: did u get much feedback/reaction to your lightning talk
aknewhope has joined #ruby
<Spooner>
rep0st, It is if you put newlines in the %{}
<rking>
banisterfiend: A bit, yeah.
miroatme_ has quit [Ping timeout: 256 seconds]
<rking>
The A/V problems ate most of the feedback.
ananthakumaran has quit [Quit: Leaving.]
<banisterfiend>
wat did they say
<banisterfiend>
lame
slash_nick has quit [Ping timeout: 276 seconds]
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
<Spooner>
rep0st, If you have to write it on multiple lines, use %{...}.gsub("\n", '') to get rid of the newlines.
<banisterfiend>
rking: i heard that arko guy was still using exception_explorer, that was cute :D
<rep0st>
Spooner: well that's the thing i'm not. Hm. I was thinking of doing that. I was hoping for a nicer way of doing it. But if it has to be done it has to be done.
twoism has quit [Read error: Connection reset by peer]
<rep0st>
Spooner: ty
timonv has joined #ruby
twoism has joined #ruby
<Spooner>
rep0st, It won't have newlines in it unless you put them there by putting the } on a different line than the %{
estan has quit [Read error: Connection reset by peer]
<banisterfiend>
rking: what was the non A/V feedback about?
hadees has quit [Quit: hadees]
pkrnj has joined #ruby
vlad_starkov has joined #ruby
dmiller has joined #ruby
forlin has quit [Ping timeout: 256 seconds]
girija has quit [Ping timeout: 248 seconds]
Asdasd has joined #ruby
theRoUS has quit [Ping timeout: 245 seconds]
<rep0st>
Spooner: Ah makes sense. root cause was that i wasn't chomping input from gets. makes sense. I had half an idea that either the string or the system call was inserting a new line some where. Thank you for pointing me.
whowantstolivef1 has joined #ruby
Hanmac has joined #ruby
yashshah has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 252 seconds]
yashshah has joined #ruby
codemonkey010101 has quit [Quit: leaving]
yfeldblum has quit [Ping timeout: 272 seconds]
jtharris has quit [Quit: WeeChat 0.4.0]
asteve has quit [Quit: Computer has gone to sleep.]
pkrnj has quit [Read error: Operation timed out]
<Ontolog_>
i always find myself wanting something like this: a - b < 0 ? 0 : a - b but i don't want to type out a - b twice
Ontolog_ is now known as Ontolog
timonv_ has joined #ruby
caedmon has joined #ruby
caedmon is now known as codemonkey010101
nomenkun_ has joined #ruby
asteve has joined #ruby
timonv has quit [Read error: Connection reset by peer]
<workmad3>
Ontolog: [0, a - b].max
<Ontolog>
workmad3: oh yeah that's cool, that works in that specific instance
alexgordon has joined #ruby
<workmad3>
Ontolog: you could also try (tmp = a - b) < 0 ? 0 : tmp
mneorr has quit [Remote host closed the connection]
<Ontolog>
ah
<Ontolog>
yeah that might work
<workmad3>
Ontolog: wouldn't recommend either apart from in throwaway code though... neither is particularly intention revealing (and neither is the first case)
nomenkun has quit [Ping timeout: 246 seconds]
estan has joined #ruby
<Ontolog>
jeez
<Ontolog>
in that case might was well write java :p
<jeebster>
musl: ah so I can't do so in the form of a 2d hash, I must merge afterwards
rickmasta has joined #ruby
zekefast has quit [Quit: Leaving.]
LaPetiteFromage has joined #ruby
<shevy>
"Work on the ASCII standard began on October 6, 1960"
<shevy>
god, none of you has been even born then
<shevy>
"The IANA prefers the name US-ASCII[10] to avoid ambiguity."
<shevy>
ack
Xeago has joined #ruby
<shevy>
"ASCII was the most commonly used character encoding on the World Wide Web until December 2007, when it was surpassed by UTF-8"
<shevy>
:(
chrishough has quit [Quit: chrishough]
slash_nick has quit [Ping timeout: 256 seconds]
<musl>
jeebster: What are you trying to do? #<< isn't defined for Hash.
<cupakromer>
musl arr.merge(hash.to_a)?
<jeebster>
cupakromer: yes I belive I must merge
banister_ has quit [Ping timeout: 264 seconds]
bentech has joined #ruby
<musl>
Since when can you merge arrays?
fermion has quit [Ping timeout: 255 seconds]
<bentech>
greenarrow: Help me?
<cupakromer>
musl meant arr.concat
<greenarrow>
bentech: hello
<bentech>
greenarrow: hi
mikepack has quit [Read error: Connection reset by peer]
Ontolog_ has joined #ruby
<greenarrow>
bentech: welcome to #ruby
Eldariof-ru has quit [Read error: Connection reset by peer]
<bentech>
greenarrow: Thanks for the welcome
mikepack has joined #ruby
<greenarrow>
bentech: no problem
<bentech>
greenarrow: Will you help with my problem?
<musl>
cupakromer: What's in the receiving array? more key/value pairs?
<greenarrow>
bentech: yes
<bentech>
greenarrow: Great thanks
<cupakromer>
no idea, i'm guessing that's what jeebster wanted
<greenarrow>
bentech: what's the problem
<musl>
ah.
<jeebster>
cupakromer: you got it
estan has joined #ruby
<jeebster>
thanks fellas
<bentech>
greenarrow: Which one is greater than, i always forget, > or <
<greenarrow>
greenarrow: <
tylersmith has quit [Remote host closed the connection]
<bentech>
greenarrow: Thanks
<greenarrow>
bentech: anytime
<jeebster>
lol
tylersmith has joined #ruby
akells` has quit [Remote host closed the connection]
Coolhand has joined #ruby
<Hanmac>
bentech: we are in the 21th century, we use spaceships <=> ;P
includex has quit [Quit: Leaving...]
tylersmith has left #ruby [#ruby]
<bentech>
Hanmac: Thanks Hanmac, i don't know what that is though
interactionjaxsn has quit [Remote host closed the connection]
Ontolog has quit [Ping timeout: 258 seconds]
<shevy>
bentech spaceship operator is "<=>"
<shevy>
bentech I think in ruby it is used for sorting
ipalaus has joined #ruby
tonini has quit [Quit: leaving]
<bentech>
wbut what does that do?
jon_w has joined #ruby
<Hanmac>
shevy and what is that?`<~ or the -> ?
interactionjaxsn has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
<shevy>
-> is the useless and evil lambda operator
interactionjaxsn has joined #ruby
RiftyMcF3arless has joined #ruby
<shevy>
I dunno what abomination <~ should be
jzig has joined #ruby
<shevy>
I hope it is invalid syntax
<Hanmac>
bentech: look at the Comperable module, <,>,==,<=,=> redirects to <=>
tylersmith has joined #ruby
<bentech>
oh it's just compare
<Hanmac>
shevy they are for ruby gem version checking
<shevy>
bentech < is smaller than, > is greater than, == is equal to, <= is less than or equal, => is greater than or equal
tylersmith has left #ruby [#ruby]
jon_w is now known as jwelzel
timonv_ has quit [Remote host closed the connection]
jenrzzz has joined #ruby
<shevy>
bentech yes, programming is all about comparing
<shevy>
if x > y
<RiftyMcF3arless>
hello all. i'm working on a project for a client that we're using Watir in to drive an instance of Firefox. we want to be able to retain our login state between browser closes using a website's cookies. when i load the profile we're using in Firefox itself, it works fine, but when i load the profile using Watir, it loads everything but the cookies. any ideas why?
<Hanmac>
shevy: i was wondering if -> or ~> also have such names like "spaceship operator"
tylersmith has joined #ruby
<shevy>
-> is the lambda operator, isn't it?
Rix has quit [Ping timeout: 248 seconds]
<shevy>
ruby is so cool that you can pick only 10% of the language and still be happy
<tylersmith>
stabby lambda
<shevy>
ah yes, the stabby something
yalue has quit [Read error: Connection reset by peer]
corehook has quit [Ping timeout: 256 seconds]
kofno has quit [Remote host closed the connection]
pskosinski has quit [Ping timeout: 245 seconds]
tylersmith has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby
tylersmith has joined #ruby
chrishough has quit [Quit: chrishough]
carloslopes has joined #ruby
freerobby1 has quit [Quit: Leaving.]
jonathanwallace has joined #ruby
Rix has joined #ruby
athst has quit [Quit: athst]
tspike has joined #ruby
sideshowcoder has quit [Read error: Operation timed out]
swex has joined #ruby
elaptics`away is now known as elaptics
iano_ has quit [Remote host closed the connection]
carloslopes has quit [Ping timeout: 264 seconds]
dmiller_ has joined #ruby
slash_nick has joined #ruby
helvete has quit [Quit: Leaving...]
<forrest>
so what is ~> for?
estan has quit [Read error: Connection reset by peer]
<workmad3>
forrest: spermy version operator!
marr has joined #ruby
h8R has quit [Ping timeout: 245 seconds]
<forrest>
heh, i was going to call it a sperm something
<workmad3>
forrest: also known as the 'twiddle version operator'
dmiller has quit [Ping timeout: 245 seconds]
<shevy>
man
<workmad3>
forrest: ~> X.Y.Z is equivalent to >= X.Y.Z and < X.(Y + 1)
<shevy>
how can you think of ~> as spermy
dmiller_ has quit [Remote host closed the connection]
<shevy>
now if it were ~<>
tootubular has quit [Quit: tootubular]
<workmad3>
shevy: pretty sure that's what the rubygems manual calls it (or did at one point)
<shevy>
or
jdunck has joined #ruby
<shevy>
~~~<>
<shevy>
lol workmad3
dmiller has joined #ruby
<shevy>
now that would actually be hilarious
ner0x has quit [Quit: Leaving]
<shevy>
imagine a japanese hacker trying to translate it into english
sideshowcoder has joined #ruby
helvete has joined #ruby
bubblehead has quit [Remote host closed the connection]
Ontolog has joined #ruby
vlad_starkov has joined #ruby
bubblehead has joined #ruby
pipework has quit [Remote host closed the connection]
Virunga has joined #ruby
khismetix has joined #ruby
zommi has quit [Read error: Connection reset by peer]
slash_nick has quit [Ping timeout: 252 seconds]
Heero` has joined #ruby
Ontolog__ has joined #ruby
asteve is now known as evetsasteve
evetsasteve is now known as evetsAsteve
slash_nick has joined #ruby
helvete has quit [Ping timeout: 264 seconds]
Ontolog_ has quit [Ping timeout: 264 seconds]
icecandy has quit [Remote host closed the connection]
jeebster1 has joined #ruby
joofsh has quit [Remote host closed the connection]
evetsAsteve is now known as asteve
<Hanmac>
shevy this is valid ruby ;P --++--++--++--++--++--++--0
vlad_starkov has quit [Ping timeout: 248 seconds]
<shevy>
grrrrr
<slash_nick>
pretty too
Heero has quit [Ping timeout: 268 seconds]
kil0byte_ has joined #ruby
nhhagen_ has joined #ruby
anderson has quit [Ping timeout: 272 seconds]
Ontolog has quit [Ping timeout: 252 seconds]
jeebster has quit [Ping timeout: 245 seconds]
khismetix has quit [Client Quit]
ozzloy has quit [Quit: Lost terminal]
Xeago has quit [Remote host closed the connection]
nhhagen has quit [Disconnected by services]
pskosinski has joined #ruby
<Hanmac>
shevy on 64bit systems: 0.0.object_id == 0.0.object_id but (-0.0).object_id != (-0.0).object_id
zekefast has joined #ruby
nhhagen_ is now known as nhhagen
johnnyfuchs1 has quit [Remote host closed the connection]
sea6ear has left #ruby ["Killed buffer"]
sea6ear has joined #ruby
akells` has joined #ruby
estan has joined #ruby
khismetix has joined #ruby
khismetix has quit [Client Quit]
mlue has quit [Remote host closed the connection]
<Spooner>
Hanmac, (0.0).object_id != (0.0).object_id for me as well (Ubuntu64, Ruby 1.9.3)
kpshek has quit []
<Spooner>
Oh yeah, in 2.0. Oops...
ffranz1 has joined #ruby
<Spooner>
Because only some floats are immediate values.
RiftyMcF3arless has quit [Quit: Leaving]
kil0byte has quit [Ping timeout: 258 seconds]
bricker_ has joined #ruby
<Hanmac>
its funny that 0.0 has fixed id but -0.0 has not ;P
khismetix has joined #ruby
wolcanus_ has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
<AndChat|>
Yeah
johnnyfuchs has joined #ruby
<AndChat|>
They are, Spooner
sambao21 has quit [Quit: Computer has gone to sleep.]
dustint has quit [Quit: Leaving]
reset has quit [Ping timeout: 252 seconds]
ffranz1 has quit [Client Quit]
<Spooner>
Interesting that -1.0 has fixed value. It is because +0 and -0 are different for floats, but I guess the special case of -0 isn't one of the immediates. Sort of makes sense (so you don't need a gap to fit -0 in).
<Spooner>
*gap in the ids
bricker has quit [Ping timeout: 258 seconds]
DementedInsanity has quit [Ping timeout: 246 seconds]
ozzloy has joined #ruby
ozzloy has quit [Changing host]
ozzloy has joined #ruby
wolcanus_ has quit [Remote host closed the connection]
ffranz has quit [Ping timeout: 245 seconds]
<Spooner>
Float::INFINITY has constant ID though and that is another special case. Strange...
wolcanus has quit [Read error: Connection reset by peer]
pyx has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Ping timeout: 248 seconds]
<kke>
let's imagine we have loads of instance methods and loads of instances, would we save memory if instead of instance methods, those were class methods that take instance as argument? (the assumption being that instances do not hold on to the class methods, and no i do not know anything about mri internals)
Kricir has quit [Remote host closed the connection]
<banisterfiend>
kke: no
<banisterfiend>
kke: not much memory anyway
<banisterfiend>
the instance methods are not copied fromt hthe class to the instances
estan has joined #ruby
madb055 has joined #ruby
dankest has quit [Quit: Leaving...]
<kke>
ok, nice to know. just trying to appreciate the legacy junk i have (has a lot of class methods that take an instance of itself as argument)
<kke>
so it's just because someone didn't know what he was doing
colonolGron has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
wolcanus has joined #ruby
becom33 has joined #ruby
becom33 has quit [Changing host]
becom33 has joined #ruby
jamie_ca_ has quit [Remote host closed the connection]
<Spooner>
kke, Someone who thought they were writing Python ;)
jamie_ca_ has joined #ruby
leonidlm has quit [Ping timeout: 245 seconds]
<Spooner>
kke, Could be any instance being passed in, however. It wouldn't have to be an instance of that class (is the only sensible explanation I can think of).
<kke>
so an instance is actually just a collection of instance variables and some stuff like extended modules?
JMcAfreak has quit [Quit: Leaving]
rocklava has quit [Quit: Leaving]
<kke>
hey i didn't think of that
JMcAfreak has joined #ruby
<kke>
that would actually kind of fit my purposes
pevjan has joined #ruby
joofsh has quit [Remote host closed the connection]
Fenne has quit [Quit: .]
<Spooner>
But in that case, it would make more sense to use a module method, but *shrugs* Legacy code is...always dumb in retrospect.
<apeiros>
mine is purrfect
ffranz has quit [Quit: Leaving]
yshh has joined #ruby
_Drewch has quit [Quit: Computer has gone to sleep.]
alexgandy has quit [Read error: Connection reset by peer]
lkba has joined #ruby
<Spooner>
My legacy code is pretty dumb. My current code is a bit dumb and other people's legacy is diabolical ;)
sailias has joined #ruby
d3c has quit [Quit: Quit]
marr has quit [Ping timeout: 248 seconds]
<kke>
sometimes i'm amazed by my legacy code, having doubts that i must have copypasted it from somewhere
mixel has joined #ruby
<kke>
nowadays i think i've lost some readability as i'm overoptimizing and using too much ? : and || and tap and whatnot
lambsread has joined #ruby
jlast has joined #ruby
yshh has quit [Ping timeout: 260 seconds]
<banisterfiend>
kke: using "?:" is not about optimization
<kke>
and includes and all sorts of trickery
<Quadlex>
<3 ?:
<banisterfiend>
all that does is shrinks your code, but who cares if your code has a small line count
<banisterfiend>
small line count means nothing
<kke>
yeah, that's what i mean by having lost readability
<injekt>
ternatory operators are nice for extremely simple cases
<banisterfiend>
injekt: which js mvc framework (if any) are you using for your rockin' real estate site?
interactionjaxsn has quit [Remote host closed the connection]
<kke>
nested ternaryrs for complex cases are not nice? :(
phantasm66 has quit [Quit: *sleeeep….]
<banisterfiend>
kke: hehe
<injekt>
banisterfiend: we aren't using one, all our js is custom, we just tab into other libs, mostly jquery extensions I believe
<injekt>
banisterfiend: we use jquery-mobile
interactionjaxsn has joined #ruby
jamesfung14 has joined #ruby
jimg has joined #ruby
<banisterfiend>
injekt: ah ok
<injekt>
banisterfiend: our app has about 24k lines of js
<injekt>
to about ~15k of Ruby
wolcanus has quit [Ping timeout: 252 seconds]
<banisterfiend>
injekt: and it doesn't feel like a clusterfuck?
<injekt>
banisterfiend: I don't touch the JS myself the other dev does. But it's pretty organized
<injekt>
he's a sucker for organized code
<injekt>
banisterfiend: it's distributed over a LOT of files
[eDu] has joined #ruby
<kke>
congrats, my colleague is a sucker for copy & paste
interactionjaxsn has quit [Read error: No route to host]
<injekt>
hundreds of js files, and precompiled in production
interactionjaxsn has joined #ruby
<injekt>
kke: only 2 developers on a high scale startup like ours, we aint got no time for copy pasta :D
wolcanus has joined #ruby
gaahrdner has quit [Remote host closed the connection]
banister_ has joined #ruby
<banister_>
injekt: ah ok
<injekt>
there's also 700 ruby files in this app
<injekt>
not including the ~400 migration files
itman_ is now known as itman
<injekt>
the controllers are the only clusterfuck really
_nitti has joined #ruby
<tylersmith>
idk why controllers seem to always be the worst
jonathanwallace has quit [Ping timeout: 246 seconds]
<injekt>
tylersmith: because they suck to dry up :(
<kke>
chubby controllers, obese models. that's where we're at.
<injekt>
our models are pretty small, we have like ~50 of them
estan has quit [Read error: Connection reset by peer]
<injekt>
and we have 143 gem dependencies
banisterfiend has quit [Ping timeout: 268 seconds]
<injekt>
some of those are custom in house libraries
asteve has quit [Quit: Computer has gone to sleep.]
carlyle has quit [Remote host closed the connection]
failshell has quit [Remote host closed the connection]
ozzloy has quit [Ping timeout: 245 seconds]
MetaCosm has joined #ruby
wmoxam has quit [Ping timeout: 255 seconds]
<banister_>
injekt: you should get into the js MV* buzz, it's just as rich, if not richer than rails stuff
dmiller has joined #ruby
MetaCosm has quit [Remote host closed the connection]
<banister_>
in my very limited experience*
carloslopes has quit [Remote host closed the connection]
stenno has joined #ruby
<injekt>
banister_: meh, it's hard to migrate from jquery-mobile, and I'd have to convince my JS guy
<injekt>
we took a chance at going down this route, I've still no idea if it paid off or not
<banister_>
probably means you'll have a harder time getting new front end programmers grokking the codebase
<banister_>
if you scale up
newUser1234 has quit [Remote host closed the connection]
* stenno
is confused by the ruby apt packages
<injekt>
with plain old js? na, sticking to a specific mvc js library would also compress the niche
rton has left #ruby [#ruby]
<injekt>
stenno: dont install ruby via apt
<tylersmith>
i would hope most developers wouldn't need it to be in a framework to understand
<banister_>
but with each mvc library there is a pseicifc way of doing things that they can read up on
<tylersmith>
not that hope ever got anybody anywhere
<stenno>
i installed ruby-1.9.1, now i have an executable ruby1.9.1... but -v gives ruby1.9.3p0
<banister_>
whereas with a custom codebase they'd have to just persistently question the one guy who designed it
<stenno>
yeah figures :|
<banister_>
specific*
dangerousdave has joined #ruby
dangerousdave has quit [Remote host closed the connection]
<injekt>
banister_: sure, but we really only use jquery and basic js, everything we use is documented very well, I dont think the curve would be harder than when using a js lib, unless of course the new developer was awesome with said lib
forrest has quit [Quit: Leaving]
<banister_>
fair enough
<injekt>
stenno: yeah apt installs ruby 1.9.x into 1.9.1 paths
<banister_>
so u didnt recrate your own mv* thing?
<injekt>
stenno: again, dont use apt to install ruby
<stenno>
injekt: too late ;_;
<injekt>
banister_: no no not at all, it's all basic js
bradhe has quit [Remote host closed the connection]
<injekt>
banister_: which may come back to bite us, I'm really not sure
<stenno>
but i know for next time i guess :)
pithagorians has quit [Ping timeout: 255 seconds]
<injekt>
banister_: I'm certainly not sold on either way, we may end up going down the mvc route. Feels weird to me, though
gkhan has joined #ruby
bradhe has joined #ruby
Trenal has quit []
<banister_>
injekt: it is really weird actually, i think it's a transitional phase, cos you have two huge MVC apps on both the client and server
<banister_>
feels wrong
<injekt>
banister_: yeah that's my view on it too
<banister_>
maybe something like meteor is the way to go, but i know little about that
rouss has quit [Quit: Computer has gone to sleep.]
<injekt>
banister_: I like the idea of meteor, but it's way too infant to adopt imp
<injekt>
imo*
akells` has joined #ruby
helvete has joined #ruby
thone_ has joined #ruby
jenrzzz has joined #ruby
<injekt>
banister_: all of our api is built in Go though, so are a few of our inside libraries, so some of the website is moving that way, too
<banister_>
injekt: how does your go talk to your ruby?
<injekt>
but there's only one ruby dev (me) and one go dev (me) so it's a bit of a pain
malte_ has joined #ruby
<injekt>
banister_: it doesn't yet, the api is entirely a go app and separate from Ruby, and we have 2 internal libraries built in go that are web processes so Ruby doesn't need to talk to them
zeade has quit [Quit: Leaving.]
interactionjaxsn has quit [Remote host closed the connection]
Lubinski has quit [Quit: Leaving]
<injekt>
I think more stuff will move to go
<banister_>
why did you choose go?
wolcanus has quit [Ping timeout: 256 seconds]
Kricir has joined #ruby
<Hanmac>
because ruby has not goto ;P
sambao21 has joined #ruby
<injekt>
we have a csv importer and the import files usually about around 15k rows so go is super fast and nice on memory
athst has quit [Quit: athst]
estan has joined #ruby
thone has quit [Ping timeout: 258 seconds]
<banister_>
cool
<injekt>
banister_: because writing it in C would take too long, writing it in Java is too tedious and I like Go, it was previously written in scala
martxel has quit [Quit: leaving]
<banister_>
yeah
<banister_>
makes sense
martxel has joined #ruby
martxel has quit [Changing host]
martxel has joined #ruby
<injekt>
scala is nice but the syntax annoyed me too much, I already knew go so it sort of made sense
tealmage has joined #ruby
akells` has quit [Ping timeout: 255 seconds]
stenno has left #ruby [#ruby]
zeade has joined #ruby
<banister_>
injekt: do you have any go code on github?
<injekt>
wrote it in ruby first, then wrote it in go with about 400% more code and 200% faster
breakingthings has quit [Quit: breakingthings]
sambao21 has quit [Client Quit]
<graft>
anyone good with Readline? I'm trying to make a thing to complete filenames, but i wanted to have it append a / for a directory and a " " for a file after it completes...
<banister_>
graft: look into Bond
iPhoneMRZ has joined #ruby
<banister_>
injekt: go does look pretty nice
<graft>
but i'm 90% happy with readline... dangit
ToApolytoXaos has quit [Quit: Leaving]
<banister_>
graft: bond is just a completion plugin for Readline
<injekt>
banister_: it's ok, there's things I dont like but there's no language that doesn't happen with
headius has joined #ruby
robscomputer has quit [Ping timeout: 252 seconds]
occupant has quit [Read error: No route to host]
<banister_>
graft: we use it in recent pry versions
<graft>
oic
occupant has joined #ruby
jnoob22 has joined #ruby
<banister_>
injekt: cool, are you following this whole FRP buzz?
tealmage has quit [Ping timeout: 264 seconds]
<injekt>
banister_: no what's that?
Absdia has joined #ruby
<banister_>
everyone seems to be creaming themselves over it, i've been looking at bit into bacon.js, and i see there's another lib for objective-c that's getting press
<banister_>
injekt: functional reactive programming (that's about the extent of my knowledge, the name :)
malkomalko has quit [Remote host closed the connection]
<banister_>
injekt: could just be fluff that'll die down of course, or it could be the start of something..
<injekt>
banister_: ah yeah heard of it but I try and avoid stuff like that until I see it take hold a little more or I can see a benefit to myself quickly
Nisstyre-laptop has joined #ruby
rudisimo has quit [Quit: Leaving.]
<injekt>
haven't had much time for buzz lately, too much writing code
splittingred has quit [Quit: splittingred]
slippyd has quit [Quit: slippyd]
<injekt>
hoping things slow down soon, less time for open source
<injekt>
I've only managed to maintain mechanize much lately
<injekt>
and fix slop issues (very few)
<Absdia>
Hi, I was wondering if someone could tell me where I went wrong with my gems install or discover whats missing. Exception `LoadError' at /usr/lib/ruby/site_ruby/1.8/rubygems.rb for example. How do I track that?
_nitti has quit [Remote host closed the connection]
newTech has quit [Quit: newTech]
<injekt>
Absdia: paste the entire exception backtrace to a pastie
sailias has quit [Quit: Leaving.]
<Hanmac>
banister_: i use chain "Name" do; def meth;super; doxyz;end;end ... that uses anonymous modules with prepend, do you want to see my .ancestors list?
kirun has quit [Quit: Client exiting]
<banister_>
Hanmac: watch james baxter, now.
gkhan has quit [Remote host closed the connection]
<Hanmac>
banister_: i will to it tomorrow, currently my internet is slow
[eDu] has quit [Quit: [eDu]]
<banister_>
Hanmac: you can't even stream a simple cartoon? :) just leave it to buffer for a few hours..
jamesfung14 has quit [Ping timeout: 248 seconds]
senayar has joined #ruby
jhn has quit [Ping timeout: 255 seconds]
<Hanmac>
banister_: i am online over my handy ...
<banister_>
hwat..?
<banister_>
phone you mean?
<injekt>
Absdia: did you install daemons?
alexwh has quit [Ping timeout: 252 seconds]
EPIK has joined #ruby
mikestok has joined #ruby
robbyoconnor has quit [Ping timeout: 264 seconds]
<Hanmac>
banister_: yeah my mobilephone
<Absdia>
Nope, guessing I'm missing that. =) Where do I get that? or is it available as a yum package? sorry this is the first time i've come near ruby
jdunck has quit [Quit: Computer has gone to sleep.]
pevjan has quit [Read error: Connection reset by peer]
pevjan_ has joined #ruby
<jokke>
hey, i think i asked this before but didn't find a solution to my problem: i use a ruby-based wm called subtle. It has so called sublets as in plugins. One of these is battery. I'm currently extending it to read in a file of "BatteryRules" that are triggered if they should_trigger?, alright? Now. This file where the rules are defined should look like a config, so i made the constructor yield the object itself
<jokke>
so i can do BatteryRule.new(:critical) do |critical| and then set instance variables on critical and what not. The problem is, this file doesn't require the class, and i don't want it to. So if i require the file in the sublet (plugin) i get an error because BatteryRule is not known.
<jokke>
oh god, that was long..
ariedler has quit [Remote host closed the connection]
<jokke>
anyhow... i need to load the file and evaluate it only after it's been loaded... because the BatteryRule class definition is at the top of my sublet file
estan has joined #ruby
Spami_ has quit [Quit: Leaving]
<jokke>
Or in other words, just pasting the code from the rules file underneath the class definition works fine. i need that kind of behavior for require.
bradhe_ has joined #ruby
slippyd has joined #ruby
styler has joined #ruby
malte_ has joined #ruby
dmiller has quit [Remote host closed the connection]
niceguyjames has joined #ruby
<jokke>
I already thought of evaluating each line of the file with eval()
queequeg2 has quit [Ping timeout: 264 seconds]
<jokke>
but that sounds pretty ugly
dmiller has joined #ruby
ozzloy has joined #ruby
bafilius has quit [Quit: Leaving]
bradhe has quit [Ping timeout: 268 seconds]
pevjan_ has quit [Ping timeout: 256 seconds]
<jokke>
which i would first join with ;
inn has joined #ruby
<jokke>
jeez
inn has left #ruby [#ruby]
Absdia has left #ruby [#ruby]
<injekt>
jokke: this sounds very specific to subtle itself, did you try asking in their channel?
mljsimon_ has quit [Read error: Connection reset by peer]
<jokke>
yeah but it's a quiet channel :)
dmiller_ has joined #ruby
<Quadlex>
Hmm
LaPetiteFromage has quit [Quit: LaPetiteFromage]
<Quadlex>
I want to do some magic around an RSpec test
mljsimone has joined #ruby
<injekt>
jokke: the problem is, in terms of plain ruby, I dont understand your question, and I dont touch subtle
<jokke>
:)
<Quadlex>
What's better, custom Runner or Rake shenanigans?
pcarrier has joined #ruby
pkrnj has quit [Quit: Computer has gone to sleep.]
mr0wl has joined #ruby
<apeiros>
custom runner which you can `load 'yourrunner'` in rake
generali_ has quit [Remote host closed the connection]
<musl>
I'd also dig a wm like xmonad or i3 with a decent ruby interface. I'd suspect it'd still be best to write the majority of it in C though.
Azulinho has quit [Client Quit]
vertroa has joined #ruby
estan has joined #ruby
Z_Mass has joined #ruby
lele has quit [Quit: Coyote finally caught me]
vertroa has quit [Client Quit]
Nuck has quit [Quit: Nuck Off]
vertroa has joined #ruby
swex has joined #ruby
dankest has joined #ruby
vertroa has quit [Client Quit]
<andrew12>
I used xmonad for a while but i3 looked a bit simpler
Proshot has quit [Quit: Leaving]
vertroa has joined #ruby
<andrew12>
and I was having some issues where my computer would freeze up (I don't think it was the wm, I think it's my video drivers), and when I rebooted it, xmobar would be covered up by any windows I open
<andrew12>
plus haskell has pretty arcane syntax
centr0 has joined #ruby
josedonizetti has quit [Quit: josedonizetti]
centr0 has quit [Remote host closed the connection]
robscomputer has quit [Remote host closed the connection]
centr0 has joined #ruby
Umren has quit [Ping timeout: 245 seconds]
swex_ has quit [Ping timeout: 255 seconds]
nhhagen has quit [Remote host closed the connection]
nhhagen has joined #ruby
zigomir has quit [Read error: Operation timed out]
rakl has joined #ruby
jbueza has joined #ruby
Kricir has joined #ruby
mfridh has quit [Read error: Operation timed out]
twoism has quit [Read error: Connection reset by peer]
twoism has joined #ruby
kil0byte has joined #ruby
vertroa has quit [Quit: WeeChat 0.3.9.2]
vertroa has joined #ruby
vertroa has quit [Client Quit]
ipalaus has quit [Quit: Computer has gone to sleep.]
d2dchat has quit [Remote host closed the connection]
vertroa has joined #ruby
vertroa has quit [Client Quit]
lele has joined #ruby
centr0 has left #ruby [#ruby]
<jokke>
andrew12: i can highly recommend subtle
<andrew12>
that doesn't answer my question :P
<jokke>
its super flexible and easy to configure, yet powerful to expand
centr0 has joined #ruby
<jokke>
its a grid based wm
newUser1234 has joined #ruby
<andrew12>
so "tiling"
<andrew12>
:p
<jokke>
not really because windows can overlap
<andrew12>
hmm
<jokke>
and you can _not_ use space on the screen if you wish to do so
<jokke>
i used i3 too for a long time and didn't dislike it. Still i prefer subtle, mostly because of sublets and parts of it being written in ruby.
<jokke>
andrew12: it can be a bit confusing coming from i3 at first that windows by default open filling the whole screen. You have to tell them where to go by config or with hotkeys.
bricker_ is now known as bricker
estan has quit [Read error: Operation timed out]
<andrew12>
i3 does that by default too
<musl>
jokke: How is subtle with multiple monitors?
<jokke>
musl: i heard it's awesome, but i only have one :(
<andrew12>
I liked how in xmonad I could just mod+number on any of my monitors and that workspace would be on that monitor, where in i3 it will move the mouse to the monitor that has that workspace
wsterling has quit [Remote host closed the connection]
<jokke>
andrew12: yes but if you then open up another window it tiles the screen to fit them both in. subtle would just open the next one ontop of the other
<andrew12>
ah
vertroa has joined #ruby
reset has quit [Quit: Leaving...]
<andrew12>
I think I'll stick with i3 for now, mostly because i'm a minimalist
pevjan has joined #ruby
miroatme_ has quit [Ping timeout: 256 seconds]
blueOxigen has quit [Ping timeout: 256 seconds]
csaunders has quit [Quit: Computer has gone to sleep.]
vertroa has quit [Client Quit]
<jokke>
subtle is just as minimalistic. Only cooler ;)