sent-hil has quit [Remote host closed the connection]
Carnage\ has joined #ruby-lang
kain has joined #ruby-lang
<zenspider>
what's code completion? never heard of it.
<andrewvos>
C-n C-p
<andrewvos>
I think stardiviner means Intellisense?
havenn has quit [Remote host closed the connection]
<zenspider>
what's intellisense? never heard of it.
<stardiviner>
andrewvos: yes, vim omni is not intellisense
<zenspider>
also, nonsensical
<andrewvos>
zenspider: It's in Visual Studio.
seoaqua has joined #ruby-lang
<andrewvos>
zenspider: If a variable is of a certain type, when you type the variable name and press . Visual Studio will list the methods/properties you can call.
<stardiviner>
andrewvos: like REPL, and like in bpython or ipython. maybe they implement way is different
<zenspider>
andrewvos: what's a type?
<zenspider>
everything is an object
undersc0re97 has joined #ruby-lang
undersc0re97 has quit [Changing host]
undersc0re97 has joined #ruby-lang
<zenspider>
I have code completion at 5PM every day
<erikh>
heh
<erikh>
stardiviner: if you want intellisense like completion, look at rubymine
headius has joined #ruby-lang
<zenspider>
and realize that it is pretty much useless with a fully dynamic language like ruby.
<erikh>
but be forewarned that a lot of... yep, was getting to that
<stardiviner>
erikh: thanks
<zenspider>
hee
<erikh>
well, C# gets close in spots.
<erikh>
it has some pretty nifty ways to do dynamic stuff in a static system
kain has quit [Ping timeout: 260 seconds]
<erikh>
rubymine's probably your best bet, though, if that's what really concerns you
<erikh>
vim has pretty good completion if you have your ducks in a row, I even get rdoc when I mouse over certain calls
<erikh>
and with supertab.vim, it works on the tab key like intellisense does
<erikh>
but getting vim completion to deal with a multi-ruby environment like rvm/rbenv/rbfu is probably not feasible
m3nd3s has quit [Ping timeout: 245 seconds]
postmodern has joined #ruby-lang
<stardiviner>
erikh: supertab.vim ? ok
Carnage\ has quit []
<erikh>
yeah, it's on the vim scripts site.
<erikh>
note that supertab will try to complete anything.. it's not ruby specific.
agarie has quit [Remote host closed the connection]
datanoise has quit [Ping timeout: 246 seconds]
ricardovaleriano has quit [Remote host closed the connection]
rking has joined #ruby-lang
nariyal has quit [Ping timeout: 246 seconds]
tRAS has quit [Quit: Mother, did it need to be so high?]
<rhizmoe>
hm, not sure of the use of that :)
areil has joined #ruby-lang
outoftime has quit [Ping timeout: 248 seconds]
<erikh>
deprecated 3.0.1 released
sush24 has joined #ruby-lang
datanoise has joined #ruby-lang
rikkus has quit [Ping timeout: 246 seconds]
rikkus has joined #ruby-lang
CrazyHorse18 has joined #ruby-lang
tRAS has joined #ruby-lang
spo12 has joined #ruby-lang
CrazyHorse181 has joined #ruby-lang
CrazyHorse18 has quit [Ping timeout: 255 seconds]
rking has quit [Remote host closed the connection]
rking has joined #ruby-lang
datanoise has quit [Ping timeout: 245 seconds]
chendo__ has quit [Ping timeout: 255 seconds]
chendo_ has quit [Ping timeout: 255 seconds]
pygmael has quit [Read error: Connection reset by peer]
pygmael has joined #ruby-lang
dous has joined #ruby-lang
dous has joined #ruby-lang
chendo_ has joined #ruby-lang
chendo__ has joined #ruby-lang
dous_ has joined #ruby-lang
dous_ has joined #ruby-lang
dous_ has quit [Changing host]
icooba has quit [Ping timeout: 260 seconds]
agarie has joined #ruby-lang
a3li has quit [Ping timeout: 255 seconds]
a3li has joined #ruby-lang
icooba has joined #ruby-lang
dous has quit [Ping timeout: 244 seconds]
sush24 has quit [Ping timeout: 246 seconds]
nariyal has joined #ruby-lang
dc5ala has joined #ruby-lang
ryanf has joined #ruby-lang
sush24 has joined #ruby-lang
stepnem has joined #ruby-lang
cndiv has quit []
sush24 has quit [Read error: Connection reset by peer]
sush24 has joined #ruby-lang
diegoviola has quit [Ping timeout: 246 seconds]
anannie has joined #ruby-lang
ttilley has quit [Quit: ttilley]
CrazyHorse181 has quit [Quit: Leaving.]
tenderlove has quit [Remote host closed the connection]
sush24 has quit [Quit: This computer has gone to sleep]
justinmcp has joined #ruby-lang
justinmcp has quit [Remote host closed the connection]
chendo__ has quit [Changing host]
chendo__ has joined #ruby-lang
nariyal has quit [Ping timeout: 256 seconds]
havenn has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
solars has quit [Ping timeout: 240 seconds]
tenderlove has quit [Ping timeout: 245 seconds]
gmg85 has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 240 seconds]
anannie has quit [Remote host closed the connection]
gllmpn has quit [Remote host closed the connection]
seoaqua has joined #ruby-lang
gllmpn has joined #ruby-lang
gllmpn has quit [Remote host closed the connection]
Axsuul has quit [Remote host closed the connection]
<zenspider>
rhizmoe: when you do ary.find do |x| ... end -- the 'do ... end' is the block. yield executes the block and passes in whatever args it has... in this case, it'd go into x
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
<zenspider>
in the case of Array.find, it'd look something like: def find; self.each do |o| return o if yield o; end
<zenspider>
which in turn shows another block that is also yielding...tho is that case, from C
<zenspider>
upgrading server... bbl
tenderlove has joined #ruby-lang
zenspider has quit [Quit: Terminated with extreme prejudice - dircproxy 1.1.0]
tenderlove has quit [Ping timeout: 260 seconds]
tonni_ has quit [Remote host closed the connection]
sepp2k has joined #ruby-lang
chendo__ has quit [Ping timeout: 255 seconds]
dmwuw has quit [Remote host closed the connection]
chendo__ has joined #ruby-lang
postmodern has quit [Ping timeout: 245 seconds]
anannie has joined #ruby-lang
<seoaqua>
i've solved a rare problem when many users share the same linux pc and need to install gems into a shared path. just delete the "user_install" option in /etc/gemrc
postmodern has joined #ruby-lang
soonerguy9782 has joined #ruby-lang
soonerguy9782 has quit [Remote host closed the connection]
rcassidy has quit [Ping timeout: 245 seconds]
sush24 has joined #ruby-lang
CrazyHorse18 has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
CrazyHorse181 has joined #ruby-lang
CrazyHorse18 has quit [Ping timeout: 260 seconds]
<manveru>
or use --no-user-install :)
sush24 has quit [Read error: Connection reset by peer]
<yxhuvud>
well, that would have to be used every time a gem is installed while gemrc can fix it once and for all.
tenderlove has joined #ruby-lang
tenderlove has quit [Ping timeout: 256 seconds]
stiang has quit [Quit: stiang]
sent-hil has joined #ruby-lang
stiang has joined #ruby-lang
<gmg85>
Is the intended use for ruby modules the grouping of classes?
<gmg85>
like namespaces in php/cpp
<gmg85>
or packages in java?
<heftig>
that's one of their uses
<heftig>
(both modules and classes act as namespaces)
<heftig>
the other one is mixins
<gmg85>
how would a class act as a namespace?If it contained other classes in it?
<heftig>
yes, or modules.
<heftig>
well, constants, to be exact
<heftig>
class A; B = 3; end
<heftig>
A::B
<gmg85>
a mixin is when you use a module in a class?
solars has joined #ruby-lang
goshakkk has joined #ruby-lang
postmodern has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby-lang
ryanf has quit [Ping timeout: 260 seconds]
Carnage\ has joined #ruby-lang
gmg85 has quit [Ping timeout: 245 seconds]
seoaqua has quit [Ping timeout: 248 seconds]
benanne has joined #ruby-lang
nariyal has joined #ruby-lang
msch has joined #ruby-lang
postmodern has joined #ruby-lang
stiang has quit [Quit: stiang]
tRAS has quit [Quit: Mother, did it need to be so high?]
cantonic_ has joined #ruby-lang
zenspider has joined #ruby-lang
cantonic has quit [Ping timeout: 245 seconds]
cantonic_ is now known as cantonic
<zenspider>
rawr
SkyEye has joined #ruby-lang
SkyEye has joined #ruby-lang
stiang has joined #ruby-lang
gaveen has quit [Ping timeout: 260 seconds]
Axsuul has joined #ruby-lang
tenderlove has joined #ruby-lang
Madis_ has joined #ruby-lang
yaroslav has joined #ruby-lang
tenderlove has quit [Ping timeout: 248 seconds]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
adambeynon has joined #ruby-lang
bastilian has joined #ruby-lang
CrazyHorse181 has quit [Quit: Leaving.]
A124 has joined #ruby-lang
nariyal has quit [Ping timeout: 252 seconds]
VegetableSpoon has joined #ruby-lang
nariyal has joined #ruby-lang
agarie has quit [Remote host closed the connection]
stiang has quit [Quit: stiang]
tbuehlmann has joined #ruby-lang
sent-hil has quit [Remote host closed the connection]
ryanf has joined #ruby-lang
adambeynon has quit [Quit: Computer has gone to sleep.]
dous_ has quit [Remote host closed the connection]
CrazyHorse18 has joined #ruby-lang
CrazyHorse181 has joined #ruby-lang
CrazyHorse18 has quit [Ping timeout: 255 seconds]
adambeynon has joined #ruby-lang
hackeron has quit [Remote host closed the connection]
bastilian has quit [Quit: Leaving...]
bastilian has joined #ruby-lang
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
areil has quit [Remote host closed the connection]
<Harzilein>
hmm
SkyEye is now known as gaveen
<Harzilein>
is there a nice rubyish way to repeatedly accumulate elements of an enumerable based on their contents, then start over? say, aggregating continued lines to lines (of course this is just an example)
workmad3 has quit [Read error: Operation timed out]
CrazyHorse181 has left #ruby-lang [#ruby-lang]
CrazyHorse18 has joined #ruby-lang
<CrazyHorse18>
hey
<CrazyHorse18>
example?
adambeynon has quit [Quit: Computer has gone to sleep.]
<Harzilein>
CrazyHorse18: that would be horrible memory-intensive i think
<Harzilein>
i'll write some boring code that shows the concept i'm after, wait
<CrazyHorse18>
Harzilein: memory intensive my arse :)
<CrazyHorse18>
haha
<CrazyHorse18>
unless your doing million of lines
<CrazyHorse18>
it should be fine
<milestone>
hi all, i am having problems parsing and mangling an xml file. https://gist.github.com/3803794 is my script, and instead of copying each child_element from the <profile name="full-ha"> he moves it to my new Element ...
<milestone>
i am a ruby newbie
ianblenke2 has joined #ruby-lang
Jork1 has joined #ruby-lang
tenderlove has joined #ruby-lang
ianblenke1 has quit [Ping timeout: 255 seconds]
rolfb has joined #ruby-lang
tenderlove has quit [Ping timeout: 260 seconds]
sush24 has joined #ruby-lang
<Harzilein>
CrazyHorse18, heftig: i think i want each_with_object
<Harzilein>
hmm
<Harzilein>
oh, wait, that returns the memo
<Harzilein>
*sigh*
tbuehlmann has quit [Remote host closed the connection]
nyuszika7h has joined #ruby-lang
sush24 has quit [Client Quit]
sush24 has joined #ruby-lang
tbuehlmann has joined #ruby-lang
sush24 has quit [Client Quit]
sush24 has joined #ruby-lang
<heftig>
Harzilein: still didn't post that sample :p
sush24 has quit [Client Quit]
<Harzilein>
heftig: i'm still writing it, it is slightly more complicated than continued lines
<Harzilein>
how do i modify the last element of an array?
benanne has quit [Quit: kbai]
benanne has joined #ruby-lang
<heftig>
a[-1] = 4
<heftig>
Harzilein: maybe just give us a testcase
<heftig>
i.e. what you put in and what should come out
gmci has joined #ruby-lang
lcdhoffman has joined #ruby-lang
lcdhoffman has quit [Client Quit]
<Harzilein>
heftig: this is what i'm doing now. i guess each_with_object is not all that bad here: http://paste.debian.net/194261
nyuszika7h has left #ruby-lang ["leaving"]
yaroslav has quit [Quit: yaroslav]
runeb has joined #ruby-lang
<heftig>
um
<heftig>
lots of garbage in that hash
runeb has quit [Remote host closed the connection]
<heftig>
Harzilein: that code doesn't work well at all here
runeb has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
<Harzilein>
oh, i forgot to print it at the end, i was using it with irb -r ./rfc5759.rb
<Harzilein>
heftig: that's not what it's about here
<Harzilein>
again, i was wondering if something already exists where i can just plug in a function that does the accumulation and a function that decides if accumulation continues. maybe also something that supports special handling of the last line
<heftig>
hm
m3nd3s has joined #ruby-lang
xyzodiac has joined #ruby-lang
tbuehlmann has quit [Remote host closed the connection]
gaveen has quit [Remote host closed the connection]
<heftig>
you can still compress it into a oneliner
tenderlove has quit [Ping timeout: 260 seconds]
<heftig>
slice_before slices the lines into chunks for each command, each line is converted into a field array, then the lines belonging to each field are joined
tRAS has quit [Quit: Mother, did it need to be so high?]
lcdhoffman has quit [Quit: lcdhoffman]
cmaxw_ has joined #ruby-lang
bastilian has quit [Read error: Connection reset by peer]
bastilian has joined #ruby-lang
bastilian has quit [Client Quit]
datanoise has joined #ruby-lang
cmaxw has quit [Ping timeout: 265 seconds]
cmaxw_ has quit [Ping timeout: 256 seconds]
tRAS has joined #ruby-lang
outoftime has joined #ruby-lang
cirenyc has quit [Ping timeout: 246 seconds]
outoftime has quit [Remote host closed the connection]
datanoise has quit [Ping timeout: 256 seconds]
brianpWins has joined #ruby-lang
workmad3 has joined #ruby-lang
BMF has quit [Remote host closed the connection]
cmaxw has joined #ruby-lang
lcdhoffman has joined #ruby-lang
sepp2k1 has quit [Remote host closed the connection]
stiang has quit [Quit: stiang]
rue|w has joined #ruby-lang
crudson has left #ruby-lang [#ruby-lang]
datanoise has joined #ruby-lang
tenderlove has joined #ruby-lang
rue|w has quit [Remote host closed the connection]
datanoise has quit [Ping timeout: 246 seconds]
YayMe has quit [Ping timeout: 246 seconds]
Carnage\ has quit []
xyzodiac has quit [Quit: Computer has gone to sleep.]
tRAS has quit [Quit: Mother, did it need to be so high?]
crackity_jones has quit [Quit: Computer has gone to sleep.]
havenn has quit [Remote host closed the connection]
gmg85 has joined #ruby-lang
xyzodiac has joined #ruby-lang
<gmg85>
was there a change to the case statement syntax from ruby 1.8.x to ruby 1.9.x?
<workmad3>
not afaik
<ddfreyne>
I think the : after the when (and the then in if statements) is no longer accepted
canton7 has quit [Ping timeout: 244 seconds]
<workmad3>
ddfreyne: the 'then' is still fine
<gmg85>
ddfreyne: let me try that
<workmad3>
I never used : in case statements in ruby though, but yes it seems that is a change :)
<gmg85>
it works!
<gmg85>
i removed the when
<gmg85>
i removed the : i mean :)
<workmad3>
:)
Hakon has joined #ruby-lang
gmg85 has quit [Ping timeout: 252 seconds]
havenn has joined #ruby-lang
diegoviola has quit [Quit: Reconnecting]
diegoviola has joined #ruby-lang
ryanf has joined #ruby-lang
mastersrp has joined #ruby-lang
<mastersrp>
Hello! I've got a question that might seem silly. Say I have a variable "var", whose value is the name of a module. In that module resides a function (let's call it main, just for simplicity). I want to call that function, but I can't predict the module name. How would I do this?
brianpWins has quit [Ping timeout: 245 seconds]
undersc0re97 has joined #ruby-lang
undersc0re97 has quit [Changing host]
undersc0re97 has joined #ruby-lang
Swimming_Bird has joined #ruby-lang
ryanf_ has joined #ruby-lang
jtoy has joined #ruby-lang
jtoy has quit [Client Quit]
VegetableSpoon has quit [Ping timeout: 248 seconds]
Jork1 has quit [Quit: Jork1]
m3nd3s has quit [Remote host closed the connection]
tbuehlmann has quit [Remote host closed the connection]
<havenn>
mastersrp: If you have a local variable referencing the module, call the method directly on the local variable.
<havenn>
mastersrp: If that is what you mean by "can't predict the module name"?
lcdhoffman has quit [Quit: lcdhoffman]
rue|w has joined #ruby-lang
havenn has quit [Remote host closed the connection]
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
rue|w has quit [Ping timeout: 245 seconds]
RegEchse has quit [Quit: <3 WeeChat (v0.3.9-rc2)]
<mastersrp>
Hello! I've got a question that might seem silly. Say I have a variable "var", whose value is the name of a module. In that module resides a function (let's call it main, just for simplicity). I want to call that function, but I can't predict the module name. How would I do this? The variable does NOT reference the module, only it's name in the form of a string.
<mastersrp>
The module resides in an external file, which is then required.
goshakkk has quit [Quit: Computer has gone to sleep.]
mistym has quit [Remote host closed the connection]
havenn has joined #ruby-lang
Hakon has quit [Quit: Leaving...]
thone_ has joined #ruby-lang
kain has quit [Ping timeout: 260 seconds]
thone has quit [Ping timeout: 240 seconds]
RegEchse has joined #ruby-lang
justinseiter has quit [Ping timeout: 240 seconds]
<andrewvos>
mastersrp: Did you by any chance lose connection for a bit?
cmaxw has quit [Quit: cmaxw]
snorkdude has joined #ruby-lang
justinseiter has joined #ruby-lang
datanoise has joined #ruby-lang
kain has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
datanoise has quit [Ping timeout: 248 seconds]
chimkan_ has quit [Quit: chimkan_]
<rue>
mastersrp: Use a policy or convention.
datanoise has joined #ruby-lang
kain has quit [Ping timeout: 256 seconds]
jamjam has quit [Ping timeout: 245 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
RegEchse has quit [Quit: <3 WeeChat (v0.3.9-rc2)]
datanoise has quit [Ping timeout: 246 seconds]
macmartine has joined #ruby-lang
agarie has joined #ruby-lang
Criztian has joined #ruby-lang
ananna has quit [Remote host closed the connection]
milestone has quit [Quit: milestone]
Jork1 has joined #ruby-lang
solars has quit [Ping timeout: 255 seconds]
<Harzilein>
heftig: thanks for that one too
<matti>
;]
slicekick has joined #ruby-lang
kain has joined #ruby-lang
<zzak>
hi matti
snorkdude has quit [Ping timeout: 246 seconds]
<matti>
Hi zzak
<matti>
zzak: Guess long this will take:
<matti>
krzysztof@samsung:~$ time ruby -rrubygems -e 'require "fizzbuzz" ; p FB.new(1, 1_000_000_000_000).each {|i| p [i, i.class] }' > fizzbuzz.log
<matti>
;d
cantonic has quit [Quit: cantonic]
<matti>
Whops.
<matti>
I may run out of space on HDD before this will finish.
<matti>
krzysztof@samsung:~$ wc -l fizzbuzz.log
<matti>
15873942 fizzbuzz.log
cantonic has joined #ruby-lang
ryanf_ has quit [Quit: leaving]
kain has quit [Ping timeout: 246 seconds]
slicekick has quit [Remote host closed the connection]
snorkdude has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
justinseiter has quit [Ping timeout: 255 seconds]
<zzak>
nice
macmartine has quit [Quit: Computer has gone to sleep.]
havenn has quit [Remote host closed the connection]
ricardovaleriano has joined #ruby-lang
mixtli has quit [Quit: mixtli]
RegEchse has joined #ruby-lang
havenn has joined #ruby-lang
cantonic has quit [Quit: cantonic]
kain has joined #ruby-lang
mistym has quit [Ping timeout: 260 seconds]
kain has quit [Ping timeout: 255 seconds]
ivanoats has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
Madis_ has quit [Quit: ChatZilla 0.9.89 [Firefox 11.0/20120313180949]]