<alanjf>
Anyone have any idea why make is failing?
* alanjf
follows link
gabrielrotbart has quit [Remote host closed the connection]
Guest53544 has quit [Quit: Leaving]
sailias has joined #ruby
statarb3 has quit [Ping timeout: 272 seconds]
jesse has quit [Excess Flood]
jesse has joined #ruby
butblack has joined #ruby
<alanjf>
pdtpatrick: thanks, but the url that they are using with curl bombs with 'error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed', looks like they have a forged cert?
* alanjf
sees if he can find the curl equiv of wget's --no-check
Guedes has quit [Quit: Saindo]
<pdtpatrick>
alan u can use wget or curl
jsaak has joined #ruby
<alanjf>
Hmm, it's not the 'curl -L https://get.rvm.io' part that's doing that it seems
himsin has joined #ruby
MattRb has joined #ruby
<alanjf>
ok ran it through wget and it downloaded rvm-installer, I assume I just run that?
jrajav has joined #ruby
<alanjf>
I'm actually not sure what `bash -s stable --ruby` is actually doing there
Alenah has joined #ruby
<ruzu>
the curl part is pulling a bash script down and the second portion is piping that script into bash to be interpreted
<alanjf>
and 'master' is actually a tar.gz file without an file extensions
ale`` has joined #ruby
ale` has quit [Read error: Connection reset by peer]
<pdtpatrick>
what's the benefit of doing it by hand?
joast has quit [Quit: Leaving.]
horofox has quit [Quit: horofox]
nomenkun has quit [Remote host closed the connection]
karupanerura has quit [Excess Flood]
<alanjf>
pdtpatrick: Well I'm not sure what to do exactly since the `bash -s stable --ruby` part fails complaining about bad SSL certs
_huoxito has quit [Quit: Leaving]
karupanerura has joined #ruby
huoxito has quit [Quit: Leaving]
mahmoudimus has joined #ruby
wendallsan has quit [Remote host closed the connection]
<alanjf>
I downloaded 'https://github.com/wayneeseguin/rvm/tarball/master' and decompressed/extracted it but I don't see a script called 'stable', so I'm not sure how to invoke what `bash -s stable --ruby` otherwise would?
fyolnish has joined #ruby
huoxito has joined #ruby
average_drifter has joined #ruby
<average_drifter>
hey
TheFuzzball has quit [Read error: Connection reset by peer]
yshh_ has joined #ruby
TheFuzzball has joined #ruby
yshh has quit [Read error: Connection reset by peer]
joast has joined #ruby
TheFuzzball has quit [Client Quit]
kiyoura has quit [Ping timeout: 246 seconds]
jgrevich has joined #ruby
<shevy>
alanjf why dont you download the zip file
jjbohn has joined #ruby
seejohnrun has joined #ruby
<shevy>
this URL is a .tar.gz btw
seejohnrun has left #ruby [#ruby]
megha is now known as gia
_nitti has joined #ruby
main has joined #ruby
<shevy>
did you try "./install"?
<alanjf>
shevy: yes, I did downloaded it and extracted it, as I said already, and yes there is a install script and I tried passing '--ruby' to it but it would not take it.
anomaly has joined #ruby
MattRb has quit [Quit: MattRb]
tommyvyo has quit [Quit: Computer has gone to sleep.]
<shevy>
and "./install" alone wont work for you? it installed to /usr/local/rvm/ for me
<alanjf>
According to https://rvm.io/rvm/install, the original line is 'curl -L https://get.rvm.io | bash -s stable --ruby', but what is 'stable --ruby' being run against exactly?
jrajav has quit [Quit: I tend to be neutral about apples]
<alanjf>
shevy: yes, it did install to /usr/local/rvm/, make ruby's make still fails
<shevy>
"make: *** [doc/capi/.timestamp] Error 1"
<shevy>
that make error is not very specific
<shevy>
does it not state another error before that?
Umren|2 has joined #ruby
Hanmac1 has joined #ruby
gabrielrotbart has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
whitedawg has joined #ruby
whitedawg has quit [Client Quit]
whowantstolivef1 has quit [Ping timeout: 272 seconds]
wroathe has joined #ruby
Umren has quit [Ping timeout: 265 seconds]
tommyvyo has joined #ruby
jimeh has quit [Quit: Computer has gone to sleep.]
h4mz1d has joined #ruby
johnmilton has quit [Ping timeout: 244 seconds]
joofsh has joined #ruby
pskosinski has quit [Quit: Learn Life's Little Lessons]
lolcathost has quit [Read error: Connection reset by peer]
lolcathost has joined #ruby
pskosinski has joined #ruby
MattRb has joined #ruby
marienz has quit [Read error: Operation timed out]
Spooner has quit [Quit: Leaving]
marienz has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
whitedawg has joined #ruby
jaygen has quit [Remote host closed the connection]
anomaly has left #ruby ["Leaving"]
jduan1981 has quit [Ping timeout: 272 seconds]
fjfish has joined #ruby
adeponte has quit [Remote host closed the connection]
Alenah has joined #ruby
Alenah has quit [Excess Flood]
nathancahill has joined #ruby
francisfish has quit [Ping timeout: 265 seconds]
fir_ed has quit [Ping timeout: 272 seconds]
skcin7 has joined #ruby
kiyoura has joined #ruby
fir_ed has joined #ruby
h4mz1d has quit [Ping timeout: 276 seconds]
BoomCow has quit [Quit: This computer has gone to sleep]
_nitti has quit [Remote host closed the connection]
butblack has quit [Quit: butblack]
stevechiagozie has joined #ruby
pac1 has quit [Quit: I got it one line of code at a time]
crackfu has quit [Remote host closed the connection]
crackfu has joined #ruby
MattRb has joined #ruby
karupanerura has quit [Excess Flood]
generalissimo has quit [Remote host closed the connection]
lolcathost has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
lolcathost has joined #ruby
karasawa has quit [Ping timeout: 264 seconds]
yshh has joined #ruby
jjbohn is now known as jjbohn|afk
karupanerura has joined #ruby
crackfu_ has joined #ruby
jeffreybaird has joined #ruby
crackfu has quit [Ping timeout: 264 seconds]
mercwithamouth has quit [Ping timeout: 272 seconds]
stopbit has quit [Quit: Leaving]
crackfu_ has quit [Remote host closed the connection]
crackfu has joined #ruby
nathancahill_ has joined #ruby
nathancahill has quit [Ping timeout: 276 seconds]
nathancahill_ is now known as nathancahill
jjbohn|afk has quit [Quit: Leaving...]
crackfu has quit [Ping timeout: 260 seconds]
pen has quit [Remote host closed the connection]
oscardelben has quit [Quit: oscardelben]
mneorr has joined #ruby
artifex has joined #ruby
Fezzler has quit [Quit: Leaving]
jgrevich has quit [Quit: jgrevich]
<r3nrut>
Looking for some online reading material for more advances tips and techniques with Ruby. Any suggestions? Things like syntax shortcuts, one liner conditional statements and whatnot. Trying to put together a training guide for co-workers.
lolcathost has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
maletor has joined #ruby
<reactormonk>
r3nrut, do oneliners only if you go functional
<aytch>
training people to use shortcuts - at least in my experience - is a bad idea
<aytch>
I'm an amateur coder, but a long-time sysadmin
jekotia has quit [Read error: Connection reset by peer]
larissa has quit [Quit: Leaving]
Takehiro has joined #ruby
<reactormonk>
aytch, could you got a little more specific?
<RubyPanther>
I agree, most shortcuts are debt and will be paid with interest.
<aytch>
Training someone to use a shortcut can give them an edge in doing things better, but if they haven't reached that shortcut through their own understanding, they are likely to make mistakes that they don't understand
breakingthings has quit []
benlieb has quit [Quit: benlieb]
<aytch>
because they don't understand *why* the shortcut works, they can't think through the steps behind it
<aytch>
and I'm totally in agreement with RubyPanther
yshh has joined #ruby
chimkan has joined #ruby
clooth has quit [Quit: clooth]
r0bby_ has joined #ruby
clooth has joined #ruby
<aytch>
reactormonk: I would think a good way to teach this way of thinking/shortcuts would be to take a piece of code you've refactored, and present on that.
lolcathost has joined #ruby
<aytch>
You can guide them through your changes, and your thinking behind those changes
MattRb has quit [Quit: MattRb]
<aytch>
That gives context into the insight behind shortcuts
chimkan has quit [Remote host closed the connection]
chimkan_ has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
<RubyPanther>
Ruby is mostly not good for one-liners unless you're already comfortable choosing it. For that most people should use Perl or bash, probably. I kept using Perl for sysadmin stuff until I forgot eventually forgot it from lack of use.
h4mz1d has joined #ruby
clooth has quit [Quit: clooth]
a_a_g has joined #ruby
zehrizzatti has joined #ruby
yacks has joined #ruby
_nitti has joined #ruby
_nitti has quit [Ping timeout: 260 seconds]
generalissimo has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
jjbohn has joined #ruby
mockra has quit [Remote host closed the connection]
<dominikh>
you should work through a basic ruby tour or a book, those are pretty basic features of the language :)
<dominikh>
in this case, it's related to blocks
<Norrin>
ok. i'll find a block chapter.
<dominikh>
(fwiw, isaac isn't the best source for good ruby)
<Norrin>
i've done a lot of intro ruby stuff actually
<dominikh>
and what & does here is take a proc/lambda and treat it as a block
<Norrin>
it's all too basic though
<Norrin>
they always trying to turn it into some game
<Norrin>
all the cutesy ruby intro the main site has linked
<dominikh>
I'd probably just read the Pickaxe (aka Programming Ruby). learning ruby has been progressively dumbed down over the years; the book just describes the language features (and doesn't use a game for doing so)
kiyoura has quit [Quit: Leaving]
cha1tanya has joined #ruby
cha1tanya has joined #ruby
<X-Jester>
welp
<X-Jester>
if you can dodge a wrench, you can dodge a ball
<X-Jester>
AMIRITE?
<Norrin>
isaac happens to be the only intro level project i have a need for ruby in
<Norrin>
the lacking docs force me to read it
<dominikh>
doesn't mean it's well written ;) but yeah
yacks has quit [Ping timeout: 260 seconds]
mockra has joined #ruby
stonevil has quit [Quit: stonevil]
CamonZ has joined #ruby
cheez0r has quit [Read error: Operation timed out]
cheez0r has joined #ruby
<dominikh>
bedtime for me. good luck with ruby
stevechiagozie has quit [Quit: Computer has gone to sleep.]
<Norrin>
dominikh, good night
a_a_g has quit [Quit: Leaving.]
ejnahc has quit [Remote host closed the connection]
ejnahc has joined #ruby
dankest is now known as dankest|away
dankest|away has quit [Quit: Leaving...]
jjbohn has joined #ruby
dankest has joined #ruby
drago757 has quit [Quit: drago757]
jjbohn has quit [Ping timeout: 245 seconds]
landho has quit [Remote host closed the connection]
CodeVision has joined #ruby
Takehiro_ has joined #ruby
Takehiro has quit [Read error: Connection reset by peer]
DrCode has quit [Remote host closed the connection]
milesforrest has left #ruby [#ruby]
toekutr has quit [Remote host closed the connection]
DrCode has joined #ruby
<zehrizzatti>
Norrin: it's getting 2 values from the array
jonahR has quit [Quit: jonahR]
<zehrizzatti>
a, b = *[1, 2] --> a = 1, b = 2
<zehrizzatti>
something like that :p
lolcathost has quit [Ping timeout: 260 seconds]
<Norrin>
so * and & are basically just toggles?
<Norrin>
changes an array to elements and elements to an array?
<Norrin>
and changes a proc to a block and a block to a proc?
<zehrizzatti>
* has to do with arrays, and & with blocks/procs
<Norrin>
never seen a toggle operator before in a programming language
BoomCow has quit [Quit: Leaving]
<Norrin>
its purpose seems to alternate
<zehrizzatti>
what's the & example?
<zehrizzatti>
u refer to
dankest is now known as dankest|away
dankest|away has quit [Quit: Leaving...]
<Norrin>
lines 23 and 104
skcin7 has quit []
<Norrin>
near as i can tell, line 23 turns a block to a proc, but line 104 uses the same operator to turn a proc into a block
dwu1 has joined #ruby
<Norrin>
"toggle operator"
<zehrizzatti>
both are & for blocks/procs
<zehrizzatti>
yep
<Norrin>
wow
<zehrizzatti>
it's complicated :D
<Norrin>
anyone else find this amazing? an operator whose purpose changes....
<zehrizzatti>
the thing is, in L23, it is a bit different because it is in a method definition
a_a_g has joined #ruby
<zehrizzatti>
so that says u want to capture the passed in block as an argument, named "block"
<Norrin>
if it was that simple, there'd be no & though?
<Norrin>
the & seems to mean, change the class from block to proc
<zehrizzatti>
in L104 your saying, "send this message, :define_method with arguments :isaac... and that callable block"
<Norrin>
if block was a class. i don't see it in ruby doc
<zehrizzatti>
the block is an instance of Proc
<zehrizzatti>
which is the callable I meant
<Norrin>
zehrizzatti, what does 103 do?
<zehrizzatti>
Norrin: dude, sure u need to understand that?
<zehrizzatti>
lol
<Norrin>
actually i'm having a problem that might be related to it
<Norrin>
#{channel} isn't resolving from on join methods, if you know what i mean
<zehrizzatti>
hang on, let me check what that project is about.
aldodelgado has quit [Quit: aldodelgado]
<Norrin>
correction, #{channel} doesn't resolve from the the bot::join method
<Norrin>
but it does resolve from dsl defined on join methods,
s7ry93r has quit [Quit: s7ry93r]
rakl has quit [Read error: Connection reset by peer]
rakm has quit [Read error: Connection reset by peer]
clooth has joined #ruby
serhart has quit [Quit: Leaving.]
<zehrizzatti>
well, basically, L103 gets u a reference to the class of the object and L104 will define a function on the fly that will handle some action for u, during runtime
jjbohn has joined #ruby
browndawg has joined #ruby
<Norrin>
adds self to class? and then self by itself. and then end
shevy2 has joined #ruby
<Norrin>
end with no do
<Norrin>
<< is append?
lolcathost has joined #ruby
tagrudev has joined #ruby
<zehrizzatti>
no, it's a contrived syntax to return that "self", the reference to that class it needs
shevy has joined #ruby
Takehiro has joined #ruby
Takehiro_ has quit [Read error: Connection reset by peer]
<Norrin>
but all the other vars such as #{nick}, #{user} etc resolve fine in the on :join method
pen has joined #ruby
<Norrin>
my current link of thinking is it has to do with def join in isaac using a channel.each block
<Norrin>
whereas the other defs do the resolution outside of a sub block
lolcathost has quit [Ping timeout: 260 seconds]
moshee has quit [Ping timeout: 272 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
<Norrin>
s/link/line
robbyoconnor has joined #ruby
dnyy has quit [Remote host closed the connection]
h4mz1d has quit [Ping timeout: 240 seconds]
elsifaka has joined #ruby
<zehrizzatti>
hang on
pavilionXP has quit [Read error: Connection reset by peer]
r0bby_ has quit [Ping timeout: 252 seconds]
<Norrin>
k
<Norrin>
i think i just notice channel doesn't get set
<Norrin>
on kick messages
gabrielrotbart has quit [Remote host closed the connection]
<Norrin>
line 253
apeiros_ has quit [Remote host closed the connection]
<Norrin>
due to line 270
timonv has joined #ruby
<zehrizzatti>
Norrin: I was gonna tell u to turn verbose on
<zehrizzatti>
L150
a_a_g has quit [Quit: Leaving.]
<zehrizzatti>
It will show the full input, from which the kick is processed
generalissimo has quit [Remote host closed the connection]
<Norrin>
i have it on. the message i get from that kick method is:
<Norrin>
<< :username!~ident@host KICK #channel username :Your behavior is not conducive to the desired environment.
<Norrin>
not from the kick method, but from the kick occuring
<Norrin>
looks like the gem has to be edited. i can get clone it. but need to know how to change the require line to use the local gem instead of the ruby gem one
adeponte has quit [Remote host closed the connection]
h4mz1d has joined #ruby
xpen has quit [Read error: Connection timed out]
xpen has joined #ruby
quest88 has quit [Quit: quest88]
r3nrut has quit [Ping timeout: 248 seconds]
ale``` has joined #ruby
ale`` has quit [Read error: Connection reset by peer]
gia has quit [Ping timeout: 248 seconds]
lkba has joined #ruby
pen has quit [Remote host closed the connection]
<zehrizzatti>
Norrin: change L270
<zehrizzatti>
add KICK to the list, and u are golden
<Norrin>
ok. how do i require a local module instead of the stuff that ruby gems has installed?
<Norrin>
ran gem uninstall isaac & it's not removing it.
<Norrin>
zehrizzatti ^
<zehrizzatti>
Norrin: just redefine that method for now
<zehrizzatti>
pastie
<Norrin>
yeah, i can't stop the script from using the ruby gem though
<Norrin>
i guess i can edit the ruby gem directly
clocKwize has joined #ruby
timonv has quit [Remote host closed the connection]
pen has quit [Read error: Connection reset by peer]
<Norrin>
Hanmac, so what does class << self do?
a_a_g has joined #ruby
<Norrin>
and everything else on that line..
pencilcheck has quit [Read error: Connection reset by peer]
gfhgfhdty has joined #ruby
pen has joined #ruby
<Hanmac>
it opens the singleton class of self, than it picks the self in this new context (the singlerton class) and returns it ... it is similar to use the result of singleton_class
<Hanmac>
its because singleton_class is a "new" function and was not defined in 1.8.7
beiter has joined #ruby
h4mz1d has quit [Ping timeout: 240 seconds]
<Norrin>
ok, i guess i get it. creates a class, inherented from self or something
<Norrin>
and returns self.
<Norrin>
i couldn't tell a block was being started there at first. Now i'm bring to understand line 104
<Norrin>
don't understand where vars :define_method and :__isaac_event_handler are coming from -- where they're declared & defined/initiated
dhruvasagar has quit [Ping timeout: 256 seconds]
TheFuzzball has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
dhruvasagar has joined #ruby
pen has quit [Remote host closed the connection]
<Hanmac>
it is for so you can define object-bounded methods ... imo define_singleton_method is the better method than define_method on singletonclass
pen has joined #ruby
TheFuzzball has joined #ruby
<Hanmac>
but imo the code could be better ... the invoke method can be done with fewer lines and better looking
TheFuzzball has quit [Max SendQ exceeded]
gnul0ver has joined #ruby
TheFuzzball has joined #ruby
jprovazn has joined #ruby
beilabs has quit [Ping timeout: 255 seconds]
TheFuzzball has quit [Max SendQ exceeded]
Spami has quit [Quit: This computer has gone to sleep]
wreckimnaked has joined #ruby
mneorr has joined #ruby
TheFuzzball has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
pen has quit [Read error: Connection reset by peer]
schaerli has joined #ruby
<Norrin>
i found the send method on object.
main has quit [Ping timeout: 265 seconds]
pen has joined #ruby
dhruvasagar has quit [Ping timeout: 260 seconds]
<Hanmac>
Norrin: send is when you want to call an method based on a string, or in like in this case when you want to call an method that is protected or private
<Norrin>
i can't find this :define_method though
dhruvasagar has joined #ruby
<Norrin>
or :__isaac_event_handler
<Norrin>
its private and that's why its not in the docs?
wreckimnaked has quit [Read error: Operation timed out]
<Hanmac>
the isaac is the name of the defined method (but as far as i can see the method is not needed :/ i mean its called from the same function so defining an method is unnessary )
Jasko has quit [Ping timeout: 265 seconds]
cirwin has quit [Quit: Leaving.]
apeiros_ has joined #ruby
browndawg has joined #ruby
jduan1981 has quit [Quit: jduan1981]
pavilionXP has joined #ruby
jjbohn has joined #ruby
apeiros_ has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 240 seconds]
megha has joined #ruby
vlad_starkov has joined #ruby
apeiros_ has joined #ruby
zmo_ has joined #ruby
dhruvasagar has joined #ruby
nemesit has joined #ruby
jjbohn has quit [Ping timeout: 260 seconds]
pen has quit [Read error: Connection reset by peer]
pen has joined #ruby
jimeh has joined #ruby
elico has joined #ruby
rakl has quit [Quit: sleeping]
pen has quit [Read error: Connection reset by peer]
pen has joined #ruby
henn1nk has joined #ruby
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
karupanerura has quit [Excess Flood]
yacks has joined #ruby
huoxito has quit [Ping timeout: 272 seconds]
headius has quit [Quit: headius]
grzywacz has joined #ruby
megha has quit [Ping timeout: 276 seconds]
karupanerura has joined #ruby
arturaz has joined #ruby
arturaz has quit [Remote host closed the connection]
arturaz has joined #ruby
gnul0ver has left #ruby ["Leaving"]
havenn has quit [Ping timeout: 260 seconds]
rellin has quit [Ping timeout: 252 seconds]
RagingDave has joined #ruby
Elhu has joined #ruby
jds has quit [Remote host closed the connection]
wreckimnaked has joined #ruby
mneorr has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
mneorr has joined #ruby
vlad_starkov has joined #ruby
haxrbyte has joined #ruby
mpfundstein has joined #ruby
clocKwize has quit [Quit: clocKwize]
blacktulip has joined #ruby
haxrbyte_ has joined #ruby
clocKwize has joined #ruby
pen has quit [Read error: Connection reset by peer]
mockra has joined #ruby
pen has joined #ruby
banisterfiend has joined #ruby
rakl has joined #ruby
withnale has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
haxrbyte has quit [Ping timeout: 264 seconds]
havenn has joined #ruby
hoelzro|away is now known as hoelzro
TheFuzzball has quit [Read error: Connection reset by peer]
emergion has joined #ruby
mockra has quit [Ping timeout: 255 seconds]
x82_nicole has joined #ruby
elico has quit [Ping timeout: 240 seconds]
elico has joined #ruby
TheFuzzball has joined #ruby
karupanerura has quit [Excess Flood]
TheFuzzball has quit [Max SendQ exceeded]
karupanerura has joined #ruby
pencilcheck has joined #ruby
yshh has quit [Read error: Connection reset by peer]
Takehiro has quit [Remote host closed the connection]
TheFuzzball has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
elaptics`away is now known as elaptics
TheFuzzball has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
pen has quit [Ping timeout: 248 seconds]
TheFuzzball has joined #ruby
xpen has quit [Ping timeout: 260 seconds]
wreckimnaked has quit [Read error: Operation timed out]
yshh has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
DrCode has quit [Ping timeout: 276 seconds]
elico has quit [Ping timeout: 255 seconds]
DrCode has joined #ruby
clocKwize has quit [Quit: clocKwize]
elico has joined #ruby
wreckimnaked has joined #ruby
dwu1 has quit [Quit: Leaving.]
chussenot has joined #ruby
main has joined #ruby
schaerli has quit [Remote host closed the connection]
gfhgfhdty has quit []
slainer68 has joined #ruby
elico has quit [Ping timeout: 240 seconds]
tjbiddle has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
elico has joined #ruby
Spami has joined #ruby
main has quit [Max SendQ exceeded]
rdark has joined #ruby
main has joined #ruby
clocKwize has joined #ruby
<nathancahill>
hey, is there a way to have a class constant that can be retrieved without an instance of the class?
ephemerian has joined #ruby
fir_ed has joined #ruby
<apeiros_>
nathancahill: errr… that's like the standard
<Muz>
class Your; MUM = "loldongs"; end; Your::MUM
Takehiro has joined #ruby
<apeiros_>
class Foo; Bar = 'x'; end; Foo::Bar # => 'x'
nyuszika7h has quit [Quit: Here we are, going far to save all that we love - If we give all we've got, we will make it through - Here we are, like a star shining bright on your world - Today, make evil go away!]
jonathandade has joined #ruby
Vainoharhainen has joined #ruby
<Hanmac>
i tihnk he wants:
<Hanmac>
>> module ClassConstants; Bar = "x"; end; include ClassConstants;p Bar
<banisterfiend>
workmad3: what is typically meant by a web 'resource' ?
megha has joined #ruby
<workmad3>
banisterfiend: any extra context?
koshii has quit [Read error: Connection reset by peer]
<banisterfiend>
workmad3: i'm not a web developer, but in terms of general web development, and the relationshpi between resources and urls
yshh_ has quit [Remote host closed the connection]
<banisterfiend>
workmad3: this is for electronic health records
<workmad3>
banisterfiend: it could be just something on the web, it could be referring to a specific type of thing (e.g. learning resources), it could also be referring to resources in the REST sense, which is basically 'a thing that has a URL and responds to the HTTP interface'
<banisterfiend>
they appear to use the word 'resource' in a kind of specific way that assumes you know what it means, i assume it's the general parlance for web development
<banisterfiend>
workmad3: can u give more info on the REST definition?
<Hanmac>
if source is the energy from starwars so is resource the reverse of it? :D
samuel02 has joined #ruby
<workmad3>
Hanmac: that's the force
<workmad3>
Hanmac: not the source
renanoronfle has quit [Remote host closed the connection]
<workmad3>
banisterfiend: it's not a massively formal term, which is also part of the 'fun' :)
<workmad3>
banisterfiend: it's basically just a slightly jargonated term for 'a thing with a URL' in web terms :)
<banisterfiend>
workmad3: is there a difference between say a url link to an html page on some static site, and the REST idea of 'resource' ?
<banisterfiend>
like does blah.com/mystupidpage.html qualify as a resource?
lkba has quit [Ping timeout: 246 seconds]
<Hanmac>
i may be to long under linux so i associate "source" = "force" :D
<workmad3>
banisterfiend: pretty much
schaerli has quit [Remote host closed the connection]
<banisterfiend>
workmad3: really? i swore it was more sophisticated than just grandmas_web_page.html
RagingDave has quit [Read error: Connection reset by peer]
<emocakes>
banisterfiend i get a 404 for that page
RagingDave has joined #ruby
<workmad3>
banisterfiend: well, blah.com/mystupidpage.html will respond to a GET resource to retrieve it, it returns a hypermedia representation that can contain links to other resources...
<emocakes>
you might want to check your host
<banisterfiend>
workmad3: wait...i thoguht mystupidpage.html WAS the resource now you're saying it responds to a GET resource?
<workmad3>
sorry, GET request
<banisterfiend>
ah
<banisterfiend>
thanks
<workmad3>
monday morning typo :)
<banisterfiend>
workmad3: what do u mean by hypermedia reprsentation?
<workmad3>
banisterfiend: html == hyper-text markup language
<banisterfiend>
workmad3: can you give an example of other resources aside from a static html page?
<workmad3>
banisterfiend: which is a form of hypermedia (which again is basically a jargonated phrase for 'it contains links to other things')
<workmad3>
banisterfiend: a URL for a resource that responds to a POST request to create a new comment on something
<workmad3>
banisterfiend: a resource's URL that takes a DELETE request to remove it
<banisterfiend>
workmad3: so is a 'web service' a resource?
hotovson has joined #ruby
<workmad3>
banisterfiend: if it obeys HTTP semantics, then it's probably a collection of resources
<lupine>
"/" in the web service may, if you're really lucky, return a resource that describes all the other resources
<lupine>
some sort of meta-resource
<banisterfiend>
workmad3: thanks, can u give an example of a sophisticated resource?
<workmad3>
banisterfiend: if it's something like a typical SOAP endpoint, which is using HTTP purely as a transport medium for a thinly disguised RPC endpoint... then I'd be dubious :)
<lupine>
but it almost never does
horofox has joined #ruby
<workmad3>
banisterfiend: I believe the github HTTP API is pretty good
<banisterfiend>
workmad3: so, SOAP stuff are not resources?
shevy has quit [Remote host closed the connection]
<lupine>
not in the REST sense, no
<workmad3>
^^
<banisterfiend>
lupine: why is that?
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
<workmad3>
however, if you're talking to most web developers and just refer to things that have URLs as resources, you probably won't get called an idiot (unless you happen to meet a particularly militant REST-ite and you're talking about a SOAP url :) )
esdf has quit [Ping timeout: 255 seconds]
LouisGB has joined #ruby
<banisterfiend>
workmad3: so, since SOAP stuff does have a URL, and likely does respond to GET/POST etc (it needs to just to get stuff over HTTP) what about it makes it not a resource?
RagingDave has quit [Read error: Connection reset by peer]
<workmad3>
banisterfiend: the main reason is that a REST resource should have a uniform interface and respond with standard semantics... SOAP is all about providing different interfaces to various objects through an endpoint
<banisterfiend>
ah
whitedawg has quit [Ping timeout: 255 seconds]
<workmad3>
so it's not so much about what it is (a url) but how it's used (in the SOAP case, non-web-like)
TheFuzzball has quit [Ping timeout: 276 seconds]
<lupine>
well, resources in REST are fairly abstract, so you could in theory make a case that the SOAP web service contains REST resources
<banisterfiend>
workmad3: so, what are standard semantics?
esdf has joined #ruby
<lupine>
but there'd be no way to acess them in a restful manner
cha1tanya has joined #ruby
hamed_r has joined #ruby
<lupine>
so the discussion would become nit-picking semantics only, which is boring ^^
<workmad3>
banisterfiend: REST with HTTP, it's basically that it uses the HTTP verbs correctly
<banisterfiend>
workmad3: thanks
<workmad3>
banisterfiend: so GET, PUT and DELETE are all idempotent, GET causes no server-side changes that the client is responsible for, POST is allowed to be non-idempotent
<workmad3>
and roughly speaking, GET is for retrieving a resource representation, PUT is for replacing a representation, DELETE is for removing it, and POST is for creating sub-resources
havenn has quit [Ping timeout: 264 seconds]
<workmad3>
and each resource representation should ideally provide hypermedia so that the resources put together create an application protocol that a client can just walk through, rather than having to encode the protocol in the client
<workmad3>
basically, REST resources are all about being able to create APIs that are browsable in a similar way to webpages
beiter_ has joined #ruby
TheFuzzball has joined #ruby
<workmad3>
each representation tells you what is valid to do next
<banisterfiend>
workmad3: so is REST generally considered the right way to do it and SOAP the wrong way to do it? or are tehre still good arguments for using SOAP ?
beiter has quit [Ping timeout: 272 seconds]
beiter_ is now known as beiter
woolite64 has quit [Ping timeout: 260 seconds]
nemesit has quit [Read error: Operation timed out]
<workmad3>
banisterfiend: some REST people argue that REST is the way to go... and it does have advantages in that it works well with standard web tech (proxies, load balancing, caches, etc.)
<workmad3>
banisterfiend: but personally, I'm a bit more pragmatic and think that if you have something that you're really struggling to force into a REST style... then it's probably not a REST API and you should consider other approaches
<workmad3>
banisterfiend: but that doesn't mean I like SOAP... :)
horofox has quit [Quit: horofox]
<workmad3>
banisterfiend: I would say that my first instinct with a web service would be to consider REST though... simply because then you have a web service that feels 'webby'
fyolnish has quit [Ping timeout: 276 seconds]
viuo_ has joined #ruby
<banisterfiend>
workmad3: cool, thanks for answering some Qs :)) It's not actually for me, but for a relative who's involved in the EHR biz (but as a doctor) and wants to understand the arguments a bit better
<workmad3>
banisterfiend: so, is this because you're starting a new career as a web developer? :) or are you just having to work with some :)
<banisterfiend>
no, just helping a relative
<workmad3>
yeah, I typed and hit return on that just as you said that... :(
alexspeller has joined #ruby
<banisterfiend>
EHR (electronic health record) workgroups involve doctors, and the doctors sometimes have a hard time keeping up with the tech side of things
withnale has joined #ruby
<workmad3>
yeah, makes sense
viuo has quit [Ping timeout: 265 seconds]
cantonic has joined #ruby
Spami has quit [Ping timeout: 265 seconds]
tk_ has joined #ruby
<workmad3>
if it's something big and enterprising, chances are they're going to be using something like the WS-* stack
<workmad3>
which is SOAP and pain
<banisterfiend>
workmad3: actually it's REST i think
<banisterfiend>
workmad3: does it look like the guy who wrote that knows what he's talking about?
* Hanmac
likes xml more than json ...
<banisterfiend>
workmad3: the main problem with the EHR process it seems, is no one knows whether anyone really knows what they're talking about
<banisterfiend>
workmad3: there's also some links up the side bar which may be useful, esp the REST(HTTP) one
<banisterfiend>
workmad3: but after a quick skim, does it look coherent? or just babble designed to con govts out of large amounts of money?
<emocakes>
Hanmac, too many <> </>
<emocakes>
its like ERB
<emocakes>
ugly
<emocakes>
:\
amaya_the has joined #ruby
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
dr_bob has quit [Read error: Connection reset by peer]
<Spami>
hello, when I'm running my "rake db:setup" i have the following error: "invalid encoding name: ut8" and no idea how to fix it
kevinfagan has joined #ruby
<workmad3>
banisterfiend: looking at the REST bit, I'd say it's coming across as RESTful rather than REST... which is basically that it's using HTTP semantics somewhat, but it's not going the full hog for HATEOAS
<Hanmac>
imo xml can be better structured than json ...
ryanf has joined #ruby
<banisterfiend>
workmad3: cool, so that's a bad thing?
<workmad3>
banisterfiend: the most worrying bit I just read though is that he's pushing security out of the protocol
<workmad3>
banisterfiend: it's a thing :)
<Hanmac>
Spami the encoding is maybe named "utf8" so yours is a typo
<Spami>
Hanmac yes but where would I fix it ?
TheFuzzball has quit [Ping timeout: 248 seconds]
<workmad3>
banisterfiend: it's a somewhat easier API to set up initially, but tends to end up with a large number of API endpoints that need maintenance and can cause issues in the future if any of them need to change or be removed
<workmad3>
banisterfiend: and that's mostly down to the requirement for the mechanics of the API that then need to be encoded in the client
<Hanmac>
Spami i dont know in wich file it is ... do an "grep ut8 * -R"
mikecmpbll has joined #ruby
beiter has quit [Quit: beiter]
TheFuzzball has joined #ruby
<banisterfiend>
workmad3: thanks :)
<workmad3>
banisterfiend: it seems mostly that the guy (or team) doing this has at least some experience with REST and standard web services, but I doubt they give the API much thought, just a formulaic approach
hamed_r has quit [Remote host closed the connection]
<workmad3>
banisterfiend: of course, that assessment is predicated on the idea that I know what I'm talking about :D
Monie has joined #ruby
<Hanmac>
amaya_the i saw you ping me (request CTCP TIME from Hanmac) as information my current project is to add unit/test cases for my tmx-parser , currently there are 68 asserts
<banisterfiend>
workmad3: easier for me to assume you do :)
<workmad3>
heh
<amaya_the>
Hanmac : Wow ,I just want know the time of your country.
<amaya_the>
*to
staafl has joined #ruby
s1n4 has joined #ruby
jacktrick has joined #ruby
fermion has joined #ruby
cha1tanya has quit [Ping timeout: 272 seconds]
grzywacz has quit [Quit: :wq]
havenn has quit [Ping timeout: 265 seconds]
<amaya_the>
Hanmac : Do you have a blog ?
timmow has quit [Read error: Connection reset by peer]
Takehiro has quit [Remote host closed the connection]
<Hanmac>
the ruby way would be some kind of arg.is_like_a? Class :D
pen has quit [Remote host closed the connection]
v0n has joined #ruby
dsabanin has joined #ruby
dsabanin has quit [Client Quit]
dsabanin has joined #ruby
mikeycgto has quit [Quit: Leaving]
vlad_starkov has joined #ruby
asobrasil has joined #ruby
<ekristen>
can anyone help me -- bundler 1.1.3 keeps on telling me that it can't find any rake version I put in my gem spec file
<Hanmac>
ekristen: ask in #bundler they might be more helpfull there
<ekristen>
thanks
* lupine
runs ruby -rprofile on a veeeeery slow operation, watches it grind
<lupine>
whoopsadaisy ^^
miskander has quit [Quit: miskander]
mjolk has joined #ruby
RagingDave has joined #ruby
stopbit has joined #ruby
jeffreybaird has joined #ruby
megha has quit [Quit: WeeChat 0.3.9.2]
<apeiros_>
lupine: use ruby-prof
miskander has joined #ruby
arturaz has quit [Ping timeout: 252 seconds]
Steppen has joined #ruby
Nisstyre-laptop has joined #ruby
noric has joined #ruby
benlieb has quit [Quit: benlieb]
dmerrick has joined #ruby
Nisstyre-laptop has quit [Client Quit]
megha has joined #ruby
<noric>
My Foo objects are saved to a database. Foo objects may have any set of attributes. The attributes are serialized using Marshal and saved alongside the owning Foo. The exception is when a Foo "A" contains a reference to another Foo "B" in an attribute. In this case, Foo "B" returns its database id as the result of Marshal.dump. Marshal.load will retrieve a Foo from the database using the database id in the serialized string.
karasawa has joined #ruby
<noric>
1. How can Foo "A" know that it is dependent on Foo "B", when the Marshal.dump/load process is hidden? My current idea is to search the serialized string for Foo database ids
<noric>
2. Is there a better way to serialize Foo attributes and deal with references to other Foos (and possibly circular dependencies)?
<noric>
Thanks
<noric>
TL;DR: anyone have experience or know of a library to parse the strings output by Marshal.dump?
<noric>
(Marshal.load is a bad joke :)
pencilcheck has joined #ruby
philcrissman has joined #ruby
jjbohn has joined #ruby
blaxter has joined #ruby
sailias has quit [Quit: Leaving.]
<csmrfx>
what
<csmrfx>
whats wrong with Marshal.load?
DrCode has quit [Remote host closed the connection]
<csmrfx>
You Are Doing It Wrong
sailias has joined #ruby
<Hanmac>
noric marshal output can not be "parsed" in what you tihnk ... (okay it maybe can, but marshal is not designed for that)
<noric>
right, so how would you guys do it?
<Xeago>
what is the reason for such storage?
Nisstyre-laptop has joined #ruby
<noric>
My graph of objects needs persistence. That's the only requirement
nathancahill has quit [Quit: nathancahill]
<Xeago>
is it really a graph?
<csmrfx>
or is it just containers?
<Hanmac>
information: if you have A that has inside a B, and that has inside again A, marshal can handle that, but this is not designed for databases
<noric>
It's a directed graph.
DaZ has quit [Ping timeout: 264 seconds]
thisirs has joined #ruby
pen_ has joined #ruby
DrCode has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
<noric>
The Foo objects in my graph can't be saved as serialized data. They need to be queried, etc.
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
<noric>
Foo's attribute table may be serialized
<csmrfx>
Well, how about using a solution that is meant for that
ananthakumaran has joined #ruby
<noric>
sounds good :) what do you have in mind?
<JonnieCache>
you just want a database and an orm ultimately
benlieb has joined #ruby
<csmrfx>
Use a graph database?
fatleaf has joined #ruby
<Hanmac>
a=[];a << a; p Marshal.load(Marshal.dump(a))
<Hanmac>
>> a=[];a << a; p Marshal.load(Marshal.dump(a))
<apeiros_>
(sqlite's query engine is a VM, and you can send it raw instructions)
<noric>
bar.two_attribute = [foo2,foo3]
<noric>
I need a simple way to serialize attributes which may or may not contain Foo references
karasawa has quit [Ping timeout: 248 seconds]
<noric>
Overriding Marshal._dump/_load to return Foo database ids works pretty well, actually
__main__ has joined #ruby
NimeshNeema has quit []
<noric>
However here's the rub: my loads are done in parallel, so if object 37 depends on 100 other objects (likely), they will be loaded in parallel
<noric>
Object 37 needs to ask the question, "Are my dependencies done loading yet?"
<noric>
How the heck does Object 37 know its dependencies, when they are buried in serialized attributes? <--- that's the question I came here to ask
Coolhand has quit [Remote host closed the connection]
jjbohn is now known as jjbohn|afk
<noric>
E.g.: bar.nested_attribute = [[[[another_Foo]]]] # how does bar know it depends on another_Foo ?
<csmrfx>
hm, a queue?
serhart has joined #ruby
<csmrfx>
async queue
<workmad3>
noric: sounds like you'd want to deserialise your Foos into proxy objects
meeko has quit [Client Quit]
<noric>
workmad3: currently my proxy objects are [database_id], what would you add?
<workmad3>
noric: so that the proxy can determine if the Foo has loaded or not, and proxy directly to the Foo if it has
<lupine>
apeiros_, indeed, I always forget about that ^^ - thanks
<csmrfx>
to me it actually sounds like you'd like to find compleltely different approach
<JonnieCache>
workmad3: for some reason i thought that was all noric wanted to do. on closer reading it appears he actually needs a proper graph db
phantasm66 has joined #ruby
<noric>
workmad3: oh I misunderstood, got it now
* lupine
waits for results
mockra has joined #ruby
<workmad3>
JonnieCache: it would probably be easier for him :)
<noric>
I'm not sure I need the flexibility the graph db provides. I don't need any graph operations aside from the "load all your dependencies"
<lupine>
also, Marshal is evil
<noric>
Can you guys recommend a ruby library with graph db adapters? I'm using Sequel and don't think it has that
<Xeago>
noric: is there a problem with updating all objects that refer a if a changes?
<noric>
oh ya?
<csmrfx>
Marshal is just serialization
<lupine>
not compatible between ruby versions, that kind of thing
<csmrfx>
and its just fine
<noric>
Xeago: the objects don't know who they refer to. They receive attribute values bindly - these values may contain many nested objects that eventually point to another Foo
<Xeago>
noric: elasticsearch has a dynamic scheme that allows for child objects to be dynamically found
tk_ has quit [Quit: ばいばい]
tempspace has left #ruby [#ruby]
* lupine
now avoids marshal wherever he can
Hanmac has quit [Ping timeout: 245 seconds]
pwelch has joined #ruby
<lupine>
(which is almost everywhere)
<csmrfx>
like, as if people would be using it for anything
<Xeago>
using es' _uid you can find a nested object reference in any part of the object in es
<csmrfx>
I wish they were.
horofox_ has joined #ruby
<lupine>
pstore uses it under the hood. that stang
<lupine>
you can tell pstore to output to yaml instead, though
<noric>
workmad3: The proxy object could work. If object 37 depends via attribute on 10, 10 can be wired in with a proxy object until it is loaded (or perhaps the proxy always sits inbetween). The problem is, object 37 doesn't need a Future 10 - I can't tell 37's clients that its' ready until it is fully loaded.
<apeiros_>
lupine: you should avoid yaml then too!
<apeiros_>
not compatible between different versions either…
<noric>
workmad3: I am not sure that 37 can ever know that 10 is fully loaded using the proxy system.
<JonnieCache>
fuck me. this table has one column: "name". its a string column, and its the primary key
<csmrfx>
IME people throw database in once they have more than 20 things to store
<apeiros_>
(syck vs. psych had some nice issues)
<JonnieCache>
christ
<csmrfx>
it is preposterous
TerabyteST has joined #ruby
<workmad3>
noric: if the loading is async, I'd probably be tempted to implement the proxies as a form of Future or Promise btw... so they're basically a stand-in for the Foo (which will load in the background). When you attempt to access the Foo, execution in that thread will block until loading has finished
<lupine>
I'm certain yaml is compatible between ruby versions
<noric>
Xeago: re: elasticserach, I need to keep it on the local machine, it's a high performance simulation
<apeiros_>
lupine: you're mistaken
<Xeago>
jgarvey has joined #ruby
<lupine>
apeiros_, do you have an example? I suspect we're talking about different things here
<lupine>
what sort of yaml document do you envision failing?
<apeiros_>
lupine: as I said, the change of 1.8's syck to 1.9's psych introduced a couple of incompatibilities.
<noric>
workmad3: I have a single high-performance thread, simulation master loop which must be absolutely non-blocking. That's why an object cannot be made available to the main thread until it is fully loaded.
<csmrfx>
yaml isnt that robyst
<workmad3>
noric: if you absolutely need to know stuff is loaded then simply have a load step that loads (and links) everything, run your simulation (updating the graph in-memory) and then serialise it out again
<noric>
That all sounds good, but I am left with my original question
<apeiros_>
which specifically - don't remember, it's been over a year since we moved our project
jekotia has joined #ruby
<lupine>
nasty. that does sound like a good reason to avoid yaml
<noric>
If Foo has an attribute hash: 1) attributes which contain no nested Foos are serialized with Marshal.dump; 2) if an attribute contains a nested Foo, it will be serialized by returning its database id; 3) On load, how does the top-level Foo know which nested Foos to wait for?
<lupine>
(we typically use json for most stuff these days, but yaml is still around in places)
<noric>
The real problem here is, if using Marshal.load/dump to serialize attributes, and these attributes may contain nested Foos, how does a top-level object know which Foos it is "waiting" for, because the top-level object must be fully loaded before it can proceed.
atadesk has joined #ruby
<workmad3>
noric: if pre-loading all the data is fine, split the load into two steps - load all your nodes from your store, then for each loaded node walk it's attribute tree and replace everything that's a proxy for a Foo with the loaded Foo
<csmrfx>
noric: Marshal is meant for serializing objects.
<csmrfx>
noric: Marshaling is not a persistence solution.
bwlang has joined #ruby
luckyruby has joined #ruby
dsabanin has quit [Quit: Leaving...]
TerabyteST has quit [Ping timeout: 248 seconds]
<workmad3>
noric: and then you don't proceed until the link step is complete (at which point your graph is present and correct in-memory)
<noric>
workmad3: So, guaranteeing that all persisted nodes are in memory is definitely a solution
statarb3 has quit [Quit: Leaving]
<noric>
workmad3: but, in my weird problem domain, only <10% of the in-memory graph needs to be persisted, and only <10% of the persisted nodes must be loaded for the current simulation phase
<noric>
so I could load all the nodes but 90%+ would be unused. Maybe that's ok in 2013
<JonnieCache>
depends on how big the nodes are
<lupine>
you could build an index on save
<JonnieCache>
and how profitable the process youre doing is :)
<workmad3>
that's another option
<noric>
lupine: how! this is the most sensible approach imo
mengu_ has joined #ruby
<noric>
Yeah this project is "non-profit" :D
<csmrfx>
imo that points to: just use the database
<workmad3>
noric: when you save your graph, simply record (probably in another table, or a separate file) the node IDs that will need to be reloaded next to a simulation ID or some other key
<noric>
So, I get that Marshal isn't a persistence solution. But it's a terribly convenient way to serialize an attribute table
<lupine>
it's fast, too, I'll give it that
<noric>
workmad3: but how does Foo bar; bar.nested_attribute = [Foo baz] know it depends on baz?
<csmrfx>
definately convinient for serializing objects
<workmad3>
noric: you'd code it
bean has joined #ruby
tonini has quit [Remote host closed the connection]
<lupine>
this isn't an easy solution to write ^^
<workmad3>
noric: you're really at the point where you should be writing your own serialisation mechanism IMO
<noric>
workmad3: Ok, if I'm another programmer using my simulation library, I am going to do
<workmad3>
noric: one that understands your serialisation requirements
browndawg1 has joined #ruby
<Xeago>
I don't understand the requirements the system needs
<noric>
bar = Foo.new; bar.some_attribute = type_which_simulation_library_doesnt_know_about_and_contains_nested_Foo
<workmad3>
(or rather, one that encodes your serialisation requirements)
browndawg1 has left #ruby [#ruby]
chrismcg is now known as zz_chrismcg
AndIrc_ has joined #ruby
<csmrfx>
I think I dont know enough, but it smells like a simple problem being made into a mighty one
<workmad3>
^^
pavilionXP has quit [Ping timeout: 264 seconds]
<noric>
The actual requirement is that, Foo must be able to contain other Foos in attribute table, allowing for circular dependencies. When loading a Foo, you must know when it is fully loaded.
clocKwize has quit [Quit: clocKwize]
AndIrc_ has quit [Read error: Connection reset by peer]
<csmrfx>
Can you have each node hold index on their dependencies?
<csmrfx>
Can you have inheritance handle dependencies?
AndIrc_ has joined #ruby
<lupine>
this is just an identity map
<noric>
Apologies if I am repeating myself, but each node is blind to the value of its attributes - they are merely assigned, and may contain nested Foo references
<Xeago>
csmrfx: I don't see why it shouldn't be possible
includex has joined #ruby
Nisstyre-laptop has quit [Quit: Leaving]
mengu has quit [Ping timeout: 255 seconds]
<workmad3>
lupine: it sounds about right, yes
<Xeago>
noric: upon assigning, save the dependency with it automatically
<Xeago>
or detaisl about the dependency
<lupine>
I say "just", I've implemented an identity map before, and they can be proper arses
<noric>
lupine: I do have an identity map. Per workmad3's suggestion, I could load all the objects ahead of time and then deserialization wouldn't have to load a Foo, it'd just reference it
browndawg has quit [Ping timeout: 256 seconds]
<lupine>
noric, all you need to do is lazily load objects into the identity map if they're requested and not there
Coolhand has joined #ruby
<lupine>
"all" ^^
Rym has joined #ruby
<workmad3>
lupine: ah, but remember the load isn't allowed to block!!!
<noric>
Xeago: I can hook into the assignment, but I'd have to tear apart the attribute value, which could be complex and deeply nested
<lupine>
that's ok, he can do it in a background thread
amaya_the has quit [Ping timeout: 276 seconds]
<lupine>
yes, doing it this way is going to be a hatchet job on your code
<workmad3>
lupine: the simulation isn't allowed to wait while the background job loads it either
<csmrfx>
How big is this data? 200MB? 2GB? 200GB?
<lupine>
that's what you get when you use something not fit for purpose
<workmad3>
lupine: hence my solution - load the entire thing :)
<lupine>
workmad3, it can defer calculation of that part of the simulation
megha has quit [Quit: WeeChat 0.3.9.2]
karasawa has joined #ruby
<lupine>
now that I'd love to see ^^
browndawg has joined #ruby
<noric>
csmrfx: embarassed to say it's probably a fairly small dataset. < 500MB
<lupine>
then stick it all into memory
<noric>
nod
<noric>
Alright, I will do that
<lupine>
my last simulation project was ~200GB, so I didn't have that option
<csmrfx>
I think you'd do best to have a server that has it all in memory ready for requests
samuel02 has quit [Remote host closed the connection]
<noric>
stick it into memory and expect the deserializations to succeed
<lupine>
(it was 2008)
<apeiros_>
lupine: what? you have less than 200GB RAM?
<lupine>
I did back then
<workmad3>
heh
<lupine>
these days, I have access to 768GB RAM machines
<apeiros_>
tsss
<apeiros_>
oh, nice
<Xeago>
lupine: wat
<lupine>
they are rather
Antiarc has joined #ruby
<Xeago>
can I get a breakdown?
<noric>
Keeping the dataset in memory doesn't actually solve the problem of allowing a top-level Foo to know its dependencies on nested Foos
jonathanwallace1 has joined #ruby
<apeiros_>
Xeago: permission granted
sanukcm has joined #ruby
amaya_the has joined #ruby
<workmad3>
noric: you don't need to know them then though
<workmad3>
noric: because it's all in-memory
<Xeago>
apeiros_: thanks! Give me the breakdown, DAMNIT!!!11
<noric>
but, it does obviate the problem by allowing deserializations to trivially succeed because all the Foos are in an identity map
<lupine>
noric, it makes resolving the dependency when it comes up super-fast
<noric>
^
<noric>
:D
<noric>
thanks a lot
<apeiros_>
well, 768GB RAM isn't that expensive anymore… probably ~2000$
<lupine>
I have no idea what it costs
<Xeago>
lupine: does it matter what it costs?
<csmrfx>
"disk" isn't that slow either
<lupine>
no, I'm not paying :p
<apeiros_>
csmrfx: compared to RAM, yes, yes it is :D
<lupine>
I think the machines have more physical ram, it's just arranged in a clever way to be resilient against DIMM failure
<noric>
next time I'll try to mention my small dataset size upfront, save some time
<workmad3>
I had a machine for a project with 72gb of RAM and 16 cores to basically serve a dataset :)
berserkr has quit [Quit: Leaving.]
<noric>
thanks for the discussion though
havenn has quit [Remote host closed the connection]
sanukcm has quit [Client Quit]
havenn has joined #ruby
<lupine>
(these are nominally VM hosts, and NUMA to boot)
danieldocki has quit [Quit: Leaving...]
<csmrfx>
noric: jruby + graph4j could be used, but many a times I've heard problems with graph databases for apps
<csmrfx>
YMMV
<workmad3>
I'd probably go with neo4j as I've had the most exposure to it
slissner has joined #ruby
zommi has quit [Quit: Leaving.]
whitedawg has quit [Quit: Leaving.]
<workmad3>
similar though... it's meant as an embedded DB ideally, so jruby + neo4j
buscon has quit [Read error: No route to host]
<csmrfx>
its been a few years since I was in a project with graphy probs...
F1skr has joined #ruby
<noric>
thanks for the neo4j reference, I will check that out if this approach fails
buscon has joined #ruby
gyre007 has quit [Remote host closed the connection]
tagrudev has quit [Remote host closed the connection]
fermion has quit [Quit: Computer has gone to sleep.]
_nitti_ is now known as _nitti
hfatih has joined #ruby
kpshek has joined #ruby
kayloos has quit [Quit: kayloos]
nga4 has joined #ruby
fermion has joined #ruby
jonahR has quit [Ping timeout: 276 seconds]
jonahR_ is now known as jonahR
nga4 has quit [Remote host closed the connection]
nga4 has joined #ruby
Spami has quit [Ping timeout: 240 seconds]
adamjleonard has joined #ruby
gyre007 has joined #ruby
yogendra has joined #ruby
Banistergalaxy has quit [Ping timeout: 248 seconds]
generalissimo has joined #ruby
quest88 has quit [Quit: quest88]
yanto has joined #ruby
havenn has joined #ruby
yfeldblum has quit [Quit: Leaving]
chussenot has quit [Quit: chussenot]
luckyruby has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 255 seconds]
Banistergalaxy has joined #ruby
yanto has left #ruby [#ruby]
ryannielson has joined #ruby
whitedawg has joined #ruby
beiter has joined #ruby
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
jmorton has joined #ruby
hfatih has quit [Quit: Leaving]
yogendra has quit [Quit: Leaving.]
csigi has joined #ruby
rellin has joined #ruby
polymar has quit [Remote host closed the connection]
<csigi>
hi everybody
havenn has quit [Ping timeout: 248 seconds]
<hoelzro>
hello
Uranio has quit [Quit: WeeChat 0.3.8]
<csigi>
i am learning ruby
buscon has quit [Quit: Leaving]
main has quit [Ping timeout: 248 seconds]
<csigi>
this is the first time I use irc
Naeblis has joined #ruby
blazes816 has joined #ruby
chussenot has joined #ruby
<breakingthings>
leave while you still can
<workmad3>
IRC RUINS LIVES!!!!!
<csigi>
@@
<csigi>
why? i dont understand
<csigi>
the book said that irc is very good for learning new things in ruby
<JMcAfreak>
really, guys? Must you do this to every new guy?
Choclo has quit [Ping timeout: 252 seconds]
<JMcAfreak>
csigi: IRC is fine.
Spami has quit [Ping timeout: 276 seconds]
* workmad3
hides
zehrizzatti has joined #ruby
* JMcAfreak
finds workmad3
* workmad3
runs away
<apeiros_>
JMcAfreak: why, yes, it's a fair warning
jonathanwallace has quit [Ping timeout: 276 seconds]
Takehiro has joined #ruby
Choclo has joined #ruby
<workmad3>
csigi: IRC is fine, apart from spoilsports like JMcAfreak, who ruins all our fun :(
<JMcAfreak>
apeiros_: be that as it may, it's still ... um... OK, fine. SOME parts of irc will ruin lives, but here?
<JMcAfreak>
workmad3: hey, I proved your point, then
<JMcAfreak>
workmad3: it certainly does ruin lives
<workmad3>
my life is ruined!!1!!!111!!
friskd has joined #ruby
<JonnieCache>
what is going on here
<workmad3>
JonnieCache: nothing... move along
<apeiros_>
random madness
<JonnieCache>
ive stumbled into some sort of commotion
<workmad3>
nothing to see here...
* JMcAfreak
nonchalantly sweeps everything under the rug
wreckimnaked has quit [Quit: WeeChat 0.3.9]
<apeiros_>
JonnieCache: beware, it's contagious, so run! before your life is ruined too!
<workmad3>
csigi: rewinding... hi, welcome to IRC
brunoro has joined #ruby
<workmad3>
csigi: home of mad people and programmers (these are not mutually exclusive)
<csigi>
nice to meet you ^.^
brendan_wrk has quit [Remote host closed the connection]
<csigi>
i like it anyway
<JMcAfreak>
brb
JMcAfreak has left #ruby ["They're coming to take me away, ha-haa!"]
JMcAfreak has joined #ruby
<JonnieCache>
irc already ruined my life a long time ago
<JMcAfreak>
dang it, irc client. THIS is the part that ruins lives. Trying to figure out why the heck my topic is appearing in white text on a white background in a place where I can't fix it.
brunoro has quit [Client Quit]
<JonnieCache>
and i love it
maletor has joined #ruby
<JonnieCache>
irc made me the man i am today
<workmad3>
csigi: there you have, a damning testimony as to why IRC is bad
<JMcAfreak>
JonnieCache: but you're in a burning ring of fire
<workmad3>
csigi: it'll make you like JonnieCache....
yfeldblum has joined #ruby
darkcypher_bit has joined #ruby
<workmad3>
bleh, it'll also destroy your typing accuracy somehow... or maybe that's just a side-effect of this being the first Monday of 2013?
<JMcAfreak>
I think I like this place more than #xkcd sometimes.
<csigi>
=))
<JMcAfreak>
workmad3: I think that's the monday thing.
brendan_ has joined #ruby
<csigi>
here is funny
<JonnieCache>
is there an xkcd channel?
<JMcAfreak>
JonnieCache: on irc.foonetic.net
<csigi>
get me out of the heavy progrogramming books
browndawg has quit [Ping timeout: 248 seconds]
Takehiro has quit [Read error: Connection reset by peer]
baroquebobcat has joined #ruby
stevechiagozie has joined #ruby
Takehiro has joined #ruby
<csigi>
i dont understand why twitter drop ruby
maletor has quit [Client Quit]
<apeiros_>
because it was no longer the right tool
<csigi>
T.T
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
jprovazn has quit [Quit: Leaving]
TerabyteST has joined #ruby
Mon_Ouie has joined #ruby
<csigi>
so what is the right tool now?
<JMcAfreak>
I really hope the answer isn't PHP
<workmad3>
scala and java
<workmad3>
for the heavy-duty background queuing they needed
* JMcAfreak
lets out a sigh of relief
aganov has quit [Remote host closed the connection]
pwelch has quit [Quit: pwelch]
<csigi>
I wonder what kind of apps does Ruby suit for
xclite has joined #ruby
<JMcAfreak>
a lot of backend stuff - I know that
<csigi>
it's very sad if it can only build some small things
<workmad3>
csigi: don't take twitter's example to heart
<apeiros_>
csigi: twitter was huge while still on ruby
<JMcAfreak>
csigi: oh, you can actually build some really big things
<workmad3>
csigi: twitter is a very extreme edge-case
<apeiros_>
and never forget, it was ruby which allowed them to grow that huge
<JMcAfreak>
the servers where I work have a lot of their servercode written in ruby
<griffindy>
github is still running on rails isn't it?
<JMcAfreak>
more specifically jruby
<JonnieCache>
lots of twitter is still in ruby
<workmad3>
griffindy: yup
<JMcAfreak>
on rails
<JonnieCache>
they just do the heavy lifting in scala
average_drifter has quit [Read error: Connection reset by peer]
<csigi>
good news then
kevinfagan has quit [Read error: Connection reset by peer]
<jblack>
I'm using it on a crapload of backend stuff that would otherwise be a real pain to provide.
<workmad3>
JonnieCache: not that much now... I think they may actually only have the web front-end left
<JonnieCache>
thats what i was referring to
<JMcAfreak>
workmad3: that's a shame
<workmad3>
JonnieCache: they've been gradually replacing ruby backend with scala for quite a while now
<apeiros_>
scala - a swiss invention :)
<breakingthings>
Don't they have a java server for the front-end now
<jblack>
It makes my clients happy when i say "sure. I can make a web service for that over the weekend. It'll be ready monday"
Engin has joined #ruby
<JonnieCache>
good on them. scala is much more suited to running something massive like that
<workmad3>
breakingthings: certainly for some of it... not sure if it's all java/scala now
<workmad3>
breakingthings: but it could be :)
<JonnieCache>
ruby is for fast innovation, not big iron
<csmrfx>
they probably have a http-server for the front-end
a_a_g has joined #ruby
<csmrfx>
C or C++
<breakingthings>
workmad3 sure, though it might be a sign that it's incoming.
hoelzro is now known as hoelzro|away
<JMcAfreak>
csmrfx: C or C++ would be sexy
<breakingthings>
The reason they switched originally was performance reasons back when 1.8.7 was the hot version
<csmrfx>
Yes, AKA Apache or Nginx
<JonnieCache>
soundcloud is also a large rails project
<jblack>
Sinatra & JSON, and there's the info/data that the respective web teams need.
<breakingthings>
Things have gotten better since then.
<JonnieCache>
althoguh i imagine its just the frontend by now as welll
<Engin>
This is a honest question: Why do people chose Ruby ? I've deployed Redmine. I was quite impressed with the small code base to provide all the features but the perforamnce was HORRIBLE.
<JMcAfreak>
JonnieCache: however, rails isn't limited to just Ruby
<csmrfx>
Your front-end should *always* come from a stupid web server... your middleware is another matter
<JMcAfreak>
Engin: redmine is just kind of horrible in general
<workmad3>
csmrfx: possibly... although it's more plausible to connect directly to java app servers than ruby ones (java app servers can do similar sorts of optimisations to apache or nginx through java.nio fun)
wroathe has joined #ruby
<csmrfx>
no
<Engin>
JMcAfreak: in my study, I figured the architecture is flawed -- the Apache module actually.
<csmrfx>
imagine twitter serving their dumb cached content from a java server!
<csmrfx>
not gonna happen
<JMcAfreak>
That could be it
<csmrfx>
JMO
<Engin>
JMcAfreak: it was freaking compile the whole thing again and again when executing it... so if you do not specifically configure the apache module to pre-fork processes and keep them idle.. you can easily wait up to 1.5 minutes for the page to show up.
timonv has joined #ruby
<jblack>
Hmmm. I'm sure they're using some internal version of s3 and/or cloudfront with twitter.
<JMcAfreak>
csmrfx: with Java 1.8, that could actually be feasible, if I understood my friend correctly
carloslopes has joined #ruby
<csmrfx>
Ah well, perhaps. But does it cache?
<JMcAfreak>
Engin: Wow, that's fun
<JMcAfreak>
csmrfx: it optimizes for the code that's hit most often
<breakingthings>
Is there a benchmark for the different implementations of ruby somewhere?
<workmad3>
csmrfx: jetty is capable of trunking a static file buffer to the network interface, similar to apache or nginx
<Engin>
JMcAfreak: what is the proper way of hosting a Ruby web application ?
RagingDave has quit [Quit: Ex-Chat]
cha1tanya has quit [Quit: Leaving]
<JMcAfreak>
Engin: that depends on what you need it for
havenn has joined #ruby
<csmrfx>
workmad3: my point was more or less about global-scale servitude
magistr has joined #ruby
<csmrfx>
imagine twitter using jetty for the firehose
<csmrfx>
8F
<JMcAfreak>
Engin: Apache could do well when configured correctly.
<Engin>
JMcAfreak: were aware of what I've just told you ?
<workmad3>
csmrfx: yeah, I imagine they've actually got something like haproxy in front of it all
<Engin>
you seem not surprised
<workmad3>
csmrfx: but I don't know... and I was pointing out that it's not inconceivable, rather than saying I think they are doing it ;)
<csmrfx>
Engin: simple caching web server in front of reverse proxied middleware
<JMcAfreak>
^
Hanmac has joined #ruby
<csmrfx>
workmad3: defo inconceivable!!
<Engin>
csmrfx: imho, that's band aiding a wrong design
<workmad3>
csmrfx: oh, and yeah, varnish or something for caches
<JMcAfreak>
I don't really do server stuff that often
<JMcAfreak>
workmad3: yes.
<Engin>
caching is obviously always the way to go for improving performance... but this is plain wrong to compile whole thing every time
<csmrfx>
Engin: you mean, you have more than 50k concurrent connections?
<JMcAfreak>
Engin: oh, I know
<Engin>
I'm telling you it was taking 1.5 minutes for the first page to show up when apache module killed idle processing and forking them again
<csmrfx>
Engin: what are you talking about, lost me there?
<workmad3>
Engin: what apache module were you using?
vlad_starkov has quit [Remote host closed the connection]
<Hanmac>
stupid hotspot ... for some unknown reason i cant connect to them with laptop .... but i can with handy oO
<Engin>
a bleeding edge passenger build
<csmrfx>
You mean, your apache conf was incorrect and now you tell everyone Apache sucks?
<workmad3>
Engin: sounds like you had a screwed up config then
<Engin>
csmrfx: I'm talking about that I've deployed redmine... and the perforamcne was beyond words horrible
JeanMertz has joined #ruby
<Engin>
workmad3: I talked to many people back then and they told me that's the normal behvaiour
<workmad3>
Engin: 'back then' being what?
<csmrfx>
It's not like your solution is going to automagically use telepathic confing to make everything supermega
<Engin>
workmad3: by defualt, it kills idle processes, and does not fork new ones... so when you request a page/service it forks a new one and compiles the whole thing that needs to be executed (1.5 minutes)
Xeago has quit [Remote host closed the connection]
<Engin>
so, I spefically cofngiured passenger to change its default behevaiour, so that it won't kill idle proceses, and keep something like 5 processes idle all the time
<JMcAfreak>
better than leaking threads all over the place... my coworker came back one day to see some 13,000 threads in the pool.
<JMcAfreak>
that was a fun one to fix.
<Engin>
so that, now, when I start apache, it takes like 100% CPU for a minute or two and compiles everything... and requets are handled properlu.
Naeblis has left #ruby ["Leaving"]
<Engin>
workmad3: it should be 1 year ago.
<workmad3>
Engin: right, that's because the default passenger config is meant for sites that are used fairly constantly
megha has quit [Quit: WeeChat 0.3.9.2]
<Engin>
workmad3: so you are saying, the first request will take long time but the processes won't be idle.
<workmad3>
Engin: a 1.5 min boot time sounds like you've also got a pretty low-powered server
<Engin>
idled*
<Engin>
workmad3: yeah, it is a low powered server running redmine.
carlyle has quit [Remote host closed the connection]
<workmad3>
Engin: so what you're saying is that on a crap machine, you're getting crap performance...
browndawg has joined #ruby
<csmrfx>
90 seconds is peanuts
<Engin>
workmad3: please, talk with your logic.
JeanMertz has quit [Client Quit]
Rym has quit [Quit: Rym]
tvw has quit [Remote host closed the connection]
<csmrfx>
Well. If confing apache aint your deal, perhaps the usual mongrel/thin/nginx
<workmad3>
actual deployments need to be tuned for specific requirements
<Engin>
[power went down] if it was 10 times faster and it took 9 seconds... it is still not acceptable.
<csmrfx>
?
<workmad3>
if you have a site that's going to be accessed infrequently, you're going to need to alter the config away from a default that expects constant traffic
<JMcAfreak>
9 seconds is not acceptable?
<JMcAfreak>
wow
<workmad3>
Engin: you expect app servers to start instantly?
darkcypher_bit has left #ruby [#ruby]
<Engin>
no, I expect it to run persistently.
<Engin>
like a Java app
<workmad3>
Engin: it does... if you configure it correctly
<breakingthings>
Engin passenger has a configurable amount of time before it kills.
<Engin>
yeah, why isn't it configured like that by default ?
<csmrfx>
So you'd have something to work on
_46bit has quit [Quit: Leaving.]
_nitti has quit [Remote host closed the connection]
F1skr has quit [Quit: WeeChat 0.3.9.2]
<workmad3>
Engin: I can't remember the exact reason... I think it's to avoid too much resource usage in shared-
<workmad3>
application environments
alex__c2022_ has joined #ruby
<workmad3>
Engin: but in essence, any default is going to be wrong in many contexts
<workmad3>
Engin: so it's not surprising that you'll need to tweak it
<Engin>
in java and php defaults work just fine
<Engin>
don't you agree ?
<workmad3>
Engin: nope
<workmad3>
Engin: java and PHP defaults are as shit for most production settings as ruby ones
woolite64 has joined #ruby
<Engin>
I disagree.
<breakingthings>
PHP's default memory limit is tiny as shit.
<workmad3>
Engin: there's an entire industry around tuning the JVM for production
<Engin>
Anyway, so, my perception of how apache passenger worked is still accurate.
<breakingthings>
Can't upload a 100x100 jpg and process it on that.
<breakingthings>
:d
<csmrfx>
if your solution depend on your middleware being blazing fast, you are probably doing it wrong
alex__c2022 has quit [Ping timeout: 272 seconds]
alex__c2022_ is now known as alex__c2022
<Engin>
I'm just asking for the rationale for what seems to me very illogical (killing a process that already is running a compiled app -- only to compile it again with next request)
huoxito has joined #ruby
<JMcAfreak>
breakingthings: PHP just sucks in general
jonathanwallace has joined #ruby
<breakingthings>
JMcAfreak well duh but that was just an example of a default that doesn't work for everything
<breakingthings>
since Engin seems content with running everything without any configuration whatsoever
<Engin>
furthermore, I think it can introduce hard to hunt bugs, as respawning that proces and recompiling it can hide and or introduce bugs -- an environment must be persistently good or bad if you ask me but that's another topic.
<Engin>
PHP sucks big time, that is true.
<JMcAfreak>
Engin: :)
<csmrfx>
PHP is great for shared hosting meant for normal people
dmerrick has quit [Ping timeout: 260 seconds]
maus has joined #ruby
<JonnieCache>
all the "normal people" is the reason php sucks so badly
<csmrfx>
(for historical reasons)
<Engin>
breakingthings: I do not understand why it is designed the way it is, I'm sure there's a rationale for doing that... but I wouldn't imagine it'd be justified in todays technology :)
<JMcAfreak>
JonnieCache: amen to that
<JonnieCache>
it gives bad programmers a very easy gun to shoot themselves with
<workmad3>
Engin: I think it's mostly to do with behaving like a good apache module tbh
sayan has quit [Read error: Connection reset by peer]
<JonnieCache>
it almost has "foot here" written on the barrell
<breakingthings>
Engin probably because nothing is configured by default for efficient production use.
<csmrfx>
(I mean PHP support is widely available for cheap, the language isn't my fave)
<sonne>
if i want to include some non-generated doc in a gem i'm packaging (such as configuration examples), what would be the best way?
<breakingthings>
In production you can just ramp the timeout.
<sonne>
just g.files += Dir.glob('examples/*') ?
* breakingthings
shrugs
<workmad3>
breakingthings: or turn it off... or configure a minimal number of processes to keep alive...
<breakingthings>
right.
<breakingthings>
whatever suits your use.
dnyy has joined #ruby
AimHigh has joined #ruby
jlast has joined #ruby
<workmad3>
Engin: if you want something that's more java-esque... consider using unicorn, thin, mongrel, rainbows...
<workmad3>
Engin: all of those are separate app servers rather than apache modules
<workmad3>
(oh, or puma)
<apeiros_>
90s for a redmine startup sounds unlikely…
<apeiros_>
(me skipped parts of the backlog, though)
<Engin>
apeiros_: it was a netbook
AimHigh has left #ruby [#ruby]
<csmrfx>
mehh
<apeiros_>
Engin: 5-10y old?
<JMcAfreak>
Aha
<csmrfx>
pearls, swine, the works
<Engin>
apeiros_: nah, quite recent.
philcrissman has quit [Remote host closed the connection]
<apeiros_>
CPU?
thisirs has quit [Remote host closed the connection]
<apeiros_>
RAM?
jonathanwallace has quit [Ping timeout: 248 seconds]
<Engin>
apeiros_: i chose it because I wanted something space efficient in the office with power backup.
<jblack>
Engin: Locking down resources that aren't being used for considerable length of time gets in the way of other things that need resources.
<Engin>
apeiros_: I can't really remember... to be honest, it is a shitload of processing power for any web app
<Engin>
jblack: OS manages that, not thhe app itself.
<apeiros_>
Engin: then I'm back at "90s for redmine sounds unlikely"
<jblack>
that's expecially important on systems with underpowered hardware.
<Engin>
if the memory is not used it's going to be paged by the OS
DatumDrop has quit [Remote host closed the connection]
<apeiros_>
redmine started in <10s for me 4y back, and that was a slower ruby and not top-end hardware
<Engin>
and when next page fault occurs, it's going to be loaded back in to physiccal memory
Jamone has joined #ruby
<jblack>
Engin: That's your use case, buddy. =) Many servers don't use swap at all in order to keep latency out of the mix.
<Engin>
I just stated a fact :)
<csmrfx>
or swap is in ram
<csmrfx>
or what have you
* apeiros_
off, back in ~40
apeiros_ has quit []
<csmrfx>
its always an iterative process to make a web app fast
F1skr has joined #ruby
<csmrfx>
you need to massage it
<Engin>
hehehe
<csmrfx>
I'm out too
<csmrfx>
l8rs
<Engin>
that's a nice quote, it'll print it and put it on my wall
<jblack>
engin: If you're pretty comfortable with the belief your app server isn't leaking memory, or file handles, or sockets, and you want to set things up to run non-stop, you _can_. =)
nemesit has quit [Quit: Leaving...]
<workmad3>
Engin: what you stated is only a fact if you haven't tuned your OS memory swap for your server
<csmrfx>
applies only to webapps with multiple concurrent users... (meaning optimize it *once* you have popularity)
<Engin>
jblack: I have servers running for 230 days :)
<JMcAfreak>
jblack: 13000 threads. on my coworker's project. One heck of a leak.
<JMcAfreak>
(overnight)
clooth has quit [Read error: Connection reset by peer]
timonv has quit [Ping timeout: 255 seconds]
otters has joined #ruby
skryking has joined #ruby
skryking has left #ruby [#ruby]
<Engin>
and it failed because a hard drive in the back end failed :)
<jblack>
engin: You really shouldn't say that in public.
Monie has quit [Ping timeout: 255 seconds]
<JonnieCache>
whys that
<workmad3>
Engin: you had to take your server down because of a drive failure?
<workmad3>
Engin: sucky :P
clooth has joined #ruby
<JMcAfreak>
ouch
<Engin>
nah, the company did, with the kind of vps I purchased
<jblack>
Because he just said to every script kiddie in the channel that his servers are potentially vulnerable to any 0-day within the last 9 months.
megha has joined #ruby
<Engin>
virtualization technology now supports redundent drive backends but the one I purchased did not support them I think
F1skr has quit [Client Quit]
<Engin>
uptime can be predicted with other stuff -- your argument is invalid :)
<JMcAfreak>
wait... how is jblack's argument invalid here? Not seeing the link
philips_ has quit [Excess Flood]
awarner has joined #ruby
<jblack>
It was more of an off topic observation. I wish I hadn't even mentioned it.
Morkel has quit [Quit: Morkel]
<JMcAfreak>
jblack: let's hope you didn't catch the attention of the people who would want that kind of info.
filipe has quit [Remote host closed the connection]
<jblack>
I had a pesky problem with sinatra last night. Is this an appropriate place to discuss it?
harushimo has joined #ruby
mpfundstein has quit [Ping timeout: 240 seconds]
<JonnieCache>
wtf. just because hes had it up for 230 days doesnt mean it hasnt been patched
<harushimo>
to get a random number, the method you would use is rand right?
<JonnieCache>
unless ive massively misunderstood something here
<jblack>
jonniecache: The kernel. =)
<Engin>
JonnieCache: something can be patched somethigs can't.
<Engin>
jblack: you can rmmod patch modprove, if it is a module
<JonnieCache>
cant you hotpatch the kernel these days?
zastern has quit [Read error: Connection reset by peer]
zastern has joined #ruby
<Engin>
well... that requires major kernel reacrhitecting I suppose
<Engin>
but there are ways to direct connections
<Engin>
you know... you can suspend an instance, resume it on another physical machine
<Engin>
and resume all connection (including tcp)
<Engin>
utulizing ARP
<jblack>
I'm not quite sure how that ties into ruby?
zastern_ has joined #ruby
<havenn>
jblack: Sure, here or in #sinatra
<Engin>
he asked about if it is possible to hotpatch a kernel
SCommette has joined #ruby
<Engin>
1) it is possible if the kernel is geared towards it -- designed that way 2) if you can transfer all user space app state and networking stack state to another machine
<Engin>
interesting concepts actually
j0sh\a has joined #ruby
<JonnieCache>
much better to just have a load balancer and redundant app servers
<Engin>
theoritcally you also would be able to suspend the system patch and resume it before anyone can notice it
<Engin>
JonnieCache: definetely.
<JonnieCache>
so you can just take stuff down
<Engin>
yeah, I completely agree
<Engin>
your app must be stateless in the heart so you can do all sort of stuff
<JonnieCache>
because its going to go down eventually anyway
<j0sh\a>
hi guys - how can I used bundle exec rails console production in terms of a ruby script? I need to pull some info from irb sessions ...
<Engin>
yup
<havenn>
harushimo: Yeah, rand is psuedorandom, works well.
<JonnieCache>
j0sh\a: you can require your script from inside irb
<Engin>
that's why I think ideal web application design involves 1) stateless services 2) smart thin clients
zastern has quit [Ping timeout: 248 seconds]
<JonnieCache>
just like how you would require a file normally
<harushimo>
havenn: thanks, I'm rewriting a program from python to ruby
<jblack>
Great. so, I've gotten into a little bit of a mess with one the middleare apps I'm developing. I let the routing get a little out of hand. It's no longer just simple get this and post that. a bit of crud of support functions have builtup around them, and I'm having trouble with returning errors to the user.
<harushimo>
thank you
digitalsanctum has joined #ruby
browndawg has quit [Quit: Leaving.]
<jblack>
I'll have something like get '/add/search/:state/:phrase'.. .and that'll call a function called add_search, which in turn calls something else....
sayan has joined #ruby
Astralum has quit [Ping timeout: 272 seconds]
dyrot has joined #ruby
<jblack>
before long, I'm 2-3 levels down the stack when I catch an error. I'd like to do an erb :sometemplate and tell sinatra I'm all done with this request, and not return up through the stack
megha has quit [Quit: WeeChat 0.3.9.2]
<JonnieCache>
you could just use exception handling
tjbiddle has joined #ruby
<JonnieCache>
but that will make your app even more of a mess
megha has joined #ruby
dr_neek has joined #ruby
tjbiddle has quit [Remote host closed the connection]
<jblack>
Yeah, I started there. a crapload of exception handlers in the get handlers. felt repetitive and wrong.
philcrissman has joined #ruby
<JonnieCache>
more to the point youre basically covering your app in GOTO statements
ossareh has joined #ruby
tjbiddle has joined #ruby
daslicious_ has joined #ruby
<JonnieCache>
which is a bad choice as a solution to overcomplex code
pkrnj has quit [Ping timeout: 255 seconds]
a_a_g has quit [Read error: Connection reset by peer]
atadesk has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
<jblack>
hmmm. My goal is to reduce redundancy by calling out for common code.
<JonnieCache>
i know you can call halt(500) anywhere in a sinatra app and it stops the control flow
<JonnieCache>
but i dont know where you end up then
kayloos has joined #ruby
a_a_g has joined #ruby
<jblack>
Let me try that.
_nitti has joined #ruby
<JonnieCache>
sinatra also has helpers like not_found maybe you could see how theyre implemented
emocakes has quit [Quit: emocakes]
<jblack>
Oh.
philips_ has joined #ruby
adeponte has joined #ruby
<jblack>
I wonder if helpers can handle exceptions. The backend is pretty clean and does a good job of throwing well named exceptions.
trumpeter2003 has joined #ruby
<jblack>
I took the time to make sure -that- was right. Just got into trouble in that glue laywer.
<jblack>
layer
<JonnieCache>
i suppose the stateless nature of http makes the GOTO-like aspect of exception handlers less awful
s7ry93r has joined #ruby
<JonnieCache>
because you dont have to clean up anything, it doesnt matter where you came from
<jblack>
I'm not too adverse to goto on the way to an exit.
<jblack>
Right. I just want to display a template and "die"
_nitti has quit [Remote host closed the connection]
<JonnieCache>
yeh exactly. in a web app youre always on the way to an exit and you always leave empty handed
<apeiros_>
yfeldblum: because 90s is so many magnitudes too slow
<apeiros_>
and I've had rails apps starting in affected rubies
brianpWins has quit [Quit: brianpWins]
<yfeldblum>
apeiros_, it seems to me to be O(n^2)
<JonnieCache>
redmine doesnt have that many files though
<JonnieCache>
even my absolutely enormous spree project doesnt take 90s
miskander has joined #ruby
<JonnieCache>
and my computers arent that fast
mengu_ has quit [Read error: Connection reset by peer]
mengu_ has joined #ruby
<ekristen>
apeiros_: thanks
<apeiros_>
I wonder how fast startup time on my NAS will be, that's some underpowered hardware…
<yfeldblum>
JonnieCache, which version of ruby?
<JonnieCache>
well obv 193 now
<apeiros_>
yfeldblum: while it is O(n^2), the overall effect of it wasn't that big
<JonnieCache>
but i dont remember it ever being that slow even in 192 days
<yfeldblum>
apeiros_, it was huge
<apeiros_>
yfeldblum: not 90s huge
<apeiros_>
not factor 10 huge for an average rails app (and that's conservative)
d2dchat has joined #ruby
tenmilestereo has joined #ruby
karasawa has joined #ruby
ekristen has left #ruby [#ruby]
jrajav has joined #ruby
haxrbyte has quit [Ping timeout: 240 seconds]
haxrbyte has joined #ruby
jrajav has quit [Client Quit]
arturaz has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
nathancahill has joined #ruby
icole has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
mneorr has quit [Ping timeout: 260 seconds]
Spami has quit [Quit: This computer has gone to sleep]
mneorr has joined #ruby
[1]c3vin has joined #ruby
huoxito has quit [Quit: Leaving]
friskd has quit [Read error: Operation timed out]
a_a_g has quit [Read error: Connection reset by peer]
hadees has joined #ruby
a_a_g has joined #ruby
friskd has joined #ruby
c3vin has quit [Ping timeout: 240 seconds]
[1]c3vin is now known as c3vin
Vainoharhainen has quit [Quit: Leaving...]
deadlytoah has joined #ruby
Axsuul has joined #ruby
pasv has quit [Ping timeout: 276 seconds]
marr has joined #ruby
itnomad has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
io_syl has joined #ruby
cdt has quit [Quit: Ex-Chat]
Goles has joined #ruby
kaen has joined #ruby
ChampS666 has joined #ruby
csigi has quit [Ping timeout: 260 seconds]
thone_ has quit [Ping timeout: 276 seconds]
slainer68 has quit [Remote host closed the connection]
megha has quit [Quit: WeeChat 0.3.9.2]
miskander_ has joined #ruby
thone has joined #ruby
schaerli has quit [Remote host closed the connection]
jlast has quit [Remote host closed the connection]
gyre007 has joined #ruby
rdark has quit [Quit: leaving]
jlast has joined #ruby
_nitti has quit [Remote host closed the connection]
TerabyteST has quit [Quit: terabytest]
alex20032 has joined #ruby
<alex20032>
What do you people think about GO programming language?
jonathanwallace has quit [Ping timeout: 276 seconds]
stevechiagozie has quit [Quit: Computer has gone to sleep.]
miskander has quit [Ping timeout: 255 seconds]
miskander_ is now known as miskander
szck has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
mrsolo has joined #ruby
dsabanin has joined #ruby
zigomir has quit [Quit: zigomir]
jtharris has quit [Quit: WeeChat 0.3.9.2]
breakingthings has quit []
slissner is now known as speakingcode
jlast has quit [Ping timeout: 276 seconds]
rakl has quit [Quit: sleeping]
asteve has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
rakl has joined #ruby
carlyle has joined #ruby
alex20032 has left #ruby [#ruby]
Kuifje has joined #ruby
Kuifje has quit [Changing host]
Kuifje has joined #ruby
codebrah has joined #ruby
alex__c2022 has quit [Quit: alex__c2022]
<codebrah>
yo
luckyruby has joined #ruby
TerabyteST has joined #ruby
DatumDrop has quit [Remote host closed the connection]
brianpWins has joined #ruby
havenn has quit [Remote host closed the connection]
beneggett has quit [Quit: Computer has gone to sleep.]
havenn has joined #ruby
aedorn has joined #ruby
havenn has quit [Read error: Operation timed out]
Mon_Ouie has quit [Ping timeout: 248 seconds]
wroathe has joined #ruby
szck has quit [Quit: Leaving.]
havenn has joined #ruby
codebrah has quit [Ping timeout: 245 seconds]
Mon_Ouie has joined #ruby
mockra has joined #ruby
jlast has joined #ruby
zastern has joined #ruby
mneorr has quit [Ping timeout: 265 seconds]
kpshek has joined #ruby
zastern_ has quit [Ping timeout: 255 seconds]
miskander has quit [Quit: miskander]
a_a_g has quit [Read error: Connection reset by peer]
koshii has joined #ruby
a_a_g has joined #ruby
dsabanin has quit [Quit: Leaving...]
haxrbyte has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
nicoulaj has joined #ruby
cantonic_ has joined #ruby
stevechiagozie has joined #ruby
chrxn has joined #ruby
shevy2 has joined #ruby
karl_____ has joined #ruby
cantonic has quit [Ping timeout: 240 seconds]
cantonic_ is now known as cantonic
toekutr has joined #ruby
<karl_____>
i have a file with lines starting with an IP address, followed by a space. What is the best way to return the IP address (ie, from starting of line to first space)?
workmad3 has quit [Ping timeout: 255 seconds]
F1skr has quit [Ping timeout: 260 seconds]
<karl_____>
i was thinking of using a substring, delimit based on whitespace, and return [0]
trumpeter2003 has quit [Read error: Connection reset by peer]
<pmros>
it seems ruby 2.0 won't precompile to bytecode
<pmros>
what a pity!
<pmros>
what do you think about?
koshii has quit [Ping timeout: 256 seconds]
trumpeter2003 has joined #ruby
ebobby has joined #ruby
thatRD has quit [Quit: thatRD]
alex__c2022 has quit [Ping timeout: 248 seconds]
Choclo has quit [Ping timeout: 248 seconds]
alex__c2022_ is now known as alex__c2022
willob has joined #ruby
dankest has joined #ruby
DatumDrop has quit [Ping timeout: 246 seconds]
nathancahill has quit [Read error: Connection reset by peer]
nathancahill has joined #ruby
Neomex has joined #ruby
Pip has joined #ruby
megha has quit [Quit: WeeChat 0.3.9.2]
swingha has joined #ruby
dmiller has joined #ruby
Jedi_SCT1 has quit [Quit: See ya]
snearch has quit [Quit: Verlassend]
_nitti has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
Jedi_SCT1 has joined #ruby
friskd has quit [Quit: friskd]
a_a_g has quit [Read error: Connection reset by peer]
sayan has quit [Read error: Connection reset by peer]
friskd has joined #ruby
hydrozen has joined #ruby
a_a_g has joined #ruby
friskd has quit [Read error: Connection reset by peer]
friskd has joined #ruby
ryanh_ has joined #ruby
MattRb has quit [Quit: MattRb]
rezzack has quit [Quit: Leaving.]
wermel has quit [Remote host closed the connection]
ryanjh has quit [Ping timeout: 248 seconds]
<pmros>
so quiet...
arturaz has quit [Remote host closed the connection]
rezzack has joined #ruby
luckyruby has joined #ruby
Choclo has joined #ruby
a_a_g has quit [Quit: Leaving.]
mavenastic has joined #ruby
jlast has quit [Ping timeout: 255 seconds]
<speakingcode>
how does one describe a parameter with rdoc
mavenastic has left #ruby [#ruby]
<speakingcode>
is # @param [Type] description appropriate?
MattRb has joined #ruby
<Mon_Ouie>
That's YARD's syntax
<Pip>
What is the difference between '\n' and '\\n'?
<speakingcode>
o. i totally just guessed it based on javadoc,, what is the rdoc syntax?
<Mon_Ouie>
RDoc doesn't have a dedicated syntax for parameter, just type it out
<speakingcode>
oh ok
trumpeter2003 has quit [Read error: Connection reset by peer]
<Mon_Ouie>
Pip: The second one has an uneeded backslash. They both represent the same string.
trumpeter2003 has joined #ruby
<speakingcode>
thanks Mon_Ouie
<Pip>
Mon_Ouie, which is the Enter ?
<Pip>
newline character?
<Mon_Ouie>
The line feed character
<Mon_Ouie>
(newline is an acceptable name, too)
rezzack has quit [Quit: Leaving.]
<Mon_Ouie>
And actually it's neither. It's a backslash followed by "n"
<Mon_Ouie>
'\n'.length == 2
<Mon_Ouie>
However, "\n" is the newline character
<Pip>
:O
<Pip>
I didn't know that
baphled has joined #ruby
MattRb has quit [Client Quit]
jlast has joined #ruby
BSaboia has joined #ruby
<Pip>
What is $/ ?
nemesit has joined #ruby
<Mon_Ouie>
The default line separator for methods like gets. Usually they read up to "\n" but if you set $/ to something else, they will read up to that
<Mon_Ouie>
(I’ve never seen someone actually change it, though)
<Pip>
Gotcha
postmodern has joined #ruby
chussenot has quit [Quit: chussenot]
Neomex has quit [Quit: Neomex]
_nitti has quit [Remote host closed the connection]
_alejandro has joined #ruby
alexspeller has joined #ruby
jrist-afk is now known as jrist
MattRb has joined #ruby
Elhu has joined #ruby
DatumDrop has joined #ruby
platzhirsch has joined #ruby
albakry has joined #ruby
<platzhirsch>
What is the Ruby way of iterating an array and only doing a modification if condition c does not apply?
nicoulaj has quit [Remote host closed the connection]
<banisterfiend>
platzhirsch: array.each { |v| v.haxor! if c? }
_nitti has joined #ruby
pmros has quit [Read error: Connection reset by peer]
<platzhirsch>
banisterfiend: thanks
nemesit has quit [Quit: Leaving...]
<platzhirsch>
I need to undergo Ruby bootcamp, I think I have forgotten 2/3 of the Ruby syntax and Ruby-idiomatic way of writing code
dangerousdave has joined #ruby
<Kovensky>
heh
karl___ has quit [Quit: Page closed]
<Kovensky>
I still haven't entirely gotten the hang of ruby-idiomatic code
<Kovensky>
most of my ruby still reads like perl
<banisterfiend>
platzhirsch: how come? stuck in rails?
<platzhirsch>
banisterfiend: no, didn't take time yet to use Ruby besides my machine learning class in last summer term, I need to do a real project
zehrizzatti has joined #ruby
yalue has joined #ruby
mpfundstein has quit [Ping timeout: 255 seconds]
<banisterfiend>
platzhirsch: what's your primary language?
<platzhirsch>
banisterfiend: Java, also some Python lately
carloslopes has quit [Remote host closed the connection]
itchyouch has joined #ruby
<banisterfiend>
platzhirsch: so, you seem set. Why bother with ruby? :P
<platzhirsch>
banisterfiend: I've fallen in love with the syntax and want to learn another language in depth
danieldocki has joined #ruby
nicoulaj has joined #ruby
<JohnTeddy>
How can I convert a "string" into a variable string?
ryanh_ has quit [Read error: Connection reset by peer]
<banisterfiend>
JohnTeddy: what kind of variable
<banisterfiend>
platzhirsch: you prefer the syntax to python?
kpshek has quit [Ping timeout: 276 seconds]
DatumDrop has quit [Ping timeout: 260 seconds]
<j0sh\a>
hi guys, if I bundle exec rails c production; I get to irb and can input a command to interact with my app and pull some info. How can I do this with a ruby script?
<platzhirsch>
banisterfiend: yes
nyuszika7h has quit [Remote host closed the connection]
<Norrin>
I need a project too.
<Norrin>
Making Mac GUI apps costs money though.
lesnik_ has joined #ruby
<Norrin>
in ruby.
mrsolo has quit [Quit: This computer has gone to sleep]
<Hanmac>
Norrin you are wrong
<Norrin>
Shoes looks immature.
hybris has joined #ruby
<breakingthings>
Norrin macruby is free innit
nyuszika7h has joined #ruby
<JohnTeddy>
banisterfiend: Well a variable already exists, a, b, c. I want the user to input (with gets.chomp) a, b or c.
<Norrin>
Don't think so.
Choclo has quit [Ping timeout: 240 seconds]
<JohnTeddy>
ThougH I don't want "a", "b" or "c", I want a, b, or c
<breakingthings>
Norrin pretty sho it is
<breakingthings>
RubyMotion is what costs money.
mrsolo has joined #ruby
<breakingthings>
Which is iOS.
<Hanmac>
Norrin with wxRuby or rwx i can do native apps in windows, in linux and in MacOSX
<Norrin>
Ok. Will look it up
<Norrin>
Thought I heard both costs
kpshek has joined #ruby
_nitti has quit [Remote host closed the connection]
karasawa has quit [Ping timeout: 276 seconds]
itchyouch_ has joined #ruby
<j0sh\a>
any ideas? it's just a one line while in irb..
ryanjh has joined #ruby
<breakingthings>
Didn't know about wxRuby.
ebouchut has quit [Quit: This computer has gone to sleep]
<Gate>
j0sh\a: usually you do a rake task
TheFuzzball has quit [Quit: Computer has gone to sleep.]
trumpeter2003 has quit [Read error: Connection reset by peer]
<Norrin>
Lol. Just now
trumpeter2003 has joined #ruby
griffindy has quit [Quit: Computer has gone to sleep.]
lesnik_ has quit [Quit: Lost terminal]
<platzhirsch>
Any idea how I can effectively use collect on an array to alter its elements and push after very element another one into it? https://gist.github.com/30ff014eb63696f56f79
<Norrin>
Offended by "morons". Guess it was supposed to be funny or something though.
<JohnTeddy>
How can I make that program less ugly?
<albakry>
Hello, what is the best reference book to learn ruby for newbie programmer
<albakry>
Thanks in advance :)
rburton- has joined #ruby
dougireton has joined #ruby
ryanf has joined #ruby
<yaymukund>
JohnTeddy: for starters, how about keeping the piles in a hash so you can do something like: piles[pile_destination] << piles[pile_source].pop
itchyouch_ has joined #ruby
dmiller has quit [Ping timeout: 260 seconds]
<yaymukund>
but this looks like homework, so that's as far as I'll go :p
<Xeago>
apeiros_: time for sc2?
Choclo has joined #ruby
<Hanmac>
Norrin after i show them that i alone can program faster and better than they using an code generator, they still want to use swig ... after i show tham that my code is so much better .... thats why i call them morrons :P
<JohnTeddy>
yaymukund: It runs and works fine, so if it was home work I would be done. I'm actually asking a more vague/general question about good ways to write the program.
<mensvaga>
what's the syntax for specifying an attr_accessor when that variable has an @ before it?
<mensvaga>
attr_accessor :@something
<mensvaga>
doesn't seem to work
itchyouch_ has quit [Client Quit]
<Norrin>
Hanmac: Gotcha.
aapzak has quit [Remote host closed the connection]
<Hanmac>
mesvaga do it without @, the @ is added automaticly
<mensvaga>
ok
<mensvaga>
thanks
dmiller has joined #ruby
dougireton has quit [Read error: Connection reset by peer]
<mensvaga>
does using .send bypass method_missing ?
itchyouch has quit [Ping timeout: 255 seconds]
schaerli has quit [Remote host closed the connection]
timonv has joined #ruby
<mensvaga>
actually, scratch that.
<Hanmac>
no, method_missing will be used
<swarley>
It has to use method missing
<mensvaga>
I have attr_accessor :@something and I'm getting:
<mensvaga>
nil is not a symbol
<mensvaga>
for that line.
<mensvaga>
shit
karasawa has joined #ruby
<swarley>
you can just us attr_accessor :something
<mensvaga>
forget about the @
<mensvaga>
I got rid of that.
DatumDrop has joined #ruby
<swarley>
Then what is the line now
ukd1 has joined #ruby
<mensvaga>
attr_accessor :something
<swarley>
k
georgeisb has joined #ruby
<mensvaga>
I'll try initializing the variable first or something.
<swarley>
And you're getting a TypeError?
<swarley>
You shouldn't have to
<swarley>
instance variables are nil by default
codezombie has joined #ruby
yacks has quit [Ping timeout: 240 seconds]
<mensvaga>
I'm digging into debugging it now. something else funky is going on.
[Neurotic] has joined #ruby
ukd1 has quit [Client Quit]
<JohnTeddy>
If I have 7 numbers in an array, what is a good way to pick the highest number?
<Hanmac>
yeah wxRuby is more than six feet under :P
platzhirsch has quit [Ping timeout: 272 seconds]
supergiantrobot has quit [Quit: supergiantrobot]
<yaymukund>
I'm working on a gem that does system level stuff. I'd like it to ship with some default .yml config files. Where would I store those files so that my script can read it and override values if necessary?
karasawa has quit [Ping timeout: 256 seconds]
<yaymukund>
("Where would I store those files" meaning "where does it belong in the structure of a gem?")
Takehiro has joined #ruby
trumpeter2003 has quit [Ping timeout: 240 seconds]
gyre007 has joined #ruby
karasawa has joined #ruby
bigmac has joined #ruby
drago757 has joined #ruby
sepp2k1 has joined #ruby
sepp2k has quit [Ping timeout: 256 seconds]
mvangala has quit [Read error: Connection reset by peer]
cdt has joined #ruby
nemesit has joined #ruby
Goles_ has joined #ruby
mvangala has joined #ruby
Steppen has quit [Quit: Leaving]
yalue has quit [Quit: Leaving]
<canton7>
yaymukund, I don't like the idea of modifying files in your gempath
<canton7>
if you're going to do that, put those files in ~/ or something
_46bit has joined #ruby
reset has joined #ruby
eldariof has quit []
<yaymukund>
canton7: I'm not being clear, sorry. I'd like to read config-default.yml for default values (this file should never be modified) and then override the default values iwth ~/.config.yml
<canton7>
ah, yeah sensible
<yaymukund>
my question is where should that config-default.yml file live?
<yaymukund>
or does it not matter
Goles has quit [Ping timeout: 252 seconds]
<canton7>
don't know that there's a convention there
<canton7>
config/ ?
<canton7>
etc/ ?
karasawa has quit [Ping timeout: 240 seconds]
<yaymukund>
it seems weird to have yml files in the gempath
<bigmac>
has any one automated a webpage compiled from a directory or list of movies ?
<yaymukund>
I like etc/, I'll go with that
<yaymukund>
canton7: ty
MMOURA has joined #ruby
graft has quit [Ping timeout: 276 seconds]
mrsolo has quit [Quit: This computer has gone to sleep]
mrsolo has joined #ruby
albakry has quit [Quit: Leaving]
Goles_ has quit [Client Quit]
* MMOURA
New Network joined /server 87.202.109.65
MMOURA has quit [Killed (idoru (Spam is off topic on freenode.))]
serhart has quit [Quit: Leaving.]
graft has joined #ruby
_46bit has left #ruby [#ruby]
graft has quit [Changing host]
graft has joined #ruby
RagingDave has joined #ruby
Takehiro has quit [Ping timeout: 265 seconds]
xAndy is now known as xandy
<bigmac>
any one every try to download a trailer from www,imdb,com
<bigmac>
i have been searching threw traffic and i beileve i found the swf file but im not sure how to play it...
<bigmac>
im trying to automate this with ruby
xandy is now known as xAndy
aldodelgado has joined #ruby
pu22l3r has joined #ruby
invisime has left #ruby [#ruby]
volte has quit [Read error: Connection reset by peer]
apeiros_ has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 245 seconds]
<bigmac>
ia.media-imdb.com/images/M/Example.swf
<llaskin>
the output of p site_name doesn't seem to be a string to me...seems to output what I would get when I run string.inspect.....
<bigmac>
i found this threw a tcp dump it fails to play threw vlc
subbyyy has quit [Ping timeout: 276 seconds]
<bigmac>
i think i would need the java script to play it?
emmanuelux has joined #ruby
workmad3 has joined #ruby
hoelzro|away is now known as hoelzro
hoelzro is now known as hoelzro|away
dr_neek has quit [Quit: dr_neek]
<llaskin>
i'm also seeing these "Exception in DebugThread loop: undefined method `is_binary_data?' for "[[\"Automation Test Same Shard01-07-2013--11-59-40 Site\"]]":String
slainer68 has joined #ruby
<ezra>
llaskin: looks like is_binary_data? isn't just deprecated, it's gone
<ezra>
llaskin: nothing to do w/ rdebug
<llaskin>
ezra: I don't ever call is_binary_data in any of my code
<ezra>
llaskin: the other output does look like a string, it just looks like someone is overloading to_s or returning something unexpected
<ezra>
llaskin: brb
ebouchut has joined #ruby
Elhu has joined #ruby
rburton- has quit [Quit: Leaving...]
dankest has quit [Quit: Leaving...]
<ezra>
llaskin: what versions of ruby-debug and linecache do you have?
Playground has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
Takehiro has quit [Ping timeout: 246 seconds]
<atmosx>
hello
_46bit has left #ruby [#ruby]
<ezra>
well, approach them as separate problems for now just to avoid conflating things
alex__c2022 has quit [Remote host closed the connection]
asteve has joined #ruby
karasawa has quit [Ping timeout: 252 seconds]
alex__c2022 has joined #ruby
<ezra>
might be related, but until you get the is_binary_data? call tracked down, i wouldnt worry about it
gabrielrotbart has joined #ruby
geekbri has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
<ezra>
do you understand what i was saying about checking the caller in an overridden String#is_binary_data?
Guedes0 has joined #ruby
<llaskin>
no
aedorn has quit [Quit: Leaving]
<llaskin>
i mean, lets pretend I need to know down to which file to edit on my machine
<llaskin>
given that I have the typical "C:\Ruby193\blah install
IceDragon has joined #ruby
piotr__ has joined #ruby
<ezra>
add class String\n def is_binary_data?\n puts caller() # or log it\n end \n end
horofox__ has joined #ruby
<llaskin>
where do I add that?
<ezra>
just add it in the top of the src file that you're debugging for now
piotr_ has quit [Ping timeout: 260 seconds]
<ezra>
just temporary to track down where the call is coming from
<ezra>
it'll give you a call stack
Loaft has joined #ruby
<llaskin>
ok
<llaskin>
running now
gabrielrotbart has quit [Remote host closed the connection]
huoxito has joined #ruby
Choclo has quit [Ping timeout: 246 seconds]
jmeeuwen has quit [Ping timeout: 255 seconds]
nwertman has quit [Quit: leaving]
<atmosx>
I'd kill for corn flakes now
<atmosx>
jeez
horofox_ has quit [Ping timeout: 255 seconds]
<IceDragon>
atmosx thats illegal >:
itchyouch has joined #ruby
itchyouch has quit [Client Quit]
gansbrest has joined #ruby
miskander has quit [Quit: miskander]
maletor has joined #ruby
<llaskin>
ok so the thread problem happens when I click over to the variables tab in Netbeans(though all of a sudden the variables tab that wasn't working, is working....wtf)....I am using netbeans 6.9.1 which is technically deprecated(but is the last version of netbeans that supported ruby dev). Here's a gist of what happens: https://gist.github.com/4478880
horofox__ has quit [Quit: horofox__]
grzywacz has joined #ruby
grzywacz has quit [Changing host]
grzywacz has joined #ruby
<gansbrest>
hi. what's the opposite to "string" =~ /regex/ . I need to use that when there is no match.
<platzhirsch>
I have an array full of command strings, but commands.each{|c| exec(c) } only executes the first, is that right or am I missing something?
kpshek has quit []
ebobby has quit [Ping timeout: 240 seconds]
<ezra>
llaskin: yeah, it's in the xml printer
<atmosx>
IceDragon: yeah, I guess depends on the location. If I were Pablo Escobar's son, I'd probably kill 3 guards if they didn't get me a cup of cornflakes.
mengu_ has quit [Quit: Konversation terminated!]
<IceDragon>
;x
<atmosx>
IceDragon: :-P
nyuszika7h has quit [Remote host closed the connection]
<ezra>
llaskin: you can see if there's a newer ide19 gem, or you can edit yours and figure out what the replacement for is_binary_data? is and use that
<IceDragon>
murder.he.wrote
beiter has quit [Quit: beiter]
ukd1 has quit [Quit: leaving]
reset has quit [Quit: Leaving...]
<llaskin>
ezra AFAIK thats the latest ide19 gem
nyuszika7h has joined #ruby
medik has joined #ruby
dankest has joined #ruby
<ezra>
llaskin: i dont use that gem, so i don't know. i'd see what the replacement for is_binary_data? is and override the xml printer method that's calling it
<ezra>
llaskin: so now you have a line number: C:/Ruby193/lib/ruby/gems/1.9.1/gems/ruby-debug-ide19-0.4.12/lib/ruby-debug/xml_printer.rb:124:in `print_variable'
thatguycraig has quit [Quit: Leaving.]
c3vin has quit [Ping timeout: 240 seconds]
Vainoharhainen has joined #ruby
Hanmac_ has joined #ruby
connor_ has joined #ruby
reset has joined #ruby
gurps has quit [Quit: bye]
<llaskin>
ezra ithink i got it...
gurps has joined #ruby
gurps has quit [Remote host closed the connection]
<llaskin>
hrmmmm was I supposed to add the code inside the module or above the module def in xml_printer.rb?
<ezra>
what code?
clooth has quit [Ping timeout: 252 seconds]
<atmosx>
llaskin: don't do that. There are a mirriad ways to edit/open a class in your programs. Don't edit a gem sitting on your GEM_HOME
nwertman has joined #ruby
miskander has joined #ruby
gabrielrotbart has joined #ruby
<llaskin>
the code noted in the accepted comment on the 2nd link I posted
xemu has joined #ruby
<ezra>
llaskin: you can override the module definition in your source, not the gem directly
rburton- has joined #ruby
sailias has quit [Quit: Leaving.]
<llaskin>
so do I have to put the String class at the top of every script I have?
kpshek has joined #ruby
atno has joined #ruby
Vainoharhainen has quit [Quit: Leaving...]
<ezra>
no just once in an early eval. it seems like there's a newer gem somewhere though
<ezra>
i'm just skimming these threads, but it sounds like there's a beta
gurps has joined #ruby
<atmosx>
llaskin: is it possible that your programming experience is kinda flawed for what you're trying to accomplish? :-P
rburton- has quit [Client Quit]
clooth has joined #ruby
<llaskin>
atmosx: yes, but I'm just trying to make something that worked in 1.8.7 work in 1.9.3
<ezra>
atmosx: nothing like a busted ass debugger to halt his programming experience though :)
<atmosx>
llaskin: You can edit the class in a file located in ~/project/lib/myedits.rb and then load via "require_related 'lib/myedits.rb'" the file in all your .rb files, so you don't have to manually add the class on every file.
<atmosx>
llaskin: oh I see.
<atmosx>
ezra: what's the busted ass debugger?
<llaskin>
if I load it at the "top level" of my code(IE, i have one script that sort of controls all other scripts) will that be enough?
platzhirsch has quit [Read error: Connection reset by peer]
gabrielrotbart has quit [Remote host closed the connection]
<ezra>
ruby-debug w/ 1.9.3, specifically the -ide19 gem in his case
<ezra>
llaskin: yes
rondale_sc has quit [Quit: rondale_sc]
nga4 has quit [Ping timeout: 255 seconds]
andrewhl has quit [Remote host closed the connection]
<llaskin>
testing now
<ezra>
llaskin: what atmosx is saying is that it's good practice to put that override outside of your main code; otherwise you'll have some orphaned code once the gem is fixed, and some poor maintainer(you?) will be trying to figure out wtf it's there for
<llaskin>
aaah good point
<llaskin>
still getting stack trace when switching to the watches tab
<ezra>
did you replace that caller() definition w/ whatever was on SO
ner0x has quit [Quit: Leaving]
<ezra>
otherwise, the last loaded definition wins
<llaskin>
ahahah hahah i'm a moron
<llaskin>
lemme rerun
<speakingcode>
would anyone be able to tell me how to do a query in active record equivalent to "SELECT value FROM table WHERE value::int in (99,393,2,13)
<speakingcode>
i.e. get result set of all the items matched in a collection
nomenkun has quit [Remote host closed the connection]
v0n has quit [Ping timeout: 240 seconds]
nateberkopec has quit [Quit: Leaving...]
nwertman has quit [Read error: Connection reset by peer]
Hanmac_ has quit [Ping timeout: 245 seconds]
karasawa has quit [Ping timeout: 252 seconds]
nwertman has joined #ruby
<shevy2>
speakingcode I could not because I dont know activerecord :(
LouisGB has joined #ruby
<speakingcode>
its okay i found it
ryanjh has quit [Quit: Computer has gone to sleep.]
<Gate>
speakingcode: where(["value::int in (?)", id_array])
alex__c2022 has quit [Quit: alex__c2022]
<workmad3>
speakingcode: where(:"value::int" => id_array) may also work
cdt has quit [Ping timeout: 248 seconds]
tenmilestereo has quit [Quit: Leaving]
<speakingcode>
ty
ebobby has joined #ruby
kaen has quit [Ping timeout: 264 seconds]
dankest has quit [Quit: Leaving...]
jlast has quit [Remote host closed the connection]
alexspeller has quit [Quit: Leaving...]
jgarvey has quit [Quit: Leaving]
yaymukund has quit [Ping timeout: 264 seconds]
yaymukund has joined #ruby
serhart has quit [Quit: Leaving.]
tommyvyo has joined #ruby
_nitti has quit [Remote host closed the connection]
sailias has joined #ruby
<atmosx>
speakingcode: try #rubyonrails
dsabanin has quit [Quit: Leaving...]
<atmosx>
they for sure will know how to work out activerecord
<workmad3>
atmosx: I'm in there too ;) the only reason I said 'maybe' was because I wasn't sure about the value::int attribute name in that style of query
jlast has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
ebobby has quit [Ping timeout: 260 seconds]
<atmosx>
:-) okay
<atmosx>
I'm not btw :-P
abrausch has joined #ruby
ossareh has quit [Ping timeout: 260 seconds]
yaymukund has quit [Ping timeout: 246 seconds]
rondale_sc has joined #ruby
dangerousdave has quit [Quit: Leaving...]
grzywacz has quit [Ping timeout: 246 seconds]
rondale_sc has quit [Client Quit]
mengu has joined #ruby
yaymukund has joined #ruby
_nitti has joined #ruby
mneorr has joined #ruby
phantasm66 has quit [Quit: *sleeeep….]
dr_neek has joined #ruby
slash_nick has joined #ruby
_nitti_ has joined #ruby
flip_digits has quit [Ping timeout: 252 seconds]
carlyle has quit [Remote host closed the connection]
c3vin has joined #ruby
TerabyteST has quit [Quit: terabytest]
theRoUS has quit [Ping timeout: 246 seconds]
Goles has joined #ruby
sepp2k1 has quit [Remote host closed the connection]
blacktulip has quit [Remote host closed the connection]
alanp has joined #ruby
awarner has joined #ruby
yaymukund has quit [Ping timeout: 252 seconds]
mpfundstein has quit [Ping timeout: 260 seconds]
icco has joined #ruby
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
awarner_ has joined #ruby
allsystemsarego has quit [Quit: Leaving]
_46bit has joined #ruby
aloshkarev has joined #ruby
gyre007 has joined #ruby
Jamone is now known as Monie
jjbohn has quit [Quit: Leaving...]
cdt has joined #ruby
cdt has quit [Remote host closed the connection]
kevinykchan has joined #ruby
awarner has quit [Ping timeout: 260 seconds]
samuel02 has quit [Remote host closed the connection]
ossareh has quit [Ping timeout: 252 seconds]
TheFuzzball has quit [Quit: Computer has gone to sleep.]
beneggett has joined #ruby
dmiller has quit [Remote host closed the connection]
reset has quit [Quit: Leaving...]
hydrozen has quit [Quit: Computer has gone to sleep.]
<speakingcode>
can i access an objects field as a hash or something?
Dann1 has quit [Quit: Dann1]
<speakingcode>
for instancei n javascript i could say var myObject = { name: "speakingcode", job: "programmer"} then var fieldtoget="name" then i could say myObject[fieldtoget]