pavilionXP has quit [Read error: Connection reset by peer]
fryguy has joined #ruby
Vivekananda has joined #ruby
Vivekananda has quit [Remote host closed the connection]
emmanuelux has joined #ruby
huoxito has joined #ruby
sambio has quit []
timmow has quit [Remote host closed the connection]
banister`sleep has quit [Remote host closed the connection]
tjohnson has joined #ruby
eka has joined #ruby
banister`sleep has joined #ruby
Vivekananda has joined #ruby
emmanuelux has quit [Max SendQ exceeded]
banjara has joined #ruby
emmanuelux has joined #ruby
chrisnicola has quit [Read error: No route to host]
centipedefarmer has joined #ruby
bonty_ssh has joined #ruby
etcetera has quit []
emmanuelux has quit [Max SendQ exceeded]
marr has quit [Ping timeout: 248 seconds]
emmanuelux has joined #ruby
piotr has quit [Ping timeout: 252 seconds]
Vivekananda has quit [Remote host closed the connection]
crazymykl has quit [Quit: Konversation terminated!]
brennanMKE has quit [Remote host closed the connection]
crazymykl has joined #ruby
ZachBeta has joined #ruby
emmanuelux has quit [Max SendQ exceeded]
Pochacco has joined #ruby
huoxito has quit [Ping timeout: 264 seconds]
emmanuelux has joined #ruby
pskosinski has quit [Ping timeout: 260 seconds]
Davey has joined #ruby
huoxito has joined #ruby
`p has joined #ruby
yshh has quit [Remote host closed the connection]
Skylab has joined #ruby
bonty_ss_ has joined #ruby
bonty_ssh has quit [Read error: Connection reset by peer]
pskosinski has joined #ruby
etcetera has joined #ruby
rburton- has joined #ruby
julian-delphiki has joined #ruby
d2dchat has joined #ruby
emmanuelux has quit [Max SendQ exceeded]
Vivekananda has joined #ruby
hemanth_ has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
emmanuelux has joined #ruby
banjara has quit [Ping timeout: 245 seconds]
slainer68 has quit [Remote host closed the connection]
bean has quit [Ping timeout: 255 seconds]
i_s has quit [Quit: i_s]
rburton- has quit [Client Quit]
banjara has joined #ruby
bean has joined #ruby
Neandre has quit [Ping timeout: 256 seconds]
mengu has quit [Quit: Leaving]
emmanuelux has quit [Max SendQ exceeded]
idkazuma has quit [Remote host closed the connection]
Yakko has joined #ruby
danslo has joined #ruby
banjara has quit [Client Quit]
banjara has joined #ruby
thernull has quit [Remote host closed the connection]
julian-delphiki has quit [Ping timeout: 276 seconds]
bonty_ss_ has quit [Read error: Connection reset by peer]
bonty_ssh has joined #ruby
timmow has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
callmeivan has quit [Ping timeout: 264 seconds]
kofno has quit [Remote host closed the connection]
Vivekananda has quit [Read error: Connection reset by peer]
injekt has quit [Read error: Operation timed out]
jonathanwallace has joined #ruby
davidcelis has quit [Ping timeout: 245 seconds]
DonRichie has quit [Ping timeout: 264 seconds]
erichmenge has quit [Ping timeout: 256 seconds]
nkts has quit [Read error: Connection reset by peer]
xybre has quit [Ping timeout: 264 seconds]
DonRichie has joined #ruby
injekt has joined #ruby
erichmenge has joined #ruby
davidcelis has joined #ruby
kenneth has quit [Quit: kenneth]
banjara has left #ruby [#ruby]
nkts has joined #ruby
callmeivan has joined #ruby
ddd has quit [Read error: Connection reset by peer]
timmow has quit [Ping timeout: 252 seconds]
jarin has joined #ruby
Vivekananda has joined #ruby
hogeo has joined #ruby
tommyvyo has joined #ruby
ner0x has quit [Quit: Leaving]
nomenkun has joined #ruby
senayar has quit [Quit: Quitte]
hogeo has quit [Remote host closed the connection]
bonty_ssh has quit [Read error: Connection reset by peer]
bonty_ssh has joined #ruby
malte_ has joined #ruby
rcosta has quit [Remote host closed the connection]
sambio has joined #ruby
nomenkun has quit [Ping timeout: 264 seconds]
nari has joined #ruby
tew88 has quit [Ping timeout: 245 seconds]
centipedefarmer has quit [Remote host closed the connection]
tish has joined #ruby
zph has quit [Quit: Computer has gone to sleep.]
moos3 has joined #ruby
zph has joined #ruby
tootubular has joined #ruby
wkmanire has joined #ruby
Hanmac has joined #ruby
ddd has joined #ruby
<wkmanire>
I just got done watching Robert Martin's talk from Ruby Midwest 2011. Can anyone refer me to a concrete example of the architecture he presented?
mxweas has quit [Quit: Computer has gone to sleep.]
mxweas has joined #ruby
pskosinski has quit [Quit: pskosinski]
tootooroo has quit [Ping timeout: 276 seconds]
cespare has joined #ruby
alanjc has joined #ruby
piisalie has joined #ruby
Skylab has quit [Quit: Skylab]
alx- has joined #ruby
LennyLinux has quit [Remote host closed the connection]
mneorr has quit [Remote host closed the connection]
<Vivekananda>
hey ther e
<Vivekananda>
anyone here
<Vivekananda>
my ruby install is stuck
tootubular has joined #ruby
tomzx_mac has quit [Quit: return 0;]
Matip has joined #ruby
Domon has joined #ruby
ehaliewicz has joined #ruby
kofno has quit [Remote host closed the connection]
kofno has joined #ruby
Mattix has quit [Ping timeout: 252 seconds]
slainer68 has joined #ruby
dhruvasagar has joined #ruby
hamakn has joined #ruby
Domon has quit [Remote host closed the connection]
dhruvasagar has quit [Client Quit]
dhruvasagar has joined #ruby
subbyyy has joined #ruby
slainer68 has quit [Ping timeout: 256 seconds]
banjara has joined #ruby
banjara has quit [Client Quit]
banjara has joined #ruby
tjohnson has quit [Quit: Lost terminal]
jaimef has joined #ruby
sambio has joined #ruby
timmow has joined #ruby
keyvan has quit [Read error: Operation timed out]
tommyvyo has quit [Quit:]
timmow has quit [Ping timeout: 252 seconds]
eka has quit [Quit: Computer has gone to sleep.]
Domon has joined #ruby
<Skofo>
I'm getting a "cannot load mkmf" error when trying to install a gem I have to build, even though I'm using RVM with a -dev version of Ruby. What do I do?
banjara has quit [Quit: Leaving.]
banjara has joined #ruby
zph has quit [Quit: Computer has gone to sleep.]
<Skofo>
Ah, I was incorrectly using sudo to install the gem.
chessguy has joined #ruby
BSaboia has joined #ruby
dhruvasagar has quit [Read error: Operation timed out]
freakazoid0223 has quit [Read error: Operation timed out]
tvw has quit []
cbot_ has joined #ruby
karpuragauram has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
mxweas has quit [Quit: Computer has gone to sleep.]
DonRichie has quit [Ping timeout: 252 seconds]
banjara has quit [Quit: Leaving.]
dhruvasagar has joined #ruby
banjara has joined #ruby
brum has quit [Remote host closed the connection]
dboy has joined #ruby
sleetdrop has joined #ruby
DonRichie has joined #ruby
nomenkun has joined #ruby
<dboy>
how does one spit a string and the re-order it?
mneorr has joined #ruby
adkron has quit [Ping timeout: 252 seconds]
<fryguy>
dboy: what do you want to reorder it to
nomenkun has quit [Ping timeout: 264 seconds]
callmeivan has quit [Read error: Operation timed out]
jpfuentes2 has joined #ruby
mxweas has joined #ruby
s00pcan has joined #ruby
jnoob22 has quit [Remote host closed the connection]
kofno has quit [Remote host closed the connection]
banjara has quit [Quit: Leaving.]
banjara has joined #ruby
tootubular has quit [Quit: tootubular]
mneorr has quit [Ping timeout: 276 seconds]
<Vivekananda>
fryguy: am trying to write the palindrome thing
soulofpeace has joined #ruby
anonymuse has joined #ruby
anonymuse has quit [Excess Flood]
<Vivekananda>
my idea is to first split the complicated string into words and then reverse the words and match them
banjara has quit [Client Quit]
cbot_ has quit [Ping timeout: 245 seconds]
banjara has joined #ruby
BSaboia has quit [Ping timeout: 248 seconds]
<Vivekananda>
hmm well the best would be letters so tell me . If I have a a long complicated string and I break it down into an array of only words and no symbols then how do I now join theh words to get the sequence of letters
callmeivan has joined #ruby
etcetera has quit []
<Vivekananda>
I installed the rbenv now what do I do ?
<Vivekananda>
for further things ?
huoxito has quit [Quit: Leaving]
kofno has joined #ruby
bwlang has quit [Quit: bwlang]
Davey has quit [Quit: Computer has gone to sleep.]
tootooroo has joined #ruby
<Vivekananda>
anyone here or everyone gone ?
daed has quit [Ping timeout: 264 seconds]
_maes_ has joined #ruby
daed has joined #ruby
wsterling has joined #ruby
oponder has quit [Read error: Connection reset by peer]
<wkmanire>
Vivekananda: I'm sort of here
ner0x has joined #ruby
shevy has quit [Ping timeout: 245 seconds]
<Vivekananda>
wkmanire: lovely to know
oponder has joined #ruby
<Vivekananda>
I want to iterate over elements of a word string
<Vivekananda>
how do I do it ?
davidcelis has quit [Ping timeout: 264 seconds]
Matt has joined #ruby
callmeivan has quit [Ping timeout: 252 seconds]
Matt is now known as Guest59351
jeremywrowe has joined #ruby
jeremywrowe has quit [Changing host]
jeremywrowe has joined #ruby
<Vivekananda>
I have an array of string elements called a. I am trying to do this a.each{|x|.each{|y| emptyString <<y}}
marty_mcfly has quit [Read error: Operation timed out]
<Vivekananda>
does this look sensible ?
davidcelis has joined #ruby
jeremywrowe has quit [Client Quit]
kofno has quit [Remote host closed the connection]
Davey has joined #ruby
nkts has quit [Quit: -]
<fryguy>
Vivekananda: just reverse it and compare the reversed thing to the original
<fryguy>
reverse should be provided by enumerable
<Vivekananda>
okk got it
love_color_text has joined #ruby
<Vivekananda>
I am trying to not iterate so get a lowest complexity sol too
<Vivekananda>
:)
<Vivekananda>
too much I am trying I guess
<Vivekananda>
but I got it
<Vivekananda>
fryguy so my solution is
<Vivekananda>
split complex string into words ( only letters and nothn else ) . NOw use array.join to join all this ina a single word
<Vivekananda>
then compare the reverse
<Vivekananda>
Is this a good solution ?
bttf has quit [Quit: Lost terminal]
<fryguy>
Vivekananda: probably not
<fryguy>
i guess it would work
<fryguy>
you could just gsub the string to get rid of non-alphanumerics
akashj87 has joined #ruby
shevy has joined #ruby
mneorr has joined #ruby
s0ber has quit [Remote host closed the connection]
oponder has quit [Remote host closed the connection]
mxweas has quit [Quit: Computer has gone to sleep.]
freerobby has quit [Quit: Leaving.]
tootooroo has quit [Ping timeout: 245 seconds]
mxweas has joined #ruby
radic_ has quit [Ping timeout: 246 seconds]
s0ber has joined #ruby
mneorr has quit [Ping timeout: 264 seconds]
jonathanwallace has quit [Ping timeout: 245 seconds]
gwillickers has joined #ruby
pitzips has joined #ruby
kofno has joined #ruby
timmow has joined #ruby
ikk- has joined #ruby
<Vivekananda>
fryguy how do I say a == b but case insensitive ?
philcrissman has joined #ruby
<Vivekananda>
okay finally palindrom is worknig!! ;)
tootooroo has joined #ruby
<Vivekananda>
fryguy: I did this and is working normalString = str.split(/[^a-zA-Z]+/i).join("").downcase
kofno_ has joined #ruby
sambio has quit []
timmow has quit [Ping timeout: 252 seconds]
kofno has quit [Ping timeout: 264 seconds]
xybre has joined #ruby
xybre has quit [Changing host]
xybre has joined #ruby
radic has joined #ruby
baroquebobcat has joined #ruby
benzrf has joined #ruby
benzrf has left #ruby [#ruby]
<chessguy>
Vivekananda: why not just a.downcase == b.downcase
mando has joined #ruby
chessguy has quit [Remote host closed the connection]
PixelCrumbs has joined #ruby
vlad_starkov has joined #ruby
zph has joined #ruby
gwillickers has quit [Quit: leaving]
nomenkun has joined #ruby
<Vivekananda>
chessguy the available string is pretty long
<Vivekananda>
oo you are gone
<Vivekananda>
hmm
<Vivekananda>
fryguy: you there still
<Vivekananda>
questions coming up
tew88 has joined #ruby
EzeQL has quit [Quit: EzeQL]
newUser1234 has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
nomenkun has quit [Ping timeout: 245 seconds]
tommyvyo has joined #ruby
<bean>
Vivekananda, i can likely answer
danneu3 has joined #ruby
Rumsteak has quit [Ping timeout: 245 seconds]
PixelCrumbs has quit [Read error: Connection reset by peer]
Rumsteak has joined #ruby
PixelCrumbs has joined #ruby
akashj87 has quit [Quit: Leaving]
<Vivekananda>
bean: sure
<Vivekananda>
arrayOfHash = "Madam, I'm Adam".split(/[^a-zA-Z]+/).each{|x| "x" => 1}
<Vivekananda>
this is incorrect i know
danneu2 has quit [Ping timeout: 252 seconds]
Pochacco has quit [Quit: Pochacco]
<bean>
what are you attempting to accomplish?
<bean>
with that
<bean>
Vivekananda, what are you trying to do with that each
<Vivekananda>
I am trying to get arrayOfHash = [ "Madam"=> 1 , "1" => 1 , .. ]
<bean>
hmm, why though
<Vivekananda>
and then later if Madam occurs twice I want madam => 2 case insensitive
<Matip>
in case someone used Curl (curb gem) before... how are we supposed to send params using GET? I couldn't find any way to use a hash of params...
<bean>
bitcycle, alis is a services bot that can help you find channels. Read "/msg alis help list" for help and ask any questions about it in #freenode. Example usage: /msg alis list #ubuntu* or /msg alis list *http*
<Vivekananda>
nice I like that
<bean>
Vivekananda, you like what i did? heh
<bean>
could be much more compact
<bean>
but i wanted it to be clear what was being done
<Vivekananda>
bean: I will try the compact version slowly
<Matip>
bitcycle, you realize I'm said "jk" (just kidding), right?
<Matip>
err, I said ***
<Vivekananda>
for hashes when do we use [] and when ()
<bean>
Vivekananda, I don't know when you'd ever use (). () is a method call
verysoftoiletppr has quit []
verysoftoiletppr has joined #ruby
<Vivekananda>
ook yep got you
love_color_text has quit [Read error: Connection reset by peer]
krz has joined #ruby
GhettoCode has joined #ruby
wkmanire has quit [Quit: Leaving.]
bitcycle has quit [Ping timeout: 245 seconds]
timmow has joined #ruby
bigmac_ has quit [Quit: Leaving]
krz has quit [Quit: krz]
crackfu has joined #ruby
lol has joined #ruby
lol is now known as Guest7028
newUser1234 has quit [Remote host closed the connection]
<Guest7028>
whats the difference between string methods and defined methods?
<bean>
Guest7028, that question doesn't really make sense
timmow has quit [Ping timeout: 252 seconds]
krz has joined #ruby
<Guest7028>
lol like the course im doing on code acadamy introduce me to methods with stuff like hello.downcase, Curry.upcase (the .method part)
<Guest7028>
now im learning theres you can define your own methods with parameters
crackfu has left #ruby [#ruby]
<Guest7028>
such as def greeting n)
t-mart has quit [Read error: Connection reset by peer]
t-mart has joined #ruby
Nimsical has joined #ruby
<grenierm>
Guest7028, methods are simply a logically defined piece of functionality that has been separated out under a certain name
Dreamer3 has joined #ruby
PixelCrumbs has quit [Read error: Connection reset by peer]
<grenierm>
Guest7028: so you can create your own, of course. but there are also ones that have been defined previously in the core of standard libs
<grenierm>
Guest7028: core or standard libs*
PixelCrumbs has joined #ruby
<Guest7028>
ahh thats what i thought thankyou
arya has quit [Ping timeout: 248 seconds]
<grenierm>
np
IceDragon has quit [Quit: Space~~~]
mercwithamouth has quit [Ping timeout: 264 seconds]
DonRichie has joined #ruby
nomenkun has joined #ruby
verysoftoiletppr has quit []
ikk- has left #ruby [#ruby]
PixelCrumbs has quit [Read error: Connection reset by peer]
<Vivekananda>
bean: reading up an inject detailed tutorial
Sicilians has joined #ruby
PixelCrumbs has joined #ruby
<Sicilians>
Does anyone here have any experience with building a program that includes negotiation-like features?
nomenkun has quit [Ping timeout: 264 seconds]
tobym has joined #ruby
Nisstyre has quit [Ping timeout: 257 seconds]
<bean>
Sicilians, like, ensuring a connection knows from a known good client?
<bean>
or
Beoran__ has joined #ruby
Burgestrand has joined #ruby
chrishough has quit [Quit: chrishough]
<Sicilians>
bean, I mean a multi-user application that sends offers back and forth between the two. Once both agree upon, it transitions into a deal, but keeps a record of all past offers during the whole process.
Beoran_ has quit [Read error: Operation timed out]
jbueza has joined #ruby
<bean>
oh
<bean>
nope
<bean>
can't say i've done that
<Sicilians>
I'm more worried/confused about how exactly it will be recorded in a database than anything. Do I somehow make it create a new row every time an offer is sent, or do I create a separate table for every deal? Neither of those seem efficient.
<wald0>
im reading "ruby in twenty minutes" and i understand everything, except "what is a module" and "what is a method" ? maybe i should already-know the definition of these words ? (only know programming in bash before)
<bean>
Sicilians, you'd want to record a row, for every unique even you want.
tomsthumb has quit [Quit: Leaving.]
<bean>
event
<grenierm>
wald0: in ruby, a module is a collection of logic (usually methods) and you can 'include' them in a class, which brings in all the methods from the module as instance methods for the calling class.
<Sicilians>
So every deal would have 10-20 offer rows attached to it by a foreign_key to the deal_id? Am I following correctly? Would/Could I destroy the rows after it was transitioned into a deal to keep the table lean?
<grenierm>
wald0: that's where the term 'Mixin' comes from
chxane has joined #ruby
<grenierm>
wald0: oh, and methods are essentially functions in C (which i'm sure you're at least familiar with, if you know bash)
<Sicilians>
bean, forgot to mention your name hah
kofno has joined #ruby
gabrielrotbart has joined #ruby
divout has joined #ruby
<bean>
Sicilians, thats all up to you.
danneu3 has quit [Quit: WeeChat 0.3.8]
classix has quit [Ping timeout: 264 seconds]
unstable has joined #ruby
mercwithamouth has joined #ruby
<wald0>
grenierm: thx, btw, is there any "refcard" or similar about the ruby language ? (or glosary, something that list and briefly explains its parts)
doritostains has quit [Quit: Leaving...]
arya has joined #ruby
kofno has quit [Ping timeout: 264 seconds]
gabrielrotbart has quit [Ping timeout: 245 seconds]
<Sicilians>
bean, thanks for the help!
<grenierm>
wald0: there are many in the interwebs but as a newb i recommend http://ruby-doc.org/
<bean>
lol np
arya_ has joined #ruby
wallerdev has quit [Quit: wallerdev]
Asher has quit [Quit: Leaving.]
arya has quit [Ping timeout: 248 seconds]
Asher has joined #ruby
newUser1234 has joined #ruby
gabrielrotbart has joined #ruby
classix has joined #ruby
Burgestrand has quit [Ping timeout: 264 seconds]
newUser1234 has quit [Remote host closed the connection]
wsterling has quit [Remote host closed the connection]
GhettoCode has quit [Quit: Computer has gone to sleep.]
classix has quit [Remote host closed the connection]
sayan has joined #ruby
classix has joined #ruby
ariedler has joined #ruby
pitzips has quit [Quit: Leaving]
wargasm1 has joined #ruby
wargasm has quit [Ping timeout: 248 seconds]
pkrnj has joined #ruby
akhet has joined #ruby
classix has quit [Ping timeout: 248 seconds]
ariedler has quit [Ping timeout: 255 seconds]
classix has joined #ruby
himsin has quit [Ping timeout: 252 seconds]
l0rd_hex has joined #ruby
PixelCrumbs has quit [Remote host closed the connection]
artofraw has joined #ruby
DonRichie has quit [Quit: Verlassend]
vlad_starkov has joined #ruby
dhruvasagar has joined #ruby
<l0rd_hex>
Hi everyone, I'm really new to Ruby but I've been trying to run a simple example using the "ruby-adt" gem -- I have a feeling it was written for an earlier version of Ruby
mando has quit [Remote host closed the connection]
<l0rd_hex>
that's basically what I get in irb
mando has joined #ruby
<unstable>
Is there a long list of gems to install on my system?
<unstable>
I basically want to spend 10 minutes installing stuff right now, and not have to spend 5 minutes 20 times at various points when making/playing with projects.
blahwoop has quit [Remote host closed the connection]
ARCADIVS has joined #ruby
Domon has quit [Remote host closed the connection]
artofraw has quit [Remote host closed the connection]
chendo has quit [Ping timeout: 245 seconds]
mando has quit [Ping timeout: 245 seconds]
Es0teric has joined #ruby
classix has quit [Ping timeout: 264 seconds]
artofraw has joined #ruby
artofraw has quit [Remote host closed the connection]
<ddd>
absolutely positively no way to know that in advance. you start installing rails and you'll end up with TONS of gems if you install all the top used gems (everything from rspec to devise to pry), and if you're just doing plain ruby, there is *still* a crapload of possibilities. there is no singular list. that is something you have to generate for yourself over time
chendo_ has joined #ruby
Guest7028 has quit [Quit: irc2go]
tootooroo has quit [Ping timeout: 245 seconds]
hemanth_ is now known as hemanth
alx- has quit [Quit: alx-]
chendo_ has quit [Ping timeout: 240 seconds]
xormancer has joined #ruby
ner0x has quit [Quit: Leaving]
chendo_ has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
melnik has joined #ruby
nomenkun has joined #ruby
Arzaga has joined #ruby
tonini has joined #ruby
classix has joined #ruby
tommyvyo has quit [Quit:]
nomenkun has quit [Ping timeout: 264 seconds]
angusiguess has quit [Ping timeout: 260 seconds]
pyacks has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Remote host closed the connection]
codecop has joined #ruby
<Vivekananda>
hey
Skofo has quit [Ping timeout: 252 seconds]
<Vivekananda>
anyone here
<Vivekananda>
I have a hash but how do I display it like {'a' => 3, 'man' => 1, 'canal' => 1, 'panama' => 1, 'plan' => 1}
tootooroo has joined #ruby
tootooroo is now known as Guest54789
Guest54789 has quit [Client Quit]
tootooroo has joined #ruby
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
bricker`1A has joined #ruby
Villadelfia has quit [Ping timeout: 264 seconds]
SeySayux has quit [Ping timeout: 256 seconds]
Beoran__ has quit [Ping timeout: 245 seconds]
d2dchat has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 248 seconds]
Kruppe has quit [Remote host closed the connection]
girija has joined #ruby
backjlack has joined #ruby
bricker`LA has quit [Ping timeout: 260 seconds]
sayan has quit [Read error: Connection reset by peer]
kofno has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
kofno has quit [Ping timeout: 240 seconds]
blahwoop has joined #ruby
ph^ has quit [Remote host closed the connection]
timonv has joined #ruby
ph^ has joined #ruby
rippa has joined #ruby
<wald0>
ruby can be compiled ? what is the advantage ?
rismoney has quit [Read error: Connection reset by peer]
Guest is now known as calmyournerves
Burgestrand has quit [Quit: Burgestrand]
bluOxigen has joined #ruby
<Vivekananda>
tobiasvl: nope the thing is I have a huge array and it has letters. I have to check if each value of the array is a value common to a given set of strings
timonv has quit [Remote host closed the connection]
thernull has joined #ruby
<Vivekananda>
ie each value in array is one of the three given letters
ryanf has left #ruby [#ruby]
mxweas has quit [Quit: Computer has gone to sleep.]
<Vivekananda>
I am trying this but is incorrect --arrayA.each do
io_syl has quit [Quit: Computer has gone to sleep.]
swex_ has joined #ruby
lupinstien has quit [Remote host closed the connection]
swex has quit [Ping timeout: 264 seconds]
Elhu has joined #ruby
banjara has quit [Quit: Leaving.]
quazimodo has joined #ruby
kofno has joined #ruby
niceguyjames has joined #ruby
monkegjinni has quit [Remote host closed the connection]
locriani has joined #ruby
mneorr has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
kofno has quit [Ping timeout: 246 seconds]
danslo has quit [Quit: danslo]
oponder has quit [Remote host closed the connection]
maxmanders has quit [Quit: Computer has gone to sleep.]
xbob has joined #ruby
ephemerian has joined #ruby
maxmanders has joined #ruby
monkegjinni has joined #ruby
elaptics`away is now known as elaptics
timonv has joined #ruby
adambeynon has joined #ruby
monkegjinni has quit [Remote host closed the connection]
mxweas has joined #ruby
mxweas has quit [Client Quit]
enriclluelles has joined #ruby
Neandre has joined #ruby
monkegjinni has joined #ruby
doritostains has quit [Quit: Leaving...]
Shrink has quit [Read error: Connection reset by peer]
rdark has joined #ruby
senayar has joined #ruby
adambeynon has quit [Client Quit]
monkegjinni has quit [Remote host closed the connection]
timonv_ has joined #ruby
slainer68 has joined #ruby
mikelodeon has joined #ruby
timonv has quit [Ping timeout: 264 seconds]
hemanth has quit [Read error: Connection reset by peer]
justsee has quit [Ping timeout: 256 seconds]
t-mart has quit [Read error: Connection reset by peer]
Atrophius has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
Atrophius has joined #ruby
_maes_ has quit [Read error: Connection reset by peer]
martinklepsch has joined #ruby
t-mart has joined #ruby
jgrevich_ has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
jgrevich has quit [Ping timeout: 245 seconds]
jgrevich_ is now known as jgrevich
hemanth has joined #ruby
Markvilla has joined #ruby
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
_veer has quit [Max SendQ exceeded]
Markvilla has quit [Remote host closed the connection]
dagobah has joined #ruby
blueOxigen has joined #ruby
<alex88>
hi guys, I'm trying to install ruby-debug gem but I get these errors http://pastie.org/pastes/7367319/text I'm using rbenv installed from homebrew on osx
<alex88>
any idea?
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
_veer has quit [Max SendQ exceeded]
crazymykl has quit [Remote host closed the connection]
<postmodern>
alex88, just use the built in debugger
mikemac has joined #ruby
_veer has joined #ruby
<postmodern>
alex88, require 'debug'
_veer has quit [Changing host]
_veer has joined #ruby
_veer has quit [Max SendQ exceeded]
<alex88>
postmodern: I'm installing that since I wanted to use the rails server --debugger option
<alex88>
and it says to install ruby-debug
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
_veer has quit [Max SendQ exceeded]
veer has quit [Ping timeout: 264 seconds]
Caelum has quit [Ping timeout: 264 seconds]
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
_veer has quit [Max SendQ exceeded]
Caelum has joined #ruby
<postmodern>
alex88, think you want to use the debugger gem instead
<postmodern>
alex88, so just mkdir ~/.rbenv/sources
<alex88>
postmodern: I've installed via homebrew so I just install -k 1.9.3-p392
* lupine
grumbles at #dup
Andromeda has quit [Remote host closed the connection]
<lupine>
why does Fixnum respond_to? it if it can't dup?
<alex88>
btw, same issue, now rdebug-ide works fine... but aptana still says "ruby: no Ruby script found in input (LoadError)" when I try debug mode :(
<eskp>
tobiasvl: i am now able to write a file but he files that i add to the archive with tar.add_file come out empty after i extract
s0ber has quit [Remote host closed the connection]
<tobiasvl>
eskp: i don't know anything about this stuff, i just looked at the code earlier. please gist your code and i might have a faint shot at answering
<zeroXten>
anyone have much experience with binary data and endianness in ruby? I'm having problems translating this python: int.from_bytes(iv,'big') into ruby
<matti>
zeroXten: Maybe use pack/unpack
<zeroXten>
i thought i'd worked it out, but it doesn't work :(
atyz has joined #ruby
<zeroXten>
this is the mess i've ended up with so far: iv.unpack("b*")[0].gsub(/([01]{8})/) { |b| b.to_i(2).chr }
MrZYX|off is now known as MrZYX|off|off
<zeroXten>
if i use "B*" i get back the original value which is good, but b* doesn't work as expected
<zeroXten>
python seems to make it pretty simple :'(
yshh has quit [Remote host closed the connection]
Burgestrand has joined #ruby
kofno has quit [Ping timeout: 245 seconds]
nfk has joined #ruby
krz has quit [Quit: krz]
vlad_starkov has quit [Remote host closed the connection]
ph^ has quit [Remote host closed the connection]
krz has joined #ruby
rrecio has joined #ruby
<lupine>
hmm, this might be a ruby2.0 problem
Domon has quit [Remote host closed the connection]
banister`sleep has quit [Read error: Connection reset by peer]
dawkirst has joined #ruby
banister`sleep has joined #ruby
Domon has joined #ruby
sayan has joined #ruby
niceguyjames has joined #ruby
bwlang has joined #ruby
<Hanmac1>
ping shevy
chichouw has joined #ruby
hakunin has joined #ruby
maxmanders has quit [Ping timeout: 252 seconds]
sonda has joined #ruby
drale2k has quit [Quit: Leaving...]
yellow5_ has joined #ruby
<shevy>
Hanmac1 heya
<lupine>
wonder if numerics are frozen by default in ruby2
<lupine>
at least, assuming fc19 installs ruby2 by default
vetsin_ has joined #ruby
wting_ has joined #ruby
* lupine
waits for the fedora install to finish, but thinks it does
erry_ has joined #ruby
itman_ has joined #ruby
apeiros has joined #ruby
<Hanmac1>
lupine it makes a little more sense
wunz_ has joined #ruby
entr0py_ has joined #ruby
entr0py_ has left #ruby [#ruby]
<lupine>
sure, there's just a line in the code that goes obj.dup if obj.frozen?
entr0py_ has joined #ruby
sebastianb has quit [Ping timeout: 246 seconds]
drago777- has joined #ruby
Neandre has quit [Ping timeout: 264 seconds]
jnoob22 has joined #ruby
maxmanders has joined #ruby
sayan has quit [Ping timeout: 245 seconds]
A124 has quit [Read error: Operation timed out]
<Hanmac1>
lupine: obj.dup if obj.frozen? and !obj.is_a?(Numeric)
camilasan has joined #ruby
<lupine>
aye :)
<lupine>
or I could provide a no-op dup for Numeric
faulkner- has joined #ruby
security is now known as fire
<lupine>
(but I probably won't)
GeekOnCoffee_ has joined #ruby
fcoury_ has joined #ruby
crazysim_ has joined #ruby
epochwolf|2 has joined #ruby
epochwolf|2 has joined #ruby
sirecote_ has joined #ruby
cschneid_ has joined #ruby
Kov|sumika has joined #ruby
trollface has joined #ruby
arusso| has joined #ruby
segv_ has joined #ruby
psyprus has quit [*.net *.split]
drago777 has quit [*.net *.split]
fcoury has quit [*.net *.split]
erry has quit [*.net *.split]
crazysim has quit [*.net *.split]
zodiak has quit [*.net *.split]
faulkner has quit [*.net *.split]
Paradox has quit [*.net *.split]
aboudreault has quit [*.net *.split]
yellow5 has quit [*.net *.split]
yfeldblum has quit [*.net *.split]
MetaCosm has quit [*.net *.split]
vetsin has quit [*.net *.split]
hakunin_ has quit [*.net *.split]
GeekOnCoffee has quit [*.net *.split]
chichou has quit [*.net *.split]
ping-pong has quit [*.net *.split]
piisalie has quit [*.net *.split]
arusso has quit [*.net *.split]
wting has quit [*.net *.split]
yellow5_ is now known as yellow5
Kovensky has quit [*.net *.split]
itman has quit [*.net *.split]
epochwolf has quit [*.net *.split]
sirecote has quit [*.net *.split]
segv has quit [*.net *.split]
jeekl has quit [*.net *.split]
wunz has quit [*.net *.split]
faulkner- is now known as faulkner
cschneid has quit [*.net *.split]
ChewieBeardy has quit [*.net *.split]
GeekOnCoffee_ is now known as GeekOnCoffee
crazysim_ is now known as crazysim
sirecote_ is now known as sirecote
fcoury_ is now known as fcoury
Kov|sumika is now known as Kovensky
arusso| is now known as arusso
segv_ is now known as segv
arusso has joined #ruby
arusso has quit [Changing host]
epochwolf|2 is now known as epochwolf
peta_ has joined #ruby
<rrecio>
Hello. Does anyone here have experience with Grape? I want to know the difference between declaring a namespace using a symbol or a string
drale2k has joined #ruby
ping-pong has joined #ruby
drale2k has quit [Client Quit]
MetaCosm_ has joined #ruby
jeekl has joined #ruby
sebastianb has joined #ruby
yfeldblum has joined #ruby
zodiak has joined #ruby
<Hanmac1>
rrecio: can you link us some info about Grape? symbols are never free'd but this maybe not a problem, and i dont know if Grape turn the strings internal into symbols too
<ohcibi>
whats the difference between puts <<-EOS string EOS and puts <<<EOS string EOS?
<tobiasvl>
ohcibi: don't you mean <<-EOS string -EOS
<tobiasvl>
you can do <<RANDOM_STRING string RANDOM_STRING
<rrecio>
Hanmac1: I'm trying to specify nested resources. I see that on some examples, the ineer resources are declared using strings, in others using symbols. I don't get it!
BaconRose has quit [Ping timeout: 252 seconds]
<ohcibi>
tobiasvl: no i'd understand this as this would mean treat everything from "-EOS" to "-EOS" as string, but there isnt a "-" at the second "EOS" needed
<Hanmac1>
rrecio: in your case they are equal from the Grape side
psyprus has joined #ruby
prophile has quit [Changing host]
prophile has joined #ruby
<ohcibi>
tobiasvl: thats why i'm confused 8-)) to me it looks like the - is fully optional
aboudreault has joined #ruby
<rrecio>
Hanmac1: so they declares using symbols sometimes and using strings others just because of lack of code stardardization?
<rrecio>
it seems too n00b
Domon has quit [Remote host closed the connection]
Bofu2U has joined #ruby
<Hanmac1>
rrecio: treat sysmols as enums from C, they cant be deleted and the value will be allways the same: both is not true for strings
erry_ is now known as erry
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
techlife has joined #ruby
<rrecio>
Hanmac1: got it, thanks!!
techlife has quit [Max SendQ exceeded]
A124 has joined #ruby
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
fryguy has quit [Read error: Connection reset by peer]
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
fryguy has joined #ruby
pandawarrior has left #ruby [#ruby]
csmrfx has joined #ruby
tonini has joined #ruby
beasty has joined #ruby
<beasty>
hi all just making my first steps into this ruby story
<willejs>
i am trying to parse a string into json, and can't figure out why its failing?
chussenot has quit [Quit: chussenot]
tevio has joined #ruby
hogeo has quit [Remote host closed the connection]
blacktulip has joined #ruby
<Hanmac1>
beasty: what is your ruby version? try require "rubygems" before
hogeo has joined #ruby
<beasty>
Hanmac1: it says the same thing about rubygems
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
<Hanmac1>
rrecio: for sample if i do 1000.times { [:sym,"string"]} i got 1000 new strings but only one symbol ... but when i go with the GC.start, the 1000 strings are gone but the symbol still exist
<Hanmac1>
beasty can you make a pastie or a gist of your code?
techlife has joined #ruby
tish has joined #ruby
bwlang has quit [Quit: bwlang]
<tobiasvl>
beasty: have you installed the gems?
davetherat has quit [Remote host closed the connection]
wallerdev has joined #ruby
atmosx has joined #ruby
<beasty>
Hanmac1: it's just a basic net-ssh tutorial file
<willejs>
i wish it was, its being parsed with the java jackson library fine
<willejs>
but it won't de-serialise in ruby?
dross_ is now known as dross
camilasan has quit [Remote host closed the connection]
maxmanders has quit [Ping timeout: 264 seconds]
<willejs>
anyone got any ideas?
<Hanmac1>
willejs its a java problem
<willejs>
how can it be a java problem?
<Hanmac1>
if they tread invalid code as correct then its not an ruby failure
<willejs>
the json looks valid?
<atmosx>
because java is a problem istelf
<atmosx>
lol
robbyoconnor has quit [Ping timeout: 276 seconds]
<atmosx>
hey Hanmac1 shevy
jnoob22 has quit [Remote host closed the connection]
<Hanmac1>
atmosx i will add an global observer in my code to make observing more easier ... and it protects me from evil wave functions :P
<JonnieCache>
hahaha
<willejs>
okay, basically, we are wrapping app logs into the log stash JSON format in scala, using the jackson json library. then shipping it over UDP to log stash, log stash is written in ruby, it cannot parse the string it seems.
luckyruby has quit [Remote host closed the connection]
<willejs>
when i try to parse the string in rib, it failed too
locriani has quit [Remote host closed the connection]
bonty_ssh has quit [Remote host closed the connection]
quazimodo has joined #ruby
Shrink has quit [Ping timeout: 252 seconds]
beneggett has quit [Quit: Computer has gone to sleep.]
arya has joined #ruby
MrZYX has quit [Remote host closed the connection]
kristofers has joined #ruby
chase-work has joined #ruby
classix has joined #ruby
MrZYX|off has joined #ruby
<atmosx>
JonnieCache: you're being evil
MrZYX|off is now known as MrZYX
<atmosx>
JonnieCache: I think she's the most hated prime minister of western country ever. Like *ever*, there must be more than 15-20 songs about her dying.
adac has joined #ruby
<peta_>
Is it possible to instruct the ruby interpreter to route all network access caused by a script over a given proxy server?
<adac>
With a struct instead of a hash, is this not possible anymore? my_struct["KEY"] = my_array How to do such a thing with a struct?
pyrac has quit [Quit: pyrac]
MrZYX has quit [Remote host closed the connection]
drale2k has quit [Quit: Leaving...]
radic has quit [Quit: Verlassend]
<peta_>
I want to keep track of all network access my script causes … therefore I use Charles but I don't want to proxy ALL network access of the rest of my system. (all the porn sites might cause an ugly stack overflow)
<JonnieCache>
atmosx: yeah fair enough its not good to celebrate anyones death.
krz has quit [Quit: krz]
<atmosx>
I can't implement cache properly, looks fairly simple in the documentation jeez
nkr has joined #ruby
Czupa has joined #ruby
MrZYX|off has joined #ruby
divout has quit [Remote host closed the connection]
<atmosx>
JonnieCache: ah, I think most of them were well deserved.
MrZYX|off is now known as MrZYX
radic has joined #ruby
huoxito has joined #ruby
yashshah has joined #ruby
seoaqua has joined #ruby
rmartin_ has joined #ruby
realDAB has joined #ruby
BSaboia has quit [Ping timeout: 276 seconds]
rrecio has quit [Remote host closed the connection]
javiolo1 has joined #ruby
<seoaqua>
has anyone used savon or other WCF gem? i wonder how to call a method with params . client.call(:get_citys,message: {CityType: "0"}) this reports 'Object reference not set to an instance of an object.' all the time
ARCADIVS has quit [Quit: WeeChat 0.3.8]
justsee has quit [Ping timeout: 245 seconds]
akam_ has quit [Remote host closed the connection]
<Hanmac1>
shevy it may be become someday the standard scripts of the ORR games
jerius has joined #ruby
tommyvyo has joined #ruby
jgarvey has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
sayan has quit [Read error: Connection reset by peer]
_nitti has joined #ruby
arya has joined #ruby
wmoxam has joined #ruby
newUser1234 has joined #ruby
banister`sleep has quit [Remote host closed the connection]
Axa_ has joined #ruby
yacks has quit [Read error: Operation timed out]
newUser1234 has quit [Remote host closed the connection]
end_guy has quit [Ping timeout: 276 seconds]
idkazuma has quit [Remote host closed the connection]
mneorr has joined #ruby
gaahrdner has joined #ruby
end_guy has joined #ruby
dmerrick has joined #ruby
philcrissman has quit [Remote host closed the connection]
drale2k has joined #ruby
drale2k has quit [Client Quit]
mneorr has quit [Remote host closed the connection]
KevinSjoberg has joined #ruby
freerobby has joined #ruby
<shevy>
god
<shevy>
this code!
hogeo has joined #ruby
blambam has joined #ruby
drale2k has joined #ruby
blaxter has quit [Ping timeout: 252 seconds]
fmcgeough has joined #ruby
Matip has quit [Read error: Connection reset by peer]
dmerrick has quit [Ping timeout: 249 seconds]
<Hanmac1>
shevy yeah its made of evil :P
thatRD has joined #ruby
vlad_starkov has joined #ruby
Matip has joined #ruby
ffranz has joined #ruby
invisime has joined #ruby
carloslopes has joined #ruby
chussenot has quit [Quit: chussenot]
knapper_tech has joined #ruby
admin0 has joined #ruby
chussenot has joined #ruby
paper_ has joined #ruby
thebastl has quit [Ping timeout: 246 seconds]
<shevy>
Hanmac1 hehe I am surprised you can understand it
monkegjinni has quit [Remote host closed the connection]
mmitchell has joined #ruby
<blambam>
if i require a lib in MainModule and have "module MainModule; module SubModule;" doe sthat submodule automatically get what's required by MainModule?
mattbl has quit [Quit: This computer has gone to sleep]
kirun has quit [Read error: Operation timed out]
<apeiros>
blambam: no
Coolhand has quit [Remote host closed the connection]
<apeiros>
require is not aware of the current nesting
bigoldrock has joined #ruby
<apeiros>
and generally you put requires on the top of your file
<blambam>
thanks. seems like how that would be a good thing
cmarques has joined #ruby
sk87 has left #ruby [#ruby]
mmitchell has quit [Remote host closed the connection]
haxrbyte has quit [Remote host closed the connection]
paradoja has joined #ruby
haxrbyte has joined #ruby
mmitchell has joined #ruby
shammancer has quit [Quit: Leaving.]
shammancer has joined #ruby
shammancer has quit [Client Quit]
ariedler has joined #ruby
adkron has joined #ruby
shammancer has joined #ruby
cbot_ has joined #ruby
[eDu] has joined #ruby
sayan has joined #ruby
shammancer has quit [Client Quit]
<apeiros>
Hanmac1: sorry, I'm at work, too long to read that here :-/
statarb3 has quit [Read error: Connection reset by peer]
<blambam>
i'm still confused. when would i want to use module_function over extend self?
dylan` has quit [Ping timeout: 264 seconds]
shammancer has joined #ruby
newUser1234 has joined #ruby
justsee has joined #ruby
Czupa has quit [Remote host closed the connection]
monkegji_ has joined #ruby
monkegjinni has quit [Read error: No route to host]
baroquebobcat has joined #ruby
failshell has joined #ruby
sailias has joined #ruby
verysoftoiletppr has joined #ruby
ant384 has joined #ruby
<apeiros>
blambam: all the time
<apeiros>
extend self is a broken pattern
<apeiros>
methods which have no relation to self are "pseudo functions". those should always be private. but the class variant version should be public (otherwise you can't call them)
<apeiros>
module_function does exactly that. with extend self, that's annoying to do.
yacks has joined #ruby
justsee has quit [Ping timeout: 240 seconds]
<blambam>
nooo!!! i have been using extend self because module_function is more code. for example i can do extend self; def1; def2; private; def3; def4;... and can access def3 and def4 from def1 and def2. can't do that w/ module_function at top
angusiguess has joined #ruby
mneorr has joined #ruby
tomku has quit [Ping timeout: 264 seconds]
<Hanmac1>
blambam: " If used with no arguments, subsequently defined methods become module functions."
mattbl has joined #ruby
<blambam>
yeah, but it chokes w/ private
sambao21 has joined #ruby
knapper_tech has quit [Ping timeout: 260 seconds]
<blambam>
maybe i should try module_function again after private
<blambam>
that gives `foo': undefined method `bar' for TestModule:Module (NoMethodError)
daniel_- has joined #ruby
daniel_- has joined #ruby
<MrZYX>
of course
griffindy has joined #ruby
KazW has joined #ruby
seoaqua has quit [Ping timeout: 248 seconds]
tish has quit [Quit: Leaving.]
oponder has joined #ruby
akashj87 has quit [Ping timeout: 240 seconds]
<blambam>
MrZYX: what can i do to fix that, giving foo access to bar, but keeping bar private
vlad_starkov has quit [Remote host closed the connection]
nezumi has joined #ruby
asphyxia has joined #ruby
kpshek has joined #ruby
adamjleonard has joined #ruby
jkim has left #ruby ["WeeChat 0.4.0"]
ananthakumaran has quit [Quit: Leaving.]
jtharris has joined #ruby
vlad_starkov has joined #ruby
<blambam>
anyone?
baroquebobcat has quit [Quit: baroquebobcat]
a_a_g has joined #ruby
a_a_g has quit [Client Quit]
<MrZYX>
I guess there's no nice way. module_function _copies_ the methods to the eigenclass, so you could open that and call private in it
<blambam>
MrZYX: ahh... thanks for reminding me of it making a copy
beneggett has joined #ruby
lessless has joined #ruby
alx- has joined #ruby
camilasan has quit [Remote host closed the connection]
<MrZYX>
but maybe one just shouldn't put logic that's so complex that it requires splitting up in private methods as static functions into a module. I'd consider using a class instead
Axa_ has quit [Quit: Page closed]
<blambam>
just kind of weird because it doesn't need instantiation
<blambam>
there is no state
end_guy has quit [Remote host closed the connection]
<Hanmac1>
shevy yeah i added also notifies for something that is calculated :P ... like an mthod returns an calculated value, u build a way to call the observers when the calculated value changes ..
crazymykl has joined #ruby
RORgasm has joined #ruby
newUser1234 has quit [Remote host closed the connection]
<MrZYX>
apeiros: he wants to call the private function from the module function, which doesn't work since they end up in different classes
<apeiros>
blambam: "it chockes with" is not a usable problem description. provide code and exception please.
<apeiros>
MrZYX: huh? errr… what? :)
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
paper_ has quit [Read error: Connection reset by peer]
beneggett has quit [Quit: Computer has gone to sleep.]
<MrZYX>
module_function copies the methods into the eigenclass of the module
paper_ has joined #ruby
phantasm66 has joined #ruby
phantasm66 has joined #ruby
<waxjar>
never heard of module_function before
theRoUS has quit [Read error: Connection reset by peer]
<apeiros>
MrZYX: I know how module_function works
<apeiros>
I don't understand what blambam wants to do, or does do
v0n has joined #ruby
<MrZYX>
did you see his pastie?
<apeiros>
MrZYX: ah, didn't scroll up high enough it seems. no. looking at it now.
philcrissman has joined #ruby
rippa has joined #ruby
andikr has quit [Remote host closed the connection]
niklasb has joined #ruby
NiteRain has joined #ruby
alxscms has joined #ruby
generalissimo has joined #ruby
bean__ has joined #ruby
<Hanmac1>
shevy apeiros did some of you use test/unit? what must i do when i want something to be runned before all tests?
<apeiros>
I question the design of such a thing - but blambam - just use module_function for all of them and then private_class_method :all, :your, :private, :class, :methods
gyre007 has quit [Read error: Connection reset by peer]
gyre007 has joined #ruby
robscomp_ has quit [Ping timeout: 252 seconds]
baroquebobcat has joined #ruby
tagrudev has left #ruby ["lolst"]
theRoUS has joined #ruby
sayan has quit [Ping timeout: 256 seconds]
gyre007 has quit [Read error: Connection reset by peer]
io_syl has joined #ruby
gyre007 has joined #ruby
aganov has quit [Remote host closed the connection]
gyre007 has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
gyre008 has joined #ruby
rismoney has joined #ruby
Pochacco has quit [Quit: Pochacco]
jlast has joined #ruby
hogeo has quit [Remote host closed the connection]
hogeo has joined #ruby
tmiller has joined #ruby
dmerrick has joined #ruby
tonini has quit [Remote host closed the connection]
dhruvasagar has quit [Read error: Operation timed out]
jonathanwallace has quit [Ping timeout: 264 seconds]
MrZYX is now known as MrZYX|off
ttt_ has quit [Remote host closed the connection]
<Hanmac1>
shevy & apeiros: no i can do: battler.observe(:states_chance_changed) {...} but :states_chance_changed is not an event an specific function does throw because nearly everything can change everything ... so states_chance is not an attribute, thats why i image some kind of auto_observe that you can put around the parts that could affect other parts :P
tootooroo has quit [Read error: Connection reset by peer]
<shevy>
not enough boobs
<Hanmac1>
shevy i increase the evilness of my code, do you want to see it? :P
<apeiros>
Xeago: not seen it yet, no. probably wouldn't get around until wednesday either.
hiyakashi has quit [Quit: お前は知りすぎた]
jsaak has quit [Ping timeout: 252 seconds]
markalanevans has joined #ruby
jsaak has joined #ruby
yacks has quit [Ping timeout: 264 seconds]
Nisstyre-laptop has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
ph^ has joined #ruby
pyrac has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
awarner has joined #ruby
tootooroo has joined #ruby
alup has quit [Quit: Leaving]
AlSquire has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
AlSquire has joined #ruby
markalanevans has quit [Client Quit]
newUser1234 has joined #ruby
thinkdevcode has joined #ruby
guns has joined #ruby
<Vivekananda>
hey every one a rest and I a back
newUser1234 has quit [Remote host closed the connection]
etcetera has joined #ruby
newUser1234 has joined #ruby
<paper_>
Vivekananda: how exciting :)
beneggett has joined #ruby
v0n has quit [Read error: Connection reset by peer]
v0n has joined #ruby
<shevy>
Hanmac1 I must destroy your code
baroquebobcat has quit [Quit: baroquebobcat]
angusiguess has quit [Ping timeout: 245 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
brennanMKE has joined #ruby
<Hanmac1>
shevy you can try it :P show me a way how it can be done better
MarioEIU has joined #ruby
niceguyjames has quit [Ping timeout: 252 seconds]
<Vivekananda>
paper_ I a coding you
<Vivekananda>
am coding you actually . A game of paper scissors and stone
krawchyk has joined #ruby
<paper_>
Vivekananda: that's funny, im beating you with a stick while i release a stream of insults about your family and entire chain of ancestors
<shevy>
paper_ lol
Kruppe has quit [Remote host closed the connection]
<Hanmac1>
Vivekananda: and the next DLC includes Lizard and Spock ;P
<Vivekananda>
paper_lol : you this old and still in temper tantrums. Grow up for heavens sake!!
akashj87 has joined #ruby
<Vivekananda>
shevy howdy :)
kf8a has joined #ruby
niceguyjames has joined #ruby
randomautomator has joined #ruby
<Vivekananda>
I am doing that code and hope people will be like the rubymonks. I love that site
<Vivekananda>
Is there nothing similar for java
Al__ has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<Hanmac1>
if Blizzard would make an Rock Paper Scissors game all of them would be realased in extra Games ... and if EA would publish them, they all would need internet connection :P
markalanevans has joined #ruby
<Vivekananda>
I go to the java channel and proclaim that I am a newbie ( I am not that much of a nebie in java) and ask them
<Xeago>
apeiros: you still doing the lunch pairing thing?
ismell has joined #ruby
<ismell>
ello
<ismell>
i'm doing a 'exec *%W[rake server]'
xclite has joined #ruby
<adac>
How to add a value to an existing openstruct object?
MrZYX|off is now known as MrZYX
<ismell>
but when I do a ps it shows that its executing as sh -c rake server
<ismell>
how do I prevent it from starting a shell?
Vainoharhainen has quit [Quit: Leaving...]
Neomex has quit [Quit: Neomex]
<Vivekananda>
that for interviews I am asked some weird questions so should I go and read the cathy sierra and bates book and get it done for such questions as -- can we have multiple inheritance or what happens if we do not instantiate a method or an abstract class
<Xeago>
not sure if system() starts a shell, try that
<ismell>
well exec should replace the existing process
AlSquirrel has joined #ruby
<Vivekananda>
and they just tell me there is no way :( just do and learn instead of getting a good book to learn
sambao21 has joined #ruby
<ismell>
and the man says if i give it an array of args it will just exec with out a shell
<apeiros>
Xeago: I wanted to finish that one on sunday - and then I suddenly spent 9h shopping & 7h helping my brother build a cupboard :-S (and gone was the week-end)
<Vivekananda>
comments welcome and me back to the rock paper .. land
<apeiros>
I'll probably finish it this week, though
<Xeago>
is it a weekend project :O?
<apeiros>
depends a bit how much time I get at the evening
<apeiros>
yes, it's nothing official
pduin has quit [Remote host closed the connection]
<Xeago>
bummer
<apeiros>
indeed :)
cantonic has quit [Quit: cantonic]
BizarreCake has joined #ruby
<apeiros>
if we didn't have such long task lists, I would probably even get time for it at company time - but the current workload is brutal.
<Hanmac1>
Xeago: do you want to see my feaking scripting code ? (its for a game engine someday)
mando has joined #ruby
spanner has joined #ruby
AlSquire has quit [Ping timeout: 245 seconds]
guns has quit [Quit: guns]
johnmlocklear_ has quit [Ping timeout: 264 seconds]
beneggett has quit [Quit: Computer has gone to sleep.]
<Xeago>
Hanmac1: your stuff scares me
<Hanmac1>
:PP
chase-work has joined #ruby
predator217 has quit [Ping timeout: 264 seconds]
jbueza has joined #ruby
<Xeago>
not so the meta stuff and hacky stuff you do
<Vivekananda>
no one ?
<Vivekananda>
nothing ?
predator117 has joined #ruby
ananthakumaran has joined #ruby
<Xeago>
but the stuff I don't know about ruby, core et
<Xeago>
c
<Xeago>
Vivekananda: during my scrollback I couldn't understand you
<Hanmac1>
Xeago its currently Ruby only, but its so meta that even shevy is scared ;P
markalanevans has quit [Quit: markalanevans]
<Vivekananda>
Xeago it is just ---- hm let me collate it for you
robert_ has joined #ruby
robert_ has quit [Changing host]
robert_ has joined #ruby
<Vivekananda>
1. I hope there is a rubymonks like thing in java
<Vivekananda>
2. It was about java interview questions and they ask some weird ones. ( This was an off topic). I was wondering why people in java tell me not to learn stuff about weird quesionts from a book coz I normally wont do something like that and hence wont remember it
paper_ has quit [Remote host closed the connection]
mpajor_op5 has quit [Ping timeout: 245 seconds]
b0oh has left #ruby [#ruby]
l0rd_hex has left #ruby ["just e to the step, flick it, stick it and cyalatabye!"]
adamjleonard has quit [Ping timeout: 248 seconds]
mpajor_op5 has joined #ruby
PixelCru_ has joined #ruby
hekin has joined #ruby
codezombie has joined #ruby
akashj87 has quit [Ping timeout: 240 seconds]
hekin has quit [Client Quit]
admin0 has quit [Read error: Connection reset by peer]
<Xeago>
Vivekananda: what questions specifically?
akashj87 has joined #ruby
dmerrick has quit [Remote host closed the connection]
Neandre has joined #ruby
speaking1ode-wor has joined #ruby
Arzaga has joined #ruby
dmerrick has joined #ruby
thinkdevcode has quit [Remote host closed the connection]
cantonic has joined #ruby
adamjleonard has joined #ruby
pbertain has quit [Ping timeout: 252 seconds]
<Vivekananda>
Well some such as --- that for interviews I am asked some weird questions so should I go and read the cathy sierra and bates book and get it done for such questions as -- can we have multiple inheritance or what happens if we do not instantiate a method or an abstract class ------
csaunders has joined #ruby
JohnBat26 has quit [Ping timeout: 264 seconds]
yacks has joined #ruby
xbob has joined #ruby
<Vivekananda>
I meant --- can we have multiple inheritance or what happens if we do not instantiate a method or an abstract class
moofy has joined #ruby
<moofy>
ahoy!
blaxter_ has joined #ruby
baphled has quit [Ping timeout: 256 seconds]
adac has quit [Quit: Leaving]
<moofy>
I wondered if anyone could suggest what the best way to get some colouring in irb might be? I'm still fairly new to it and it just smooths some things out
robert_ has quit [Ping timeout: 245 seconds]
jurassic has joined #ruby
eykosioux has joined #ruby
i_s has joined #ruby
predator117 has quit [Ping timeout: 245 seconds]
stoic_squirrel has joined #ruby
baphled has joined #ruby
monkegji_ has quit [Remote host closed the connection]
xbob has quit [Client Quit]
wedgeV has quit [Ping timeout: 246 seconds]
pyrac has quit [Quit: pyrac]
etcetera has quit []
wolcanus has quit [Remote host closed the connection]
wedgeV has joined #ruby
tootubular has joined #ruby
thebastl has quit [Remote host closed the connection]
akashj87 has quit [Ping timeout: 240 seconds]
nick- has joined #ruby
<apeiros>
moofy: define 'best'
freakazoid0223 has joined #ruby
<apeiros>
there are gems to do it, or you can use plain old ascii sequences yourself: puts "\e[31mHello!\e[0m"
baroquebobcat has joined #ruby
hmarr has quit [Ping timeout: 252 seconds]
paper_ has joined #ruby
tjbiddle has joined #ruby
Davey has joined #ruby
Astralum has joined #ruby
mmitchell has quit [Ping timeout: 245 seconds]
timonv has quit [Remote host closed the connection]
<waxjar>
moofy, try pry if you'd like a syntax-highlighted REPL
hmarr has joined #ruby
<moofy>
okay, thanks
<moofy>
just to make learning stuff a little bit easier
mmitchell has joined #ruby
<moofy>
i guess it's my synesthesia coming out
thetristan_ has joined #ruby
sonda has quit [Ping timeout: 252 seconds]
sayan has joined #ruby
Astral__ has quit [Ping timeout: 264 seconds]
beneggett has joined #ruby
paper__ has joined #ruby
paper_ has quit [Read error: Connection reset by peer]
elux has joined #ruby
wsterling has joined #ruby
predator117 has joined #ruby
mpfundstein is now known as lmf40
mockra has joined #ruby
nomenkun_ has quit [Remote host closed the connection]
gaahrdner has quit [Remote host closed the connection]
<ismell>
hrmm
mmitchell has quit [Ping timeout: 264 seconds]
gaahrdner has joined #ruby
<ismell>
sh -c 'my command'; if i send a sigterm to that pid it doesn't kill 'my command'
MarioEIU has left #ruby [#ruby]
_if has quit [Remote host closed the connection]
wyattg has joined #ruby
girija has joined #ruby
cody-- has quit [Quit: goodbye]
<oponder>
Anyone know how to get the current ruby process's memory usage? Twist: In windows.
mmitchell has joined #ruby
harumph has joined #ruby
drale2k has joined #ruby
mikepack has joined #ruby
peta_ has quit [Quit: peta_]
Tectonic has joined #ruby
vetsin_ is now known as vetsin
Ontolog has joined #ruby
gaahrdner has quit [Ping timeout: 245 seconds]
chrishough has joined #ruby
<Hanmac1>
oponder ruby uses memory
wunz_ is now known as wunz
moofy has left #ruby [#ruby]
_if has joined #ruby
<oponder>
I can imagine it already. My webconsole showing the health of some distributed ruby processes in windows. Under the memory usage column: "Yes. Memory being used."
sayan has quit [Quit: Leaving]
sayan has joined #ruby
carloslopes has quit [Remote host closed the connection]
mockra has quit [Remote host closed the connection]
threesome has quit [Ping timeout: 260 seconds]
monkegjinni has joined #ruby
mockra has joined #ruby
gaahrdner has joined #ruby
ttt has joined #ruby
puppeh has quit [Remote host closed the connection]
<oponder>
;)
jgrevich has joined #ruby
dr_bob has quit [Quit: Leaving.]
<Hanmac1>
i think ruby does not have the posibillites to know how much memory its been using
burntbit has quit [Remote host closed the connection]
predator117 has quit [Ping timeout: 240 seconds]
_if has quit [Remote host closed the connection]
airtonix has joined #ruby
_if has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
ttt has quit [Ping timeout: 256 seconds]
<oponder>
darn..
<oponder>
I'll look into having some other monitoring process running next to it
robbyoconnor has joined #ruby
predator117 has joined #ruby
erichmenge has quit [Quit: Arrivederci!]
davidcelis has quit [Quit: K-Lined.]
droppedonmyhead has joined #ruby
gaahrdner has quit [Remote host closed the connection]
<droppedonmyhead>
hey everyone
<droppedonmyhead>
what's the best ruby paste bin?
erichmenge has joined #ruby
davidcelis has joined #ruby
<spanner>
i'm trying to get a median, but this line: return len % 2 == 1 ? sorted[len/2] : (sorted[len/2 - 1] + sorted[len/2]).to_f / 2
marr has quit [Ping timeout: 252 seconds]
<wmoxam>
droppedonmyhead: gist
<spanner>
returns undefined method `+' for nil:NilClass (NoMethodError)
wolcanus has joined #ruby
pitzips has joined #ruby
<Sou|cutter>
spanner: sorted[len/2 - 1] <-- this is nil
Tectonic has quit []
girija has quit [Ping timeout: 276 seconds]
ckrailo has joined #ruby
ShellFu has joined #ruby
robbyoconnor has quit [Remote host closed the connection]
Neandre has quit [Ping timeout: 264 seconds]
artofraw has joined #ruby
blaxter_ is now known as blaxter
huoxito has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Remote host closed the connection]
kqr has joined #ruby
philcrissman has quit [Remote host closed the connection]
<kqr>
i have a ruby application cloned, and it has a rakefile, but i have no idea how to install it with rake. can I ask this here or should i find #rake or something?
robbyoconnor has joined #ruby
Zolo has joined #ruby
<bean__>
kqr: what is the app?
<kqr>
sup
<kqr>
a mail client, sort of
<kqr>
i could just go with the version in the package manager, but i'd like a specific branch of it
<kqr>
and i don't think there's any prepackaged release of that
slainer68 has quit [Remote host closed the connection]
<bean__>
unlikely
girija has joined #ruby
<bean__>
usually repos like that will have a readme
jonathanwallace has joined #ruby
<bean__>
or somesuch
[eDu] has quit [Quit: [eDu]]
mikelodeon has quit [Quit: mikelodeon]
<kqr>
good point
<kqr>
i didn't even think about checking for that
<Hanmac1>
kqr do "rake -T" in the dir, maybe it shows something helpfull
pi3r has quit [Quit: Leaving]
jamie_ca_ has joined #ruby
<kqr>
Hanmac1, rake aborted
xardas has joined #ruby
wolcanus has quit [Ping timeout: 260 seconds]
philcrissman has joined #ruby
ph^ has quit [Remote host closed the connection]
carloslopes has joined #ruby
<kqr>
bean__, the readme says "gem install sup"
<kqr>
bean__, does that sound good?
beneggett has quit [Quit: Computer has gone to sleep.]
a_a_g has quit [Quit: Leaving.]
<bean__>
yeah, that's how you'd do it without messing with the source
ph^ has joined #ruby
<bean__>
and just have your system handle it
<kqr>
okay
wyattg has quit [Quit: Konversation terminated!]
<kqr>
does that install from the source though, or from some external library?
Vivekananda has quit [Quit: Ex-Chat]
sambao21 has quit [Quit: Computer has gone to sleep.]
Vivekananda has joined #ruby
verysoftoiletppr has quit []
filipe has quit [Remote host closed the connection]
girija has quit [Ping timeout: 276 seconds]
monkegjinni has quit [Remote host closed the connection]
frem has joined #ruby
endzyme has joined #ruby
tmiller has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
Arzaga has quit [Quit: Computer has gone to sleep.]
sambao21 has joined #ruby
matti has quit [Quit: Oh dear...]
wyattg has joined #ruby
wolcanus has joined #ruby
beneggett has joined #ruby
lmf40 has quit [Remote host closed the connection]
martinklepsch has quit [Ping timeout: 246 seconds]
sambio has quit [Client Quit]
elkclone has joined #ruby
monkegjinni has joined #ruby
bigoldrock has joined #ruby
<kqr>
oh well, the rake file seems unrelated to installing
nkr has joined #ruby
<kqr>
it just looks like something that's triggered when a new version is pushed or something
<Hanmac1>
hm maybe ... i use rake to build the gems
PixelCru_ has quit [Remote host closed the connection]
choobie has joined #ruby
Zolo has quit [Remote host closed the connection]
ananthakumaran has quit [Quit: Leaving.]
Zolo has joined #ruby
GeekOnCoffee has left #ruby [#ruby]
carloslopes has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 245 seconds]
Lockzi has joined #ruby
<kqr>
maybe i'll just have to go with the prepackaged version and lose a few features
maletor has joined #ruby
<kqr>
because this project isn't maintained at all so it's really difficult to get into from a non-ruby-user standpoint
Hanmac2 has joined #ruby
zph has joined #ruby
mahmoudimus has joined #ruby
Zolo has quit [Ping timeout: 240 seconds]
eladmeidar has joined #ruby
endzyme has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 245 seconds]
predator117 has quit [Ping timeout: 240 seconds]
endzyme has joined #ruby
mmitchel_ has joined #ruby
zeade has joined #ruby
girija has joined #ruby
mmitchell has quit [Ping timeout: 240 seconds]
etcetera has joined #ruby
predator117 has joined #ruby
FLeiXiuS` has joined #ruby
<kqr>
Hanmac1, if the project has a bin/ directory which seems to contain well... the code for the project, do you think it could be safe to just copy paste those binaries to some location in my $PATH?
<kqr>
Hanmac1, or do ruby projects usually need additional set up?
<apeiros>
tommylommykins: (a..b).cover?(c) is c.between?(a,b) afaik
<apeiros>
whereas (a..b).include?(c) is (a..b).to_a.include?(c)
Nimsical has quit [Quit: Computer has gone to sleep.]
<apeiros>
+equivalent to
<apeiros>
and the reason that #cover? was added was exactly because people *wanted* those semantics.
<Xeago>
Matip: see the topic for a pastie site
<apeiros>
don't fall to the illusion that your use-cases were everybody's use-cases.
<Matip>
yeah, I saw it :P
<tommylommykins>
apeiros: I'm just a bit angry that cover? is not what I wanted
subbyyy_ has joined #ruby
Zolo has quit [Remote host closed the connection]
tmiller has quit [Ping timeout: 252 seconds]
<apeiros>
tommylommykins: d'uh. get yourself some 'ri'.
Shadow_S has joined #ruby
<tommylommykins>
apeiros: I read the documentation, and I thought "hey, that looks like what I want!"
lkba has joined #ruby
jdrap has quit [Quit: jdrap]
<paper__>
tommylommykins: what do u want
mityaz has joined #ruby
<tommylommykins>
paper__: I wanted Range#include?
Yakko has quit [Ping timeout: 252 seconds]
k610 has quit [Ping timeout: 245 seconds]
mljsimone has quit [Remote host closed the connection]
pioz has quit [Read error: Operation timed out]
bricker has joined #ruby
MehLaptop has joined #ruby
<Matip>
what!? I just realized you can't inherit from a class that was not already defined, even if it's in the same file..
tylersmith has joined #ruby
<apeiros>
tommylommykins: um, I find the docs pretty clear on #cover? (and there are definitively parts where rubys documentation could be improved)
<apeiros>
I'll see whether I can get a patch in which emphasizes the difference to #include? anyway
<Hanmac>
Matip: what else did you suspect?
<tommylommykins>
:)
<Matip>
being able to do so
<tommylommykins>
apeiros: "Returns true if obj is between the begin and end of the range." -- that makes it looks like it has the semantics of #include?
<tommylommykins>
at least, when I scanned it, it did
cbot_ has quit [Ping timeout: 256 seconds]
<Matip>
class Foo < Bar ... end \n class Bar ... end
<Matip>
like that ^
bricker_ has quit [Ping timeout: 245 seconds]
<bean__>
have to define bar first
<apeiros>
tommylommykins: I'd disagree. they explicitly state <= just below that
<bean__>
so, that'd work if Foo was below your bar
<apeiros>
tommylommykins: I can see that one can *mistake* it as such. but I'd hold that this is because natural language is imprecise in nature and not because of ambiguous documentation.
<tommylommykins>
apeiros: Sure, the documentation is explicit, it's just that given that it's so similar to #include?, accidentally picking the wrong one becomes easier
chipotle_ has joined #ruby
<apeiros>
tommylommykins: which is why I'll try to get a doc patch accepted.
<tommylommykins>
:)
<ngcazz>
Matip: if you require that code organization just stick class Bar; end before class Foo < Bar; ..., end
cha1tanya has joined #ruby
<Hanmac>
Matip ruby cant know if you devine a Bar class later
<apeiros>
what's sad is that #include? is actually special cased as it seems
<apeiros>
(1.0..2.0).include?(1.5) # works like #cover?
<apeiros>
I think all numeric range values are special cased
<breakingthings>
Matip: find me a lang that can do that an I will show you a magic trick
MehLaptop has quit [Read error: Connection reset by peer]
chandankumar has quit [Quit: Leaving]
<Matip>
any two phased compilation lang
<Matip>
or whatever it's called
<apeiros>
I guess I'll have to read the actual source before patching the docs
MehLaptop has joined #ruby
carloslopes has joined #ruby
nateberkopec has quit [Ping timeout: 245 seconds]
<Hanmac>
apeiros: ri Range#included? says this: " If begin and end are numeric, comparison is done according to the magnitude of the values."
eladmeidar has quit [Ping timeout: 245 seconds]
freerobby has quit [Quit: Leaving.]
pioz has joined #ruby
eladmeidar has joined #ruby
sayan has quit [Ping timeout: 240 seconds]
<Matip>
breakingthings, so what's the trick?
<breakingthings>
Matip: I suppose I deserve that for not specifying constraints to that
maxmanders has quit [Quit: Computer has gone to sleep.]
<breakingthings>
Soooo
chandankumar has joined #ruby
<breakingthings>
My magic trick is disappearing
breakingthings has quit [Quit: *poof*]
<apeiros>
Hanmac: source says integer is handled differently from other numerics… may just be for performance, but I'll read it through before patching anyway.
<Matip>
wtf? xD
<ngcazz>
that was silly
<Xeago>
rofl ;0
<Xeago>
nah, funny and accurate
dawkirst has joined #ruby
kpshek has quit []
nga4 has joined #ruby
dhruvasagar has quit [Ping timeout: 255 seconds]
AltGrendel has left #ruby [#ruby]
<apeiros>
lol, tweet from PLT_Borat: `is koan for PLT student is "why is lambda-the-ultimate.org write in PHP?"`
spider-mario has joined #ruby
chrishough has quit [Quit: chrishough]
camilasan has quit [Remote host closed the connection]
chrisnicola has joined #ruby
Nisstyre-laptop has quit [Quit: Leaving]
chrisnicola has quit [Remote host closed the connection]
chrisnicola has joined #ruby
kpshek has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
etcetera has quit []
jgrevich has quit [Quit: jgrevich]
marcdel has joined #ruby
etcetera has joined #ruby
markalanevans has joined #ruby
dmerrick has joined #ruby
eladmeidar has quit [Ping timeout: 245 seconds]
nalaginrut has quit [Ping timeout: 264 seconds]
tmiller has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
Davey has joined #ruby
jgrevich has joined #ruby
invisime has quit [Quit: Leaving.]
tootooroo has joined #ruby
apeiros has quit [Remote host closed the connection]
<apeiros>
stderr will still go to your current ruby process' stderr
jurassic has joined #ruby
<failshell>
ah ok
<Xeago>
apeiros: says Hash..
<Xeago>
not documented tho
<failshell>
ill check popen then
<apeiros>
Xeago: awesome, for performance probably
baphled has joined #ruby
<Xeago>
and it doesn't seem to sort the keys array either..
<apeiros>
Xeago: it includes Enumerable and you find the docs there :)
<apeiros>
Hash#sort is essentially Hash#to_a.sort
elaptics is now known as elaptics`away
<apeiros>
i.e. you { |a,b| a and b will be [key, value] pairs
MehLaptop has quit [Remote host closed the connection]
<apeiros>
and you get an array back
Xeago_ has joined #ruby
mockra has quit [Remote host closed the connection]
Xeago is now known as Guest90371
Guest90371 has quit [Killed (hobana.freenode.net (Nickname regained by services))]
Xeago_ is now known as Xeago
thebastl has quit [Remote host closed the connection]
mockra has joined #ruby
<Xeago>
{"D2"=>0, "D1"=>-2, "C1"=>2}
<Xeago>
["D2", "D1", "C1"]
<Xeago>
how did get sorted?
<Xeago>
if anything I'd expect it to be sorted by the key, but this is seemingly random
wolcanus has joined #ruby
<apeiros>
Xeago: as said, {"D2"=>0, "D1"=>-2, "C1"=>2}.sort --> ["D2"=>0] <=> ["D1"=>-2] would be one comparison
tootooroo has quit [Quit: Brain.sys has encountered a problem and needs to close. We are sorry for the inconvenience.]
paniconograph14 has joined #ruby
<bean__>
Hashes are unsorted.
<apeiros>
and Array#<=> will compare from left to right until either one array is done (shorter, hence smaller) or one element of the array returns non-0
<apeiros>
bean__: partially incorrect
cobragoat has joined #ruby
Andromeda has quit [Remote host closed the connection]
ananthakumaran has quit [Quit: Leaving.]
<bean__>
Hashes are not guaranteed to be in any order?
<bean__>
:p
<apeiros>
a) sorted != ordered, b) hashes are ordered, and from b) comes hashes can be sorted
<apeiros>
bean__: yes, they are guaranteed to be in insertion order
<bean__>
right
speaking1ode-wor is now known as speakingcode-wor
<apeiros>
hashes are only unordered if you're on pre 1.9
<bricker>
apeiros: thanks, I am looking at it but it's unclear still
wolcanus_ has joined #ruby
<apeiros>
as said, look at the :fallback option
<bricker>
apeiros: I mean, of course I could just write a method that does what I explained, but I'm wondering if there is a combination of options that would achieve the same thing
bagagle has joined #ruby
<Hanmac>
apeiros: i think there should be a Hash#sort_by_key_by and Hash#sort_by_value_by or something like that :PP
<apeiros>
Hanmac: it's a reasonably common use-case indeed. I'd also settle for Hash#sort and #sort_by returning a Hash, though
br4ndon has joined #ruby
bagagle has quit [Client Quit]
<Xeago>
apeiros: I expected Hash#sort to return a hash, and not magically turn it into an array
heliumsocket has joined #ruby
<Hanmac>
hm Hashs are perse not sorted :/ (only creation and not insertion sorted) ... hm i think there should be an OrderedHash where you can change the Order
<apeiros>
Xeago: it's not really magical
<apeiros>
all Enumerable methods return an array
<apeiros>
since they just build up on #each
rezzack has joined #ruby
gf3 has quit [Ping timeout: 256 seconds]
<apeiros>
Hash defining #sort on its own is only for performance reasons (an implementation detail, if you will)
tootooroo has quit [Ping timeout: 256 seconds]
<apeiros>
Hanmac: et tu - ordered != sorted ;-)
wolcanus has quit [Ping timeout: 252 seconds]
<apeiros>
sorting is a special case of ordering
etcetera has joined #ruby
frem has quit [Ping timeout: 248 seconds]
<Hanmac>
i would be happy with an orderd hash too (when you can change how it is ordered )
jurassic has quit [Quit: jurassic]
nadirvardar has joined #ruby
<apeiros>
Hanmac: you can. not trivial, though
<apeiros>
I showed a way to sort a hash above
<apeiros>
hash.replace(Hash[hash.sort { … }])
fedza has joined #ruby
threesome has joined #ruby
<Hanmac>
apeiros: i mean when i add a new value or set an old value with []= there is a difference, because when there was an old value, []= does not add it to the end of each
<apeiros>
delete a key before adding it if you want it at the end
<apeiros>
inserting in a specific place is annoying, though. especially since it could be O(1) but is O(n) in ruby as it doesn't provide the API to the DLL
mercwithamouth has quit [Ping timeout: 256 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
shock_one has quit [Ping timeout: 245 seconds]
mercwithamouth has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
sambao21 has joined #ruby
a_a_g has quit [Quit: Leaving.]
marr has joined #ruby
tootooroo has joined #ruby
paradoja has quit [Ping timeout: 245 seconds]
ephemerian has joined #ruby
DaniG2k has joined #ruby
paper_ has quit [Read error: Connection reset by peer]
paper__ has joined #ruby
drale2k has joined #ruby
mikurubeam has joined #ruby
chandankumar has joined #ruby
mercwithamouth has quit [Ping timeout: 256 seconds]
rawng has joined #ruby
Sicp has quit [Quit: Leaving]
Heero has joined #ruby
paper__ has quit [Read error: Connection reset by peer]
<rawng>
is this the correct/a friendly place for newbie help?
<apeiros>
rawng: no, we're brutal :)
<rawng>
:O
<apeiros>
just ask ;-)
<MrZYX>
ask or die!
<rawng>
I want to refer to an unknown number of variables at runtime but don't know how to reference them
<MrZYX>
sounds like an array
<rawng>
like, @var#{$gvar1[3]} where gvar1 is something like 12345
echevemaster has joined #ruby
echevemaster has joined #ruby
echevemaster has quit [Changing host]
chrishough has quit [Quit: chrishough]
Sacha_ has joined #ruby
echevemaster_ has joined #ruby
<rawng>
so I would be referencing @var4
mikurubeam has quit [Ping timeout: 256 seconds]
<apeiros>
rawng: you want a hash
<rawng>
I know that's the incorrect usage of #{}, but i'm lost
<apeiros>
@var = {}; @var[key] = value
Axsuul has joined #ruby
echevemaster has quit [Read error: Connection reset by peer]
echevemaster_ has quit [Read error: Connection reset by peer]
Neandre has quit [Ping timeout: 255 seconds]
Elhu has joined #ruby
<rawng>
I'll look into that, thanks
<apeiros>
and key can be (almost) any object. value can be any object.
echevemaster has joined #ruby
gf3 has joined #ruby
echevemaster_ has joined #ruby
echevemaster_ has quit [Read error: Connection reset by peer]
echevemaster has quit [Remote host closed the connection]
<MrZYX>
hm what would be invalid as key?
anderse has joined #ruby
echevemaster has joined #ruby
pyrac has joined #ruby
Apathetic has joined #ruby
<apeiros>
MrZYX: a key must respond to #hash and #eql?
<apeiros>
and #hash must return an Integer
frem has joined #ruby
<MrZYX>
ah
Heero` has joined #ruby
pioz has joined #ruby
<MrZYX>
didn't think of BasicObject
<apeiros>
but since Object already implements them, objects not having them are rare
rdev is now known as rdev5_work
rdev5_work is now known as rdev5|work
<apeiros>
yes, BasicObject would be a prominent example. all others would willingly & knowingly undefine those methods. or redefine them to an invalid definition
<apeiros>
that'd be lossless when converting forth and back. would make autoloaders a lot more reliable too.
Eiam has joined #ruby
<apeiros>
(though autoloaders are a non-starter due to concurrency issues anyway :-S)
<ddd>
apeiros: I'm lazy. i'd rather not have to stretch for the shift key :) thats my reasoning behind my choice, beyond that i think it reads better once you realize the convention
<MrZYX>
I hate uppercase letters in filenames though :P
<apeiros>
ddd: I'm lazy too. I want my autocomplete to work for requires as well :-p
<ddd>
hehe touche :)
jurassic has joined #ruby
<apeiros>
I hate it how I can't tell bbedit to use case-sensitive autocomplete
<apeiros>
when I have Foo and foo, I'll always get Foo as autocomplete >:(
<moshef>
I'd like to take a hash and make a condition out of it, so lets say {:key => 'value'} becomes # => if key == value. any nice way to go about it?
<peta_>
RubyMine
<peta_>
handles everything
<apeiros>
moshef: I'm not sure that makes much sense
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
<apeiros>
moshef: how do you know which key in the hash?
<peta_>
but PHP
internet_user has joined #ruby
<moshef>
I dont
Czupa has quit [Remote host closed the connection]
<DaniG2k>
peta_ but it expired
<apeiros>
peta_: it also manhandles your ram
<DaniG2k>
expires*
<DaniG2k>
true
<Hanmac>
apeiros: is it possible to an object like Marshal.dump(object) to prefent that some objects instance variables are dumbed?
yashshah_ has joined #ruby
carloslopes has quit [Remote host closed the connection]
internet_user has quit [Remote host closed the connection]
<apeiros>
not sure, I think there are newer better equivalents, though… check Marshal docs
<ddd>
yeah many people consider ~128MB of RAM excessive. but I work on machines (mainly) with 8-16GB so its not an issue for me.
etcetera has quit []
krawchyk has quit [Remote host closed the connection]
<apeiros>
ddd: huh? RubyMine easily ate 4GB-8GB here
Ontolog_ is now known as Ontolog
ilyam has joined #ruby
<Hanmac>
apeiros: okay, can you make me a sample how to do it without @observer_peers ?
<ddd>
not on mine. even using jruby 1.7.x, during tests and the like the max i had it use was 256
<apeiros>
may be due to project size…
<ddd>
apeiros: thats possible.
<ddd>
mine are really small projects
etcetera has joined #ruby
bean__ has quit [Quit: Computer has gone to sleep.]
<apeiros>
and rather large rails projects in my case
<ddd>
< 100 files in the project directory itself, at max like 10 open at the same time. really small assed projects
jlast_ has quit [Read error: Operation timed out]
yashshah has quit [Ping timeout: 256 seconds]
<ddd>
yeah that might be why then
forrest has joined #ruby
Kruppe has quit [Ping timeout: 255 seconds]
heftig has joined #ruby
jlast has joined #ruby
jekotia has joined #ruby
headius has quit [Quit: headius]
rippa has quit [Ping timeout: 240 seconds]
<apeiros>
ddd: hm, a quick check counts >800 .rb files in the project itself alone
<apeiros>
and iirc rubymine also pulls in gems from the gemfile
<ddd>
i think the max i've ever seen it report (lower right memory watcher) was 380+ but no more
nik_-_ has quit [Quit: nik_-_]
<ddd>
yeah it does
mneorr has quit [Remote host closed the connection]
<ddd>
runs bundler for you usually
<markalanevans>
When i catch an exception in ruby, is there a way i can do some sort of switch statement that checks the name/type of exception thrown?
<ddd>
then makes their source available for Jump To
<apeiros>
markalanevans: you rescue exceptions
<apeiros>
and exceptions are raised
<MrZYX>
markalanevans: make a separate rescue for each type
<markalanevans>
apeiros: right, but i want a single rescue statement
<markalanevans>
and a single function i pass the -> e to
psyprus has quit [Ping timeout: 258 seconds]
motto has quit [Quit: Sto andando via]
<markalanevans>
so it i don't have to be repetative in how i handle each case.
<paper_>
markalanevans: then you can just: rescue RescuableException and define in the === method how to proceed
chrisnicola has joined #ruby
niklasb has quit [Ping timeout: 264 seconds]
<markalanevans>
is there a way to get the exception type from the => e
<markalanevans>
like e.class
<markalanevans>
or something?
<apeiros>
e.class
<markalanevans>
hmm.
ebobby has quit [Ping timeout: 256 seconds]
<markalanevans>
Thats what i was looking for.
<MrZYX>
would like to see an example why you want to do that though
<apeiros>
you can handle a couple of exception classes in the same rescue too
<apeiros>
begin; …; rescue A, B, C; …handle A, B and C…; rescue D; …handle D…; end
DaniG2k has quit [Ping timeout: 255 seconds]
jlast has quit [Remote host closed the connection]
g0bl1n has quit [Ping timeout: 245 seconds]
<markalanevans>
Well when there are errors in my api, i catach the exception and then i need to change the view i use to render as well as get the appropriate validation errors from specific models.
Rioji has quit []
<markalanevans>
If my api works, correctly it returns HTML, on exception it returns json w/ validation or error messages.
<apeiros>
errr
<apeiros>
that's rather bad design
<markalanevans>
Well. Its really a plugin widget.
<apeiros>
and that doesn't change a thing about it being a bad design :)
<apeiros>
mime type should not change upon inner logic
<moshef>
apeiros: basically what I need to do is this - I have an array of hashes and i need to find a specific hash within that array. how should I do that?
<apeiros>
mime type should change on a) accept header or b) url
<markalanevans>
Well the alternative is returning html with an error message...
monkegjinni has joined #ruby
psyprus has joined #ruby
<moshef>
I can create a small gist if its not completely clear
<apeiros>
markalanevans: that'd be appropriate. don't forget the status code.
<markalanevans>
apeiros: would you suggest that returning html w/ an error is better.
<moshef>
basically - I need to perform a 'search' on ruby array containing hashes
<MrZYX>
moshef: #find ?
<apeiros>
markalanevans: definitively. alternatively return json in case of success too (the json can contain html as a string)
<apeiros>
markalanevans: and in both cases, again, don't forget the http status code.
brennanMKE has quit [Read error: Connection reset by peer]
keymone_ has joined #ruby
yashshah_ has quit [Ping timeout: 256 seconds]
DaniG2k has joined #ruby
<apeiros>
(ary == data)
keymone has quit [Ping timeout: 264 seconds]
keymone_ is now known as keymone
brianpWins has joined #ruby
danman has joined #ruby
<moshef>
ary == data is used where?
<moshef>
it works btw, thanks man
<apeiros>
I meant that my `ary` is your `data`
s3m73x has quit [Quit: I'm using a Free IRC Bouncer from BNC4FREE - http://bnc4free.com/]
<moshef>
yeah of course
geekbri has quit [Remote host closed the connection]
estjang has joined #ruby
EPIK has joined #ruby
benweint has joined #ruby
adamjleonard has quit [Read error: Connection reset by peer]
vaicine has quit [Changing host]
vaicine has joined #ruby
ebobby has joined #ruby
br4ndon has joined #ruby
endzyme has quit [Remote host closed the connection]
<apeiros>
you could probably speed it up by doing: keys = options.keys; values = options.values; data.find { |hash| hash.values_at(*keys) == values }
workmad3 has joined #ruby
endzyme has joined #ruby
Burgestrand has joined #ruby
mneorr_ has joined #ruby
lele has quit [Ping timeout: 256 seconds]
rcosta has joined #ruby
ph^ has quit [Remote host closed the connection]
ar_d has joined #ruby
<ar_d>
hi
Hanmac2 has quit [Quit: Leaving.]
<ar_d>
I have this expression ---> time = (a['TIMEOUT'].zero?) ? 50 : a['TIMEOUT']
<ar_d>
but I would like that in case a['TIMEOUT'] is zero, instead of being 50, infinite, is that possible ?
Hanmac1 has joined #ruby
<bean>
depends on what the syntax for infinite is, if it exists, ar_d
<apeiros>
Float::INFINITY
<bean>
ah, good point
rmartin_ has quit [Remote host closed the connection]
<bean>
an infinite timeout sounds scary
<MrZYX>
still depends on what time is passed to though
mengu has quit [Ping timeout: 264 seconds]
<apeiros>
depending on where you use it, nil or 0 might actually mean infinite, though
<ar_d>
in case a['TIMEOUT'] I want a function runs until it finishes
<ar_d>
that way I dont want to set a value
mercwithamouth has joined #ruby
<ar_d>
I have this wait
<apeiros>
bean: it's pretty common. you use infinite timeouts all day with ruby.
jnoob22 has quit [Remote host closed the connection]
<bean>
valid.
<apeiros>
bean: e.g. Kernel#gets has an infinite timeout
<bean>
ah, i guess I was more thinking web wise.
<ar_d>
::Timeout.timeout(time) do ---- myfunction end
thetristan has quit [Quit: thetristan]
daniel_- has quit [Read error: Operation timed out]
subbyyy_ has quit [Ping timeout: 248 seconds]
<apeiros>
well, there the timeouts are usually given from the context (e.g. the browser or the server which will probably time out before your script does)
<ar_d>
only if a['TIMEOUT'] has a certain value I want the timeout but if is zero I want the function finishes. (sorry for my english)
endzyme has quit [Remote host closed the connection]
<DaniG2k>
guys, in ruby how does it work with all these identical methods? for instance, count and length return the same on an array. Are they referring to the same internal code but just have different names?
workmad3 has quit [Ping timeout: 255 seconds]
<apeiros>
DaniG2k: you are aware that documentation exists, yes?
DrShoggoth has joined #ruby
tomsthumb has joined #ruby
<apeiros>
count and length are two different methods
oneiroph1en has quit [Ping timeout: 245 seconds]
<apeiros>
there are aliases, however. e.g. Array#map and #collect
<apeiros>
or #length and #size
daniel_- has joined #ruby
<apeiros>
and a couple of dozen others
mneorr_ has quit [Ping timeout: 246 seconds]
chandankumar has quit [Quit: Leaving]
bigoldrock has left #ruby [#ruby]
thetristan has joined #ruby
mmitchel_ has quit [Remote host closed the connection]
ariedler has quit [Remote host closed the connection]
Andromeda has joined #ruby
skattyadz has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
jonathanwallace has joined #ruby
chrisnicola has quit [Quit: This computer has gone to sleep]
danslo has quit [Quit: danslo]
wsterling has quit [Read error: Connection reset by peer]
<ar_d>
apeiros: this seems to work --> time = (a['TIMEOUT'].zero?) ? nil : a['TIMEOUT']
benweint has quit [Quit: Computer has gone to sleep.]
wsterling has joined #ruby
<apeiros>
ar_d: funny, I actually checked Timeout#timeout's documentation and it didn't mention that nil was accepted
<apeiros>
good to know, though
s3m73x has joined #ruby
<ar_d>
wait a second
<ar_d>
want to be sure
<ar_d>
I let you know
khismetix has quit [Ping timeout: 264 seconds]
sailias has quit [Ping timeout: 245 seconds]
<apeiros>
ar_d: a short test seems to confirm you
chrisnicola has joined #ruby
<apeiros>
and checking the code confirms you too
<apeiros>
`return yield(sec) if sec == nil or sec.zero?`
<apeiros>
ew, sec == nil, why not .nil? ? ugly :)
nadirvardar has quit [Ping timeout: 240 seconds]
gaahrdner has quit [Remote host closed the connection]
endzyme has joined #ruby
lele has joined #ruby
ariedler has joined #ruby
endzyme has quit [Remote host closed the connection]
<ar_d>
nice thank you so much apeiros :)
chrisnicola has quit [Client Quit]
chrishough has quit [Quit: chrishough]
<MrZYX>
ar_d: if you take a careful look at the line apeiros posted and then check your time = ... statement again you'll notice that you can pass a['TIMEOUT'] directly ;)
<bean>
since it'll be nil if not defined, and the desired timeout if it is
<bean>
;)
<apeiros>
and that'd be number 3 on my doc-patch list for this week-end
nadirvardar has joined #ruby
<MrZYX>
\o/
<apeiros>
I triple checked now - nil/0 is not mentioned in the docs
LennyLinux has joined #ruby
<apeiros>
irc would really have been a trove for ruby core to improve the docs… how sad they never used it as such… also iirc there have been a couple of doc-wiki attempts…
adamjleonard has joined #ruby
<ddd>
apeiros you mean nil.to_i == 0 ?
<apeiros>
ddd: huh?
<ddd>
the nil/o
<apeiros>
ddd: no, we're talking about Timeout#timeout
<ddd>
err s/o/0/
<ddd>
ohhhh
marr has joined #ruby
<ddd>
nm, totally misread that hehe
<apeiros>
0 and nil are taken as "infinite timeout"
<ddd>
got ya
<apeiros>
and that's undocumented
pib1943 has quit [Write error: Broken pipe]
<ar_d>
MrZYX: you are right thank you
BaconRose has joined #ruby
i_s has joined #ruby
v0n has quit [Ping timeout: 252 seconds]
memristor has joined #ruby
Rumsteak has joined #ruby
chrishough has joined #ruby
freerobby has joined #ruby
dagnachew has joined #ruby
Matip has quit [Ping timeout: 252 seconds]
ar_d has quit [Ping timeout: 255 seconds]
ariedler has quit [Remote host closed the connection]
anderse has quit [Quit: anderse]
ctp has joined #ruby
emmanuelux has quit [Ping timeout: 276 seconds]
pib1964 has joined #ruby
thatRD has quit [Quit: thatRD]
wudofyr has quit [Remote host closed the connection]
blueOxigen has quit [Ping timeout: 276 seconds]
wudofyr has joined #ruby
workmad3 has joined #ruby
zastern has joined #ruby
spider-mario has quit [Remote host closed the connection]
<zastern>
In this code - https://gist.github.com/zacharyalexstern/5340614 - does the -1 on line three just mean "until the end"? (Yes, I realize that this is a terrible way to capitalize the first letter of a string, don't worry about that)
supergiantrobot_ has joined #ruby
endzyme has joined #ruby
ssvo_ has joined #ruby
ssvo_ has quit [Client Quit]
monkegjinni has quit [Remote host closed the connection]
<Xeago>
Hanmac: you got some c++ knowledge
<Xeago>
need some help
<apeiros>
zastern: 1..-1 means the range from offset 1 to offset -1, and -n is counted from the end
<zastern>
apeiros: mm I guess I don't know what offset -1 is
<zastern>
oh wait i get it maybe
lmf40 has quit [Read error: Connection reset by peer]
<apeiros>
well, the range is strictly speaking the range from 1 to -1, and String#[] interprets ranges as "from offset to offset"
<Xeago>
what does adj[i].push_back(j); do, where adj is a vector<int> adj[MAXN+1];
<apeiros>
and interpretes negative offsets as "from the end"
<apeiros>
and -1 is indeed the last offset
pioz has quit [Quit: This computer has gone to sleep]
<zastern>
and the offset -1 means the last character of the string, basically?
<apeiros>
gyre007: if you only *build* it, it'll be in your current working directory
<gyre007>
ah apeiros I see
<gyre007>
yeah gem env show install dir
<gyre007>
not build dir
Ankhers has quit [Remote host closed the connection]
zph has quit [Quit: Computer has gone to sleep.]
skroon has quit [Read error: Connection reset by peer]
Davey has quit [Quit: Computer has gone to sleep.]
skroon has joined #ruby
Nisstyre has joined #ruby
oponder has joined #ruby
<rawng>
apeiros: thanks for doing the work for me xD
philcrissman has joined #ruby
nomenkun has quit [Remote host closed the connection]
wudofyr has quit [Remote host closed the connection]
wudofyr has joined #ruby
sambio has quit []
aytch has joined #ruby
<paper_>
apeiros: what's up broseph
adamjleonard has quit [Read error: Connection reset by peer]
mattbl has quit [Quit: Leaving]
jmeeuwen has quit [Read error: Operation timed out]
adamjleonard has joined #ruby
mattbl has joined #ruby
tomku has joined #ruby
* apeiros
not sure how to take "broseph"
cbot_ has quit [Ping timeout: 245 seconds]
<fignew>
apeiros: common brogrammer greeting
mattbl has quit [Client Quit]
<apeiros>
I don't like the exclusive nature of the "bro" meme
<gyre007>
guys I have this gemspec (just the important bits are here) https://gist.github.com/milosgajdos83/5340843 , I build a gem locally but when I try to install it it says that it cant resolve dependency with typhoeus
cobragoat has quit [Remote host closed the connection]
<gyre007>
I thought that it would download it and install it automatically
<gyre007>
but I guess I need to install it manually ?
<paper_>
apeiros: lol r u into the whole feminist kick too
<apeiros>
paper_: watch it
cobragoat has joined #ruby
<paper_>
apeiros: are you a steveK groupie? :)
<apeiros>
no. I'm neither a feminist.
i_s has quit [Quit: i_s]
<apeiros>
that doesn't mean I just wave and pretend that issue doesn't exist.
wsterling has quit [Remote host closed the connection]
philcrissman has quit [Remote host closed the connection]
<paper_>
apeiros: what did u think of the whole adria richards thing?
jon_w has quit [Quit: The 7 Deadly Sins: Nothing compares to it! [www.t7ds.com.br]]
ph^ has joined #ruby
emmanuelux has joined #ruby
Davey has joined #ruby
<apeiros>
assuming this is what happened: they chatted to each other, she took the pic, the two got put out of the conf, the one guy got fired, she got fired
<apeiros>
then I think: I think lots of people messed up. I think the two had a private chat and she had no right to eavesdrop, and even less to publicize the picture of the two. I find it bad that they got put out of the conf, I also think the employer of that one guy was an asshole for firing him. Similarly I find it dickish that she got fired over it.
Pentium has quit [K-Lined]
failshell has quit [Remote host closed the connection]
<paper_>
well i think she was fired for a few reasons that kind of make sense
xardas has quit [Ping timeout: 240 seconds]
<apeiros>
as said, assuming she got fired for this, then I find it unjustified
adamjleonard has quit [Quit: Leaving...]
cobragoat has quit [Ping timeout: 264 seconds]
<paper_>
1. her job is to bring developers together, but she hugely divided the developer community. So you can imagine she could no longer perform her job well, on behalf of the company, as many devs would have been hostile towards her
<paper_>
sorry, hostile was the wrong word
i_s has joined #ruby
<apeiros>
anyway, a) I wasn't there, b) all I know is hearsay, c) there's no point in arguing about something I have so little facts.
<paper_>
i mean, they probaby couldn't work effecitvely with her
zph has joined #ruby
baphled has quit [Ping timeout: 252 seconds]
snorkdude has joined #ruby
<paper_>
apeiros: so i think for purely practical/business reasons her firing was justified, the company could no longer benefit from her services
csaunders has quit [Quit: Computer has gone to sleep.]
Vivekananda has quit [Quit: Ex-Chat]
<Jonah11_>
I have a master script that runs a number of other scripts. Currently the master is just "require"-ing the other scripts, but i'm using too much RAM that way. What's the best way to say run the sub-scripts and then have any objects they create disappear from memory after they're finished executing?
<majikbytes>
loop through the files, read/execute them
<majikbytes>
then exit the ruby process
<apeiros>
Jonah11_: fork
julian-delphiki has quit [Ping timeout: 240 seconds]
arya has quit [Ping timeout: 248 seconds]
<apeiros>
Jonah11_: you may want to take a look at my fork gem, which makes that a bit easier.
<apeiros>
not portable to windows, though (since windows has no fork)
justsee has joined #ruby
justsee has joined #ruby
snorkdude has joined #ruby
carlyle has quit [Remote host closed the connection]
mneorr has joined #ruby
cloke has joined #ruby
bttf has joined #ruby
chrisnicola has quit [Client Quit]
Morkel has quit [Quit: Morkel]
<Jonah11_>
It sounds like either of those solutions would work. majikbytes method might be better for my purposes just for simplicity. But I'm unclear which method I should use to execute each subscript?
samuel02 has quit [Remote host closed the connection]
<Jonah11_>
apeiros, cool. i don't need to do any communication with them. just run them. if i use fork as you did above, will they execute sequentially or in parallel?
josa has joined #ruby
<apeiros>
Jonah11_: well, communication can also mean rescuing exceptions
<apeiros>
a fork creates a new process
jtharris has quit [Quit: WeeChat 0.4.0]
josa has left #ruby [#ruby]
<apeiros>
so it should run concurrently
ibash has joined #ruby
<apeiros>
(parallel depends on your hardware and OS)
ibash has left #ruby [#ruby]
<Jonah11_>
apeiros, is there a way to make it wait for each one to finish before going onto the next?
dustint_ has quit [Ping timeout: 240 seconds]
maxmanders has quit [Quit: Computer has gone to sleep.]
<apeiros>
that's part of "communication" which my gem makes easier ;-)
<apeiros>
yes, there is. fork returns the pid. you can use Process.wait or Process.wait2 to wait for the child to exit.
<apeiros>
Fork.new(…) { … }.wait
CLUSTERfoo has joined #ruby
samuel02 has quit [Ping timeout: 256 seconds]
tealmage has joined #ruby
hit has quit [Quit: hit]
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
<csmrfx>
fork you, too!
etcetera has quit []
ariedler has quit [Remote host closed the connection]
<Jonah11_>
apeiros, yeah this would be overkill i think for essentially solving the problem of putting each include into its own memory context. What if I just do the require inside of a block?
enebo has quit [Quit: enebo]
<csmrfx>
you want modules now?
<apeiros>
executing it in a block won't make your resource problems go away, no
<csmrfx>
I dont see how needing X using Y mem can be gotten around
<apeiros>
make sure your code stops referencing objects from the required piece of code. then you shouldn't need running in subprocesses.
<apeiros>
csmrfx: his issues seems to be more like X using Y mem even after X has finished
<apeiros>
and then comes X2 which also uses Y mem, and suddenly you have n*Y mem used
<apeiros>
aka leak
chrisnicola has quit [Quit: This computer has gone to sleep]
<cloke>
anyone have a recommendation for ldap and ruby? seems that most ldap gems are abandoned.
jonahR has quit [Quit: jonahR]
* csmrfx
still has 1.8 and 1.9 codez that need to be "ported" to 2.0
<Jonah11_>
csmrfx, thanks, that looks useful
<CLUSTERfoo>
apeiros: i'm on the one before that though. " result = my_global_method 2, 3; assert_equal __(5), result" <- this souldn't be ambiguous, no?
wsterling has quit [Remote host closed the connection]
sepp2k has quit [Remote host closed the connection]
zph has joined #ruby
twoism has quit [Ping timeout: 256 seconds]
eykosioux has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
t0rc has joined #ruby
endzyme_ has joined #ruby
gabrielrotbart has joined #ruby
chrisnicola has joined #ruby
endzyme_ has quit [Remote host closed the connection]
<csmrfx>
where is 'trap'?
<csmrfx>
nm, kernel of course
t0rc has quit [Client Quit]
<paper_>
csmrfx: Object has no methods on its own
<paper_>
not a single one (that wasn't patched in after the fact)
splud has quit [Quit: splud]
endzyme has quit [Ping timeout: 240 seconds]
<xybre>
paper_: Object.instance_methods gives me quite a few.
<paper_>
xybre: cos u're ot using it right :)
doritostains has joined #ruby
<paper_>
xybre: Object.instance_methods(false)
ffranz has joined #ruby
<xybre>
BasicObject.instance_methods gives me less, but still some.
chrishough has quit [Quit: chrishough]
generalissimo has joined #ruby
<paper_>
xybre: the instance methods reeturned by Object.instance_methods(false) you can quite easily chedk are all just monkey patches
<xybre>
paper_: Actually most of them are inhereited from Kernel.
freerobby has joined #ruby
<xybre>
paper_: The rest come from BasicObject.
<xybre>
No monkey patches, just inheritence.
<paper_>
xybre: yes, Object has 0 instance methods of its own
<paper_>
xybre: im talking about instance methods that are *defined on* Object :)
<paper_>
not inherited ones or monkey-patched ones
<csmrfx>
lel
<xybre>
paper_: They weren't patched in after the fact, thats for sure.
<csmrfx>
you mean: the object class defines none
<paper_>
xybre: yeah they were, check their source_location
MrZYX is now known as MrZYX|off
<paper_>
csmrfx: in core i mean, yes
<paper_>
of course other methods in stdlib/gems can add to it later
<paper_>
but im talking about what's in core
<csmrfx>
not sure why you started this
twoism has joined #ruby
chrisnicola has quit [Quit: This computer has gone to sleep]
Apathetic has joined #ruby
<paper_>
csmrfx: i didnt really start anything, i just stated the fact that Object has 0 instance methods of its own (that are defined on it directly), it's a bit interesting
<csmrfx>
but.. but... why
<xybre>
paper_: it's not monkey patched, its C.
<paper_>
xybre: which methods?
<paper_>
xybre: and C extensions can monkeypatch
MrZYX|off is now known as MrZYX
<xybre>
It's in core, its not an extension.
althara has left #ruby [#ruby]
<paper_>
xybre: what method are you talking about?
<paper_>
xybre: seems to be defined on BasicObject not Object ;)
<paper_>
xybre: got another one?
<xybre>
paper_: No shit, I said that.
<xybre>
I said it wasn't monkey patched.
<paper_>
xybre: and i said i was talking about methods defined specifically *ON* Object
<paper_>
i dont give a fuck what it's inheriting
idkazuma has quit [Ping timeout: 240 seconds]
<paper_>
it inherited a fuck-tonne from Kernel too, who cares
<paper_>
my point was it has no methods of its own, where it is the owner
ephemerian has quit [Quit: Leaving.]
<xybre>
k, whatever.
<csmrfx>
how do you symbolify a string?
<csmrfx>
>> Object.methods.map { |m| m.owner }
<eval-in>
csmrfx => /tmp/execpad-b1ad3ef53e7a/source-b1ad3ef53e7a:2:in `block in <main>': undefined method `owner' for :allocate:Symbol (NoMethodError) ... (http://eval.in/15698)
<paper_>
xybre: this is what the whole conversation was about, if you scroll up you'll see csmrfx said that 'trap' was defined on Kernel, and my reply was yes and Object has no methods of its own. If we were just talking about methods 'accessible' from Object (i.e inherited) then why would i have bothered to say anything?
<paper_>
I think it's a bit interesting that Object has no methods
<paper_>
that's all
<xybre>
paper_: I was only addressing your comment that Object was monkey patched.
<paper_>
xybre: yes, it is. Any methods that are returned by Object.instance_methods(false) are monkey-patched