apeiros_ changed the topic of #ruby to: programming language || ruby-lang.org || Paste >3 lines of text in http://pastie.org || Rails is in #rubyonrails
<apeiros_> for your show, have a look at `p @data`, `puts @data` and `puts @data.inspect`
Targen has quit [Ping timeout: 245 seconds]
<apeiros_> (p @data is a short way to express puts @data.inspect)
luckyruby has quit [Remote host closed the connection]
mdw_ has quit [Remote host closed the connection]
mpereira_ has quit [Ping timeout: 252 seconds]
Boohbah has quit [Remote host closed the connection]
Boohbah has joined #ruby
kuranai is now known as kuranai|off
<offby1> apeiros_: ooh, I didn't know that; I've been typing puts @data.inspect rather a lot :)
<apeiros_> offby1: require 'pp'; pp data, and require 'yaml'; y data - those two might be of interest too
tommylommykins has quit [Ping timeout: 244 seconds]
nlc has joined #ruby
davidpk has quit [Ping timeout: 256 seconds]
<offby1> I do the former all the time. The latter might be interesting.
<offby1> I wonder if yaml knows how to collapse shared stuff the way pp does
* offby1 is too lazy to, you know, actually find out :)
davidpk has joined #ruby
<offby1> hm, I don't see "y" at all.
ben225 has joined #ruby
beneggett has quit [Ping timeout: 245 seconds]
ben225 is now known as beneggett
sohocoke has joined #ruby
wilmoore has quit [Remote host closed the connection]
kaspernj__ has quit [Ping timeout: 246 seconds]
tommylommykins has joined #ruby
albemuth has joined #ruby
sparrovv has quit [Ping timeout: 250 seconds]
albemuth has quit [Client Quit]
pika_pika has quit [Ping timeout: 246 seconds]
zeromodulus has quit [Remote host closed the connection]
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
savage- has quit [Remote host closed the connection]
chson has joined #ruby
cdepue has quit [Remote host closed the connection]
yankov has quit [Quit: yankov]
otters has joined #ruby
weasels has quit [Read error: Connection reset by peer]
stephenjudkins has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
kenperkins has quit [Quit: Computer has gone to sleep.]
yosinof has quit [Quit: Leaving]
chson has quit [Remote host closed the connection]
kaspernj__ has joined #ruby
looopy has joined #ruby
IPGlider has quit []
Juul has joined #ruby
seanstickle has joined #ruby
cdepue has joined #ruby
Foxandxss has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
sohocoke has quit [Quit: sohocoke]
ConstantineXVI has joined #ruby
Juul has quit [Remote host closed the connection]
deryldoucette has quit [Quit: deryldoucette]
ABK has quit [Read error: Connection reset by peer]
tommyvyo has joined #ruby
ABK has joined #ruby
luckyruby has joined #ruby
ciopte7_ has quit [Quit: ciopte7_]
td123 has quit [Quit: WeeChat 0.3.7]
rh1n0 has joined #ruby
rrichards has joined #ruby
<banisterfiend> shevy: http://imgur.com/r/WTF/nAezL
cdepue has quit [Remote host closed the connection]
frogstarr78 has quit [Quit: Leaving]
yankov has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
fixl has joined #ruby
rh1n0 has quit [Ping timeout: 256 seconds]
td123 has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
jhunter has quit [Ping timeout: 252 seconds]
pdtpatrick has quit [Quit: pdtpatrick]
jhunter has joined #ruby
cordoval has joined #ruby
CannedCorn has joined #ruby
cordoval has left #ruby [#ruby]
mengu has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
ben_m has quit [Quit: Leaving]
kaspernj_ has joined #ruby
cdepue has joined #ruby
mahmoudimus has quit [Client Quit]
rrichards has quit [Quit: Leaving...]
kaspernj__ has quit [Ping timeout: 245 seconds]
Ontolog has joined #ruby
beneggett has quit [Read error: Connection timed out]
rh1n0 has joined #ruby
rh1n0 has quit [Client Quit]
rh1n0 has joined #ruby
ABK has quit [Read error: Connection reset by peer]
adamkittelson has quit [Remote host closed the connection]
beneggett has joined #ruby
CannedCorn has quit [Read error: Operation timed out]
rrichards has joined #ruby
Hanmac1 has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
codefarmer has quit [Quit: codefarmer]
ciopte7 has joined #ruby
mahmoudimus has joined #ruby
bluenemo has quit [Remote host closed the connection]
looopy has quit [Remote host closed the connection]
rh1n0 has quit [Ping timeout: 244 seconds]
mahmoudimus has quit [Client Quit]
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
techhelp has joined #ruby
luckyruby has quit [Remote host closed the connection]
Taos has joined #ruby
<Taos> Sup all
<offby1> pry!
<Taos> Dropping into ruby from python, anything tahts really gonna catch me out or send me insane or impress me?
yankov has quit [Quit: yankov]
Cicloid has quit [Remote host closed the connection]
RegEchse has quit [Quit: <3 WeeChat (v0.3.8-dev)]
nari has joined #ruby
<offby1> heh
<offby1> how about this: blocks don't create their own scope
<offby1> x = 3; something { |x| x = 10 } ; puts x
<offby1> will print 10
<offby1> freaked me out, I tell ya.
rrichards has quit [Quit: Leaving...]
niklasb has quit [Ping timeout: 244 seconds]
<offby1> Also: it's not as fussy about indentation as python (what language is?) but it's still persnickety about where you put newlines: newlines terminate expressions, except when they don't.
ABK has joined #ruby
CheeToS has joined #ruby
`damien has quit [Quit: `damien]
<banisterfiend> offby1: does Pry rock out your D. ?
<offby1> it do and thanks
<offby1> Taos: : actually I just tried it, and it printed 3. Now I'm confused.
<banisterfiend> offby1: did u see the hacker news post? http://news.ycombinator.com/item?id=3991632
<offby1> I don't read hacker news, so no
<Taos> :( irb + windows hate eachother
diegoviola has quit [Quit: Reconnecting]
diegoviola has joined #ruby
<offby1> hm, my "block" thing may be a 1.8-versus-1.9 ism
LBRapid has quit [Read error: Connection reset by peer]
<offby1> works differently in the two versions.
<offby1> 1.8 is the weird crazy way; 1.9 is sane
niklasb has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
_blackbird has quit [Quit: where's the beef!?]
stanigator has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
codezombie has quit [Quit: Linkinus - http://linkinus.com]
LBRapid has joined #ruby
<stanigator> how do you tell whether rubygems is installed on a system?
Targen has joined #ruby
Alantas has joined #ruby
looopy has joined #ruby
brianpWins has joined #ruby
perryh is now known as perryh_away
codelurker has joined #ruby
ABK has quit [Read error: Connection reset by peer]
<offby1> maybe type "type gem" at the shell
ABK has joined #ruby
<offby1> if you see ``bash: type: gem: not found'' that suggests it isn't :)
<Taos> So wtf is a block?
krusty_ar has quit [Read error: Connection reset by peer]
<Alantas> Taos: It's kinda like a lambda function, or an inline, anonymous callback.
<Alantas> You know how you can pass arguments to a method call? You can pass code too; that's a block.
krusty_ar has joined #ruby
deobald__ has joined #ruby
<Taos> Not gotcha on this one
<Taos> I fail to understand (for iteration) one does not us ethe std syntax of for a in that:
<Taos> why some choose def add_stuff(arg1, arg2) puts "Adding: %i and %i" % [arg1, arg2] arg1 + arg2
<Taos> endnumbers.each do |x|
ABK has quit [Read error: Connection reset by peer]
<Taos> ^
<Alantas> "for x in y" == "y.each do |x|"
krusty_ar has quit [Remote host closed the connection]
<Taos> Right
<Alantas> (Approximately; there's different scoping rules or something, but otherwise for-x-in-y calls out to each()."
<Alantas> )
<Taos> so why is there not just "one" way to do iteration? :L
<Alantas> I usually use the each() syntax since it's more consistent with the many other iterator/block-receiving methods like map(), sort_by() and so on.
<Alantas> y.map{ |item| ... } y.sort_by{ |a,b| a.length <=> b.length } etc
<Alantas> y.each{ |item| ... }
weasels has joined #ruby
<Alantas> (Er, y.sort{ |a,b| a.lengthetc } and y.sort_by{ |a| a.length }.)
<Taos> Riight
<Alantas> If you like "for x in y", though, go for it.
ConstantineXVI has quit [Remote host closed the connection]
<Taos> Alantas: im just learning atm ^^
otters has quit [Ping timeout: 250 seconds]
ConstantineXVI has joined #ruby
<Alantas> It took me a while to wrap my head around how blocks work. But they're quite elegant once you get the hang of them.
<Taos> Okay one more stab
<Taos> with a real life example
<offby1> ow
techhelp has quit [Quit: This computer has gone to sleep]
* offby1 treats a stab wound
<Alantas> button.when_clicked { puts "I was just clicked!" }
codelurker has quit [Quit: WeeChat 0.3.7]
<Taos> So what does the pipe var_name pipe syntax stand for directly?
kinesis has left #ruby [#ruby]
kinesis has joined #ruby
<offby1> it's just weird syntax for passing procedures to methods
jimeh2 has quit [Ping timeout: 252 seconds]
<kinesis> Hey how do i get variable_set instead of class variable set ::: http://pastebin.com/k8EVhLqF
<Alantas> It's how the block receives parameters.
<offby1> |x| just means the formal argument list.
ConstantineXVI has quit [Read error: No route to host]
voodoofish430 has quit [Quit: Leaving.]
<kinesis> trying to read a yaml file
Constant_ has joined #ruby
<offby1> {|x| ahoy} in ruby is the same as lambda x: ahoy in python
Constant_ has quit [Remote host closed the connection]
<Taos> RIGHT
<offby1> or (lambda (x) (ahoy)) in scheme
ConstantineXVI has joined #ruby
<Alantas> def foo(bar,baz) is how a method receives arguments; { |bar, baz| is how a block receives arguments.
<kinesis> Hey how do i get variable_set instead of class variable set ::: http://pastebin.com/k8EVhLqF
<Taos> so you could say bigger_nums = numbers.map {|x| x * x * x}
<offby1> yep
<Taos> Thats kinda kinky
<offby1> perfectly straightforward for functional programmers
<Alantas> On a side note: "each{ |x| puts x}" and "each do |x| puts x end" are equivalent; just alternative syntax. I usually use {this} for one-liners and "do ... end" for multi-line blocks.
<offby1> yeah, I think that's the convention
<Taos> Riight
<kinesis> 1
<kinesis> ???
<Alantas> Oh. *Takes a look at kinesis's question.*
<kinesis> line 22 ,i dont want instance, i want to load a config into variables
<kinesis> for use throughout the whole infrastructure
<Alantas> I think it's something along the lines of "instance variable set" or such. *Looks*
<Taos> eww requires polutes namespaces :(
<kinesis> huh?\
<kinesis> i need an answer to this
eka has quit [Quit: Leaving]
cordoval has joined #ruby
<kinesis> is there a better way to load a yaml config
artm has joined #ruby
<cordoval> hi guys
<cordoval> i am trying to understand this line @from = options[:from]
<cordoval> the [:from] in particular?
<Alantas> kinesis: You're wanting it to set @instance @variables @by @name? That's generally a bad idea; you should have them as keys in a Hash or something, for setting them by arbitrary, externally-gotten names like that.
<kinesis> No
<kinesis> I want them usable throughout the entire ruby classes
<Alantas> cordoval: It's just a hash key. In this case, it's a Symbol rather than a String.
<kinesis> like a real config file should be loaded
<kinesis> I removed the @
<kinesis> i tried to use variable_set, but there is no such thing, i removed class_variable_set, made it variable_set
<cordoval> so this would be in a language like php like ---> $option[$this->from] right?
luckyruby has joined #ruby
<Alantas> Maybe add them to a class-constant Hash. Other code can then access it, while still preserving encapsulation like a Real program should.
<cordoval> yea yeah i know Alantas, again i have to slave porting this code
<Alantas> cordoval: No. A :symbol is sorta like a "string", except you can't change it.
<cordoval> Alantas you rock
<Alantas> Instance variables (like PHP's $this->foo) are done like @foo
artm has quit [Client Quit]
yosinof has joined #ruby
<kinesis> so forget using yaml?
<kinesis> to load config values?
googya has joined #ruby
<Alantas> And that's just for within the class. You can't use @foo to get an instance var from outside the class; you'll need a "getter" method for that (like "attr_reader :foo" or "attr_accessor :foo" in the class definition).
<kinesis> is there a better way to do that?
<kinesis> ok reading
ABK has joined #ruby
<Alantas> kinesis: No, forget setting global vars' names by external data.
<kinesis> so do the class_variable_set("@#{val}", key)
<kinesis> but do attr_accessor
<Alantas> Set their values by external data, by all means, but not the names themselves. You should control the names. If you have arbitrary names you need to work with, use them as keys in a controlled hash.
<Alantas> kinesis != cordoval
davidpk has joined #ruby
luckyruby has quit [Remote host closed the connection]
<kinesis> so ?
<kinesis> i want to carry the settings within the class
<kinesis> do @@?
<Alantas> kinesis: Something like: def read_config(file); c = YAML.load_file(file); Images = c["img"]
<Alantas> Then you (should) have ImgGen::Images as a Hash of the things.
<kinesis> how do i print them
<kinesis> ./img.rb:15:in `instance_variable_set': `@@email' is not allowed as an instance variable name (NameError)
<kinesis> ok
liluo has joined #ruby
<Alantas> Images.each_pair{ |key, value| puts whatever }
moshee has quit [Ping timeout: 250 seconds]
moshee has joined #ruby
ConstantineXVI has quit [Remote host closed the connection]
<kinesis> ./img.rb:15: dynamic constant assignment
luckyruby has joined #ruby
<Alantas> module ImgGen; Images = Hash.new
ConstantineXVI has joined #ruby
<Alantas> then in read_config: Images.update(c["img"])
<Alantas> Try that.
alexim has quit [Quit: sleep]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
jgrevich has quit [Quit: jgrevich]
Gavilan has joined #ruby
wallerdev has joined #ruby
alexim has joined #ruby
ConstantineXVI has quit [Ping timeout: 245 seconds]
<kinesis> and its referenced by? ImgGen::Images[width]
<kinesis> ?
cdepue has quit [Remote host closed the connection]
<Alantas> c["img"]["foo"] becomes ImgGen::Images["foo"]
ROMEOO has joined #ruby
<ROMEOO> HI
Araxia_ has quit [Quit: Araxia_]
alexim has quit [Client Quit]
niklasb has quit [Ping timeout: 246 seconds]
alexim has joined #ruby
midrange has quit [Ping timeout: 244 seconds]
ROMEOO has left #ruby ["Gokilz-IRC-Master"]
alexim has quit [Client Quit]
xhh has joined #ruby
indian has quit [Quit: Leaving]
<kinesis> thx
jayrulez has joined #ruby
peterhil has quit [Ping timeout: 252 seconds]
ilyam_ has joined #ruby
googya has quit [Ping timeout: 276 seconds]
fragrant has joined #ruby
fragrant has left #ruby [#ruby]
quesada_ has joined #ruby
urlwolf has quit [Ping timeout: 246 seconds]
cordoval has left #ruby [#ruby]
ilyam has quit [Ping timeout: 245 seconds]
ilyam_ is now known as ilyam
midrange has joined #ruby
luckyruby has quit [Remote host closed the connection]
midrange is now known as Guest95418
mahmoudimus has joined #ruby
ConstantineXVI has joined #ruby
StoSun has quit []
ConstantineXVI has quit [Remote host closed the connection]
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
peterhil has joined #ruby
luckyruby has joined #ruby
ilyam has quit [Quit: ilyam]
rh1n0 has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
nari has quit [Ping timeout: 276 seconds]
nari has joined #ruby
Yarou has quit [Ping timeout: 244 seconds]
jcromartie has joined #ruby
Yarou has joined #ruby
yosinof has quit [Quit: Leaving]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
cbuxton has quit [Ping timeout: 265 seconds]
savage- has joined #ruby
deryl has joined #ruby
deryl has quit [Client Quit]
ABK has quit [Ping timeout: 246 seconds]
nari has quit [Ping timeout: 240 seconds]
ciopte7 has quit [Quit: ciopte7]
<krz> when i do Time.now.utc i get 1337395359. but in JS, when I do: d = new Date(1337395359); i get: Date {Fri Jan 16 1970 03:29:55 GMT-0800 (PST)}
<krz> what am i doing wrong?
<krz> shouldn't it return the current date
<krz> btw, thats Time.now.utc.to_i
<Alantas> Maybe JS denominates time in sub-second units? Seems like a strange thing to do, though, when it could just accept a float number of seconds or something. <shrug>
deryl has joined #ruby
sepp2k has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
xhh has quit [Remote host closed the connection]
xhh has joined #ruby
bperry has joined #ruby
<bperry> I have a question about GetOpenFile() in ruby 1.9.3
<bperry> does anyone available have much experience with this function?
<bperry> basically, I get an IOError when I am calling
<bperry> and I don't know why...
<Alantas> krz: Yeah; Time.utc(1970,1,1,0,0,0)+1337395.690 » Fri Jan 16 11:29:55 UTC 1970
<bperry> this code was written in 2006
<bperry> so it was written with 1.8.7 in mind
<Alantas> krz: So JS's Date seems to denominate in milliseconds rather than full seconds.
<krz> needs to be Date(*1000)
cdepue_ has joined #ruby
<bperry> I have gotten it to compile now and some of it works
<bperry> but thsi IOError is killing me
<bperry> it is a ruby gem written in C
Urth|Away is now known as Urthwhyte
deryl_ has joined #ruby
<Alantas> "GetOpenFile()"? Never heard of it. Doesn't look like it uses typical Ruby naming or organization conventions.
<bperry> it is used in the ruby stdlib]
<bperry> but it may very well be deprecated by now
<bperry> I have no idea
<bperry> would you like to see code maybe?
deryl_ has quit [Client Quit]
<Alantas> Oh, it's used internally, not from Ruby itself. That wasn't clear.
liluo has quit [Remote host closed the connection]
<bperry> well, this gem uses it to create sockets
<bperry> file descriptors for sockets
<seanstickle> GetOpenFile is part of the C source, not the Ruby source.
rh1n0 has quit [Quit: Leaving...]
<bperry> line 311 for example is one function
rh1n0 has joined #ruby
ciopte7 has joined #ruby
<bperry> I get to the GetOpenFile with the fptr and self (a socket)
<bperry> and I get an IOError
<bperry> it may not be the correct way to make these sockets
<bperry> it may have been 6 years ago though
<bperry> old code with no documentation heh
td123 has quit [Quit: WeeChat 0.3.7]
ciopte7 has quit [Client Quit]
nari has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
radic_ is now known as radic
deryl has quit [Quit: Leaving]
deryl has joined #ruby
deryl has quit [Client Quit]
Guest60631 has joined #ruby
Guest60631 has quit [Client Quit]
deryldoucette has joined #ruby
LBRapid has quit [Quit: Computer has gone to sleep.]
cdepue_ has quit [Remote host closed the connection]
deryldoucette is now known as deryl
rh1n0 has quit [Quit: Leaving...]
rh1n0 has joined #ruby
cbuxton has joined #ruby
deobald__ has quit [Ping timeout: 260 seconds]
kaspernj_ has quit [Ping timeout: 246 seconds]
ipoval has joined #ruby
ryanf has quit [Quit: leaving]
bigkm has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
beneggett has quit [Read error: Connection timed out]
igotnolegs has joined #ruby
wmoxam has joined #ruby
chico_chicote has quit [Remote host closed the connection]
beneggett has joined #ruby
bigkm has joined #ruby
pika_pika has joined #ruby
kaspernj_ has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
rippa has joined #ruby
mahmoudimus has joined #ruby
mahmoudimus has quit [Client Quit]
nari has quit [Ping timeout: 245 seconds]
rboyd has joined #ruby
cbuxton has quit [Quit: Leaving.]
bigkm has quit [Ping timeout: 256 seconds]
wallerdev has quit [Quit: wallerdev]
bigkm has joined #ruby
moshee has quit [Ping timeout: 250 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
wmoxam has quit [Ping timeout: 256 seconds]
pika_pika_ has joined #ruby
zeromodulus has joined #ruby
zeromodulus has quit [Read error: Connection reset by peer]
zeromodu_ has joined #ruby
pika_pika has quit [Ping timeout: 246 seconds]
berserkr has quit [Quit: Leaving.]
zeromodu_ has quit [Remote host closed the connection]
stanigator has quit [Quit: Page closed]
zeromodu_ has joined #ruby
FCWBilly has joined #ruby
leojweda has joined #ruby
<leojweda> this is my first time using ruby as a scripting language (as opposed to with rails). why do i keep getting an error on line 12 saying unexpected end? https://gist.github.com/a5c5621d691be154296a
zeromodu_ is now known as zeromodulus_
fivetwentysix has joined #ruby
ipoval has quit [Quit: ipoval]
rh1n0 has quit [Quit: Leaving...]
Urthwhyte is now known as Urth|Away
<seanstickle> Two items: don't use so much indent
<seanstickle> 2 spaces
fragrant has joined #ruby
<seanstickle> And second, Ruby doesn't have self-increment
fragrant has left #ruby [#ruby]
<seanstickle> other++ is not valid Ruby
zeromodulus_ is now known as zeromodulus
CheeToS has quit [Ping timeout: 252 seconds]
<leojweda> seanstickle: thanks :)
wilmoore has joined #ruby
xiaotian has joined #ruby
iamjarvo has joined #ruby
zeromodulus has quit [Ping timeout: 248 seconds]
emmanuelux has quit [Remote host closed the connection]
adeponte has joined #ruby
inteq has joined #ruby
zeromodulus has joined #ruby
jcromartie has quit [Quit: jcromartie]
leojweda has quit [Quit: So Long, and Thanks for All the Fish]
ananthakumaran has joined #ruby
yankov has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
beneggett has joined #ruby
bigkm has quit [Ping timeout: 244 seconds]
kaspernj_ has quit [Ping timeout: 246 seconds]
kil0byte has quit [Remote host closed the connection]
beneggett has quit [Client Quit]
adeponte has quit [Remote host closed the connection]
ciopte7_ has joined #ruby
bigkm has joined #ruby
LBRapid has joined #ruby
ryanf has joined #ruby
kil0byte has joined #ruby
kevinbond has quit [Quit: kevinbond]
moshee has quit [Ping timeout: 248 seconds]
moshee has joined #ruby
CannedCorn has joined #ruby
rippa has quit [Ping timeout: 252 seconds]
kaspernj_ has joined #ruby
macmartine has quit [Quit: macmartine]
perryh_away is now known as perryh
neersighted is now known as neersighted|AFK
banisterfiend has quit [Read error: Connection reset by peer]
macmartine has joined #ruby
googya has joined #ruby
otters has joined #ruby
banisterfiend has joined #ruby
weasels has quit [Ping timeout: 245 seconds]
gtuckerkellogg has joined #ruby
odinswand has joined #ruby
xhh has quit [Quit: xhh]
xhh has joined #ruby
kevinbond has joined #ruby
neersighted|AFK is now known as neersighted
fixl has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
odinswand has quit [Remote host closed the connection]
odinswand has joined #ruby
dhaskew_ has joined #ruby
dhaskew has quit [Read error: Connection reset by peer]
dhaskew_ is now known as dhaskew
dhaskew_ has joined #ruby
dhaskew has quit [Read error: Connection reset by peer]
dhaskew_ is now known as dhaskew
dhaskew_ has joined #ruby
dhaskew has quit [Read error: Connection reset by peer]
dhaskew_ is now known as dhaskew
kil0byte has quit [Remote host closed the connection]
iamjarvo has quit [Ping timeout: 246 seconds]
h4mz1d has joined #ruby
odinswand has quit [Remote host closed the connection]
khakimov has quit [Quit: Computer has gone to sleep.]
yankov has quit [Quit: yankov]
kevinbond has quit [Quit: kevinbond]
Urth|Away is now known as Urthwhyte
kaspernj_ has quit [Ping timeout: 244 seconds]
luckyruby has quit [Remote host closed the connection]
Urthwhyte is now known as Urth|Away
lkba has quit [Ping timeout: 256 seconds]
theRoUS has quit [Ping timeout: 240 seconds]
ivar has joined #ruby
fowl has quit [Quit: Leaving]
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
SmoothSage has joined #ruby
shadoi has quit [Remote host closed the connection]
macmartine has quit [Quit: macmartine]
kaspernj has joined #ruby
xiaotian has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
xiaotian has joined #ruby
otters has quit [Read error: Connection reset by peer]
otters has joined #ruby
bambanx has joined #ruby
lkba has joined #ruby
<bambanx> sup guys
gtuckerkellogg has joined #ruby
kevinbond has joined #ruby
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
Chryson has quit [Ping timeout: 246 seconds]
Solnse has joined #ruby
CheeToS has joined #ruby
kevinbond has quit [Client Quit]
ciopte7_ has quit [Quit: ciopte7_]
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
andrewhl has joined #ruby
noganex has quit [Ping timeout: 265 seconds]
noganex has joined #ruby
odinswand has joined #ruby
TheHunter_1039 has quit [Quit: TheHunter_1039]
<bambanx> indentation in ruby like a good programming is 4 spaces?
odinswand has quit [Remote host closed the connection]
<bambanx> i know is not necesary
wvms has left #ruby [#ruby]
<bperry> I have successfully patched this so far to start bluetooth services now, but it isn't a permanent fix
<bperry> I can create the raw socket myself for now rather than letting GetOpenFile do itr
<bperry> but I will need to figure out why GetOpenFIle returns an fd of -1
quest88 has joined #ruby
<bperry> quite a bit has changed from the c-perspective since 1.8.7 heh
cha1tanya has quit [Ping timeout: 256 seconds]
Morkel has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
rdegraci has joined #ruby
keithcelt has joined #ruby
keithcelt has quit [Remote host closed the connection]
davidpk has joined #ruby
nari has joined #ruby
keithcelt has joined #ruby
mikepack has quit [Remote host closed the connection]
savage- has quit [Remote host closed the connection]
ipoval has joined #ruby
lupine_85 has quit [Read error: Operation timed out]
DarkFoxDK has quit [Read error: Operation timed out]
DarkFoxDK has joined #ruby
rewbnewb has joined #ruby
CannedCorn has quit [Quit: Computer has gone to sleep.]
shevy has quit [Ping timeout: 252 seconds]
cha1tanya has joined #ruby
h4mz1d has quit [Ping timeout: 252 seconds]
yxhuvud has joined #ruby
keanehsiao has joined #ruby
nari_ has joined #ruby
keanehsiao_ has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
lupine_85 has joined #ruby
nfluxx_ has joined #ruby
nari has quit [Read error: Operation timed out]
codezombie has joined #ruby
mdw has joined #ruby
nfluxx has quit [Ping timeout: 245 seconds]
nfluxx_ is now known as nfluxx
xiaotian has quit [Quit: Computer has gone to sleep.]
rewbnewb has left #ruby [#ruby]
rubenube has joined #ruby
sebastorama has joined #ruby
rubenube has quit [Client Quit]
<ryanf> bambanx: 2 spaces
<ryanf> pretty much universally
<ryanf> I don't know why I said "pretty much". I have literally never seen ruby code that wasn't 2 spaces
<bambanx> thanks ryanf
<ryanf> np
pika_pika_ has quit [Ping timeout: 246 seconds]
shevy has joined #ruby
quest88 has quit [Quit: quest88]
rboyd has quit [Quit: rboyd]
weasels has joined #ruby
otters has quit [Read error: Connection reset by peer]
<bambanx> ryanf,
<bambanx> what you use for make backups of your code?
<bambanx> git?
mdw has quit [Remote host closed the connection]
keanehsiao_ has quit [Quit: keanehsiao_]
keanehsiao has quit [Quit: Leaving...]
<ryanf> yep
ciopte7 has joined #ruby
ABK has joined #ruby
amalvagomes has quit [Ping timeout: 245 seconds]
amalvagomes has joined #ruby
DRCALKIN has joined #ruby
Hanmac1 is now known as Hanmac
Solnse has quit []
andrewhl has quit [Quit: andrewhl]
hadees has quit [Quit: hadees]
mdw has joined #ruby
NiteRain has joined #ruby
DRCALKIN has quit [Ping timeout: 250 seconds]
bigkm has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
kil0byte has joined #ruby
c0rn has joined #ruby
cordoval has joined #ruby
kil0byte has quit [Remote host closed the connection]
kevinbond has joined #ruby
nimred has joined #ruby
cordoval has quit [Read error: Operation timed out]
kevinbond has quit [Client Quit]
nari_ has quit [Ping timeout: 260 seconds]
nari_ has joined #ruby
yonggu has joined #ruby
keithcelt has quit [Remote host closed the connection]
odinswand has joined #ruby
Notimik has joined #ruby
seanstickle has quit [Quit: seanstickle]
kevinbond has joined #ruby
odinswand has quit [Remote host closed the connection]
Jackneill has joined #ruby
sebastorama has quit [Quit: Computer has gone to sleep.]
cordoval has joined #ruby
kevinbond has quit [Quit: kevinbond]
cha1tanya has quit [Ping timeout: 240 seconds]
cordoval has left #ruby [#ruby]
sandGorgon has joined #ruby
ABK has quit [Read error: Operation timed out]
NiteRain has quit [Remote host closed the connection]
d3c has joined #ruby
ABK has joined #ruby
Notimik has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
mikepack has joined #ruby
ennui has joined #ruby
beneggett has joined #ruby
nfk has joined #ruby
Jackneill has quit [Read error: Connection reset by peer]
Eldariof-ru has joined #ruby
mahmoudimus has joined #ruby
nari__ has joined #ruby
sei has joined #ruby
krz has quit [Ping timeout: 248 seconds]
indeterminate has quit [Ping timeout: 245 seconds]
krz has joined #ruby
nari_ has quit [Ping timeout: 265 seconds]
gosshedd has joined #ruby
amalvagomes has quit [Quit: amalvagomes]
nari__ has quit [Ping timeout: 244 seconds]
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
Eldariof59-ru has joined #ruby
Eldariof-ru has quit [Ping timeout: 244 seconds]
CheeToS has quit [Ping timeout: 250 seconds]
ciopte7 has quit [Quit: ciopte7]
sam113101 has quit [Remote host closed the connection]
ukwiz has joined #ruby
sam113101 has joined #ruby
nari__ has joined #ruby
cj3kim has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
rdegraci has quit [Quit: rdegraci]
schovi has joined #ruby
nari__ has quit [Ping timeout: 276 seconds]
yoklov has quit [Quit: computer sleeping]
banisterfiend has quit [Read error: Connection reset by peer]
sandGorgon has quit [Ping timeout: 240 seconds]
mikepack has quit [Remote host closed the connection]
eka has joined #ruby
ABK has quit [Read error: Connection reset by peer]
minijupe has quit [Quit: minijupe]
ABK has joined #ruby
banisterfiend has joined #ruby
mikeg has quit [Ping timeout: 248 seconds]
mdw has quit [Remote host closed the connection]
xaq has quit [Read error: Connection reset by peer]
ph^ has joined #ruby
Eldariof27-ru has joined #ruby
bambanx has quit [Read error: Connection reset by peer]
Ontolog has quit [Read error: Connection reset by peer]
Eldariof59-ru has quit [Ping timeout: 245 seconds]
petercs has joined #ruby
Ontolog has joined #ruby
googya has left #ruby [#ruby]
blacktulip has joined #ruby
kil0byte has joined #ruby
francisfish has joined #ruby
visof has joined #ruby
visof has quit [Changing host]
visof has joined #ruby
becom33 has joined #ruby
<becom33> hi I'm about code a very simple framework . how is my folder structure should be ?
wilmoore has quit [Remote host closed the connection]
* becom33 anyone ?
wilmoore has joined #ruby
<becom33> anyone ?
bier_ has quit [Read error: Operation timed out]
tomb_ has quit [Quit: Computer has gone to sleep.]
Corey has quit [Ping timeout: 612 seconds]
kaspernj has quit [Ping timeout: 246 seconds]
Solnse has joined #ruby
nlc has quit [Quit: Leaving]
blacktulip has quit [Remote host closed the connection]
Morkel has quit [Quit: Morkel]
beneggett has quit [Ping timeout: 252 seconds]
ananthakumaran1 has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
ananthakumaran has quit [Ping timeout: 244 seconds]
danguita has joined #ruby
nikhgupta has joined #ruby
nikhgupta has quit [Client Quit]
<xhh> becom33: check the existing framework/lib sources
beneggett has joined #ruby
<becom33> xhh, its hard to fine a simple scripting framework . most of them are web frameworks . the left scripting once are hard to read
mdw has joined #ruby
<xhh> becom33: what kind of framework are you going to build?
bier_ has joined #ruby
<becom33> xhh, a simpel scripting framework . where you can add plugins and stuff
tvw has joined #ruby
tvw has quit [Remote host closed the connection]
tvw has joined #ruby
kaspernj has joined #ruby
ph^ has quit [Remote host closed the connection]
schovi has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
ananthakumaran1 has quit [Ping timeout: 246 seconds]
<xhh> becom33: i see, no experiences on it though :)
<shevy> becom33 in general use name/lib/name
<shevy> the first name you can drop
<shevy> but for instance, I have a project that I called "web_foundation"
<shevy> it resides in the directory $RUBY_SRC which is a variable I use to denote my base ruby things (all the .rb files I write)
<shevy> in that $RUBY_SRC directory, I have a directory called web_foundation/
<shevy> in that directory, I have a lib/ folder, and in that lib/ folder I have web_foundation/ directory and web_foundation.rb file, which does call to the require files
<shevy> then when I want to use this project, I just do:
<shevy> require 'web_foundation'
<becom33> shevy well you saw my yesterday coding right ? i know its horrible . when I starts to write it I didnt have much of coding knowledge. but If I have a correct stucture I might be able to do a clean code now
<shevy> nah, your code can still be ugly
<shevy> but at least you can do
<shevy> require 'name_of_project'
<shevy> some projects also have a bin/ directory
<shevy> and test/ directory
ryanf has quit [Quit: leaving]
<shevy> but lib/ is the most important one really
FCWBilly has quit [Quit: Leaving]
<shevy> becom33 it really is easier if you focus on a very tiny project
<shevy> with i.e. only one or two .rb files
senny has joined #ruby
<shevy> making a huge ass framework out of nowhere is harder :)
<shevy> also, I found that large projects require a lot more documentation than I would have expected, than small projects
<shevy> it seems an exponential, rather than a linear increase :(
kil0byte has quit [Remote host closed the connection]
RurouniJones has joined #ruby
<becom33> shevy, ok . in my script I have file like . core.rb(core variables for everyfile), prompt.rb(readline),function.rb(commands methods)
<becom33> so those files should be inside lib folder right ?
francisfish has quit [Ping timeout: 244 seconds]
igotnolegs has quit [Quit: Computer has gone to sleep.]
krz has quit [Quit: krz]
<shevy> becom33 yes
<shevy> well
<shevy> lib/web_foundation/
<shevy> lib/name_of_your_project
<becom33> so lib/my_project_name ?
<shevy> let me look at pry gem
<shevy> pry-0.9.9.4/lib/pry/
<shevy> yeah becom33
<shevy> I just verified
tomzx has quit [Ping timeout: 244 seconds]
<shevy> pry uses lib/pry/ directory
<shevy> and also has the
<shevy> lib/pry/pry.rb file
<shevy> this file you need to make for your project too
<shevy> lib/my_project_name/
<shevy> and
<shevy> lib/my_project_name/my_project_name.rb
<becom33> shevy, so where is the first my executable file should be ?
<shevy> an executable?
<shevy> you already have an executable?
<shevy> it goes into bin/
ABK has quit [Ping timeout: 248 seconds]
<shevy> but I am not sure you have an executable already
<shevy> what would this do for your project?
<becom33> i do have a executable
<shevy> becom33, this is the "pry" executable: http://pastie.org/3934467
<becom33> I thought keeping it in the root folder
lindenle_ has quit [Ping timeout: 255 seconds]
ABK has joined #ruby
<becom33> shevy, its also have a readline right ? so pry and my projects are alot same :/ not exeacly but mine is alot simpler
<shevy> it makes use of readline, yeah
<shevy> readline is very useful
nari__ has joined #ruby
<shevy> I use it in all my projects that deal with user input by default
pietr0 has quit [Ping timeout: 272 seconds]
mdw has quit [Remote host closed the connection]
<becom33> shevy, so ours are alot same . I also have a executable so I guess it goes to the root folder ?
lindenle_ has joined #ruby
<becom33> shevy, i have a question . hold on lemme do a paste and show you
<shevy> I told you, executable goes into the root folder but into bin/ there
<shevy> ROOT_FOLDER
<shevy> - /bin
<shevy> - /lib
<shevy> btw I think this is written down somewhere
<shevy> read that
<shevy> it has good info
<shevy> "Additionally, if you try running the command newgem --simple [projectname] that'll quickly generate a scaffold for you with just the bare essentials for a Ruby project"
<shevy> try this too becom33
<shevy> probably have to do "gem install newgem" first
<shevy> "appname" is the same as "project name" usually. at least I follow this convention all the time
<shevy> but if you like confusion, you could name your project "foo", and write a "bar.rb" file instead, so that people need to do require 'bar' rather than require 'foo' ... ;)
<shevy> I will stick to "foo" and "foo.rb" however.
<RurouniJones> SpaxeX Falcon9 Launch live webcast at spacex.com/webcast/ in case any geeks are interested - Launch T-15 minutes
<becom33> shevy, http://pastie.org/private/4dqiy3cesqgdatmopocmw look at this . is this is a correct way to call the prompt name ?
<Alantas> I don't think a $global is called for there. Perhaps a class constant instead.
bluenemo has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
<shevy> becom33 it's kinda useless to define a $global in your class
L-----D has joined #ruby
<shevy> why dont you use @instance_variables becom33 ?
<becom33> shevy, that $globle will be used in several places
<Alantas> Probably just: class Core; Prompt = "myframework"; end; while linein = Readline.readline(Prompt+">", true)
ddv has joined #ruby
sparrovv has joined #ruby
<shevy> becom33 ok, you know your code. but I also tell you, it is rare to really need a global variable
ddv has quit [Changing host]
ddv has joined #ruby
<Alantas> Or a @@class_var or something.
<becom33> Alantas, those are two deffent files
<Alantas> becom33: Yes, but class Constants/@@vars should be inherited.
<becom33> shevy, wait let me try instance variable
<shevy> class var are terrible
<shevy> constants are ok
batmanian has joined #ruby
<shevy> if you however want to change the prompt
mdw has joined #ruby
<shevy> and already subclass
<shevy> why don't you use @prompt instead?
<shevy> and if it does not change ever, then using a CONSTANT is much better too
banisterfiend has joined #ruby
<becom33> shevy, it changes so I'll try instent variable wait
mdw has quit [Remote host closed the connection]
<banisterfiend> becom33: r u making a pry clone
<becom33> banisterfiend, no no . still learning :P
nari__ has quit [Ping timeout: 250 seconds]
<banisterfiend> shevy: are you here?
tayy has joined #ruby
<becom33> shevy, in my exeutable file . my prompt require is require './lib/prompt' . is this a correct way to require a custome class ? it works . but not sure if its right
keanehsiao has joined #ruby
keanehsia has joined #ruby
<Hanmac> becom33 the correct way is require_relative "lib/prompt"
<becom33> aghh I see
mdw has joined #ruby
<becom33> Hanmac, undefined method `require_relative' for main:Object (NoMethodError)
<banisterfiend> shevy: can i buy u one of these http://www.soloflesh.com/
ABK has quit [Read error: Connection reset by peer]
<Hanmac> then your ruby is to old :P
<Mon_Ouie> becom33: You're probably not using Ruby 1.9 then
beneggett has quit [Remote host closed the connection]
<becom33> ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
ABK has joined #ruby
<becom33> :/ not that old
batmanian has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<Mon_Ouie> ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
inteq has quit [Remote host closed the connection]
<Mon_Ouie> And that may not even be the latest version
inteq has joined #ruby
<becom33> umm
mdw has quit [Remote host closed the connection]
<becom33> so I should my ruby then
DRCALKIN has joined #ruby
<Mon_Ouie> But don't forget to first
DRCALKIN has quit [Client Quit]
<becom33> first what ?
tewecske has joined #ruby
pridian has joined #ruby
mdw has joined #ruby
brianpWins has quit [Quit: brianpWins]
<shevy> banisterfiend sorry, I am too scared to click on your links :)
ananthakumaran1 has joined #ruby
<shevy> becom33 you dont need require_relative on 1.8.7
<Hanmac> just ignore banister and your life will be better
<shevy> becom33 you also don't need the './'
<becom33> im updating my ruby into 1.9.3 :D
<shevy> :\
Yarou_ has joined #ruby
<shevy> good. then you must ask Hanmac what to do next
<becom33> why ?
<shevy> because you follow his advice
<becom33> shevy, :/
ananthakumaran2 has joined #ruby
<shevy> you can't expect of others to deal with things others say
<shevy> for instance when someone else recommends RVM, I provide no help to that. it's the responsibility of whoever suggested that to stick up to it
<becom33> ok ok I just canceled in the installation . it didnt yet
<shevy> :D
<becom33> didnt install yet. it was just downloading
<shevy> but you wrote you are updating!
<shevy> :P
ananthakumaran has quit [Ping timeout: 244 seconds]
<shevy> admit it, now you try to play clever, and just wait to upgrade at a later time ;)
Ontolog has quit [Read error: Connection reset by peer]
<shevy> becom33, for web_foundation I use this main file right now: http://pastie.org/3934532
Ontolog has joined #ruby
<shevy> in my new projects though, I tend to put all require files into their own directory , or at least into one file
<shevy> usually I call it requires.rb or something like that
Ontolog has quit [Read error: Connection reset by peer]
<becom33> i see
Ontolog has joined #ruby
<shevy> I think the name requires.rb or something else is better
<becom33> shevy, btw if i just do require 'lib/prompt' would it work in the lastest versions ?
nicoulaj has joined #ruby
<shevy> it should work yes
<shevy> wait
<shevy> in which file actually
<shevy> if you start irb, then this should suffice:
<shevy> require 'prompt'
<shevy> that is the whole point of doing that, really
Yarou has quit [Ping timeout: 244 seconds]
<shevy> if you write into lib/prompt.rb however, you need to call the specific .rb files you wanna load
<pridian> Hi, I was just wondering where Ruby falls in it's capablilites relative to a language like C# or Java? I'm considering learning it and I'd like to get a better idea of what it can or can't do before I do.
<shevy> look at how pry.rb does it becom33
<becom33> wait lemme see
<shevy> pry.rb loads up these files: http://pastie.org/3934542
ananthakumaran1 has quit [Ping timeout: 276 seconds]
<becom33> hold on
<shevy> so you see, your main .rb file loads (or calls) to the other files
<shevy> you will see that for basically ALL other projects too
neersighted is now known as neersighte[d]
<shevy> pridian there really is not much that you can do in C# or java, that can't be done in ruby
<Hanmac> pridian: ruby is not so fast like compiled stuff like C# or java ... but imo you can do more evil stuff with ruby then with c# or javca
<shevy> pridian, but ruby will never be as fast as these languages either
<becom33> shevy, so my prompt is in lib .
<becom33> can I just do require 'prompt'
<shevy> so it's a tradeoff you have. it is easier to write ruby code though, less to type etc...
<shevy> becom33, try it!!!
<shevy> if you are in the same directory
<shevy> then require 'prompt' should first try to load a prompt.rb
<becom33> no Im not
<shevy> well
<shevy> then you must install the project first into your SITE_DIR
<pridian> Hanmac: what do you mean by more evil stuff? :)
<becom33> SITE_DIR ?
<shevy> alias rinstall2='cpruby;ruby setup.rb config;ruby setup.rb setup;ruby setup.rb install; rm setup.rb; rm InstalledFiles; rm .config'
<shevy> yeah
<becom33> shevy, its not a web project :/
<shevy> alias r2=rinstall2
<shevy> it does not matter what kind of project it is!
<shevy> becom33, when you do "gem install foo", it gets installed into the proper path
<shevy> look at what ruby by default brings you becom33
<shevy> for instance, in /Programs/Ruby/Current/lib/ruby/1.8/ I have ... yaml/ and yaml.rb
<becom33> shevy, :/ i think you misundertud bro. Im writing a simple framework for a tool . Im not just going to put the framework
<shevy> I have webrick/ and webrick.rb
<pridian> shevy: so can it ever be used for enterpise multithreading web applications? or will Java and C# always be better for that?
<shevy> becom33, it does not matter what you write! is it a ruby project - yes or no? if yes, then YES you need to install it into site dir
<becom33> shevy,
<becom33> wait
<shevy> pridian hmm I dont have much experience with multithreaded ruby code
Corey has joined #ruby
<shevy> pridian, I think if you want "enterpise multithreading web applications" you want to go the compiled route anyway though
<shevy> btw, *enterprise pridian ;)
<becom33> what do you mean site dir ?
banisterfiend has quit [Read error: Connection reset by peer]
<shevy> becom33 ruby has a base dir, ok?
<shevy> people must install ruby on their machine
<shevy> yes?
<becom33> yes
<shevy> it is not cloud computing yet :)
<shevy> ok good
<shevy> and that site dir is the base for ruby
<becom33> I see
<shevy> it's also what is searched through $:
<shevy> becom33, start irb
ABK has quit [Read error: Connection reset by peer]
<shevy> do require 'pp', then pp $:
<becom33> ok
<shevy> then you will see what ruby tends to search through
<shevy> the last entry here for me is the site dir:
ABK has joined #ruby
<shevy> well
<shevy> almost...
<shevy> /Programs/Ruby/1.8.7p358/lib/ruby/site_ruby/1.8
<becom33> SyntaxError: compile error
<shevy> what did you type man
<shevy> it works here for me...
<becom33> lol I wrote "then pp $:"
<becom33> ha ha "then"
<pridian> shevy: lol. so why are sites like Twitter and Hulu using ROR? Wouldn't a web framework that allows for multithreading be more efficient?
<becom33> yes I see the paths
<shevy> pridian, I thought twitter switched to java already
<shevy> pridian, ruby allows you to write much much much faster
adambeynon has joined #ruby
<shevy> you have an idea, you turn it into a ruby project quickly
<RurouniJones> pridian: RoR is threadsafe
<shevy> pridian, I dont know if it would be "more efficient". ruby for the most part works really well
Corey has quit [Client Quit]
<shevy> ok becom33
<RurouniJones> if you want a threadsafe RoR using multiple real threads then use JRuby
<becom33> wait wait
<shevy> becom33, notice that they all have lib/ruby/ in it
Corey has joined #ruby
<shevy> if you go there, you will see LOTS of projects and files
banisterfiend has joined #ruby
<becom33> i see
<shevy> the projects I install, for instance, web_foundation
<shevy> reside at:
<pridian> shevy: did Twitter explain why they switched to Java?
<shevy> /Programs/Ruby/Current/lib/ruby/site_ruby/1.8/web_foundation/
<shevy> becom33, for you that path is probably different
<shevy> pridian, there was a talk... I forgot the name. if I remember, it was that they need to scale and had to use a faster language eventually
<shevy> but the whole "bootstrapping" was done in ruby code
<shevy> pridian, I think it was a google tech talk
<becom33> shevy,
<shevy> becom33 I hate that ;)
<shevy> becom33, I show you what this gives on my system
<shevy> becom33, http://pastie.org/3934566
<shevy> becom33 on your system, for some reason, you use both /usr/lib and /usr/local/lib
<shevy> that would confuse me to no ends
kil0byte has joined #ruby
ABK has quit [Read error: Connection reset by peer]
L-----D has quit [Ping timeout: 252 seconds]
<pridian> shevy: have you had any experience with the java community? so far I've been digging ROR for that reason alone, but my degree is leading me down the road of multithreaded apps so I might as well bank off of that knowledge.
ABK has joined #ruby
<becom33> shevy, I dont know about much configarations
<RurouniJones> pridian: you seem to be conflating ruby the language and RoR the framework
<RurouniJones> They are quite separate
Choobie has quit [Ping timeout: 246 seconds]
<shevy> pridian nope, I dont have any experience with java nor the community. java is way too verbose for my taste too, and I use ruby for all my projects since 7 years or some such
<RurouniJones> RoR is threadsafe, no problem. Ruby the language does not support native threads.
<RurouniJones> Unless you use Jruby (Ruby that compiles to the JVM)
<shevy> pridian, I also dont use RoR ;) all my web stuff is in ruby though
<RurouniJones> Maybe the other implementations also do it but JRuby probably the btest
Eldariof27-ru has quit []
<shevy> becom33 yeah I have no idea either. I would however always remove those ruby, and then compile from source
<shevy> by default compile into /usr prefix
<shevy> my brain just does not accept that ruby is split in any way into /usr/lib and /usr/local/lib
<becom33> shevy, he he
<shevy> anyway becom33 "/usr/local/lib/site_ruby" should be your site ruby dir
<pridian> thanks for your help
<shevy> if you install your project, it will probably end up there
<pridian> bye
pridian has left #ruby ["Leaving"]
<shevy> or rather
<shevy> site_ruby/1.8/YOUR_PROJECT_NAME
<RurouniJones> If you are on a linux system then install the ruby that came with the system
<shevy> there /usr/local/lib/site_ruby/1.8/YOUR_PROJECT_NAME
<RurouniJones> Then use RVM to install the other various versions
<RurouniJones> (Heck, with RVM you dont even need your system ruby but it is a nice backup)
<becom33> shevy, I see
<shevy> becom33 you could use RVM and ask RurouniJones how to use it :)
<becom33> sure shevy . but I need to do the coding first :/
<shevy> hehehe
<shevy> yeah
<shevy> go and install your project man
<shevy> or try on a smaller project
<shevy> when you did this ONCE on your own
<shevy> you will understand it all suddenly
zeromodulus has quit [Ping timeout: 244 seconds]
indeterminate has joined #ruby
<becom33> shevy, do you mind . I'll keep writing my codes and I'll show you what i've done in gits ?
banisterfiend has quit [Read error: Connection reset by peer]
dhaskew_ has joined #ruby
dhaskew has quit [Read error: Connection reset by peer]
dhaskew_ is now known as dhaskew
mdw has quit [Remote host closed the connection]
<shevy> becom33 you can paste here in #ruby
<shevy> I have to go shopping now though, sorry
<becom33> shevy, its alright . you have funn
sei has quit [Ping timeout: 246 seconds]
dhaskew has quit [Read error: Connection reset by peer]
dhaskew has joined #ruby
mdw has joined #ruby
burgestrand1 has joined #ruby
pietr0 has joined #ruby
banisterfiend has joined #ruby
cantonic has joined #ruby
burgestrand has quit [Ping timeout: 250 seconds]
sei has joined #ruby
visof has quit [Ping timeout: 246 seconds]
indeterminate has quit [Ping timeout: 256 seconds]
fivetwentysix has quit [Quit: fivetwentysix]
c0rn has quit []
zeromodulus has joined #ruby
danguita has quit [Ping timeout: 260 seconds]
berkes has joined #ruby
berkes has quit [Max SendQ exceeded]
berkes has joined #ruby
berkes has quit [Max SendQ exceeded]
lkba has quit [Ping timeout: 240 seconds]
berkes has joined #ruby
berkes has quit [Max SendQ exceeded]
berkes has joined #ruby
ctp has joined #ruby
d3c has quit [Ping timeout: 248 seconds]
ermines has joined #ruby
weasels has quit [Read error: Connection reset by peer]
DMKE has joined #ruby
ronniy has joined #ruby
dbgster has joined #ruby
jbw has quit [Ping timeout: 265 seconds]
ctp has quit [Client Quit]
ctp_ has joined #ruby
Foxandxss has joined #ruby
schovi has joined #ruby
xhh has quit [Quit: xhh]
ctp_ has quit [Client Quit]
Ontolog has quit [Remote host closed the connection]
keanehsia has quit [Read error: Connection reset by peer]
keanehsiao has quit [Read error: Connection reset by peer]
rdegraci has joined #ruby
jbw has joined #ruby
A1241 has joined #ruby
azm has joined #ruby
IanV has joined #ruby
adambeynon has quit [Read error: Connection reset by peer]
adambeynon_ has joined #ruby
A1241 has left #ruby [#ruby]
niklasb has joined #ruby
<IanV> hiya ppl! I have a question regarding parsing a CSV file, Im getting a exception MalforedCSVError, mainly due to the file containing many different encoded chars I believe. im using ruby 1.9.3p-125, standard CSV . I dont care that it raised the excpetion, what I want to be able to do is continue reading the file, but how can that be done in a foreach block?
ctp_ has joined #ruby
berkes has quit [Quit: Ex-Chat]
xhh has joined #ruby
khakimov has joined #ruby
ctp_ has quit [Client Quit]
schovi_ has joined #ruby
nari__ has joined #ruby
yankov has joined #ruby
rdegraci has quit [Quit: rdegraci]
schovi has quit [Ping timeout: 250 seconds]
<shevy> IanV do you rescue the exception
<IanV> not yet, as I was thinking if I did, how could I continue? code would be "CSV.foreach......do block; end; rescue" how could I get the CSV foreach to continue?
<IanV> ie, I dont know where to put a rescue that would allow the loop to continue?
<becom33> shevy, I thought you went shopping ?
fixl has joined #ruby
<shevy> becom33 I am back, I have to walk only ~3 minutes
<becom33> shevy, aghh alright . good thing your back In stuck with a logic issue
<Hanmac> he lives over the shop
<shevy> hey, in the middle of vienna you kinda have shops all around you
<becom33> do you remember I used .send to call methods and pass argivments method ?
vjt has quit [Ping timeout: 272 seconds]
<shevy> ewwww .send
<becom33> shevy, thats how I used my commands
<shevy> I once used .send together with .method_missing
vjt has joined #ruby
<shevy> in my opinion it just promotes fragile design
<becom33> so now I was thinking write a each class for a command
<shevy> IanV, you miss the keyword "begin"
<shevy> IanV, if you do "1 / 0" you would get an error like ZeroDivisionError: divided by 0
<shevy> to begin rescue that you can do
<IanV> well., from my little eg above yes, but I do have it in code
<shevy> begin; 1 / 0; rescue; puts 'Oh no, pink ponies to Infinity!'; end
zeddy253 has joined #ruby
<shevy> if you use begin/rescue, the loop does not continue??
<IanV> my question is, once I've caught it, I want to just igore the erorr and carry on the foreach, but the rescue is outside the foreach
<Hanmac> you must use begin and rescure inside the loop
<banisterfiend> shevy: how's your evening
<shevy> banisterfiend, I just ate cheese which was bad :(
<becom33> so whateva I have to do when the command is given will be done inside tge class . I have two problems now . one is I dont know how can I identify the commands coz those deffent deffent classes and the second thing . I hate write "help" command so when I ever i write class for a command it should automatically generate a help
xhh has quit [Quit: xhh]
<shevy> it's 12:27 here though
<IanV> ok, i'll move it and try that, I didnt think that would work... brb...
<becom33> shevy,
<shevy> becom33 cant you just use an array
<shevy> in that array register all your classes
<shevy> and whenever you have to display help, that array has stored all your things
<shevy> and you can use .each on it
<banisterfiend> shevy: you shouldn't eat anything, you're too fat already
<shevy> banisterfiend, true but I lost pounds the last weeks
<shevy> until I go to bed today I may not eat anything
<banisterfiend> shevy: how much do u weigh now
<shevy> you'll laugh :(
<banisterfiend> shevy: tell me
<becom33> shevy, yes thats what I was thinking use a array , use accessor . but how'd i send commands to each array coz some commands need pass argivements
<IanV> yeah, didnt think that would work! the foreach is raising the error, not the use of any data within the block! so I need to rescue the foreach, which of course then is outside the block, ie has exited the loop!
<becom33> shevy, lemme code somthing and let you know . talking is useless . lets see if it works
pridian has joined #ruby
pridian has quit [Quit: Leaving]
<shevy> becom33 I think you are doing this all very strangely
<becom33> shevy, why ? well i do have another idea . use methods as command before . just use array to store commands and discription on each method
<becom33> shevy, if you have better idea please shoot
<shevy> use methods as command?
fridim_ has joined #ruby
<becom33> yea like before
deobald__ has joined #ruby
<shevy> well
<becom33> def banner
<becom33> puts "this is banner"
<becom33> end
<becom33> myframework> banner |
<becom33> this is banner
xhh has joined #ruby
visof has joined #ruby
visof has quit [Changing host]
visof has joined #ruby
<shevy> becom33, run this http://pastie.org/3934797
<shevy> then type in "banner"
<shevy> and it calls banner
d3c has joined #ruby
<shevy> becom33, same thing here: http://pastie.org/3934797
<becom33> hold on lemme see
<shevy> this time with an included module
<shevy> type in "test" and it works
<becom33> :)
<shevy> what
<becom33> shevy, both of your posts are the same :/
<shevy> I updated it already
<shevy> remove the module and test it
yugui_zzz is now known as yugui
<shevy> also, I think that code solved your problem
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
<becom33> shevy, yea gimme few minits alright ?
IPGlider has joined #ruby
zeddy253 has quit [Quit: zeddy253]
yugui is now known as yugui_zzz
troessner has joined #ruby
<becom33> shevy, yep I think this will prtty much solves my problem
zeddy253 has joined #ruby
<shevy> becom33 if you need more modules, simply include them
<shevy> or, use .extend, and a method on startup to load these all
<becom33> shevy, yep I got it .
<shevy> but I myself would not do that. I dont like using modules
<shevy> they still feel like crippled classes to me
fangwen has joined #ruby
<becom33> shevy, can we use classes instend of modules ?
Eldariof-ru has joined #ruby
zeddy253 has quit [Client Quit]
<shevy> becom33 not always
<shevy> behaviours can only be reused via subclassing
<shevy> with modules you can extend some functionality, i.e. by adding new methods to your class
<becom33> shevy, i see . with this method Im gonna have to write a method load all the modules from dir's at once
petercs has quit [Ping timeout: 252 seconds]
<becom33> so my modules will be in lib/modules/**_module.rb is that alright
<shevy> sure
<shevy> it's your structure ;)
<shevy> via Dir['lib/modules/**_module.rb'] you should be able to fetch these
Solnse has quit []
<becom33> shevy, I forgot to grab your link ruby framework structure
Tuxist has joined #ruby
<shevy> it is old but useful to know
<shevy> perl has a site_dir too
<shevy> "site_perl"
<becom33> ok thanks
<banisterfiend> shevy: i'll have what she's having
<shevy> btw becom33 you can query things without irb too
<shevy> ruby -e 'p $LOAD_PATH'
<shevy> from the commandline directly
<becom33> aghh i see :)
jackiechan0 has joined #ruby
grieve has quit [Quit: ZNC - http://znc.in]
lupine_85 has quit [Changing host]
lupine_85 has joined #ruby
zastaph has joined #ruby
yugui_zzz is now known as yugui
diegok has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
yankov has quit [Quit: yankov]
kil0byte has quit [Remote host closed the connection]
BeLucid has quit [Read error: Operation timed out]
BeLucid has joined #ruby
twinturbo has joined #ruby
<twinturbo> Hey, what can I use to write a terminal program?
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
zeromodulus has quit [Remote host closed the connection]
<Hanmac> twinturbo: ruby?
<twinturbo> well, yes I know that. I should've been more specific. I'm looking for a gem to help make a text based UI (similar to ncurses)
Targen has quit [Ping timeout: 240 seconds]
<Hanmac> twinturbo, it exist an gem that binds ncurses to ruby
khakimov has quit [Quit: Computer has gone to sleep.]
tchebb has quit [Quit: Leaving.]
jimeh2 has joined #ruby
dbgster has quit [Quit: dbgster]
xhh has quit [Quit: xhh]
tchebb has joined #ruby
nari__ has quit [Ping timeout: 265 seconds]
iocor has joined #ruby
ABK has quit [Ping timeout: 244 seconds]
berserkr has joined #ruby
jimeh2 has quit [Ping timeout: 260 seconds]
mdw has quit [Remote host closed the connection]
sandGorgon has joined #ruby
ABK has joined #ruby
ZachBeta has joined #ruby
<twinturbo> Hanmac: I believe that's what I want. I want to display some progress bars and live updating values in the terminal. Not 100% if ncurses is what I need
quuxman has joined #ruby
<quuxman> Anybody here use the sass library for compiling css?
Beoran__ has quit [Ping timeout: 245 seconds]
<Hanmac> ... be caeful there might be a patent of ProgressBars :P
<twinturbo> so i've learned
visof has quit [Ping timeout: 246 seconds]
tayy has quit [Remote host closed the connection]
mneorr has joined #ruby
looopy has quit [Read error: Connection reset by peer]
looopy has joined #ruby
Headie has joined #ruby
tomb_ has joined #ruby
ABK has quit [Read error: Connection reset by peer]
Headie has quit [Client Quit]
ABK has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
rookfood has joined #ruby
Headie has joined #ruby
weasels has joined #ruby
Headie is now known as skogis
ermines has quit [Read error: Connection reset by peer]
skogis has quit [Client Quit]
Headie has joined #ruby
Headie has quit [Client Quit]
Beoran__ has joined #ruby
skogis has joined #ruby
ABK has quit [Ping timeout: 248 seconds]
Foxandxss has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
netogallo has quit [Ping timeout: 252 seconds]
ABK has joined #ruby
deobald__ has quit [Ping timeout: 260 seconds]
cdepue has joined #ruby
ABK has quit [Read error: Connection reset by peer]
skogis has quit [Quit: brb]
skogis has joined #ruby
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
snearch has joined #ruby
dhaskew has quit [Read error: Connection reset by peer]
dhaskew has joined #ruby
ping-pong has quit [Read error: Operation timed out]
dhaskew_ has joined #ruby
dhaskew has quit [Read error: Connection reset by peer]
dhaskew_ is now known as dhaskew
mneorr has quit [Remote host closed the connection]
tvw has quit [Remote host closed the connection]
mneorr has joined #ruby
mneorr has quit [Remote host closed the connection]
jobicoppola has joined #ruby
tommyvyo has joined #ruby
jackiechan0 has quit [Quit: Sto andando via]
dhaskew has quit [Ping timeout: 276 seconds]
RegEchse has joined #ruby
diegoviola has quit [Ping timeout: 265 seconds]
tommyvyo has quit [Client Quit]
<shevy> twinturbo problem is that curses is really horrible
<shevy> it's no fun to deal with it
<shevy> twinturbo, http://pastie.org/3935053 try this
ABK has joined #ruby
ping-pong has joined #ruby
Morkel has joined #ruby
ABK has quit [Ping timeout: 240 seconds]
ABK has joined #ruby
fangwen has quit [Quit: Page closed]
danguita has joined #ruby
madscientist_ has joined #ruby
<twinturbo> gah
ABK has quit [Read error: Connection reset by peer]
<twinturbo> ok, maybe i'll do something else :D
weasels has quit [Read error: Connection reset by peer]
otters has joined #ruby
troessner has quit [Ping timeout: 246 seconds]
liluo has joined #ruby
ronniy has quit [Ping timeout: 250 seconds]
TheHunter_1039 has joined #ruby
kil0byte has joined #ruby
kil0byte has quit [Remote host closed the connection]
ronniy has joined #ruby
kil0byte has joined #ruby
dataer has joined #ruby
jcromartie has joined #ruby
schovi_ has quit [Read error: Connection reset by peer]
sohocoke has joined #ruby
<shevy> twinturbo you need to have worked through it at least once on your own, to really appreciate why the name is used for "cursing" :)
<shevy> hmm
<shevy> is there a mini ruby IRC library
<shevy> that allows me to connect to a channel like #ruby, from i.e. xterm ?
TheNumb has quit [Changing host]
TheNumb has joined #ruby
<madscientist_> its really easy to write it on your own D:
<madscientist_> search for ruby irc bot snippet on google i based mine off that
jackiechan0 has joined #ruby
yugui is now known as yugui_zzz
schovi has joined #ruby
jackiechan has joined #ruby
jackiechan0 has quit [Ping timeout: 245 seconds]
jackiechan0 has joined #ruby
gosshedd has quit [Quit: leaving]
danguita has quit [Ping timeout: 256 seconds]
<apeiros_> madscientist_: if it's that one from dpaste - that's horrible code
<madscientist_> may be
<madscientist_> i abandoned the regexes by now anyway
altious has joined #ruby
<madscientist_> wrote a parser for incoming irc stuff
sparrovv has quit [Ping timeout: 240 seconds]
<apeiros_> based on the rfc?
<madscientist_> okay, maybe tokenizer is the better word
<madscientist_> sorry :P
jackiechan has quit [Ping timeout: 245 seconds]
<apeiros_> hm? I mean whether you're parsing/tokenizing according to the rfc's, and if so, 1459 and/or 2812?
mdw has joined #ruby
<shevy> hmm
gmci has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<madscientist_> hum, i just looked at all the stuff incoming from irc and devised a way to split it up so that it makes sense frankly
<shevy> in my pseudo shell, I want to use something like "connect", connect to #ruby by default (or any other default, configurable setting), ask some questions, then disconnect again and drop back to the pseudo-shell
nicoulaj has quit [Remote host closed the connection]
<shevy> I once wrote an IRC bot too, but that code is so ancient. I am scared just by looking at it alone :(
* apeiros_ thinks most irc clients were created that way - which is why there's a ton of broken irc clients…
altious has quit [Ping timeout: 246 seconds]
<madscientist_> ;o
jimeh2 has joined #ruby
<shevy> yeah
<shevy> it's kind of strange IMHO
<shevy> ruby makes it easy to create something like that with a little bit of work
schaerli has joined #ruby
<shevy> but high quality, reusable libraries seem to be rare
netogallo has joined #ruby
weasels has joined #ruby
otters has quit [Read error: Connection reset by peer]
<quuxman> how do I do a dictionary lookup that generates an exception if the key doesn't exist?
<banisterfiend> quuxman: fetch
ZachBeta has quit [Quit: Computer has gone to sleep.]
<quuxman> banisterfiend: thanks... is there a way to get the interpreter to print the value of the key along with the "key not found" exception?
<banisterfiend> quuxman: Maybe
jackiechan0 has quit [Quit: Sto andando via]
<quuxman> how do I raise an exception with a custom message?
jackiechan0 has joined #ruby
<quuxman> scratch that, I can look that up
heftig has joined #ruby
Shoobdidoo has joined #ruby
_md has joined #ruby
Shoobdidoo has quit [Client Quit]
<Alantas> Pass a block to the 'fetch', and it'll yield the failed key, from which you can raise your exception.
Jrz has joined #ruby
fr0gprince_mac has joined #ruby
sandGorgon has quit [Ping timeout: 246 seconds]
L-----D has joined #ruby
jackiechan0 has quit [Client Quit]
jackiechan0 has joined #ruby
<quuxman> Alantas: that is far too complex for me. I just wrapped it in a begin / rescue clause
<Alantas> result = table.fetch("word") { |failed_word| raise "Key \"#{failed_word}\" not found }
skogis has quit [Quit: leaving]
Chryson has joined #ruby
_md has quit [Client Quit]
<Alantas> * not found" }
mpereira has joined #ruby
skogis has joined #ruby
mxweas has quit [Ping timeout: 272 seconds]
<quuxman> Alantas: ah cool
<quuxman> ruby is so much more concise than Python
<weasels> and so much less ugly
<shevy> often
<quuxman> looks like there's some correspondance between blocks and perl's $_
jobicoppola has quit [Quit: Computer has gone to sleep.]
skogis has quit [Client Quit]
sandGorgon has joined #ruby
mxweas has joined #ruby
<quuxman> sort of.. it's more like an optional argument
<quuxman> can any function accept a block?
<Alantas> I guess so? But blocks are more general, and can be passed to any method, not just specially-designated ones.
<quuxman> how does fetch pass |failed_word| ?
<Alantas> yield
skogis has joined #ruby
<quuxman> which I assume is basically like Python's yield?
<Alantas> (From within a method, 'yield whatever' will invoke the block with that argument.)
<Alantas> I dunno. Ruby's came first. :P
<quuxman> what if there is no yield?
skogis has quit [Client Quit]
<Alantas> Then the block isn't executed. Like in the table.fetch example I gave: if the key *was* found, it will simply be returned and the block not run.
skogis has joined #ruby
jackiechan0 has quit [Ping timeout: 248 seconds]
<quuxman> well in python yield returns a generator
<Mon_Ouie> Also, a block can be stored in a variable for later use — instead of being called directly.
<quuxman> and presumably in Ruby, the generator takes the form of an anonymous function that accepts a block, instead of an ojbect like in Python
<quuxman> is a block just an anonymous function?
<Alantas> Aye. Useful for event handlers. button.when_clicked { puts "I have been clicked" }
<Alantas> quuxman: Pretty much.
<quuxman> sounds like there are subtle differences
<Mon_Ouie> Ruby has Enumerator, which I believe is like the Python feature you're describing
<Alantas> There's no "generators", though; it's basically just a special argument.
<quuxman> enumerators and generators are different things in python
<Alantas> (There are 'enumerators', though, which some methods might return if not passed a block when they normally would get a block, but that's another matter.)
<Mon_Ouie> fibo = Enumerator.new { |y| a, b = 0, 1; loop { y << a; a, b = b, a + b } }
<Alantas> In my experience, they're mostly useful for stacking iterators, like array.each_with_index.map { |item, index| ... }
<Mon_Ouie> fibo.take 10
heftig_ has joined #ruby
<quuxman> Anybody here use sass?
<Alantas> Another handy use is for things like File.open("filename") { |filehandle| ... } -- File.open will open the file, yield it, then close it after the block is run, so you don't have to.
<banisterfiend> quuxman: Mon_Ouie's example is analogous to a generate in python
<banisterfiend> generator
googya has joined #ruby
keanehsiao has joined #ruby
<Alantas> If you call a method like 'each' without passing a block, it typically returns an Enumerator. Otherwise, it just yields to the block as usual, no enumerator/generator needed.
<Alantas> (It's not automatic; the method has to make a point of doing it. But it's commonly done.)
<quuxman> huh
becom33 has quit [Ping timeout: 276 seconds]
<quuxman> does yield return a continuation?
codefarmer has joined #ruby
inteq has quit [Ping timeout: 244 seconds]
becom33 has joined #ruby
<Alantas> No. It just invokes the block.
heftig has quit [Ping timeout: 265 seconds]
weasels has quit [Read error: Connection reset by peer]
otters has joined #ruby
Eldariof59-ru has joined #ruby
<Alantas> That fetch() example might be done as: def fetch(key); if key?(key) then return self[key] else yield key end; end
liluo has quit [Remote host closed the connection]
<quuxman> ah ok. So it's sort of like just having two different return paths
<Alantas> I dunno if this'll make it clearer, but: def fetch(key, &block); if key?(key) then return self[key]; else block.call(key); end; end
<Mon_Ouie> yield returns the result of the block (like block.call in the above example)
<Alantas> Sorta; yielding doesn't trigger a return, it's more like calling a method.
wmoxam has joined #ruby
<Alantas> Methods like 'each' will yield to the block multiple times (once for each item), for example.
<quuxman> man that's bizarre
<quuxman> it's an implicit function argument
<quuxman> or, just a funny syntax for passing a lambda
<Alantas> Pretty much, yeah. Like an anonymous callback.
<banisterfiend> quuxman: exactly, and the cool thing about it, is it's passed outside the parameter list
<banisterfiend> quuxman: so you can define what look like new control structures i.e: my_if(condition) { }
<Alantas> The "&block" thing allows the method to (also) receive it as a Proc object that it can store or call out to or do other things with. But normally it's implicit.
<banisterfiend> quuxman: in fact, even the 'loop' construct in Ruby, is actually just a method that takes a block
<banisterfiend> quuxman: loop { puts "hi" }
Eldariof-ru has quit [Ping timeout: 265 seconds]
<Alantas> Yep. That might be implemented with something like: def loop; yield while true; end
<quuxman> right. It gets around the issue of evaluation order and special forms in scheme
<Hanmac> you can use & for many funny things like
<Hanmac> [1,2,3,4].map(&:to_s) # => ["1","2","3","4"]
schovi has quit [Read error: Connection reset by peer]
<banisterfiend> Hanmac: dont start on that yet :P
jackiechan0 has joined #ruby
<Hanmac> or Dir["*"].map(&File.method(:size)).inject(:+)
<banisterfiend> quuxman: much nicer than ugly obj-c 'blocks' (which are passed INSIDE the parameter list) i.e: dispatch_async(my_queue, ^{ ..my block content });
<banisterfiend> in ruby that would look like: dispatch_async(my_queue) { ..my block stuff }
<quuxman> don't know obj-c.. my background is C, perl, JavaScript, scheme, Haskell, Python...
kenperkins has joined #ruby
<quuxman> Hanmac: do'n know what '&' does
<Hanmac> it itsnt obj-c, that what i post is valid ruby
<Alantas> The & is kinda an advanced thing. Heh.
<banisterfiend> quuxman: you don't want to know about it yet, Hanmac is silly to bring that up now
<Hanmac> &obj before an object is similar to obj.to_proc
<Alantas> [1,2,3,4].map(&:to_s) is shorthand for: [1,2,3,4].map{|i| i.to_s}
<quuxman> reminds me of Perl's sigils. I'm sure they're entirely different, but man it took me forever to figure out the difference betweenn a list and an array in perl :-P
<Alantas> Basically, it returns a new array consisting of the original array, with the items replaced by the result of calling to_s on them.
perryh is now known as perryh_away
<quuxman> Alantas: not too advanced... just shorthand for calling a method
<Alantas> In the context of a block, yeah.
banisterfiend has quit [Read error: Connection reset by peer]
jcromartie has quit [Quit: jcromartie]
seanstickle has joined #ruby
adambeynon_ has quit [Quit: adambeynon_]
<quuxman> looks like ^ is some sort of special prefix thing too
<quuxman> anyway, I'm trying to figure out this exception from sass...
<Alantas> That's from the Objective-C example, not Ruby.
<quuxman> oh, duh
mrwalker has joined #ruby
banisterfiend has joined #ruby
<quuxman> error: stderr=TypeError: can't convert Sass::Script::String into String
<Mon_Ouie> Btw, Ruby has sigils, but they indicate variable scope rather than data type
<quuxman> if I just pass a regular string in there, it works
<Mon_Ouie> (@foo for ivar, $foo for globals, …)
<quuxman> Mon_Ouie: sort of like CoffeeScript?
codebeaker has joined #ruby
<Mon_Ouie> I don't know CoffeScript, but I'd guess so
sandGorgon has quit [Ping timeout: 246 seconds]
<quuxman> well, it only has one sigil, '@', which is overloaded to refer to lexical or object scope, depending on the block syntax. Kinda weird
<quuxman> actually, that's not quite it.
<Alantas> @foo means the same thing as syntax such as "this->foo" in other languages.
schovi has joined #ruby
<quuxman> in ruby?
<Alantas> Yeah, "@foo" in Ruby.
<quuxman> that's where CoffeeScript got that I presume
<Alantas> Wikipedia lists Ruby as one of the languages CoffeeScript was influenced by. So, perhaps.
<quuxman> any clues on that exception?
<Alantas> What line is it reporting the exception from?
L-----D has quit [Quit: Leaving]
philcrissman has joined #ruby
<quuxman> don't know, don't have a traceback
<quuxman> this code is being called from sass, which is called from the sass binary, which is called from a python library called webassets, which is being called by my code
skogis has quit [Quit: leaving]
<quuxman> I don't even know where to add the --trace argument
<quuxman> kind of a ridiculous toolchain, but all the python libraries for css compilation kinda sucked
skogis has joined #ruby
<Hanmac> quuxman: sass has also an commandline tool ... try to call it directly
skogis has quit [Client Quit]
Gavilan has quit [Read error: Connection reset by peer]
dhaskew has joined #ruby
<quuxman> Hanmac: it has who knows what kind of path problems
altious has joined #ruby
kil0byte has quit [Remote host closed the connection]
<quuxman> Alantas: It colud be line 7. ALl I know is if I pass just a literal string, it works
kil0byte has joined #ruby
<quuxman> like "Sass::Script::String.new('mrow')" works fine
sepp2k has joined #ruby
<Alantas> Well, that Paths.fetch(name) is probably returning whatever it is that's causing the error.
<Alantas> Wonder why a class named after strings doesn't have a to_s. ¬_¬
sandGorgon has joined #ruby
wmoxam has quit [Ping timeout: 248 seconds]
twinturbo has quit [Quit: twinturbo]
danguita has joined #ruby
<Hanmac> Alantas: maybe it has but by + you need to call to_s yourself
<quuxman> Perhaps the problem is I'm capitalizing that constant?
<Alantas> Well, the exception says "Can't convert Sass::Something::String to String", meaning it's at least trying to.
<Alantas> Try: Sass::Script::String.new("url(\"#{Paths.fetch(name)}\")")
Gavilan has joined #ruby
<Alantas> A rare example of the interpolation syntax making it *harder* to read, but, if it supports stringification at all, that should do it.
otters has quit [Read error: Connection reset by peer]
weasels has joined #ruby
<banisterfiend> d
<Alantas> If their String doesn't support being treated like a String, then I'd have to question the wisdom of using their library.
ZachBeta has joined #ruby
<Hanmac> Alantas: there is a difference between to_s and to_str
fixl has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<quuxman> that's my name... I think I just mistakenly capitalized it
jwbuurlage has joined #ruby
<quuxman> here it is with the require inlined: https://gist.github.com/2730849
<Alantas> That 'paths' won't be visible within the method.
<quuxman> oh, so it's nil
<quuxman> no wonder
<quuxman> that should generate a name exception
<quuxman> how do I get it into my scope?
skogis has joined #ruby
<Alantas> Pass it to the method.
skogis has quit [Client Quit]
<Alantas> Or define it as a constant within HiveAssets.
<quuxman> how? asset_url needs to have one argument... as in paths = paths?
<Alantas> module HiveAssets; Paths = { 'herp' => 'derp' }
<quuxman> can paths be capitalized? Should it be?
<Alantas> then use Paths.fetch('herp')
<Alantas> Or fetch(name)
<quuxman> but I want it to come from another file, which I'm generating
<Alantas> A capitalized identifier means it's a constant.
<quuxman> ok, that's perfect
<Alantas> (Well, nominally a constant. You can still use mutators on it, it just means Ruby will bark at you if you try to reassign it. Hehe.)
netogallo has quit [Ping timeout: 276 seconds]
<Alantas> Well, if you want to read these from a file, open the file from within the script.
netogallo has joined #ruby
jeedey_ has quit [Read error: Operation timed out]
<topologist> echo $window
<Alantas> topologist: #php is just down the hall.
* Alantas ducks!
jwbuurlage has quit [Quit: jwbuurlage]
iamjarvo has joined #ruby
<topologist> perl actually, i just suck at irssi ;_;
otters has joined #ruby
rookfood has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
danguita has quit [Quit: leaving]
twinturbo has joined #ruby
netogallo has quit [Read error: Connection reset by peer]
weasels has quit [Read error: Connection reset by peer]
ctp_ has joined #ruby
jeedey has joined #ruby
<Alantas> The forward slash. A useful but treacherous ally.
ukwiz has quit [Quit: Leaving]
mrwalker has quit [Remote host closed the connection]
yoklov has joined #ruby
ping-pong has quit [Ping timeout: 245 seconds]
ctp_ has quit [Quit: Leaving...]
ZachBeta has quit [Quit: Computer has gone to sleep.]
ukwiz has joined #ruby
yugui_zzz is now known as yugui
jackiechan0 has quit [Ping timeout: 245 seconds]
kodcu has joined #ruby
<kodcu> hi
jackiechan0 has joined #ruby
<kodcu> Hi all
<Alantas> Greetings and salutations.
<kodcu> What is the future of Ruby
codebeaker has quit [Quit: codebeaker]
kodcu has left #ruby ["Leaving"]
cmarques has joined #ruby
<Alantas> To crush its enemies, see them driven before it, and to hear the lamentation of their users.
stardiviner has joined #ruby
ZachBeta has joined #ruby
philcrissman has quit [Remote host closed the connection]
jwbuurlage has joined #ruby
stardiviner has left #ruby ["WeeChat 0.3.7"]
jwbuurlage has quit [Client Quit]
mdw has quit [Remote host closed the connection]
macer1 has joined #ruby
macer1 has quit [Changing host]
macer1 has joined #ruby
<macer1> hi
<macer1> how to use https proxy in net:http?
altiouz has joined #ruby
ping-pong has joined #ruby
<Alantas> macer1: Combine the way of doing proxying with the way of doing https?
<macer1> the proxy protocol is https
<macer1> and I want to do http request using it
<macer1> hmm
cdepue_ has joined #ruby
altious has quit [Ping timeout: 248 seconds]
<macer1> anyway I am trying to use proxy(http proxy now) and it waits and prints my ip(trying to download cmyip.com) like there was no proxy active.
keanehsiao has quit [Quit: keanehsiao]
tayy has joined #ruby
cdepue has quit [Ping timeout: 246 seconds]
<Alantas> If you're on 1.9.3, Net::HTTP has a :use_ssl parameter that can invoke HTTPS, and the docs say that Net::HTTP::Proxy has the same methods as Net::HTTP proper.
<macer1> I tried this
<macer1> and it doesn't have it
demet8 has joined #ruby
<macer1> p = Net::HTTP::Proxy(proxy[:host], proxy[:port]); p.use_ssl = true
<macer1> like that
<macer1> but no method found...
punkrawkR has quit [Read error: Connection reset by peer]
<Alantas> The HTTPS stuff has the example: NET::HTTP.start(uri.host, uri.port, :use_ssl => true).start do |http|
punkrawkR has joined #ruby
kalleth_ has quit [Read error: Operation timed out]
<macer1> ok, start but start the connection to the page
<macer1> not the proxy
<Alantas> Oh, there's also a use_ssl=, like you trie.d
sc0_ has joined #ruby
<macer1> https proxy, http page
topologist has quit [Remote host closed the connection]
mdw has joined #ruby
kalleth_ has joined #ruby
thone_ has joined #ruby
<Alantas> What's version of Ruby you running? ("ruby -v" at the command line, or RUBY_VERSION within the language.)
sandGorgon has quit [Ping timeout: 252 seconds]
<macer1> the newest one
sc0 has quit [Ping timeout: 256 seconds]
<macer1> 1.9.3p194
<macer1> https://gist.github.com/7e735df81d7149da2b7f => fail, my ip displayed
xhh has joined #ruby
Morkel has quit [Quit: Morkel]
sandGorgon has joined #ruby
<Alantas> It's get('//') with two slashes?
<macer1> it can be "/" too
<macer1> still my ip :P
<Alantas> I think HTTP uses just "/" to represent the top level of a domain. "//" would be like fetching "example.com//"
<macer1> yeah, but it's fetching good anyway
<macer1> but my ip displayed which is weird
<Alantas> Does it work if you use a regular proxy, not https?
thone has quit [Ping timeout: 245 seconds]
<macer1> no
philcrissman has joined #ruby
cmarques has quit [Quit: Get MacIrssi - http://www.sysctl.co.uk/projects/macirssi/]
demet8 has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<macer1> it looks like connects
<macer1> but
<quuxman> Alantas: are you really suggesting I parse them from the file instead of just using require?
<macer1> when I change url to like blablabl;l;ad/, squid give me error page.
Chryson has quit [Quit: Leaving]
<macer1> maybe it's like squid sending X-Real-IP header?
mdw has quit [Read error: Connection reset by peer]
mdw has joined #ruby
<codefarmer> I have a simple array of numbers = [ 1, 3, 4, 6, 8, 9]. I would like to create a new_array of values based on an accuracy point.If the accuracy_point is 1, then new_array would look [ 1, 3, 4, 6, 8, 9]. If the accuracy_point is 3, then new_array would look [ 1, 3, 6, 9 ]. If the point is 5, then the array new_look [ 1, 5 ]. Does Ruby have anything standard to allow me to do this, or should i go ahead and write my own logic ? Are there any thi
<codefarmer> Ruby that may help with writting this ?
kenperkins has quit [Quit: Computer has gone to sleep.]
<Mon_Ouie> codefarmer: Enumerable#select
<codefarmer> tx ill have a look now
heftig_ is now known as heftig
pika_pika has joined #ruby
schovi has quit [Read error: Connection reset by peer]
<codefarmer> hmm, my question's data didn't cover all aspects. Enumerable#select selects items from within the array. However i would even need to create elements. so for example if the starting_array = [1, 3, 4, 5, 7, 9] and the accuracy_point is 2, then the new_array should = [ 1, 2, 4 ,6, 8, 10 ]
looopy has quit [Remote host closed the connection]
yugui is now known as yugui_zzz
<Mon_Ouie> Just use modulo to check for that
otters has quit [Read error: Connection reset by peer]
weasels has joined #ruby
<codefarmer> hmm tx i'll have a look at modulo now
td123 has joined #ruby
sandGorgon has quit [Ping timeout: 246 seconds]
KL-7 has joined #ruby
KL-7 has quit [Client Quit]
CheeToS has joined #ruby
Shamgar has quit [Read error: Operation timed out]
looopy has joined #ruby
mdw has quit [Ping timeout: 276 seconds]
zeromodulus has joined #ruby
emmanuelux has joined #ruby
mnaser has joined #ruby
mnaser has quit [Changing host]
mnaser has joined #ruby
cordoval has joined #ruby
jwbuurlage has joined #ruby
Vainoharhainen has joined #ruby
cordoval has left #ruby [#ruby]
macmartine has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
Norrin__ has joined #ruby
ZachBeta has joined #ruby
madscientist_ has quit [Quit: ChatZilla 0.9.88.2 [Firefox 9.0.1/20111220165912]]
rdegraci has joined #ruby
Shamgar has joined #ruby
minijupe has joined #ruby
Chiron has quit [Read error: Operation timed out]
Norrin_ has quit [Ping timeout: 245 seconds]
dhodgkin has joined #ruby
<becom33> http://pastie.org/3935754 with this I can load modules . but how I include it to work ?
<seanstickle> Recommend you use __FILE__ in your directory path in the code.
<seanstickle> Otherwise Dir will be running from the pwd of where it is included
<seanstickle> *pwd -> cwd
christianrojas has joined #ruby
<becom33> shevy, you here ?
<becom33> seanstickle, still how can Include the module ?
<seanstickle> Just require it.
<seanstickle> Perhaps I misunderstand the question.
LBRapid has quit [Quit: Computer has gone to sleep.]
tommyvyo has joined #ruby
indeterminate has joined #ruby
yankov has joined #ruby
andrewhl has joined #ruby
<shevy> becom33 didnt I show you before
<shevy> include NameOfModule
<shevy> if you work inside a class, use extend rather than include
<becom33> shevy, the problem here is the NameOfModule is changed everytime
<Tasser> becom33, require is for loading the files into the global namespace
sei has quit [Ping timeout: 260 seconds]
SeySayux has quit [Ping timeout: 260 seconds]
<Tasser> becom33, ehh wtf?
jetblack has quit [Quit: leaving]
<shevy> becom33 look. there are two ways.
<shevy> (a) you either know the name of your module.
<shevy> (b) you dont know the name of your module.
dnyy has quit [Remote host closed the connection]
<becom33> b
<shevy> if (b), then you can not use a module.
<shevy> good. you cant include a module if you dont know its name. end of story.
<Tasser> shevy, you can, if you have a variable containg that module
digitalcakestudi has joined #ruby
kalleth_ has quit [Ping timeout: 246 seconds]
petercs has joined #ruby
looopy has quit [Remote host closed the connection]
<shevy> he wrote he does not know the name of the module
oponder has joined #ruby
<Tasser> class Bar; mod = Module.new { def foo; :foo; end }; include mod; end
tommyvyo has quit [Ping timeout: 256 seconds]
<ged> becom33: Do you control the contents of the modules? i.e., can you add a registration call to them?
<becom33> Tasser, http://pastie.org/3935754 I use this to get modules . how can I know the each Module name inside each file
<Tasser> becom33, you can't
mahmoudimus has joined #ruby
<becom33> ged, Im not sure what are you asking .
<becom33> well thats the problem
rdegraci has left #ruby [#ruby]
sei has joined #ruby
<ged> becom33: I'm asking if you can add code to the modules you're loading.
jackiechan0 has quit [Ping timeout: 245 seconds]
<becom33> ged, if your referning to mofifying the modules . yes I can
<ged> becom33: If you can, you can make each of them call a registration hook when they load which adds them to an Array, then just include every object in that array.
<ged> Then you don't need to know their names.
<becom33> ged, if you don't mind can you gimme a short fast example code ?
SPYGAME has joined #ruby
tommyvyo has joined #ruby
wmoxam has joined #ruby
indeterminate has quit [Ping timeout: 244 seconds]
<ged> becom33: Yep, writing one up now.
SeySayux has joined #ruby
troessner has joined #ruby
<codefarmer> why does 1.0%0.1 = 0.09999999999999995 ? shouldn't it be 0 ?
<Mon_Ouie> You should be aware of floating point arithmetics
<codefarmer> Mon_Ouie can you elaborate on that a bit ? :)
<ged> That's untested, but the general idea should be good.
<shevy> codefarmer float magic it is not totally accurate
<Hanmac> float was never designed to be accurate
ananthakumaran2 has quit [Quit: Leaving.]
<codefarmer> so if i need to get 0 from 1.0%0.1 what is the proper way of getting that done ?
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
Travis-42 has quit [Remote host closed the connection]
<Hanmac> codefarmer whats your ruby version?? my returns this 1.0 % 0.1 => 0.0
<ged> becom33: If you made the commands classes instead, you could use one of the builtin hooks like inherited() to do registration, but I can't think of any hooks for a Module.
<codefarmer> ruby 1.9.3p194 (2012-04-20 revision 35410) [i386-darwin9.8.0]
<Mon_Ouie> Hanmac: (1.0 % 0.1) == 0.0
tvw has joined #ruby
mdw has joined #ruby
<Hanmac> Mon_Ouie its true ... :/
<Mon_Ouie> One way would be to use BigDecimal for that kind of stuff
<Mon_Ouie> What is *your* ruby version?
<jwbuurlage> ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0]
<jwbuurlage> 0.09999999999999995
<becom33> ged sorry I was afk. lemme check the paste
<Hanmac> Mon_Ouie: ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
<codefarmer> i'll read up on BigDecimal now thanks
schovi has joined #ruby
kalleth_ has joined #ruby
wvms has joined #ruby
virunga has joined #ruby
jwbuurlage has quit [Quit: jwbuurlage]
yankov_ has joined #ruby
yankov has quit [Ping timeout: 245 seconds]
yankov_ is now known as yankov
kalleth_ has quit [Read error: Connection reset by peer]
r0bby has joined #ruby
kalleth_ has joined #ruby
jwbuurlage has joined #ruby
yoklov has quit [Quit: computer sleeping]
ananthakumaran has joined #ruby
eam has quit [Ping timeout: 260 seconds]
eam has joined #ruby
robbyoconnor has quit [Ping timeout: 272 seconds]
kalleth_ has quit [Client Quit]
<becom33> ged, where does this last commands goes to ?
<becom33> CommandLoader.loadem
<becom33> CommandLoader.commands.each do |mod|
<becom33> end
<becom33> include( mod )
kalleth_ has joined #ruby
quest88 has joined #ruby
<ged> becom33: Wherever you want the modules included.
Mon_Ouie has quit [Read error: Connection reset by peer]
Mon_Ouie has joined #ruby
ananthakumaran has quit [Ping timeout: 244 seconds]
kalleth_ has quit [Client Quit]
ananthakumaran has joined #ruby
kalleth_ has joined #ruby
ConstantineXVI has joined #ruby
thecreators has quit [Quit: thecreators]
burgestrand1 has quit [Quit: Leaving.]
rboyd has joined #ruby
kalleth__ has joined #ruby
kalleth_ has quit [Read error: Connection reset by peer]
ZachBeta has quit [Quit: Computer has gone to sleep.]
jetblack has joined #ruby
Shamgar has quit [Remote host closed the connection]
Shamgar has joined #ruby
dibri has joined #ruby
tommylommykins has quit [Read error: Operation timed out]
ennui has quit [Ping timeout: 252 seconds]
tommylommykins has joined #ruby
kenperkins has joined #ruby
xiaotian has joined #ruby
BRMatt has quit [Read error: Operation timed out]
examancer has quit [Read error: Operation timed out]
BRMatt has joined #ruby
otters has joined #ruby
weasels has quit [Read error: Connection reset by peer]
kiela has quit [Ping timeout: 244 seconds]
looopy has joined #ruby
kiela has joined #ruby
ipoval has quit [Quit: ipoval]
jwbuurlage has quit [Quit: jwbuurlage]
savage- has joined #ruby
nisstyre has quit [Ping timeout: 272 seconds]
lkba has joined #ruby
subr00t has joined #ruby
<subr00t> hi there
dbgster has joined #ruby
<becom33> ged I see somthing like this
<becom33> def self::register( mod )
<becom33> self.commands << mod
<becom33> puts mod
<becom33> end
<becom33> damn it :/ sorry I thought I coppied the pastelink
kil0byte has quit [Remote host closed the connection]
<becom33> anyway that puts should output somthing write . if its not whats the problem
examancer has joined #ruby
Vainoharhainen has quit [Quit: Leaving...]
ikaros has joined #ruby
Alantas has quit [Quit: The sum of the universe is zero.]
Taos has left #ruby [#ruby]
cdepue_ has quit [Ping timeout: 246 seconds]
nisstyre has joined #ruby
<bnagy> you can also eval files inside a sandbox namespace
looopy has quit [Remote host closed the connection]
kyktommy has joined #ruby
<bnagy> and then pull the constants out of that
philcrissman has quit [Remote host closed the connection]
<bnagy> if you know the filenames but not the module / classnames they contain
<bnagy> but it's pretty ghetto
kil0byte has joined #ruby
ciopte7_ has joined #ruby
cdepue has joined #ruby
dataer has quit [Quit: dataer]
skogis has joined #ruby
<ged> becom33: Yeah, it should output the module name.
<becom33> yep yep I got it done thanks
<ged> Cool.
mdw has quit [Ping timeout: 250 seconds]
dbgster has quit [Quit: dbgster]
wmoxam has quit [Ping timeout: 248 seconds]
kyktommy has quit [Quit: Linkinus - http://linkinus.com]
quest88 has quit [Quit: quest88]
mengu has joined #ruby
yoklov has joined #ruby
mneorr has joined #ruby
philcrissman has joined #ruby
berserkr has quit [Quit: Leaving.]
brianpWins has joined #ruby
quest88 has joined #ruby
skogis has quit [Quit: leaving]
skogis has joined #ruby
tommylommykins has quit [Read error: Operation timed out]
philcrissman has quit [Remote host closed the connection]
Peacemaker1789 has joined #ruby
kenperkins has quit [Quit: Computer has gone to sleep.]
adambeynon has joined #ruby
burgestrand has joined #ruby
andrewhl has quit [Quit: andrewhl]
rdegraci has joined #ruby
Peacemaker1789 has left #ruby [#ruby]
tommylommykins has joined #ruby
xhh has quit [Quit: xhh]
shruggar has joined #ruby
xiaotian has quit [Read error: Operation timed out]
batmanian has joined #ruby
rdegraci has quit [Client Quit]
Eldariof27-ru has joined #ruby
dibri has quit [Ping timeout: 246 seconds]
altiouz has quit [Ping timeout: 244 seconds]
Eldariof59-ru has quit [Ping timeout: 244 seconds]
Eldariof-ru has joined #ruby
mnaser has quit [Quit: Computer has gone to sleep.]
dax has joined #ruby
ConstantineXVI has quit [Remote host closed the connection]
r0bby is now known as robbyoconnor
Eldariof27-ru has quit [Ping timeout: 265 seconds]
batmanian has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
timonv has quit [Remote host closed the connection]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
dibri has joined #ruby
rippa has joined #ruby
pullphing has joined #ruby
luckyruby has joined #ruby
dhaskew has quit [Read error: Connection reset by peer]
techhelp has joined #ruby
dhaskew has joined #ruby
moshee has quit [Ping timeout: 252 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
snearch has quit [Quit: Verlassend]
<becom33> is this wrong ? http://pastie.org/3936133
philcrissman has joined #ruby
philcrissman has quit [Remote host closed the connection]
dhaskew has quit [Read error: Connection reset by peer]
dhaskew has joined #ruby
azm has quit [Ping timeout: 250 seconds]
<shevy> yes
luckyruby has quit [Ping timeout: 256 seconds]
imami|afk is now known as banseljaj
<shevy> becom33, you must understand what you do here
<shevy> attr_accessor :command
<shevy> ^^^ what is this doing.
<becom33> maby I need a reader
pika_pika_ has joined #ruby
wmoxam has joined #ruby
mahmoudimus has joined #ruby
<shevy> becom33 pls answer
<becom33> its there so I can call Class.command << "cmdname" and it will put into a array
luckyruby has joined #ruby
<shevy> becom33 why do you avoid me :(
<becom33> I didnt
pika_pika has quit [Ping timeout: 246 seconds]
<shevy> ok now listen
grey_ has joined #ruby
<shevy> there are at least three attr_* methods
<shevy> attr
<becom33> did you asked me what is it doing ? you mean like it creates a method
<shevy> whops
<shevy> attr_reader
<shevy> attr_writer
<shevy> attr_accessor
<shevy> yeah becom33
<shevy> but you dont seem to know
<becom33> i though you asked why'd i put it there
grey_ has quit [Client Quit]
<shevy> because in your code, you made mistake that only show when you did not understand these three methods
<shevy> becom33, what is the difference between these three methods
<becom33> shevy, do explain
techhelp has quit [Quit: This computer has gone to sleep]
<shevy> no, you have to explain, you have to learn :)
<shevy> what is
<shevy> attr_reader :foo
<shevy> doing
<becom33> it will only read
<shevy> read what
<shevy> becom33, write in plain ruby code, what attr_reader :foo is doing
<becom33> the attribute method
<becom33> you mean irb ?
pika_pika_ has quit [Quit: Leaving]
jgrevich has joined #ruby
<shevy> no here
<Icehawk78> Is it possible to instantiate a static hash with both values and a default?
<shevy> becom33, you take too long. I show you the solution for now ok?
<becom33> shevy, ok
<shevy> becom33, def foo; @foo; end
<shevy> is the same as
<shevy> attr_reader :foo
<shevy> understand becom33 ?
<becom33> yea
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<shevy> good
<Icehawk78> ie TEST = Hash.new(-1) {:a => 1, :b => 2}
<shevy> now what is this doing:
<shevy> attr_writer :foo
dibri has quit [Ping timeout: 244 seconds]
<becom33> def foo(value); @foo; end
<becom33> i guess
<becom33> aww
<shevy> becom33 only 80% correct
<shevy> you forgot something
<becom33> @foo = valie
<shevy> you pass an argument, but do not do anything
<becom33> value *
<shevy> that is a bit better
<shevy> but not 100% correct still
<shevy> def foo=(i); @foo = i; end
<shevy> def foo=(value); @foo = value; end
<shevy> both are the same
<shevy> becom33, you use this like:
<shevy> cat.fur_colour = 'green'
<shevy> understand?
<becom33> yep
<shevy> ok
<shevy> last question. what is attr_accessor :foo doing
philcrissman has joined #ruby
<digitalcakestudi> I'm trying to learn devise, I got the login working for the most part but the sign_out route is giving me a little problem. rake route shows that I have a action of destroy_user_session which I have a link_to "Sign Out", destroy_user_session_path in my app but when I go there I get No route matches [GET] "/users/sign_out"
<becom33> read and write both . the way I read it
<shevy> becom33 yeah. it combines attr_reader and attr_writer
zeromodu_ has joined #ruby
<shevy> so you both have a getter method (read value) and a setter method (set value)
<digitalcakestudi> I notice that the link_to is using a get vs the delete. How do I get the link to use use the Delete method?
<shevy> digitalcakestudi hmm sounds a bit like rails question, the rail gurus happen to be on #rubyonrails. I for instance know nothing about rails, only about ruby
<digitalcakestudi> oops sorry wrong chan
<digitalcakestudi> :)
<shevy> digitalcakestudi but perhaps someone else can respond to your question here, just letting you know
dibri has joined #ruby
<shevy> becom33 now look at http://pastie.org/3936133 again
<shevy> You have attr_accessor :command and attr_accessor :discription
<shevy> that means, you work on:
<shevy> @command
<shevy> and
<shevy> @discription
<shevy> BUT
<shevy> in the rest of your code, you suddenly do:
<shevy> @@listcommands << self.command
petercs has quit [Ping timeout: 246 seconds]
<shevy> that is not good style really
<shevy> @@listcommands << @command
<shevy> that is slightly better
<shevy> nono
<shevy> @@command is not the same as @command
<shevy> becom33, @@variables are bad in my opinion
<becom33> simple plan remove one @
<shevy> good
<shevy> you should put that into a method though
<shevy> in "def initialize" for instance
<shevy> I myself use "def reset" usually, and call that from within initialize
zeromodulus has quit [Ping timeout: 246 seconds]
philcrissman has quit [Remote host closed the connection]
<becom33> shevy, in a another module can't I do Execution::command = "banner" and add banner to that array ?
tomzx has joined #ruby
<shevy> which array
<becom33> command = []
<becom33> @command = []
<becom33> *
<shevy> you can add something to an array via
<shevy> @array << foo
<shevy> so in your example
<shevy> @command << foo
<becom33> i did this in in my Banner module. doesnt seems to work :/
<becom33> Help.command << "banner"
<shevy> what the heck is Help.command
<shevy> you could define such a method via
<shevy> def self.command
arbipher has joined #ruby
<shevy> and have that return @command
luckyruby has quit [Remote host closed the connection]
<arbipher> JOIN #irc
<becom33> shevy, in another module
<becom33> shevy, I'm trying to auto generate a help command with all the modules I write
arbipher has left #ruby [#ruby]
<becom33> so in modules for a example Banner
Vert has joined #ruby
<becom33> I could do
<becom33> module Banner
<becom33> def initialize
<becom33> Help.command << "banner"
<becom33> end
<becom33> require 'lib/help' # in the top I missed it
<shevy> god I just hate modules
<becom33> shevy, you gave me the code with modules :/
<shevy> I am sure you never defined Help.command anywhere
<shevy> no
<shevy> well yeah
<shevy> but you want to use modules
<shevy> I told you to not do that
Morkel has joined #ruby
<becom33> shevy, what else would I do ?
<shevy> and btw
<shevy> module Foo; def initialize
<shevy> I am sure I never wrote that because you can not instantiate a module
Ontolog has joined #ruby
<shevy> the problem is, you want to jump from zero to complicated, without making the steps in between
<becom33> ok I didnt know that :/
r0bby has joined #ruby
<becom33> alright alright I missed some stuff .
tommyvyo has joined #ruby
flopper has joined #ruby
defendguin has joined #ruby
MetaCosm has quit [Read error: Operation timed out]
davidboy has quit [Read error: Operation timed out]
kapowaz has quit [Read error: Operation timed out]
robbyoconnor has quit [Ping timeout: 246 seconds]
<subr00t> I spent many hours looking for a good tutorial on how to build a cloud server analytics system for aws (or any approach),can some one please mention a link?
khakimov has joined #ruby
<defendguin> i've always used ruby along with ruby on rails but now i would like to build a plan ruby script to harvest information from the interwebs using rdig. Is there a good resource for how to set up a normal ruby project?
relix has quit [Ping timeout: 245 seconds]
_marvin has quit [Ping timeout: 252 seconds]
pureluck_ has quit [Ping timeout: 240 seconds]
Dr4g has quit [Ping timeout: 245 seconds]
jrgifford has quit [Ping timeout: 272 seconds]
SeanTAllen has quit [Ping timeout: 272 seconds]
xrl has quit [Ping timeout: 272 seconds]
ciopte7_ has quit [Quit: ciopte7_]
IPGlider has quit []
pkondzior has quit [Ping timeout: 246 seconds]
fcoury has quit [Max SendQ exceeded]
ZachBeta has joined #ruby
ipoval has joined #ruby
anildigital_work has quit [Max SendQ exceeded]
denysonique has quit [Ping timeout: 256 seconds]
dkannan has quit [Ping timeout: 272 seconds]
si14 has quit [Ping timeout: 272 seconds]
JC_SoCal has quit [Ping timeout: 272 seconds]
ziyadb has quit [Max SendQ exceeded]
patricksroberts has quit [Ping timeout: 245 seconds]
dotemacs has quit [Ping timeout: 272 seconds]
srid_ has quit [Max SendQ exceeded]
jackiechan0 has joined #ruby
kapowaz has joined #ruby
<jackiechan0> hey i'm learning ruby from Crist Pane tutorial i have a basic question about variable ? could anyone help me ?
<defendguin> don't ask to ask just ask
Eldariof-ru has quit [Ping timeout: 240 seconds]
dotemacs has joined #ruby
<jackiechan0> defendguin> i did not understand this at the end of page tnx http://pine.fm/LearnToProgram/?Chapter=03
griffindy has joined #ruby
Eldariof-ru has joined #ruby
<jackiechan0> var1 = 8
<jackiechan0> var2 = var1
<jackiechan0> puts var1
<jackiechan0> puts var2
<jackiechan0> puts ''
<jackiechan0> var1 = 'eight'
<jackiechan0> puts var1
<jackiechan0> puts var2
<jackiechan0> ops
sebastorama has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
davidboy has joined #ruby
<defendguin> jackiechan0: use pastie.org or some other similar site. don't paste in here
mockillo has quit [Ping timeout: 252 seconds]
DMKE has quit [Ping timeout: 265 seconds]
mockillo has joined #ruby
<jackiechan0> defendguin> sorry was a mistake
relix has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<jackiechan0> nobody here?
amar_key has quit [Max SendQ exceeded]
yankov has quit [Read error: Connection reset by peer]
relix has quit [Max SendQ exceeded]
<defendguin> you still haven't pasted anything
berserkr has joined #ruby
yankov has joined #ruby
jrgifford has joined #ruby
truedon has joined #ruby
<truedon> hey guys I am trying to install redmine and get the webrick start on centos 6 but i keep getting this error about iconv and I can't figure out what to do next
ZachBeta has joined #ruby
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
xrl has joined #ruby
_marvin has joined #ruby
diegoviola has joined #ruby
jackiechan0 has quit [Quit: Sto andando via]
<Boohbah> truedon: gem install bundler
emet has joined #ruby
ennui has joined #ruby
tommyvyo has joined #ruby
<truedon> Boohbah: running
patricksroberts has joined #ruby
<truedon> Boohbah: Successfully installed bundler-1.1.3
srid_ has joined #ruby
srid_ has joined #ruby
srid_ has quit [Changing host]
srid_ has joined #ruby
si14 has joined #ruby
webguynow has quit []
philcrissman has joined #ruby
<truedon> Boohbah: same error
<macer1> hmm I have string like "123.123.123.123:8888" and trying to do line.split(/:/).each do |host, port| but all go to host and port is nil. why?
denysonique has joined #ruby
wmoxam has quit [Ping timeout: 248 seconds]
<seanstickle> macer1: Because doing |host,port| doesn't let you just grab 2 items from an array that might have more than 2 elements.
denysonique has quit [Read error: Operation timed out]
Ryan52 has joined #ruby
Spaceghostc2c has quit [Read error: Operation timed out]
<virunga> macer1: because split returns an array and each permits the iteration on a single element for time
<macer1> [line.delete("\n").split(/:/)].each do |host, port| works like that
<macer1> thanks anyway :)
<seanstickle> That looks crazy unmaintainable!
<seanstickle> Good luck,
ciopte7 has joined #ruby
<sepp2k> macer1: Why don't you just do host, port = line.split(/:/) ?
<Boohbah> truedon: looks like the installer is not finding your gem directory
<sepp2k> Creating a one-element array just to call each on it, is just insane.
<macer1> makes sense
looopy has joined #ruby
<Ryan52> Hi, I'm trying to find a way to undefine a class. Is that possible? I have a bug in some code that is a bit too convoluted to debug, but I think I might be able to solve it using this.
<Hanmac> macer1 "123.123.123.123:8888".split(/:/).tap { |host, port|p host, port}
dotemacs has quit [Ping timeout: 248 seconds]
cesario has quit [Ping timeout: 248 seconds]
<macer1> x_X
<truedon> Boohbah: how can i set it?
<macer1> I prefer the sepp2k solution :P
jrgifford has quit [Ping timeout: 260 seconds]
randym has quit [Ping timeout: 256 seconds]
patricksroberts has quit [Ping timeout: 244 seconds]
davidboy has quit [Ping timeout: 246 seconds]
lectrick has quit [Ping timeout: 252 seconds]
<becom33> http://pastie.org/3936252 can anyone tell me what am I doing wrong ehre
notbrent has quit [Ping timeout: 260 seconds]
mdw has joined #ruby
aquaranto has quit [Ping timeout: 245 seconds]
_marvin has quit [Ping timeout: 252 seconds]
moeSeth has quit [Ping timeout: 272 seconds]
mucker has joined #ruby
srid_ has quit [Ping timeout: 256 seconds]
<Boohbah> truedon: i would use rvm
kapowaz has quit [Ping timeout: 276 seconds]
<truedon> I'm using rvm
subr00t has quit [Quit: Leaving]
andev has quit [Ping timeout: 245 seconds]
dekz has quit [Ping timeout: 260 seconds]
xrl has quit [Max SendQ exceeded]
emet has quit [Remote host closed the connection]
<Hanmac> becom33 you mix instance and class methods
si14 has quit [Ping timeout: 276 seconds]
<codefarmer> another dumb question from me but , what's the ruby recommended way of allowing get/set on a @instance_variable of a class ?
techhelp has joined #ruby
<seanstickle> attr_accessor
<seanstickle> codefarmer: ^^
<Hanmac> or attr_reader and attr_writer if you want only read or only write
pvh has quit [Max SendQ exceeded]
<codefarmer> tx looking into it
<codefarmer> i see, cool
<codefarmer> tx
patricksroberts has joined #ruby
moeSeth has joined #ruby
schaerli has quit [Remote host closed the connection]
<ccooke> heh. I thought you menat class instance variables, there, not regular ones.
fgwaegeawgfwa has joined #ruby
andev has joined #ruby
lxsameer has quit [Quit: Leaving]
si14 has joined #ruby
<Boohbah> truedon: interesting, is your gem bin dir in your PATH?
<ccooke> (for those, class Foo; class << self; attr_accessor :bar; end; end; Foo.bar = 'something' )
nlc has joined #ruby
techhelp has quit [Client Quit]
Gavilan has quit [Ping timeout: 276 seconds]
netogallo has joined #ruby
Choobie has joined #ruby
Spaceghostc2c has joined #ruby
<truedon> Boohbah: [root@gomo redmine]# echo $GEM_HOME
<truedon> /usr/local/rvm/gems/ruby-1.9.3-p194
RurouniJones has quit [Remote host closed the connection]
twinturbo has quit [Quit: twinturbo]
aquaranto has joined #ruby
twinturbo has joined #ruby
davidpk has joined #ruby
adambeynon has quit [Quit: adambeynon]
dekz has joined #ruby
<Boohbah> echo $PATH
twinturbo has quit [Ping timeout: 246 seconds]
notbrent has joined #ruby
randym has joined #ruby
rboyd_ has joined #ruby
philcrissman has quit [Remote host closed the connection]
<macer1> is there a way to set proxy timeout for ruby?
sc0_ has quit [Quit: leaving]
<macer1> I see only for http request but there will be no http request if proxy doesnt connect
rboyd has quit [Ping timeout: 276 seconds]
rboyd_ is now known as rboyd
defendguin has quit [Quit: Leaving.]
<macer1> :|
wmoxam has joined #ruby
cesario has joined #ruby
mnaser has joined #ruby
mnaser has quit [Changing host]
mnaser has joined #ruby
amar_key has joined #ruby
banseljaj is now known as imami|afk
<codefarmer> how can i limit my floats to only 1 decimal ?
mdw has quit [Remote host closed the connection]
<seanstickle> codefarmer: for display?
<seanstickle> codefarmer: or for storing in the database?
<codefarmer> display and calculations
<seanstickle> codefarmer: display, printf
<seanstickle> codefarmer: calculations, you can't
Dr4g has joined #ruby
<seanstickle> Use decimals instead
<codefarmer> i see, tx
philcrissman has joined #ruby
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
dibri has quit [Ping timeout: 260 seconds]
Nollo_ has joined #ruby
<Nollo_> hello
zeromodu_ is now known as zeromodulus
pvh has joined #ruby
fr0gprince_mac has quit [Quit: Leaving...]
<Nollo_> I have a problem with json, I want to install it but I have this error : http://pastebin.com/ntxNegLZ
<seanstickle> Nollo_: you have gcc installed?
Nollo_ has quit [Client Quit]
r0bby has quit [Ping timeout: 246 seconds]
xrl has joined #ruby
pkondzior has joined #ruby
ziyadb has joined #ruby
denysonique has joined #ruby
ConstantineXVI has joined #ruby
_marvin has joined #ruby
mdw has joined #ruby
philcrissman has quit [Remote host closed the connection]
<otherj> seanstickle: btw, ended up just changing my date formatting to use - ;o)
<codefarmer> how can i beter write this in ruby https://gist.github.com/2731799 . i want to declare val2 to equal val1 unless val1 is smaller than 0.1 ?
philcrissman has joined #ruby
SeanTAllen has joined #ruby
deobald__ has joined #ruby
Eldariof59-ru has joined #ruby
Eldariof-ru has quit [Ping timeout: 246 seconds]
lectrick has joined #ruby
<canton7> codefarmer, val2 = (val1 < 0.1) ? 1 : val1
novodinia has joined #ruby
novodinia has quit [Changing host]
novodinia has joined #ruby
<codefarmer> thanks
jackiechan0 has joined #ruby
<jackiechan0> hello someone there? i have to add a number after a question ?
<jackiechan0> what's ur favorite number ?
<jackiechan0> number=gets.chomp
<jackiechan0> why don't you chose' +number+1+' as favorite number?'
ciopte7 has quit [Quit: ciopte7]
<jackiechan0> what's the correct sintax ?
ConstantineXVI has quit [Remote host closed the connection]
<jackiechan0> anyone there?
<shevy> jackiechan0 what is the meaning of number+1
<shevy> remember
sparrovv has joined #ruby
<shevy> number is a string
<shevy> +1 to a string wont work
looopy has quit [Remote host closed the connection]
<jackiechan0> shevy> so it's 1.to_i
<jackiechan0> :)
<shevy> how does this work
<shevy> to_i is totally nonsenical
<Spaceghostc2c> ^
<shevy> I think he does not really need any help
<shevy> he provides his own answers
<shevy> :(
Ryan52 has left #ruby [#ruby]
<jackiechan0> shevy> doesn't work:(
<heftig> jackiechan0: you had the right method but the wrong receiver
<jackiechan0> heftig> sorry here is my syntax if someone want to take a look thanks really
ikaros has quit [Remote host closed the connection]
<shevy> jackiechan0 do you even read what is typed
IanV has quit [Quit: ChatZilla 0.9.88.2 [Firefox 12.0/20120420145725]]
<jackiechan0> shevy> yeah you told me that number is a string
ciopte7_ has joined #ruby
<shevy> yes
<jackiechan0> shevy> so i tought to do number.to_i + 1
<jackiechan0> shevy> but it doesn't work
<shevy> what for
<heftig> yes
<shevy> of course it does not, add a string
<shevy> (number.to_i +1).to_s
<shevy> or use #{number}
<shevy> or use #{number + 1}
looopy has joined #ruby
<heftig> but a + b + c first does a + b, then + c
<shevy> start to think in objects jackiechan0
<jackiechan0> shevy> i have to put it into () ?
<shevy> ruby is everything about objects
<shevy> jackiechan0, you can use #{}
<jackiechan0> shevy> () = #{} ??
<jackiechan0> shevy> it's the same?
<shevy> use #{} in strings
<shevy> x = 5; "foo #{x}"
<heftig> puts "foo #{2 + 4} bar"
<shevy> pls read a ruby tutorial man even a basic one
<shevy> if you want to use +number+ instead, and you append to a string, it must be a string object
<jackiechan0> shevy> i'm studying from the cris pine
<shevy> so you would have to call .to_s on your own
<shevy> excellent!
looopy has quit [Remote host closed the connection]
<shevy> it is a good tutorial
<heftig> number.succ would work as well
<jackiechan0> shevy> i love it
<becom33> shevy, I'm stuck with the before problem
<shevy> becom33 it is hopeless man
<shevy> you make everything so complicated
<shevy> that is not good code if you ask me
<shevy> keep it so simple that you dont have to think
<becom33> ok i'll tell you what I want to do . and you tell me how to do it alright ?
<shevy> you can try
<becom33> ok
jcromartie has joined #ruby
amalvagomes has joined #ruby
<jackiechan0> shevy> i don't want to make too mess in what i'm studying so (number.to_i+1) will work as #{number.to_i+1}
<jackiechan0> shevy> (number.to_i+1) = #{number.to_i+1}
<jackiechan0> shevy> correct? then i'll go ahead studying
SmoothSage has quit [Quit: Leaving]
<shevy> jackiechan0 if you use #{} you dont need the .to_i
<shevy> and no, this is not correct
<shevy> I told you before
jgrevich has quit [Quit: jgrevich]
<shevy> <shevy> use #{} in strings
<shevy> <shevy> x = 5; "foo #{x}"
<shevy> here I showed you how to use it
<shevy> jackiechan0 the output of number.to_i + 1 will be the same in both examples, yes
looopy has joined #ruby
<shevy> but it is still not the same thing, and
<jackiechan0> shevy> ok i'll work on it, thanks for suggesting me the Cris Pine it's really good
jcromartie has quit [Client Quit]
<shevy> (number.to_i+1) will return a Fixnum
<heftig> shevy: still needs the to_i
Ontolog has quit [Remote host closed the connection]
<jackiechan0> shevy> yeah it's true
<heftig> however, it won't need a to_s
<becom33> umm so like before we have modules like Banner (i know you hate modules) . I want to make a auto help command from like Banner . so I do somthing like in 'trollops' they have ' opt :src, "src lang", :short => 'i', :type => String' and they automatially generates the -h(help)
<jackiechan0> shevy> (number.to_i+1.to_i)
<jackiechan0> (number.to_i +1).to_s
<jackiechan0> shevy> (number.to_i +1).to_s = mixing.rb:41:in `to_i': illegal radix 1 (ArgumentError)
savage- has quit [Remote host closed the connection]
griffindy has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<Hanmac> jackiechan0 : there is a difference between: "+1" and "+ 1"
<shevy> heftig, yeah
<shevy> becom33, I dont hate modules per se
<shevy> I hate the misuse of them and that they are crippled compared to classes
macer1 has quit [Ping timeout: 244 seconds]
<shevy> every time I just feel handicapped if I use a module for anything complicated
ikaros has joined #ruby
Urth|Away is now known as Urthwhyte
niklasb has quit [Ping timeout: 245 seconds]
<Tasser> shevy, just use modules then, and whenever you need an instantation, use anonymous classes ;-)
<becom33> http://pastie.org/3936635 damn it I still hit this
<becom33> cant *
hadees has joined #ruby
<Tasser> shevy, http://sprunge.us/IKBh and have fun with Object.create javascript style ;-)
ph^ has joined #ruby
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
<jackiechan0> Hanmac> really?
<jackiechan0> Hanmac> +1 = string + 1 = number ?
mneorr has quit [Ping timeout: 246 seconds]
Morkel has quit [Quit: Morkel]
<Hanmac> no "number.to_i +1" is bad
<Hanmac> "number.to_i+1" or "number.to_i + 1" are good
<jackiechan0> Hanmac> mixing.rb:41:in `+': can't convert Fixnum into String (TypeError)
Icehawk78 has quit [Remote host closed the connection]
<jackiechan0> Hanmac> i used number.to_i + 1
jimeh2 has quit [Ping timeout: 248 seconds]
<Hanmac> hm that shounldt be, that error
ConstantineXVI has joined #ruby
truedon has quit [Quit: truedon]
ZachBeta has quit [Quit: Computer has gone to sleep.]
<jackiechan0> i'm trying to do this exercize Write a program which asks for a person's favorite number. Have your program add one to the number, then suggest the result as a bigger and better favorite number. (Do be tactful about it, though.)
mneorr has joined #ruby
h4mz1d has joined #ruby
fgwaegeawgfwa has quit [Ping timeout: 244 seconds]
jimeh2 has joined #ruby
d3c has quit [Ping timeout: 265 seconds]
novodinia has quit [Ping timeout: 276 seconds]
macer1 has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
havenn has joined #ruby
davidpk has quit [Ping timeout: 252 seconds]
jniesen has joined #ruby
<td123> jackiechan0: you mean lik , puts 'fav num?';puts('your new fav num:', gets.to_i + 1)
<jackiechan0> td123> yeah :)
<jackiechan0> td123> it makes me crazy i dunno why!
<td123> which part are you having trouble with?
<jackiechan0> td123> here are the variables
<jackiechan0> number=gets.chomp
<jackiechan0> fav=number.to_i+1
<jackiechan0> what's wrong ?
<jackiechan0> i got this error mixing.rb:42:in `+': can't convert Fixnum into String (TypeError)
<Hanmac> mixing ... is that one of your files?
<jackiechan0> oh gosh i forgot ''
<td123> jackiechan0: works for me
<jackiechan0> td123> ?!?
rboyd has quit [Quit: rboyd]
<jackiechan0> td123> can u paste that to me ?
<td123> [15] pry(main)> num = gets.chomp
<td123> 1
<td123> [16] pry(main)> fav =num.to_i+1
<td123> => 2
Jade has quit [Ping timeout: 244 seconds]
khakimov has joined #ruby
davidpk has joined #ruby
vertroa has joined #ruby
jniesen has quit [Quit: Leaving.]
exchgr has joined #ruby
philcrissman has quit [Remote host closed the connection]
diegoviola has quit [Ping timeout: 244 seconds]
khakimov has quit [Client Quit]
ThatDudeGuy_ has joined #ruby
imami|afk is now known as banseljaj
<jackiechan0> td123> can you check this for me pls : https://www.privatepaste.com/7c5448d763
altiouz has joined #ruby
sp3ctr has joined #ruby
h4mz1d has quit [Ping timeout: 245 seconds]
<td123> jackiechan0: ok
<jackiechan0> td123> i found the solution i have to convert fava.to_s
<jackiechan0> td123> i found the solution i have to convert fav.to_s
h4mz1d has joined #ruby
zeromodu_ has joined #ruby
zeromodulus has quit [Ping timeout: 252 seconds]
wmoxam has quit [Ping timeout: 248 seconds]
<shevy> hehe
ConstantineXVI has quit [Remote host closed the connection]
defendguin has joined #ruby
<shevy> Tasser hmmm strange code
<shevy> I imagine if every method would be a module on its own
jwbuurlage has joined #ruby
JC_SoCal has joined #ruby
<shevy> and every time it is merged into a class, its methods become namespaced into that class
<Tasser> shevy, kind of welcome to JS
<td123> jackiechan0: imo string interpolation "str1 #{num} str2" is a lot cleaner than using 'str1' + num + 'str2'
<jackiechan0> td123> so instead of using +everythin+ i can use #{}
<td123> ya
jgrevich has joined #ruby
troessner_ has joined #ruby
<jackiechan0> td123> ok tnx i have to learn a lot :)
macer1_ has joined #ruby
macer1 has quit [Ping timeout: 256 seconds]
troessner has quit [Ping timeout: 250 seconds]
<becom33> http://codepad.org/94wEL2c4 this gives me a nil value why is that ?
<becom33> nvm got it
rboyd has joined #ruby
neersighte[d] is now known as neersighted
ananthakumaran has quit [Quit: Leaving.]
jgrevich has quit [Ping timeout: 252 seconds]
ciopte7_ has quit [Quit: ciopte7_]
jayrulez has quit [Read error: Connection reset by peer]
minijupe has quit [Quit: minijupe]
cj3kim has quit [Quit: This computer has gone to sleep]
ukwiz has quit [Quit: Leaving]
jgrevich has joined #ruby
Eldariof27-ru has joined #ruby
jwbuurlage has quit [Quit: jwbuurlage]
jniesen has joined #ruby
Eldariof59-ru has quit [Read error: Operation timed out]
tommyvyo has joined #ruby
<jackiechan0> td123> thanks i did't know that "" is string interpolation instead of ''+''+''
defendguin has quit [Quit: Leaving.]
ronniy has quit [Remote host closed the connection]
b_52globe has joined #ruby
<b_52globe> hi guys
<b_52globe> i'm trying to execute oauth-ruby from source
<b_52globe> but i'm getting
<b_52globe> /bin/oauth:3:in `require': no such file to load -- oauth/cli (LoadError)
<b_52globe> hile i have installed gem -oauth cli
dataer has joined #ruby
becom33 has quit [Quit: Leaving]
banseljaj is now known as imami|afk
Jrz has quit [Quit: Computer has gone to sleep.]
Shrink has quit [Ping timeout: 248 seconds]
jayrulez has joined #ruby
Shrink has joined #ruby
closedbracket has joined #ruby
mdw has quit [Remote host closed the connection]
jgrevich has quit [Quit: jgrevich]
jniesen has quit [Quit: Leaving.]
techhelp has joined #ruby
quesada_ has quit [Ping timeout: 246 seconds]
Guest38008 has joined #ruby
havenn has quit [Remote host closed the connection]
carloslopes has joined #ruby
carloslopes has quit [Client Quit]
Tomasso has quit [Ping timeout: 240 seconds]
ThatDudeGuy_ has quit [Quit: ThatDudeGuy_]
ipoval has quit [Quit: ipoval]
mahmoudimus has joined #ruby
hamfz_ has joined #ruby
ipoval has joined #ruby
h4mz1d has quit [Ping timeout: 252 seconds]
CheeToS has quit [Ping timeout: 246 seconds]
adeponte has joined #ruby
havenn has joined #ruby
robert_ has joined #ruby
ennui has quit [Quit: ennui]
robert_ is now known as Guest69977
danblick has joined #ruby
Guest69977 has quit [Client Quit]
ZachBeta has joined #ruby
Choobie has quit [Ping timeout: 260 seconds]
timonv has joined #ruby
quesada_ has joined #ruby
jayrulez has quit [Read error: Connection reset by peer]
jayrulez_ has joined #ruby
christianrojas has quit [Quit: Linkinus - http://linkinus.com]
fowl has joined #ruby
advorak has joined #ruby
mucker has quit [Quit: leaving]
carloslopes has joined #ruby
fukushima has quit [Ping timeout: 248 seconds]
kuranai|off is now known as kuranai
ZachBeta has quit [Read error: Connection reset by peer]
quesada_ has quit [Remote host closed the connection]
Targen has joined #ruby
quesada_ has joined #ruby
ZachBeta has joined #ruby
digitalcakestudi has quit [Remote host closed the connection]
amalvagomes_ has joined #ruby
markjwlee has joined #ruby
ciopte7__ has joined #ruby
<markjwlee> Hi everyone... I'm currently running a server program using bundle exec... what would be the best way to get the program to run as a service on startup?
adeponte has quit [Remote host closed the connection]
<markjwlee> (I'm on CentOS 5)
fukushima has joined #ruby
sebastorama has quit [Ping timeout: 240 seconds]
fukushima has quit [Client Quit]
deobald__ has quit [Ping timeout: 260 seconds]
amalvagomes has quit [Ping timeout: 246 seconds]
amalvagomes_ is now known as amalvagomes
Urthwhyte is now known as Urth|Away
Urth|Away is now known as Urthwhyte
jackiechan0 has quit [Quit: Sto andando via]
<offby1> not sure. But perhaps you can use the "reboot" keyword in "cron"
<macer1_> .
<macer1_> how can I connect to https proxy with ruby ;/
<macer1_> "def HTTP.new(address, port = nil, p_addr = nil, p_port = nil, p_user = nil, p_pass = nil)"
<macer1_> nothing about https proxy anywhere
macer1_ is now known as macer1
macer1 has quit [Changing host]
macer1 has joined #ruby
wmoxam has joined #ruby
bfrog has left #ruby [#ruby]
closedbracket has quit [Remote host closed the connection]
<offby1> macer1: I don't really know, but many http clients used to honor environment variables like HTTP_PROXY; perhaps the built-in one does too
<macer1> I looked at the ruby libs
<macer1> there are nothing about this there
<offby1> time to google I guess
<macer1> googled
<offby1> aw
iamjarvo has quit [Quit: Leaving.]
palmfrond has quit [Quit: palmfrond goes to sleep]
<macer1> nothing... :(
tayy_ has joined #ruby
carloslopes has quit [Quit: Leaving]
tayy has quit [Ping timeout: 244 seconds]
wmoxam has quit [Ping timeout: 244 seconds]
<macer1> hymm
<macer1> maybe proxy host like https://ip?
Eldariof-ru has joined #ruby
<macer1> ehh still fail ;/
Eldariof27-ru has quit [Read error: Operation timed out]
minijupe has joined #ruby
mlevin_ has joined #ruby
cordoval has joined #ruby
azm has quit [Ping timeout: 246 seconds]
palmfrond has joined #ruby
danblick has quit [Quit: Leaving.]
bontaq has joined #ruby
codefarmer has quit [Ping timeout: 260 seconds]
rboyd has quit [Quit: rboyd]
cordoval has quit [Client Quit]
deryldoucette has joined #ruby
nari__ has joined #ruby
Urthwhyte is now known as Urth|Away
deryldoucette has quit [Client Quit]
tayy_ is now known as tayy
schovi has quit [Remote host closed the connection]
deryldoucette has joined #ruby
tayy has quit [Remote host closed the connection]
dnyy has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
bondar has joined #ruby
bondar has quit [Excess Flood]
jondot_ has joined #ruby
<jondot_> trying to resolve 2 libraries conflicting class names
<jondot_> if i'm requiring 'rbconfig' which defines 'Config' and then another library requires and imports Some::NS::Config into the scope, how would just Config be interpreted?
Guest38008 has quit [Read error: Operation timed out]
xerophyte has quit [Ping timeout: 260 seconds]
rippa has quit [Ping timeout: 245 seconds]
Morkel has joined #ruby
Morkel has quit [Client Quit]
bluenemo has quit [Read error: Connection reset by peer]
otters has quit [Read error: Connection reset by peer]
rboyd has joined #ruby
codebeaker has joined #ruby
otters has joined #ruby
sparrovv has quit [Ping timeout: 250 seconds]
pu22l3r has joined #ruby
sparrovv has joined #ruby
Urth|Away is now known as Urthwhyte
diegoviola has joined #ruby
Gavilan has joined #ruby
nari__ has quit [Ping timeout: 244 seconds]
Gavilan is now known as Gavilan2
quesada__ has joined #ruby
cdepue has quit [Ping timeout: 276 seconds]
sepp2k has quit [Ping timeout: 246 seconds]
codebeaker has quit [Quit: codebeaker]
niklasb has joined #ruby
igotnolegs has joined #ruby
quesada_ has quit [Ping timeout: 260 seconds]
<troessner_> jondot_, you should be ok since the second one is namespaced
<jondot_> troessner_, found the problem, jruby specific. thanks
<troessner_> np
<troessner_> :-)
griffindy has joined #ruby
vertroa has quit [Read error: Connection reset by peer]
cdepue has joined #ruby
inteq has joined #ruby
rboyd has quit [Quit: rboyd]
macmartine has quit [Quit: macmartine]
<apeiros_> jondot_: newer rubys have rbconfig under the constant RbConfig
<apeiros_> just use that
<jondot_> thanks for the tip
zeromodu_ has quit [Remote host closed the connection]
kirun has joined #ruby
codefarmer has joined #ruby
cdepue has quit [Ping timeout: 244 seconds]
dhaskew_ has joined #ruby
dhaskew has quit [Read error: Connection reset by peer]
dhaskew_ is now known as dhaskew
<markjwlee> Hi everyone... I'm currently running a server program using bundle exec... what would be the best way to get the program to run as a service on startup? (I'm running CentOS 5.7)
Soda has joined #ruby
sp3ctr has quit []
dhaskew has quit [Read error: Connection reset by peer]
dhaskew has joined #ruby
<Soda> test
Nollo has joined #ruby
<Nollo> Hello, I don't manage to install json, I have this error: http://pastebin.com/gk7FgyaF
sepp2k has joined #ruby
cdepue has joined #ruby
kirun_ has joined #ruby
khakimov has joined #ruby
kirun has quit [Ping timeout: 252 seconds]
c0rn has joined #ruby
codefarmer has quit [Ping timeout: 250 seconds]
rboyd has joined #ruby
rboyd has quit [Client Quit]
Tuxist has quit [Read error: Connection reset by peer]
pu22l3r has quit [Remote host closed the connection]
vertroa has joined #ruby
yxhuvud has quit [Ping timeout: 250 seconds]
havenn has quit [Remote host closed the connection]
palmfrond has quit [Quit: palmfrond waves good bye]
Nollo has quit [Ping timeout: 245 seconds]
exchgr has quit [Ping timeout: 252 seconds]
jimeh2 has quit [Ping timeout: 244 seconds]
Gavilan has joined #ruby
macer1 has quit [Ping timeout: 252 seconds]
rboyd has joined #ruby
rh1n0 has joined #ruby
Gavilan2 has quit [Ping timeout: 245 seconds]
berserkr has quit [Quit: Leaving.]
ZachBeta has joined #ruby
dchelimsky has joined #ruby
ddv has quit [Quit: *poof*]
ph^ has quit [Remote host closed the connection]
Eldariof-ru has quit []
mikeycgto has quit [Ping timeout: 246 seconds]
khakimov has quit [Quit: Computer has gone to sleep.]
td123 has quit [Quit: WeeChat 0.3.7]
palmfrond has joined #ruby
exchgr has joined #ruby
jimeh2 has joined #ruby
timonv has quit [Ping timeout: 240 seconds]
khakimov has joined #ruby
rboyd has quit [Quit: rboyd]
jniesen has joined #ruby
seanstickle has quit [Quit: Nihil sub sole novum]
<offby1> nollo: you need to install some packages
cdepue has quit [Ping timeout: 246 seconds]
Gavilan has quit [Ping timeout: 244 seconds]
bontaq has quit [Remote host closed the connection]
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
jniesen has quit [Quit: Leaving.]
cdepue has joined #ruby
kuranai is now known as kuranai|off
sparrovv has quit [Ping timeout: 248 seconds]
straind has joined #ruby
straind` has quit [Read error: Connection reset by peer]
sqlbyme has joined #ruby
codelurker has joined #ruby
timonv has joined #ruby
dhaskew has quit [Ping timeout: 245 seconds]
macmartine has joined #ruby
niklasb has quit [Ping timeout: 276 seconds]
SPYGAME has quit [Quit: Leaving]
timonv has quit [Ping timeout: 250 seconds]
rh1n0 has quit [Quit: Leaving...]
zellio has joined #ruby
zellio has left #ruby [#ruby]
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
Tomasso has joined #ruby
iamjarvo has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
andrewhl has joined #ruby
skogis has quit [Ping timeout: 260 seconds]
Jade has joined #ruby
r3t0dd has joined #ruby
fr0gprince_mac has joined #ruby
defendguin has joined #ruby
c0rn has quit []
shruggar has quit [Quit: Leaving.]
jondot_ has quit [Ping timeout: 250 seconds]
cousine has joined #ruby
Nollo has joined #ruby
<Nollo> Hello
codelurker has quit [Quit: WeeChat 0.3.7]
<Nollo> I have a problem when I try to install ruby with rvm : http://pastebin.com/34RVGxKz
berserkr has joined #ruby
daniel_hinojosa has joined #ruby
QaDeS has joined #ruby
zastaph has quit []
altiouz has quit [Ping timeout: 240 seconds]
senny has quit [Remote host closed the connection]
ArtificialEX has joined #ruby
Nollo has quit [Ping timeout: 245 seconds]
<apeiros_> Nollo: try in #rvm, they're quite responsive
<ArtificialEX> hey, im working on a project and my partner is adamant about using RoR Canvas for a classroom environment ( it does look good ). I only know PHP, and am in charge of building the rest of the site , and they like what I've done in PHP. Would it be a huge deal to have RoR and PHP talk to the same db and integrate seamlessley enough?
<apeiros_> ArtificialEX: if you can live with a couple of conventions on table/column naming, that should be no problem
khakimov has joined #ruby
zeromodu_ has joined #ruby
<ArtificialEX> thanks apeiros_, im fairly comfertable with java and c#, so im wondering if i should just learn ruby for the sake of this project
<offby1> So. Freezing. I am using arrays as hash keys. It occurs to me that it might be a good idea to freeze each such array as soon as I create it. Any opinions either way?
fr0gprince_mac has quit [Quit: Leaving...]
dchelimsky has quit [Remote host closed the connection]
ZachBeta has quit [Quit: Computer has gone to sleep.]
<offby1> ArtificialEX: I found ruby quite easy to learn, but then I knew perl and python very well; all three are quite similar. C# and java are both a bit different, if for no other reason than that they're statically typed (and require a compilation pass)
<offby1> but I don't know either so I can't compare 'em to ruby
<ArtificialEX> well im most used to PHP. right now I am really enjoying laravel framework :/
<offby1> I suspect ruby is more similar to PHP than to C# or java, but ... I don't know PHP either :)
<ArtificialEX> anyone use canvas or a RoR learning environment?
iamjarvo has quit [Ping timeout: 244 seconds]
jniesen has joined #ruby
Soda has quit [Quit: fuck you guys, im go home]
jniesen has left #ruby [#ruby]
Soda has joined #ruby
ZachBeta has joined #ruby
c0rn has joined #ruby
Urthwhyte is now known as Urth|Away
rh1n0 has joined #ruby
Azure is now known as DJZuzu
ConstantineXVI has joined #ruby
jd has joined #ruby
c0rn has quit [Ping timeout: 245 seconds]
dchelimsky has joined #ruby
henn1nk has joined #ruby
c0rn has joined #ruby
<henn1nk> i have several lines like this: session[:marque] = params[:marque] ... can i shorten this?
Jade has quit [Ping timeout: 252 seconds]
<henn1nk> session[#{option}] = params[#{option}] or so?
RudyValencia has quit [Read error: Connection reset by peer]
RudyValencia has joined #ruby
soulcake has joined #ruby
<shevy> ewww
<shevy> henn1nk #{} is typically used in strongs
<shevy> bar = 5; "foo #{bar}"
<shevy> sorry
<shevy> typically used in *strings
sepp2k has quit [Remote host closed the connection]
<henn1nk> shevy: yes of course, you are right. but is there a way to shorten this?
<shevy> session[:marque] = params[:marque]
<henn1nk> for x in [:marque, :cars, ...] do
<shevy> wait
r3t0dd has quit [Quit: Leaving]
<shevy> if you need to use for / in
<shevy> then you can always use an array, and apply .each
<offby1> session.merge(params) {} mayby
<henn1nk> [:marque, :cars, ..].each do ß
<shevy> [:marque, :cars, ...].each {|x| session[x] = params[x] }
<offby1> or .select
otters has quit [Read error: Connection reset by peer]
<offby1> if session and params are hashes, there are a lot of methods that should make life easier
<henn1nk> what is the difference between select and each?
otters has joined #ruby
bluOxigen has joined #ruby
<offby1> I think select allows you to choose a subset
<offby1> each is like select { |x| true }
<offby1> I think.
<offby1> I'm new at all this.
<henn1nk> thanks i will try this :)
seanstickle has joined #ruby
krz has joined #ruby
virunga has quit [Quit: Sto andando via]
dchelimsky has quit [Remote host closed the connection]
c0rn has quit []
griffindy has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
fridim_ has quit [Ping timeout: 264 seconds]
weasels has joined #ruby
otters has quit [Read error: Connection reset by peer]
LBRapid has joined #ruby
ryanf has joined #ruby
delinquentme has joined #ruby
kaspernj has quit [Ping timeout: 246 seconds]
<delinquentme> is it too general of a question to ask whether ruby or JS is faster with floating point calculations?
Foxandxss has joined #ruby
alveisan has joined #ruby
alveisan has left #ruby [#ruby]
davidboy has joined #ruby
<seanstickle> For a program modeling intersections of hyperspheres in 1800-dimensional space?
<seanstickle> I'd go with Ruby, myself.
vitor-br has joined #ruby
<ryanf> really? I would have thought v8 would be faster for that kind of thing
<ryanf> for no particular reason
<ryanf> marketing maybe
<seanstickle> Ah, but you're forgetting the really excellent gem for doing hyperdimensional calculations
<shevy> henn1nk, for .select see this here: {:x => 1, :y => 2}.select {|key, value| value > 1} # => [[:y, 2]]
<seanstickle> Which is, I believe, written mostly in C
ikaros has quit [Quit: Ex-Chat]
jd is now known as Jade
<shevy> henn1nk here, we selected for those subgroups of the hash, for which the condition "value larger than 1" is true
<Veejay> seanstickle: V8 is faster than C
<shevy> whereas with .each you simply iterate over all elements of a collection
looopy has quit [Remote host closed the connection]
vertroa has quit [Ping timeout: 246 seconds]
<Veejay> Because V8 is written in Node.js
<Veejay> The calculations are non-blocking
<seanstickle> Veejay: not just normal C though
<seanstickle> Veejay: hyperdimensional C
<seanstickle> So it calculates in multiple universes simultaneously
<Veejay> Is it asynchronous though?
<seanstickle> No, it is multi-universe synchronoous
<Veejay> Ah
<seanstickle> Otherwise you have re-entrant problems in subspace
<seanstickle> Oddly enough, this conversation is what people talking about programming sounded like to me about 15 years ago.
<Veejay> heh
Soda has quit [Quit: fuck you guys, im go home]
<ryanf> haha
<Veejay> Oddly enough, this conversation sounds like any Node zealot preaching to newbies just how Node.js will solve every programming problem known to man, measles and cancer
<Veejay> And then some
savage- has joined #ruby
<seanstickle> Particularly when we now have outstanding PHP reactors like
<seanstickle> http://nodephp.org/
<Veejay> heh, I saw that
defendguin has quit [Quit: Leaving.]
nlc has quit [Ping timeout: 244 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
BrianE has joined #ruby
tvw has quit [Read error: Connection reset by peer]
griffindy has joined #ruby
azm has quit [Ping timeout: 260 seconds]
sei has quit [Ping timeout: 265 seconds]
c0rn has joined #ruby
Guest95418 is now known as midrange
midrange has quit [Changing host]
midrange has joined #ruby
mikeg has joined #ruby
indian has joined #ruby
iamjarvo has joined #ruby
dataer has quit [Quit: dataer]
rh1n0 has quit [Quit: Leaving...]
c0rn has quit [Ping timeout: 256 seconds]
nlc has joined #ruby
hadronzoo has joined #ruby
c0rn has joined #ruby
Gavilan has joined #ruby
<ArtificialEX> this ruby on rails canvas app has OAuth, so maybe if my php site does too, they can log into both at same time?
<ArtificialEX> canvas is a SaaS, so I'm not sure I could get it to communicate with my database if I can't put it on my server
hadronzoo has quit [Client Quit]
hadronzoo has joined #ruby
yugui_zzz is now known as yugui
b_52globe has quit [Ping timeout: 240 seconds]
c0rn has quit [Ping timeout: 256 seconds]