SqREL has quit [Remote host closed the connection]
<apeiros_>
try it in your own ruby if you don't trust some arbitrary bot
<johnsbbd>
swarley: why does it matter? how can you use a language if I have no model of the semantics in my head?
<nOStahl>
ah fixed my issue with gem install debugger-linecache -v '1.1.2' -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p392
<swarley>
You can easily use a language without having to know the intricate details of the interpreter
<swarley>
knowing the binding of ARGV will help you in no way
<johnsbbd>
apeiros_: ok thanks, i see where it's defined now
soulcake has joined #ruby
<johnsbbd>
apeiros_: my problem was http://www.ruby-doc.org/core-1.9.3/ lets you search objects and methods, but there's no way to know where a constant is defined, so i had no way to look it up
tcstar has quit [Ping timeout: 255 seconds]
<apeiros_>
johnsbbd: as said, toplevel namespace is Object
<apeiros_>
almost all constants reachable via plain `Foo` are defined there
<johnsbbd>
apeiros_: so if I was in an instance of BasicObject, i woudln't be able to use ARGV?
<apeiros_>
*some* are defined in Kernel and are accessible everywhere because Object includes Kernel
<apeiros_>
via ::ARGV, you should be able
<apeiros_>
but plain ARGV probably won't work
<apeiros_>
haven't used BasicObject's that much yet
<lewis>
that is strange , even though im using the most up to date ruby version i can't use require_relative
chrishough has quit [Quit: chrishough]
Takehiro has joined #ruby
Takehiro has quit [Remote host closed the connection]
pandawarrior1 has joined #ruby
alesguzik has quit [Quit: leaving]
twoism has quit [Remote host closed the connection]
Dwarf has quit [Max SendQ exceeded]
apeiros_ has quit [Remote host closed the connection]
johnsbbd has joined #ruby
voodoofish430 has quit [Quit: Leaving.]
<johnsbbd>
Hi - question about mutability and arrays. I thought that ! marked a method with side effects, but Array#insert doesn't have a !, but it does have side effects, is that right?
Dwarf has joined #ruby
bradhe has quit [Remote host closed the connection]
jonahR has joined #ruby
jetblack has joined #ruby
bradhe has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
philcrissman has quit [Remote host closed the connection]
<lewis>
johnsbbd: I believe that ! marks a method that return the same object changed with the corresponding method instead of a new object
ferdev is now known as ferdev|away
<johnsbbd>
lewis: so insert doesn't have a ! because there is no variant without a !
sn0wb1rd has joined #ruby
pandawarrior1 has quit [Quit: Leaving.]
<sam113101>
clear also doesn't have a !
postmodern has joined #ruby
<lewis>
johnsbbd: what do you mean by no vaiant
<johnsbbd>
lewis: no variant i mean
<lewis>
sam113101: a lot of methods dont
bradhe has quit [Ping timeout: 256 seconds]
<lewis>
johnsbbd: what does that mean
<sam113101>
the bang doesn't really mean "dangerous", it just means it has side effets its variant doesn't have
fir_ed has quit [Quit: Leaving]
<sam113101>
when methods come in pairs (ie sort and sort!)
<johnsbbd>
lewis: "version", a different version of the same method
<banister`sleep>
sam113101: it does mean dangerous
<banister`sleep>
well, 'beware'
<johnsbbd>
well why isn't insert considered dangerous if it has side effects? or am i thinking too hard about this and it's not a firm rule
iamjarvo has quit [Ping timeout: 264 seconds]
<banister`sleep>
consider ActiveRecord's save vs save!
<lewis>
I'm not sure but I stick to what i said - I believe that the exclamation point is an indicator that it does not return a new array like the equivalent method without !
<banister`sleep>
johnsbbd: because it doesn't have a 'safe' variant
<banister`sleep>
johnsbbd: you only need to have ! if there's a non-! version
<johnsbbd>
ok, i can work with thtat
<sam113101>
are you reading a book?
iamjarvo has joined #ruby
markalanevans has joined #ruby
<johnsbbd>
sam113101: i've read several of the books, this problem came up because i was calling insert, getting a new array, and was surprised it was modfing the original as well, because i had dutifully followed the ! system, and now i was getting burned
slainer68 has joined #ruby
charliesome has joined #ruby
<banister`sleep>
johnsbbd: ! is only needed to distinguish two versions of the same method, where one version is somewhat more dangerous than the other
<sam113101>
ok, well the guy that wrote The Well-Grounded Rubyist kind of explain it, in an understandable way
<banister`sleep>
if you only have one version of the method (as in #insert) then you dont need a !
<lewis>
basically if it returns the same array you dont need !
<johnsbbd>
it would be nice if all methods that had side effects were marked, otherwise when i call a function how do i know it's not modifying everything out from under my feet?
<lewis>
ri
<banister`sleep>
johnsbbd: by reading the docs for that method :)
alesguzik has joined #ruby
<banister`sleep>
johnsbbd: but you can also call #dup first to ensure
joeycarmello has quit [Remote host closed the connection]
<johnsbbd>
I'm learning Ruby for work and I like most of it, but I find it very hard to reason about what it is doing, because the semantics seem so ad hoc
jocellyn has quit [Quit: Leaving.]
<lewis>
what's ad hoc
<lewis>
everytime i google i forget
<lewis>
lol
mattbl has quit [Quit: This computer has gone to sleep]
<johnsbbd>
lewis: as it is
<johnsbbd>
lewis: ruby has no semantics beyond what it happens to execute as
<lewis>
johnsbbd: what language did you know before
<johnsbbd>
lewis: if you wrote a semantics for ruby, i think it would be one almighty state transition
Ethan has joined #ruby
thams has quit [Quit: thams]
<johnsbbd>
lewis: C, Haskell, Python
<lewis>
im not sure i understand what you're saying
skogis has quit [Ping timeout: 252 seconds]
miso1337 has joined #ruby
pandawarrior1 has quit [Quit: Leaving.]
pandawarrior1 has joined #ruby
skogis has joined #ruby
thufir_ has joined #ruby
razibog1 has quit [Ping timeout: 245 seconds]
adeponte has quit [Remote host closed the connection]
pepps has joined #ruby
Wildhoney has quit [Ping timeout: 256 seconds]
apeiros_ has joined #ruby
freeayu has quit [Read error: Connection reset by peer]
hbpoison has joined #ruby
freeayu has joined #ruby
johnsbbd has quit [Quit: Page closed]
MartinCleaver has joined #ruby
MartinCleaver has quit [Changing host]
MartinCleaver has joined #ruby
nfk has quit [Quit: yawn]
crackfu has joined #ruby
subbyyy has joined #ruby
Virunga has quit [Remote host closed the connection]
joeycarmello has joined #ruby
apeiros_ has quit [Ping timeout: 246 seconds]
jbw has quit [Ping timeout: 246 seconds]
peteyg has quit [Ping timeout: 248 seconds]
joeycarm_ has joined #ruby
nate00 has joined #ruby
dankest has joined #ruby
skattyadz has quit [Quit: skattyadz]
joeycarmello has quit [Ping timeout: 245 seconds]
apok has quit [Quit: apok]
alesguzik has quit [Quit: leaving]
alesguzik has joined #ruby
thibauts has quit [Ping timeout: 252 seconds]
mattbl has joined #ruby
lewis has quit [Remote host closed the connection]
poikon_ has joined #ruby
nate00 has quit [Remote host closed the connection]
poikon has quit [Killed (calvino.freenode.net (Nickname regained by services))]
poikon_ is now known as poikon
poikon_work has joined #ruby
emergion has joined #ruby
justsee has quit [Quit: Leaving...]
philcrissman has joined #ruby
ffranz has quit [Quit: Leaving]
Nisstyre-laptop has joined #ruby
<Yakko>
aedorn: you still around here?
thibauts has joined #ruby
jbw has joined #ruby
<aedorn>
Yup. Still in prison (aka work)
Hanmac has quit [Ping timeout: 256 seconds]
<aedorn>
Which reminds me.. need to update my Chakra system!
Myconix has quit [Ping timeout: 248 seconds]
jclarke has joined #ruby
alesguzik has quit [Quit: leaving]
Myconix has joined #ruby
mockra has quit [Remote host closed the connection]
thinkclay has joined #ruby
dorei has joined #ruby
<dorei>
hello
<dorei>
i'm doing myArray.include?(x)
<dorei>
is there some magic myArray that include?(x) will always return true no matter what x is ?
quazimodo has joined #ruby
`p has quit [Ping timeout: 252 seconds]
Takehiro has joined #ruby
<quazimodo>
so i have some class Foo and i want my instance my_foo.some_variable to return the value of some_variable that belongs to the class, not the instance
<quazimodo>
so could i do something like self.var = "whatever" in the class, then in the method def some_variable; return self.class.var; end ?
<aedorn>
dorei: mmm nope.
<quazimodo>
i mean, is that wise, is there a better way?
h8R has quit [Remote host closed the connection]
ikst has joined #ruby
<dorei>
aedorn: some magic array that's initialized with a block
<dorei>
no?
<dorei>
:(
sabooky has joined #ruby
<sabooky>
Quick q, When I run my_object.methods I seem to be getting a list that doesn't include methods that were mixed in, how do I get a complete list of all methods my object responds to?
Hanmac has joined #ruby
twoism has joined #ruby
<aedorn>
dorei: Are you trying to track something down, or are you really wanting a default value for an Array that will always resolve to true when include? is called? If the latter, no ...
sn0wb1rd has quit [Ping timeout: 255 seconds]
Takehiro has quit [Remote host closed the connection]
c0rn has quit [Quit: Computer has gone to sleep.]
joeycarm_ has quit [Remote host closed the connection]
<ikst>
Hello. I'm new to Ruby. I want to contribute to Ruby somehow. What to start?
ThePicard has quit [Ping timeout: 252 seconds]
bradhe has joined #ruby
linguini has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
ThePicard has joined #ruby
Mon_Ouie has quit [Ping timeout: 244 seconds]
joeycarmello has quit [Ping timeout: 264 seconds]
`p has joined #ruby
Starrfish has joined #ruby
<Spooner>
quazimodo, Other ways yes. Smarter ways: Not particularly.
arya has joined #ruby
Starrfish has quit [Read error: Connection reset by peer]
bradhe has quit [Ping timeout: 248 seconds]
Starrfish has joined #ruby
luckyruby has quit [Remote host closed the connection]
<quazimodo>
Spooner: so this is acceptable and if my ruby genius boss saw it, it'd be fine?
Myconix has quit [Ping timeout: 248 seconds]
MartinCleaver has quit [Quit: MartinCleaver]
<Spooner>
I think so, yes ;) At least it isn't a @@var
<quazimodo>
@@var's seem to be a little ... bit like global variables that suck nuts
superawesomedan has joined #ruby
<Spooner>
No sane dev uses them any more, no ;)
locriani_ has joined #ruby
aytch_ is now known as aytch
S1kx has joined #ruby
S1kx has quit [Changing host]
S1kx has joined #ruby
S2kx has quit [Ping timeout: 245 seconds]
locriani has quit [Read error: Connection reset by peer]
mahmoudimus has joined #ruby
Myconix has joined #ruby
<Spooner>
ikst, You want to know what to do to contribute to the Ruby community? Find a gem you use that has a bug or an additional feature people would find useful and send a pull request.
Starrfish has quit [Ping timeout: 248 seconds]
<ikst>
Spooner: thanks for nice advice!
hiroyuki has quit [Read error: Connection reset by peer]
<Spooner>
Or just report some bugs or make some suggestions of additional features if you don't feel confident of implementing yet. And choose a small gem; don't start with editing Rails ;)
hiroyuki has joined #ruby
<ikst>
I see.
arya has quit [Ping timeout: 246 seconds]
Myconix has quit [Ping timeout: 248 seconds]
arya has joined #ruby
<quazimodo>
Spooner I don't even know what the << operator does :/
<Spooner>
It depends. Generally it means append/push (e.g. on String/Array).
<quazimodo>
class << butts
<quazimodo>
eigenclass huh
<Spooner>
class << self is magical and yeah, it gives you the metaclass/eigenclass.
Myconix has joined #ruby
<quazimodo>
i wonder why I'd need it though
<Yakko>
aedorn: how's prison?
<Yakko>
aedorn: awesome problem, the initscript works fine, as long as I don't invoke it from capistrano =/
<Spooner>
What do you mean, why you'd need it? It just moves the context to the metaclass, so you can add methods to it (the methods places on the metaclass are called from the class, since the class is an instance of the metaclass).
ninegrid has quit [Ping timeout: 256 seconds]
arya has quit [Ping timeout: 276 seconds]
kofno has joined #ruby
<Spooner>
Well, strictly the class isn't an instance of metaclass, but it acts as though it is in this case :P
pandawarrior1 has quit [Quit: Leaving.]
sepp2k1 has quit [Remote host closed the connection]
<quazimodo>
Spooner: hrm ... i guess its like the object that javascripts .prototype creates
<quazimodo>
sortof
superawesomedan has quit [Quit: superawesomedan]
<quazimodo>
i guess i'm saying, i wonder why this architecural desigon was made
harumph has joined #ruby
adeponte has joined #ruby
<Spooner>
Well, you couldn't put the method on the class of your class, since that would be Class and _every_ class would have that method applied!
<quazimodo>
lol true
<Spooner>
It also allows you to add methods onto an instance (by putting the method on the instance's metaclass, so it only applies to the single instance).
<quazimodo>
so the eigen class is like a more specific version of the base class
<quazimodo>
the base class that applies to that class
<quazimodo>
XD
arya has joined #ruby
* quazimodo
dies
<Spooner>
Yeah, it sort of plugs itself between the instance and the class when it is created (they don't exist until you try to alter them).
<Spooner>
And, as I said, on a class they are between the class and its class (which is Class :D).
<quazimodo>
Spooner: i wish this stuff was explained graphically
<aedorn>
Yakko: Have you tried with a psuedo-tty enabled?
<Spooner>
The diagram even has Snoopy in it!
nopolitica has joined #ruby
harumph has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
etcetera has quit []
harumph has joined #ruby
whitedawg has joined #ruby
adeponte has quit [Ping timeout: 276 seconds]
<Spooner>
Oh, I was wrong, eigenclasses are created when the class/object is created (in MRI). However, the effect is the same as if they were created lazily.
philcrissman has quit [Remote host closed the connection]
<aedorn>
Yakko: Yeah, or I think you can enable it just for the run command.. run "cmd", pty: true
angusiguess has joined #ruby
nopolitica has quit [Quit: leaving]
<Yakko>
aedorn: its enabled I'm sure
<aedorn>
it's disabled by default
<Yakko>
aedorn: I can start my unicorn process, nginx, run migrations and download logs/db backups
<Yakko>
aedorn: I don't understand why this is the only one that doesn't work, I was concerned the exit 0/1 status would interfeer, and that's when I learned it runs it I ssh into it =/
tish has joined #ruby
<Yakko>
aedorn: and BTW... I noticed it adds this line of code after I run it on ssh, Detaching to start /usr/local/bin/bundle...done.
<aedorn>
Yakko: Does it work if you run it as an ssh command? As in ssh host "service ..."
tish has quit [Client Quit]
R_Macy has quit [Ping timeout: 252 seconds]
<Yakko>
aedorn: yes, I tried making custom ruby scripts and rake tasks too
slainer68 has quit [Remote host closed the connection]
<Yakko>
aedorn: it always works when I run from the ssh, but never when from capistrano
Beoran_ has joined #ruby
mlr has quit [Ping timeout: 252 seconds]
pavilionXP has quit [Read error: Connection reset by peer]
lewis has joined #ruby
<Yakko>
aedorn: tried from cap shell, it also doesn't work, but it clearly stops the daemon from the pid
robert_ has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC.]
bradhe has joined #ruby
poikon has quit [Remote host closed the connection]
jrajav has quit [Quit: I tend to be neutral about apples]
otters has joined #ruby
subbyyy has quit [Ping timeout: 276 seconds]
Mattix has joined #ruby
bradhe has quit [Ping timeout: 260 seconds]
ikst has quit [Remote host closed the connection]
`p has quit [Remote host closed the connection]
asuka has quit [Ping timeout: 256 seconds]
SCommette has joined #ruby
asuka has joined #ruby
mattbl has joined #ruby
thinkclay has quit [Quit: Leaving.]
`p has joined #ruby
asuka has quit [Ping timeout: 255 seconds]
bradhe has joined #ruby
thams has quit [Quit: thams]
meoblast001 has quit [Remote host closed the connection]
thams has joined #ruby
asuka has joined #ruby
allaire has joined #ruby
garbagecollectio has joined #ruby
bubblehead has quit [Remote host closed the connection]
angusiguess has joined #ruby
Myconix has quit [Quit: clearing cache]
Myconix has joined #ruby
hbpoison_ has joined #ruby
toekutr has quit [Remote host closed the connection]
hbpoison has quit [Ping timeout: 252 seconds]
angusiguess has quit [Ping timeout: 245 seconds]
asuka has quit [Ping timeout: 255 seconds]
asuka has joined #ruby
bradleyprice has joined #ruby
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
roadt has joined #ruby
bradhe has quit [Read error: Connection reset by peer]
mikekelly has quit [Ping timeout: 252 seconds]
havenwood has quit [Remote host closed the connection]
bradhe has joined #ruby
mikekelly has joined #ruby
ryanf has quit [Ping timeout: 264 seconds]
dmiller has quit [Read error: Operation timed out]
tomo` has joined #ruby
tomo` has left #ruby [#ruby]
SCommette has quit [Quit: SCommette]
mduvall has joined #ruby
mduvall has quit [Client Quit]
mduvall has joined #ruby
_justin has joined #ruby
Umren has joined #ruby
<_justin>
i was reading through the book, the ruby programming language. And in the part about variables and assignments, this is something which i interpreted. In ruby variables exist only in local context, ie within a function. rest everything are methods
<_justin>
to be more clear,
<_justin>
def foo; x= 10; end
<_justin>
here x is a variable
<_justin>
def another_foo; x; end
<_justin>
here x is s method call to self
<_justin>
and everything like
<_justin>
foo.x are really method calls
<_justin>
correct me if i am wrong
mattbl has quit [Quit: This computer has gone to sleep]
<_justin>
Boohbah: so the evaluvation of x goes like this in a function without prefixed self, or foo.x. check if its a local variable (an object though), not found invoke a method on self, not found call method_missing
<TTilus>
yes
garbagecollectio has quit [Quit: garbagecollectio]
<TTilus>
pretty much
<TTilus>
except that its not limited within a function
<TTilus>
you can bind a var to val everywhere you like and it exists in that scope
<_justin>
ie, climbs up the hierarchy, till Object/ BaseObject ??
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
<TTilus>
yes
<_justin>
TTilus: "you can bind a var to val everywhere you like and it exists in that scope" can you please explain this
<TTilus>
class Foo; name = :foo; attr_accessor name; end
<_justin>
any language can do anything any other language can do as long as it is Turing Complete, just the complexity, performance and stuffs like that differs.
pepps has quit [Ping timeout: 256 seconds]
<xor_mind->
_justin: right, but syntatic sugar is important for me
<xor_mind->
I can do OOP in C but I'd rather use c++ :D
anotherv1 has quit [Ping timeout: 276 seconds]
<xor_mind->
I can emulate functional programming in C++ but I'd rather use haskell/lisp
decoponio has joined #ruby
<_justin>
xor_mind: yup, that is the complexity factor i mentioned on.
garbagecollectio has quit [Quit: garbagecollectio]
t-mart has quit [Read error: Connection reset by peer]
<Boohbah>
is there something like vagrant for qemu?
<xor_mind->
_justin: ok I get what you mean by complexity, are you saying php can do somethings ruby does but easier?
<_justin>
xor_mind: i used to, still programs in php(not coz i love to, but has to) and i dont want my php code to look like the way it did. The folks are improving, so am trying to keep up with them as well.
<_justin>
_justin: ruby can do everything php does, but easier
uxp has quit [Read error: Connection reset by peer]
Tarellel has quit [Quit: Tarellel]
uxp has joined #ruby
<_justin>
xor_mind: : ruby can do everything php does, but easier (lol..i self mentioned early)
dhruvasagar has joined #ruby
<xor_mind->
heh, it's like a mantra, "ruby can do everything php can but it does it easier"
<aedornm>
Boohbah: There is not. For awhile there was work to make it (Vagrant) be able to use Qemu and Xen, but no idea what happened to that idea.
pkrnj has joined #ruby
<_justin>
xor_mind: but for people like me (Still in college) can't afford servers that support ruby/ cloud services
<_justin>
we go for old php, coz hosting is cheap
<xor_mind->
_justin: I hear you, I wouldn't even consider ruby if I didn't have a host (i'm a poor college boy too), but luckily name.com has great support for ruby
m_3 has quit [Ping timeout: 252 seconds]
m_3 has joined #ruby
<_justin>
30 $ a month is still expensive in India ;)
<_justin>
i guess, you pointed on VPS when you said good support on ruby..
main has joined #ruby
Morkel has joined #ruby
<xor_mind->
_justin: I don't remember, but the server is confiugred for RoR, gems and php
bradleyprice has quit [Remote host closed the connection]
techhelp has quit [Quit: This computer has gone to sleep]
<_justin>
xor_mind: heroku offers you free hosting, but it is all slow and crashy!!
<xor_mind->
_justin: well I can't have slow and crashy! I dunt like that :(
<_justin>
i had a webapp on it, 2+ people, i had to start the service again
<xor_mind->
_justin: wow that sux!
<_justin>
xor_mind: if you are a college guy, doing this for hobby, lives in a place with fast internet, host the service on your own!! get a static ip
<_justin>
you will get to learn a lot of stuff
<_justin>
maybe get a rasp pi as your server ;)
<xor_mind->
_justin: easy does it! good advice though, ty :) my goal tonight is simple: get a hello world based on RoR out there
<_justin>
xor_mind: engine yard is a good option.. good luck.. :)
<xor_mind->
_justin: thanks! you to
<xor_mind->
o
io_syl has quit [Ping timeout: 256 seconds]
spaceships has quit [Ping timeout: 276 seconds]
arietis has joined #ruby
elkclone has joined #ruby
sandGorgon has joined #ruby
dhruvasagar has quit [Ping timeout: 255 seconds]
adeponte has quit [Remote host closed the connection]
bradhe has joined #ruby
ahokaomaeha has quit [Ping timeout: 264 seconds]
<Hanmac>
oh ... when you goto rails we dont like you anymore :(
bradhe has quit [Ping timeout: 276 seconds]
<vabenjamin>
I want to program for fun but Im too tired...
<vabenjamin>
:(
<vabenjamin>
this is the first day I havent updated my project
<vabenjamin>
since I started it.
browndawg has quit [Ping timeout: 244 seconds]
jarred has joined #ruby
<jarred>
Has anyone here managed to deploy Discourse?
dotnull has quit [Remote host closed the connection]
niklasb has joined #ruby
hbpoison_ has quit [Ping timeout: 252 seconds]
pandawarrior1 has joined #ruby
zzing has quit [Quit: Computer has gone to sleep.]
alx- has joined #ruby
hbpoison has joined #ruby
toekutr has joined #ruby
mduvall has quit []
neurotech has joined #ruby
senayar has joined #ruby
Myconix has quit [Ping timeout: 248 seconds]
pepps has joined #ruby
bradhe has joined #ruby
pkrnj has quit [Quit: Computer has gone to sleep.]
fixl has joined #ruby
pkrnj has joined #ruby
pandawarrior1 has quit [Quit: Leaving.]
hogeo has joined #ruby
browndawg has joined #ruby
Niamkik has quit [Quit: Disconnecting from stoned server.]
_justin has quit [Read error: Connection reset by peer]
Niamkik has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
eldariof has joined #ruby
chrishough has quit [Quit: chrishough]
blacktulip has joined #ruby
chrishough has joined #ruby
apeiros_ has joined #ruby
himsin has quit [Ping timeout: 264 seconds]
d3vic3 has joined #ruby
freeayu__ has quit [Remote host closed the connection]
Morkel has quit [Quit: Morkel]
lkba has quit [Ping timeout: 264 seconds]
fixl has quit [Remote host closed the connection]
toekutr has quit [Read error: Connection reset by peer]
cha1tanya has quit [Ping timeout: 248 seconds]
testingb0t has joined #ruby
fixl has joined #ruby
francisfish has joined #ruby
lewis has quit [Remote host closed the connection]
JohnBat26 has joined #ruby
monkegjinni has joined #ruby
Nisstyre-laptop has quit [Quit: Leaving]
stkowski has quit [Quit: stkowski]
hogeo has quit [Remote host closed the connection]
francisfish has quit [Remote host closed the connection]
Loaft has joined #ruby
niklasb has quit [Ping timeout: 252 seconds]
jwang has quit [Ping timeout: 252 seconds]
beaky has joined #ruby
<beaky>
hello
<beaky>
hello
<beaky>
what is duck-typing?
robbyoconnor has joined #ruby
hbpoison has quit [Ping timeout: 264 seconds]
tomzx_mac has quit [Ping timeout: 255 seconds]
gosshedd has joined #ruby
m3pow has quit [Read error: Connection reset by peer]
Morkel has joined #ruby
Kevin has joined #ruby
kevinfagan has quit [Read error: Connection reset by peer]
Kevin is now known as Guest35606
hbpoison has joined #ruby
lkba has joined #ruby
chrishough has quit [Quit: chrishough]
Slivka has joined #ruby
ddd has joined #ruby
<vabenjamin>
beaky
JonnieCache_ has joined #ruby
ddd is now known as Guest69401
<vabenjamin>
thats when you describe your coding problems to a rubber duck or another object in order to find out how to fix ur bug
Guest35606 has quit [Ping timeout: 248 seconds]
ddd_ has quit [Ping timeout: 245 seconds]
justme1 has joined #ruby
<beaky>
hah
<beaky>
isn't that rubber-duck debugging?
<beaky>
while duck-typing is basically parametric polymorphism
<apeiros_>
beaky: it means that you don't care about the class of a thing, but about its behavior
<beaky>
ah
<apeiros_>
"if it walks like a duck, quacks like a duck etc., you may as well treat it like a duck"
<justme1>
when inside class method class << self means the reciver's eigenclass, and when I use it inside a class but not in a method it's the class's eigenclass?
<JonnieCache_>
see also "duck punching"
zzing has joined #ruby
<beaky>
I am a Hash, but you can use me as an Array! quak quack quacK!
<beaky>
... or is it the other way around (arrays are hashes that map ints to things)
<xor_mind->
The object is whatever it's data is? Like if it contians a string, you can treat it like a string?
<beaky>
ah
<JonnieCache_>
its more "im not even going to tell you what i am but rest assured I can do [] and []= so dont worry"
cableray has quit [Ping timeout: 260 seconds]
rburton- has joined #ruby
CraHan|out is now known as CraHan
zzing has quit [Ping timeout: 256 seconds]
xor_mind- has quit [Quit: Leaving]
marr has joined #ruby
jonahR has quit [Quit: jonahR]
pepps has quit [Ping timeout: 252 seconds]
echosystm has joined #ruby
yshh has quit [Remote host closed the connection]
<echosystm>
now that ruby has fibers, should people still be using eventmachine? how do fibers and EM fit together in an app?
pyrac has joined #ruby
<heftig>
if you want to take fibers to the next level, look at celluloid, i guess
HecAtic has joined #ruby
neurotech has quit [Remote host closed the connection]
<echosystm>
say one library uses EM and another uses fibers
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
<echosystm>
is eventmachine the only event loop in ruby?
<echosystm>
or is there a fragmentation issue, as in perl
<JonnieCache_>
not really
<echosystm>
ok cool
<JonnieCache_>
there are various other concurrency frameworks but theyre all pretty significantly different
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
<echosystm>
is ruby 1.9.3 ever truly concurrent?
<echosystm>
i thought even with Thread that only one will ever run at a time
<JonnieCache_>
the default interpreter has a GIL, yes
<JonnieCache_>
but other implementations like rubinius and jruby dont
<echosystm>
ok
crackfu has joined #ruby
<JonnieCache_>
jruby as you might guess runs on the jvm
<JonnieCache_>
rubinius is like pypy
<echosystm>
so with 1.9.3, if you need some CPU intensive code to run in parallel then your only choice is multiprocessing?
<echosystm>
i mean with the default interpreter
<JonnieCache_>
well the class of problems that never ever block on I/O and are therefore unsuitable for things like eventing or fibers is actually realatively small
<JonnieCache_>
but yeah pretty much
pandawarrior1 has joined #ruby
Morkel has quit [Quit: Morkel]
<JonnieCache_>
but if you want to write eye-wateringly fast code you probably shouldnt be writing ruby at all
bradhe has quit [Ping timeout: 260 seconds]
hiall has quit [Quit: hiall]
justme1 has left #ruby [#ruby]
pkrnj has quit [Quit: Computer has gone to sleep.]
Neomex has joined #ruby
Neomex has quit [Client Quit]
Jackneill has joined #ruby
<echosystm>
does anyone know of an easy way to package up ruby applications for windows?
generalissimo has quit [Remote host closed the connection]
pkrnj has joined #ruby
justme1 has joined #ruby
anderse has joined #ruby
crackfu has quit [Remote host closed the connection]
eka has joined #ruby
pepps has joined #ruby
werdnativ has quit [Quit: werdnativ]
adambeynon has joined #ruby
Nightmeister has joined #ruby
jocellyn has joined #ruby
justme1 has quit [Quit: Leaving.]
werdnativ has joined #ruby
Bry8Star has quit [Ping timeout: 276 seconds]
francisfish has joined #ruby
Elhu has joined #ruby
francisfish has quit [Remote host closed the connection]
francisfish has joined #ruby
niklasb has joined #ruby
kiligarikond has joined #ruby
nightwalk63 has quit [Ping timeout: 255 seconds]
meta-eng has joined #ruby
carlzulauf has joined #ruby
wallerdev has quit [Quit: wallerdev]
cha1tanya has joined #ruby
crackfu has joined #ruby
crackfu has quit [Remote host closed the connection]
crackfu has joined #ruby
mattb has quit [Ping timeout: 272 seconds]
answer_42 has joined #ruby
Bry8Star has joined #ruby
crackfu has quit [Remote host closed the connection]
francisfish has quit [Remote host closed the connection]
vabenjamin has left #ruby [#ruby]
arietis has quit [Ping timeout: 252 seconds]
Slivka has quit [Ping timeout: 248 seconds]
<beaky>
hello
spider-mario has joined #ruby
mattb has joined #ruby
pandawarrior1 has quit [Quit: Leaving.]
spider-mario has quit [Remote host closed the connection]
spider-mario has joined #ruby
JonnieCache_ has quit [Ping timeout: 252 seconds]
pepps has quit [Ping timeout: 264 seconds]
jadeship84 has joined #ruby
mercwithamouth has quit [Ping timeout: 260 seconds]
arietis has joined #ruby
monkegji_ has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
hbpoison has quit [Ping timeout: 256 seconds]
banister_ has joined #ruby
banister`sleep has quit [Read error: Connection reset by peer]
JonnieCache_ has joined #ruby
ikst has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
lkba has quit [Ping timeout: 252 seconds]
banister_ has quit [Read error: Connection reset by peer]
banister`sleep has joined #ruby
Al__ has joined #ruby
yshh has joined #ruby
hamed_r has joined #ruby
<beaky>
hello
beaky has quit [Quit: leaving]
Elhu has joined #ruby
Al__ has quit [Quit: Al__]
Mon_Ouie has quit [Ping timeout: 264 seconds]
bradhe has joined #ruby
decoponi_ has joined #ruby
Al__ has joined #ruby
zzing has joined #ruby
decoponi_ is now known as decoponio_
Al__ has quit [Client Quit]
decoponio has quit [Disconnected by services]
elkclone has quit [Quit: It's never too late to unplug and run.]
decoponio_ is now known as decoponio
banister`sleep has quit [Remote host closed the connection]
guiguidoc has quit [Ping timeout: 248 seconds]
bradhe has quit [Ping timeout: 252 seconds]
joshman_ has joined #ruby
Qwak has joined #ruby
guiguidoc has joined #ruby
maxmanders has joined #ruby
ferdev|away is now known as ferdev
zzing has quit [Ping timeout: 256 seconds]
m3pow has joined #ruby
jarred1 has joined #ruby
jarred1 has quit [Client Quit]
jarred has quit [Ping timeout: 252 seconds]
d3vic3 has quit [Quit: leaving]
pandawarrior1 has joined #ruby
xor_mind- has joined #ruby
workmad3 has joined #ruby
Mon_Ouie has joined #ruby
xardas has joined #ruby
agarie has quit [Remote host closed the connection]
pyrac has quit [Quit: pyrac]
Elhu has quit [Quit: Computer has gone to sleep.]
Al__ has joined #ruby
pepps has joined #ruby
pyrac has joined #ruby
<echosystm>
does anyone know of a ruby library that helps with multi-processing?
Jackneill has quit [Remote host closed the connection]
<echosystm>
some type of RPC abstraction or similar
<shevy>
lol the comment: "Obama should pass law to make PHP illegal to use in servers"
<cek>
lol
cantonic has quit [Ping timeout: 252 seconds]
cantonic_ is now known as cantonic
robustus has joined #ruby
melkor has joined #ruby
<melkor>
in ruby 1.9.3 what is the proper for(i=0;i<myArray.length;i++) ?
wargasm has quit [Ping timeout: 244 seconds]
Al__ has joined #ruby
pencilcheck has quit [Read error: Connection reset by peer]
<apeiros_>
melkor: array.each do |element|
<apeiros_>
if you need the index too: array.each_with_index do |element, index|
pen has joined #ruby
carloslopes has joined #ruby
sandGorgon has quit [Ping timeout: 276 seconds]
<melkor>
apeiros_: thanks I just found the eachwithindex
adkron has quit [Ping timeout: 244 seconds]
cek has quit [Ping timeout: 276 seconds]
<apeiros_>
shevy: ah, haha, completely forgot about /e in preg_replace - that's so silly
cantonic_ has joined #ruby
pen has quit [Remote host closed the connection]
garbagecollectio has joined #ruby
hbpoison has joined #ruby
timonv has quit [Read error: Connection reset by peer]
cantonic has quit [Ping timeout: 244 seconds]
cantonic_ is now known as cantonic
timonv has joined #ruby
tenmilestereo has joined #ruby
fixl has quit [Remote host closed the connection]
Al__ has quit [Quit: Al__]
cantonic_ has joined #ruby
razibog has joined #ruby
razibog1 has joined #ruby
razibog1 has quit [Client Quit]
BrindleFly_ has joined #ruby
hbpoison has quit [Ping timeout: 256 seconds]
cantonic has quit [Ping timeout: 256 seconds]
cantonic_ is now known as cantonic
Al__ has joined #ruby
BrindleFly has quit [Read error: Operation timed out]
BrindleFly_ is now known as BrindleFly
slainer68 has joined #ruby
kirun has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
Choclo has quit [Quit: Leaving.]
statarb3 has joined #ruby
<dmonjo>
what is usually best Proc.new or yield
<shevy>
dmonjo they are not the same
cantonic_ has joined #ruby
<apeiros_>
dmonjo: depends
<shevy>
dmonjo from where do you have the info
<apeiros_>
yield is lightweight
<dmonjo>
well i can either use yield to call a block or Proc.new and .call to call that block too
iamjarvo has quit [Quit: Leaving.]
<dmonjo>
what is better practice
<apeiros_>
shevy: Proc.new.call does the same as yield
<shevy>
hmm
<apeiros_>
that is explicitly Proc.new without a block.
<shevy>
ewwwww
<shevy>
I could replace all yield with Proc.new.call ?
<shevy>
that sounds disgusting :)
gregor3005 has joined #ruby
* shevy
hugs his yield
cantonic has quit [Ping timeout: 252 seconds]
cantonic_ is now known as cantonic
<gregor3005>
hi, is there an platform independend way to check if the ruby application is still running?
<apeiros_>
shevy: it is. it's also most likely slower.
skattyadz has joined #ruby
<apeiros_>
gregor3005: if the ruby application is no longer running, you can't run code to check whether it is still running, can you?
<shevy>
cool, need to note that down
<dmonjo>
apeiros_: i think weith proc you can pass the block from methds to methods, mean you can call that block from any methof
<apeiros_>
or do you mean from outside the app? and if so, do you mean with code or system tools?
<dmonjo>
with yield you can only call the corresponding block where yield is called
<apeiros_>
dmonjo: yes, for passing on, the object is faster. but you shouldn't use Proc.new for that. you should use the &block param.
<apeiros_>
e.g. def each(&block); @data.each(&block); end
wmoxam has joined #ruby
<shevy>
the error one gets is different though
<shevy>
Proc.new.call # ArgumentError: tried to create Proc object without a block
<shevy>
yield # LocalJumpError: no block given
<gregor3005>
apeiros_: lol thats also an way to interpret my question. i meant i will only start my ruby application once also when i start it twice. the second startup should recognize if it is still running and then quit
<apeiros_>
shevy: of course
<dmonjo>
apeiros_: any special advanteages of &blocck over proc.enw ?
<dmonjo>
new*
<apeiros_>
shevy: you have to use it somewhere where there is actually a block available
yshh has joined #ruby
francisfish has joined #ruby
<apeiros_>
dmonjo: def each; @data.each(&Proc.new); end is equivalent, but more expensive
<dmonjo>
i see
<dmonjo>
more object attributes maybe
<apeiros_>
dmonjo: clarity and performance
GeRMaN0000 has joined #ruby
<dmonjo>
i think the main difference is as you said in the iteration
<dmonjo>
everytime a proc.new is called a new object is created
<kalleth>
beaky: some might say 'to shoehorn every aspect of a system into an object relating tenuously to some kind of collective function but really resulting in a spaghetti-like mess'
bluOxigen has joined #ruby
<kalleth>
of course, the same might be said for functional programming
Al__ has quit [Quit: Al__]
zzing has quit [Ping timeout: 260 seconds]
cantonic has joined #ruby
monkegji_ has quit [Remote host closed the connection]
Al__ has joined #ruby
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
cantonic_ has quit [Ping timeout: 252 seconds]
kirun has joined #ruby
browndawg has joined #ruby
forced_request has joined #ruby
Al__ has quit [Client Quit]
kofno has quit [Remote host closed the connection]
alessia has joined #ruby
<alessia>
!list
fschuindt has joined #ruby
banister`sleep has joined #ruby
ananthakumaran has quit [Ping timeout: 252 seconds]
cantonic has quit [Ping timeout: 252 seconds]
alessia has quit []
banister_ has quit [Ping timeout: 252 seconds]
alessia has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Remote host closed the connection]
Spooner has joined #ruby
twshelton has quit [Quit: Computer has gone to sleep.]
alessia has left #ruby [#ruby]
melkor has left #ruby [#ruby]
ananthakumaran has joined #ruby
fschuindt has quit [Ping timeout: 252 seconds]
rippa has quit [Ping timeout: 240 seconds]
beaky has quit [Ping timeout: 264 seconds]
beaky has joined #ruby
<beaky>
hello
ahokaomaeha has joined #ruby
banister`sleep has quit [Remote host closed the connection]
ananthakumaran1 has joined #ruby
ananthakumaran1 has quit [Client Quit]
ananthakumaran1 has joined #ruby
ananthakumaran has quit [Ping timeout: 252 seconds]
ananthakumaran1 has quit [Client Quit]
ananthakumaran has joined #ruby
bubblehead has joined #ruby
horofox_ has joined #ruby
mengu has joined #ruby
garbagecollectio has quit [Quit: garbagecollectio]
hamed_r has quit [Quit: Leaving]
whitedawg has joined #ruby
dblack_ has joined #ruby
dblack_ has quit [Client Quit]
akashj87 has joined #ruby
velCzupa has quit [Read error: Connection reset by peer]
kofno has joined #ruby
pdamer has quit [Quit: pdamer]
Yakko has quit [Ping timeout: 264 seconds]
twshelton has joined #ruby
whitedawg has quit [Quit: Leaving.]
emmanuelux has joined #ruby
kofno has quit [Remote host closed the connection]
<beaky>
what is dependency injection?
pencilcheck has joined #ruby
pen has quit [Read error: No route to host]
pakchoi2 has joined #ruby
<`p>
does anyone know what that site is where it gives you a problem and you must solve it in code and on the front page it has all these different languages you can choose from
carloslopes has quit [Remote host closed the connection]
zzing has quit [Ping timeout: 256 seconds]
pencilcheck has quit [Remote host closed the connection]
<`p>
no not codeacademy
<gregor3005>
hm, the source look ok, it cannot find the following line: require 'sudo/wrapper'
<adkron>
gregor3005: is startClient your code?
<gregor3005>
`p: what?
<gregor3005>
yes
<adkron>
It looks like your require_relative is wrong according to the error.
mengu has quit [Ping timeout: 248 seconds]
<apeiros_>
gregor3005: you have to install libraries
mengu_ has joined #ruby
<apeiros_>
if you don't want to install them, you have to add their 'lib' directory to $LOAD_PATH
<apeiros_>
otherwise files in that lib won't find other files in that lib
<gregor3005>
apeiros_: for that lib i found no gem, normally i used gem's
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
<apeiros_>
gregor3005: it has a gemspec
<gregor3005>
ah load_path
[[johnonymous]] has joined #ruby
nari has joined #ruby
garbagecollectio has quit [Quit: garbagecollectio]
<apeiros_>
not load_path, $LOAD_PATH
<apeiros_>
case and sigil matter
workmad3 has quit [Ping timeout: 264 seconds]
<apeiros_>
just `gem build *.gemspec && gem install -l *.gem`
angusiguess has joined #ruby
<gregor3005>
apeiros_: thx gem installation worked
adkron has quit [Ping timeout: 252 seconds]
hanno has joined #ruby
banister`sleep is now known as banisterfiend
pdamer has joined #ruby
adkron has joined #ruby
justme1 has joined #ruby
pdamer has quit [Client Quit]
jrajav has joined #ruby
znode has joined #ruby
adkron has quit [Client Quit]
adkron has joined #ruby
<shevy>
I need to write a ruby script that codes for me
emmanuelux has quit [Ping timeout: 248 seconds]
znode has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 245 seconds]
[[johnonymous]] has quit [Quit: Computer has gone to sleep.]
akashj87 has joined #ruby
razibog has quit [Ping timeout: 248 seconds]
subbyyy_ has joined #ruby
subbyyy has quit [Read error: Connection reset by peer]
SCommette has joined #ruby
baroquebobcat has joined #ruby
elaptics is now known as elaptics`away
nari has quit [Ping timeout: 245 seconds]
jadeship84 has quit [Remote host closed the connection]
counter-riposte2 has joined #ruby
baroquebobcat has quit [Client Quit]
adkron has quit [Ping timeout: 276 seconds]
zoonfafer has quit [Ping timeout: 248 seconds]
iamjarvo has quit [Quit: Leaving.]
bluOxigen has joined #ruby
pavilionXP has quit [Read error: Connection reset by peer]
adkron has joined #ruby
fschuindt has quit [Ping timeout: 248 seconds]
emmanuelux has joined #ruby
horofox_ has quit [Quit: horofox_]
oneawayman has quit [Read error: Connection reset by peer]
oneawayman has joined #ruby
horofox has joined #ruby
banisterfiend has quit [Remote host closed the connection]
philcrissman has joined #ruby
kevinfagan has joined #ruby
kevinfagan has quit [Remote host closed the connection]
garbagecollectio has joined #ruby
kevinfagan has joined #ruby
Banistergalaxy has quit [Ping timeout: 248 seconds]
Banistergalaxy has joined #ruby
octoberry has joined #ruby
banisterfiend has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
horofox has quit [Quit: horofox]
x0F_ is now known as x0F
hanno has quit [Quit: Verlassend]
trevortwining has joined #ruby
MartinCleaver has quit [Quit: MartinCleaver]
<gregor3005>
does anybody know a way to manipute files in ruby with the sudo command? i found rubysu, but it is broken, the testfile didn run: https://github.com/gderosa/rubysu
znode has joined #ruby
nobuoka has quit [Quit: Leaving...]
Guest35890 has joined #ruby
MartinCleaver has joined #ruby
MartinCleaver has quit [Changing host]
MartinCleaver has joined #ruby
Guest35890 has quit [Read error: Connection reset by peer]
meoblast has joined #ruby
MartinCleaver has quit [Client Quit]
jkarayusuf has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
jkarayusuf has left #ruby [#ruby]
skattyadz has quit [Quit: skattyadz]
workmad3 has joined #ruby
subbyyy_ has quit [Ping timeout: 252 seconds]
skattyadz has joined #ruby
joofsh has joined #ruby
znode has quit [Ping timeout: 260 seconds]
Elhu has joined #ruby
zwevans has joined #ruby
zzing has joined #ruby
subbyyy_ has joined #ruby
AtoxIO has joined #ruby
adkron has quit [Ping timeout: 246 seconds]
crackfu has joined #ruby
wallerdev has joined #ruby
sandGorgon has quit [Ping timeout: 248 seconds]
iamjarvo has joined #ruby
skattyadz has quit [Quit: skattyadz]
smoth has joined #ruby
justme1 has left #ruby [#ruby]
<smoth>
aa
zzing has quit [Ping timeout: 276 seconds]
<smoth>
how can I map an array taking values 2 by 2? ie: [1,2,3].map_2_by_2{|x,y| [x,y]} => [[1,2],[2,3]]
sepp2k has joined #ruby
<smoth>
shall I write my own function or there is a cool way?
<apeiros_>
smoth: .each_slice(2)
mengu__ has joined #ruby
mengu_ has quit [Ping timeout: 246 seconds]
wmoxam has joined #ruby
anderse has quit [Quit: anderse]
ananthakumaran1 has joined #ruby
codezombie has joined #ruby
<smoth>
apeiros_, ty, the function I'll use is .each_cons(2) :D
<apeiros_>
d'oh, sorry. that's the one I meant.
mengu has joined #ruby
carloslopes has joined #ruby
ananthakumaran has quit [Ping timeout: 255 seconds]
mengu__ has quit [Ping timeout: 260 seconds]
tomzx_mac has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
WhereIsMySpoon has quit [Ping timeout: 252 seconds]
joeycarmello has joined #ruby
carloslopes has quit [Ping timeout: 260 seconds]
emmanuelux has quit [Ping timeout: 256 seconds]
hbpoison has quit [Ping timeout: 255 seconds]
stopbit has quit [Remote host closed the connection]
BrindleFly has joined #ruby
testingb0t has joined #ruby
gosshedd has quit [Ping timeout: 248 seconds]
eldariof has quit [Ping timeout: 264 seconds]
r0f0 has joined #ruby
<r0f0>
join #php
<banisterfiend>
lol php
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
<r0f0>
ah sorry
<r0f0>
was in a bit of hurry
<r0f0>
forgot to put / :P
<Hanmac>
now we all point the finger and laugh about you
* r0f0
hides in the corner
skattyadz has joined #ruby
schaerli has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
techhelp has joined #ruby
<Hanmac>
its not because you forgot the / ... its because you are using php :P
<r0f0>
I don't hate any language.I am not a fanboy aswell.I like to play with every language.
<r0f0>
like some lads like to play with drugs/sex.
Elhu has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby
MartinCleaver has joined #ruby
MartinCleaver has joined #ruby
MartinCleaver has quit [Changing host]
melkor has joined #ruby
bnagy has quit [Ping timeout: 276 seconds]
girija has quit [Ping timeout: 252 seconds]
Kevin has joined #ruby
<melkor>
I'm looking at the openstruct api, and the method send isn't documented. Where do I find other undocumented methods?
Kevin is now known as Guest56426
hbpoison has joined #ruby
joeycarmello has quit [Remote host closed the connection]
arya has joined #ruby
pskosinski has quit [Read error: Connection reset by peer]
kevinfagan has quit [Ping timeout: 252 seconds]
WhereIsMySpoon has joined #ruby
<apeiros_>
melkor: check superclasses
emmanuelux has joined #ruby
<apeiros_>
melkor: send is Object#send
rippa has joined #ruby
pskosinski has joined #ruby
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
vlad_starkov has quit [Remote host closed the connection]
main has quit [Remote host closed the connection]
main has joined #ruby
Elhu has joined #ruby
mengu_ has joined #ruby
subbyyy_ has quit [Ping timeout: 245 seconds]
<melkor>
Is there a good way to see if an open struct has a field where the name of the field is in a string?
mengu has quit [Ping timeout: 260 seconds]
razibog has joined #ruby
Elhu has quit [Client Quit]
joofsh has quit [Remote host closed the connection]
<apeiros_>
struct.respond_to? field
garbagecollectio has quit [Quit: garbagecollectio]
kodeart has joined #ruby
subbyyy_ has joined #ruby
jocellyn has quit [Quit: Leaving.]
<melkor>
apeiros_: so then how would i get the value out of that field?
<apeiros_>
by the very method you asked for before
AtoxIO has quit [Remote host closed the connection]
<apeiros_>
struct.send field
<apeiros_>
but maybe you're better off with a Hash
<apeiros_>
hash[field] = value; hash[field] # => value
schaerli has joined #ruby
F1skr has joined #ruby
bnagy has joined #ruby
<melkor>
apeiros_: you're probaly correct. I'm serializing the struct into a table though.
dhruvasagar has quit [Ping timeout: 246 seconds]
wmoxam has quit [Ping timeout: 260 seconds]
MartinCleaver has quit [Quit: MartinCleaver]
hbpoison has quit [Ping timeout: 264 seconds]
moeSizlak has joined #ruby
eldariof has joined #ruby
philcrissman has quit [Remote host closed the connection]
skcin7 has joined #ruby
jrajav has joined #ruby
BrindleFly has quit [Read error: Connection reset by peer]
Mattix has quit [Read error: Connection reset by peer]
Mattix has joined #ruby
tcurdt has quit [Client Quit]
maxmanders has quit [Ping timeout: 255 seconds]
MartinCleaver has joined #ruby
MartinCleaver has quit [Changing host]
MartinCleaver has joined #ruby
Elhu has joined #ruby
Elhu has quit [Client Quit]
maxmanders has joined #ruby
hiall has quit [Ping timeout: 276 seconds]
znode has quit [Ping timeout: 252 seconds]
skcin7 has quit [Quit: Computer has gone to sleep.]
huttan has quit [Read error: Connection reset by peer]
testingb0t has quit [Quit: Leaving.]
iamjarvo has quit [Quit: Leaving.]
Ethan has quit [Quit: "The destruction of balance constitutes leaping forward and such destruction is better than balance. Imbalance and headache are good things." - Mao]
elux has joined #ruby
melkor has quit [Quit: thanks]
browndawg has quit [Ping timeout: 248 seconds]
Ethan has joined #ruby
garbagecollectio has joined #ruby
twshelton has joined #ruby
quazimodo has joined #ruby
skcin7 has joined #ruby
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
pavilionXP has joined #ruby
browndawg has joined #ruby
techhelp has quit [Quit: This computer has gone to sleep]
breakingthings has joined #ruby
hbpoison has joined #ruby
emmanuelux has quit [Remote host closed the connection]
zmike has quit [Quit: Выходжу]
garbagecollectio has quit [Quit: garbagecollectio]
zmike has joined #ruby
zmike has quit [Read error: Connection reset by peer]
schaerli has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
Mon_Ouie has quit [Ping timeout: 260 seconds]
emmanuelux has joined #ruby
arya has quit []
elux has quit [Read error: No route to host]
elux has joined #ruby
mengu_ has quit [Ping timeout: 260 seconds]
dangerousdave has joined #ruby
Elhu has joined #ruby
octoberry has quit [Ping timeout: 252 seconds]
jocellyn has joined #ruby
io_syl has joined #ruby
Mon_Ouie has joined #ruby
pats_Toms has joined #ruby
<pats_Toms>
hi, command "ruby -v" outputs "ruby 1.9.2p0" but when I try to install gem ruby-skype it shows me that "ruby-skype requires Ruby version ~> 1.9.0."
<pats_Toms>
any ideas?
AndChat| has joined #ruby
lkba has quit [Read error: Connection reset by peer]
<breakingthings>
pats_Toms: `~>` is a pessimistic version constraint
<breakingthings>
ruby-skype expects a 1.9.0 build. Not 1.8.9, not 1.9.1.
<pats_Toms>
hi, breakingthings
<pats_Toms>
so I need 1.9.0?
<breakingthings>
According to ruby-skype, yes.
arya has joined #ruby
roadt has quit [Ping timeout: 276 seconds]
twshelton has quit [Quit: Computer has gone to sleep.]
workmad3 has joined #ruby
s1n4 has joined #ruby
drago757 has joined #ruby
jimeh has quit [Quit: Computer has gone to sleep.]
<zastern>
dblack_: Ah I apologize, it wasn't my intent to discriminate against your disability.
<dblack_>
:-)
<zastern>
:D
vabenjamin has quit [Read error: Connection reset by peer]
Al__ has quit [Client Quit]
<dblack_>
ah, zed shaw
<dblack_>
i thought it rang a bell
Stilo has joined #ruby
<IceDragon>
zastern... well "Learn Code The Hard Way"
<zastern>
IceDragon: hah, indeed.
garbagecollectio has joined #ruby
<IceDragon>
well good luck, I more syntax erros than lines of code when I first started out
<IceDragon>
*had
<zastern>
IceDragon: yeah, same. Right now I'm trying to figure out how to use being, rescue, end properly.
<dblack_>
zastern: great typo there :-)
<zastern>
hahaha
<IceDragon>
begin ; insert_youe_code_here ; rescue ; something_went_wrong_try_something_else ; end
<zastern>
IceDragon: right but don't I need to like
<zastern>
specify what exceptions to handle
<zastern>
in rescue
<IceDragon>
:O It will rescue StandardErrors by default
<havenwood>
def startdate; "#{Time.now.year}.#{Time.now.yday}".to_f; end
<IceDragon>
ruby is quite forgiving
<dblack_>
zastern: in general, as few as possible
<dblack_>
zastern: let the ones that aren't relevant to what you're doing bubble up
BrindleFly has joined #ruby
kevinfagan has quit [Quit: Leaving...]
<zastern>
alright, i'll try it out.
<zastern>
One thing I do love about ruby is that people are so willing to help.
pyrac has quit [Quit: pyrac]
<zastern>
The niceness quotient in #ruby is a lot higher than uh, #anythingelse.
BrindleFly has quit [Client Quit]
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
<IceDragon>
:P its easier to help with something that is well... easy?
Es0teric has joined #ruby
<zastern>
haha. Is it possible to have rescue do something and then retry the code between begin and rescue? I know I could probably do that with a def, but is it built in somehow?
tealmage has joined #ruby
<IceDragon>
:O Its possible I think...
<IceDragon>
I've never really used 'retry' much
trevortwining has joined #ruby
Nisstyre-laptop has joined #ruby
<zastern>
I don't know if my use here is valid, but we're about to find out.
<dblack_>
zastern: i would rescue Errno::ENOENT in that situation. if something else went wrong, you don't want to give a misleading error message
<zastern>
dblack_: it's already handling anything that isn't a real file perfectly.
<zastern>
dblack_: why do that specificially?
<zastern>
(imagine that question with better spelling)
znode has joined #ruby
<dblack_>
zastern: something else might go wrong, like a permissions problem
<zastern>
dblack_: ah and then my message would be invalid.
<dblack_>
zastern: right
<zastern>
sure ok
<dblack_>
zastern: if i'm very nice to you, will you stop putting unnecessary () at the end of method calls? :-)
<IceDragon>
or STDIN might be closed
<zastern>
dblack_: haha I thought you alaways had to. Why stop?
budmang has joined #ruby
<dblack_>
zastern: you don't have to, and i would stop because it's unidiomatic and unnecessary
<zastern>
dblack_: hmm ok, the lrthw examples always do it
decoponio has quit [Quit: Sleeping... (at 4:27 am JST)]
<zastern>
i feel like at some point i didnt put () and it didnt work.
<dblack_>
zastern: i wonder whether that's a python thing
<zastern>
but maybe i'm misremembering
reactormonk has joined #ruby
<dblack_>
zastern: if you have a local variable x and a method x, then x will refer to the local variable and you have to do x() to call the method
techhelp has joined #ruby
<zastern>
dblack_: right so then isn't it safer to just always ()
budmang_ has quit [Ping timeout: 264 seconds]
<zastern>
just like when I write puppet I always ::foo::bar::blah for class names, I don't refer to them out of scope, even though it works
<dblack_>
zastern: no, because in the case of object.x you're sending the message x to object
<zastern>
dblack_: right but then i wouldnt put () . . .
<dblack_>
zastern: but you do, like txt.read()
elkclone has quit [Read error: Connection reset by peer]
<zastern>
dblack_: oh I see what you mean.
<dblack_>
zastern: it's up to you, but as you see more and more ruby code you'll find that it's very unusual in ruby to put () where it isn't needed
<zastern>
dblack_: but doesn't .read() have params that potentially go in ()
himsin has joined #ruby
etcetera has joined #ruby
<IceDragon>
you could use txt.read your_params
<dblack_>
zastern: if you have params then parens make sense
<IceDragon>
without parenthesis
<zastern>
IceDragon: Oh I didn't know that.
elkclone has joined #ruby
<dblack_>
yeah, that too, though in most cases i tend to use parens
kanja has left #ruby [#ruby]
<zastern>
Hmm ok. Well you have been very nice to me, so I'll probably consider what you're saying.
<dblack_>
:-)
kevinfagan has joined #ruby
<zastern>
I think I also prefer using the perens for params just because it's more readable that way (to me)
<zastern>
anyway back to the lesson.
<dblack_>
have fun
<IceDragon>
puts("Your Text")
<zastern>
IceDragon: Oh I didn't even know you could do that.
<dblack_>
IceDragon: that's why i said "most cases" :-)
<zastern>
hah.
<zastern>
I thought it was always/only puts 'foo'
<dblack_>
similarly, attr_accessor :x is typically written without parens
<zastern>
But I don't know things.
<dblack_>
whoops
<dblack_>
you know, attr_accessor :whatever
<dblack_>
colon x appears to be a face
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
<IceDragon>
Symbol :something
SCommette has joined #ruby
<zastern>
oh that raises another question I have. I noticed that `puts :foo` works. also.
<zastern>
What's the significance of the :
<dblack_>
zastern: :whatever is a symbol
<IceDragon>
puts invokes #to_s on the object
<zastern>
But it's just printing out foo. There's nothing special about foo
bluOxigen has joined #ruby
<zastern>
IceDragon: that I realize.
<dblack_>
zastern: :foo.to_s is "foo", so that's what gets printed
<canton7>
symbols are like strings, but comparison is cheaper
<zastern>
ok. So why would i want to :foo isntead of 'foo'
<zastern>
besides comparing them?
<canton7>
symbols are handy for things like hash keys, for that reason
<IceDragon>
speed :D
<dblack_>
symbols are basically a programmer view onto ruby's internal symbol table
znode has quit [Ping timeout: 252 seconds]
<dblack_>
there's a symbol in the table for every identifier
<IceDragon>
But the more symbols you have, the more mem it uses, since even Unused symbols would just sit there
<canton7>
but 1) they're never disposed (so don't create too many - basically don't create them automatically in large numbers), and creation is slightly more expensive that strings
<dblack_>
try Symbol.all_symbols in irb some time
<IceDragon>
around 1000+ on average
<apeiros_>
canton7: the rules are simpler: 1) don't create symbols from user input, 2) don't greate symbols from a possibly infinite sequence
toekutr has joined #ruby
blueOxigen has quit [Ping timeout: 256 seconds]
<zastern>
dblack_: that was a lot of stuff. Is Symbol a function of some kind on its own? Or like a built in var, or something?
<apeiros_>
1) can be difficult, since a couple of methods in ruby accept strings but will convert them into symbols. examples: Object#send, Module#const_get, Object#instance_variable_get
<dblack_>
zastern: it's a class
<IceDragon>
my rules: Only use a symbol when you plan to utilize it more than once, and its time crucial
<canton7>
apeiros_, that doesn't include things like parsed config files :P
<zastern>
dblack_: mm ok
codecop has quit [Remote host closed the connection]
<apeiros_>
canton7: depends, if the config files are part of the app, then no, it doesn't. and that's ok.
<dblack_>
apeiros_: i feel that there should be an Unnecessary Use of .to_sym Award :-)
<apeiros_>
if the config files are user input, then that's covered
<dblack_>
e.g., send(string.to_sym)
d3vic3_ has joined #ruby
<apeiros_>
dblack_: rails with HWIA wins that one easily
<dblack_>
heh
<zastern>
I'm actually a sysadmin, but not being able to program is seriously hampering my ability to do my job effectively.
codecop has joined #ruby
<apeiros_>
I wouldn't blame people who do send(string.to_sym) too much - the docs conveniently omit the part about it accepting a string
<zastern>
and since we're already running puppet, Ruby is installed on every node. So it'd be real nice to be able to use it.
carraroj has joined #ruby
<dblack_>
zastern: there are other resources for learning ruby
<apeiros_>
hm, we actually have somebody who actively patches docs
* apeiros_
goes molest him
<zastern>
dblack_: I'm doing pretty well with this so far actually.
shevy has quit [Ping timeout: 248 seconds]
angusiguess has quit [Ping timeout: 244 seconds]
Nightmeister has quit [Ping timeout: 252 seconds]
<dblack_>
zastern: ok -- when you said it hurt your head i wasn't sure :-)
<_br_>
Firstmate: Is this for a shell scripting class? Well, if you should do shell scripting then go ahead..
garbagecollectio has joined #ruby
<Firstmate>
It's for..an OS class, haha.
<apeiros_>
oh, =begin/=end comments - long time no see…
justme1 has joined #ruby
<Firstmate>
But this is just an interrim project on gathering system statistics.
<jblack>
banisterfiend: flog score of 3903, spread acrosts 86 files
<banisterfiend>
jblack: legacy app?
Choclo has joined #ruby
Choclo has quit [Read error: Connection reset by peer]
<jblack>
Nope. Just the nature of the app. it scans secretary of state websites to download entity data.
twshelton has quit [Quit: Computer has gone to sleep.]
<jblack>
each state is comprised of two classees, a search and an entity.
<banisterfiend>
jblack: isn't a high flog score very bad?
mahmoudimus has joined #ruby
<jblack>
my flog/method average is 10.1
<jblack>
flog total is cumulative. I think it's a simple addition of all methods.
<jblack>
it's 5274 lines of code, if that answers your question more simply
<banisterfiend>
jblack: what is the GPA on codeclimate.com ?
<jblack>
I don't know
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
<Firstmate>
yxhuvud: Someone over in #bash figured it out...it was my own ridiculous silliness...
<Firstmate>
13\37\03 <Riviera> Firstmate: well, see. the ; ends the first command, which is ssh
<Firstmate>
13\37\13 <Riviera> Firstmate: everything after the ; is executed locally.
<jblack>
I'd rather not make an account on that site just to get advice on which profilers you guys favor
xor_mind- has joined #ruby
skattyadz has quit [Quit: skattyadz]
mduvall has quit []
octoberry has quit [Ping timeout: 260 seconds]
AntiTyping has joined #ruby
<yxhuvud>
firstmate: makes sense. just remember that there are better options if you ever have to solve this problem for real. Like using a gem that can extract all that information for you, like ohai (which admittedly would require some sort of control of the target machines. There are probably options that doesn't need that even if I don't know them)
glennt has joined #ruby
mduvall has joined #ruby
<banisterfiend>
jblack: you dont have to make an account :) it's free for OSS, but if your software isn't OSS it'll cost (though u get a trial for about 2 weeks i think)
<banisterfiend>
free/accountless for OSS
<banisterfiend>
u just feed it the name of the project
<jblack>
No, it's not free software, unforuntately
<jblack>
can we take this back a step, banisterfiend? Something I"m using is leaking sockets. My hunch is I'm instantiating and not deleting Mechanize or Nokogiri objects. but maybe it's Logger, or something else. so I'm looking for a way to identify what all those sockets are when I lsof against my app
solancer has joined #ruby
markalanevans has quit [Ping timeout: 248 seconds]
<solancer>
hey guys
<jblack>
I know I"m leaking sockets because eventually I get exceptions about too many file handles in use, and when I use lsof, they're sockets.
<banisterfiend>
jblack: anyway to look at all objects, use ObjectSpace.each_object
<jblack>
bean: I wish! But I'm runing out of 1024 file handles after about an hours worth of requests. I won't make it much futher just by screwing with ulimits. =)
<banisterfiend>
jblack: you could also try forcing GC runs, which might free the sockets
<solancer>
can anyone of you guys compile it for me on your systems ?
jborica has joined #ruby
bubblehead has quit [Remote host closed the connection]
<solancer>
I've been trying this for hours
<bean>
solancer, sudo gem install
iamjarvo has joined #ruby
<solancer>
no the problem is with rawr
<banisterfiend>
jblack: are you creating a bunch of procs somewhere? maybe they're closing over locals that point to sockets and preventing them being GC'd
<solancer>
error before that
<jblack>
I was wondering if it was just stale garbage, but I'd rather assume the flaw is me
meoblast has quit [Read error: Connection reset by peer]
<jblack>
I am creating lots of procs.
<jblack>
I have callbacks and the whole nine.
<jblack>
Uh oh. =)
<jblack>
RuntimeError: can't add a new key into hash during iteration
<jblack>
I'm also using threads. =)
tealmage has quit [Remote host closed the connection]
<bean>
solancer, i still think you need to get the gems installed right if you havent
<banisterfiend>
hehe
<banisterfiend>
jblack: you can specify the class type you're interested in with: ObjectSpace.each_object(Klass)
<apeiros_>
jblack: I'd at least …
<apeiros_>
that
solancer has quit [Quit: Leaving]
* apeiros_
thinks he said that already
Qwak has joined #ruby
<shevy>
apeiros_ it is ALZHEIMER!!!
V8Energy has joined #ruby
<bean>
solancer do you have rawr installed?
FondoDeBikini has joined #ruby
ferdev|away is now known as ferdev
<bean>
oh, he quit, lol
nachtwandler has quit [Ping timeout: 255 seconds]
nachtwandler has joined #ruby
onward has joined #ruby
<onward>
Hello!
joofsh has quit [Remote host closed the connection]
<dblack_>
hi onward
<V8Energy>
I have an array of User objects, each one of them have a nickname variable. [#<User nick="TechnIckS">, #<User nick="V8Energy">, #<User nick="NG|MuchHigher">, #<User nick="Kombin3">, #<User nick="ChanServ">]. is there a quick way to display all nicknames in one line? "V8Energy, NG|MuchHigher, etc..?
<onward>
How's it going?
<apeiros_>
V8Energy: assuming there's a method .nick -> puts users.map(&:nick)
<dblack_>
V8Energy: users.map(&:nick).join('|')
hiall has quit [Quit: hiall]
<dblack_>
whoops
<dblack_>
i misread the |
justme1 has quit [Read error: Connection reset by peer]
<apeiros_>
:)
<dblack_>
anyway, something like that :-)
<dblack_>
… join(', ')
<V8Energy>
that gave me this: ["TechnIckS", "V8Energy", "NG|MuchHigher", "Kombin3", "ChanServ"]
<bean>
what ruby version are you on V8Energy
<bean>
1.8?
<apeiros_>
then you did only the .map part
justme1 has joined #ruby
<apeiros_>
you did neither puts nor join it
BrianJ has joined #ruby
<V8Energy>
oh yeah i didn't add the .join
<bean>
... lol
havenwood has joined #ruby
v0n has quit [Ping timeout: 252 seconds]
<apeiros_>
hm, lol
joofsh has joined #ruby
* apeiros_
wanted to test existence of a Symbol by "Symbol.all_symbols.include?(:foo)"
<MACscr>
if i do sudo -u graylog2-web -i;script/rails server -e production; to start an app with webtrick, how do i do it with thin? LOL, i dont know anything about ruby. Sorry.
shtirlic_ has joined #ruby
<arturaz>
rails server thin -e production
joshfng has quit [Quit: Leaving...]
<arturaz>
IIRC
<MACscr>
ah, thanks!
<apeiros_>
afaik if you add thin to your gemfile, rails will default to thin
angusiguess has joined #ruby
<MACscr>
i dont even know what gemfile is. Im just trying to use an app that was made with ruby
<canton7>
Any reason why my at_exit-registered block isn't called when my script's terminated by SIGINT?
justme1 has quit [Quit: Leaving.]
twshelton has joined #ruby
arya has quit [Ping timeout: 248 seconds]
colonolGron has joined #ruby
<canton7>
hmm, trap("INT) doesn't appear to do anything either
<apeiros_>
that's odd
<apeiros_>
maybe something invokes exit!
<apeiros_>
but… that'd have to be something that replaces your trap("INT")
spanner has quit [Remote host closed the connection]
<canton7>
hmm, only seems to be a problem when invoking the script from msysgit ("git bash"). windows cmd works as expected
<apeiros_>
but from there on, case/when lets you omit `somestring === ` for every additional when statement
<kseifried>
so if you know of any such tools please let me know, thanks!
jekotia has joined #ruby
<zastern>
apeiros_: ah I see. is that all the difference? I guess it doesn't seem huge to me. I guess it's easier if you're only dealing with one thing that changes.
s0ber has quit [Ping timeout: 252 seconds]
s0ber_ is now known as s0ber
wmoxam has quit [Ping timeout: 264 seconds]
<apeiros_>
zastern: that's mostly it
eka has quit [Quit: Computer has gone to sleep.]
<zastern>
apeiros_: ok, that makes sense to me then. thanks.
<zastern>
i'm used to the php type of case
<apeiros_>
also nice: `case x; when a,b,c` # --> `if a === x || b === x || c === x`
<canton7>
zastern, like a lot of things in ruby, it's about expressing intent. if you see a case statement in someone else's code, you know that the whole thing hinges on only one variable without having to go mentally parsing each line
<zastern>
actually php case might be the same and i didnt realize it
Umren has quit [Read error: Connection reset by peer]
<apeiros_>
zastern: also note that many classes implement a useful === method, to enable case/when
<zastern>
apeiros_: that doesn't mean anything to me :(
<apeiros_>
no, php switch is closer to C switch iirc
<canton7>
zastern, php case is a bit less powerful
arya has joined #ruby
<canton7>
in php you can't do "when 1,2,3" or "when 1..5" or "when Array"
bluOxigen has joined #ruby
<apeiros_>
zastern: what doesn't mean anything? the remark about classes implementing === ?
hiall has joined #ruby
carloslopes has quit [Remote host closed the connection]
IrishGringo has quit [Ping timeout: 252 seconds]
arturaz has quit [Ping timeout: 256 seconds]
<apeiros_>
zastern: that article is pretty good actually. should read it closely. if you don't fully understand it, reread in a month.
<yxhuvud>
canton7: well. Do note that you don't have to supply a value to case. ie: case; when foo == bar.. ; when baz == gazonk .. ; end works
<zastern>
apeiros_: yes the bit about classes
jocellyn has left #ruby [#ruby]
<canton7>
yxhuvud, true
<zastern>
actually rereading it it makes a bit more sense
eka has joined #ruby
<zastern>
but im not 100% on what you mean
<apeiros_>
zastern: with `case obj; when expression` - ruby does `expression === obj` to evaluate whether that "when-branch" is entered
<apeiros_>
and in ruby, === is a normal method
Al__ has quit [Quit: Al__]
<apeiros_>
class X; def ===(other); end; end
arturaz has joined #ruby
<zastern>
I'm more confused now :P
<apeiros_>
this means you can define the behavior of your class in a case/when statement.
<zastern>
mm i think i get that bit
<apeiros_>
e.g. Range#=== is implemented as 'between?'
arturaz has quit [Remote host closed the connection]
garbagecollect-1 has joined #ruby
max_ has joined #ruby
blacktulip has quit [Remote host closed the connection]
Morrolan has joined #ruby
garbagecollectio has quit [Ping timeout: 260 seconds]
garbagecollectio has joined #ruby
thinkclay has joined #ruby
wmoxam has quit [Ping timeout: 264 seconds]
max_ has quit [Remote host closed the connection]
kofno has quit [Remote host closed the connection]
sepp2k1 has joined #ruby
fixl has joined #ruby
garbagecollect-1 has quit [Ping timeout: 244 seconds]
awarner has quit [Remote host closed the connection]
sepp2k has quit [Ping timeout: 252 seconds]
ckrailo has joined #ruby
<MACscr>
thanks guys, that seemed to work. Now to actually get my upstart file to work with it
ferdev is now known as ferdev|away
<gregor3005>
anybody familiar with the "daemons" gem?
<apeiros_>
gregor3005: don't ask meta-questions
<gregor3005>
im searching for a way to start a server process that should running only once
<gregor3005>
also when i start it twice
<apeiros_>
(you'll rarely get a reply, and that way lessen your chance to get help with your actual question)
<gregor3005>
apeiros_: sry i twas typing
mockra has joined #ruby
awarner has joined #ruby
<apeiros_>
gregor3005: iirc daemons gem supports using a pid file
<gregor3005>
ah, that would help
mahmoudimus has quit [Quit: Computer has gone to sleep.]
daniel_- has joined #ruby
toekutr has quit [Remote host closed the connection]
daniel_- has joined #ruby
daniel_- has quit [Changing host]
mahmoudimus has joined #ruby
bradhe has joined #ruby
ferdev|away is now known as ferdev
mockra has quit [Remote host closed the connection]
Emily89 has quit [Quit: Emily89]
godzirra has joined #ruby
BrianJ has quit [Quit: Computer has gone to sleep.]
angusiguess has quit [Ping timeout: 256 seconds]
<godzirra>
Hey guys. Can anyone look at my pastebin? http://pastebin.com/dHCQxkNH I'm trying to figure out how to make a self referencing class, but I'm getting errors that have been pasted there.
<godzirra>
As well as my schema.
<godzirra>
Anyone that can help I'd appreciate it.
<apeiros_>
godzirra: please, why do you use an ad-riddled paste service when there's good ones without?
<apeiros_>
you should paste the full backtrace
<godzirra>
apeiros_: What's a better one?
MartinCleaver has quit [Quit: MartinCleaver]
<apeiros_>
f.ex. gist.github.com, which is listed in the topic
<apeiros_>
that one also provides revisions
<apeiros_>
and is git backed, meaning you can even fork a gist
<godzirra>
Cool. I'll try that. one moment and I'll paste the whole stack trace… if I can get sinatra to do it.
<godzirra>
That's the whole script there… Ican't see where I'm calling anything recursively. :/
eklarskov has joined #ruby
havenwood has quit [Remote host closed the connection]
maxmanders has quit [Ping timeout: 252 seconds]
<shevy>
godzirra something that is calling all those methods you use there
<shevy>
apparently it is not in your script but must be somewhere else
<godzirra>
The last thing I pasted is just the script
<godzirra>
and I get the same error.
<godzirra>
and you just call it via command line
nate00 has quit [Ping timeout: 245 seconds]
drago757 has quit [Quit: drago757]
coolj1 has left #ruby [#ruby]
coolj1 has joined #ruby
drago757 has joined #ruby
lolcathost|afk is now known as ahokaomaeha
<shevy>
yup, you have a recursion somewhere in those methods you use
maxmanders has joined #ruby
tbilik has joined #ruby
atmosx has quit [Quit: WeeChat 0.4.0-rc1]
justsee has quit [Quit: Leaving...]
<shevy>
def foo; foo(); end # => nil; foo() # SystemStackError: stack level too deep
dunric has joined #ruby
coolj1 has left #ruby [#ruby]
dunric has left #ruby ["WeeChat 0.4.0"]
garbagecollectio has quit [Quit: garbagecollectio]
dunric has joined #ruby
<godzirra>
huh.
kofno has joined #ruby
alx- has quit [Ping timeout: 246 seconds]
HecAtic has quit [Quit: HecAtic]
awarner has quit [Remote host closed the connection]
gregor3005 has left #ruby [#ruby]
AlSquire has quit [Read error: Connection reset by peer]
AlSquirrel has joined #ruby
coolj1 has joined #ruby
zastern has quit [Remote host closed the connection]
TheFuzzball has quit [Quit: Computer has gone to sleep.]
baroquebobcat has joined #ruby
skcin7 has joined #ruby
<dunric>
is there some list of compatibility changes between ruby 1.9 & upcoming 2.0 ?
nate00 has joined #ruby
Retistic has quit [Quit: Retistic]
coolj1 has left #ruby [#ruby]
nate00 has quit [Client Quit]
<apeiros_>
dunric: should be almost 100% backwards compatible as far as I heard
monkegjinni has joined #ruby
angusiguess has joined #ruby
<apeiros_>
one thing was: no mutex in Kernel#trap callback anymore
Virunga_ has joined #ruby
coolj1 has joined #ruby
MACscr has left #ruby [#ruby]
justsee has joined #ruby
Virunga has quit [Ping timeout: 264 seconds]
<dunric>
@apeiros_ less incompatibilities would be welcomed
coolj1 has left #ruby [#ruby]
newUser1234 has quit [Remote host closed the connection]
<apeiros_>
dunric: nickname is sufficient, no @ needed ;-)
<apeiros_>
(you had me worried for a second that I forgot to deop)
<dunric>
i did read somewhere lazy structures will be introduced
coolj1 has joined #ruby
<dunric>
sorry not often on irc, still learning :)
newUser1234 has joined #ruby
<dunric>
just curios if anybody tested rails 3.2 with some ruby's 2.0 rc version
awarner has joined #ruby
AtoxIO has quit [Remote host closed the connection]
<apeiros_>
from what I heard, rails runs on ruby2, but #rubyonrails has probably more people knowing
angusiguess has quit [Ping timeout: 255 seconds]
robonerd has joined #ruby
<robonerd>
what's the difference between a stream and a sequence?
<robonerd>
generally speaking
max_ has quit [Quit: p33 ba115]
wmoxam has quit [Ping timeout: 264 seconds]
skattyadz has quit [Quit: skattyadz]
tbilik has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
hoens has joined #ruby
iamjarvo has joined #ruby
<shevy>
dunno... a sequence has specific datasets at every position, which you may care about, and a stream has datasets you don't care as much individually for, or they can not be described as a sequence?
<shevy>
DNA is a sequence... ATCGTCTAATTACG
eklarskov has quit [Ping timeout: 252 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
awarner has quit [Remote host closed the connection]
skattyadz has joined #ruby
pakchoi2 has joined #ruby
twshelton has joined #ruby
aspiers has quit [Ping timeout: 248 seconds]
pdamer has joined #ruby
awarner has joined #ruby
awarner has quit [Remote host closed the connection]