jlogsdon has quit [Read error: Operation timed out]
bluenemo has quit [Quit: Verlassend]
<sphera>
How can i create an array based the value of another variable, i.e. i want to do this: str = 'test'; arr_#{str} = [];
crazedpsyc is now known as confusion
carlyle has joined #ruby
<Hanmac>
sphera its possible in ruby but its bad code
ablankfield has joined #ruby
manizzle has quit [Ping timeout: 260 seconds]
carlyle has quit [Remote host closed the connection]
<sphera>
Sort of. I need to dynamically create these array values based on values given by an API. Since I don't want to change them manually on API updates, I'd rather do it this way
Cultofmetatron has joined #ruby
<ablankfield>
I have an off topic question I was hoping someone could help me with. it involves port forwarding and UPnP
_alejandro has quit [Remote host closed the connection]
sertaconay has joined #ruby
<sphera>
I'm getting into one of those deep datastructure manipulation mindsets, where you overthink everything. I'm already using a hash to store these arrays, I should just key the hash directly like you said. Derp.
<sphera>
Thanks, Hanmac.
horofox has joined #ruby
lledet has joined #ruby
erichmenge has quit [Quit: Be back later]
emmanuelux has quit [Remote host closed the connection]
jrajav has quit []
L0L0L0L0L has joined #ruby
havenn_ has quit [Remote host closed the connection]
cakehero has quit [Quit: Computer has gone to sleep.]
Juul has quit [Ping timeout: 260 seconds]
dpk is now known as manifestation_of
L0L0L0L0L has quit [Ping timeout: 248 seconds]
manifestation_of is now known as AmericanPsyche
enderx86 has joined #ruby
<gabrielrotbart>
dorei: from where in your structure are you calling File.dirname? Easiest way is to make sure your top level is in the path to call 'lib/mylib.rb'
lenodroid has quit [Remote host closed the connection]
lenodroid has joined #ruby
hsbt_away is now known as hsbt
L0L0L0L0L has joined #ruby
jash has quit [Ping timeout: 245 seconds]
mercwithamouth has joined #ruby
_di has joined #ruby
<dorei>
gabrielrotbart: is there a way to find the full path of the file i'm executing?
_di has left #ruby [#ruby]
maxer has quit [Quit: maxer]
_di has joined #ruby
_di has quit [Remote host closed the connection]
Axsuul has joined #ruby
kbeddingfield has joined #ruby
Axsuul has quit [Excess Flood]
banjara has quit [Quit: Leaving.]
ephemerian has quit [Quit: Leaving.]
L0L0L0L0L has quit [Ping timeout: 240 seconds]
jlwestsr has quit [Ping timeout: 246 seconds]
elico has joined #ruby
<gabrielrotbart>
dorei: Do you mean what path currently loaded? puts $LOAD_PATH. For file path Dir.pwd
Russell^^ has quit [Quit: Russell^^]
sdk has quit [Ping timeout: 252 seconds]
fantazo has quit [Read error: Operation timed out]
L0L0L0L0L has joined #ruby
AmericanPsyche is now known as dpk
vickaita has joined #ruby
blazes816 has quit [Quit: blazes816]
davidcelis has quit [Quit: K-Lined.]
jcaudle_ has joined #ruby
aantix__ has joined #ruby
<dorei>
gabrielrotbart: i mean, when i do ruby myfile.rb, is there a way from within myfile.rb to find the full path of myfile.rb ?
kbeddingfield has quit [Ping timeout: 260 seconds]
yoklov has joined #ruby
sdk has joined #ruby
jcaudle has quit [Ping timeout: 248 seconds]
jcaudle_ is now known as jcaudle
aantix has quit [Ping timeout: 240 seconds]
aantix__ is now known as aantix
jblack has joined #ruby
havenn has joined #ruby
h4mz1d has joined #ruby
jlwestsr has joined #ruby
aantix has quit [Quit: aantix]
rburton- has joined #ruby
enderx86 has quit [Remote host closed the connection]
whomp has joined #ruby
<dorei>
i could use __FILE__ and Dir.pwd but then i should check if __FILE__ contains '/' and remove them from __FILE__ and append them to Dir.pwd
<whomp>
i was working on a rails project when, all of a sudden, ruby commands stopped working. now they take a long time and then print: /Users/user/.rvm/bin/ruby: line 6: /Users/ruby/.rvm/bin/ruby: Argument list too long
FemaleEngineer has quit [Ping timeout: 260 seconds]
mrsolo has quit [Quit: Leaving]
snearch has quit [Quit: Verlassend]
<whomp>
does anyone know what might be the issue?
<dorei>
whomp: what's at line 6 ?
slainer68 has quit [Remote host closed the connection]
Chryson has joined #ruby
<havenn>
Calling script recursively?
<whomp>
`exec ruby "$@"`
<whomp>
i think so
<dorei>
argument list too long looks like a shell error message
<dorei>
meaning that you feed it more arguments than it could handle, for example when you do rm * in a directory with a lot of files
<whomp>
no that's not the issue, i can't even run ir
<whomp>
*irb
ngoldman has quit [Remote host closed the connection]
tbrock_ has joined #ruby
mercwithamouth has quit [Ping timeout: 240 seconds]
mercwithamouth has joined #ruby
vickaita has quit [Ping timeout: 240 seconds]
mneorr has quit [Remote host closed the connection]
mensvaga has joined #ruby
joeycarmello has joined #ruby
monokrome1 has joined #ruby
<mensvaga>
What's the best way of testing a private method?
<mensvaga>
@object.send(:method_name) ?
undersc0re97 has quit [Ping timeout: 245 seconds]
nari has joined #ruby
monokrome has quit [Read error: Connection reset by peer]
freakazoid0223 has joined #ruby
hotovson_ has quit [Remote host closed the connection]
u89_ has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Leaving...]
<tbrock_>
hey guys is there a way to make a gem spec that can optionally compile/install a c-extension
daniel_- has quit [Quit: WeeChat 0.3.9]
havenn has quit [Remote host closed the connection]
<tbrock_>
so that it isn't strictly required per-se but could be disabled via an env variable or something
mneorr has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
Cultofmetatron has joined #ruby
horofox has quit [Quit: horofox]
c0rn has quit [Quit: Lates.]
wpaulson has joined #ruby
c0rn has joined #ruby
<Kovensky>
I dunno what's the procedure in rubygems
Cultofmetatron has quit [Remote host closed the connection]
<Kovensky>
but in CPAN, it's recommended that you publish a pure-perl impl
savage- has joined #ruby
<Kovensky>
and then have a XS (that is, C-code) version inside the namespace, that always is compiled
wpaulson has quit [Client Quit]
<Kovensky>
and have the pure-perl impl use the XS code if it's available, but not require its installation
ttt has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
<tbrock_>
some platforms may not have the toolchain to compile the c extension
iamjarvo has joined #ruby
Grieg has quit [Ping timeout: 268 seconds]
nari has quit [Ping timeout: 260 seconds]
Grieg has joined #ruby
Grieg has quit [Changing host]
Grieg has joined #ruby
mneorr_ has joined #ruby
mneorr_ has quit [Read error: Connection reset by peer]
mneorr_ has joined #ruby
mmitchell has joined #ruby
mneorr has quit [Ping timeout: 252 seconds]
dmiller has joined #ruby
slainer68 has joined #ruby
brianpWins has quit [Quit: brianpWins]
Cultofmetatron has joined #ruby
undersc0re97 has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
yoklov has quit [Quit: computer sleeping]
mneorr_ has quit [Ping timeout: 240 seconds]
Cultofmetatron has quit [Remote host closed the connection]
<dorei>
tbrock_: i've noticed that some gems fetch and install a precompiled extension
<tbrock_>
thats not really what I'm looking for
<tbrock_>
i know you can do that with extension_task
Serial_Killer_C has joined #ruby
<tbrock_>
but, I'm thinking at install time compile the extension but if they can't or enable some env var then don't
cousine has quit [Remote host closed the connection]
elico has quit [Remote host closed the connection]
kbeddingfield has joined #ruby
slainer68 has quit [Ping timeout: 240 seconds]
elico has joined #ruby
elico has quit [Client Quit]
pu22l3r has joined #ruby
hbpoison has quit [Ping timeout: 276 seconds]
kbeddingfield has quit [Ping timeout: 240 seconds]
LouisGB has quit [Ping timeout: 252 seconds]
adeponte has quit [Remote host closed the connection]
loka has quit [Ping timeout: 245 seconds]
beachandbytes has quit [Ping timeout: 246 seconds]
enderx86 has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
chendo has quit [Read error: Operation timed out]
hbpoison has joined #ruby
thinkit2 has quit [Ping timeout: 240 seconds]
gabrielrotbart has joined #ruby
thinkit2 has joined #ruby
chendo_ has joined #ruby
chendo_ has quit [Changing host]
chendo_ has joined #ruby
swex has quit [Ping timeout: 246 seconds]
mneorr has joined #ruby
pu22l3r_ has joined #ruby
idzuna has quit [Remote host closed the connection]
lenodroid has quit [Ping timeout: 260 seconds]
yshh has quit [Remote host closed the connection]
Progster has joined #ruby
cyong has joined #ruby
gpalmier has joined #ruby
havenn has joined #ruby
pu22l3r has quit [Ping timeout: 248 seconds]
jhgaylor has quit [Read error: Connection reset by peer]
jhgaylor has joined #ruby
LouisGB has joined #ruby
hbpoison has quit [Ping timeout: 255 seconds]
brianpWins has joined #ruby
niklasb has quit [Read error: Operation timed out]
ckrailo has quit [Quit: Computer has gone to sleep.]
Tearan has joined #ruby
h4mz1d has quit [Ping timeout: 240 seconds]
tjbiddle has quit [Ping timeout: 246 seconds]
t0rc has joined #ruby
chrxn has quit [Ping timeout: 260 seconds]
yshh has joined #ruby
<t0rc>
What's a good way to use git from Ruby?
dmiller has quit [Remote host closed the connection]
mmitchell has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 255 seconds]
n_blownapart has joined #ruby
enderx86 has quit [Remote host closed the connection]
charliesome has joined #ruby
<n_blownapart>
http://pastie.org/5338344 hi I'm not sure how an alias works as in this example. this prog doesn't seem to work in 1.9.3, but the point is to teach aliases I guess. Is there an easy way to explain how the newly defined []=(key,value) method works? thanks.
vickaita has joined #ruby
nari has joined #ruby
mengu has quit [Ping timeout: 246 seconds]
beachandbytes has joined #ruby
<maetthew>
n_blownapart, where is this example from?
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
pu22l3r_ has quit [Remote host closed the connection]
<n_blownapart>
maetthew: its from 'A Well-Grounded Rubyist' . the author calls it a "pass-through alteration of []=."
<n_blownapart>
The* Well-Grounded...
BoomCow has quit [Quit: This computer has gone to sleep]
vickaita has quit [Ping timeout: 246 seconds]
dorei has quit []
Whackatre_ has quit [Ping timeout: 260 seconds]
haxrbyte has joined #ruby
<n_blownapart>
maetthew: what do you make of it?
Michael_ has joined #ruby
<maetthew>
n_blownapart, oh sorry nothing i know basically no ruby
<maetthew>
i was just interested in resources :)
haxrbyte has quit [Remote host closed the connection]
Axsuul has joined #ruby
Axsuul has quit [Excess Flood]
<n_blownapart>
maetthew: cool so far I really like this book. david black , author
haxrbyte has joined #ruby
<maetthew>
yeah i'm looking at the preview on amazon atm
jenrzzz has quit [Ping timeout: 252 seconds]
<n_blownapart>
maetthew: worth a look good luck
Michael_ has quit [Remote host closed the connection]
sepp2k1 has quit [Read error: Connection reset by peer]
Hanmac has joined #ruby
Michael_ has joined #ruby
lucianosousa has joined #ruby
Ruler_Of_Heaven_ has joined #ruby
pipopopo has quit [Ping timeout: 240 seconds]
hsbt is now known as hsbt_away
arubin_ has joined #ruby
<n_blownapart>
http://pastie.org/5338344 hi I'm not sure how an alias works as in this example. this prog doesn't seem to work in 1.9.3, but the point is to teach aliases I guess. Is there an easy way to explain how the newly defined []=(key,value) method works? thanks.
adeponte has joined #ruby
nari has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
postmodern has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
blazes816 has joined #ruby
slainer68 has joined #ruby
jenrzzz has joined #ruby
sdk is now known as nkts
enderx86 has joined #ruby
Michael_ has quit [Remote host closed the connection]
crackfu has joined #ruby
kbeddingfield has joined #ruby
atmosx has quit [Remote host closed the connection]
atmosx has joined #ruby
slainer68 has quit [Ping timeout: 256 seconds]
Z0idberg has quit [Quit: Leaving]
_bart has quit [Quit: _bart]
jenrzzz has quit [Ping timeout: 276 seconds]
areil has joined #ruby
kbeddingfield has quit [Ping timeout: 252 seconds]
xsbeats has quit [Ping timeout: 268 seconds]
Michael_ has joined #ruby
mneorr has quit [Remote host closed the connection]
sn0wb1rd has joined #ruby
Michael_ has quit [Remote host closed the connection]
jcaudle has quit [Quit: jcaudle]
cyong1 has joined #ruby
cyong1 has quit [Client Quit]
n_blownapart has quit [Remote host closed the connection]
cyong1 has joined #ruby
cyong has quit [Ping timeout: 245 seconds]
jcaudle has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
cyong1 has quit [Client Quit]
Michael_ has joined #ruby
cyong has joined #ruby
Whackatre has joined #ruby
Whackatre has quit [Changing host]
Whackatre has joined #ruby
mneorr has joined #ruby
hbpoison has joined #ruby
amacgregor_osx has quit [Read error: Operation timed out]
rellin has joined #ruby
Michael_ has quit [Remote host closed the connection]
cyong has quit [Quit: Leaving.]
headius has quit [Quit: headius]
Michael_ has joined #ruby
banjara has joined #ruby
aetcore has quit [Ping timeout: 246 seconds]
amacgregor_osx has joined #ruby
cyong has joined #ruby
seanyo has joined #ruby
aetcore has joined #ruby
tjbiddle has joined #ruby
Michael_ has quit [Remote host closed the connection]
tjbiddle has quit [Client Quit]
jrist-afk is now known as jrist
Michael_ has joined #ruby
artnez has joined #ruby
adeponte has quit [Remote host closed the connection]
joofsh has joined #ruby
adeponte has joined #ruby
Progster has quit [Ping timeout: 265 seconds]
jrajav has quit []
hbpoison has quit [Ping timeout: 252 seconds]
<thinkit2>
Are there any freelancers in here possibly seeking a job? I have a fun project you might be interested in: https://dl.dropbox.com/u/45988033/son.png I do pay in cash and not Trident layers. Project budget is $4,000 the front-end is already completed - HTML/CSS - I have a full spec written as well. Please PM me or email me at ryan@coupify.com
<thinkit2>
Thanks!
havenn has quit [Ping timeout: 252 seconds]
<centipedefarmer>
suggestions: 1) move the "Are They" over to the right, it looks like you're asking if they're facebook or twitter
<centipedefarmer>
2) add an "other" box under Guys and Girs
<thinkit2>
thanks centi.
<thinkit2>
will definitely look into those changes.
<centipedefarmer>
lol
adeponte has quit [Ping timeout: 245 seconds]
sn0wb1rd_ has joined #ruby
reset has quit [Quit: Leaving...]
reset has joined #ruby
BoomCow has joined #ruby
sn0wb1rd__ has joined #ruby
siyusong has joined #ruby
pu22l3r has joined #ruby
sn0wb1rd has quit [Ping timeout: 252 seconds]
sn0wb1rd__ is now known as sn0wb1rd
<t0rc>
grit, rugged, or ruby-git?
sn0wb1rd_ has quit [Ping timeout: 252 seconds]
stephenjudkins has joined #ruby
dmiller has joined #ruby
rjsamson has quit [Remote host closed the connection]
JohnTeddy has quit [Changing host]
JohnTeddy has joined #ruby
Michael_ has quit [Remote host closed the connection]
<JohnTeddy>
How can I get pry to reload a file I'm working on?
caleb_io has joined #ruby
<JohnTeddy>
So I want to load all my methods then test them in pry, reload after changes.
pu22l3r has quit [Remote host closed the connection]
amacgregor_osx has quit [Read error: Operation timed out]
tjbiddle has joined #ruby
kbeddingfield has joined #ruby
vitor-br has joined #ruby
linoj has joined #ruby
scx has quit [Ping timeout: 260 seconds]
arubin__ has joined #ruby
mengu has quit [Read error: Connection reset by peer]
radic has quit [Disconnected by services]
radic_ has joined #ruby
caleb_io has quit [Quit: caleb_io]
arubin__ is now known as arubin-
arubin_ has quit [Ping timeout: 240 seconds]
hbpoison has joined #ruby
scx has joined #ruby
luminous has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
amacgregor_osx has joined #ruby
<luminous>
I'm not sure if this is the best place for the question.. I'm trying to get up and running with octopress, using rvm and bundle to create a ruby environment for octopress and my work, but I was only able to do this as root due to premissions set when I installed gems and rvm, etc. here's the question - if it is a permissions thing, what bits need to be flipped where so that normal users could follow these instructions and then use octopress: http://octopress.o
tomsthumb has joined #ruby
kbeddingfield has quit [Remote host closed the connection]
kbeddingfield has joined #ruby
<blazes816>
luminous: did you install rvm as root? that'd be the issue
<blazes816>
idk how do fix that other reinstalling rvm
crackfu has quit [Remote host closed the connection]
adeponte has joined #ruby
<luminous>
blazes816: don
<luminous>
blazes816: don't I need to install as root?
<blazes816>
no, just "curl -L https://get.rvm.io | bash -s stable --ruby" as your normal user
sertaconay has quit [Read error: Connection reset by peer]
nari has joined #ruby
yshh has quit [Ping timeout: 246 seconds]
LouisGB has quit [Ping timeout: 246 seconds]
t0rc has quit [Quit: WeeChat 0.3.9]
zzyybb has joined #ruby
ananthakumaran has joined #ruby
Cultofmetatron has joined #ruby
tommyvyo has quit [Ping timeout: 246 seconds]
tjbiddle has quit [Quit: tjbiddle]
linoj has quit [Quit: linoj]
mneorr has quit [Remote host closed the connection]
reset has quit [Read error: Operation timed out]
Serial_Killer_C has quit [Remote host closed the connection]
<Axsuul>
Can someone recommend me a library that can parse timespan phrases in english? i.e. 6 hours ago, 10 weeks ago
bradhe has quit [Remote host closed the connection]
<Mon_Ouie>
Axsuul: Chronic
nari has quit [Ping timeout: 246 seconds]
<Axsuul>
Mon_Ouie: neat, thanks
fantazo has quit [Remote host closed the connection]
brianpWins has joined #ruby
hsbt_away is now known as hsbt
cezar-b has joined #ruby
AlbireoX has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
bairui has quit [Quit: WeeChat 0.3.7]
<JohnTeddy>
How can I have pry reload a file with method in it that I'm editing/resaving?
KnowTheLedge has quit [Ping timeout: 245 seconds]
rippa has quit [Ping timeout: 255 seconds]
<rking>
JohnTeddy: Are you editing it through Pry's edit or edit-method commands?
AlbireoX has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
thecreators has joined #ruby
chendo has quit [Read error: Operation timed out]
Mon_Ouie has quit [Ping timeout: 240 seconds]
chendo has joined #ruby
brianpWins_ has joined #ruby
brianpWins has quit [Ping timeout: 252 seconds]
brianpWins_ is now known as brianpWins
kil0byte_ has joined #ruby
zommi has joined #ruby
chendo has quit [Ping timeout: 252 seconds]
arturaz has joined #ruby
artOfWar has joined #ruby
kil0byt__ has joined #ruby
kil0byte has quit [Ping timeout: 252 seconds]
`psudo has joined #ruby
chendo has joined #ruby
hamed_r has joined #ruby
SuperrMann has joined #ruby
artOfWar has quit [Remote host closed the connection]
artOfWar has joined #ruby
Nanuq has quit [Ping timeout: 246 seconds]
<rking>
If you are, it will automatically reload that file when it's done.
<rking>
If you aren't, you can use Ruby's load 'lib/whatever.rb' to get it
<rking>
Which, very often, that file is available as _file_
kil0byte_ has quit [Ping timeout: 268 seconds]
<rking>
E.g. if you put binding.pry in lib/foo.rb, when the Pry instance starts up it will set a local variable named _file_ to 'lib/foo.rb', so you can just:
<rking>
load _file_
hbpoison has quit [Ping timeout: 255 seconds]
Cultofmetatron has quit [Remote host closed the connection]
workmad3 has joined #ruby
KnowTheLedge has joined #ruby
araujo has quit [Quit: Leaving]
topek has quit [Quit: Leaving.]
aganov has joined #ruby
topek has joined #ruby
bradhe has joined #ruby
bradhe_ has joined #ruby
bradhe has quit [Read error: Connection reset by peer]
sagax has joined #ruby
maesbn has joined #ruby
kbeddingfield has joined #ruby
beachandbytes has quit [Ping timeout: 246 seconds]
k610 has joined #ruby
hbpoison has joined #ruby
sagax has quit [Client Quit]
timonv has joined #ruby
timonv_ has joined #ruby
thecreators has quit [Quit: thecreators]
thecreators has joined #ruby
k610 has quit [Ping timeout: 256 seconds]
k610 has joined #ruby
bradhe_ has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
jenrzzz has joined #ruby
xpen has quit [Remote host closed the connection]
Morkel has joined #ruby
xpen has joined #ruby
timonv has quit [Ping timeout: 255 seconds]
kbeddingfield has quit [Remote host closed the connection]
xpen_ has joined #ruby
thecreators has quit [Ping timeout: 265 seconds]
k610 has quit [Ping timeout: 248 seconds]
nari has joined #ruby
classix has quit [Ping timeout: 260 seconds]
k610 has joined #ruby
vlad_starkov has joined #ruby
seanyo has quit [Ping timeout: 245 seconds]
xpen has quit [Ping timeout: 246 seconds]
cyong has quit [Quit: Leaving.]
jxriddle has joined #ruby
skcin7 has quit [Quit: Computer has gone to sleep.]
k610 has quit [Ping timeout: 276 seconds]
greenarrow has joined #ruby
mercwithamouth has quit [Ping timeout: 246 seconds]
classix has joined #ruby
AlbireoX has quit [Remote host closed the connection]
David_Miller has quit [Ping timeout: 276 seconds]
jimeh has joined #ruby
jimeh has quit [Client Quit]
psycho_one has joined #ruby
classix has quit [Ping timeout: 240 seconds]
<werdnativ>
rspec question: can I set a message expectation to check if a block was passed? Something like: .with_block?
classix has joined #ruby
<werdnativ>
should_receive(:message).with_block # or such.
Tearan has quit [Quit: Sleepy Badger....]
Dreamer3 has quit [Quit: Leaving...]
kil0byte has joined #ruby
SuperrMann has quit [Quit: Computer has gone to sleep.]
qwerxy has joined #ruby
xpen_ has quit [Read error: Connection timed out]
<werdnativ>
I tried .with(&proc{foo!}) but it seems to just evaluate it instead of asserting
rellin has quit [Ping timeout: 255 seconds]
xpen has joined #ruby
Jdubs has quit [Ping timeout: 252 seconds]
kil0byt__ has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Remote host closed the connection]
timonv_ has quit [Remote host closed the connection]
zf_ has joined #ruby
<JohnTeddy>
How can I define a method where if there is no input, say blah(), that I do a certain result.
Fraeon has quit [Read error: Connection reset by peer]
Fraeon has joined #ruby
<werdnativ>
JohnTeddy: def blah(*args); if args.empty?...
<JohnTeddy>
thanks
mercwithamouth has joined #ruby
zf has quit [Ping timeout: 255 seconds]
<JohnTeddy>
werdnativ: If I have some file.rb I'm editing, then in pry I do 'require "./file.rb"', after I make an edit/save.. how can I reload that file to execute the changed/new method?
filipe has joined #ruby
<werdnativ>
try load instead of require
<JohnTeddy>
Thanks
<scx>
i need function which can do that: f([1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]) => [[1, 4, 7, 10], [2, 5, 8, 11], [3, 6, 9, 12]]
vlad_starkov has joined #ruby
dr_bob has joined #ruby
kil0byte_ has joined #ruby
hoelzro|away is now known as hoelzro
k610 has joined #ruby
hotovson has joined #ruby
<scx>
if i good remember it was similar to zip
kil0byte has quit [Ping timeout: 248 seconds]
<heftig>
scx: transpose
workmad3 has quit [Ping timeout: 265 seconds]
quest88 has quit [Quit: quest88]
haxrbyte has quit [Ping timeout: 246 seconds]
ilyam has quit [Quit: ilyam]
xorigin has joined #ruby
haxrbyte has joined #ruby
monkegji_ has joined #ruby
richardjapenga has joined #ruby
tonini has joined #ruby
timmillwood has joined #ruby
<scx>
heftig: thanks!
heftig has quit [Quit: leaving]
maxer has joined #ruby
maxer has quit [Client Quit]
areil has quit [Ping timeout: 246 seconds]
Asher has joined #ruby
foofoobar has joined #ruby
<foofoobar>
Hi. General question: tab or spaces? What is most commonly used?
areil has joined #ruby
mercwithamouth has quit [Ping timeout: 245 seconds]
<Hanmac>
i use tabs and no one can stop me :D
<rking>
foofoobar: I burn tabs with putrid hatred.
<foofoobar>
Are there any advantages/disadvantages?
<rking>
Might as well :%ce your code in vim if you want to use tabs.
<rking>
Tabs display differently in different contexts
<rking>
At the benefit of a few bytes compactness.
<foofoobar>
okay
<foofoobar>
so better tell me editor to use 2 spaces when I press tab?
monkegji_ has quit [Read error: Connection reset by peer]
SPYGAME has joined #ruby
FlyingFoX has quit [Read error: Operation timed out]
<rking>
foofoobar: Exactly.
adeponte has quit [Remote host closed the connection]
adeponte has joined #ruby
tomsthumb has quit [Quit: Leaving.]
_alejandro has quit [Remote host closed the connection]
FlyingFoX has joined #ruby
adeponte has quit [Ping timeout: 276 seconds]
eataix has joined #ruby
awestroke has joined #ruby
ReBa_ has joined #ruby
wallerdev has quit [Quit: wallerdev]
mneorr has quit [Remote host closed the connection]
haxrbyte has quit [Remote host closed the connection]
mneorr has joined #ruby
mneorr has quit [Remote host closed the connection]
haxrbyte has joined #ruby
SPYGAME has quit [Ping timeout: 264 seconds]
hbpoison has quit [Ping timeout: 246 seconds]
khakimov has quit [Quit: Computer has gone to sleep.]
maesbn has quit [Remote host closed the connection]
awestroke has quit [Remote host closed the connection]
arturaz has quit [Remote host closed the connection]
dr_bob has quit [Quit: Leaving.]
dr_bob has joined #ruby
tchebb has quit [Ping timeout: 244 seconds]
pestouille has joined #ruby
monkegji_ has joined #ruby
bradhe has quit [Remote host closed the connection]
maesbn has joined #ruby
Elhu has joined #ruby
`psudo has quit [Ping timeout: 245 seconds]
wf2f has joined #ruby
wchun has quit [Read error: Operation timed out]
elentras has joined #ruby
bradhe has joined #ruby
w2f2 has quit [Ping timeout: 260 seconds]
SPYGAME has joined #ruby
TheFuzzball has quit [Ping timeout: 246 seconds]
jaygen has quit [Remote host closed the connection]
marr has joined #ruby
chussenot has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
sn0wb1rd has quit [Quit: I will be right back]
maxer has joined #ruby
TheFuzzball has joined #ruby
ReBa_ has left #ruby [#ruby]
dekroning has joined #ruby
haxrbyte has quit [Ping timeout: 246 seconds]
nari has quit [Ping timeout: 260 seconds]
monkegji_ has quit [Ping timeout: 246 seconds]
blacktulip has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
zigomir has joined #ruby
monkegji_ has joined #ruby
cdt has joined #ruby
bradhe has quit [Remote host closed the connection]
<whomp>
whenever i try to upload my rails app to heroku, it says "installing sqlite3 (1.3.6) with native extensions" and then gives an error. heroku can't work with sqlite3, so i need to be out of the picture. however, it's installing it because of a dependency on sqlite3, right? so how can i avoid this?
<whomp>
*so it needs to be
maxer has quit [Quit: maxer]
<Hanmac>
whomp you are in the wrong channel?
<whomp>
would rails be the right one?
<Hanmac>
#rubyonrails
<whomp>
ohhhh ok
<whomp>
#rails was so small...
ephemerian has joined #ruby
neersighted has quit [Read error: Operation timed out]
Shrink has quit [Ping timeout: 256 seconds]
colinbm has joined #ruby
nari has joined #ruby
heftig has joined #ruby
scx has quit [Read error: Connection reset by peer]
arturaz has joined #ruby
awestroke has joined #ruby
Chryson has quit [Quit: Leaving]
swex has joined #ruby
thinkit2 has quit [Read error: Connection reset by peer]
statarb3 has quit [Ping timeout: 246 seconds]
Virunga has joined #ruby
chussenot has quit [Quit: chussenot]
hsbt is now known as hsbt_away
tvw has joined #ruby
scx has joined #ruby
mmornati_ has joined #ruby
<mmornati_>
hi guys...
<mmornati_>
I've a strange problems with Daemons
<mmornati_>
can someone help me?
savage- has quit [Quit: savage-]
hbpoison has joined #ruby
polymar has joined #ruby
jimeh has joined #ruby
polymar has quit [Remote host closed the connection]
<JonnieCache>
its not a big issue, because everybody uses two spaces
<MrSamuel>
right, but I prefer to use tabs
<MrSamuel>
morf: I have 60 projects that all use tabs and are consistent
<morf>
you shouldn't
<MrSamuel>
morf: yes, but tabs are easier for me
<morf>
it's better use spaces always period
<morf>
bla bla bla me me me
<MrSamuel>
morf: I tried using spaces and found tabs easier?
bradhe has joined #ruby
<morf>
setup editor to replace tabs with spaces for you
* Hanmac
uses still tabs
<MrSamuel>
yes, but we are talking about 100s of source files
<MrSamuel>
i mean, at the very least, I'd have to write a script, and to what end, it only makes my life harder?
<morf>
it's like the same if the editor doing it for you?
<MrSamuel>
I use 3 different editors
<MrSamuel>
across at least 3 different machines
<morf>
you just love to complain don't you? ;)
<MrSamuel>
look, it feels like I'm fighting against you which isn't really what I want to do
<MrSamuel>
I'm not complaining
<shevy>
MrSamuel: I always use 2 spaces for one level of indent
<MrSamuel>
BUT… I'm trying to figure out whether given the circumstances its a worthwhile change
elico has quit [Quit: elico]
<MrSamuel>
If you make this out to be a battle then no one is going to win
answer_42 has joined #ruby
<shevy>
it can not be a bug in ruby because the ruby parser does not care much unless the python parser (well, ruby actually gives a warning sometimes, in case of wrongful indents in case/when menus)
bbttxu has joined #ruby
fermion has joined #ruby
cascalheira has joined #ruby
banisterfiend has quit [Ping timeout: 252 seconds]
<shevy>
BryanWB_: I'd think pp your_object would work
<shevy>
MrSamuel: I don't allow that :)
<BryanWB_>
shevy: nope unfortunately
<shevy>
hmmm
<MrSamuel>
shevy: Tabs not only don't allow that but they enforce that.
<shevy>
MrSamuel: enforce how? does your editor not allow you to sneakily add an extra tab somewhere of your choosing?
Amirh has quit [Quit: Leaving.]
<morf>
MrSamuel: tabs vs spaces > google and read. you have to decide yourself after all
<shevy>
BryanWB_: no idea, I thought pp would show the innards of a proc ... :(
<MrSamuel>
shevy: If you insert an additional tab its very clear that it is indented incorrectly
<morf>
however most people use spaces instead of tabs
<shevy>
but so is when I use extra spaces too, it's no longer aligned to the rest of the code, so it sticks out as well
<workmad3>
MrSamuel: you could always use an editor that allows soft-tabs
<shevy>
I dont use one space alone though
<MrSamuel>
workmad3: yeah some of my editors do
<MrSamuel>
workmad3: but at least all my editors support tabs correctly and consistently
haxrbyte has joined #ruby
<workmad3>
MrSamuel: define 'correctly and consistently'
<shevy>
he presses tab, they add \t
<MrSamuel>
yeah thats basically it :D
<shevy>
since they all do that, that is consistent :D
<workmad3>
MrSamuel: because half the complaints surrounding tabs are that they can really screw up your layout when you start switching tab-width between different editors and users
<shevy>
of course it is not correct, but well ;)
<MrSamuel>
workmad3: I've never had that problem
haxrbyte has quit [Remote host closed the connection]
<shevy>
tabs screwed up my documentation-layout!
<MrSamuel>
workmad3: not on a single project out of 60
<shevy>
can you show me how you document code MrSamuel ?
Guest89414 has quit [Read error: Connection reset by peer]
<shevy>
I mean your own code
<workmad3>
MrSamuel: I've had code that looks really weird because someone else had laid it out for a tab-width of 8 spaces and my editor opened it up with a tab-width of 4
<shevy>
ugh 8 spaces... those are the worst
Guest89414 has joined #ruby
<MrSamuel>
Yeah, but using tabs as indentation and using tabs for spacing are two completely separate issues
<MrSamuel>
if you use tabs for spacing you are f**ked
larissa has quit [Ping timeout: 240 seconds]
<MrSamuel>
I completely agree on that point
<MrSamuel>
I only ever use tabs for indentation from the left column
<shevy>
ah the first sign of weakness
<shevy>
in two years you will be using spaces :)
<workmad3>
MrSamuel: they'd laid it out using a tab-width of 8 for indentation, and lined stuff up with spacing based around that
jlwestsr has joined #ruby
horofox has quit [Quit: horofox]
<workmad3>
MrSamuel: and that screwed up the layout when viewed with a different tab-width
<shevy>
the only one who can never be persuaded is Hanmac
dhruvasagar has quit [Ping timeout: 252 seconds]
<MrSamuel>
workmad3: that seems very odd
<MrSamuel>
workmad3: never had that problem
haxrbyte has joined #ruby
larissa has joined #ruby
cantonic has joined #ruby
haxrbyte has quit [Remote host closed the connection]
qwerxy has joined #ruby
<MrSamuel>
Does it seem reasonable to accept a patch that changes the entire project from TABS to SPACES even though (a) it is purely cosmetic and (b) I personally prefer tabs
<MrSamuel>
What about the other way around?
baniste__ has joined #ruby
<MrSamuel>
If someone submitted a patch changing all SPACEs to TABS?
<Iszak>
MrSamuel it depends, if it's following a standard that the project is meant to follow then sure it's reasonable.
erichmenge has joined #ruby
k610 has joined #ruby
<MrSamuel>
Iszak: So, in that case I should write a coding standard for my own projects
Neomex has joined #ruby
Neomex has quit [Client Quit]
<Iszak>
No, I think you should adopt an existing one.
<MrSamuel>
Then it conforms to at least some documented standard
<MrSamuel>
Iszak: So, you think I should go and change 100s of source code files JUST for this issue?
<Iszak>
MrSamuel it's very easy to convert tabs to spaces….
haxrbyte has joined #ruby
iamjarvo has joined #ruby
<MrSamuel>
Personally, I think the patch is obnoxious
cousine_ has joined #ruby
cousine has quit [Read error: Connection reset by peer]
<Iszak>
MrSamuel if it doesn't say why, I would comment on asking why, if they say to conform to a standard, say doesn't follow that standard, will look into it.
robbyoconnor has quit [Ping timeout: 245 seconds]
bradhe has quit [Ping timeout: 246 seconds]
<MrSamuel>
The bug report was "There is a convention to use two spaces instead of tabs"
larissa has quit [Ping timeout: 252 seconds]
<Iszak>
MrSamuel that is the general convention I've seen among ruby code, I must say.
vickaita has quit [Ping timeout: 268 seconds]
<workmad3>
MrSamuel: some people get very militant about their coding standards, and it is a bit obnoxious, especially if the code-base is your project
<shevy>
MrSamuel: this issue would not exist if you would embrace 2 spaces with all your heart :)
<MrSamuel>
shevy: lol
<MrSamuel>
workmad3: yes its my own project..
<workmad3>
MrSamuel: I'd probably consider closing it with a trollface ;)
<Iszak>
MrSamuel but you don't want to appear hostile and totalitarian over the project otherwise no one will want to contribute
<shevy>
but the question is really simple - either you use 2 spaces for that project, or not. if you dont, you must reject the patch.
<Iszak>
or you could keep the patch pending why you mull over the idea.
<shevy>
this is not "contribution"
<Iszak>
for years
chussenot has joined #ruby
<shevy>
if it would fix a real bug, yeah
<shevy>
but it attempts to impose one world view alone for no benefit as-is
mark_locklear has joined #ruby
larissa has joined #ruby
samphippen has joined #ruby
<shevy>
except until the day when MrSamuel embraces spaces finally :)
<MrSamuel>
shevy: lol
<Iszak>
well considering most people use spaces, it'd mean they need to configure their editor to use tabs and not spaces. Which means patches will be rejected for those who don't.
<Iszak>
just a larger barrier to entry.
<MrSamuel>
Iszak: yes I appreciate this point
<baniste__>
MrSamuel: every language has its coding standards, when i write obj-c code i want my code to look like obj-c, when i write C i want it to look like C, when i write ruby i want it to look like ruby. I don't format/indent my code like it was C if i'm writing Ruby, and so on. Ruby code is generally 2 spaces, that's just how it is. I guess people will live with it if it's not, but it wont look distinctively rubyish
<workmad3>
MrSamuel: heh, you could always claim that you're being more performant and space-conservative, after all a tab is only one character while double-space is 2 :)
slainer68 has joined #ruby
haxrbyte has quit [Remote host closed the connection]
<workmad3>
MrSamuel: so you're saving on disk-space, and you're speeding up how quickly the ruby runtime can parse your code
<Iszak>
you should rewrite all the code in C for performance.
<MrSamuel>
assembly
<Iszak>
even better.
<shevy>
workmad3: I use that reasoning when omitting documentation!
<workmad3>
MrSamuel: it's bullshit reasoning, but I bet you someone that's militant enough to send you that patch will swallow it down like it's ambrosia
<workmad3>
shevy: :D
jlwestsr has quit [Ping timeout: 246 seconds]
ttt_ has quit [Remote host closed the connection]
<MrSamuel>
So, the main reason to use tabs is because its more consistent?
<MrSamuel>
sorry
<MrSamuel>
spaces
tommyvyo has joined #ruby
<MrSamuel>
the main reason people use spaces is because its consistent?
haxrbyte has joined #ruby
<workmad3>
MrSamuel: tbh, the main reason I use spaces is because the community standard is for spaces... I used to use tabs, and the consistency arguments can be made in both directions
<baniste__>
MrSamuel: consistent with other ruby code? yeah i guess so, 2 spaces is "ruby-ish" :)
haxrbyte has quit [Remote host closed the connection]
<Iszak>
I mean, if this was PHP, I'd say - use whatever you like, because it's coding standard is a mess.
erichmenge has quit [Quit: Be back later]
elaptics`away is now known as elaptics
<workmad3>
spaces require less work to make consistent across setups, tabs allow a certain amount of user choice and flexibility
SuperrMann has joined #ruby
Neomex has joined #ruby
<workmad3>
different languages and different communities fall into place around different choices
haxrbyte has joined #ruby
<workmad3>
it's all a big dogmatic battle, and a lot of the ruby community has grown around 2 spaces rather than tabs
erichmenge has joined #ruby
<MrSamuel>
right
<Iszak>
It's like the vim vs emacs wars.
slainer68 has quit [Ping timeout: 246 seconds]
<workmad3>
Iszak: except that in vim vs emacs there's an obvious right answer :P
<workmad3>
</troll>
<Iszak>
workmad3 yes exactly, emacs.
<workmad3>
Iszak: exactly wrong :P
haxrbyte_ has joined #ruby
<MrSamuel>
vimacs
hatoishi has joined #ruby
<Iszak>
still emacs.
invisime has joined #ruby
<workmad3>
Iszak: :D
eataix has quit [Ping timeout: 245 seconds]
<baniste__>
even the vim author abandoned vim and said the emacs design was cooler
<baniste__>
(it's ok wikipedia :P)
<MrSamuel>
oh really!?
<MrSamuel>
lol
<baniste__>
on*
<baniste__>
Yeah
<MrSamuel>
thats pretty hilarious
<baniste__>
i was teasing my vim frens about it the other day on #pry
<MrSamuel>
Okay, so I just tried changing TextMate to soft tabs and I loose one think I find useful, the show invisibles for tabs and whitespace in general
<MrSamuel>
is there some way to enable this for soft tabs?
haxrbyte_ has quit [Ping timeout: 256 seconds]
<baniste__>
Joy continued to be lead developer for vi until version 2.7 in June, 1979,[12][18] and made occasional contributions to vi's development until at least version 3.5 in August, 1980.[18] In discussing the origins of vi and why he discontinued development, Joy said
<baniste__>
I wish we hadn't used all the keys on the keyboard. I think one of the interesting things is that vi is really a mode-based editor. I think as mode-based editors go, it's pretty good. One of the good things about EMACS, though, is its programmability and the modelessness. Those are two ideas which never occurred to me.
<workmad3>
baniste__: that would be the author of *vi*, not vim
<baniste__>
workmad3: the arguments apply equally to vim
<baniste__>
and vim isn't much different to vi, it's just a rewrite isn't it?
<baniste__>
slightly modernized
<workmad3>
only if you leave it in vi compatible mode (which is dumb)
<luminous>
hello! trying to use octopress as a regular (non-ruby) coder and running into problems. this is running as my regular user: http://pastie.org/private/udycttwfg1qtgkqhqpy1pw this worked when i last ran as root, but i was then trying to use octopress and was unable to do so. any/all guidance is appreciated
levabalkin_ has quit []
Tombar has quit [Remote host closed the connection]
<Hanmac>
csmrfx in my county its legal if you have an recipe from your doctor
<csmrfx>
it is just not prosecuted
<baniste__>
csmrfx: me thinks u have a whacked notion of "legal"
<dogweather>
csmrfx: very skeptical
samphippen has joined #ruby
<csmrfx>
Of course medication is legal. Possessing medication without a prescription is illegal in most countries.
<baniste__>
csmrfx: there are constrains on the use of lots of things, doesnt mean that thing is 'illegal'
<SilSila>
Mon_Ouie: so ... rubyonrails is a single word? or ruby is alone a name for this programming framework....if yes...what rails means?
<jipiboily>
SilSila: Ruby is the language
<baniste__>
csmrfx: i can't tow a trailer faster than 80km/s so there's constrains on it, doesn't mean towing a trailer is "illegal", same with marijuana in holland.
<csmrfx>
baniste__ dogweather well, you both are the ones who are clueless, dont blame me, and this is off topic, so go read on that
<jipiboily>
Ruby on Rails is a web framework built with Ruby
lkba has quit [Ping timeout: 260 seconds]
<csmrfx>
baniste__: perl allows you to have global vars, but if you use strict, then you have to declare context. Same deal.
<SilSila>
jipiboily: so i have to use redmine to write ruby programming? or i can use simple notepad with ruby file extension?
<Hanmac>
you can use notepad too
Rydefalk has quit [Read error: Connection reset by peer]
<jipiboily>
SilSila: use what you want, no editor in particular is necessary
<jipiboily>
I used Sublime Text 2
burgestrand has joined #ruby
<jipiboily>
a lot of ppl are using Vim (unix) or Texmate (Mac)
Rydefalk has joined #ruby
xsbeats_ has joined #ruby
<jipiboily>
Sublime Text is available on all major platforms AFAIK
* Hanmac
uses gedit or eclipse
<maasha>
So, I will revise my question. How serious is green_shoes? can you build something major with it?
aetcore has quit [Remote host closed the connection]
psycho_one has quit [Read error: Connection reset by peer]
psycho_one has joined #ruby
Axsuul has quit [Ping timeout: 252 seconds]
Serial_Killer_C has joined #ruby
<SilSila>
great...which editor i can use for all together....macromedia website builder gives all options like writing html,php,connecting database etc...like this...which editor will be a best one like a me (as a beginner)
macabre has joined #ruby
otters has joined #ruby
<csmrfx>
vim
<elaptics>
SilSila: anything, whatever you find easiest. If you're looking to do web based programming it is all done with text files
<csmrfx>
as a beginner, use cream (it is vim with beginner and normal modes)
nanderoo has joined #ruby
aquaranto has quit [Remote host closed the connection]
cousine_ has quit [Remote host closed the connection]
enderx86 has joined #ruby
<jipiboily>
vim is quite a learning curve while trying to learn Ruby, Rails AND Vim….my 2 cents ;)
<elaptics>
SilSila: you probably want something that's geared towards programming with features like syntax highlighting but if you're learning a lot of new things - a text editor shouldn't be one of them
carlyle has joined #ruby
<csmrfx>
Do you want to be a professional programmer?
haxrbyte_ has joined #ruby
aquaranto has joined #ruby
<csmrfx>
You need to learn one editor well. Extremely well.
enderx86 has quit [Remote host closed the connection]
<SilSila>
csmrfx: not that much...currently i am a oracle database administrator...i want to learn to build my own website in my free time....so i dont want to invest money in programming or for building a website...i want to do it of my own..
<SilSila>
is there any WYSIWYGs where i can do all stuffs?
<jipiboily>
csmrfx I totally agree, but learning one thing at a time might be easier...
xsbeats_ is now known as xsbeats
<csmrfx>
I wouldn't know, I am professional programmer.
GoGoGarrett has joined #ruby
<Hanmac>
i newer saw an WYSIWYG editor for ruby
enderx86 has joined #ruby
<jipiboily>
csmrfx so am I :)
Serial_Killer_C has joined #ruby
beiter has joined #ruby
Rydefalk has quit [Read error: Connection reset by peer]
Rydefalk_ has joined #ruby
screenmutt has joined #ruby
<codecaster>
what you need to learn is the language and framework if needed
<codecaster>
the editor is not important at all
<screenmutt>
Hello! I've got a question for the gallery.
<codecaster>
at least with ruby and rails
<codecaster>
java,C#, etc are a different matter
<csmrfx>
that is incorrect
<jipiboily>
anyone knows about String#encode known (or not documented) issue that would result in "code converter not found (universal_newline)" when uploading a CSV from Windows but NOT from a Mac (same CSV!!!)?
<codecaster>
actually it's pretty correct
<csmrfx>
no it is not
<codecaster>
I use a plain text editor, textmate
<codecaster>
And I am very productive
haxrbyte has quit [Ping timeout: 260 seconds]
<csmrfx>
So, you spend 2-6 times more editing than a vimmer
<codecaster>
how come
<codecaster>
explain that
Serial_K_ has joined #ruby
Slivka has joined #ruby
<jipiboily>
not a Vim vs the world war please guys…;)
<screenmutt>
I'm using Rails 3 and Twitter bootstrap. I'm trying to add popovers to some of my forms, but it's a lot of code, so I wrote a helper. Here's the code: http://pastebin.com/645nbe5T. The problem is I want to add another parameter to the text_field. How can I do this?
<MrSamuel>
manveru wrote a vim clone called Ver in ruby
<MrSamuel>
its pretty cool
thinkdevcode has quit [Remote host closed the connection]
<codecaster>
I have been programming in ruby for 8 years and I tell you that I don't need any special editor
<jipiboily>
screenmutt I guess that question should be asked on #rubyonrails
Serial_Killer_C has quit [Ping timeout: 276 seconds]
hotovson has quit [Remote host closed the connection]
<jipiboily>
so, no one ever faced String#encode problems depending of the OS where a file would be uploaded of?
<screenmutt>
jipiboily: It seemed like more of a general ruby syntax and functionality question
<clocKwize>
I know a guy who uses vim, he is A LOT less productive than me, and watching him edit code and navigate between files, find in files etc annoys the hell out of me
<codecaster>
Actually I used vim a long time ago, dropped it
<csmrfx>
codecaster: so, you want to change a variable name in all open files
<SilSila>
thank you guys....i have finalised like this...notepad++ in my windows 7 ultimate edition...have anybody used this editor?
ananthakumaran1 has quit [Quit: Leaving.]
<codecaster>
csmrfx: i never needed to do that
<csmrfx>
codecaster: can you do that with one command
<clocKwize>
you don't need vim to do that without using the mouse
<codecaster>
indeed
<SilSila>
is this the place i have to start with... http://guides.rubyonrails.org/ ? or any other link is also appreciated....for a beginner like me...
<csmrfx>
codecaster: I can tell you really dont have much work.
<clocKwize>
SilSila, that is the best place to start
<jipiboily>
SilSila that should do it
<jipiboily>
SilSila codeschool provides a free beginner course too
<codecaster>
More than 40 hours per week seems quite a nice amount of programing for the last 8 years
<codecaster>
actually I don't care, vim troll
<codecaster>
you can leave now
<clocKwize>
csmrfx, I would generally not have to change a variable name across files, as variables are defined to scopes and scopes are generally small (i.e. less than 1 file)
<clocKwize>
method names, class names, yes more often
<csmrfx>
Good job telling someone who points out some facts you didn't realize a 'troll'
<codecaster>
yeah, module and class names from time to time
<codecaster>
And I can do that with textmate
<clocKwize>
codecaster, indeed
<codecaster>
It's not a fact
<codecaster>
:)
<clocKwize>
or sublime
<codecaster>
it's your opinion
<csmrfx>
Not an opinion.
theRoUS has joined #ruby
theRoUS has joined #ruby
<codecaster>
which from my point of view, is wrong
Banistergalaxy has quit [Ping timeout: 260 seconds]
bbttxu has quit [Ping timeout: 246 seconds]
<csmrfx>
Same kind of thing as the mythical-man-hour.
<csmrfx>
Some things simply are realities, no matter how obscure or too-obvious.
<codecaster>
yeah
<codecaster>
keep going
bbttxu has joined #ruby
<codecaster>
I have stuff to do, which btw is not changing variable names along lots of files
<csmrfx>
lol
<csmrfx>
You didn't change variable names cause you couldn't do that without tons of manual work, sure.
bradhe has joined #ruby
kil0byte_ has joined #ruby
<codecaster>
yeahm you are right
<csmrfx>
Doesn't mean a proper editor wouldn't save hours of your time weekly.
<codecaster>
that's the reason
<clocKwize>
lol
amaya_ has quit [Client Quit]
<codecaster>
I could program websites with a keystroke in vim
<clocKwize>
codecaster, just ignore him, hes trolling
<SilSila>
codecaster and clocKwize: thank you guys.....
<csmrfx>
yep, trolling, you into my ignore list 8)
<clocKwize>
csmrfx, go for it.
<codecaster>
perfect
<codecaster>
:D
<luminous>
is there a better place for gems / renv gurus?
<clocKwize>
codecaster, too, i'm sure he'd appreciate being ignored by you
<codecaster>
I use vim mainly for assembler
ABK has joined #ruby
bbttxu has quit [Client Quit]
ttt has joined #ruby
kil0byte has quit [Ping timeout: 252 seconds]
<jipiboily>
luminous have you tried reloading RVM as stated in your pastie?
<shevy>
anyone knows of some ruby script that checks ruby code for potential improvements in terms of efficiency, especially speed?
<shevy>
csmrfx: yeah but that requires one to invest time, when it is not a lot of code, profiling seems as if one has to invest more time than worth the initial investment :(
notwen has quit [Read error: Connection reset by peer]
jagira has joined #ruby
notwen has joined #ruby
Guest10501 has quit [Ping timeout: 246 seconds]
Guest47720 has quit [Changing host]
Guest47720 has joined #ruby
SilSila has joined #ruby
<csmrfx>
shevy: you mean you have to put in work?
<csmrfx>
ooo
<clocKwize>
csmrfx, vim sucks
<shevy>
of course
Guest47720 is now known as madhatter
<csmrfx>
whatever
<clocKwize>
haha, you didn't ignore me
<csmrfx>
yes, you will have to install the profiler gem and run it
kil0byte has joined #ruby
<csmrfx>
being lazy is good, being a dousche is boring
<SilSila>
friends..when i open the download page in ... http://rubyonrails.org/download... there are 3 parts...one is ruby and rubygems (ok..this is a package ) then what about rails (what this means)?
<clocKwize>
SilSila, Most people here probably aren't on windows
Rydefalk has joined #ruby
Rydefalk_ has quit [Read error: Connection reset by peer]
screenmutt has quit [Quit: Page closed]
hbpoison has quit [Ping timeout: 252 seconds]
codecaster has joined #ruby
<csmrfx>
hard to say, not knowing what it is for and whats in/out
djdb has quit [Read error: Operation timed out]
<SilSila>
clocKwize: in that site also windows installer available
elico has joined #ruby
<clocKwize>
SilSila, that site is the windows installer
<clocKwize>
I was just making the remark that most people here don't use windows
<clocKwize>
either mac or linux
TommyBlue has quit [Quit: Coyote finally caught me]
ABK has quit [Ping timeout: 248 seconds]
TommyBlue has joined #ruby
TommyBlue is now known as TommyBlue
djdb has joined #ruby
marr has quit [Ping timeout: 246 seconds]
Cultofmetatron has joined #ruby
<SilSila>
clocKwize: ok...so only this rubyinstaller is enough or i have to install anything for rails...? so ruby and rubyonrails are same?
k610 has quit [Remote host closed the connection]
fernand has joined #ruby
Guest10501 has joined #ruby
gpalmier has quit [Ping timeout: 260 seconds]
linoj has joined #ruby
fernand has quit [Changing host]
fernand has joined #ruby
<clocKwize>
SilSila, rubyinstaller installs ruby on windows. I know nothing more than that
<clocKwize>
read the guys on the site, I'm sure it tells you how to do it
csaunders has joined #ruby
kkh is now known as Guest10363
fernand is now known as kkh
znake is now known as znake|away
mark9 has joined #ruby
<SilSila>
ok...one more thing..is this ruby is more powerful than php and asp?
Serial_K_ has quit [Remote host closed the connection]
<clocKwize>
SilSila, in what respect?
<mark9>
yeah... it supports chaining
<csmrfx>
depends
znake|away is now known as znake
<csmrfx>
well, anything is more powerful than asp, though
jeffreybaird has joined #ruby
<clocKwize>
ASP is good at talking to microsoft products, PHP is quite fast
bradhe has quit [Ping timeout: 260 seconds]
<clocKwize>
yet ASP is also terribly out dated, has masses of problems, no support and makes it very difficult to write scalable reliable applications
quido has joined #ruby
<clocKwize>
PHP has problems too, which I can't be assed to list as it'll probably get someones back up
<clocKwize>
Ruby also has its problems
<SilSila>
so all are having some pros/cons but ruby is the emerging one...is it?
<clocKwize>
ASP has no pros
<clocKwize>
any more
<clocKwize>
it might have done 10 years ago
freeayu has quit [Remote host closed the connection]
<SilSila>
not asp .... instead of asp.net or c#.net i wrote asp
<clocKwize>
PHP will be harder to learn and you'll find lots of bad advise and won't know better and will end up having hard to maintain, insecure applications that break easily
<clocKwize>
Ruby on Rails makes it easy to get things going without really writing any code and covers up stuff you shouldn't care about
Tombar has quit [Remote host closed the connection]
<clocKwize>
ASP.NET/C# are ok, I guess
djdb has quit [Remote host closed the connection]
<clocKwize>
they also have their problems
<Jdubs>
@clocKwize, I'm currently learning Ruby before going on to rails, is that good or bad?
<jamescarr>
I switched to ruby, we ran back to the embracing arms of PHP
<csmrfx>
Ruby is most fun!
<clocKwize>
Jdubs, good
<Jdubs>
kk
geekbri has joined #ruby
<csmrfx>
And gawds, do learn ruby before you learn a framework
<kaleido>
not that i ever built anything serious, but i always preferred sinatra to rails
<clocKwize>
jamescarr, then you were probably doing it wrong :) What made you do that?:
cousine has joined #ruby
<jamescarr>
clocKwize: we're also converting a legacy django project to PHP too
<clocKwize>
kaleido, I have written several semi-large apps with Sinatra, they always start out small and sexy, then end up a mess of code that emulates things rails does for you
<jamescarr>
for the lulz
<kaleido>
im not smart enough to argue that :)
<kaleido>
i also am not smart enough to grasp what goes in controlers vs models etc
foofoobar has quit [Quit: bb]
<kaleido>
which is probably my main deterrent
<Vinz_>
Controllers act on views, to send info to them
john2x has quit [Quit: Leaving]
<Vinz_>
Models act on controllers, to fetch info from db
<csmrfx>
Lol @ MVC
<clocKwize>
jamescarr, I'm curious - what made you run away from rails and what frameworks do you use in PHP?
<csmrfx>
Go to youtube and find rails vids
<kaleido>
phpnuke!
<kaleido>
;)
<jamescarr>
clocKwize: I'm kidding :)
<clocKwize>
jamescarr, oh, ok :)
<Jdubs>
Can someone please help me find the error that is crashing my program?
<clocKwize>
Jdubs, gist
<Jdubs>
just a syntax error somewhere
<Vinz_>
csmrfx: I used to code with Sinatra, not with Rails
<Jdubs>
having trouble finding it
starship is now known as Guest36125
Guest36125 has quit [Killed (cameron.freenode.net (Nickname regained by services))]
<Muz>
Not very, they're either japanese, or scriptkiddies and who wants to employ either of those?!
mmitchell has joined #ruby
flip_digits has quit [Read error: Connection reset by peer]
<clocKwize>
CD Baby?
<wallmani>
Muz: :D
juarlex_ has quit [Remote host closed the connection]
bbttxu has joined #ruby
<csmrfx>
Before talking to codetexteditor and clockman here I would have said rubyists are pro
<clocKwize>
Jdubs, you have =begin \n def equip(item)...
<mark9>
Jdubs: go to line 79, type: end
<csmrfx>
but I think you can not make such generalizations, Muz
<Muz>
csmrfx: yeah, someone on the internet might take it seriously and not pick up on the obvious sarcasm.
<Muz>
That'd be tragic, wouldn't it.
<Jdubs>
hmmm
<clocKwize>
wallmani, I currently work on 350 GBP day as a contractor, my contract is up in 1 month, so I put my CV out there yesterday, since then I've had calls basically every 10 mins, all day yesterday and today
<csmrfx>
One womans sarcasm is other mans truth
<Jdubs>
mark9 That fixed it...What was left open, the else statement? Do 'else' statements need an end?
<clocKwize>
so I'd say very employable, given the experience
<mark9>
def ^^
<Vinz_>
Jdubs: With proper indentation, it's easier to fine.
<Vinz_>
find*
<mark9>
ask me anything, I spot code mistakes for a living
Neomex has joined #ruby
Neomex has left #ruby [#ruby]
<luminous>
jipiboily: the source /usr/local/rvm/scripts/rvm bit? yes
<luminous>
but maybe not enough or something? :P
<jipiboily>
luminous to make sure it worked, just open a new terminal
<jipiboily>
window or tab
<jipiboily>
besides that, installing bundler should be enough
maesbn_ has quit [Remote host closed the connection]
nitti has joined #ruby
quesada has joined #ruby
maesbn has joined #ruby
artnez has joined #ruby
<quesada>
my system ruby seems to be borked after updgrade to ubuntu 12.10
<quesada>
is this a known problem?
osvico has quit [Ping timeout: 252 seconds]
stopbit has joined #ruby
<csmrfx>
define "seems borked"
mikepack has quit [Remote host closed the connection]
<quesada>
particularly... I install sass. Then $sass
<csmrfx>
install? gem?
<quesada>
rubygems/dependency.rb:247:in `to_specs': Could not find sass (>= 0) amongst [] (Gem::LoadError)
<quesada>
comes with ruby 1.9.3, right?
<clocKwize>
are you using bundler?
maasha has quit [Quit: Page closed]
<quesada>
no
aetcore has joined #ruby
<quesada>
I'm not a rubyist
<quesada>
just need sass
<csmrfx>
ok
<csmrfx>
so define "install"
<csmrfx>
You used system/apt-get ruby?
<csmrfx>
You used ubuntus/apt-get rubygems?
philcrissman has joined #ruby
<quesada>
from 12.04 to 12.10 they moved from 1.8.4 to 1.9.3 ruby
<csmrfx>
Did you install the gem with apt-get or with "gem install"?
<quesada>
with sudo gem install
answer_42 has quit [Ping timeout: 276 seconds]
<quesada>
the one in apt-get is old
<csmrfx>
I think the quickest solution for you would be using the apt-get
<quesada>
good point
<csmrfx>
tehcnically I am not on ubuntu anymore
cezar-b has quit [Quit: Leaving]
<quesada>
should I remove the one from gem install?
<wallmani>
clocKwize: how long have you been doind runy and how good of a programmer arr you and which country?
xpen has joined #ruby
answer_42 has joined #ruby
<csmrfx>
quesada: perhaps
Appineer has joined #ruby
hbpoison has quit [Ping timeout: 252 seconds]
<csmrfx>
quesada: I not sure where those diff versions of rubygems look for their gems
<csmrfx>
+on ubuntu
<clocKwize>
wallmani, I've been doing ruby specifically about 3 years, I think I got my first developer job in 2008, but I've been coding since the 90s I guess. I work in London, England
<csmrfx>
google for ubuntu 12.10 ruby gems install
<quesada>
"Under no circumstance should you install Ruby, Rubygems or any Ruby-related packages from apt-get. This system is out-dated and leads to major headaches. Avoid it for Ruby-related packages. We do Ruby, we know what's best. Trust us."
bradhe has joined #ruby
gpalmier has joined #ruby
<wallmani>
clocKwize: i see. that is reassuring :) i am a college student from eurpe in the us looking forward to moving to europe once i have my degree in computer engineering
ChronocityLC has quit [Ping timeout: 260 seconds]
SCommette has joined #ruby
<Hanmac>
quesada the apt-get ruby might not be the recentst but its 1.9.3 and not 1.8 anymore
Roa has quit [Ping timeout: 240 seconds]
<quesada>
Hanmac: true
jaygen has joined #ruby
vickaita has quit [Ping timeout: 256 seconds]
hotovson has joined #ruby
<quesada>
sass is 3.1.19. is that recent enough?
phantasm66 has joined #ruby
<csmrfx>
I am on debian but I find apt-get ruby works fine - as long as the gems you need are in the apt
<csmrfx>
for anything more complicated I slap in RVM
<clocKwize>
wallmani, awesome, it takes a lot to get where I am I guess, but you are on your way - better than having a degree in childcare like my girlfriend who still earns slightly above minimum wage ;)
Roa has joined #ruby
Roa has quit [Changing host]
Roa has joined #ruby
<wallmani>
well i am on a good path alreadg
<clocKwize>
yeah
<wallmani>
ruby is not my first language
CamonZ has joined #ruby
<wallmani>
i just really like it :)
slainer68 has joined #ruby
<luminous>
jipiboily: you would be correct, thank you
znake has quit [Ping timeout: 244 seconds]
<clocKwize>
wallmani, thats good too :) learning lots of languages and being able to weigh them up
<wallmani>
started writing an irc bot for fun yesterday and it was 3 methods for basic functionality
<wallmani>
and under 50 lines of code
<wallmani>
and it is beautiful code
<jipiboily>
luminous: np
<clocKwize>
yeah, the great thing about ruby is the concept of gems
<wallmani>
i get a warm fuzzy feeling which cant really say i feel when i c++ pr java
Tombar has joined #ruby
<wallmani>
i still have a long way to go in ruby though
<wallmani>
but its fun :D
<clocKwize>
:)
<clocKwize>
thats good
JonnieCache has joined #ruby
enderx86 has joined #ruby
<Jdubs>
wow, 50 lines of code? it can connect to the server and view what happens in the channels already? what is the current functionality?
enderx86 has quit [Remote host closed the connection]
<Jdubs>
@wallmani btw
<wallmani>
clocKwize: do you do mostly web development?
<Servidorv>
i get the error Error:undefined method `<<' for {"name"=>"Mario Coletti Bologna", "id"=>"100004027221950"}:Hash
kkh has joined #ruby
<Servidorv>
does anyone know what the problem is??
mpereira has joined #ruby
baniste__ has quit [Remote host closed the connection]
<Hanmac>
like['date']=post['created_time']
quesada has quit [Read error: Connection reset by peer]
tommyvyo_ has joined #ruby
<Servidorv>
you are a genious
<luminous>
in octopress, running rake to create a new post errors out with the following.. is this a zsh thing? % rake new_post["my first post"] >>> zsh: no matches found: new_post[my first post]
<davidcelis>
i love it when people can't even come up with their own idea
rasbonics has left #ruby [#ruby]
PDani has quit [Remote host closed the connection]
slainer68 has joined #ruby
vlad_starkov has joined #ruby
vickaita_ has quit [Ping timeout: 255 seconds]
erichmenge has joined #ruby
samphippen has joined #ruby
codecaster has quit [Read error: Connection reset by peer]
bradhe has quit [Ping timeout: 268 seconds]
codecaster has joined #ruby
slainer68 has quit [Ping timeout: 265 seconds]
warb0 has joined #ruby
thinkdevcode has quit [Ping timeout: 246 seconds]
jake_ has joined #ruby
erichmenge has quit [Client Quit]
emptyflask has joined #ruby
banisterfiend has joined #ruby
GoGoGarr_ has joined #ruby
Guest28555 has quit [Read error: Connection reset by peer]
SuperrMann has quit [Ping timeout: 268 seconds]
richardjapenga has quit [Quit: Leaving]
xpen_ has quit [Remote host closed the connection]
GoGoGarrett has quit [Ping timeout: 268 seconds]
iaj has quit [Ping timeout: 260 seconds]
answer_42 has quit [Ping timeout: 276 seconds]
marel has joined #ruby
enderx86 has joined #ruby
d3vic3 has quit [Ping timeout: 246 seconds]
marr has joined #ruby
vickaita has joined #ruby
u89 has joined #ruby
Rydefalk_ has joined #ruby
elsifaka has quit [Quit: Veloma e!]
erichmenge has joined #ruby
<marel>
Hi. Is there anyone who perhaps could translate some Ruby code ~10 lines to C++ code ? I have never seen ruby and this code is very important for me ..
banisterfiend has quit [Ping timeout: 256 seconds]
sailias has quit [Ping timeout: 240 seconds]
erichmenge has quit [Client Quit]
Rydefalk has quit [Read error: Connection reset by peer]
d3vic3 has joined #ruby
daniel_- has joined #ruby
aganov has quit [Ping timeout: 248 seconds]
headius has joined #ruby
baroquebobcat has quit [Read error: Connection reset by peer]
nitti has quit [Remote host closed the connection]
erichmenge has joined #ruby
<hoelzro>
marel: which parts of the code are tripping you up?
iaj has joined #ruby
<davidcelis>
probably the fact that he has never seen ruby
erichmenge has quit [Client Quit]
davidcelis has quit [Quit: K-Lined.]
<marel>
hoelzro: 3rd and 4th lines and 8th and 9th lines
<Xeago>
most likely map with the block
<hoelzro>
marel: each is just like a for loop
<Xeago>
marel: map builds an array of whatever the block returns, the block in this case is line 4
maletor has quit [Ping timeout: 260 seconds]
thinkdevcode has joined #ruby
GoGoGarr_ has quit [Remote host closed the connection]
anachronistic has joined #ruby
dmiller has quit [Ping timeout: 252 seconds]
brianpWins has quit [Quit: brianpWins]
wreckimnaked has joined #ruby
sailias has joined #ruby
SpamapS has joined #ruby
<marel>
(0..11).map builds an array of 12 elements, right ?
minijupe has joined #ruby
dr_bob has quit [Quit: Leaving.]
<codecaster>
not exactly
<codecaster>
to_a explicitly does that
jipiboily has left #ruby [#ruby]
<SpamapS>
Hi, I'm looking at automating gem dpeloyments and wondering if there is a flag for 'gem install' that will force it to only use https sources for data to avoid MITM vulnerability...
answer_42 has joined #ruby
<codecaster>
I guess you can do that with bundler
jake__ has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
<SpamapS>
I know rubygems.org has https available, but I want gem to refuse to use any non https sources.
jake_ has quit [Read error: Connection reset by peer]
jgrevich has joined #ruby
vickaita has quit [Ping timeout: 265 seconds]
rellin has joined #ruby
erichmenge has joined #ruby
kkh has joined #ruby
erichmenge has quit [Client Quit]
Tania has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
marr has quit [Ping timeout: 246 seconds]
darthdeus has joined #ruby
ilyam has joined #ruby
wallerdev has joined #ruby
siyusong has joined #ruby
MrSamuel has quit [Read error: Connection reset by peer]
<Servidorv>
i guess i already have it in array then
<Servidorv>
never mind
<Servidorv>
another question
<Servidorv>
[{name:ss,id:aaa,date:2012-11-08}]
<Servidorv>
[04:31.22] <servidorv> but i need it to look like -[2012, 11]: {{name:ss,id:aaa,date:2012-11-08}}
<Servidorv>
[{name:ss,id:aaa,date:2012-11-08}]
<Servidorv>
[04:31.22] <servidorv> but i need it to look like -[2012, 11]: {{name:ss,id:aaa,date:2012-11-08}}
<Servidorv>
i have this -[2012, 11]: [{name:ss,id:aaa,date:2012-11-08},{name:ss,id:aaa,date:2012-11-08}], -[2012, 10]: [{name:ss,id:aaa,date:2012-11-08},{name:ss,id:aaa,date:2012-11-08}],
<Servidorv>
how can i eliminate the duplicates
<Servidorv>
??
<apeiros_>
.uniq!
<Servidorv>
cause ive been trying for the past hour or so and uniq wont work
reset has joined #ruby
<apeiros_>
servidorv: why don't you remove the duplicates before grouping?
<Servidorv>
arr.uniq!{|x, v| v['id']}
<apeiros_>
arr.uniq.group_by { …
<apeiros_>
why |x,v| ?
<Servidorv>
because i need to eliminate the duplicate inside each month
jslowe has joined #ruby
<apeiros_>
show the full code please. pastie.org or gist
<becom33>
anyone for me ??
<apeiros_>
complete with the pp/yaml of a small set of data before grouping/uniqueing
<Servidorv>
well if the person posted on sep and october i need to have both, but i cant have the same person voted 2 times in the same month
kirun has joined #ruby
<atmosx>
this ebox 3350mx is really good, it handles an awfull lot of load hmmm
nachooo has joined #ruby
freakazoid0223 has joined #ruby
pnbeast has joined #ruby
<apeiros_>
servidorv: if he posted in sept and oct, those are hardly duplicates of each other - are they?
<apeiros_>
servidorv: also, you can easily just state month & year to be part of the uniq block - just as I did
<Servidorv>
oh i c
<Servidorv>
then my problem is the way i was loking into it
<Servidorv>
sorry bro i still have php on my head
<Servidorv>
:(
theRoUS has quit [Quit: Leaving]
insulator has quit [Remote host closed the connection]
wicky has quit [Quit: leaving]
thinkdevcode has quit [Remote host closed the connection]
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
kirun_ has joined #ruby
kirun_ has quit [Read error: Connection reset by peer]
darthdeus has quit [Ping timeout: 246 seconds]
thinkdevcode has joined #ruby
jamescarr has quit [Quit: Page closed]
nachooo has quit [Ping timeout: 248 seconds]
nachooo_ has joined #ruby
Jork1 has quit [Quit: Jork1]
kirun has quit [Ping timeout: 260 seconds]
axl_ has quit [Quit: axl_]
kirun has joined #ruby
butblack has joined #ruby
BrianJ has quit [Read error: Connection reset by peer]
psycho_one has quit [Remote host closed the connection]
<shevy>
hmm if I have a ruby file in my gem project bin/foo.rb but I want to allow calling it via "foo" too, does anyone know if symlinks for that work?
<shevy>
though that will probably not work on windows hmm
nachooo_ has quit [Ping timeout: 246 seconds]
BrianJ has joined #ruby
Ry_ has quit [Ping timeout: 246 seconds]
thinkdevcode has quit [Ping timeout: 260 seconds]
havenn has joined #ruby
Tuxist has quit [Read error: Connection reset by peer]
nachooo has joined #ruby
tar_ has joined #ruby
carloslopes has quit [Remote host closed the connection]
rafter has quit [Remote host closed the connection]
thinkdevcode has joined #ruby
ryh has joined #ruby
emmanuelux has joined #ruby
gpalmier has quit [Quit: leaving]
ryh has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
<burgestrand>
csmrfx: it’s true that, for CPU-intensive work (say, heavy number crunching) pure-ruby code will not gain much from threads. However, for IO, and even large calculation with ruby’s bignum (which is used for large numbers), threads will help.
<Servidorv>
i need so separate them so i can save them into mongo db
<Servidorv>
but as separated like 102012 on record and 112012 another record
cakehero has quit [Quit: Computer has gone to sleep.]
<csmrfx>
burgestrand: so, in fact, only thing that is bullshit, is your "bullshit" -statement.
<burgestrand>
enroxorz-work: if you don’t care, i.e. fire and forget, Thread.new { `external.bat` } should work just fine, however if the process takes a long time to exit (or never exits), and you call this route many times, you’ll end with a lot of threads that never die which is not really good.
lxsameer has quit [Remote host closed the connection]
<burgestrand>
enroxorz-work: what it does is that it creates a separate thread that runs the code. Once the long-running code finishes the thread will die and ruby can clean it up.
wwalker has left #ruby [#ruby]
<enroxorz-work>
will it continue to the next step while the thread is working?
<burgestrand>
enroxorz-work: if your long-running code never finishes, or if you hit the /pdfcompare/text URL so often that you eventually have hundreds of threads running at the same time, you might need to change the code.
<burgestrand>
enroxorz-work: yes, it will instantly go on to the next step.
<enroxorz-work>
I have a lock file that prevents any additional processes to run
<burgestrand>
servidorv: so what do you want it to look like?
<Servidorv>
you will see that it has [112012]:[{name:bla, id:bla, month:bla, year:bla},{name:bla, id:bla, month:bla, year:bla}], [102012]:[{name:bla, id:bla, month:bla, year:bla},{name:bla, id:bla, month:bla, year:bla}],
BSaboia has quit [Ping timeout: 246 seconds]
<Servidorv>
i just need to separate them
qwerxy has joined #ruby
reinaldob has quit [Remote host closed the connection]
<burgestrand>
servidorv: it is rather { "112012" => [ { bla }, { bla } ], "102012" => [ { bla }, { bla }] }
<Servidorv>
like make 102012 into one array or hash and 112012 into another array or hash
<Servidorv>
here you will see the way it is organized, wenever i send that response to mongo it will save it as diferent records
judd7 has quit [Read error: Connection reset by peer]
<tjbiddle>
not sure if i'm going about this the wrong way (first time tester) - but how would i go about testing a method that does multiple things (calls a few other methods, such as creating git branches and updating trac tickets)
<burgestrand>
servidorv: this is different data
fmcgeough has joined #ruby
axl_ has quit [Read error: Connection reset by peer]
<burgestrand>
servidorv: can you show with that that looks like the real data? just small is okay
<Servidorv>
ok
nachooo has quit [Ping timeout: 260 seconds]
seanyo has quit [Ping timeout: 246 seconds]
lxsameer has joined #ruby
<burgestrand>
tjbiddle: in all due respect, methods that do different things should *usually* be broken down into separate methods, that’d be a general answer without seeing the code
kil0byte has joined #ruby
axl_ has joined #ruby
banjara has joined #ruby
<lxsameer>
hi, how can i exclude some files ine gemspec file ?
nachooo has joined #ruby
<Servidorv>
{ "112012" => [ { bla }, { bla } ]}, {"102012" => [ { bla }, { bla }]}
<Servidorv>
that is the way i need it to be like
judd7 has joined #ruby
<Servidorv>
instead of { "112012" => [ { bla }, { bla } ], "102012" => [ { bla }, { bla }]}
<tjbiddle>
that's what i was thinking - but most things are already broken down, it's just this is one that calls certain things in order e.g.: accept(ticket) would post an update to a trac server, and then create a new branch in git for the ticket - Both the update and branching are different methods, but this is a method that calls both to accomplish something else.
<lectrick>
What is the fastest way to combine 2 arrays not testing for uniqueness? += results in GC since it has to reallocate the new value, no?
<Servidorv>
so in fack what i need is to separate 102012 anb 112012 into 2 separate hashes
<csmrfx>
ri Hash
<csmrfx>
for example, ri Hash.delete
JonnieCache has joined #ruby
fantazo has quit [Remote host closed the connection]
swarley| has joined #ruby
nachooo_ has joined #ruby
nachooo has quit [Ping timeout: 246 seconds]
nachooo_ is now known as nachooo
swarley has quit [Ping timeout: 252 seconds]
elaptics`away is now known as elaptics
<burgestrand>
lectrick: array.concat(other_array) modifies the original array.
<burgestrand>
lectrick: and ruby GCs a little bit every now and then, but I assume what you wanted was to not create an entirely new array.
<burgestrand>
tjbiddle: well, it sounds like placing an expectation on certain methdods to be called might be something for you.
thinkdevcode has quit [Remote host closed the connection]
<lectrick>
so the solution looks like : .each through the 2nd array doing a first_array << element
JonnieCache has quit [Read error: Operation timed out]
swarley has joined #ruby
<tjbiddle>
burgestrand: awesome - thanks! i just pulled over a friend and she just finished explaining the same thing a second ago, but having that page open is a perfect reference.
ilyam has quit [Remote host closed the connection]
clj_newb has quit [Ping timeout: 246 seconds]
ilyam has joined #ruby
caleb_io has joined #ruby
judd7 has quit [Ping timeout: 255 seconds]
tar_ has quit [Quit: tar_]
swarley| has quit [Ping timeout: 246 seconds]
swarley_ has joined #ruby
tvw has quit [Remote host closed the connection]
tvw has joined #ruby
csmrfx has quit [Quit: leaving]
scx has quit [Ping timeout: 248 seconds]
mityaz has quit [Read error: Connection reset by peer]
Servidorv has quit [Quit: For Sale: Parachute. Only used once, never opened, small stain.]
judd7 has quit [Read error: Connection reset by peer]
<lectrick>
Would people hate me if I did the latter instead of the former? A) a=[1,2,3]; b=[4,5,6]; b.each{|e| a << e} ; a vs. B) a=[1,2,3]; b=[4,5,6]; b.each(&a.method(:<<)); a
judd7 has joined #ruby
<burgestrand>
#concat was different.
<burgestrand>
Updated it, still about twice as fast.
lxsameer has quit [Read error: Connection reset by peer]
senny has quit [Remote host closed the connection]
<lectrick>
apeiros_: Why is concat not a bang method? It should be ary.concat!(ary2)
<apeiros_>
lectrick: yes, and push! and shift! etc.
geekbri has joined #ruby
cdehaan has joined #ruby
twinturbo has joined #ruby
<lectrick>
well... they should at least have aliases, for clarity
<apeiros_>
lectrick: bang means "be careful" (as stated by matz)
<cdehaan>
Hello! I have a simple but silly problem. I'm trying to install bundler, and I run gem install bundler and it says "1 gem installed," but then typing "bundle" does nothing.
judd7 has joined #ruby
<apeiros_>
it does NOT mean "all bang methods are in-situ and all non-bangs are not"
<davidcelis>
cdehaan: rbenv?
<lectrick>
but... i like when semantics line up with side effects...
<apeiros_>
that said, I'd very much like it if ruby had a convention like: a.push(x) # in-situ, a.pushed(x) # returns new object
<lectrick>
then again, that would mean << would need a bang too, which is ridiculous admittedly. sigh
<apeiros_>
same like: a.upcase vs. a.upcased
<cdehaan>
davidcelis: Hm, hadn't checked that, I figured it would take care of itself.
<lectrick>
a <<! element
<apeiros_>
probably even valid ruby
<apeiros_>
but parsed as a.<<(!(element))
<lectrick>
apeiros_: i like your pushed/upcased idea
judd7 has quit [Read error: Connection reset by peer]
<lectrick>
sort of past tense meets side effects
arturaz has quit [Remote host closed the connection]
<lectrick>
it looks like i can't define a <<! method, sigh
timonv has quit [Remote host closed the connection]
<Hanmac>
lecktrick methods are only with an ! when there is an non-! method with the same name too ...
<lectrick>
well... there is a << method
nanderoo has quit [Excess Flood]
<Hanmac>
yeah but an non-bang << method does not make sense
<lectrick>
[1,2,3].<<(4) #=> [1, 2, 3, 4]
mmornati_ has quit [Quit: Leaving]
tenmilestereo has quit [Quit: Leaving]
<lectrick>
i know. i was investigating the possibility (at least in my head) of implementing a ruby api subset that allowed all methods that modify their receiver to be called in a bang form
judd7 has joined #ruby
nopolitica has quit [Ping timeout: 264 seconds]
<lectrick>
for clarity. since side effects => bugs
evilsushi has joined #ruby
evilsushi has quit [Changing host]
evilsushi has joined #ruby
<Hanmac>
about method names ... they can end with ? and with ! but not with ?! or !?
<davidcelis>
you defined the argument as splatted already
jaygen has quit [Remote host closed the connection]
Morkel has quit [Quit: Morkel]
<shevy>
why two *args ?
<djbpython>
davidcelis, see the other gist
ABK has quit [Read error: Connection reset by peer]
<shevy>
confusion is the ultimate cause of all complexity
<djbpython>
i needed to splat *two_params
ABK has joined #ruby
headius has quit [Quit: headius]
jenrzzz has quit [Ping timeout: 255 seconds]
skcin7 has quit []
<djbpython>
basically i have listeners and data producers, data producers always produce at least a date range, they'll be routed to appropriate listeners
mikepack has quit [Remote host closed the connection]
ABK has quit [Read error: Connection reset by peer]
<djbpython>
but the sender needs to work with both
ABK has joined #ruby
cdehaan has joined #ruby
<djbpython>
but, im a ruby noob, and sort of painted myself into a corner here
maletor has joined #ruby
<davidcelis>
this seems overly complex
<davidcelis>
and overengineered
<cdehaan>
Hello! I'm trying to install using "bundle" and I'm getting an error while installing cld: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
blacktulip has quit [Remote host closed the connection]
<cdehaan>
I am not sure where to go from there...
<davidcelis>
read the full error?
<djbpython>
davidcelis, fair enough
awaage has joined #ruby
<cdehaan>
davidcelis: Was that for me? next thing is: extconf.rb:1:in `require': no such file to load -- rake (LoadError)
Russell^^ has quit [Quit: Russell^^]
vickaita has quit [Ping timeout: 276 seconds]
BSaboia__ has quit [Read error: Connection reset by peer]
<cdehaan>
Ah, well, rake wasn't installed, so suddenly it all makes sense.
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
nemesit has quit [Quit: Leaving...]
qwerxy has quit [Quit: offski]
philcrissman has quit [Ping timeout: 252 seconds]
jrajav has quit []
dnstbr has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
Tref has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
csaunders has quit [Quit: Computer has gone to sleep.]
cdehaan has left #ruby [#ruby]
csaunders has joined #ruby
sebastorama has joined #ruby
Cultofmetatron has joined #ruby
csaunders has quit [Client Quit]
savage- has joined #ruby
ryanlecompte has quit [Read error: Connection reset by peer]
gabrielrotbart has joined #ruby
Tombar_ has quit [Remote host closed the connection]
alanp_ has joined #ruby
nitti___ has quit [Remote host closed the connection]
alanp has quit [Read error: Connection reset by peer]
GoGoGarrett has quit [Remote host closed the connection]
osvico has joined #ruby
<davidcelis>
:P
carlyle has quit [Remote host closed the connection]
stopbit has quit [Quit: Leaving]
Tombar has joined #ruby
Virunga has quit []
ZubKonst_ has quit [Ping timeout: 255 seconds]
minijupe has joined #ruby
iaj_ has joined #ruby
mikepack has joined #ruby
iaj has quit [Read error: Connection reset by peer]
ZubKonst has joined #ruby
awestroke has joined #ruby
jaygen has joined #ruby
djbpython has quit [Ping timeout: 246 seconds]
nkts has joined #ruby
codespectator has joined #ruby
kaneda__ has quit [Ping timeout: 256 seconds]
SuperrMann has joined #ruby
seanyo has joined #ruby
rakl has quit [Quit: sleeping]
mikepack has quit [Remote host closed the connection]
osvico has quit [Ping timeout: 240 seconds]
mrkris has joined #ruby
Araxia has quit [Read error: No route to host]
twinturbo has quit [Quit: twinturbo]
Araxia has joined #ruby
Serial_Killer_C has quit [Remote host closed the connection]
thinkdevcode has joined #ruby
mvangala has joined #ruby
mikepack has joined #ruby
Tombar has quit [Remote host closed the connection]
bitZero__ has quit [Read error: Operation timed out]
Tref has quit [Quit: Tref]
awarner has quit [Remote host closed the connection]