apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p286: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com
nyrb has joined #ruby
kbeddingfield has quit [Remote host closed the connection]
tenmilestereo has quit [Quit: Leaving]
nemesit has quit [Quit: Leaving...]
nohonor_alt has joined #ruby
ngoldman has quit [Remote host closed the connection]
irleif has quit [Quit: Computer has gone to sleep.]
pureluck has joined #ruby
ebobby has quit [Quit: Leaving]
GoGoGarrett has quit [Remote host closed the connection]
Takehiro has joined #ruby
caleb_io has quit [Quit: caleb_io]
nohonor has quit [Ping timeout: 260 seconds]
v0n has joined #ruby
crackfu has joined #ruby
BoomCow has joined #ruby
mahmoudimus has joined #ruby
nohonor_alt has quit [Ping timeout: 260 seconds]
mahmoudimus has quit [Client Quit]
fyolnish has joined #ruby
apeiros_ has quit [Remote host closed the connection]
dmerrick has joined #ruby
Takehiro has quit [Ping timeout: 244 seconds]
eka has joined #ruby
chimkan_ has joined #ruby
nitti has joined #ruby
<eka> hi all, what the difference on using self.myvar = something or @myvar = something on the initialize() method of a class?
<vjt> eka: @myvar = foo defines an instance variable, while self.myvar = foo invokes the "myvar=" method on self
<eka> vjt: so if = is not overridden it makes no difference right
chimkan_ has quit [Client Quit]
<eka> ?
<vjt> eka: you cannot override "="
jblack has quit [Ping timeout: 240 seconds]
<vjt> eka: but you can define a "foo=" method
<eka> vjt: I meant self.myvar=
Araxia_ has joined #ruby
Araxia has quit [Read error: Connection reset by peer]
Araxia_ is now known as Araxia
<vjt> e.g. class A; def foo=(something); @bar = something; end; a = A.new; a.foo = 'barbaz' sets @bar into a
chimkan_ has joined #ruby
<vjt> eka: the difference is that "myvar=" must be a defined method, or Ruby will raise a NoMethodError :)
elico has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
<eka> vjt: so what is the difference here? http://pastebin.com/XrZSrj6Z
nitti has quit [Ping timeout: 244 seconds]
<blazes816> self.game and self.game= are getters and setters that manipulate @game
<blazes816> self.game simply returns @game. however, you could override that method to do something else
<vjt> eka: behind the scenes, attr_accessor :foo defines two methods: a "foo" method that returns the value of @foo, and "foo=(something)" that sets "@foo" to "something"
<blazes816> perhaps set @game to a default if it's not yet set
<vjt> eka: in Ruby a class-level method can define dynamically instance-level methods, and this is what attr_accessor does
<eka> vjt: yes i understand that... but in this case it makes only sense if in the future games= is overriden right?
<vjt> yes, it is preferable to always use methods, so that subclasses can override their behaviour
<eka> vjt: oh I see
Russell^^ has quit [Quit: Russell^^]
<eka> vjt: thanks
<vjt> :)
<vjt> going, bye!
rjsamson has joined #ruby
lkba has joined #ruby
otters has joined #ruby
ryanlecompte has quit [Remote host closed the connection]
Artheist has joined #ruby
icooba has quit [Ping timeout: 252 seconds]
slainer68 has quit [Remote host closed the connection]
<MarcWeber> chazu`: thanks
F1skr has joined #ruby
tomsthumb has joined #ruby
adeponte has joined #ruby
joeycarmello has joined #ruby
adeponte has quit [Remote host closed the connection]
tchebb has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
samphippen has quit [Ping timeout: 256 seconds]
samphippen has joined #ruby
lahwran has quit [Excess Flood]
icooba has joined #ruby
chazu` has quit [Remote host closed the connection]
tds has quit [Quit: tds]
jrajav has quit []
tomsthumb has quit [Quit: Leaving.]
cakehero has quit [Quit: Computer has gone to sleep.]
lahwran has joined #ruby
blazes816 has quit [Quit: blazes816]
F1skr has quit [Quit: WeeChat 0.3.9]
jamjam has quit [Ping timeout: 255 seconds]
fgro_ has joined #ruby
F1skr has joined #ruby
jaygen has joined #ruby
artOfWar has quit [Read error: Connection reset by peer]
artOfWar has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
Trioke has quit [Ping timeout: 252 seconds]
mercwithamouth has joined #ruby
fgro has quit [Ping timeout: 255 seconds]
irleif has joined #ruby
davidcelis has quit [Quit: K-Lined.]
otters has quit [Ping timeout: 252 seconds]
jrajav has joined #ruby
mercwithamouth has quit [Ping timeout: 255 seconds]
mrsolo has quit [Quit: Leaving]
sn0wb1rd has quit [Quit: sn0wb1rd]
jaygen_ has joined #ruby
keymone has joined #ruby
cousine has joined #ruby
jblack has joined #ruby
joeycarmello has quit [Remote host closed the connection]
keymone_ has quit [Ping timeout: 260 seconds]
joeycarmello has joined #ruby
jaygen has quit [Ping timeout: 252 seconds]
mahmoudimus has joined #ruby
dmerrick has quit [Quit: dmerrick]
otters has joined #ruby
kiyoura has joined #ruby
cousine has quit [Remote host closed the connection]
seanyo has joined #ruby
_jesse_ has quit [Ping timeout: 245 seconds]
g_bleezy has quit [Remote host closed the connection]
_jesse_ has joined #ruby
SCommette has joined #ruby
irleif has quit [Ping timeout: 260 seconds]
slainer68 has joined #ruby
F1skr has quit [Quit: WeeChat 0.3.9]
juarlex_ has quit [Ping timeout: 244 seconds]
dmerrick has joined #ruby
juarlex_ has joined #ruby
xjiujiu_ has joined #ruby
dmerrick has quit [Client Quit]
jimeh has quit [Ping timeout: 240 seconds]
yshh has joined #ruby
apok has quit [Remote host closed the connection]
apok has joined #ruby
swarley has joined #ruby
guns has quit [Ping timeout: 276 seconds]
slainer68 has quit [Ping timeout: 256 seconds]
twopoint718 has joined #ruby
twopoint718 has quit [Changing host]
twopoint718 has joined #ruby
moshee has quit [Ping timeout: 260 seconds]
irleif has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
invapid has joined #ruby
dakine has joined #ruby
kbeddingfield has joined #ruby
butblack has joined #ruby
Jonah11_ has quit [Ping timeout: 264 seconds]
butblack is now known as help
F1skr has joined #ruby
help is now known as butblack
loocorez has left #ruby [#ruby]
Jonah11_ has joined #ruby
icole has quit [Remote host closed the connection]
awarner has quit [Remote host closed the connection]
JohnTeddy has joined #ruby
Takehiro has joined #ruby
mklappstuhl has joined #ruby
rakl has quit [Quit: sleeping]
<JohnTeddy> What is the best (in the opinion of whomever wishes to respond) ascii learn ruby tutorial and/or a course (like udemy, udacity, cousersa, etc) for learning ruby?
irleif has quit [Read error: Connection reset by peer]
Cache_Money has joined #ruby
kbeddingfield has quit [Ping timeout: 264 seconds]
<seanstickle> JohnTeddy: a book
rakl has joined #ruby
<JohnTeddy> seanstickle: Which?
<seanstickle> JohnTeddy: I fancy that one
<seanstickle> But I also much liked the draft Ruby spec
<seanstickle> But that's a bit out of date now, sadly.
<eka> JohnTeddy: pickaxe book also good
<seanstickle> Eck
<seanstickle> Difference in taste on that one, I think
bricker has quit [Ping timeout: 252 seconds]
<seanstickle> But I know some people like it.
Takehiro has quit [Ping timeout: 256 seconds]
butblack has quit [Quit: butblack]
F1skr has quit [Quit: WeeChat 0.3.9]
irleif has joined #ruby
solidus-river has quit [Quit: Leaving.]
sertaconay has quit [Read error: Connection reset by peer]
F1skr has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
sn0wb1rd has joined #ruby
irleif has quit [Quit: Computer has gone to sleep.]
fyolnish has quit [Remote host closed the connection]
niklasb has quit [Ping timeout: 246 seconds]
rakl has quit [Quit: sleeping]
dmerrick has joined #ruby
Soliah has quit [Ping timeout: 264 seconds]
headius has joined #ruby
fyolnish has joined #ruby
fyolnish has quit [Remote host closed the connection]
chimkan_ has quit [Quit: chimkan_]
deadalus has joined #ruby
deadalus has quit [Changing host]
deadalus has joined #ruby
caleb_io has joined #ruby
Squarism has joined #ruby
v0n has quit [Ping timeout: 260 seconds]
<Squarism> Howdy, suck a fart outa my browny
deadalus has quit [Client Quit]
vickaita has quit [Ping timeout: 246 seconds]
BoomCow has quit [Quit: This computer has gone to sleep]
v0n has joined #ruby
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Squarism was kicked from #ruby by seanstickle [Squarism]
mklappstuhl has quit [Ping timeout: 244 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
mneorr has quit [Remote host closed the connection]
nyrb has quit [Remote host closed the connection]
nyrb has joined #ruby
yshh has quit [Read error: No route to host]
yshh_ has joined #ruby
mercwithamouth has joined #ruby
caleb_io has quit [Quit: caleb_io]
omry has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
pr0ton has joined #ruby
<pr0ton> i have this strange hostname failure in production
<pr0ton> Hostname not found: domain (domain:443)
<pr0ton> how can i debug this?
<pr0ton> host domain works
chrishunt has quit [Quit: Leaving...]
medik has quit [Quit: Leaving]
skcin7 has joined #ruby
F1skr has quit [Quit: WeeChat 0.3.9]
robertotauille has quit [Quit: Leaving...]
F1skr has joined #ruby
<jrajav> Where's dat xeago :|
v0n has quit [Ping timeout: 260 seconds]
croz has joined #ruby
croz has quit [Excess Flood]
croz has joined #ruby
<rking> mr-rich: Pong.
Cache_Money has quit [Ping timeout: 276 seconds]
ij has quit [Read error: Connection reset by peer]
chriskk has quit [Quit: chriskk]
ij has joined #ruby
nazty has quit [Read error: No route to host]
v0n has joined #ruby
<dekz> anyone familiar enough with capistrano to educate me on why roles in tasks don't propagate to sub tasks called?
mneorr has joined #ruby
L1 has joined #ruby
nazty has joined #ruby
chriskk has joined #ruby
rakl has joined #ruby
jslowe has quit [Quit: Leaving]
ttt has joined #ruby
<L1> Anyone know why compass can't find my gems on Windows? I did "gem install susy", added "require'susy'" to my config.rb, but when I use @import "susy" in my scss compass tells me "File to import not founf or unreadable: susy"
caleb_io has joined #ruby
<L1> If I do "gem env" I get two GEM PATHS, one of which is the directory I can see susy has installed itself to
bricker has joined #ruby
<L1> Someone mentioned it might be because my config.rb is in a non-standard location (this is a .NET project so the directory structure is probably a bit different), can anyone advise how I might check if that is the case?
JonnieCache has joined #ruby
<matti> We need Ruby Gangnam Style.
sepp2k1 has quit [Read error: Connection reset by peer]
SCommette has quit [Quit: SCommette]
ksaw123 has joined #ruby
jjang has quit [Remote host closed the connection]
<ksaw123> hello all
v0n has quit [Ping timeout: 260 seconds]
<ksaw123> I am writing a program to create a christmas list. For some reason my "loop do" isn't working properly
<ksaw123> if you would like to take a look
jaygen_ has quit [Ping timeout: 252 seconds]
nari has joined #ruby
JonnieCache has quit [Read error: Operation timed out]
<ksaw123> nm got it. ty
<matti> :>
chrisja has quit [Quit: leaving]
butblack has joined #ruby
dmiller_ has joined #ruby
<jrajav> matti: What would that be, exactly?
<jrajav> matti: Matsumoto doing the giddy-up?
dmiller has quit [Read error: Connection reset by peer]
marius has quit []
postmodern has joined #ruby
ksaw123 has quit [Quit: irc2go]
justinmcp has quit [Remote host closed the connection]
eka has quit [Remote host closed the connection]
Araxia has quit [Quit: Araxia]
v0n has joined #ruby
mneorr has quit [Remote host closed the connection]
savage- has joined #ruby
freakazoid0223 has joined #ruby
BoomCow has joined #ruby
maletor has joined #ruby
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
jaygen has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
BoomCow has quit [Client Quit]
NullByte has quit [Ping timeout: 260 seconds]
jeremywrowe has quit [Quit: jeremywrowe]
voodoofish430 has quit [Quit: Leaving.]
jeremywrowe has joined #ruby
SCommette has joined #ruby
ABK has quit [Ping timeout: 244 seconds]
philcrissman has joined #ruby
BoomCow has joined #ruby
<matti> jrajav: Hahah
BoomCow has quit [Client Quit]
<matti> jrajav: I had such a bad mental image just now ;s
<jrajav> I had an image of sexy ladies
<matti> :<
Faris has quit [Ping timeout: 240 seconds]
<jrajav> Seriously. Korean girls are fiiiiine
<matti> Yeah.
<matti> Cute and pretty ;]
daniel_- has quit [Read error: Operation timed out]
skaczor has quit [Remote host closed the connection]
thinkdevcode has joined #ruby
chimkan has joined #ruby
philcrissman_ has joined #ruby
BoomCow has joined #ruby
BoomCow has quit [Client Quit]
joeycarmello has quit [Remote host closed the connection]
Faris has joined #ruby
philcrissman has quit [Ping timeout: 256 seconds]
SCommette has quit [Quit: SCommette]
<MarcWeber> autoload :TEST1, 'some str' is fine, but autoload str.to_sym, 'some str' fails with : autoload must be a constant name. So how does ruby distinguish a constant from a symbol? Aren't symbols always written by :SOMETHING ?
<MarcWeber> :TEST1.class in irb shows Symbol.
SCommette has joined #ruby
wpaulson has joined #ruby
Vert has quit [Remote host closed the connection]
<MarcWeber> My fault, my symbol ended in ";" which is not a valid constant
BoomCow has joined #ruby
cakehero has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
BoomCow has quit [Client Quit]
chriskk has quit [Quit: chriskk]
robertotauille has joined #ruby
fgro_ has quit [Read error: Operation timed out]
jenrzzz has quit [Ping timeout: 244 seconds]
reset_ has joined #ruby
reset_ has quit [Client Quit]
maletor has quit [Quit: Computer has gone to sleep.]
Jamone has quit [Ping timeout: 244 seconds]
reset has quit [Ping timeout: 244 seconds]
jaygen has quit [Remote host closed the connection]
robertotauille has quit [Quit: Leaving...]
vickaita has joined #ruby
Cidan is now known as zz_Cidan
caleb_io has quit [Quit: caleb_io]
marius has joined #ruby
WhoNeedszzz has joined #ruby
vickaita has quit [Ping timeout: 252 seconds]
chriskk has joined #ruby
<WhoNeedszzz> Hey guys
jrajav has quit []
<WhoNeedszzz> What exactly is reflection useful for?
chriskk has quit [Client Quit]
jaygen has joined #ruby
ablankfield has quit [Ping timeout: 244 seconds]
tommyvyo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mercwithamouth has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
apok_ has joined #ruby
BoomCow has joined #ruby
BoomCow has quit [Client Quit]
GoGoGarrett has joined #ruby
kpshek has joined #ruby
apok has quit [Ping timeout: 255 seconds]
twopoint718 has quit [Ping timeout: 260 seconds]
mneorr has joined #ruby
<rking> WhoNeedszzz: So many things. Tell me your background and white kind of code you write, and I'll give you a response other than, "How long is a piece of string?"
apok_ has quit [Ping timeout: 264 seconds]
<rking> white? ⇒ what
<WhoNeedszzz> I'm just refreshing my knowledge of Ruby. I didn't know much to begin with. I can't remember what reflection is used for and everything i've looked up says how to do it, but not the practical uses
<WhoNeedszzz> Like something said it was good for testing. How is it good for testing?
jblack has quit [Ping timeout: 244 seconds]
F1skr has quit [Quit: WeeChat 0.3.9]
swarley has quit [Ping timeout: 264 seconds]
xpen has joined #ruby
FifthWall has joined #ruby
tomsthumb has joined #ruby
__miha__ has joined #ruby
kpshek has quit [Ping timeout: 245 seconds]
<rking> WhoNeedszzz: Well, it's good for testing in many ways, also. You could use it to improve failure output, or you could use it to loop over all of an objects methods that end in '=' and assign it garbage to see how well it handles error input, etc.
forced_request has quit [Read error: Connection reset by peer]
<rking> WhoNeedszzz: You would probably really enjoy Metaprogramming Ruby. The title makes it sound like it might be obsessed with arcane uses of Ruby, but actually it lays a great foundation for understanding how Ruby works (and happens to also answer your question page after page)
pipopopo has quit [Ping timeout: 246 seconds]
philcrissman_ has quit [Remote host closed the connection]
jblack has joined #ruby
Takehiro has joined #ruby
jenrzzz has joined #ruby
chimkan has quit [Remote host closed the connection]
chimkan_ has joined #ruby
rjsamson has quit [Remote host closed the connection]
dmerrick has quit [Quit: dmerrick]
rjsamson has joined #ruby
mneorr has quit [Remote host closed the connection]
redbull has joined #ruby
Takehiro has quit [Ping timeout: 260 seconds]
cakehero has quit [Quit: Computer has gone to sleep.]
Guest16022 has joined #ruby
nateberkopec has quit [Quit: Leaving...]
_LowKey has joined #ruby
philcrissman has joined #ruby
rjsamson has quit [Ping timeout: 260 seconds]
n_blownapart has joined #ruby
_LowKey is now known as LowKey
LowKey has quit [Changing host]
LowKey has joined #ruby
<n_blownapart> hi the notation on lines 7 and 11 here continue to mess me up. thanks for any explanation: http://pastie.org/4906423
Guest16022 has quit [Quit: Textual IRC Client: www.textualapp.com]
seanyo has quit [Read error: Connection reset by peer]
seanyo has joined #ruby
seoaqua has joined #ruby
areil has joined #ruby
<MarcWeber> Does ruby provide a def which causes an error if a class already responds to the method name to avoid accidental monkey patching (eg because a different library is doing the same?)
kbeddingfield has joined #ruby
philcrissman has quit [Remote host closed the connection]
BoomCow has joined #ruby
<MarcWeber> I know that I probably can write my def_no_monkey_patch (:name, block) easily - just trying to understand whether this is considere a good practise.
butblack has quit [Quit: butblack]
seanyo has quit [Ping timeout: 244 seconds]
k4k1_c0der has joined #ruby
radic has joined #ruby
Serial_Killer_C has joined #ruby
radic_ has quit [Read error: Operation timed out]
ananthakumaran has joined #ruby
CaptainKnots has joined #ruby
<n_blownapart> hi the notation on lines 7 and 11 here continue to mess me up. thanks for any explanation: http://pastie.org/4906423
mneorr has joined #ruby
Progster has quit [Ping timeout: 276 seconds]
<jcaudle> Hi n_blownapart, what's throwing you off?
adeponte has joined #ruby
g-ram has joined #ruby
BoomCow has quit [Quit: This computer has gone to sleep]
mneorr has quit [Remote host closed the connection]
aces23up has quit [Ping timeout: 248 seconds]
<n_blownapart> jcaudle: thanks for responding...could you break down how line 7 returns line 9. all that notation \\1 , $1 etc. and how it works.
WNz has joined #ruby
joeycarm_ has joined #ruby
mockra has joined #ruby
_bart_ has joined #ruby
<iosctr> n_blownapart: $1, $2 are set when the regex is evaluated. Since those lines are defining and array, the first element (with the regex) is being eval'd first. then, the next two elements are using those variables to assign the their values.
recycle has joined #ruby
WhoNeedszzz has quit [Ping timeout: 246 seconds]
WNz is now known as WhoNeedszzz
<n_blownapart> iosctr: thanks hold on I'm working on that.
<iosctr> the first examplel isn't doing much... it matches the first 2 words, and replaces them with the same 2 words.
<iosctr> then, matches the next two, doing the same. so, the orig phrase doesn't change.
Astral__ has joined #ruby
<iosctr> but the last two matched is setting $1 $2
<iosctr> in the 2nd example, each 2 word match is being replaced with 2 copies of the 1st word in the 2 word match.
Astral_ has quit [Ping timeout: 246 seconds]
thone has joined #ruby
<iosctr> but the 2nd regex eval is still setting $1 $2 to those 2 words - "word here"
<n_blownapart> iosctr please hold on. 'the first example' you refer to is line 7 and its output, right?
<iosctr> correct
<seoaqua> is there any workable 'pagerank checking' gem ? the Pagerankr doesn't work any more:(
jlwestsr has quit [Remote host closed the connection]
matled has quit [Remote host closed the connection]
matled has joined #ruby
<iosctr> gsub/regex first matches "double every", then matches "word here"
thone_ has quit [Ping timeout: 240 seconds]
<iosctr> since the replacement is \1 \2, nothing changes. but the last eval sets $1 $2 to 'word' and 'here'
<n_blownapart> cool iosctr so those two matches are notated by \\1 and \\2 ?
<iosctr> correct
<iosctr> and they set the global variables
<richardjortega> how would i handled special characters in Ruby CSV? getting really wonky characters for degree symbol, asterisk, etc
Serial_Killer_C has quit [Read error: Connection timed out]
Serial_Killer_C has joined #ruby
lukeholder has joined #ruby
Faris has quit [Ping timeout: 260 seconds]
crackfu has quit [Remote host closed the connection]
<n_blownapart> iosctr: the last eval sets $1 and $2 to 'word' and 'here'...why use $1 and $2 for the third and fourth words?
crackfu has joined #ruby
Bosma has joined #ruby
<iosctr> you mean the 2nd/3rd array elements? I wouldn't know :)
<n_blownapart> iosctr: i.e. how does it set it? and if they are not included in the arguments, what are they exactly (global variables doesn't make sense to me) thanks
quest88 has joined #ruby
ninegrid has quit [Quit: brb]
<iosctr> any regex capture group () will set them.
savage- has quit [Quit: savage-]
jblack has quit [Ping timeout: 240 seconds]
<iosctr> if you simply eval: 'abc' =~ /a(\w)c/ then $1 will be set to 'b'
justinmcp has joined #ruby
<n_blownapart> iosctr: but in those expressions on lines 7 and 11 there are no capture groups. confused...sorry
marius has quit []
<n_blownapart> iosctr: oh, are they just (/w+) ?
crackfu has quit [Ping timeout: 256 seconds]
<n_blownapart> (\w+) *
headius has quit [Quit: headius]
<iosctr> right
<n_blownapart> iosctr: thanks for your patience I'm going to go soak my head and return to it.
<iosctr> check here: www.ruby-doc.org/docs/ProgrammingRuby/html/tut_stdtypes.html scroll down to the Grouping section
<iosctr> it's an older pickaxe, but still relevant.
<n_blownapart> iosctr: cool thanks much.
<iosctr> no problem :)
<n_blownapart> iosctr: pax
glyytchy has quit [Quit: glyytchy]
slainer68 has joined #ruby
sambio has quit []
eroc has quit [Quit: eroc]
SCommette has quit [Quit: SCommette]
jarred has joined #ruby
BoomCow has joined #ruby
cakehero has joined #ruby
jarred has left #ruby [#ruby]
Artheist has quit [Ping timeout: 260 seconds]
slainer68 has quit [Ping timeout: 240 seconds]
lukeholder has quit [Quit: Computer has gone to sleep.]
Cultofmetatron has quit [Remote host closed the connection]
mockra has quit [Remote host closed the connection]
g-ram has quit [Quit: Computer has gone to sleep.]
BoomCow has quit [Client Quit]
Takehiro has joined #ruby
blazes816 has joined #ruby
verbad has joined #ruby
JonnieCache has joined #ruby
Takehiro has quit [Ping timeout: 260 seconds]
verbad has quit [Client Quit]
yshh_ has quit [Ping timeout: 260 seconds]
zf_ has joined #ruby
JonnieCache has quit [Ping timeout: 252 seconds]
tds has joined #ruby
WhoNeedszzz has left #ruby ["P00f!"]
zf has quit [Read error: Connection reset by peer]
g-ram has joined #ruby
Serial_Killer_C has quit [Remote host closed the connection]
GoGoGarrett has quit [Remote host closed the connection]
savage- has joined #ruby
Serial_Killer_C has joined #ruby
dakine has quit [Ping timeout: 246 seconds]
quest88 has quit [Quit: quest88]
jeremywrowe has left #ruby [#ruby]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
SCommette has joined #ruby
guest has joined #ruby
guest has quit [Client Quit]
haxrbyte has joined #ruby
Mon_Ouie has joined #ruby
SCommette has quit [Quit: SCommette]
chimkan___ has joined #ruby
g-ram has quit [Ping timeout: 252 seconds]
havenn has joined #ruby
joeycarm_ has quit [Remote host closed the connection]
yshh has joined #ruby
chimkan_ has quit [Ping timeout: 260 seconds]
g-ram has joined #ruby
n_blownapart has quit [Remote host closed the connection]
hakunin has quit [Remote host closed the connection]
davidcelis has joined #ruby
g-ram has quit [Ping timeout: 248 seconds]
dhruvasagar has joined #ruby
haxrbyte has quit [Remote host closed the connection]
g-ram has joined #ruby
mercwithamouth has quit [Ping timeout: 248 seconds]
cakehero has quit [Quit: Computer has gone to sleep.]
mercwithamouth has joined #ruby
sabooky has joined #ruby
slainer68 has joined #ruby
<sabooky> Hi, quick question. if in class Chef::Nexus (module), I redefine Chef::EncryptedDataBagItem, would the scope of that change be limited to the module, or will EncryptedDataBagitem change behavior from now on?
psycho_one has joined #ruby
lobak has quit [Ping timeout: 255 seconds]
slainer68 has quit [Ping timeout: 252 seconds]
mneorr has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
cakehero has joined #ruby
Takehiro has joined #ruby
mneorr has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
mikepack has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
lobak has joined #ruby
jarred_ has joined #ruby
d2dchat has quit [Remote host closed the connection]
haxrbyte has joined #ruby
mneorr has joined #ruby
jarred_ has left #ruby [#ruby]
iamjarvo has quit [Quit: Computer has gone to sleep.]
tds has quit [Quit: tds]
joofsh has quit [Remote host closed the connection]
Takehiro has quit [Ping timeout: 260 seconds]
kiyoura has quit [Quit: Leaving]
walbert has quit [Remote host closed the connection]
invapid has quit [Ping timeout: 252 seconds]
BoomCow has joined #ruby
daniel_hinojosa has quit [Quit: Leaving.]
Serial_Killer_C has quit [Remote host closed the connection]
WhoNeedszzz has joined #ruby
<WhoNeedszzz> What are the main application areas of Ruby?
<rburton-> cross functional synergy.
<reactormonk> WhoNeedszzz, rails.
<WhoNeedszzz> and?
<rburton-> cross functional synergy
<WhoNeedszzz> ?
<rburton-> There are a lot of cases, like chef and puppet as well
cakehero has quit [Quit: Computer has gone to sleep.]
<rburton-> I'm just poking fun at how you phrased the question
<WhoNeedszzz> What's wrong with how i phrased it?
<rburton-> So sterile I guess
<WhoNeedszzz> It's common programming language terminology
<rburton-> It's how you speak, I just feel it's too corporate
Chryson has quit [Quit: Leaving]
<WhoNeedszzz> I prefer academic
<WhoNeedszzz> As i'm a comp sci student
charliesome has joined #ruby
<rburton-> Same difference :)
<BoomCow> cross functional synergy :D
<rburton-> Just training for being a corporate slave :D
<WhoNeedszzz> corporate is so far from academic
maletor has joined #ruby
<BoomCow> why academia?
<BoomCow> not judging, simply curious
<WhoNeedszzz> what is your question?
<BoomCow> why do you prefer academia
<BoomCow> I jumped in late to the convo
k4k1_c0der has quit []
<BoomCow> so I assume when you said I "I prefer academic"
<WhoNeedszzz> Because the connotations of academia are different from corporate
<BoomCow> you meant: "I want to study/teach"
<BoomCow> would you consider startups corporate?
<WhoNeedszzz> I don't have any intentions on being a corporate code monkey
<WhoNeedszzz> I'm just studying it
<rburton-> That's how it always starts. Very few break from it :)
<WhoNeedszzz> Simply to expand my knowledge of programming languages
<WhoNeedszzz> Hell I'm doing landscaping now, so that has nothing to do with coding
<rburton-> I think it's better to look at what the langauge supports vs. how people are using it in different applications
<WhoNeedszzz> I believe you should look at both
<WhoNeedszzz> What it supports and what it supports well are two different situations
<rburton-> It's an opinion. I say look at the language first and what it offers
ryanf has quit [Ping timeout: 252 seconds]
<WhoNeedszzz> I've already done that
<WhoNeedszzz> Now i want to know the practical side
<WhoNeedszzz> I know it usually boils down to language wars, but the fact is that for different application areas you wouldn't want to use language x over language y
<blazes816> Ruby is a general purpose scripting language. You would use it for things that call for that type of language.
<blazes816> you won't be using it to write graphics drivers or tablet firmware
<rburton-> I'm not speaking about a language war, speaking about really understanding the fundimentals of what the language provides
codezombie has joined #ruby
<blazes816> but you can use it for anything you'd use python/perl/etc for
<rburton-> java, vb, etc..
<WhoNeedszzz> For example Ruby supports image manipulation, but it sucks
<rburton-> it's really a general purpose langage for the most part
<rburton-> rmagic?
_dnyy has quit [Remote host closed the connection]
<rburton-> there's solutions
<rburton-> that's not a language feature, that's a library
<WhoNeedszzz> Never said it was
<WhoNeedszzz> :p
<rburton-> Your example implies it
<blazes816> rmagick sucks but that's not really ruby's fault. regardless, jruby has decent image stuff
<rburton-> "Ruby supports image manipulation, but it sucks"
<blazes816> (given all the crap available for the jvm)
<WhoNeedszzz> No a languages available libraries are just about as important as it's built-in featuers
<WhoNeedszzz> features*
<rburton-> WhoNeedszzz false
SCommette has joined #ruby
<blazes816> luckily i'm on the other coast
psycho_one has quit [Remote host closed the connection]
<rburton-> Then again we're speaking opinons
<rburton-> blazes816: I'm moving to San Fran nov 6th
<rburton-> heading to Den CO for RubyConf
<blazes816> nice, I just moved out here in august
<blazes816> nice, wish I could go
<rburton-> to San Fran?
<rburton-> what part?
<WhoNeedszzz> Well considering when you decide what language you want to use for a given task you would look to see if there are libraries to make the job simpler
<blazes816> yeah. I work in soma, live near oakland in emeryville
<rburton-> I moved to 11th Mission
<blazes816> great
<rburton-> Awesome, we should meet up sometime when you're in the area
<blazes816> cool man
<blazes816> i have a few friends in the mission
<blazes816> they love it
<blazes816> b
<blazes816> u
<blazes816> t
<rburton-> trying to launch a website soon, but been busy
<blazes816> but I prefer the east bay
perryh has quit [Excess Flood]
jcaudle has quit [Quit: jcaudle]
<blazes816> yeah same here. always busy haha
cantonic_ has joined #ruby
<rburton-> I just need to work out this deployment script with God running ResquePool
perryh has joined #ruby
<WhoNeedszzz> Concord++
mikepack has quit [Remote host closed the connection]
<WhoNeedszzz> Better yet Walnut Creek
<WhoNeedszzz> Love me some Mt. Diablo
<BoomCow> lol walnut creek
<BoomCow> gf got groped there
cantonic has quit [Ping timeout: 256 seconds]
cantonic_ is now known as cantonic
<rburton-> Sorry about that :)
<rburton-> I thought it was my back pocket
<rburton-> in front of me
ananthakumaran has joined #ruby
<WhoNeedszzz> Yeah as if something that happens everywhere has anything to do with the place itself
wargasm has quit [Ping timeout: 260 seconds]
<rburton-> It increases the odds.
<rburton-> So yes,
mikepack has joined #ruby
<WhoNeedszzz> Psychology fail
<rburton-> Go to the hood and see if you're asked to buy drugs.
<rburton-> It has something to do with it.
mikepack has quit [Remote host closed the connection]
cakehero has joined #ruby
<blazes816> go to macarthur bart after 10 and you don't have to wait to get asked
<WhoNeedszzz> Read
<BoomCow> WhoNeedszzz, I believe you're guilty of that as you're the one who came to that conclusion :p
<rburton-> WhoNeedszzz um okay next time you go to say Compton, tell your self that the area doesn't have an increase rate of you getting shot.
<WhoNeedszzz> Dude i live in Nawlins
<WhoNeedszzz> I've seen it all
<rburton-> WhoNeedszzz trust me, i've seen much worse
<BoomCow> ain't compton
<BoomCow> but then again
<BoomCow> compton ain't detroit
<WhoNeedszzz> People kill people daily here
<rburton-> Dude trust me, I've seen worse
<WhoNeedszzz> We're the murder capitol...
<rburton-> I've seen worse
kbeddingfield has quit [Remote host closed the connection]
<rburton-> Are you saying that New Orleans has a higher rate of murder therefore the area has something related to murder?
Cache_Money has joined #ruby
<BoomCow> do you guys use ruby for rails?
<BoomCow> err
<BoomCow> webdev
<BoomCow> or other stuff
<blazes816> yes
<rburton-> BoomCow: using Ruby for Rails
<blazes816> to both
<BoomCow> Any good suggestions for learning testing using rspec/capybara?
<BoomCow> #RubyonRails is kinda dead right now
<WhoNeedszzz> No actually i didn't
<WhoNeedszzz> It's not random people getting murdered
<blazes816> i use minitest + test::unit
<rburton-> WhoNeedszzz: keep telling yourself that.
<WhoNeedszzz> It's gang and drug related
<rburton-> In that area?
<BoomCow> blazes816, I am having such a hard time testing… not sure what the scope of my tests should be
<WhoNeedszzz> In my city
FifthWall has quit [Quit: Goodbye everyone]
<rburton-> WhoNeedszzz: good job, now you get a gangster badge. Now carry on
<BoomCow> blazes816, seems like testing is one of those things you just pick up by doing
<blazes816> BoomCow: many, small scoped tests
<blazes816> it is
sebastorama has quit [Quit: ;)]
<WhoNeedszzz> Haha i'm no gangster
<WhoNeedszzz> Not even close
<blazes816> start with unit tests
vlad_starkov has joined #ruby
<rburton-> I just find it funny how you mention your location and in relation to violence.
<blazes816> basic "if I do this to the object, this is should be it's output", etc
<rburton-> Sort of goes against what you were saying before. Anyhow #ruby
<BoomCow> blazes816, yeah, it always sounds more simple than it is
<BoomCow> hahaha
<BoomCow> blazes816, when I sit down, I have no idea where to start
thinkdevcode has quit [Remote host closed the connection]
<blazes816> think of your application in terms of states, and test each state
<blazes816> yeah, it's rough to start stuff
<BoomCow> blazes816, elaborate on state?
<blazes816> as in state machine
dhruvasagar has quit [Ping timeout: 240 seconds]
<rburton-> I focuse on expected behavior
artnez has joined #ruby
<BoomCow> so a method?
<rburton-> when function blah is called, I have an expection of behavior that I verify
monkegjinni has joined #ruby
<blazes816> ditch the idea you'll have 100% coverage, and it gets less discouraging
artnez has quit [Client Quit]
monkegjinni has quit [Remote host closed the connection]
<blazes816> pick a model, and write basic unit tests for it
<blazes816> literally just start anywhere
<BoomCow> okay
<rburton-> If you're looking for a starting point
<BoomCow> well, I have to write a model test for work
<rburton-> Select a requirement
<BoomCow> basically
<BoomCow> when a user clicks on a button
<BoomCow> it should create a new record
<blazes816> okay
<rburton-> it "should let a user login with valid credentials" do
<BoomCow> but can't this also be a controller test?
<rburton-> You can
<rburton-> there's different levels of testing
dhruvasagar has joined #ruby
<rburton-> unit, integration, functional, etc
Monie has joined #ruby
<blazes816> there are many different tests you could make out of it
<rburton-> unit test means testing logic in isolation of dependencies
<blazes816> especially if the application is written well
<rburton-> integration is testing object collboration
<rburton-> functional is testing the functionality as a user basically
joeycarmello has joined #ruby
<BoomCow> do those have any relation to mvc?
<BoomCow> i.e.
<blazes816> no
<BoomCow> okay
<blazes816> OOP in general
<blazes816> have you checked out rails casts?
<blazes816> railscasts*?
<BoomCow> yeah, recently bought a subscription
<blazes816> nice
<BoomCow> I saw his video "how I test"
<BoomCow> it's a great intro
Guest15771 has joined #ruby
<BoomCow> but still leaves me lost
lukeholder has joined #ruby
<BoomCow> I'll just keep writing tests
<BoomCow> it'll come eventually
joeycarmello has quit [Ping timeout: 256 seconds]
<blazes816> yeah man, any test is a good test. with experience you'll get good at writing really well structured tests.
<BoomCow> :D
cakehero has quit [Quit: Computer has gone to sleep.]
<BoomCow> we should all grab a beer sometime
<rburton-> just dont' try for 100% coverage
icole has joined #ruby
<BoomCow> from normal too
<BoomCow> yeah, I learned that at work rburton-
<rburton-> 75% is good enough and you can add more as you go
<rburton-> Most people say GO FOR 100%!
<BoomCow> so I changed career and am now a programmer
<BoomCow> my first task was to build a feature
<rburton-> pointless and ends up being fragile
<blazes816> how much programming experience do you have?
<BoomCow> proj. manager ended up telling me not to try to create a perfect feature
<BoomCow> < 1 year
<BoomCow> i quit my job
<BoomCow> put in about 60-70hrs/week
<rburton-> Project managers suck for guidence :)
<rburton-> find yourself a passionate engineer and work with him
<blazes816> damn man
<BoomCow> rburton-, point being that I was trying to account for every test case
<blazes816> did you just get a job at a startup?
<BoomCow> yeah, a month ago
<blazes816> shit man, good luck
<BoomCow> haha thanks
<BoomCow> it's a handful
cakehero has joined #ruby
<rburton-> BoomCow: here's my general advice. Test parameters coming in, expected output
<BoomCow> learning javascript and mysql at the same time
<rburton-> if you do bounds checking for parameters (Never trust anyone calling your method).
<rburton-> Avoid returning nil when a reasonable return type can be returned. e.g., empty array etc
<BoomCow> why is that
<rburton-> Just keep your methods tight. 1 function and very specific
<rburton-> BoomCow: because you don't want to have to check for null everywhere.
<rburton-> imagine
<rburton-> you call a function find_friends()
<rburton-> if there are no friends you return nil
<BoomCow> ok
<rburton-> now the person needs to do unless friends.nil? ...
bricker has quit [Ping timeout: 260 seconds]
<rburton-> instead return [] and they can iterate over that safely
<rburton-> friends.each {..}
<BoomCow> ahhh
<BoomCow> I haven't seen anyone do it that way
<rburton-> nil is a messy return value. Leads to the caller not trusting your return values
<BoomCow> when I write my feature/code
<BoomCow> I still have to check
<BoomCow> i.e.
<BoomCow> if friend
<BoomCow> if friends*
<BoomCow> friends.each do |f|
<rburton-> Now you have what I call noise. The first check is just noise
<BoomCow> well
Elhu has joined #ruby
<BoomCow> what happens if you're checking for the opposite case
<blazes816> worst case scenario: else
<BoomCow> friends.blank?
<rburton-> You can always say friends.empty?
<blazes816> empty?
<BoomCow> ahh
<blazes816> blank? is a rails method
<rburton-> blank sorry
<blazes816> that patches around this issue
<blazes816> empty? is correct
<BoomCow> sorry, I think in rails
<BoomCow> rails/ruby
<blazes816> empty? is an Array method that checks an empty array
<rburton-> Also consider this
<BoomCow> haven't had time to distinguish the two
<blazes816> blank? checks nil? and empty?
<blazes816> it's difficult to do
<rburton-> Think about cases too when you expect to find something
<blazes816> I love blank?
<rburton-> e.g., User.find(id)
<rburton-> if it's not there raise an exception
<rburton-> Since the method call is using an ID, it's expected that a user exists for that idea.
<rburton-> I like to code objects like people
mercwithamouth has quit [Ping timeout: 256 seconds]
<rburton-> Each object does something specific
<rburton-> each method does on function no more.
<BoomCow> oh yeah
<BoomCow> I've noticed
<BoomCow> that it's common to raise errors
<rburton-> Then I like to play well with my callers
<BoomCow> didn't do this while going through rails tutorial
<BoomCow> but I've seen a lot of begin/rescue
<blazes816> it's a common general programming practice
swex has joined #ruby
<rburton-> If I have a function that takes a hash for its argument
<rburton-> you have two things to consider
<rburton-> default values and required values
<rburton-> sensable defaults if you can
<BoomCow> blazes816, any tip on when to use begin/rescue? when I'm querying for something?
<rburton-> e.g., defaults.merge(args)
Takehiro has joined #ruby
<rburton-> if you can't then throw an exception if you didn't get what you want
<blazes816> BoomCow: well, you use begin/rescue any time you need to catch and exception and do something with it. and not let it bubble up to the top to halt processing
<rburton-> BoomCow: when you can recover from something
<rburton-> if you can't recover from an exception, let it go
<blazes816> I only raise exceptions myself for exceptional behavior
<BoomCow> okay
<BoomCow> I've seen code
<blazes816> for example, I don't think User.find(id) should raise an exception if the record isn't there
<BoomCow> where if a query fails
<blazes816> I think it should be expected the record might not exist
<BoomCow> there's a rescue that redirects to root_path
<BoomCow> I suppose you can do that with every query to be safe
<blazes816> eh, that sounds sketchy
katherinem13 has quit [Ping timeout: 252 seconds]
<rburton-> blazes816: why not?
<rburton-> You're making the assumption that this id exists
<BoomCow> rburton-, are you saying that's good practice?
<blazes816> i don't think that's a fair assumption
<rburton-> I am
<rburton-> blazes816 in most cases, it is
<BoomCow> one more question (outside of ruby)
<BoomCow> any tip on where I can learn mysql fast
<rburton-> BoomCow: learn SQL first
<rburton-> /user/1 assumes that user 1 exists
<rburton-> if someone is playing with the links, then that's an exceptional case
<BoomCow> is that like
<BoomCow> SELECT * FROM * WHERE
<rburton-> yes
<BoomCow> awesome
<BoomCow> that's what I want to learn
<rburton-> There's DDL, DML
<rburton-> one defines tables and objects (Sequences etc) that's called DDL (Data Definition Language)
d2dchat has joined #ruby
<JohnTeddy> I'm trying to display a chart with rows/columns 100x100, each 'cell' has a number 1-100. What is a simple/good way to output a chart like this with ruby, using a terminal, or some simple gui, or even a graphic output.. anything
<rburton-> and the other is for manipuating data
blazes816 has quit [Quit: blazes816]
<rburton-> INSERT INTO ..
<rburton-> UPDATE BLAH ..
<JohnTeddy> I don't really know what the best way is to display this data, I'm looking for ideas.
<rburton-> JohnTeddy: why not console it and just use padding
Takehiro has quit [Ping timeout: 260 seconds]
<rburton-> e.g., printf
<JohnTeddy> rburton-: Well it starts to get just a bit to big/ugly. So like numbers above 9 have two digits, so 91*2 is (182+10)+100
<JohnTeddy> So it's like 292 wide
fantazo has joined #ruby
<rburton-> Can you calculate the longest number in the grid?
g-ram has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<JohnTeddy> No number will go above 100.
artOfWar has quit [Read error: Connection reset by peer]
<rburton-> so having 100 columns that are 3 chars long is 3,000 chars ;)
artOfWar has joined #ruby
<rburton-> what about HTML then?
<BoomCow> rburton-, blazes816 ty for your help and explanation
maletor has quit [Quit: Computer has gone to sleep.]
<rburton-> you'll do well just kick ass
<BoomCow> rburton-, ty for the help and explanation
rippa has joined #ruby
<BoomCow> test
BoomCow has quit [Quit: Leaving]
BoomCow has joined #ruby
<BoomCow> :D
<rburton-> :)
<BoomCow> time for bed
<BoomCow> good night
<BoomCow> we'll grab a beer sometime
<rburton-> totally
<JohnTeddy> rburton-: I've not used ruby to output html, what is a simple/elegant method to do this?
<rburton-> file I/O :)
<rburton-> then kick open a browser
<BoomCow> file I/O + hardcoding?
vlad_starkov has quit [Remote host closed the connection]
<rburton-> "#{cell1}" etc.
<rburton-> define a function like
BoomCow has quit [Client Quit]
<JohnTeddy> right, so I'm going to output an html file, is there an elegant way to do the formatting without manually coding it?
<rburton-> print_row(cells)
vlad_starkov has joined #ruby
<JohnTeddy> I see.
djdb has joined #ruby
<rburton-> cells.each {|cell| .. } then return the row for the caller to append to the output
<rburton-> You could just model this up e.g., Cell, Row, Grid
<rburton-> so grid.add_row(Row.new(cells))
codezombie has quit [Quit: Linkinus - http://linkinus.com]
<rburton-> then grid_printer.print grid
<rburton-> def print grid do # open file then .. grid.rows.each { |row| print_row row } end
Cache_Money has quit [Quit: Leaving]
vlad_starkov has quit [Ping timeout: 252 seconds]
artOfWar has quit [Read error: Connection reset by peer]
artOfWar has joined #ruby
JonnieCache has joined #ruby
pr0ton has quit [Quit: pr0ton]
rburton- has quit [Quit: Linkinus - http://linkinus.com]
aganov has joined #ruby
Faris has joined #ruby
GeekOnCoffee has quit [Ping timeout: 244 seconds]
fantazo has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
artOfWar has quit [Read error: Connection reset by peer]
BrianJ has quit [Quit: BrianJ]
artOfWar has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
tagrudev has joined #ruby
dakine has joined #ruby
bluOxigen has joined #ruby
Rydefalk has quit [Read error: Connection reset by peer]
Rydefalk_ has joined #ruby
ryanf has joined #ruby
WhoNeedszzz has left #ruby ["P00f!"]
JohnBat26 has joined #ruby
elsifaka has joined #ruby
roadt has joined #ruby
answer_42 has joined #ruby
rippa has quit [Ping timeout: 252 seconds]
artOfWar has quit [Read error: Connection reset by peer]
artOfWar has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
cakehero has joined #ruby
mneorr has quit [Remote host closed the connection]
slainer68 has joined #ruby
dv_ has quit [Ping timeout: 260 seconds]
cakehero has quit [Client Quit]
rakl has quit [Quit: sleeping]
mneorr has joined #ruby
Mon_Ouie has quit [Ping timeout: 260 seconds]
gabrielrotbart has quit [Remote host closed the connection]
<seoaqua> how do u guys describe a software project? is there any standard graphical way?
slainer68 has quit [Ping timeout: 240 seconds]
MrSamuel has joined #ruby
tonini has joined #ruby
<RubyPanther> "describe?"
JonnieCache has quit [Ping timeout: 244 seconds]
<seoaqua> "to show to others"
<RubyPanther> I like to translate everything into ponies and woodland creature terminology.
<seoaqua> just the key ideas and the main structure of a project
<seoaqua> is there a common way? UML?
Takehiro has joined #ruby
<RubyPanther> Everybody can understand, they want to ride the pony but they don't want to scoop up its crap. A good project is all about riding, and the crap doesn't get talked about.
jaygen_ has joined #ruby
<seoaqua> i don't get it
seoaqua has left #ruby ["离开"]
<RubyPanther> People don't actually use UML, as far as I can tell, but they often use UML-ish diagrams.
nemesit has joined #ruby
seoaqua has joined #ruby
<seoaqua> accidentally pressed cmd+w
dv_ has joined #ruby
justinmcp has quit [Remote host closed the connection]
kadel has joined #ruby
jaygen has quit [Ping timeout: 252 seconds]
Takehiro has quit [Ping timeout: 260 seconds]
<RubyPanther> I don't know, I have shift control alt meta and super keys, but no cmd. Does that spawn a gnome or something?
pureluck has quit [Read error: Operation timed out]
maesbn has joined #ruby
artOfWar has quit [Read error: Connection reset by peer]
artOfWa__ has joined #ruby
jaygen_ has quit [Remote host closed the connection]
jaygen has joined #ruby
freakazoid0223 has quit [Ping timeout: 240 seconds]
irleif has joined #ruby
yxhuvud has joined #ruby
pureluck has joined #ruby
casheew has quit [Read error: Connection reset by peer]
jaygen has quit [Remote host closed the connection]
casheew has joined #ruby
workmad3 has joined #ruby
casheew has quit [Read error: Connection reset by peer]
Takehiro has joined #ruby
Axsuul has quit [Ping timeout: 268 seconds]
answer_42 has quit [Ping timeout: 276 seconds]
monkegjinni has joined #ruby
icole has quit [Remote host closed the connection]
marius has joined #ruby
casheew has joined #ruby
icole has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
<heftig> RubyPanther: cmd is a mac keyboard modifier
<RubyPanther> so you press it and the parachutes turn green?
<heftig> huh?
mneorr_ has joined #ruby
mneorr has quit [Ping timeout: 260 seconds]
d2dchat has quit [Remote host closed the connection]
artOfWa__ has quit [Read error: Connection reset by peer]
artOfWar has joined #ruby
Faris has quit [Ping timeout: 260 seconds]
chimkan___ has quit [Quit: chimkan___]
ShiintoRyuu has joined #ruby
jprovazn has joined #ruby
jgrevich has quit [Quit: jgrevich]
burgestrand has quit [Ping timeout: 268 seconds]
SCommette has quit [Quit: SCommette]
mercwithamouth has quit [Ping timeout: 276 seconds]
irleif has quit [Quit: Computer has gone to sleep.]
artOfWar has quit [Read error: Connection reset by peer]
darthdeus has joined #ruby
artOfWar has joined #ruby
Rydefalk has joined #ruby
Rydefalk_ has quit [Read error: Connection reset by peer]
blacktulip has joined #ruby
hotovson has joined #ruby
Morkel has joined #ruby
dekroning has joined #ruby
icole has quit [Remote host closed the connection]
icole has joined #ruby
codecaster has joined #ruby
emergion has joined #ruby
emergion has quit [Client Quit]
xjiujiu_ has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
xorigin has joined #ruby
artOfWar has quit [Read error: Connection reset by peer]
artOfWar_ has joined #ruby
hamed_r has joined #ruby
shtirlic has joined #ruby
Morkel_ has joined #ruby
eldariof has joined #ruby
slainer68 has joined #ruby
Morkel has quit [Ping timeout: 255 seconds]
Morkel_ is now known as Morkel
u89 has quit [Remote host closed the connection]
slainer68 has quit [Ping timeout: 260 seconds]
Vinz_` is now known as Vinz_
dr_bob has joined #ruby
u89 has joined #ruby
justinmcp has joined #ruby
irleif has joined #ruby
timonv has quit [Remote host closed the connection]
slainer68 has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
elico has joined #ruby
arturaz has joined #ruby
haxrbyte_ has joined #ruby
artOfWar_ has quit [Read error: Connection reset by peer]
filipe has joined #ruby
artOfWar has joined #ruby
dangerousdave has joined #ruby
haxrbyte has quit [Ping timeout: 265 seconds]
nohonor has joined #ruby
ij has quit [Read error: Connection reset by peer]
sspiff has joined #ruby
hoelzro|away is now known as hoelzro
u89 has quit [Remote host closed the connection]
ij has joined #ruby
slainer68 has quit [Remote host closed the connection]
heftig has quit [Read error: Connection reset by peer]
kil0byte has joined #ruby
savage- has quit [Quit: savage-]
heftig has joined #ruby
baphled has quit [Ping timeout: 248 seconds]
und3f has joined #ruby
marius has quit []
wallerdev has quit [Quit: wallerdev]
burgestrand has joined #ruby
artOfWar has quit [Read error: Connection reset by peer]
artOfWar has joined #ruby
Takehiro has quit [Remote host closed the connection]
Axsuul has joined #ruby
darthdeus has quit [Quit: Linkinus - http://linkinus.com]
Takehiro has joined #ruby
passbe has quit [Quit: WeeChat 0.3.9]
artOfWar_ has joined #ruby
passbe has joined #ruby
artOfWar has quit [Read error: Connection reset by peer]
hbpoison has joined #ruby
manizzle_ has quit [Ping timeout: 252 seconds]
bigmac has joined #ruby
Astral_ has joined #ruby
Takehiro has quit [Remote host closed the connection]
rdark has joined #ruby
Elhu has quit [Read error: Connection reset by peer]
cezar has joined #ruby
cezar has quit [Client Quit]
Astral__ has quit [Ping timeout: 256 seconds]
lukeholder has quit [Quit: Computer has gone to sleep.]
Elhu has joined #ruby
jamjam has joined #ruby
codecaster has quit [Read error: Connection reset by peer]
noxoc has joined #ruby
dangerousdave has quit [Quit: Leaving...]
codecaster has joined #ruby
eataix has joined #ruby
<seoaqua> i was ark, i meant i accidentally closed the window
<seoaqua> *afk
Morkel has quit [Quit: Morkel]
Morkel has joined #ruby
shtirlic has quit [Remote host closed the connection]
manizzle_ has joined #ruby
haxrbyte has joined #ruby
psycho_one has joined #ruby
jimeh has joined #ruby
artOfWar_ has quit [Read error: Connection reset by peer]
artOfWar has joined #ruby
haxrbyte_ has quit [Ping timeout: 260 seconds]
artnez has joined #ruby
bluOxigen has quit []
artnez has quit [Client Quit]
`gregorg` has quit [Changing host]
`gregorg` has joined #ruby
`gregorg` is now known as gregorg
jenrzzz has joined #ruby
ij has quit [Read error: Connection reset by peer]
ij has joined #ruby
jarred has joined #ruby
jarred has left #ruby [#ruby]
daniel_- has joined #ruby
ryanf has quit [Ping timeout: 256 seconds]
bigmac has quit [Quit: Leaving]
nitti has joined #ruby
ephemerian has joined #ruby
hsbt has quit [Read error: Connection reset by peer]
pcarrier has quit [Ping timeout: 240 seconds]
hsbt has joined #ruby
nitti has quit [Ping timeout: 260 seconds]
artOfWar has quit [Read error: Connection reset by peer]
artOfWar has joined #ruby
RudyValencia- has joined #ruby
robotmay has joined #ruby
RudyValencia has quit [Read error: Connection reset by peer]
sabooky has quit [Quit: leaving]
Vinz_ is now known as Vinz_`
freakazoid0223 has joined #ruby
workmad3 has joined #ruby
JonnieCache has joined #ruby
workmad3_ has joined #ruby
workmad3_ has quit [Client Quit]
pcarrier has joined #ruby
pcarrier has quit [Changing host]
pcarrier has joined #ruby
elaptics`away is now known as elaptics
slainer68 has joined #ruby
skum has joined #ruby
hamed_r has quit [Read error: Connection timed out]
nyrb has quit [Remote host closed the connection]
nyrb has joined #ruby
<JonnieCache> morning
seoaqua has quit [Ping timeout: 248 seconds]
daniel_- has quit [Quit: WeeChat 0.3.9]
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
lkba has quit [Quit: Bye]
<workmad3> morning
havenn has quit [Remote host closed the connection]
nazty has quit [Ping timeout: 260 seconds]
Neomex has joined #ruby
Neomex has quit [Client Quit]
Astral has joined #ruby
Astral is now known as Guest41863
seoaqua has joined #ruby
und3f has quit [Ping timeout: 245 seconds]
gregorg_taf has joined #ruby
tchebb has quit [Read error: Connection reset by peer]
tchebb has joined #ruby
Astral_ has quit [Ping timeout: 245 seconds]
maesbn_ has joined #ruby
xpen has quit [Remote host closed the connection]
artOfWar has quit [Read error: Connection reset by peer]
xpen has joined #ruby
gregorg has quit [Read error: Connection reset by peer]
artOfWar has joined #ruby
Rix has joined #ruby
hotovson has quit [Ping timeout: 260 seconds]
nesoi has joined #ruby
maesbn has quit [Ping timeout: 240 seconds]
klip has quit [Ping timeout: 240 seconds]
klip has joined #ruby
nari has quit [Ping timeout: 260 seconds]
<nesoi> does anyone know how a program that I ran a few hours ago can now fail with an incorrect library version when I haven't modified it or any of the libraries?
chussenot has joined #ruby
<nesoi> windows, btw
icole has quit [Remote host closed the connection]
<nesoi> C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require':
<nesoi> Incorrect MySQL client library version! This gem was compiled for 6.0.0 but the
<nesoi> client library is 5.0.18. (RuntimeError)
Xeago has joined #ruby
hotovson has joined #ruby
<nesoi> what could be going on?
<JonnieCache> bundler?
Shrink has quit [Ping timeout: 276 seconds]
tchebb has quit [Ping timeout: 260 seconds]
thisirs has joined #ruby
berserkr has joined #ruby
baphled has joined #ruby
<nesoi> JonnieCache : what do you mean?
pcpc has joined #ruby
BrianJ has joined #ruby
<nesoi> somehow it thinks active_record is incompatible with the mysql version
<nesoi> although I have not changed anything at all
<nesoi> in fact I wasn't even using the computer
fyolnish has joined #ruby
<nesoi> I just pressed up arrow twice and re-ran the program, and it crashed with that error
<nesoi> where before it ran fine
und3f has joined #ruby
pcpc has quit [Read error: Connection reset by peer]
hbpoison has quit [Ping timeout: 260 seconds]
pcuser has joined #ruby
pcuser has left #ruby [#ruby]
fir_ed has quit [Read error: Connection reset by peer]
xpen has quit [Ping timeout: 260 seconds]
pcuser has joined #ruby
goraxe has quit [Read error: Connection reset by peer]
fir_ed has joined #ruby
<Xeago> is there an up to date alternative for Markaby?
<nesoi> could active_record or active_support somehow have updated themselves?
pcuser has left #ruby [#ruby]
<nesoi> how could I tell?
<nesoi> it's very strange
goraxe has joined #ruby
alexhanh has quit [Remote host closed the connection]
seoaqua has quit [Ping timeout: 244 seconds]
timonv has joined #ruby
timmow has joined #ruby
fermion has joined #ruby
Shrink has joined #ruby
<burgestrand> nesoi: you or somebody else changed something. Computer did not go Terminator on you.
<burgestrand> nesoi: a bundle update, a new installation of mysql, things like that.
<nesoi> burgestrand : no one else uses the computer, I have only 2 command windows open, I can see the command recall and nothing has been done
<burgestrand> nesoi: you don’t have to convince me I already know your computer is not the new Skynet.
<nesoi> since I last ran this program, I have only done web browsing and viewed videos, etc.
<nesoi> oh, and converted a video using a conversion utility
<nesoi> which I've used before
<nesoi> so how would I fix the error?
<nesoi> it's really odd
<nesoi> oh wait. I know
casheew has quit [Read error: Connection reset by peer]
<burgestrand> nesoi: given the error is an incompatibility in the mysql library version between the one you have now, and the one you had when you installed the gem, I’d try reinstalling the mysql gem (or whatever gem you use for mysql).
casheew has joined #ruby
<nesoi> I started dropbox and it updated a file. nevermind :)
<nesoi> it did seem uncanny though
<Xeago> working on sourcefiles in dropbox
<Xeago> that is your issue
artOfWar has quit [Read error: Connection reset by peer]
<Xeago> use an scm
<Xeago> like git or hg
artOfWar has joined #ruby
<nesoi> Xeago : good idea, however I don't want to pay for it and I do want it to be private and I also want to be able to work on it at home and at a cafe on different machines, so what would you do?
BrianJ has quit [Quit: BrianJ]
justinmcp has quit [Remote host closed the connection]
tvw has joined #ruby
Rix is now known as Bulgaria
niklasb has joined #ruby
<Politoed> use git and dropbox :D
Villadelfia has quit [Read error: Connection reset by peer]
SeySayux has quit [Read error: Connection reset by peer]
Shrink has quit [Ping timeout: 260 seconds]
<nesoi> what do y'all think of this one? https://bitbucket.org/plans
niklasb has quit [Read error: Operation timed out]
hbpoison has joined #ruby
<nesoi> oops... gotta go. thanks all
nesoi has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
SeySayux has joined #ruby
Villadelfia has joined #ruby
kkiero has joined #ruby
nitti has joined #ruby
Androidnewbe has joined #ruby
<Androidnewbe> hi guys
artOfWar has quit [Read error: Connection reset by peer]
artOfWar has joined #ruby
morf has joined #ruby
roadt has quit [Ping timeout: 256 seconds]
nitti has quit [Ping timeout: 260 seconds]
<JonnieCache> dont keep your code in dropbox or stuff like that will keep happening :)
robertotauille has joined #ruby
nkts has joined #ruby
bier has quit [Ping timeout: 260 seconds]
samphippen has joined #ruby
Shrink has joined #ruby
bairui has quit [Ping timeout: 260 seconds]
bairui has joined #ruby
<Androidnewbe> im runnig cucumber from ruby script but it does not print anything to command line
vlad_starkov has quit [Remote host closed the connection]
hamed_r has joined #ruby
<keymone> anyone knows a good database that stores data in encrypted container?
<keymone> kind of unrelated question but the followup is: does ruby have a gem to work with it? :)
sepp2k has joined #ruby
milan59 has joined #ruby
bier has joined #ruby
<milan59> babel
zaki[] has quit [Ping timeout: 255 seconds]
artOfWar has quit [Read error: Connection reset by peer]
artOfWar_ has joined #ruby
robertotauille has quit [Read error: Connection reset by peer]
milan59 has quit [Client Quit]
JStoker has quit [Excess Flood]
hbpoison has quit [Ping timeout: 260 seconds]
bairui has quit [Quit: WeeChat 0.3.7]
bairui has joined #ruby
Virunga has joined #ruby
lkba has joined #ruby
seoaqua has joined #ruby
JohnBat26 has quit [Remote host closed the connection]
Rydefalk_ has joined #ruby
Rydefalk has quit [Read error: Connection reset by peer]
niklasb has joined #ruby
nateberkopec has joined #ruby
JStoker has joined #ruby
JohnBat26 has joined #ruby
Morkel has quit [Quit: Morkel]
JStoker has quit [Excess Flood]
maasha has joined #ruby
nateberkopec has quit [Client Quit]
JStoker has joined #ruby
<maasha> Poll: FXRuby or Shoes or something else?
icole has joined #ruby
zaki[] has joined #ruby
bairui has quit [Quit: WeeChat 0.3.7]
bairui has joined #ruby
katherinem13 has joined #ruby
heftig has quit [Quit: leaving]
icole has quit [Ping timeout: 276 seconds]
artOfWar has joined #ruby
artOfWar_ has quit [Read error: Connection reset by peer]
kkiero has quit [Read error: Operation timed out]
psycho_one has quit [Remote host closed the connection]
swex has quit [Read error: Connection reset by peer]
adambeynon has joined #ruby
swex has joined #ruby
Edward_ has joined #ruby
levicole has quit [Ping timeout: 246 seconds]
<JonnieCache> postgresql can do pretty much anything it seems
hbpoison has joined #ruby
<JonnieCache> keymone: actually thats the old docs, the new version is at http://www.postgresql.org/docs/9.2/static/encryption-options.html
preller has quit [Remote host closed the connection]
levicole has joined #ruby
<keymone> thanks, i'll check it out
elico has quit [Ping timeout: 255 seconds]
<JonnieCache> basically it has built in pgp
ahuman_ has joined #ruby
tectonic has quit [Ping timeout: 260 seconds]
undyingrage has quit [Ping timeout: 260 seconds]
yellow5 has quit [Ping timeout: 252 seconds]
ahuman has quit [Ping timeout: 244 seconds]
classix has quit [Ping timeout: 246 seconds]
fir_ed has quit [Ping timeout: 260 seconds]
zodiak has quit [Ping timeout: 260 seconds]
chendo_ is now known as chendo
xclite has quit [Ping timeout: 256 seconds]
yellow5 has joined #ruby
elico has joined #ruby
undyingrage has joined #ruby
classix has joined #ruby
JohnTeddy has quit [Ping timeout: 252 seconds]
xclite has joined #ruby
Takehiro has joined #ruby
tectonic has joined #ruby
zodiak has joined #ruby
kil0byte_ has joined #ruby
codecaster has quit [Quit: Leaving.]
hbpoison has quit [Ping timeout: 248 seconds]
JohnTeddy has joined #ruby
kil0byte has quit [Ping timeout: 268 seconds]
artOfWar has quit [Read error: Connection reset by peer]
w2f2 has quit []
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
artOfWar has joined #ruby
butblack has joined #ruby
butblack has quit [Client Quit]
strcrzy_ has joined #ruby
hamed_r has quit [Ping timeout: 240 seconds]
strcrzy has quit [Ping timeout: 256 seconds]
m4rtijn has joined #ruby
<m4rtijn> hi
wchun has quit [Ping timeout: 252 seconds]
filipe has quit [Ping timeout: 260 seconds]
lkba has quit [Ping timeout: 246 seconds]
verto|off is now known as verto
dr_bob has quit [Read error: Connection reset by peer]
dr_bob has joined #ruby
pskosinski has joined #ruby
<pskosinski> Can I somehow use Ruby in place of PHP without RoR? I would like to get a form from user, validate it, etc. Is it possible, how?
<JonnieCache> pskosinski: sinatra is probably what you want
<JonnieCache> its not quite like php in the sense of one-page-per-file
<JonnieCache> but you dont want that anyway. its about as minimal as youd ever want
<pskosinski> But I don't need any framework...
<JonnieCache> its barely a framework. it just matches urls to methods, and fires templates. it doesnt really do anything
vlad_starkov has joined #ruby
<pskosinski> I want let user put into a form an input, send, I will do something with it and display result. With Sinatra it seems much overcomplicated…
<pskosinski> Hm…
<JonnieCache> if you really want no framework, you could write a bare rack application
niklasb has quit [Ping timeout: 245 seconds]
alanp_ has quit [Read error: Connection reset by peer]
artOfWar has quit [Read error: Connection reset by peer]
kylemcgill has quit [Remote host closed the connection]
alanp has joined #ruby
oponder has joined #ruby
artOfWar has joined #ruby
filipe_ has joined #ruby
larissa has joined #ruby
jdripper has joined #ruby
jipiboily has joined #ruby
lkba has joined #ruby
<Androidnewbe> how can i run command for command line fomr ruby script ?
ij has quit [Read error: Connection reset by peer]
<pskosinski> `ls -lh` or x{ls -lh}
<pskosinski> iirc
ij has joined #ruby
seoaqua has quit [Quit: 离开]
<JonnieCache> or system(command)
AndChat| has joined #ruby
AndChat| has quit [Read error: Connection reset by peer]
hamed_r has joined #ruby
lkba has quit [Ping timeout: 244 seconds]
<pskosinski> And how am I getting post input in Sinatra…
<JonnieCache> pskosinski: its in the params hash
<JonnieCache> just call the "params" method
<Androidnewbe> in my scrpi ihave #!/bin/env ruby and next line 'cucumber'
<Androidnewbe> it works but it does not print the out put to terminal
<pskosinski> Thank you, need to try. :)
<JonnieCache> Androidnewbe: try it with system() instead of ``
lkba has joined #ruby
elico has quit [Quit: elico]
<Takehiro> i thought i could get a hash which has 1~5 in the values by doing arr = [1..5]
<Takehiro> i cant...?
<Androidnewbe> thanks JonnieCache
<burgestrand> Takehiro: what would the keys be?
<Takehiro> 0,1,2,3,4 is fine
oponder has quit [Remote host closed the connection]
<Takehiro> arr[0] = 1 arr[1] = 2
<Takehiro> and so on..
<Takehiro> burgestrand:
<burgestrand> Takehiro: [1..5] is an array containing one element, [*1..5] is an array containing five elements
<burgestrand> Takehiro: neither of them are a hash
classix has quit [Ping timeout: 246 seconds]
<Takehiro> oooo i have to use *
<Takehiro> what would be arr[0] if arr = [1..5] ?
<Takehiro> 1..5?
<burgestrand> Takehiro: you could also do (1..5).to_a, or Array(1..5)
<burgestrand> Takehiro: yep
<burgestrand> Takehiro: [1..5][0] == 1..5, which is a Range
<Takehiro> u mean a Range class object,,?
<burgestrand> Takehiro: an instance of Range
<JonnieCache> oooh apparently the nested set model is now officially for noobs: http://explainextended.com/2009/09/24/adjacency-list-vs-nested-sets-postgresql/
<Takehiro> oo i c
<Xeago> is it possible to treat a range as an array?
<Takehiro> wow thx man :) burgestrand
<Takehiro> oo thx
<burgestrand> Xeago: a range has no to_ary, so it should not be considered compatible with an array
ltsstar has joined #ruby
robotmay has quit [Remote host closed the connection]
heftig has joined #ruby
<Takehiro> burgestrand: whats to_a then,,,?
<burgestrand> Takehiro: it’s a methos of Range, that converts it into an array
<Takehiro> oh it converts it to a hash..?
<Takehiro> oh ok
tintin has joined #ruby
<burgestrand> Takehiro: it comes from Enumerable
<tintin> What is config.ru ?
<Takehiro> thx burgestrand :)
<tintin> How to run config.ru ?
<burgestrand> tintin: a rackup config file
<tintin> What is rackup config file?
<tintin> How to run it?
<burgestrand> tintin: http://rack.github.com/
<workmad3> Xeago: a range is enumerable, not an array :)
<workmad3> Xeago: an array is also enumberable
<csmrfx> Suppose I have a string foo, and an array bar with string. Oneliner to test if any (str) item in arr bar matches some part of string foo?
classix has joined #ruby
<burgestrand> tintin: sometimes it is executable, but most of the time you install the rack gem and start the config.ru with the "rackup" command
<burgestrand> csmrfx: check out Array#any?
<burgestrand> (also comes from Enumerable, btw)
<tintin> burgestrand: like , rackup config.ru ?
<csmrfx> Ah, how nice of you, burgestrand
<csmrfx> thank you 8)
<burgestrand> tintin: yes that should work
chussenot has quit [Quit: chussenot]
artOfWar_ has joined #ruby
jipiboily has left #ruby [#ruby]
love_color_text has quit [Remote host closed the connection]
artOfWar has quit [Read error: Connection reset by peer]
chussenot has joined #ruby
yalue has joined #ruby
<tintin> burgestrand: But , gem install rackup doesn't do anything
<burgestrand> tintin: the gem is names "rack"
demet8 has joined #ruby
Xeago_ has joined #ruby
psycho_one has joined #ruby
<pskosinski> In Sinatra, can I place template in same file as routes...?
<tintin> burgestrand: That is installed.
<burgestrand> pskosinski: yes
<Androidnewbe> if i create environmental variable in command line like this set BrawserType = 0; what is its type ?
<tintin> Is rack installed by defautl with ruby?
<burgestrand> Link coming up
Artheist has joined #ruby
<Androidnewbe> is it int or string ?
<burgestrand> tintin: no
<burgestrand> Androidnewbe: string
<tintin> I have installed rack before then.
GeekOnCoffee has joined #ruby
<burgestrand> pskosinski: http://www.sinatrarb.com/intro.html#Inline%20Templates
<csmrfx> Just in case: is return within if-clause a "proper way" to exit from a method to caller?
carloslopes has joined #ruby
<burgestrand> csmrfx: this is ruby, it is *a* way.
<Androidnewbe> of if i have a loop in rurby like for i in (0..10) do ENV["BrowserType"] = i end how can i make it work
<Androidnewbe> convert i to string ?
<Androidnewbe> i.string ?
<csmrfx> (keep trying to write ecmascript after a long ecma job so I ask simple stuff)
<burgestrand> Androidnewbe: yep. Ruby won’t allow you to set ENV[anything] to a number.
Vinz_` is now known as Vinz_
<burgestrand> Androidnewbe: i.to_s
<tintin> How do you run ruby rack based website on windows?
Paradox has quit [Read error: Operation timed out]
<burgestrand> tintin: using rackup.
Paradox has joined #ruby
<pskosinski> burgestrand: Thank you. :)
mpereira has joined #ruby
<burgestrand> pskosinski: :)
<burgestrand> pskosinski: ruby is very different to PHP, it can be confusing at times.
Xeago has quit [Ping timeout: 260 seconds]
<tintin> burgestrand: rackup is not a webserver
kil0byte has joined #ruby
<burgestrand> tintin: no, but it will start one.
<tintin> Which webserver do you use on windows to run ruby website?
<pskosinski> yeah, I was never writing "web app" in Ruby…
zf_ is now known as zf
<burgestrand> tintin: WEBrick by default, but it can start just about any rack-enabled webserver.
<tintin> like apache or other
<tintin> burgestrand: I know what webrick or rackup does on console, but i'm talking about dedicated webserver
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
<burgestrand> tintin: you don’t run ruby in apache; most often you run it on a webserver like webrick, or thin, or puma, or whatever, and proxy requests from apache or possibly using fcgi.
<Androidnewbe> hmmm
<burgestrand> tintin: you can also have a look at passenger, but I have no idea if that runs on windows, it’s pretty much the same thing though.
daniel_- has quit [Ping timeout: 260 seconds]
<burgestrand> tintin: but, for pretty much all setups, ruby run it’s own webserver with webrick or similar. No idea what you mean by dedicated.
<Androidnewbe> if ENV["BrowserType"] == '0' is this correct ?
<burgestrand> Androidnewbe: sure.
gregorg_taf has quit [Changing host]
gregorg_taf has joined #ruby
gregorg_taf is now known as gregorg
kil0byte_ has quit [Ping timeout: 264 seconds]
<Androidnewbe> so something is wrong
<tintin> How do you run ruby website on windows except webrick and rackup ?
jipiboily has joined #ruby
<burgestrand> Somebody else take him.
rafter has joined #ruby
<burgestrand> >.>
* burgestrand coughs
<Androidnewbe> hmmm
d3vic3 has joined #ruby
eph3meral has joined #ruby
hbpoison has joined #ruby
<Androidnewbe> is i set up environmental varialbe in command line does it only exist till i reboot the machine ?
<burgestrand> Androidnewbe: probably only until you close the terminal.
vickaita has joined #ruby
chussenot has quit [Quit: chussenot]
mark_locklear has joined #ruby
[Neurotic] has quit [Remote host closed the connection]
<Androidnewbe> ohhhhh
<Androidnewbe> didn'know
<Androidnewbe> thanks
<pskosinski> But... I can tell Apache/Lighttpd to interpret some files with Ruby interpreter. Can't I access a global array like in PHP, $_SERVER or like this? That would be best for so simple thing as I want to do...
<burgestrand> pskosinski: how would you tell apache/lighttpd to interpret the files? The only way I know of is running them with the interpreter using CGI.
<pskosinski> Hm... yes
nemesit has quit [Quit: Linkinus - http://linkinus.com]
<burgestrand> pskosinski: personally I avoid CGI, it tends to be more complicated than the alternatives in ruby. Most common way to run web applications in ruby is to run them *inside* the webserver, that itself is also ruby: like webrick, or thin, or puma, or perhaps phusion passenger.
<burgestrand> pskosinski: this is different from PHP, where the webserver is separate and only runs the php script.
<pskosinski> Ok…
enroxorz-work has joined #ruby
<pskosinski> So Sinatra won't work from CGI?
maasha has quit [Quit: Page closed]
<burgestrand> pskosinski: no idea, trying to find out if rack works with cgi.
<pskosinski> Hm...
<tintin> How does rack get the form request value from env ?
<Androidnewbe> how do i remove the evn varaible ?
<Androidnewbe> delete <varaiblename> ?
<tintin> Who sets/updates/initialize the env variables
skaczor has joined #ruby
hbpoison has quit [Ping timeout: 265 seconds]
skaczor has quit [Remote host closed the connection]
geekbri has joined #ruby
love_color_text has joined #ruby
<burgestrand> Androidnewbe: ENV.delete(key)
<Androidnewbe> is this from command line ?
iamjarvo has joined #ruby
<burgestrand> tintin: you set the env variables, rack gets the form request from the request itself.
<pskosinski> Well, I have a static website. I can tell lighttpd to interpret a file with Ruby so I can generate something from Ruby... And I want to make a script on that website but I need to get user input...
<burgestrand> Androidnewbe: I thought you were asking about ruby. In the console you can do… unset VARNAME
<tintin> burgestrand: question is: how does rack get the value internally from server? i/users just type the value in textbox of a form
<Androidnewbe> thanks
artOfWar_ has quit [Remote host closed the connection]
<burgestrand> tintin: when the form is sent, a request is sent to the server, which itself is running rack; rack is *in* the webserver
artOfWar has joined #ruby
squidz has joined #ruby
irleif has quit [Quit: Computer has gone to sleep.]
<pskosinski> So I would just need to use different webserver? ^^ So maybe I will just use PHP…
<tintin> burgestrand: rack is in the webserver? how? does webbrick runs rack internally?
<tintin> What do you mean?
<eph3meral> pskosinski: I think you should just use rails
<eph3meral> pskosinski: then apache is irrelevant
<eph3meral> or maybe sinatra if you like, which is rack based
<mfridh> is there any specific ruby version where "func1.func2\n.func3" started working? Trying the FnordMetric gem and my ruby is bailing all over the place on these linebreaks
<squidz> I have this file http://www.monkeywalk.com/wp/wp-content/uploads/2011/07/progressive-dictionary.txt and I want get some of the lines into my sqlite DB I thought the easiest way would be converting that file to csv, but that's where im stuck. I need the columns: |word|definition|pronounciation| meaning that I would ignore the additional phrases(all other lines besides the numbered lines and the line following a numbered line) can somebody give me some tips?
daniel_- has joined #ruby
<mfridh> ugh, seems like 1.9.1
<eph3meral> mfridh: I didn't think that worked, in any version
v0n has quit [Ping timeout: 260 seconds]
<eph3meral> mfridh: at least in 1.9.3 you must keep the dot at the end of line
jonathanwallace has quit [Remote host closed the connection]
<mfridh> eph3meral: I had no idea either until now; http://ruby.about.com/od/newinruby191/qt/dotsyntaxchange.htm
<csmrfx> tintin scroll back and carefully copypaste what he answered and read again and google until you understand
v0n has joined #ruby
<Androidnewbe> if i do puts(ENV["BrowserType"]) it does not print anything
<csmrfx> squidz: well, use a csv importer?
<squidz> eph3meral: im not at the point yet where i am going to write the csv, i need help processing the file i gave, because I have to exclude some lines and separate some words
<Androidnewbe> tired also puts(ENV["BrowserType"].to_s)
filipe_ has quit [Ping timeout: 260 seconds]
jonathanwallace has joined #ruby
<csmrfx> squidz: (to import data into ruby, save as plain "clean" csv, load into sqlite2)
<csmrfx> *3
<Androidnewbe> so the condition if ENV["BrowserType"].to_s == '0' wont work
<tintin> csmrfx: he didn't answer my last question, the inner works of rack
<csmrfx> tintin: so?
jonathanwallace has quit [Remote host closed the connection]
<Androidnewbe> oh shit wait
<Androidnewbe> my falut
<squidz> csmrfx: Yes i know that, but like I said, that isnt yet my problem, my question is processing my text file to get it into the csv layout that I want. I know I can use the csv library when I am ready, but I need to do some processing on the file first. The processing is where im stuck
<tintin> csmrfx: so what are you trying to say to me?
dekroning has quit [Ping timeout: 255 seconds]
ltsstar has quit [Quit: ltsstar]
<csmrfx> squidz: if a csv importer cant handle the whitespace, just read that line-by-line and split-by-whitespace or regex-columns
<csmrfx> tintin: stop typing, start reading.
<squidz> some of the lines look like this "的 [de] of; stru....", and I need the chinese word to be a separate column, the [de] to be a separate column, then the rest of the line as yet another column
<eph3meral> squidz: text processing is like, pretty close to the most basic task in computer programming
<tintin> tintin: when the form is sent, a request is sent to the server, which itself is running rack; rack is *in* the
<eph3meral> squidz: sounds like maybe you should start here: http://ruby-doc.org/core-1.9.3/String.html
<tintin> tintin: when the form is sent, a request is sent to the server, which itself is running rack; rack is *in* the webserver
<tintin> csmrfx: ARe you talking about this? ^
<squidz> eph3meral: yes, I know, I am new to ruby, I normally programm java and haskell. With haskell I would do this with the parser called parsec, and with java probably regex. So would you also use regex in ruby for a case like this?
psycho_one has quit [Remote host closed the connection]
<eph3meral> squidz: sure, regex will probably work
jeffreybaird has joined #ruby
ttt has quit [Remote host closed the connection]
<squidz> eph3meral: yes im not asking what will probably work , I know it will work, i am asking what is the preferred/best standard for this
skaczor has joined #ruby
<eph3meral> squidz: for parsing extremely domain specific and non-standardly formatted data?
fixl has joined #ruby
<eph3meral> there isn't one, it's called Your Own Ingenuity ™ :)
<squidz> yes
<squidz> alright, then I guess I will have to use regex, I just would have rather not have. I guess there is no other big alternatives for a problem like this?
<JonnieCache> dont turn your nose up at billable hours
<JonnieCache> ;)
<eph3meral> ++
Monie has quit [Ping timeout: 244 seconds]
moshee has quit [Ping timeout: 260 seconds]
irleif has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
Axsuul has quit [Ping timeout: 260 seconds]
banisterfiend has joined #ruby
krawchyk has joined #ruby
<banisterfiend> anyone here got anyone here got 'practical object oriented programming' http://www.poodr.info/book/ is it good?
jrist-afk is now known as jrist
<tintin> banisterfiend: http://www.poodr.info/book/ , is it you?
<banisterfiend> tintin: no...
<banisterfiend> i want to know if it's worth buying
<banisterfiend> tintin: nice conspiracy theory, though ;)
vickaita has quit [Read error: Operation timed out]
flip_digits has joined #ruby
artOfWar has quit [Read error: Connection reset by peer]
MrSamuel has quit [Quit: MrSamuel]
artOfWar has joined #ruby
<mfridh> ok anyone using RVM alot? can I make it completely skip the system gems in a simple manner?
tintin has left #ruby [#ruby]
<eph3meral> mfridh: /join #rvm
<eph3meral> they know
filipe_ has joined #ruby
<eph3meral> wayne is actually around on a regular basis, and decently helpful
<mfridh> yeah thanks
nyuszika7h has quit [Read error: Connection reset by peer]
nyuszika7h has joined #ruby
<burgestrand> eph3meral: you can too put the dot on another line in 1.9.3
daniel_-_ has joined #ruby
<burgestrand> not just 1.9.1:)
<eph3meral> burgestrand: ah, ok nm then
Cultofmetatron has joined #ruby
daniel_- has quit [Ping timeout: 260 seconds]
Cultofmetatron has quit [Remote host closed the connection]
kil0byte_ has joined #ruby
tk__ has joined #ruby
<csmrfx> A hash of strings. Puts -ing each how?
instinkt has joined #ruby
daniel_-_ has quit [Ping timeout: 260 seconds]
<burgestrand> csmrfx: what?
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
<eph3meral> strings.each { |k,v| puts v }
<eph3meral> would by my guess
pureluck has left #ruby [#ruby]
<eph3meral> although
<eph3meral> pp strings
<eph3meral> would be better (gem install pry)
<csmrfx> yes, that is the "normal" way
<eph3meral> pp rocks
<csmrfx> b.. bu... but isn't there a ruby syntactic sugar way something like: strings.each(*puts)
kil0byte has quit [Ping timeout: 268 seconds]
<eph3meral> unfortunately not with puts, no
<pskosinski> So... problem is that I can't run lighttpd and other web server for one domain... Or Can I?
<banisterfiend> csmrfx: strings is a hash ?
<eph3meral> because there's no v.puts
<banisterfiend> eph3meral: there's v.display though
samphippen has quit [Quit: Computer has gone to sleep.]
<eph3meral> banisterfiend: ahh, good one
<eph3meral> is that on Object?
<banisterfiend> Kernel yeah
<eph3meral> k
seanyo has joined #ruby
nateberkopec has joined #ruby
<banisterfiend> eph3meral: it doesnt have trailing newline though
<banisterfiend> it's like print
<banisterfiend> rather than puts
chussenot has joined #ruby
<eph3meral> ahh
elico has joined #ruby
<banisterfiend> $ Kernel#display
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
noxoc1 has joined #ruby
x0F_ is now known as x0F
hbpoison has joined #ruby
enroxorz-work has quit [Read error: Connection reset by peer]
verto is now known as verto|off
mpereira has quit [Read error: Connection reset by peer]
noxoc has quit [Ping timeout: 256 seconds]
F1skr has joined #ruby
enroxorz-work has joined #ruby
artOfWar has quit [Read error: Connection reset by peer]
artOfWar has joined #ruby
baphled has quit [Ping timeout: 265 seconds]
filipe_ has quit [Ping timeout: 260 seconds]
afader has joined #ruby
afader has joined #ruby
afader has quit [Changing host]
Rydefalk has joined #ruby
Rydefalk_ has quit [Read error: Connection reset by peer]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
Rydefalk has quit [Read error: Connection reset by peer]
d3vic3 has quit [Ping timeout: 252 seconds]
Rydefalk has joined #ruby
awarner has joined #ruby
<burgestrand> pskosinski: what you typically do is run your main server in the front (e.g. lighttpd, nginx, apache), and for requests matching a certain pattern are proxied to another server running on another port
Vinz_ is now known as Vinz_`
d3vic3 has joined #ruby
<burgestrand> pskosinski: I found out you can run pretty much any rack-enabled web framework (or just a raw rack app) through CGI though
Rydefalk_ has joined #ruby
Morkel has joined #ruby
Rydefalk has quit [Read error: Connection reset by peer]
nateberkopec has quit [Quit: Leaving...]
<burgestrand> (no idea exactly how, but it’s doable ^^)
<pskosinski> Thank you. :)
<pskosinski> It's complicated as hell for so simple as I want to do. I will just use PHP…
casheew has quit [Read error: Connection reset by peer]
<pskosinski> so simple app *
casheew has joined #ruby
jcaudle has joined #ruby
casheew has quit [Read error: Connection reset by peer]
demet8 has quit [Quit: demet8]
Iszak has joined #ruby
Iszak has quit [Changing host]
Iszak has joined #ruby
nyuszika7h has quit [Quit: Here we are, going far to save all that we love - If we give all we've got, we will make it through - Here we are, like a star shining bright on your world - Today, make evil go away!]
Shrink has quit [Ping timeout: 246 seconds]
dev_ryan70 has joined #ruby
jipiboily has left #ruby [#ruby]
awarner has quit [Remote host closed the connection]
nyuszika7h has joined #ruby
ffranz has joined #ruby
casheew has joined #ruby
v0n has quit [Ping timeout: 260 seconds]
filipe_ has joined #ruby
v0n has joined #ruby
Morkel has quit [Quit: Morkel]
Rydefalk has joined #ruby
Artheist has quit [Remote host closed the connection]
Rydefalk_ has quit [Read error: Connection reset by peer]
nitti has joined #ruby
macabre has joined #ruby
kil0byte has joined #ruby
iamjarvo has quit [Quit: Computer has gone to sleep.]
dr_bob has quit [Quit: Leaving.]
answer_42 has joined #ruby
Rydefalk has quit [Read error: Connection reset by peer]
Rydefalk has joined #ruby
GoGoGarrett has joined #ruby
sspiff has quit [Remote host closed the connection]
kil0byte_ has quit [Ping timeout: 248 seconds]
artOfWar has quit [Read error: Connection reset by peer]
artOfWar has joined #ruby
jrajav has joined #ruby
nitti has quit [Ping timeout: 260 seconds]
jeffreybaird has quit [Quit: jeffreybaird]
v0n has quit [Ping timeout: 260 seconds]
Xeago_ has quit [Remote host closed the connection]
rafter has quit [Remote host closed the connection]
Shrink has joined #ruby
<JonnieCache> can someone explain to me what this is doing?
<JonnieCache> `class Publication < Sequel::Model(DB[:publications].order(:sort_order, :id))`
Coolhand has quit [Remote host closed the connection]
<JonnieCache> is that parameter being passed to the inherited method on the Sequel::Model class
robotmay has joined #ruby
nanderoo has joined #ruby
solirc has joined #ruby
<csmrfx> How to define hash key within a hash under a key when former is dynamically defined string?
<csmrfx> ie. conceptually: foo[ static ][ sum-running-str ] { etc }
<solirc> Is there a more idiomatic way to achieve this: http://hpaste.org/77060
<JonnieCache> csmrfx: just as you would imagine
lxsameer has joined #ruby
d2dchat has joined #ruby
<JonnieCache> hash[:symbol][variable] = "foo" or hash[variable][:symbol] = "foo" are both fine
<arturaz> solirc, a += b; b.clear
joofsh has joined #ruby
<solirc> arturaz: ah, thanks
<lxsameer> how can i pack all the parameters of a method in a hash, some thing like python's **kwargs
<csmrfx> hm, I get strange errors
rafter has joined #ruby
<solirc> arturaz: oh, wait
<arturaz> lxsameer, def foo(last={})
<solirc> than won't modify the array
<arturaz> and then foo(bar: 'baz')
<solirc> it creates a new one
dhruvasagar has quit [Ping timeout: 264 seconds]
<solirc> so it is not the same
enroxorz-work has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<burgestrand> JonnieCache: Sequel::Model becomes a method in this case. Whatever that returns is the superclass of the Publication.
<solirc> I need to actually modify a and b
nateberkopec has joined #ruby
enroxorz-work has joined #ruby
<JonnieCache> burgestrand: riiight. so how the hell have we ended up in that state?
<burgestrand> lxsameer: ruby’s parameters are not necessarily named, you can inspect the parameters of a method if you have it’s instance though but I don’t believe the names are available there.
<burgestrand> JonnieCache: beats me. :)
<JonnieCache> ahh, with module Sequel; def self.Model
Cultofmetatron has joined #ruby
<JonnieCache> simple as that
<JonnieCache> thats some tricky shit right there
dhruvasagar has joined #ruby
chussenot has quit [Remote host closed the connection]
<burgestrand> Ah, I thought you asked what drove the design decision.
ananthakumaran has quit [Quit: Leaving.]
<csmrfx> JonnieCache: ok, that only wokss if the former hash already exists
<JonnieCache> csmrfx: indeed
Coolhand has joined #ruby
<JonnieCache> burgestrand: oh and apparently just under that is class Model
<burgestrand> lxsameer: actually, it does expose the names, that is cool.
<JonnieCache> and in the self.Model method it returns Class.new(Model)
<JonnieCache> clever bastards
<burgestrand> JonnieCache: a subclass of Model it is :)
<lxsameer> burgestrand: i think you misunderstand me, for example , we have a method called A, i want to call that when any parameter name i want for example : A(:z=>1,:x=>2) or A(:foo=>"bar")
<burgestrand> lxsameer: you can call it that way, except you only receive one parameter in both your examples, and that is a hash.
<lxsameer> burgestrand: ok that's what i want
<burgestrand> lxsameer:
<burgestrand> lxsameer: http://ideone.com/jeURJ0
eataix has quit [Quit: ZNC - http://znc.in]
nari has joined #ruby
<burgestrand> lxsameer: http://ideone.com/Wc5k2k
<lxsameer> burgestrand: thanks man
<burgestrand> lxsameer: you can have any number of required parameters before that as well.
dr_bob has joined #ruby
<lxsameer> burgestrand: i see
<burgestrand> lxsameer: but there is nothing special about the parameter itself; once ruby notices you are passing hash syntax in a method call it bunches them all up into one hash and passes it as one parameter.
m4rtijn is now known as gay-man
<gay-man> hallo
<burgestrand> lxsameer: for this reason, it can become quite convoluted if you accept two or more options hashes in this way, in which case you’ll need to surround the call with brackets: moo({ "a" => "b" }, { "b" => "c" }) becomes two parameters, while moo("a" => "b", "b" => "c") becomes one parameter.
gay-man is now known as martijnchen
<martijnchen> php rules
* burgestrand shrugs
<lxsameer> burgestrand: thanks man
solirc has left #ruby ["WeeChat 0.3.2"]
<burgestrand> lxsameer: you’re welcome
samphippen has joined #ruby
dmerrick has joined #ruby
macabre has quit [Remote host closed the connection]
Xeago has joined #ruby
cdzombak has joined #ruby
ttt has joined #ruby
artOfWar has quit [Read error: Connection reset by peer]
artOfWar has joined #ruby
nemesit has joined #ruby
<csmrfx> I have a method that gets an arg _u (which I test puts and it outputs string contents). Why does $result[ _u ] give: undefined local variable or method `_u ' for main:Object (NameError)
love_color_text has quit [Remote host closed the connection]
<csmrfx> (the test puts is on the line before)
lxsameer has quit [Quit: Leaving]
<burgestrand> csmrfx: show your code.
irleif has quit [Quit: Computer has gone to sleep.]
<csmrfx> had result[ _u ] and ruby got angry at me.
<csmrfx> changed to result[_u] and now it works.
* csmrfx ?
<burgestrand> Both works fine for me.
ttt has quit [Ping timeout: 240 seconds]
F1skr has quit [Quit: WeeChat 0.3.9]
<burgestrand> Interestingly enough, so does "result [ _u ]", looks weird.
martijnchen is now known as m4rtijn
<csmrfx> I have a theory involving a haphazard ctrl+space before or after _u, but have to hurry due to job
<burgestrand> Yeah, non-breaking spaces can creep in at times.
<burgestrand> Ruby won’t like those.
<burgestrand> Disabled them on my keyboard.
g_bleezy has joined #ruby
thisirs has quit [Ping timeout: 240 seconds]
sambio has joined #ruby
thisirs has joined #ruby
irleif has joined #ruby
invisime has joined #ruby
Iszak has quit []
rjsamson has joined #ruby
jblack has joined #ruby
ffranz1 has joined #ruby
ffranz has quit [Quit: Leaving]
filipe_ has quit [Ping timeout: 260 seconds]
philcrissman has joined #ruby
hbpoison has quit [Ping timeout: 276 seconds]
daniel_-_ has joined #ruby
macabre has joined #ruby
thisirs has quit [Ping timeout: 244 seconds]
kpshek has joined #ruby
codefyre has joined #ruby
vlad_sta_ has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
Androidnewbe has quit [Read error: Operation timed out]
rjsamson has quit [Remote host closed the connection]
rjsamson has joined #ruby
fermion has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
hbpoison has joined #ruby
lkba has quit [Ping timeout: 244 seconds]
<pskosinski> Ruby is dead -.-
vlad_sta_ has quit [Ping timeout: 244 seconds]
<banisterfiend> pskosinski: why is dat
<pskosinski> Is there any developed GUI library for Ruby?
yeggeps has quit [Quit: yeggeps]
jlwestsr has joined #ruby
<banisterfiend> pskosinski: macruby
rjsamson has quit [Ping timeout: 252 seconds]
<pskosinski> I'd like somesthing working on Linux and Windows ^^
jeffreybaird has joined #ruby
<burgestrand> pskosinski: shoes.
<burgestrand> pskosinski: but as far as I know, ruby has limited use when it comes to developing GUI applications.
artOfWar has quit [Read error: Connection reset by peer]
<burgestrand> rubymotion should be interesting if you are looking at iOS however.
artOfWar has joined #ruby
thisirs has joined #ruby
<pskosinski> Sad :(
love_color_text has joined #ruby
dev_ryan70 has quit [Remote host closed the connection]
mikepack has joined #ruby
hamed_r has quit [Quit: Leaving]
lkba has joined #ruby
filipe_ has joined #ruby
<pskosinski> I <3 it. But looks like it is only for Web and terminal apps
djbpython has joined #ruby
shtirlic has joined #ruby
daniel_-_ has quit [Read error: Connection reset by peer]
dev_ryan70 has joined #ruby
<banisterfiend> pskosinski: it has QT bindings
dev_ryan70 has quit [Client Quit]
berserkr has quit [Quit: Leaving.]
<pskosinski> Hm... so now I just need to stop hating Qt. :P
SCommette has joined #ruby
ZubKonst_ has joined #ruby
rjsamson has joined #ruby
<pskosinski> But looks a bit dead too, last release year ago…
dev_ryan70 has joined #ruby
dhruvasagar has quit [Ping timeout: 244 seconds]
Mon_Ouie has quit [Ping timeout: 256 seconds]
<Xeago> you could go JRuby and use springs and stuff
<djbpython> hi all can anyone tell me how i can do this: https://gist.github.com/3987185
dr_bob has quit [Quit: Leaving.]
<invisime> how do I take a fixnum and convert it to a string with that byte representation? e.g. h = 0x1020; str = #returns "\x10\x20"
<djbpython> i basically want to turn an enumerable of objects into an enumerable of hashes where the hash keys are object attribute values
ZubKonst has quit [Ping timeout: 252 seconds]
<djbpython> not sure what to google
dhruvasagar has joined #ruby
erry has joined #ruby
<burgestrand> invisime: 0x1020 != 0x10x20
marten_ has joined #ruby
dev_ryan70 has quit [Remote host closed the connection]
nitti has joined #ruby
<invisime> burgestrand: then is there some way for me to write individual bytes to a named pipe?
BombAw has joined #ruby
awarner has joined #ruby
psycho_one has joined #ruby
Voxxit has quit [Ping timeout: 246 seconds]
BombStrike has quit [Ping timeout: 246 seconds]
BombAw is now known as BombStrike
BombStrike has quit [Changing host]
BombStrike has joined #ruby
<burgestrand> invisime: [0x20].pack("C*") # => " "
marten has quit [Ping timeout: 246 seconds]
dr_bob has joined #ruby
marten_ has quit [Client Quit]
`Mew_ has quit [Read error: Connection reset by peer]
stopbit has joined #ruby
<squidz> how can I define multine line string literals with utf-8 characters
Whackatre has joined #ruby
Whackatre has quit [Changing host]
Whackatre has joined #ruby
<burgestrand> invisime: except 0x1020 does not fit in one byte
<invisime> right. it should be two.
Voxxit has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
mikepack has quit [Remote host closed the connection]
<burgestrand> invisime: ah, I understand what you want now. Originally thought you were playing around with characters.
<invisime> burgestrand: Array#pack is what I was looking for.
<invisime> I was expecting it to be in String or Fixnum.
<burgestrand> :)
<burgestrand> Yeah it’s a bit confusing.
dhruvasagar has joined #ruby
<invisime> burgestrand: oh. and it looks like this'll use my native endian-ness. eeexcellent. I'm reading from this pipe with C code on the other end, so that'll help. XD
<squidz> im getting an 'unexpected $end, expecting ')'' when i run: processLine ("2. 一")
<squidz> whats wrong with my string?
instinkt has quit [Quit: leaving]
iamjarvo has joined #ruby
<burgestrand> squidz: tried without the space between the method and parameters?
<squidz> burgestrand: yes same
<burgestrand> squidz: runs fine here. The error is not in the code you posted.
<squidz> hm
SCommette has quit [Quit: SCommette]
<squidz> burgestrand: here's my code http://hpaste.org/77064
twopoint718 has joined #ruby
twopoint718 has joined #ruby
twopoint718 has quit [Changing host]
artOfWar has quit [Read error: Connection reset by peer]
<burgestrand> squidz: runs without syntax errors here.
<burgestrand> squidz: look for invisible characters.
artOfWar has joined #ruby
jaygen has joined #ruby
<burgestrand> squidz: if you are on a mac, you can accidentally type non-breaking space characters using ALT-SPACE which will trip ruby up.
<squidz> burgestrand: im using linux
<burgestrand> squidz: you are missing the point.
tomsthumb has quit [Quit: Leaving.]
<burgestrand> squidz: it was just an example.
atmosx has joined #ruby
samuel02 has joined #ruby
m4rtijn has quit [Quit: Verlassend]
postmodern has quit [Quit: Leaving]
<squidz> still not finding any hidden characters
vickaita has joined #ruby
Russell^^ has joined #ruby
F1skr has joined #ruby
<burgestrand> squidz: copy the code from your paste, and paste it in your script.
philips_ has quit [Excess Flood]
codefyre has quit [Quit: Leaving]
jaygen has quit [Ping timeout: 252 seconds]
<squidz> burgestrand: after pasting, i still have the error
atmosx has left #ruby [#ruby]
<burgestrand> squidz: I don’t. Perhaps you are using an old ruby version?
<burgestrand> squidz: 1.8.x and down is considered old.
pskosinski has left #ruby ["Whatever"]
<squidz> im usint 1.9.2
<burgestrand> squidz: no idea if it could really have an impact, the syntax looks correct to me.
<burgestrand> And the code runs.
<burgestrand> squidz: …
<burgestrand> squidz: you didn’t paste the full error did you.
<squidz> sorry 1.9.3
v0n has joined #ruby
tallow has joined #ruby
philips_ has joined #ruby
<samuel02> I have an array with 'unknown' elements. How can I get a slice of the array from a given element and two elements to the left. So array = [0,1,2,3,4], element = 4 gives slice [2,3,4] but array = [0,1], element = 1 gives slice [0,1]
<squidz> here is the full error
<squidz> ChDictParse.rb:7: invalid character property name {Lo}: /^\p{Lo}\s/
<squidz> ChDictParse.rb:13: invalid multibyte char (US-ASCII)
<squidz> ChDictParse.rb:13: invalid multibyte char (US-ASCII)
<squidz> ChDictParse.rb:13: syntax error, unexpected $end, expecting ')' processLine("2. 一")
<hoelzro> squidz: please read the channel topic.
<burgestrand> squidz: you use hpaste for code but not for that?
<squidz> yes it was four lines
<burgestrand> squidz: >3 lines. anyhow, your error is because ruby believes your code is in US-ASCII encoding but it is not.
<squidz> so how do i fix the encoding problem
<burgestrand> squidz: declare the encoding of your file with a comment at the top of the file: "# encoding: utf-8"
<burgestrand> squidz: I assume your encoding is UTF-8? It worked for me at least, and mine defaults to UTF-8.
<samuel02> element will always be in the array
<squidz> burgestrand: ah thanks that did the trick
<heftig> samuel02: idx = array.index(elem); slice = array[[0,idx].max .. idx]
<samuel02> heftig, thanks!
Serial_Killer_C has joined #ruby
<heftig> er,oops
prezioso has joined #ruby
<heftig> should be [0,idx-2].max
<samuel02> yeah
hefgi has joined #ruby
dnstbr has joined #ruby
larissa has quit [Quit: Leaving]
hbpoison has quit [Ping timeout: 252 seconds]
<heftig> samuel02: hmm, this may work as well: slice = array[[0,array.index(elem)-2].max,3]
<samuel02> heftig, seems less obvious though?
<heftig> ah, that will always try to return 3 elements, even at the leftmost edge
Emmanuel_Chanel has quit [Quit: Leaving]
mercwithamouth has joined #ruby
swex has quit [Read error: Connection reset by peer]
banisterfiend has quit [Remote host closed the connection]
cakehero has joined #ruby
swex has joined #ruby
seydar has joined #ruby
jonathanwallace has joined #ruby
artOfWar has quit [Read error: Connection reset by peer]
crankycoder has left #ruby ["Leaving..."]
artOfWar has joined #ruby
mikepack has joined #ruby
m4rtijn has joined #ruby
dhruvasagar has quit [Ping timeout: 260 seconds]
elsifaka has quit [Ping timeout: 260 seconds]
prezioso has quit [Ping timeout: 268 seconds]
mmitchell has joined #ruby
JohnBat26 has quit [Ping timeout: 264 seconds]
Androidnewbe has joined #ruby
dhruvasagar has joined #ruby
mercwithamouth has quit [Ping timeout: 248 seconds]
nari has quit [Ping timeout: 244 seconds]
tds has joined #ruby
carloslopes has quit [Ping timeout: 260 seconds]
elsifaka has joined #ruby
kaleido has quit [Changing host]
kaleido has joined #ruby
SCommette has joined #ruby
ddd has quit [Quit: Leaving.]
fixl has quit [Remote host closed the connection]
rasbonics has joined #ruby
ddd has joined #ruby
awarner has quit [Remote host closed the connection]
und3f has quit [Ping timeout: 260 seconds]
nyuszika7h has quit [Quit: Here we are, going far to save all that we love - If we give all we've got, we will make it through - Here we are, like a star shining bright on your world - Today, make evil go away!]
wargasm has joined #ruby
L1 has quit [Remote host closed the connection]
und3f has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
carlyle has joined #ruby
dhruvasagar has quit [Ping timeout: 248 seconds]
nyuszika7h has joined #ruby
anachronistic has joined #ruby
dhruvasagar has joined #ruby
carlyle has quit [Remote host closed the connection]
mucker has joined #ruby
carlyle has joined #ruby
artOfWar has quit [Read error: Connection reset by peer]
artOfWar has joined #ruby
thisirs has quit [Remote host closed the connection]
seydar has quit [Quit: leaving]
mmitchell has quit [Remote host closed the connection]
<squidz> does anybody know how to write to a csv file all at once given a a matrix of the rows?
mmitchell has joined #ruby
davidcelis has quit [Quit: K-Lined.]
<eph3meral> squidz: "all at once" and "matrix"?
<squidz> eph3meral: yes I have an array of rows
<eph3meral> squidz: if by matrix you mean an array of lines
<squidz> well its an array of arrays
<eph3meral> and if by all at once, you mean one line at a time with a loop, then yeah sure
tommyvyo has quit [Read error: Connection reset by peer]
<squidz> so yes a matrix
<eph3meral> squidz: eh, whatever, if you're not doing matrix transformations, it's not particularly acting as a matrix - it's more aptly called what it is, which is an array of arrays
<eph3meral> squidz: have you read http://ruby-doc.org/stdlib-1.9.3/libdoc/csv/rdoc/CSV.html yet?
<squidz> okay so is there a function in the CSV library that allows me to write that?
seanyo has quit [Remote host closed the connection]
beiter has joined #ruby
<squidz> im looking at it, but havent found what i am talking about
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
<eph3meral> i don't see what's wrong with something like lines.each …. write line to csv ...
seanyo has joined #ruby
<eph3meral> if your data is sanely prepped, it could be a one liner if you like
<kapowaz> I'm trying to set up guard-sprockets, but I get this error when I run bundle exec guard init sprockets:
<kapowaz> 15:01:46 - ERROR - Could not load 'guard/sprockets' or '~/.guard/templates/sprockets' or find class Guard::Sprockets
<Xeago> CSV.open "file" do { |csv| ary.each { |e| csv << e } }
<Xeago> wops, remove the do
<kapowaz> but I don't get it when I run without bundle exec
Virunga has quit [Remote host closed the connection]
tk__ has quit [Quit: ばいばい]
<Xeago> kapowaz: are guard and sprockets in your gemfile?
<kapowaz> Xeago: aha, you may have the right hint there. guard-sprockets is, but guard isn't.
<kapowaz> I assumed it'd just pull in guard too, but maybe it needs to be specified?
<kapowaz> I mean, the gem is installed…
<eph3meral> kapowaz: bundle install | grep guard will tell you
<Xeago> bundler will exclude it if it is not in gemfile and not an explicit dependency
<kapowaz> Using guard (1.5.2)
<kapowaz> from that output
<Xeago> I'd expect it to be included tho
<eph3meral> kapowaz: so you're fine on that angle
<kapowaz> yeah... I've added it to the gemfile and rebundled, but it still gives the same error
<kapowaz> that said, it's in the group :development
<eph3meral> kapowaz: if it works with bundle exec, then what's the big deal? (aside from having to type bundle exec each time)
tk__ has joined #ruby
<Xeago> it doesn't work with be, it does without
<kapowaz> eph3meral: it *doesn't* work with bundle exec :)
vickaita has quit [Ping timeout: 276 seconds]
<eph3meral> oh, umm… ok so if it works without, then what's the issue?
<kapowaz> well, guard itself complains when I do that
<eph3meral> kapowaz: when you do what?
<eph3meral> kapowaz: (please don't use pronouns when possible)
apok has joined #ruby
<kapowaz> when I run it *without* bundle exec
<kapowaz> (sorry, thought that was obvious in context)
<kapowaz> ‘when I run it’ = `guard init sprockets`
vickaita has joined #ruby
<eph3meral> kapowaz: just assume it's never obvious - so many people misuse and abuse pronouns… in computer communication, it always behooves you to be verbose
LowKey has quit [Quit: changing servers]
<eph3meral> kapowaz: good :)
<Xeago> nice use of quotes there ;p
LowKey has joined #ruby
<kapowaz> when you run bundle exec from the command line, which environment does it assume you're using ?
<eph3meral> kapowaz: with that said, I don't know the answer to your question, sorry :P
<eph3meral> kapowaz: development
und3f has quit [Ping timeout: 255 seconds]
<eph3meral> kapowaz: development = the default environment if not specified
dnyy has joined #ruby
tk__ has quit [Client Quit]
<kapowaz> that's what I thought...
<kapowaz> I am kind of confused then.
fa1ur has joined #ruby
arkiver has joined #ruby
n1x has joined #ruby
cdt has joined #ruby
nga4 has joined #ruby
v0n has quit [Ping timeout: 260 seconds]
<kapowaz> need to find somebody who's used guard-sprockets, I guess.
geggam has joined #ruby
<eph3meral> kapowaz: not to be facetious, but have you googled your specific error?
<workmad3> kapowaz: have you used a git dependency for guard-sprockets?
<kapowaz> yes, nothing obvious returned.
<kapowaz> I'm just seeing a similar error in connection with a different guard module though
artOfWar has quit [Read error: Connection reset by peer]
<kapowaz> so I'm investigating that.
artOfWar_ has joined #ruby
<kapowaz> workmad3: no, just using rubygems
<workmad3> kapowaz: did you bundle install to a path?
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
<kapowaz> interestingly, if I do bundle console, then require 'guard/sprockets' in there, it tells me it's missing the 'execjs' dependency
jslowe has joined #ruby
<kapowaz> I'm wondering if there is a broken gemspec or something?
<kapowaz> workmad3: nope
<eph3meral> kapowaz: well, do you have a js runtime?
<eph3meral> kapowaz: install node or something similar
<kapowaz> I do have node installed
<eph3meral> k
<kapowaz> but even so, you'd expect it to flag dependencies as part of the bundling process, wouldn't you?
<workmad3> kapowaz: is in execjs saying that you're missing a dependency?
<kapowaz> no, that's from within the bundle console
<eph3meral> bundle has a console?
<kapowaz> ^ console output
tomsthumb has joined #ruby
<kapowaz> yes :)
<kapowaz> $ bundle console
boolean_ has joined #ruby
<workmad3> eph3meral: it's just the same af doing 'bundle exec irb'
<workmad3> *as
<kapowaz> I'm going to explicitly add execjs to my gemfile and see if that fixes it
<eph3meral> hmm, cool
<eph3meral> kapowaz: execjs is not a gem, afaik
<eph3meral> kapowaz: what you need, is something that serves as a js runtime, if you have node then you're fine, otherwise you need another gem such as 'therubyracer'
elsifaka has quit [Read error: No route to host]
<eph3meral> kapowaz: and also, bundle install | grep execjs
samphippen has quit [Quit: Computer has gone to sleep.]
vickaita has quit [Ping timeout: 265 seconds]
<eph3meral> kapowaz: ok, well the execjs gem doesn't take care of making sure you have a runtime installed
<kapowaz> I've just added it and the error in the above gist no longer happens
<kapowaz> I already have a runtime installed
<eph3meral> kapowaz: it works with several runtimes
joeycarmello has joined #ruby
<Xeago> osx and windows provide a javascript runtime, there's also mozilla's
<eph3meral> hmm, ok
<kapowaz> and now bundle exec guard init works
<eph3meral> good to know
nateberkopec has quit [Read error: Connection reset by peer]
<jrajav> Xeago: Where were you last night? :O
<jrajav> My torrent was lonely
<eph3meral> i guess I was probably thinking I was in the rails channel, nm me :)
<Xeago> I fell asleep at work :<
<kapowaz> so I'd say guard-sprockets requires execjs but doesn't have it in the dependencies
<Xeago> woke up at midnight when the alarm fired
<Xeago> hoe big is the vm?
<jrajav> 2.8gb or so
mikemac has joined #ruby
crazymykl has quit [Ping timeout: 260 seconds]
elsifaka has joined #ruby
Goles has joined #ruby
manizzle_ has quit [Ping timeout: 240 seconds]
<Xeago> damnit, doesn't fit my cloud downloader, I'll have to use my homebox — 10 * Gbit connection vs 300Mbit connection :<
DrShoggoth has joined #ruby
rippa has joined #ruby
yshh has quit [Remote host closed the connection]
<squidz> i see that the CSV library converts a csv file to a table object. If I have a table object though, how can i write a CSV file with it?
hbpoison has joined #ruby
<regedarek> Hello, anybody know how to stub in rspec after_create callback self.target.save! ?
<Xeago> jrajav: should I mail you for the torrent?
savage- has joined #ruby
<squidz> here is my code http://hpaste.org/77068
Emmanuel_Chanel has joined #ruby
nateberkopec has joined #ruby
<squidz> do you know what i mean now eph3meral ?
<kapowaz> it damned well requires execjs, but it's not in the gemspec. That's an outright mistake, surely?
<eph3meral> kapowaz: sounds like it - and it doesn't surprise me
<kapowaz> why not?
<eph3meral> cuz it's open source software
<eph3meral> people make mistakes
djdb has quit [Remote host closed the connection]
<kapowaz> given that its very own command line tool tells you to run it through bundle exec, I'm surprised it's gone undetected this long
<eph3meral> not like closed source is perfect - but I often find there's less rigorous testing and quality assurance that goes in to most OSS - the attitude is usually "eh, works for me, and then if you find a bug let me know"
<kapowaz> it seems like the only way to avoid it is to already have execjs in your bundle
hbpoison has quit [Ping timeout: 265 seconds]
<kapowaz> *in your Gemfile
banisterfiend has joined #ruby
und3f has joined #ruby
kil0byte has quit [Remote host closed the connection]
<eph3meral> you can argue this way and that - but this has been my real world experience over the past 5 years or so
<eph3meral> kapowaz: fork, patch, pull request, get teh eFames, rinse repeat :P
kadel has quit [Remote host closed the connection]
<eph3meral> did I mention all the ladies you'll get as well?
ezra has joined #ruby
ezra has joined #ruby
ezra has quit [Changing host]
v0n has joined #ruby
<kapowaz> I've posted an issue on github. I have other things I'd rather be doing.
hsbt is now known as hsbt_away
cascalheira has joined #ruby
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
tallow has quit [Remote host closed the connection]
Emmanuel_Chanel has joined #ruby
nga4 has quit [Remote host closed the connection]
blacktulip has quit [Ping timeout: 260 seconds]
joeycarmello has quit [Remote host closed the connection]
tagrudev has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
ckrailo has joined #ruby
blacktulip has joined #ruby
Vert has joined #ruby
marty_mcfly has joined #ruby
ltsstar has joined #ruby
<marty_mcfly> trying to get this straight in my head ... when is it suitable to use sudo with gem install and when is it not suitable ?
u89 has joined #ruby
<eph3meral> kapowaz: don't we all :)
<kapowaz> marty_mcfly: ideally, never
<eph3meral> not true
<Sou|cutter> marty_mcfly: I never use sudo for gems
<marty_mcfly> ok
<eph3meral> er, wait no nm
<lupine_85> "depends" is about the only answer you can give
<marty_mcfly> so if i do a gem install without sudo
<kapowaz> I can't say I've used sudo gem install since I started using bundler
artOfWar_ has quit [Ping timeout: 240 seconds]
<marty_mcfly> it will install the package files in a user-owned directory no ?
<eph3meral> marty_mcfly: if you use RVM then you probably never need to use sudo
<lupine_85> it affects whether the gem ends up in ~/.gem or /usr/... (or /var/..., for debian, of course)
<eph3meral> if you're setting up a production server, the wise thing to do is install a .rpm or .deb of your ruby version system wide
<Xeago> because rvm sets the gempath in ~/.gem
<burgestrand> Even if you use rvm you should never use sudo.
<burgestrand> … except for installing rvm itself, and doing it system-wide.
<eph3meral> marty_mcfly: in which case, since your gem path will be in the "system" you'll need to use sudo most likely, to install gems
<lupine_85> in development, use rvm or rbenv by preference. in production, try to avoid using gems at all
<burgestrand> … but maybe that has changed.
<Xeago> burgestrand: how about when not using rvm
v0n has quit [Ping timeout: 248 seconds]
<burgestrand> Then you’re on your own.
<eph3meral> lupine_85: what do you do in prod then? make a separate package for each gem?
hbpoison has joined #ruby
<lupine_85> eph3meral, pretty much, aye
<eph3meral> that seems… non-optimal, from a maintenance standpoint
<Xeago> eph3meral: we bundle it into vendor
<Xeago> and upload it with the source
<eph3meral> Xeago: that sounds like a better idea
<lupine_85> eh, it's perfectly worth it
<lupine_85> if you're a production environment worth mentioning, it makes life a lot easier
monkegjinni has quit [Remote host closed the connection]
<eph3meral> having to re-package any time your gems change? doesn't sound easier to me
prezioso has joined #ruby
samphippen has joined #ruby
<lupine_85> in production, your gems don't change that often
<lupine_85> or mine certainly don't
<lupine_85> and the packaging is almost entirely automatic
Takehiro_ has joined #ruby
Takehiro has quit [Read error: Connection reset by peer]
<eph3meral> sure, I guess in that case you're fine
eldariof has quit []
maletor has joined #ruby
elico has quit [Quit: elico]
* lupine_85 has a current deployment across about 30-40 machines which uses a wide variety of ruby libraries, and two different ruby VMs, and sticking everything into .deb packages has definitely made life better
<lupine_85> if your production environment changes every other day and you're rolling the debs/rpms by hand, things are likely to be different
baroquebobcat has joined #ruby
<lupine_85> apparently, bundler and gemfiles get a lot of love these days
headius has joined #ruby
monkegjinni has joined #ruby
hotovson has quit [Remote host closed the connection]
irleif has quit [Quit: Computer has gone to sleep.]
blazes816 has joined #ruby
solidoodlesuppor has joined #ruby
irleif has joined #ruby
classix has quit [Ping timeout: 244 seconds]
nitti_ has joined #ruby
clj_newb has quit [Ping timeout: 268 seconds]
<kapowaz> I need to find a good working example of a sprockets + guard-sprockets environment for heroku deployment (that isn't Rails 3.1)
blacktulip has quit [Ping timeout: 244 seconds]
walbert has joined #ruby
blacktulip has joined #ruby
<kapowaz> iirc sprockets should generate concatenated/minified files with a name that is like application-xxxxxxx.js (say) where xxxxx is a hash or similar
<kapowaz> but what I've got working now with guard is just generating files with a flat name
<kapowaz> application.js
<kapowaz> for production it'll be something else entirely, rendering the paths wrong
<kapowaz> >_<
prezioso has quit [Ping timeout: 252 seconds]
nitti has quit [Ping timeout: 265 seconds]
quest88 has joined #ruby
nga4 has joined #ruby
dr_bob has quit [Quit: Leaving.]
arkiver has quit [Quit: Leaving]
khakimov has joined #ruby
alfism has joined #ruby
Takehiro_ has quit [Read error: Connection reset by peer]
rjsamson has quit [Remote host closed the connection]
SCommette_ has joined #ruby
Nektye has joined #ruby
rjsamson has joined #ruby
Takehiro has joined #ruby
yshh has joined #ruby
<blazes816> "C++11 and Boost - Succinct Like Python" - awesome
SCommette has quit [Ping timeout: 260 seconds]
SCommette_ is now known as SCommette
adeponte has quit [Remote host closed the connection]
irleif has quit [Quit: Computer has gone to sleep.]
<jrajav> "But still just as obfuscated and unmaintainable as the good ol' C++ you know and love"
irleif has joined #ruby
cakehero has joined #ruby
morf has quit [Quit: eof]
rjsamson has quit [Ping timeout: 265 seconds]
apok has quit [Quit: apok]
aganov has quit [Remote host closed the connection]
ananthakumaran has quit [Ping timeout: 252 seconds]
<blazes816> self.succinct_function_call(self, self.parent.self, self.parent.__call__())
monkegjinni has quit [Remote host closed the connection]
bfrog has joined #ruby
ananthakumaran has joined #ruby
<bfrog> is there some rack server that does something like nginx, spawns off workers and does the appropriate thing?
Takehiro_ has joined #ruby
<bfrog> if a worker dies, its restarted
<bfrog> that sort of thing
Takehiro has quit [Read error: Connection reset by peer]
<keymone> unicorn?
williamherry has quit [Quit: WeeChat 0.3.7]
<blazes816> unicorn!
<bfrog> thanks
Slivka has joined #ruby
quest88 has quit [Quit: quest88]
<juha_> unicorns are awesome
x82_nicole has joined #ruby
_alejandro has joined #ruby
<blazes816> they're like ponies but magic or bourgeois
ananthakumaran1 has joined #ruby
ananthakumaran has quit [Ping timeout: 260 seconds]
Ry has joined #ruby
<Edward_> I never understood why we need things like unicorn
<Edward_> why can't we just couple a rails install with a web server
<Edward_> what does unicorn *actually* do
<Gate> Edward_: decouples it :)
<Edward_> Hm?
<Gate> manages worker threads and acts on a queue just as fast as it can, your ruby doesn't need to run in your web server's user doesn't need to be globally installed, etc
blacktulip has quit [Ping timeout: 246 seconds]
<blazes816> no, no, no, we do not need Rails coupling a webserver
<Gate> ^^
<blazes816> that's the opposite of what we should do
thinkdevcode has joined #ruby
blacktulip has joined #ruby
<burgestrand> rails already does by being in ruby
<burgestrand> webrick
<Edward_> does PHP have something like unicorn?
<blazes816> *production* webserver
<Gate> this was quite informative when I first started reading up: https://github.com/blog/517-unicorn
<Edward_> it seems this unicorn/passenger thing just adds an additional component
<blazes816> Apache or Nginx is all php needs
<Xeago> it is a good thing rails doesn't provision a web server
<Edward_> to the stack
<hoelzro> Edward_: php-fpm is the closest thing, I think
juha_ has quit [Ping timeout: 240 seconds]
dpatel has joined #ruby
elsifaka has quit [Quit: Veloma e!]
caleb_io has joined #ruby
ananthakumaran1 has quit [Client Quit]
<blazes816> but it's a component vital to being a web application - the server
<Xeago> and therefore it conforms to a defacto standard: rack
<Xeago> or should I say rack-app
ffranz1 is now known as ffranz
<Xeago> any webserver that can host a rack-app can host a rails web application
sn0wb1rd has quit [Quit: sn0wb1rd]
<Xeago> sinatra padrino and even goliath are in rack
cakehero has quit [Quit: Computer has gone to sleep.]
<Edward_> Mm..looks like I got a bit of reading to do. I was never familiar with what a rack app is
<Edward_> thank you.
<Xeago> rack is the middleware between webserver and application code
<Edward_> fyi blazes816: PHP doesn't need middleware as far as I am concerned. I don't use PHP. Just making an observation.
<Xeago> php uses mod_php as middleware on apache
maesbn_ has quit [Remote host closed the connection]
<blazes816> php needs an apache mod to run
<Xeago> not necessarily apache..
<Xeago> php, just like ruby, can accept raw sockets
<Xeago> and do all parsing themselves
<Gate> right, there is always a layer from the httpd to the actual code, beit mod_php, passenger, unicorn or fast_cgi
<Xeago> however, that is a bad thing
<Xeago> Gate: as I just said, not always :P
maesbn has joined #ruby
hbpoison has quit [Ping timeout: 260 seconds]
savage- has quit [Quit: savage-]
<Gate> Xeago: assuming you are using an httpd (better?)
<Xeago> even then.. I wrote a script that upon requesting a page listens on a certain port and streams that to the client
kil0byte has joined #ruby
jblack has quit [Read error: Operation timed out]
noxoc1 is now known as noxoc
<Edward_> Thanks^ for the explanation
samphippen has quit [Quit: Computer has gone to sleep.]
jblack has joined #ruby
burgestrand has quit [Quit: Leaving.]
heftig has quit [Quit: leaving]
rakl has joined #ruby
Virunga has joined #ruby
Dreamer3__ has joined #ruby
davidcelis has joined #ruby
maesbn has quit [Ping timeout: 248 seconds]
tommyvyo has quit [Quit: Computer has gone to sleep.]
hotovson has joined #ruby
nga4 has quit []
hsbt_away is now known as hsbt
failshell has joined #ruby
<failshell> hello. im wondering if anyone here ever used the spreadsheet gem? any way to dynamically adjust the width of a column based on the data it contains? short of counting the number of chars i mean
jrajav has quit []
v0n has joined #ruby
iamjarvo has quit [Ping timeout: 260 seconds]
wallerdev has joined #ruby
vickaita has joined #ruby
zeknox has joined #ruby
dakine has quit [Quit: Leaving]
<zeknox> can anyone offer any suggestions on how to limit the threads in this script to like 1000 or less? http://pastie.org/private/butbjcxbwbycvs0eb3lsg
iamjarvo has joined #ruby
<Xeago> zeknox: you probably want a threadpool
<Xeago> celluloid will help
<Xeago> otherwise, paginate your array
jprovazn is now known as jprovazn_away
<zeknox> Xeago: yeah I was thinking about splitting my array into chunks of 10, or something, I'm going to look into threadpool, is it a lib?
noxoc has quit [Quit: WeeChat 0.3.9]
<Xeago> I think celluloid provides a threadpoool
<Xeago> but threadpool is a concept
noxoc has joined #ruby
nga4 has joined #ruby
moted has joined #ruby
vickaita has quit [Ping timeout: 240 seconds]
<RubyPanther> Ruby threads are useless
<zeknox> RubyPanther: depends on the situation
dmiller_ has quit [Ping timeout: 260 seconds]
<Xeago> zeknox: you do know about the GIL?
jblack has quit [Ping timeout: 248 seconds]
<zeknox> Xeago: I know nothing about GIL or anything sophisticated, just getting my start in ruby
<hoelzro> the GIL shouldn't matter in this situation, should it? most of the lifting is I/O based, and plus, it's being done by a subprocess
<csmrfx> ruby threads are useless, except in jruby
<Xeago> csmrfx: rubinius
<hoelzro> granted, I wouldn't use threads for this either, but I'm more comfortable with event stuff anyway
<RubyPanther> That's true, when you're not using them for any advantages you just want to mimic an algorithm from another language, then yeah, you can port your Java thread algorithm instead of re-writing using traditional fork+IPC that Ruby is optimized for
<csmrfx> oh, that too, Xeago ?
spacebug1 has joined #ruby
<RubyPanther> The threads won't run at the same time, of course. It is not substantially different from just looping.
<csmrfx> Except in jruby and rubinius, huh
alem0lars has joined #ruby
mucker has quit [Quit: leaving]
niklasb has joined #ruby
<hoelzro> but since each thread is just blocking on an nmap process (which would run at the same time), does it matter?
artOfWar has joined #ruby
<hoelzro> I wouldn't suggest starting out with a thread-based implementation, but since it already exists...
<headius> Ruby threads aren't useless in MRI, they're just not useful for concurrent Ruby code execution
<headius> they work quite well for multiplexing IO streams, etc
Nektye has quit [Quit: Leaving]
paulsamuels has joined #ruby
classix has joined #ruby
emaiax has joined #ruby
Monie has joined #ruby
<Xeago> zeknox: yes that link is a good introduction
spacebug1 has quit [Client Quit]
<zeknox> Xeago: thanks I'm going to look into it
paulsamuels is now known as paul_s
<zeknox> alright, im going to ask the loaded question, what is the big diff between ruby and jruby?
<lupine_85> one is a language, one is a VM that runs the language
<headius> hah
<RubyPanther> one is Ruby, the other is Java that can run some ruby scripts
<headius> indeed
baphled has joined #ruby
<headius> zeknox: I suppose you mean MRI and JRuby
<lupine_85> anyway, the main difference between ruby 1.8/1.9 and jruby comes with threading
<headius> that's probably the most obvious user-facing difference
<RubyPanther> Don't let the fans fool you, there are various "real" rubies, and then there are some alternates that are mostly compatible, but can't actually use Ruby gems
BoomCow has joined #ruby
<lupine_85> jruby has native threads and no GIL. 1.8 lacks both, 1.9 still has a GIL
<headius> RubyPanther: are you saying JRuby can't use Ruby gems?
<RubyPanther> headius: grab one out of a hat, can you assume it runs? No.
<lupine_85> there are some gems jruby can't use (not many). it can, however, use most of the JRE
banisterfiend has quit [Read error: Connection reset by peer]
nazty has joined #ruby
juha_ has joined #ruby
<RubyPanther> A specific gem, maybe it does.
<headius> RubyPanther: that's totally untrue
* lupine_85 has a go
<headius> the vast majority of gems just work
<RubyPanther> lol it is totally _true_ not "untrue"
<lupine_85> gem chosen entirely at random: http://rubydoc.info/gems/qif/frames
<BoomCow> did anyone else here see matz talk at Linkedin?
<RubyPanther> There _is_ actually a real ruby, and you're not Matz
<lupine_85> works in jruby
hsbt is now known as hsbt_away
<RubyPanther> JRuby is great... if you're stuck in Java-land and want some Ruby slippers.
<lupine_85> or if you're stuck in ruby-land and need serious threading
<headius> RubyPanther: you've obviously never used JRuby if you think most gems don't work
<RubyPanther> No, that's nonsense
<lupine_85> we just applied your test. a randomly-chosen gem works
<zeknox> Xeago: you think this will work? http://burgestrand.se/code/ruby-thread-pool/
<RubyPanther> headius: Now, come on, you could argue the other side yourself instead of just ignoring it like nobody told you many gems are written in C
spacebug_ is now known as spacebug
<headius> most gems are not written in C
<lupine_85> it's also worth noting that jruby can support gems with C extensions, although it's not perfect
<lupine_85> zing, etc
<headius> well, we have deprecated that…MRI's C API cripples any modern VM
<RubyPanther> No, lupine_85, apply the test: pick a random gem, okay, but don't tell yourself the name yet. You've got a gem in your closed hand. Can you claim it will work? What is the "correct" answer? The correct answer is, you don't know if it works, and many of the most popular gems don't. You can't just choose a popular gem and think it works.
<headius> it worked, but only in very specific cases where we had to dumb down JRuby to act like GIL-threaded MRI
<lupine_85> RubyPanther, you're asking about probability
<headius> RubyPanther: you're speaking in gross generalities
<lupine_85> and I'd suggest that any random gem has at least a 75% chance of working
<headius> the probability is that it *will* work
<headius> if it doesn't have C code, and it doesn't work, I want to know about it
<headius> and then it will work :)
alem0lars has quit [Quit: quit]
alem0lars_ has joined #ruby
_JamieD_ has joined #ruby
* lupine_85 is using jruby extensively. it makes some very nasty threaded ruby *actually feasible*
<lupine_85> jury's still out on whether that's good or bad, of course ^^
<RubyPanther> writing JRuby is a useful thing. Teaching people who aren't stuck in Java that it is the normal Ruby, or a reasonable replacement, is just wrong and an insult to Matz.
<lupine_85> it's a perfectly fine ruby
mahmoudimus has joined #ruby
<Xeago> MRI is the standard official and reference implementation of the ruby-spec
<lupine_85> it does many things MRI doesn't do, and doesn't do a small number of things that MRI does
<Xeago> wops, forgot punctuation there
mneorr has joined #ruby
<wca> what does jruby do that mri doesn't?
<csmrfx> Wat a discussion!
<csmrfx> wca it runs on top of Oracle Java runtime
mneorr_ has quit [Read error: Connection reset by peer]
<csmrfx> Oracle Java runtime has native threads
zeromodulus has quit [Read error: Connection reset by peer]
<csmrfx> mri just has "one single thread"
<lupine_85> wca, mostly-direct access to any java API out there (barely useful to me), native threads (ruby 1.9 has those), and scalable threading (that GIL will bite you eventually)
Araxia has joined #ruby
<Ry> (MRI 1.9 doesn't have a GIL, it has a GVL)*
<lupine_85> JIT compilation is fun too, of course
<headius> RubyPanther: until you have used JRuby in some significant way, you do not know what you are talking about
Monie has quit [Quit: Quit]
Araxia has quit [Read error: Connection reset by peer]
samphippen has joined #ruby
<lupine_85> it's a good troll, though
<csmrfx> wait what ruby 1.9 has native threads?
<csmrfx> noo
<Sou|cutter> jruby is great, and it's pretty damn good at matching MRI behavior
* csmrfx 's planetary sim is aimed at jruby
<csmrfx> well, the server part, anyways
dmiller has joined #ruby
iamjarvo has quit [Quit: Computer has gone to sleep.]
Araxia has joined #ruby
<wca> headius: care to comment on my question about jruby over mri?
maesbn has joined #ruby
kbeddingfield has joined #ruby
<wca> the only limitation I'm aware of is that you can't use C extensions (though I wonder if they could be linked via JNI or something?)
<wca> and I guess there are probably some specs that don't pass?
<BoomCow> what exactly is jruby
<BoomCow> I"m looking at jruby.org
<lupine_85> an implementation of the ruby language, on top of the JVM
carloslopes has joined #ruby
<BoomCow> ty lupine_85
<BoomCow> meaning you can package your program
<BoomCow> and run it on almost any system?
minijupe has joined #ruby
<lupine_85> that's certainly one use for it, aye
cakehero has joined #ruby
<csmrfx> run it on jvm
<wca> assuming the JVM is actually portable...
* wca notes that many aspects of modern JDK implementations are not portable
zeromodulus has joined #ruby
beiter has quit [Quit: beiter]
<xclite> the JVM is more portable than .NET at least
maesbn has quit [Remote host closed the connection]
<xclite> and a given user is more likely to have the JVM than Ruby
<Xeago> xclite: excluding embedded software, .net/mono runs on more stuff reliably then mono
<Xeago> err jvm
<lupine_85> if you're planning on packaging an entire JVM to make your ruby program portable with jruby, packaging a ruby to run your ruby program is not an insane option
<lupine_85> we actually do that for our windows client deployments
<lupine_85> we install our own ruby 1.9 and run our ruby program on that
jaygen has joined #ruby
<xclite> Xeago, I dunno that claiming that .NET on Linux is easier than the JVM
<lupine_85> (on mac os x and linux, we just rely on the system-provided ruby)
<xclite> is accurate
bluenemo has quit [Quit: Verlassend]
u89 has quit [Remote host closed the connection]
<xclite> lupine_85, yeah packaging it can be nice. JRuby allows calling Java from Ruby (very seamlessly) which can be nice if you need some java libs
<csmrfx> Next up: dalvruby
<lupine_85> already done, kind of
<csmrfx> kind of, not really
<lupine_85> you can run jruby on android - I've got it installed right now
<csmrfx> I know
samphippen has quit [Quit: Computer has gone to sleep.]
<BoomCow> pardon my ignorance
wallerdev has quit [Quit: wallerdev]
<csmrfx> but thats diff than having ruby engine produce bytecodes for dalvik
<BoomCow> Are there any great ruby framework for mobile applications
<lupine_85> I'm... not sure it is
<xclite> BoomCow, I could be way wrong on this (I don't CARE about mobile) but isn't RubyMotion for that?
mityaz has joined #ruby
<xclite> or some ruby
<xclite> somebody's doing something with ruby for mobile
<xclite> i'm useless, i know.
<Gate> BoomCow: rubymotion for iOS development
<xclite> BoomCow: MRuby, RubyMotion, and Ruboto
<wca> that seems to be iOS only, but I suppose "mobile" == "iOS" these days :D
<xclite> I hear the most things about RubyMotion
<Gate> BoomCow: I haven't found a satisfactory implementation for android
<xclite> and MRuby
<lupine_85> but maybe I'm wrong, and the JITed JVM bytecode doesn't end up with dalvik
samphippen has joined #ruby
caleb_io has quit [Quit: caleb_io]
<xclite> The article I'm reading mentions that Ruboto is for Android, but it seems less complete.
jaygen has quit [Ping timeout: 252 seconds]
Voxxit has quit [Ping timeout: 246 seconds]
<lupine_85> iOS has a relatively small amount of market share
<wca> ah, $200 for a license. That's how that works. :)
maletor has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<headius> wca: in general anything that's pure Ruby should work exactly the same
Virunga has quit [Remote host closed the connection]
artOfWar has quit [Ping timeout: 244 seconds]
shtirlic has quit [Read error: Connection reset by peer]
<BoomCow> Gate, ty, I'll look into those :D
<kapowaz> that's a laugh, ‘iOS has a relatively small amount of market share’
<wca> headius: Yes, but my question was about what JRuby has that is compelling compared to MRI.
<kapowaz> show me the Android developers who are making money from apps.
artOfWar has joined #ruby
<Xeago> I make money from apps on Android
<xclite> wca better threading - not really something that matters for mobile as much
paul_s has quit [Quit: paul_s]
<kapowaz> really? enough to be your fulltime job?
<Xeago> xclite: I'd argue it is actually very important for mobile..
* wca doesn't use Ruby on mobile in any case
<Xeago> kapowaz: no but enough to give my girlfriend nice treats
<kapowaz> lupine_85: smartphone market share != smartphone app market share
<lupine_85> then we're just talking about two different markets
<xclite> wca, JRuby doesn't suffer from the GIL
<kapowaz> well, if we're talking about writing mobile apps (which I thought was the subject here?) then it's only the latter that matters.
<lupine_85> I'm sure iOS devices are much better at extracting money from their users than android devices. I don't think that's a feature though
arielpts has quit [Read error: Connection reset by peer]
Danielpk has quit [Read error: Connection reset by peer]
<kapowaz> I think it's more accurate to say that iOS device owners are more inclined to buy apps
Voxxit has joined #ruby
jgrevich has joined #ruby
<kapowaz> whereas a lot of Android device owners never buy a single app, ever.
<lupine_85> mm, including me
<kapowaz> and a lot of Android device owners pirate software routinely
<lupine_85> I'm not sure that's a bad thing
<kapowaz> what, piracy?
<lupine_85> not buying apps, whatever the reason
<kapowaz> it's neither a bad thing nor a good thing — it's a choice
Danielpk has joined #ruby
<lupine_85> anyway, this is a language channel, so I assumed we were talking about developing software, not selling it
sn0wb1rd has joined #ruby
fms has joined #ruby
<Muz> kapowaz: different revenue models though, Ad sales versus app sales etc.
<headius> wca: I think others have summed a lot of this up, but real parallel threads, *much* better GC and memory management, faster in most cases (and likely faster in all cases over times)
cakehero has quit [Quit: Computer has gone to sleep.]
<wca> yeah, especially if you have a JIT that tunes itself.
<kapowaz> there are a lot of ad-supported apps on the iOS app store too
<lupine_85> headius, how's cold startup time coming along?
<headius> JRuby extensions are usually written in a JVM language, so they don't impact GC/memory model and they're far less likely to crash
<headius> wca: yeah, Java 7+ have JVM support for dynamic languages…that has made a lot possible for us in the perf department
* lupine_85 is still stuck on jruby 1.5 for now *sadface*
<Muz> kapowaz: mm, I'd imagine that on Android there's a greater tendancy to rely on ad sales though.
<headius> lupine_85: back and forth…1.7 starts up large apps faster, but base startup (jruby -e 1) took a hit because we're implementing more of JRuby in Ruby now
brianpWins has quit [Quit: brianpWins]
alem0lars_ has quit [Read error: Connection reset by peer]
* lupine_85 uninstalls programs if they come with advertisements
CaptainKnots has quit [Quit: bazinga!]
<headius> I'm a cheap bastard so I usually suffer through adware
d3vic3 has quit [Ping timeout: 260 seconds]
<kapowaz> lupine_85: do you ever pay for any smartphone software?
<lupine_85> no, I don't think so
<kapowaz> so you only ever install free, ad-free stuff?
xorigin has quit [Quit: leaving]
<lupine_85> I don't ever pay for any desktop software either, so at least I'm consistent
<zeknox> anyone tell me why I can't declare my pool here? ==> http://pastie.org/5143775
wallerdev has joined #ruby
<lupine_85> headius, interesting. the obvious pain point for startup with me is tests and one-shot command-line programs
d3vic3 has joined #ruby
<lupine_85> 1.5's startup times made both of those fairly painful by comparison to MRI
arielpts has joined #ruby
<m4rtijn> I just install add-blocker
<headius> lupine_85: yeah, we've improved steadily, but there's always more to do
ryanlecompte has joined #ruby
moted has quit [Remote host closed the connection]
<wca> tests should be run in a single process anyway
<headius> JVM is to blame for some of it, so we're a bit limited
<headius> the various "guard" setups work well with JRuby too
<lupine_85> wca, ideally, but there are some failure cases that can be obscured as a result
martinklepsch has joined #ruby
<Xeago> We develop on MRI, test locally on MRI, test hourly/daily on MRI and JRuby, some of our production runs JRuby
<lupine_85> (metaprogramming weirdness and require dependencies being the obvious ones)
Trioke_ has joined #ruby
hbpoison has joined #ruby
irleif has quit [Quit: Computer has gone to sleep.]
Trioke_ has quit [Client Quit]
<headius> I wish the Ruby-Java Bridge matched all features of our Java integration…it would make it theoretically possible to run everything on MRI at dev time
J-_-L has joined #ruby
Voxxit has quit [Ping timeout: 246 seconds]
seich- has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 246 seconds]
adeponte has joined #ruby
claymore has joined #ruby
<wca> well, I suppose if you do a lot of AOP and metaprogramming it can be hard to clear the effects between tests
<zeknox> anyone tell me why I can't declare my pool here? ==> http://pastie.org/5143775
jonathanwallace has quit [Remote host closed the connection]
<headius> JRuby can keep a JVM up and launch isolated runtimes in that process… see "nailgun"
<headius> it's a little flaky at times though
catcity has joined #ruby
<Xeago> you haven't loaded the gem you linked earlier
<Xeago> you only loaded thread
alvaro_o has joined #ruby
<zeknox> Xeago: oh I have to install the gem, because it looks like it takes my require 'thread' statement
inspired has joined #ruby
<lupine_85> aye, I'm usually too lazy to set that up :D
<claymore> http://ideone.com/7qrJqo , why don't I get "i: 0, j: 0"?
arturaz has quit [Remote host closed the connection]
Voxxit has joined #ruby
jaygen has joined #ruby
hbpoison has quit [Ping timeout: 265 seconds]
CaptainKnots has joined #ruby
<Xeago> zeknox: sorry it is not a gem
tintin has joined #ruby
<Xeago> you have to load the code he wrote
<zeknox> Xeago: gotya, add the class and stuff
<tintin> HOw can i skip installing ri docs during gem install anygemname ?
filipe_ has quit [Ping timeout: 268 seconds]
<Sou|cutter> tintin: create a ~/.gemrc file containing: gem: --no-ri --no-rdoc
voodoofish430 has joined #ruby
<Xeago> or use those optoins at the command line
u89 has joined #ruby
nitti_ has quit [Remote host closed the connection]
<Sou|cutter> sure, or that
Paradox has quit [Ping timeout: 246 seconds]
mneorr has quit [Remote host closed the connection]
mkillebrew2 has joined #ruby
timonv has quit [Remote host closed the connection]
Trioke has joined #ruby
fms is now known as ebobby
<tintin> Sou|cutter: Ok, thank you very much.
Virunga has joined #ruby
dmiller has quit [Remote host closed the connection]
cascalheira has quit [Ping timeout: 256 seconds]
iamjarvo has joined #ruby
snearch has joined #ruby
<wca> claymore: the problem is that when you push $a, you're not pushing a new copy to each element of $cells, you're pushing a reference to $a. Which means that i=0, i=1, and i=2 change the same $a.
<claymore> wca: ack, of course
<claymore> wca: thanks!
Paradox has joined #ruby
u89 has quit [Remote host closed the connection]
seich- has joined #ruby
<headius> you know I have to say, it's disappointing that there's still folks who not just consider JRuby a second-class citizen, but try to convince others to look at it that way
Trioke has quit [Client Quit]
<lupine_85> well, they're sillies
Trioke has joined #ruby
Trioke has quit [Client Quit]
jblack has joined #ruby
<wca> headius: I wouldn't consider it a second-class citizen, it just has a different set of advantages and disadvantages.
tenmilestereo has joined #ruby
mneorr has joined #ruby
<tintin> Can i ask question about passenger here?
c0rn_ has joined #ruby
ianbrandt has joined #ruby
dr_bob has joined #ruby
kaneda__ has quit [Ping timeout: 276 seconds]
nazty has quit [Ping timeout: 260 seconds]
Trioke has joined #ruby
m4rtijn has quit [Remote host closed the connection]
Trioke has quit [Client Quit]
Trioke has joined #ruby
mrsolo has joined #ruby
Uranio has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
<Gate> tintin: yep, ask away
<Gate> tintin: if someone can help you, they will
lxsameer has joined #ruby
ryanf has joined #ruby
<lxsameer> how can i delete a hash key?
walbert has quit [Remote host closed the connection]
<Gate> hash.delete :key
slainer68 has quit [Remote host closed the connection]
<tintin> I got this: Forbidden
<tintin> You don't have permission to access / on this server.
<lxsameer> thanks
<csmrfx> tintin: server or roures conf
<csmrfx> *routes
philcrissman has quit [Remote host closed the connection]
<csmrfx> not a passanger q per se
nazty has joined #ruby
<Gate> tintin: usually that means that a: the permissions are wrong on the directory or b: you are pointing to the wrong directory
<csmrfx> what he said
Vinz_` is now known as Vinz_
dakine has joined #ruby
<tintin> Gate: This time it lists all files there, but it's supposed to run the config.ru
mneorr has quit [Ping timeout: 256 seconds]
apeiros_ has joined #ruby
martinklepsch has quit [Ping timeout: 248 seconds]
<tintin> Is there any wrong with this configuration? https://gist.github.com/3988511
perryh has quit [Excess Flood]
tommyvyo has joined #ruby
perryh has joined #ruby
perryh has quit [Changing host]
perryh has joined #ruby
boolean_ has quit [Ping timeout: 260 seconds]
<Gate> tintin: I'm not sure of this in all cases, but normally you don't point to the root where config.ru is, you point to the public directory underneath that
dnstbr has quit [Quit: Computer has gone to sleep.]
dmiller has joined #ruby
mneorr has joined #ruby
banisterfiend has joined #ruby
failshell has quit [Quit: Lost terminal]
<tintin> Gate: config.ru form.erb form_rack.rb result.erb , i have these files in rubytest/ folder , should i create public folder and copy these there?
<Androidnewbe> how can i delete cookis form ruby on my ie driver ?
<Gate> tintin: section 4
Araxia has quit [Ping timeout: 260 seconds]
<Gate> tintin: no, create a public directory, leave it empty
<Androidnewbe> ie keeps storing login details each time i run test
<Xeago> tintin: is there any reason why you are using passenger over developer webservers?
<Gate> tintin: public is meant to contain static files, like css, images and javascript so that apache can serve those *fast* without needing to go through ruby
boolean_ has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
cakehero has joined #ruby
mneorr has joined #ruby
irleif has joined #ruby
_JamieD_ has quit [Quit: _JamieD_]
brianpWins has joined #ruby
luckyruby has joined #ruby
CaptainKnots has quit [Quit: bazinga!]
prezioso has joined #ruby
mneorr_ has joined #ruby
kbeddingfield has quit [Remote host closed the connection]
horrror has joined #ruby
J-_-L has quit [Ping timeout: 240 seconds]
philcrissman has joined #ruby
kbeddingfield has joined #ruby
Vert has quit [Read error: Connection reset by peer]
hoelzro is now known as hoelzro|away
clj_newb has joined #ruby
fa1ur has quit [Quit: Leaving]
bricker has joined #ruby
mneorr has quit [Ping timeout: 260 seconds]
Tuxist has joined #ruby
<tintin> Gate: ?
<tintin> Gate: config.ru form_rack.rb
<tintin> public:
<tintin> form.erb result.erb
SCommette_ has joined #ruby
<tintin> Gate: I have put form.erb and result.erb in public
<rking> Anyone have strong opinions on the exact spacing of a one-line block? I'm leaning arr.map{|e| e.hihi}
<Xeago> tintin: is there any reason why you are using passenger over developer webservers?
<rking> E.g. cuddle most everything.
<tintin> Got this error, https://gist.github.com/3988599
<Gate> tintin: nope, erb are still files that need to be processed by ruby
<Xeago> rking: arr.map { |e| e.hihi }
<tintin> Gate: So will the public be empty?
<Xeago> tintin: yes that's what he said 20minutes ago
martinklepsch has joined #ruby
<Gate> tintin: yeah
<rking> Xeago: I used to do that, but it s e e m s s o a i r y n o w.
jdripper has quit [Quit: Leaving.]
<Xeago> conside rsymbol to proc
<lxsameer> how can i create a dynamic class that inherit from Exception class
<tintin> Xeago: Gate Thank you both of you. Thanks very much.
<Xeago> arr.map(&:hihi)
<tintin> It's done at last.
SCommette has quit [Ping timeout: 248 seconds]
SCommette_ is now known as SCommette
dhruvasagar has quit [Ping timeout: 268 seconds]
<kaleido> lxsameer: class Generic << Exception ?
<tintin> Xeago: What is it? arr.map(&:hihi)
<rking> Xeago: I wrote a pair of vim macros that switch it between the multiline-with-do's format and the single-with-{'s format, so it's now easy for me to toggle, but it means I need to settle in on a perfect format for the short form.
philcrissman has quit [Remote host closed the connection]
<Xeago> tintin: symbol-to-proc
<rking> Xeago: arr.map &:hihi
<lxsameer> kaleido: dynamic one
nitti has joined #ruby
_alejandro has quit [Remote host closed the connection]
<tintin> Xeago: Which developer webserver would you recommend/prefer?
<Xeago> yea without parentheses works aswell ;p
<Xeago> webrick is everywhere
<Xeago> Thin is popular and aught to be better than webrick
<Xeago> there is pow.cx
<banisterfiend> lxsameer: Class.new(Exception)
<rking> I hate webrick because of its incessant warnings in development.log
<rking> It's so unprofessional to just leave warnings like that.
<Xeago> which is a 0 config rack application server
dpatel has quit [Ping timeout: 260 seconds]
<tintin> Xeago: webbrick runs on local machine, what would you run on production server?
<Xeago> tintin: read: development web server
<Xeago> >.<
<lxsameer> banisterfiend: thats it , thanks
dpatel has joined #ruby
sepp2k1 has joined #ruby
dmiller has quit [Read error: Connection reset by peer]
sepp2k has quit [Ping timeout: 256 seconds]
<rking> Re: webrick warns, check the dates on this: https://twitter.com/tenderlove/status/108999110136303617
mneorr_ has quit [Ping timeout: 260 seconds]
<apeiros_> rking: there's a patch for that
<tintin> Xeago: Ok, that's good.
<tintin> Xeago: But what would you recommend for production webserver?
<kbeddingfield> Can anyone point to an official doc that explains classes should be nouns? Doing a code review and I'd like to cite a canonical source
<Xeago> I dislike apache, so I would use something with nginx
<tintin> Xeago: Why do you use disline apache?
<Xeago> long story
<Xeago> probably nginx with passenger with varnish in front of that
Mon_Ouie has joined #ruby
<apeiros_> apache works fine for production. so does nginx and a couple of others.
<apeiros_> if you know one of them beforehand and know how to configure it, I'd use that one
failshell has joined #ruby
dhruvasagar has joined #ruby
<apeiros_> anything else only starts to matter when you're having lots of vhosts or millions of visitors per day.
<tintin> Xeago: If you configure with passenger with nginx then what's wrong with apache?
JonnieCache has quit [Ping timeout: 245 seconds]
<tintin> What are other options for production webserver except apache and nginx?
<Xeago> lighttpd
artem has joined #ruby
<failshell> im using the following code: https://gist.github.com/3988666 anyone knows how to have the columns width changed dynamically based on the data in it?
artem has quit [Client Quit]
<tintin> And what else but lighttpd ?
<Xeago> tintin: look at wikipedia, we are not duckduckgo
<Xeago> the apache part — I dislike apache because it is slow(er), a resource hog and has had more security threats
<Xeago> it also is a dependency hell
<csmrfx> Some people contest the "apache is slower than nginx" -myth
<tintin> What's wrong with PassengerRuby /home/user1/.rvm/rubies/ruby-1.9.3-p194/bin/ruby ?
<tintin> in virtual host
<csmrfx> People I see as eleet
<csmrfx> They keep telling me it is a matter of configuring your apache right
<Gate> tintin: awesome (that its done)!
<yxhuvud> apache is somewhat harder to configure correctly.
<tintin> PassengerRuby /home/user1/.rvm/wrappers/ruby-1.9.3-p194/ruby , this works but
<Xeago> csmrfx: do they contest the fact that it is a myth, or that apache is faster
skum has quit [Quit: Leaving...]
<Xeago> I have not seen a case where apache runs better than nginx on commodity hardware
<tintin> Gate: but this PassengerRuby /home/user1/.rvm/rubies/ruby-1.9.3-p194/bin/ruby doesn't work , why?
<failshell> apache is ubber fast when you know how to tweak it
<csmrfx> Then again, if you have a car with all the bells and whistles, and a car with just a big motor, which is going to be faster?
robustus has joined #ruby
<Xeago> failshell: also, apache fails to implement the http spec properly
<tintin> Gate: What's wrong with this?
<csmrfx> Obvious
<tintin> which ruby says: PassengerRuby /home/user1/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
nitti has quit [Ping timeout: 276 seconds]
<csmrfx> So, dont perpetuate the "apache is slower" myth, kids!
<tintin> Can anyone answer my question?
<csmrfx> tintin: if you need to ask
<apeiros_> you can configure apache like shit and it'll still be fast enough for 99.9% of all websites out there
<csmrfx> tintin: you aint ready to deploy a production web server
<Gate> tintin: my only guess would be where you are configuring it, my PassengerRuby line is outside the vhost, in a different config file
timmow has quit [Ping timeout: 252 seconds]
<apeiros_> and that's probably true for most webservers.
<csmrfx> yeah, worry once you get more than 100k hits per day
<apeiros_> even more so if you run a ruby based app behind it
<Gate> apeiros_: except JBOSS, that's not fast enough to run anything, ever.
<csmrfx> JBOSS is an app server
<zeknox> Xeago: I think I got the threadpool working: http://pastie.org/private/cnxvyyje5uttfwvz3j8rq
<apeiros_> Gate: lol, ok. maybe.
pskosinski has joined #ruby
<csmrfx> you conf things right, JBOSS will be fast enough - it is not supposed to take the load, webserver or proxy is
<Gate> csmrfx: I'm aware, but the joke was worth the innaccuracy.
<failshell> im using the following code: https://gist.github.com/3988666 anyone knows how to have the columns width changed dynamically based on the data in it?
<apeiros_> zeknox: what's up with that horrible indentation?
<pskosinski> In Sinatra, why this: http://wklej.org/id/859077/ Is printing only <html>=yield</html>
daniel_-_ has joined #ruby
<Xeago> zeknox: you construct a new pool every scan
<Xeago> you are supposed to reuse the pool
<csmrfx> Rubyists have a hard time joking at JBoss ppl.....
<csmrfx> .....or do you think webkit is faster? lol
<Xeago> I regularly use lynx csmrfx
nyrb has quit [Remote host closed the connection]
nyrb has joined #ruby
<csmrfx> *webrick I mean
Elhu has quit [Quit: Computer has gone to sleep.]
<yxhuvud> pskosinski: because it should be <%= yield %>
rlb3 has joined #ruby
rlb3 has quit [Client Quit]
<failshell> anyone has a gem to recommend to generate xls files?
<apeiros_> webrick isn't meant for production, though. jboss is.
glyytchy has joined #ruby
<Xeago> failshell: there is a very good one, tho forgot the name
<Xeago> it is on github and rubyforge tho
<failshell> ive been trying spreadsheet
<failshell> but i have an issue with it
<csmrfx> xls? Excel?
<failshell> yes
<csmrfx> ever heard of this thing called google?
<zeknox> Xeago: oh, good call!
<pskosinski> yxhuvud: Oh, I see, thanks. :)
<csmrfx> like "ruby creating excel"
v0n has quit [Remote host closed the connection]
<failshell> csmrfx: there's a lot of gems to do that, i was curious as to what people like best
<failshell> before wasting hours trying each of them
<tintin> Gate: No, this: https://gist.github.com/3988721
<csmrfx> You may need a office licence to correctly handle excel
br4ndon has joined #ruby
arturaz has joined #ruby
<horrror> how can i force "not-include" a specific gem is automatically being installed because its in the ruby@global rvm?
elaptics is now known as elaptics`away
krawchyk_ has joined #ruby
v0n has joined #ruby
krawchyk has quit [Read error: Operation timed out]
* csmrfx goes home to put his planetary effects lib on github
<tintin> Gate: Are yo there?
<Paradox> anyone know a simple way i could mix kaminari and acts-as-taggable urls?
workmad3 has quit [Ping timeout: 260 seconds]
moted has joined #ruby
Androidnewbe has quit [Quit: irc2go]
justinmcp has joined #ruby
icole has joined #ruby
<tintin> a2enmod doesn't display the mod_passenger.so option , why?
ephemerian has quit [Quit: Leaving.]
<tintin> I pasted this in /usr/lib/apache2/
mojo_pojo has joined #ruby
<apeiros_> tintin: you should use exactly the lines which passenger outputs during install
failshell has quit [Quit: leaving]
<apeiros_> also, they don't belong into the virtualhost directive (but from you not getting any error, it seems to work)
rdark has quit [Read error: Operation timed out]
kidoz has joined #ruby
<tintin> apeiros_: Those line belong to where?
dmiller has joined #ruby
DanielPCox has joined #ruby
cdt has quit [Quit: Ex-Chat]
dr_bob has quit [Quit: Leaving.]
hbpoison has joined #ruby
bfrog has left #ruby [#ruby]
yshh has quit [Remote host closed the connection]
kil0byte has quit [Ping timeout: 255 seconds]
headius has quit [Quit: headius]
d3vic3 has quit [Quit: leaving]
<tintin> Gate: Are you there?
<tintin> Gate: Did you see any problem with those lines
apok has joined #ruby
hbpoison has quit [Ping timeout: 252 seconds]
headius has joined #ruby
justinmcp has quit [Remote host closed the connection]
icole has quit [Remote host closed the connection]
nitti has joined #ruby
<zeknox> Xeago: apeiros_ : alright, think I got it fixed with proper indentation: http://pastie.org/private/hylezeruwh0u4nkdtldlnq
icole has joined #ruby
headius has quit [Client Quit]
Uranio has quit [Read error: Connection reset by peer]
<rking> Dang, a small quandary: I'm making an initializer that is more convenient than the existing one. I'm tempted to call this MyObj.nw bcz its trsr thn #new
<rking> Oh, hrm, MyObj()
Iszak has joined #ruby
heftig has joined #ruby
cascalheira has joined #ruby
imami|afk is now known as banseljaj
caleb_io has joined #ruby
Virunga has quit [Remote host closed the connection]
timonv has joined #ruby
minijupe has quit [Quit: minijupe]
BrianJ has joined #ruby
djbpython has quit [Ping timeout: 260 seconds]
alejandro_ has joined #ruby
tintin has quit [Quit: leaving]
samphippen has quit [Quit: Computer has gone to sleep.]
<apeiros_> zeknox: more readable now ;-)
DanielPCox has quit [Remote host closed the connection]
<apeiros_> zeknox: I'd make a Scanner class, which has a pool as instance variable
clj_newb has quit [Ping timeout: 255 seconds]
<apeiros_> means you don't have to pass pool to scan anymore
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
und3f has quit [Ping timeout: 256 seconds]
<zeknox> apeiros_: that makes sense, I'm terrible with classes, but I could definently move that direction
<apeiros_> don't get what you're doing with THREADS and HOSTS
timonv has quit [Remote host closed the connection]
<zeknox> apeiros_: actually i can remove those, that was before when I did manual threads thread.new
<apeiros_> don't worry, how and when to use classes is just a matter of getting used to
catcity has left #ruby [#ruby]
daniel_-_ has quit [Ping timeout: 252 seconds]
nateberkopec has joined #ruby
Liquid_ has joined #ruby
Liquid_ is now known as dhonig
caleb_io has quit [Quit: caleb_io]
<apeiros_> zeknox: I was off shopping - still got a problem with the code?
<Xeago> can `time` run stuff multiple time, to get a better benchmark?
jblack has quit [Ping timeout: 255 seconds]
claymore has quit [Ping timeout: 260 seconds]
* apeiros_ would `man time`
<apeiros_> (I don't know)
<Xeago> man time doesn't give an answer :<
pr0ton_ has joined #ruby
glyytchy has quit [Quit: glyytchy]
<apeiros_> doesn't look like the time utility on osx could
tchebb has joined #ruby
<Xeago> can it in csh?
nyrb has quit [Remote host closed the connection]
<apeiros_> no idea
<lxsameer> how do you create a dynamic exception an raise it ?
<apeiros_> lxsameer: raise yourexception
nyrb has joined #ruby
ryanf has quit [Quit: leaving]
<zeknox> apeiros_: no the code works, just tweaking it now with features
jarred has joined #ruby
<zeknox> apeiros_: thanks!
<apeiros_> and you can create yourexception in whatever way you want
jarred has left #ruby [#ruby]
<lxsameer> apeiros_: dynamic exception
<invisime> is there a good way to use rspec's should_receive on a module method?
<zeknox> Xeago: thanks I was aware of time and its a great unix command
<apeiros_> lxsameer: where are you stuck with "dynamic"?
scx has joined #ruby
<apeiros_> is raise "foo #{bar}" dynamic enough?
<apeiros_> you're a wee bit unspecific…
banisterfiend has quit [Ping timeout: 248 seconds]
<lxsameer> apeiros_: hmmm, i want to create an Exception from an string , for example exception class name should be that string
Uranio has joined #ruby
<apeiros_> is `if foo then raise a else raise b end` dynamic enough?
niklasb has quit [Ping timeout: 245 seconds]
<apeiros_> lxsameer: well, then your question really is: how do I get a class from a string
<apeiros_> and the answer is: you can't. but you can get constants from a string. and luckily, most classes happen to be stored in constants.
Keva161 has joined #ruby
<apeiros_> Object.const_get("Exception") # => Exception
<lxsameer> apeiros_: hmmmm, thats not it,
<apeiros_> how's that not it?
hotovson has quit [Remote host closed the connection]
<lxsameer> apeiros_: for example : a = "SomeException" so your code will not work with it
<apeiros_> lxsameer: and why'd it not work?
<lxsameer> apeiros_: do you familiar with python ?
<Ry> lxsameer: what apeiros_ is saying should work fine
wchun has joined #ruby
scx has quit [Read error: Connection reset by peer]
<apeiros_> lxsameer: no, and I don't need to.
<lxsameer> apeiros_: because SomeException is not defined
<apeiros_> lxsameer: but you should probably *try* answers before stating that they don't work…
<apeiros_> lxsameer: you're contradicting yourself then.
reset has joined #ruby
<apeiros_> you said the class name was a string
<apeiros_> if the class does not exist, it's NOT a class name.
jonathanwallace has joined #ruby
<mojo_pojo> maybe he wants: Object.const_get("Exception").new("Some Exception")
<apeiros_> anyway, Class.new, and Module#const_set
<apeiros_> and now we've moved to "how do I dynamically create a class"
<lxsameer> apeiros_: yupm but i meant i want to create a class with the name in the string
<Xeago> apeiros_: are you aware of getting load averages other than by uptime?
<Ry> this just sounds like a whirlwind of uselessness, why do you need a class
<apeiros_> lxsameer: great, I'd suggest next time you ask the real question right away instead of going through 5 corners :-p
Vinz_ is now known as Vinz_`
<apeiros_> Xeago: not really, no. most benchmarking I need to do is within ruby itself.
<lxsameer> apeiros_: its hard to explain these stuff in english for non-english users
<Xeago> I mean system load averages
hotovson has joined #ruby
<apeiros_> Xeago: and there the Benchmark tool can get you actual CPU time
rjsamson has joined #ruby
<apeiros_> lxsameer: I don't deny that it is hard to properly formulate a question
<apeiros_> lxsameer: that doesn't mean you're fine to just skip that hard part.
<apeiros_> lxsameer: general rule of thumb: bad questions yield bad answers.
<lxsameer> apeiros_: ok, so what's your suggestion for that question
<apeiros_> lxsameer: already answered it…
<apeiros_> 19:41 apeiros_: anyway, Class.new, and Module#const_set
daniel_hinojosa has joined #ruby
<apeiros_> Object.const_set("SomeException", Class.new(StandardError))
<apeiros_> sounds like a bad road to go down, though (there might be valid applications of this for exceptions, but I haven't seen one yet)
nyrb has quit [Remote host closed the connection]
<lxsameer> apeiros_: thanks man
nyrb has joined #ruby
und3f has joined #ruby
und3f has quit [Client Quit]
<apeiros_> lxsameer: sorry for being a bit harsh to you
Takehiro_ has quit [Remote host closed the connection]
hotovson has quit [Read error: No route to host]
rjsamson has quit [Remote host closed the connection]
<lxsameer> apeiros_: no problem man, these stuff happen for people with different languages
rjsamson has joined #ruby
<Ry> apeiros_: glad I'm not the only one thinking that it is very unlikely code like that is required!
daniel_-_ has joined #ruby
adeponte has quit [Remote host closed the connection]
hotovson has joined #ruby
luckyruby has quit [Remote host closed the connection]
<apeiros_> Ry: yeah, I'm curious as to how that's used in the actual code
freakazoid0223 has quit [Read error: Connection reset by peer]
rjsamson has quit [Ping timeout: 252 seconds]
glyytchy has joined #ruby
luckyruby has joined #ruby
Tuxist64bit has joined #ruby
luckyruby has quit [Remote host closed the connection]
jonathanwallace has quit [Read error: Connection reset by peer]
insulator has joined #ruby
Takehiro has joined #ruby
jonathanwallace has joined #ruby
nitti_ has joined #ruby
Tuxist64bit has quit [Client Quit]
maasha has joined #ruby
dangerousdave has joined #ruby
Tuxist_ has joined #ruby
<Paradox> pardon for joining late
<Paradox> but a lot of projects have "custom" initializers
<Paradox> several even
Takehiro has quit [Remote host closed the connection]
<Paradox> that just call self.new and then act on it
deadalus has joined #ruby
deadalus has quit [Changing host]
deadalus has joined #ruby
Tuxist has quit [Ping timeout: 255 seconds]
Takehiro has joined #ruby
jonathanwallace has quit [Read error: Connection reset by peer]
<maasha> I need to sort huge amounts of multiline records. Needs to be disk based - and I would like to use multiple CPUs. Ideas?
nitti has quit [Ping timeout: 248 seconds]
* apeiros_ doesn't know what that's supposed to mean
<Xeago> maasha: hadoop
<Xeago> or storm
<Paradox> ^
<Xeago> or any of the alternatives
<maasha> Would be good if *nix systems per default had sort with parallel option
deadalus has quit [Client Quit]
<Paradox> not something ruby is exactly well suited for
psychouroboros has joined #ruby
lxsameer has quit [Quit: Leaving]
<Paradox> the interpreter will trip over itself
<Paradox> you're better using something that gives you direct access and control of memory
<maasha> Maybe there is gem ...
<Paradox> like C
<maasha> *a gem
<Xeago> maasha: we at work have a shell script that unzips several files
<Xeago> sorts each file using several processes
Astral_ has joined #ruby
<Paradox> you could use ruby threads, but it could get hairy
sertaconay has joined #ruby
<Xeago> and then insertion sorts based on the first line
<maasha> One could also use GNU parallel and plain unix sort.
* apeiros_ still wonders what a "multiline record" is
<Xeago> apeiros_: an abitrary data format
<maasha> apeiros_: yaml style records
pskosinski has left #ruby ["Whatever"]
<Xeago> yaml is orderless, why would you choose yaml as storage?
sailias has joined #ruby
<maasha> Xeago: yaml style - not yaml :o)
<apeiros_> I guess it was just an example
<Paradox> if you wanted to do it in ruby
<Xeago> I'd prefer a json per line..
<apeiros_> I see. so "multiline record" is actually the name of a format?
<Paradox> i'd figure out some way to split the data set up based on number of cpus or processes you have running
Neomex has joined #ruby
<Paradox> and then further split it into chunks
<Paradox> then batch insertion sort
<Paradox> in say, batches of 1 million or so
<maasha> apeiros_: ok, Biopiece records -> http://code.google.com/p/biopieces/wiki/Introduction
<Paradox> i dont think any in-place sort would be optimal for something like this
timonv has joined #ruby
Guest41863 has quit [Ping timeout: 265 seconds]
<apeiros_> maasha: ok, thanks
dakine has quit [Quit: Leaving]
<maasha> I think I remember something about merge-sort being well suited for disk based sort. And hence also sort in parallel.
<maasha> apeiros_: I can marshal the records into single lines.
<Paradox> maasha, i'd go read some of the old soviet CS papers on sort
<Paradox> back when 1mb was an astronomically large amount of storage
<maasha> Paradox: do that!
<Paradox> now
<Paradox> i got out of CS because i couldnt stand the egos and bullshit
<Paradox> but you may enjoy it :)
<apeiros_> maasha: I'd assume the bigger impact isn't that it is multiline but that it isn't seekable
<apeiros_> marshalling to a single line won't change that
<Xeago> how do you want it to be sorted?
<yxhuvud> if you control the file generation it might help to make it several smaller files instead. A lot easier to handle in parallell.
<maasha> Nah, I was thinking that this is such a common task that plenty of tools should be around. Perhaps there even is a super sorting gem...
sailias has quit [Ping timeout: 260 seconds]
<Paradox> doubtful
<Paradox> ruby isnt exactly known for its big data sorting prowess
<Paradox> you want languages that are closer to the iron
<Paradox> fortran or C
seanyo has quit [Ping timeout: 260 seconds]
<apeiros_> well, a couple of millions shouldn't be hard with ruby either. the slowest part will be parsing and writing.
<Paradox> yeah
<Paradox> but i was under the impression that we were dealing with millions of millions
gyre008 has joined #ruby
<maasha> I need so sort alphabetically according to one of the keys. So my crufty idea was to print lines prefixed with this key followd by a tab and the marshalled record - and then I can use unix sort.
areil has quit [Remote host closed the connection]
<gyre008> how do I uninstall gem non-interactively ?
<yxhuvud> apeiros_: reading can be pretty slow if the approach is to read everything into memory at once at the start.
<apeiros_> just tried. an array of 1e6 random numbers is sorted in 1.8s on this machine
<Paradox> like i said
<apeiros_> yxhuvud: yes, as I said :)
<Paradox> i'd have a file writer or something
<gyre008> I mean when I run sudo gem uninstall gem_name…sometimes it queries me about the version…but I want to uninstall all version of certain gem…like gem uninstall -a gem_name…without any interaction...
<Paradox> read a million values or so into memory
<Paradox> sort them in place
<Paradox> dump them into the file
<gyre008> is it even possible ? so far Google failed me :(
<Paradox> repeat
<maasha> The files I need to sort are 40G
<apeiros_> maasha: and how big is the data you need to sort it by?
<apeiros_> because I'd probably do something like an index and sort that
locriani has quit [Remote host closed the connection]
<Paradox> a radix sort might work too…
<apeiros_> gyre008: -a might help
<Xeago> maasha: look into storm, it is fairly well suited for big clusters but also for single node ones
<Xeago> you can queue up multiple steps
<gyre008> apeiros_, -a still tries to interact with you if you have multiple versions installed
* apeiros_ thinks Xeago & Paradox know quite a bit more about that field of problems and leaves the stage to them
<Xeago> 1: a script to extract the value so you can construct what you said earlier, and a second one which is unix sort
<Xeago> apeiros_: hell no..
<apeiros_> gyre008: that sucks
<Xeago> I am a newby I just read twitter :P
<Paradox> apeiros_, lol no, i only took 2 semesters of CS and then said "fuck that noise" and transferred to Mass. Comm
<apeiros_> gyre008: ask drbrain over in #ruby-lang
<gyre008> :)
<maasha> apeiros_: hm. so how will you retrieve the sorted records? 60M seeks is not good.
krawchyk_ has quit [Remote host closed the connection]
<gyre008> will do apeiros_
ShiintoRyuu has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<Paradox> as i've said before, i dont think this is something ruby is suited for
<Xeago> ruby is suited for small steps of it
<Xeago> but you want something that manages all of it
theRoUS has joined #ruby
ShiintoRyuu has joined #ruby
<apeiros_> Xeago, Paradox, you disappoint me! I wanted to go play SC2! Now stop making excuses and help that guy! ;-p
krawchyk has joined #ruby
irleif has quit [Quit: Computer has gone to sleep.]
<Paradox> alternatively, you could dump the whole thing into a postgres database
<Xeago> apeiros_: play on EU?
hbpoison has joined #ruby
<Paradox> use postgres' sort
<apeiros_> (j/k, just in case that wasn't obvious)
<Paradox> or cassandra if you want to cluster
<Paradox> then pull values one at a time and dump them in a file
<apeiros_> Xeago: yes, but at the moment I'm replaying the campaign, I never did it on brutal
<Paradox> postgres has some of the better sorting algorithims
<apeiros_> (was forced to when the servers where down last week-end)
gyre008 has left #ruby ["Leaving"]
<maasha> apeiros_: dont let me hold you back :o)
<maasha> I can easily fit all the keys in memery and sort those along with an index
<maasha> *memory
vlad_starkov has joined #ruby
psychouroboros is now known as deadalus
deadalus has quit [Changing host]
deadalus has joined #ruby
<apeiros_> maasha: if you control the writing, I'd write the index right when you serialize the data. including offset & length of the multiline record
<maasha> ah. hm, I got an idea that I need to test.
<apeiros_> that way you can perform a straight read at the right position and append it to the sorted file
<maasha> apeiros_: lemme mess a bit with this. thanks
slainer68 has joined #ruby
AndChat- has joined #ruby
BoomCow has quit [Quit: Leaving]
hbpoison has quit [Ping timeout: 248 seconds]
insulator has quit [Remote host closed the connection]
cjs226 has joined #ruby
clj_newb has joined #ruby
yalue has quit [Quit: Leaving]
Takehiro has quit [Remote host closed the connection]
alfism has quit [Quit: alfism]
adeponte has joined #ruby
Xeago_ has joined #ruby
samphippen has joined #ruby
scx has joined #ruby
kirun has joined #ruby
martinklepsch has quit [Ping timeout: 246 seconds]
emaiax has quit [Ping timeout: 260 seconds]
Xeago has quit [Ping timeout: 248 seconds]
Xeago_ has quit [Ping timeout: 255 seconds]
emaiax has joined #ruby
emaiax has quit [Remote host closed the connection]
emmanuelux has joined #ruby
jenrzzz has joined #ruby
<csmrfx> How would you implement:
<csmrfx> def sinus_cycle x_current, x_period_len, y_max, y_min
<csmrfx> ?
banseljaj is now known as imami|afk
vickaita has joined #ruby
nanderoo has quit [Quit: Leaving.]
_bob has joined #ruby
baphled has quit [Ping timeout: 260 seconds]
nachtwandler has joined #ruby
Tuxist_ has quit [Remote host closed the connection]
clj_newb has quit [Ping timeout: 255 seconds]
Tuxist has joined #ruby
kbeddingfield has quit [Remote host closed the connection]
h4mz1d has joined #ruby
arietis has joined #ruby
rippa has quit [Ping timeout: 260 seconds]
kbeddingfield has joined #ruby
<csmrfx> for reals? multiline comment cannot be tab-indented?
<csmrfx> wigga puhleaze
vlad_starkov has quit [Ping timeout: 260 seconds]
<csmrfx> who came up with that?
<csmrfx> I demand to know right this minute
<csmrfx> > .. <
djbpython has joined #ruby
chson has joined #ruby
Iszak has quit []
clj_newb has joined #ruby
* csmrfx falls back on using literal strings as comments
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
prezioso has quit [Read error: Operation timed out]
rjsamson has joined #ruby
adeponte has quit [Remote host closed the connection]
nachtwandler has left #ruby [#ruby]
Virunga has joined #ruby
Tearan has joined #ruby
ij has quit [Ping timeout: 265 seconds]
headius has joined #ruby
rjsamson has quit [Remote host closed the connection]
adeponte has joined #ruby
reset has quit [Quit: Leaving...]
rjsamson has joined #ruby
Araxia has joined #ruby
tvw has quit [Remote host closed the connection]
_bob has quit [Quit: Bye]
J-_-L has joined #ruby
h4mz1d has quit [Ping timeout: 260 seconds]
BSaboia has joined #ruby
psycho_one has quit [Remote host closed the connection]
br4ndon has quit [Read error: Operation timed out]
jenrzzz has quit [Ping timeout: 244 seconds]
Tearan has quit [Quit: Sleepy Badger....]
workmad3 has joined #ruby
rjsamson_ has joined #ruby
Takehiro has joined #ruby
chrisja has joined #ruby
rjsamson has quit [Ping timeout: 260 seconds]
Tearan has joined #ruby
Araxia has quit [Read error: Connection reset by peer]
kbeddingfield has quit [Remote host closed the connection]
arturaz has quit [Remote host closed the connection]
rjsamson_ has quit [Ping timeout: 240 seconds]
Araxia has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
bitZero__ has quit [Ping timeout: 260 seconds]
erichmenge has joined #ruby
<clj_newb> Hi, can I output the actual request that excon is issuing? Like outputting the curl --verbose
jarred_ has joined #ruby
jarred_ has left #ruby [#ruby]
noxoc has quit [Quit: noxoc]
erichmenge has quit [Client Quit]
CaptainKnots has joined #ruby
Neomex has quit [Quit: Neomex]
slainer68 has quit [Remote host closed the connection]
Araxia has quit [Read error: No route to host]
Araxia has joined #ruby
kkiero has joined #ruby
kaneda__ has joined #ruby
boolean_ has quit [Ping timeout: 255 seconds]
<Edward_> does ruby have multiple inheritance?
<csmrfx> no
<Edward_> so does it support interfaces like c#?
Markvilla has joined #ruby
<csmrfx> clj_newb: you will probably have to read the source code to answer that
TomRone has quit [Ping timeout: 276 seconds]
CaptainKnots has quit [Quit: bazinga!]
<csmrfx> Edward_: not quite sure what you mean by interfaces?
<csmrfx> horrible oop cludges defining requirements for a class?
<Edward_> csmrfx, yeah.
<csmrfx> lol
<csmrfx> I dont know, and I dont care
* csmrfx has put that part of life behind him, and is happy 8)
<csmrfx> Edward_: did you want to play OOP architechture astronaut?
<csmrfx> I'm sorry, ruby isn't that well suited for those games
<Edward_> ahaha
boolean_ has joined #ruby
hbpoison has joined #ruby
<Edward_> Nice link, will read over
<csmrfx> "wait what? you mean you just make stuff without glossing over unnecessary language structures?"
haxrbyte has quit [Remote host closed the connection]
Monie has joined #ruby
Monie has quit [Changing host]
Monie has joined #ruby
yxhuvud has quit [Ping timeout: 252 seconds]
krawchyk has quit [Remote host closed the connection]
hbpoison has quit [Ping timeout: 264 seconds]
nicoulaj has joined #ruby
<Edward_> csmrfx, still good to understand them
erichmenge has joined #ruby
vickaita has quit [Ping timeout: 256 seconds]
<Eiam> anyone recommend a documentation generator for rails/ruby?
* csmrfx has lot of recollections on a lot of that useless shit with java, thankfully these vague
aquaranto has quit [Remote host closed the connection]
glyytchy has quit [Quit: glyytchy]
fantazo has joined #ruby
adeponte has quit [Remote host closed the connection]
<csmrfx> I recommend you take all that enterprisey stuff, including classical OOP, and shove it! 8)
sepp2k1 has quit [Remote host closed the connection]
<Eiam> toolbox says rdoc & yard
<otters> is UnboundMethod#source an addition by active(model/record/etc.) or is it builtin?
<csmrfx> Eiam: whats 'apropos rdoc' say?
<csmrfx> otters: whats 'ri UnboundMethod' say?
<Eiam> csmrfx: it talks about headerdoc stuff
Monie has quit [Quit: Quit]
Tearan has quit [Quit: Sleepy Badger....]
<csmrfx> mine sez: rdoc (1) - Generate documentation from Ruby script files
<Eiam> yeah mine does not =p
<Eiam> i see rdoc(1) - ruby helper programs
<csmrfx> well then, rdoc -h
clj_newb has quit [Ping timeout: 260 seconds]
BoomCow has joined #ruby
<Eiam> you are basically saying 'use rdoc' although I'm not sure why you are saying it in the manner you are using
reset has joined #ruby
Mon_Ouie has quit [Read error: Connection reset by peer]
clj_newb has joined #ruby
adeponte has joined #ruby
martinklepsch has joined #ruby
nicoulaj has quit [Read error: Connection reset by peer]
jimeh has quit [Quit: bye]
geekbri has quit [Remote host closed the connection]
danishman has joined #ruby
TomRone has joined #ruby
scx has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
horrror has quit [Quit: horrror]
Vinz_` is now known as Vinz_
IrishGringo has joined #ruby
gener1c has joined #ruby
dangerousdave has quit [Quit: Leaving...]
gener1c has quit [Changing host]
gener1c has joined #ruby
gener1c has quit [Client Quit]
sjkaliski has joined #ruby
dangerousdave has joined #ruby
shtirlic has joined #ruby
miphe has joined #ruby
rdark has joined #ruby
nateberkopec has quit [Read error: Connection reset by peer]
carloslopes has quit [Remote host closed the connection]
niklasb has joined #ruby
sambio has quit [Ping timeout: 265 seconds]
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
<apeiros_> Eiam: rdoc is the defacto standard since it ships with ruby. yard is newer and IMO better.
adeponte has quit [Remote host closed the connection]
<Eiam> yard reminds me of appledoc
<reactormonk> use rubydoc.info for online yard
<reactormonk> Eiam, euruko10 was 90% apple...
<Eiam> i don't know who that is but I assume its the dude that worked on yard
adeponte has joined #ruby
<apeiros_> euruko is the european ruby conference
<apeiros_> why is it "ko" btw.? was the first one in germany?
vickaita has joined #ruby
<Eiam> ah i see
Monie has joined #ruby
Monie has quit [Changing host]
Monie has joined #ruby
DanielPCox has joined #ruby
<reactormonk> apeiros_, because klass
dmiller has quit [Remote host closed the connection]
<apeiros_> jo, kruzifix
adeponte has quit [Ping timeout: 276 seconds]
<BoomCow> Is it possible to use comparison operators with where?
<apeiros_> BoomCow: what?
<BoomCow> I.e: places.where{:people < 10}
vlad_starkov has joined #ruby
JonnieCache has joined #ruby
<apeiros_> BoomCow: you realize that this `where` is not from ruby itself, yes?
mikepack_ has joined #ruby
<BoomCow> Was not are
<BoomCow> aware
mikepack has quit [Read error: Connection reset by peer]
J-_-L has quit [Ping timeout: 265 seconds]
<BoomCow> I'm guessing it's Rails?
jerius has joined #ruby
<BoomCow> apeiros_, ty for pointing that out
<apeiros_> and then it'd be #rubyonrails
afader has quit [Ping timeout: 276 seconds]
<apeiros_> and the answer is no
<apeiros_> (unless you use stuff like squeel)
banisterfiend has joined #ruby
<BoomCow> okay
baroquebobcat has quit [Quit: baroquebobcat]
snearch has quit [Quit: Verlassend]
sjkaliski has quit [Quit: Linkinus - http://linkinus.com]
nateberkopec has joined #ruby
Markvilla has quit [Quit: Computer has gone to sleep.]
J-_-L has joined #ruby
mmitchel_ has joined #ruby
awarner has joined #ruby
vlad_starkov has quit [Ping timeout: 260 seconds]
workmad3 has joined #ruby
Vinz_ is now known as Vinz_`
allanm has joined #ruby
JonnieCache has quit [Ping timeout: 248 seconds]
mmitchell has quit [Ping timeout: 244 seconds]
ShiintoRyuu is now known as shiin
DDAZZA has joined #ruby
jrist is now known as jrist-afk
medik has joined #ruby
hotovson has quit [Remote host closed the connection]
cdzombak has left #ruby [#ruby]
awarner has quit [Ping timeout: 260 seconds]
n1x has quit [Quit: Ex-Chat]
<rking> OK, I think I'm doing something wrong. I have a class instance var Array @x that I add to in class method, but now I'm attempting to add a superclass, and then that superclass's @x is a different one. I'm about to write an accessor that combines the superclasses' @x's plus @x, but it is so gross.
awestroke has joined #ruby
clj_newb has quit [Ping timeout: 246 seconds]
<apeiros_> rking: you may want to paste code…
prezioso has joined #ruby
<rking> apeiros_: Right, definitely. Let me redo it as a standalone snippet. I'm definitely xy-problem'ing you here
danishman has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
hotovson has joined #ruby
irleif has joined #ruby
dmiller has joined #ruby
mityaz has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
J-_-L has quit [Ping timeout: 244 seconds]
DanielPCox has quit [Remote host closed the connection]
<maasha> HASH: Out of overflow pages. Increase page size
<maasha> what is this crap from DBM ?
<apeiros_> ouch
<apeiros_> increase page size! energy!
<apeiros_> </piccard>
DanielPCox has joined #ruby
prezioso has quit [Client Quit]
kbeddingfield has joined #ruby
<maasha> apeiros_: so much for using DBM as index
DanielPCox has left #ruby [#ruby]
headius has quit [Quit: headius]
dmerrick has quit [Ping timeout: 260 seconds]
Juul has joined #ruby
<apeiros_> based on what are you sorting the data btw.?
hotovson has quit [Read error: No route to host]
Cultofmetatron has quit [Remote host closed the connection]
<maasha> apeiros_: actually, with an index based solution I dont need sorting - I am in fact looking for pairs based on trailing /1 or /2 in the identifier.
jarred_ has joined #ruby
invisime has quit [Quit: Leaving.]
Takehiro has quit [Remote host closed the connection]
schronicles47 has joined #ruby
omry has joined #ruby
niklasb has quit [Ping timeout: 244 seconds]
answer_42 has quit [Ping timeout: 276 seconds]
jarred_ is now known as jarred
jcaudle has quit [Quit: jcaudle]
justinmcp has joined #ruby
dakine has joined #ruby
<rking> apeiros_: Really lines 31 and 32 are all I'm trying to achieve, I could change the entire approach around if it simplifies things.
<apeiros_> rking: oh, sounds like you want to reinvent rails' inheritable_cvars (or whatever name they used)
jarred has quit [Client Quit]
kbeddingfield has quit [Ping timeout: 252 seconds]
kylemcgill has joined #ruby
<rking> Heh, well, this is Rails, so I'll look for that.
workmad3 has quit [Ping timeout: 248 seconds]
cento has joined #ruby
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<apeiros_> alternatively: self.class.superclass.respond_to?(:fields) ? self.class.superclass.fields + self.class.fields : self.class.fields
<rking> I'm still in the mode with @@vars where the "don't do it!" advice is keeping me from using them. I'm sure that advice is overly broad, though.
<apeiros_> rking: no, that uses class variables
<rking> apeiros_: Yes, that's what I was about to write.
iamjarvo has quit [Quit: Computer has gone to sleep.]
<apeiros_> which would make the return value of fields for your superclass change as well
stkowski has joined #ruby
<rking> Yes, that's what I was afraid of.
<apeiros_> rking: btw., define_method(:foo) do @foo end <-- bad form for attr_reader :foo :-p
clj_newb has joined #ruby
<apeiros_> also, bad form for def foo; @foo; end
wargasm has quit [Read error: Connection reset by peer]
sambio has joined #ruby
<rking> apeiros_: Good catch re attr_reader, but not the same on the def -- you can't define in a method body
arietis has joined #ruby
lolsuper has joined #ruby
kbeddingfield has joined #ruby
sertaconay has quit [Read error: Connection reset by peer]
kbedding_ has joined #ruby
Keva161 has quit [Ping timeout: 260 seconds]
<apeiros_> rking: you don't need to define it there
glyytchy has joined #ruby
paul____ has joined #ruby
<apeiros_> rking: anyway, 1min, gist coming up
apok_ has joined #ruby
Todd has quit [Ping timeout: 260 seconds]
paul____ has left #ruby [#ruby]
apok__ has joined #ruby
Todd has joined #ruby
Tuxist has quit [Read error: Connection reset by peer]
paul_s has joined #ruby
kbeddingfield has quit [Ping timeout: 240 seconds]
<apeiros_> oh, finally found a better naming convention than "by" for self.inherited
insulator has joined #ruby
nazty has quit [Read error: Connection reset by peer]
nazty has joined #ruby
<rking> BTW: http://apidock.com/rails/Class/class_attribute is the non-deprecated thing for what I linked last
hbpoison has joined #ruby
<rking> apeiros_: Why __send__ ?
wargasm has joined #ruby
<apeiros_> because you don't know the classes which will inherit
apok has quit [Ping timeout: 252 seconds]
apok__ is now known as apok
kbeddingfield has joined #ruby
mercwithamouth has joined #ruby
<banisterfiend> apeiros_: 'subclass' ? :P
kbeddingfield has quit [Client Quit]
<apeiros_> descendant
<apeiros_> the gist is already updated ;-)
nignaztic has joined #ruby
<rking> Wait, what's up re: subclass vs. descendant ?
apok_ has quit [Ping timeout: 260 seconds]
<apeiros_> rking: argument name in the self.inherited hook
adeponte has joined #ruby
<apeiros_> I used self.inherited(by) until now, but I never really liked it.
<apeiros_> now I use descendant instead of by
<rking> Yeah, but what is the meaning difference?
slainer68 has joined #ruby
nazty has quit [Ping timeout: 260 seconds]
<rking> Here's the activesupport class_attribute version: https://gist.github.com/fa7f25f8aa3cbdc6718d
kbeddingfield_ph has joined #ruby
mneorr has joined #ruby
hbpoison has quit [Ping timeout: 265 seconds]
<maasha> is there a simple alternative to dbm - which fails due to too many keys (1M - which I think should be no problem) apparently
kbedding_ has quit []
kbeddingfield has joined #ruby
mmitchel_ has quit [Remote host closed the connection]
nga4 has quit []
<apeiros_> rking: self.fields ||= [] <-- ugly
theRoUS has quit [Ping timeout: 246 seconds]
* csmrfx whips out the jar with pound of choco peanuts
nignaztic has quit [Read error: Connection reset by peer]
erichmenge has quit [Quit: Linkinus - http://linkinus.com]
<csmrfx> How difficult can it be to normalize 1..-1 range to arbitrary n..m
w2f2 has joined #ruby
<apeiros_> doesn't sound very difficult… why?
<csmrfx> lol I've been at it like 40 mins
<rking> apeiros_: What's less ugly?
<apeiros_> initialization
* maasha tests gdbm
<rking> apeiros_: Where though?
blacktulip has quit [Ping timeout: 256 seconds]
slainer68 has quit [Ping timeout: 260 seconds]
<apeiros_> um, take a look at my code, f.ex.?
blacktulip has joined #ruby
<rking> apeiros_: I tried that, actually. This does work, though, and I totally agree it's better: https://gist.github.com/6326fc6c98a941bb879a
<rking> apeiros_: class_attribute must stow the variable elsewhere than @fields
<apeiros_> I think it uses @_fields
<apeiros_> just do an .instance_variables
irleif has quit [Quit: Computer has gone to sleep.]
tommyvyo has joined #ruby
jeff_sebring has joined #ruby
<rking> apeiros_: Nothing. I'm perhaps getting lost in eigenland, though.
jaygen has quit [Remote host closed the connection]
jaygen has joined #ruby
jaygen has quit [Remote host closed the connection]
kbeddingfield_ph has quit [Quit: Leaving]
<rking> singleton_class.instance_variables is also empty
kbeddingfield_ph has joined #ruby
jeffreybaird_ has joined #ruby
Iszak has joined #ruby
Iszak has quit [Changing host]
Iszak has joined #ruby
jeffreybaird has quit [Ping timeout: 260 seconds]
jeffreybaird_ is now known as jeffreybaird
kaneda__ has quit [Ping timeout: 246 seconds]
recycle has quit [Remote host closed the connection]
cableray has joined #ruby
Takehiro has joined #ruby
nazty has joined #ruby
workmad3 has joined #ruby
<apeiros_> rking: challenge accepted!
<rking> yay!
<matti> LOL
acanals has joined #ruby
<apeiros_> just got to find a rails project…
<matti> rking: He wasts to unlock more achievements.
acanals is now known as armando_canals
<rking> apeiros_: I was looking at the source and unable to see why it wouldn't be @fields on self
<rking> apeiros_: Why a Rails project? My latest gist uses activesupport directly.
shiin has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
justinmcp has quit [Remote host closed the connection]
<rking> apeiros_: But BTW my actual codebase is greenbar'd and refactored nicely. Thanks for working me through this.
<apeiros_> rking: because I'm lazy
shiin has joined #ruby
<apeiros_> rails c, everything's there
justinmcp has joined #ruby
<rking> Right
<apeiros_> chatting with somebody else too, so I'll be slow :)
<rking> I just do <space>bpry and it puts require'pry';binding.pry in the file (vim mapping)
<rking> apeiros_: Take your time, for sure. I'm curious but in no rush.
chson has quit [Remote host closed the connection]
<BoomCow> I have objects that I'm iterating through, can I just give it a new attribute in memory by doing something like place.new_attr = 10
<blazes816> the attr needs to be defined first
<rking> BoomCow: You could use http://www.ruby-doc.org/stdlib-1.9.3/libdoc/ostruct/rdoc/OpenStruct.html if you want something to act like that.
<apeiros_> rking: lol, they use closures
<apeiros_> define_method(:#{name}) { val }
irleif has joined #ruby
freakazoid0223 has joined #ruby
<rking> apeiros_: Oh, dang. Good reading. I skipped that
dakine has quit [Quit: Leaving]
dhonig has quit [Read error: Connection reset by peer]
justinmcp has quit [Ping timeout: 260 seconds]
Liquid has joined #ruby
Liquid is now known as Guest26962
nitti_ has quit [Remote host closed the connection]
Takehiro has quit [Ping timeout: 240 seconds]
kbeddingfield_ph has quit [Remote host closed the connection]
swex has quit [Remote host closed the connection]
Axsuul has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
kbeddingfield_ph has joined #ruby
swex has joined #ruby
anachronistic has left #ruby [#ruby]
<rking> I have another question that's bothering me, and it's so basic. arr = [1,2,3]; arr.count == arr.size == arr.length == 3; What == 2 ?
mark_locklear has quit [Remote host closed the connection]
adeponte has quit [Read error: Connection reset by peer]
<workmad3> rking: ??
<apeiros_> rking: still the same answer
<apeiros_> write your own method
<apeiros_> also, don't use arr.count for that
adeponte has joined #ruby
kbeddingfield_ph has quit [Client Quit]
<rking> apeiros_: Oh, I didn't see an answer from before.
<apeiros_> you asked that yesterday, no?
<apeiros_> I'd: class Array; def last_index; length-1; end; end
kbeddingfield_ph has joined #ruby
mmlac has joined #ruby
<rking> Yeah, I did, but I missed the answer.
<apeiros_> wrap in unless Array.method_defined? :last_index
<rking> That really seems like a gap in the API
<apeiros_> YOU DIDN'T READ MY ANSWER!?!?!?! what an OUTRAGE!!!!!1!1!1! ;-)
<apeiros_> naw, it's rarely ever needed
<rking> How many thousands of lines say (0..arr.size-1) ?
thinkdevcode has quit [Remote host closed the connection]
ij has joined #ruby
ij has quit [Changing host]
ij has joined #ruby
<apeiros_> rking: um, hopefully 0
<apeiros_> since: 0..-1
<workmad3> rking: how about 0...arr.size
robotmay has quit [Read error: No route to host]
<rking> workmad3: arr = [1,2,3] then arr[arr.size] => nil
robotmay has joined #ruby
rafter has quit [Remote host closed the connection]
<apeiros_> rking: ary[-1]
<apeiros_> knowing rubys API++
bigmac has joined #ruby
<workmad3> rking: yes, but 0...arr.size is up to, but not including, arr.size ;)
<apeiros_> even more legible: ary.last
<workmad3> rking: and yes, ary[-1] or even ary.last
<rking> Oh, hehe, that wee little dot
<rking> ... works perfectly for this. Gotcha.
<rking> This was a situation where I needed the indices, not the objects.
w2f2 is now known as xbayrockx
xbayrockx has quit []
kpshek has quit []
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
robotmay has quit [Remote host closed the connection]
irleif has quit [Quit: Computer has gone to sleep.]
carlyle has quit [Remote host closed the connection]
Guest15771 has quit [Quit: Guest15771]
jerius has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
GoGoGarrett has quit [Remote host closed the connection]
tvw has joined #ruby
Roa has quit [Ping timeout: 240 seconds]
recycle has joined #ruby
recycle has quit [Remote host closed the connection]
khakimov has joined #ruby
kylemcgi_ has joined #ruby
Roa has joined #ruby
Roa has quit [Changing host]
Roa has joined #ruby
reset has quit [Read error: Connection reset by peer]
awestroke has quit [Remote host closed the connection]
shiin has quit [Changing host]
shiin has joined #ruby
keymone has quit [Ping timeout: 264 seconds]
kylemcgill has quit [Ping timeout: 268 seconds]
mmitchell has joined #ruby
<BoomCow> I'm looking at sort right now and am a little bit confused
blacktulip has quit [Remote host closed the connection]
<BoomCow> do I have to pass in two values inside the pipe?
<BoomCow> or would something like results.sort_by{|p| p[:distance]}
<apeiros_> no, sort passes in two values
<BoomCow> i mean
<apeiros_> and you state how to compare the two values
<BoomCow> results.sort{|p| p[:distance]}
<BoomCow> ahhh
keymone has joined #ruby
<apeiros_> results.sort { |a,b| a[:distance] <=> b[:distance] }
<apeiros_> results in the same as: result.sort_by { |x| x[:distance] }
kaneda__ has joined #ruby
<apeiros_> in sort, you perform the comparison
<BoomCow> but is much faster no?
<apeiros_> in sort_by, you return the value by which should be sorted
<apeiros_> depends. in many cases, yes
daniel_-_ has quit [Ping timeout: 252 seconds]
<BoomCow> ty for the explanation apeiros_
<JohnTeddy> rows = [{"A"=>"foo", "B"=>"bar"}] ... How can I generate an array where A, B, C... all are 100, 99, 98, etc. I basically want to fill this array with numbers 100-1
carlyle has joined #ruby
mvangala_ has quit [Remote host closed the connection]
dangerousdave has quit [Quit: Leaving...]
Markvilla has joined #ruby
<apeiros_> JohnTeddy: do you mean hash?
<BoomCow> is that hash inside the array intensional?
boolean_ has quit [Remote host closed the connection]
<BoomCow> intentional*
<BoomCow> lol
<apeiros_> Array.new(100) { |i| 100-i } # this will give you the array 100..1
<apeiros_> the rest isn't really clear from your question
carlyle has quit [Remote host closed the connection]
Markvilla has quit [Client Quit]
<JohnTeddy> I don't think so, I just copied that code from stackexchange since it kind of worked.
IrishGringo has quit [Read error: Operation timed out]
paul_s has quit [Quit: paul_s]
Markvilla has joined #ruby
hefgi has quit [Quit: This computer has gone to sleep]
v0n has quit [Ping timeout: 240 seconds]
<JohnTeddy> I'm trying to make a 100x100 html table.
<JohnTeddy> Then once I can do that, I want to fill the table with numbers, and iterate changes to them 100 times.
jenrzzz has joined #ruby
<JohnTeddy> (I picked ruby as my language to start with for learning to program)
robustus has quit [Quit: ZNC - http://znc.in]
<JohnTeddy> So if I'm not doing something sanely, that's why.
<apeiros_> and numbers go 100 to 1 on every row?
ctwiz has joined #ruby
DaDaDOSPrompt has joined #ruby
<apeiros_> i.e., <tr><td>100</td><td>99</td>…<td>1</td></tr> - and that 100 times?
<JohnTeddy> Well, I want it displayed 1-100, though the way the code is now.. it seems to invert the order.
<DaDaDOSPrompt> what seems to be the current most-stable implementation of an IRC bot framework for Ruby?
<apeiros_> JohnTeddy: what does ruby -v output?
<apeiros_> DaDaDOSPrompt: cinch
tenmilestereo has quit [Quit: Leaving]
<apeiros_> DaDaDOSPrompt: the creator is in the channel too
<DaDaDOSPrompt> ok
<JohnTeddy> apeiros_: ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux]
<DaDaDOSPrompt> ah, intriguing.
<apeiros_> JohnTeddy: get 1.9.3
<apeiros_> 1.8 is ancient
<JohnTeddy> I have that.
<JohnTeddy> My /etc/alternatives picks 1.8 by default iirc.
Takehiro has joined #ruby
<apeiros_> ruby -v says you're not using that
<lolsuper> JohnTeddy, im new to rails but I thought rvm managed the versions...
<apeiros_> well, I don't know about how your OS/package manager/whatever handles your ruby versions, but make ruby 1.9.3 the default. anything else is bad.
<lolsuper> you could just pick sudo update-alternatives and do it that way
<apeiros_> lolsuper: rvm is one (good) way to deal with ruby versions
<apeiros_> there are others, though
<apeiros_> (and JohnTeddy seems to use another)
<JohnTeddy> lolsuper: Well I'm talking about from my shell/distribution. I think Ubuntu manages which things are run in this case.
shadow_fox has joined #ruby
recycle has joined #ruby
<JohnTeddy> Though I don't put a lot of confidence in that statement, that's what I was told at some point.
<apeiros_> JohnTeddy: anyway, in your ruby version, hashes are *unordered*
macabre has quit [Remote host closed the connection]
<dominikh> apeiros_: stop telling everyone that I hang out here :P
<apeiros_> which means the order of your values is totally arbitrary
<lolsuper> JohnTeddy, run the command 'sudo update-alternatives'
<apeiros_> DaDaDOSPrompt: and that'd be the author of it :-D
<JohnTeddy> Perhaps if I install the latest Ubuntu revision that would help.
<dominikh> dammit
<JohnTeddy> apeiros_: I see.
<apeiros_> dominikh: now, you've asked for it :-p
<DaDaDOSPrompt> heh
<dominikh> I suppose I did
<DaDaDOSPrompt> don't worry, I don't think I know enough Ruby yet to be a nuisance
<apeiros_> dominikh: anyway, your fault you wrote your own instead of helping with silverplatter-irc
<dominikh> those are usually the worst :P
monkegjinni has joined #ruby
<DaDaDOSPrompt> I was pondering an IRC bot for building wiki pages of meeting minutes
<dominikh> apeiros_: well, helping with that would've been basically the same as writing it from scratch, so yeah... ;)
Takehiro has quit [Ping timeout: 240 seconds]
<apeiros_> dominikh: wtf?
<dominikh> I ported a bot from silverplatter-irc to Cinch a couple months ago
<apeiros_> silverplatters basics were all done
<dominikh> apeiros_: entirely different architecture and design
kbeddingfield_ph has quit [Remote host closed the connection]
<apeiros_> s/different/superior/
<apeiros_> there, fixed that :-p
<dominikh> mine? sure :P
<dominikh> thanks for fixing it
<apeiros_> pfff
<apeiros_> sp can be used evented or looped
<apeiros_> don't see what architecture you couldn't build on top of that
workmad3 has quit [Ping timeout: 260 seconds]
<dominikh> sure, I could've built Cinch on top of silverplatter-irc, but really
Emmanuel_Chanel has quit [Quit: Leaving]
<dominikh> no gain from that for me
hbpoison has joined #ruby
kaneda__ has quit [Ping timeout: 256 seconds]
<apeiros_> less work?
IrishGringo has joined #ruby
<dominikh> not really. silverplatter-irc makes for the smallest part of Cinch
<dominikh> *would make
<apeiros_> but since we're at the topic, I never got around adding irc via ssl, does cinch?
_alejandro has joined #ruby
<apeiros_> dominikh: o0
<dominikh> SSL? sure
shikamaru has quit [Quit: ZNC - http://znc.sourceforge.net]
<apeiros_> then cinch misses quite a lot of functionality or goes way beyond being an irc framework…
_alejandro has quit [Remote host closed the connection]
shikamaru has joined #ruby
<dominikh> apeiros_: Officially, Cinch is a bot framework. Inofficially, it's an IRC framework that's hiding most of IRC. Like, when you request an attribute of a user (hostname, e.g.), we'll block, retrieve it, update the object, then return.
<apeiros_> block…
<dominikh> apeiros_: it hides many of the asynchronous aspects of IRC, really, and does a lot of parsing of various lists and data
<apeiros_> optionally I hope?
<apeiros_> so does sp…
<apeiros_> you could get banlists etc. as ordinary objects
kvevert has joined #ruby
<dominikh> nope, Cinch is built around threading
alejandro_ has quit [Ping timeout: 245 seconds]
undyingrage has quit [Read error: Operation timed out]
justinmcp has joined #ruby
<BoomCow> apeiros_, are hashes ordered in 1.9.3?
<apeiros_> BoomCow: yes
<dominikh> insertion order
<BoomCow> I thought hashes are always unordered
<apeiros_> dominikh: anyway, I'll take a look at cinch when/if I write my next irc bot
iamjarvo has joined #ruby
<dominikh> apeiros_: heh. just don't write a bot. IRC sucks :P
<apeiros_> the frameworks before sp were all more or less crap
kvevert has quit [Quit: Leaving]
<apeiros_> dominikh: I KNOW THAT!
<apeiros_> I felt the pain
<dominikh> before I wrote Cinch, I wrote a mostly functional IRCd in Ruby
<dominikh> that didn't teach me
Serial_Killer_C has quit [Remote host closed the connection]
kaneda__ has joined #ruby
hbpoison has quit [Ping timeout: 268 seconds]
<apeiros_> e.g. ban-list requests you have to queue until your last ban-list request gets the end command
<apeiros_> otherwise you can get mixed up banlists
<dominikh> apeiros_: did silverplatter-irc take care of faulty implementations? irc networks doing things differently?
<apeiros_> dominikh: yes
<apeiros_> I only added the specializations of freenode
<dominikh> heh. freenode only has additions, not quirks really. but ircnet e.g. gives you funny ban lists, missing half of the information
<apeiros_> but the parser had loading routines to patch depending on the recognized server. it'd start in an "almost rfc2812" mode
<dominikh> ah
ddd has quit [Quit: Leaving.]
djbpython has quit [Ping timeout: 248 seconds]
undyingrage has joined #ruby
<dominikh> yeah, doing server recognition as well
<dominikh> and SASL, we have SASL :P
<apeiros_> I didn't default to 2812 since most ircd's are utter crap.
<apeiros_> yes, that's one thing I never got around to and really missed.
<apeiros_> you don't want to log into your bot over an insecure line
<dominikh> (not just SSL but SASL, too :>)
<apeiros_> but that's why I had a REPL in my bot :D
<dominikh> hehe
<apeiros_> origins of irb_drop
geggam has quit [Read error: Connection reset by peer]
<apeiros_> a REPL via ssh/local connection I mean
<dominikh> recently I started working on support for encryption (FiSH), but that's really a gimmick. FiSH is horribly insecure
dmiller has quit [Remote host closed the connection]
elementz has joined #ruby
<apeiros_> if it's insecure, don't support it
<apeiros_> there's no point in giving people a false sense of security
<apeiros_> it's even detrimental IMO
preller has joined #ruby
<dominikh> prolly. for now it lives in a feature branch, to show some guy that it's possible :P There _are_ safer implementations building on top of it, so it's a good foundation for encryption support
<elementz> hi all. i am a bit confused: i am trying to run an rspec-test. i keep getting "`require': no such file to load -- rspec (LoadError)" although "rspec -v 2.11.1" . what to do?
<dominikh> boils down to ECB vs CBC in that case
<apeiros_> but I want to build a sane chat protocol for quite a while now
Neomex has joined #ruby
<apeiros_> I know
<apeiros_> and I don't care
<dominikh> :D
<apeiros_> the only halfway sane protocol I know out there is XMPP
<dominikh> xmpp and sane? lol sure
<dominikh> IRC is saner :P
monkegjinni has quit [Read error: Connection reset by peer]
<apeiros_> there you go
jgrevich_ has joined #ruby
<apeiros_> I'd probably use JSON as the serialization layer, even though I very much dislike json. but it opens up the avenue for simple webchat clients.
<dominikh> not doing a lot of ruby recently, anyway
<apeiros_> what are you doing then?
<apeiros_> clojure? node?
gabrielrotbart has joined #ruby
<dominikh> hell no
<dominikh> started doing Go some time ago
mmitchell has quit [Remote host closed the connection]
jgrevich has quit [Ping timeout: 264 seconds]
jgrevich_ is now known as jgrevich
<apeiros_> meh
<apeiros_> well, what do you think of it?
<dominikh> a nice language with nice concepts. sometimes too simplistic, but over all a nice alternative to Ruby
<dominikh> it's a bit like type-checked ducktyping
<apeiros_> I wish somebody did a sane C
solidoodlesuppor has quit [Remote host closed the connection]
<apeiros_> with as little features as possible
<dominikh> well, Go then :P
<csmrfx> I get no zero, instead 4.440892098500626e-16
<apeiros_> a very small, very fast, very portable language
<apeiros_> I hoped Go was that. but I was underwhelmed
<dominikh> oh, portable. forget that :>
* elementz tap tap tap
<apeiros_> csmrfx: welcome to the world of IEEE754 floats
<csmrfx> scheme?
<csmrfx> ocaml.
ltsstar has quit [Quit: ltsstar]
<apeiros_> scheme: slow. ocaml: ick
<csmrfx> scheme is faster than ruby.
<apeiros_> csmrfx: yes. ruby is *very* slow
<apeiros_> it's no big deal being faster than ruby, really.
<csmrfx> <3 ocaml
<csmrfx> yet on a very superficial level
<apeiros_> ever written something bigger, serious in it?
DrShoggoth has quit [Quit: Leaving]
<apeiros_> (I haven't, but I'm not sure I could)
shadow_fox has left #ruby [#ruby]
<csmrfx> well I hope to very soon
<csmrfx> but I will write the concept in ruby first
<dominikh> my main problem with Ruby currently is memory usage and managing dependencies
maasha has quit [Ping timeout: 245 seconds]
<dominikh> quite a fan of the (almost) statically compiled binaries Go produces
<apeiros_> fun, I didn't expect the latter
<apeiros_> ah, self contained apps
<apeiros_> yes, ruby is missing that.
<dominikh> yeah.
<apeiros_> and for no reason really.
<dominikh> rsync the binary up and done
<csmrfx> jruby gives you that
<csmrfx> okay
<dominikh> yeah, but then there's the j in jruby...
<apeiros_> let require be capable of handling zips
<dominikh> didn't I just say memory usage? :P
<apeiros_> embedd the whole source + interpreter
<csmrfx> you want self contained apps or not?
mmlac has quit [Quit: mmlac]
<apeiros_> probably not at any price
<dominikh> I want low memory footprint AND self contained at once :P
<csmrfx> jvm + interpreter + libs or no self contained apps
<csmrfx> dominikh: ok, use ocaml
<dominikh> I'm happy with Go, apeiros_ is the one not liking it ;)
<apeiros_> oh, a camel
<csmrfx> OCaml
<mr-rich> How does one access a Struct in a class?
<apeiros_> mr-rich: what?
<mr-rich> apeiros_: I have a Struct in a class and I want to populate it ...
<apeiros_> vague
<csmrfx> class, or instance
<apeiros_> what do you mean by "having a struct in a class"?
<csmrfx> I OBJECT
<apeiros_> csmrfx: against what?
jrist-afk is now known as jrist
<TTilus> mr-rich: pastie or does not exist :)
jblack has joined #ruby
DanielPCox has joined #ruby
DanielPCox has left #ruby [#ruby]
<mr-rich> apeiros_: I have a Struct: @userInfo3 = Struct.new(:name, :full_name, :is_encrypted, :password, :role, :partition, :login_shell) do ... inside a class and when I call on it, I get wrong number of arguments 7 for 0 ...
<apeiros_> oh wow, that's bad
cpruitt has quit [Quit: cpruitt]
recycle has quit [Remote host closed the connection]
<apeiros_> you do: @userInfo3.new("some name", "full name", "is encrypted", …)
kaneda__ has quit [Remote host closed the connection]
<apeiros_> and that's bad code as it creates the same struct over and over again
<apeiros_> assign it to a constant. use it like an ordinary class.
<TTilus> UserInfo = Struct.new( ... )
<csmrfx> def sihe curr, len, max, min; curr = curr.to_f / len.to_f * (2*Math::PI); val = Math.sin( curr.to_f ); min + (1+val)/2 * dist; end
<TTilus> user = UserInfo.new( .. )
martinklepsch has quit [Quit: Leaving]
<mr-rich> apeiros_: I'm still learning ruby ... the reason I used Struct is because I have to put the arguments into a hash of hashes ...
<csmrfx> that took me like 2 hours to write! *lol*
jaygen has joined #ruby
<TTilus> csmrfx: what is that max for in args?
<apeiros_> csmrfx: curr.fdiv(len)
<apeiros_> saves you all that to_f stuff
<apeiros_> also I think Math.sin already coerces to float
<mr-rich> apeiros_: perhaps I need to use a method instead ...
<csmrfx> that method is for scaling sine curve of custom len (x) to arbitrary range min..max on (y)
nitti has joined #ruby
<csmrfx> curr is the value on the custom len axis
<csmrfx> I bet there is a lot better bitwise for it
vickaita has quit [Ping timeout: 260 seconds]
<TTilus> mr-rich: you get more usefull feedback if you tell us what you are aiming at and pastie/gist the whole app even if it is not complete and does not work
<TTilus> mr-rich: don't be shy
kil0byte has joined #ruby
<matti> a
c0rn has quit [Remote host closed the connection]
c0rn_ is now known as c0rn
<csmrfx> I use sine curves to approximate effect of rotation and orbiting and axial tilt
dagnachewa has joined #ruby
zodiak has quit [Quit: Leaving]
<csmrfx> sunspot and magnetic storms from sun, too
<csmrfx> lol
hbpoison has joined #ruby
<csmrfx> I bet thats what Sid Meyer used too
ltsstar has joined #ruby
* apeiros_ blinks
jrajav has joined #ruby
nitti has quit [Ping timeout: 240 seconds]
<TTilus> csmrfx: still dont get how does it do scaling to range min..max, it doesn't refer to the max var at all (or im just plain blind)
kbeddingfield_ph has joined #ruby
<mr-rich> TTilus: I got it working with a method ... I am doing work for a bank, so some of what I do is a bit sensitive ... BUT ... this will eventually be an OSS project, so pastebin'ing may be ok ...
twopoint718 has quit [Ping timeout: 240 seconds]
cpruitt has joined #ruby
Trioke has quit [Ping timeout: 260 seconds]
bigmac has quit [Remote host closed the connection]
<csmrfx> TTilus: hm, I erased dist it seems
dagnachewa has quit [Quit: Leaving]
<csmrfx> def sinus2range curr, len, max, min; curr = curr.to_f / len.to_f * (2*Math::PI); val = Math.sin( curr.to_f ); dist = max - min; min + (1+val)/2 * dist; end
<csmrfx> That should be the correct paste
elico has joined #ruby
JustinCampbell has joined #ruby
nari has joined #ruby
jblack has quit [Quit: Lost terminal]
<JustinCampbell> anyone love CSS so much that they want to redesign an entire app overnight and have their work/name announced at the RubyConf keynote? ;)
<apeiros_> what if len == 0?
vickaita has joined #ruby
<apeiros_> JustinCampbell: that's a two sided sword…
<JustinCampbell> apeiros_: theres only one side and it hurts
<apeiros_> you're not supposed to hold it on that side…
<JustinCampbell> oh so thats why
armando_canals has quit [Ping timeout: 276 seconds]
<blazes816> buy gloves
Trioke has joined #ruby
cpruitt has quit [Ping timeout: 276 seconds]
daniel_-_ has joined #ruby
armando_canals has joined #ruby
<apeiros_> why on earth those he call the spermy operator "twiddle wakka"? http://robots.thoughtbot.com/post/2508037841/rubys-twiddle-wakka-and-why-we-dont-use-it
<dominikh> so in a nutshell: let's not use it so there's no reason for people to obey to sane versioning so we can't use it?
cableray has quit [Quit: cableray]
<JustinCampbell> ive always spelled it tiddly-wakka
<apeiros_> don't wakka my spermy :(
<csmrfx> Is calculating with integers faster than with floats?
<JustinCampbell> dont spermy my pessimism :)
<dominikh> csmrfx: hopefully so :P
hsbt_away is now known as hsbt
<csmrfx> or, is calculating with fewer bits good idea?
<apeiros_> csmrfx: depends, bignum overflow is an issue
<JustinCampbell> csmrfx: are you crunching tons of numbers?
<csmrfx> well
<apeiros_> on C level, int math is faster on most CPUs, though
<csmrfx> I have lot of little objects wanting to know where they stand
mmlac has joined #ruby
<csmrfx> I was thinking maybe should do everything with 8 bit numbers
<csmrfx> just not sure if that would really work in practice
<apeiros_> 8 bit numbers means 256 positions max, though
<apeiros_> and no, smaller numbers != faster
khakimov has quit [Quit: Computer has gone to sleep.]
<dominikh> in ruby you don't get to decide that. besides, 8 bit and 32 bit integers should be equally fast
<apeiros_> the native integer size is the fastest (and that's C again)
<csmrfx> At first I was thinking 4 bits would be enough resolution
<dominikh> (assuming 32 bit CPU here)
<apeiros_> dominikh: no
<apeiros_> native int is almost guaranteed to be the fastest
<csmrfx> float uses what?
<csmrfx> +ruby
<dominikh> apeiros_: see my parentheses :P
ltsstar has quit [Quit: ltsstar]
<apeiros_> dominikh: you said "equally fast"
rasbonics has quit [Quit: rasbonics]
<dominikh> apeiros_: ah, yeah, and I still stand by that. I don't see how smaller than native could slow it down
<apeiros_> 8 bit will be slower on a cpu with 32bit int ALU
cakehero has joined #ruby
<apeiros_> it has to add a step
<apeiros_> two actually
<apeiros_> padding, then truncating
dhruvasagar has quit [Ping timeout: 264 seconds]
n00b982 has joined #ruby
<JustinCampbell> csmrfx: write a quick benchmark and find out
<dominikh> apeiros_: use unsigned integers ;)
<n00b982> Hello, I have a quick question if nobody minds.
<apeiros_> dominikh: that doesn't change
<JustinCampbell> n00b982: dont ask to ask ;)
<csmrfx> JustinCampbell: now you are talking!
<n00b982> What is the best free Ruby compiler?
<dominikh> apeiros_: no padding whatsoever there. high bits will be zero, no matter what
<apeiros_> dominikh: where do you guess those zeros come from?
alanp has quit [Read error: Connection reset by peer]
alanp_ has joined #ruby
alanp_ has quit [Read error: Connection reset by peer]
<JustinCampbell> n00b982: Ruby isnt compiled, its interpretted by a VM
rdark has quit [Ping timeout: 265 seconds]
alanp has joined #ruby
<JustinCampbell> n00b982: there are quite a few of them, although most people use MRI, or JRuby if you already have Java ties
<n00b982> Oh I am new at this I wrote a quick hello world in Notepad++ but I am wondering how exactly it works
<apeiros_> dominikh: anyway, the difference will be negligible in almost every situation.
<dominikh> apeiros_: so where do they come from in an native size int that holds the value "1"? the register is zeroed anyway, you add your bits, enjoy
<n00b982> OK I will check them out
<JustinCampbell> n00b982: are you on windows?
<csmrfx> !g ruby interpreters
<n00b982> Windows 7, yes
<JustinCampbell> n00b982: http://rubyinstaller.org
<apeiros_> dominikh: the point of having an 8bit is that it isn't taking 32bits outside the register.
<csmrfx> quick, install virtualbox so you can escape to a sane OS like linux!
<n00b982> Thanks Jason :)
<apeiros_> and unless your whole app fits into registers…
<JustinCampbell> n00b982: np :) you run your file from the command line with `ruby filename.rb`
<dominikh> apeiros_: outside the registers, yes. but when loading it into registers for the actual math, you do not need any special padding
jenrzzz has quit [Ping timeout: 252 seconds]
<n00b982> @csmfrx Yes, I know, I would install Linux but I am happy the way it is...even though Windows is made by a communist company xD
<n00b982> brb
n00b982 has quit [Quit: Page closed]
dogweather has joined #ruby
Neomex has quit [Quit: Neomex]
tomsthumb has quit [Quit: Leaving.]
<JustinCampbell> well RubyRogues said Sandi Metz uses windows
<JustinCampbell> so ¯\_(ツ)_/¯
<apeiros_> dominikh: haven't read the whole, but I'll assume it contains a better explanation than what I'm capable to give: http://stackoverflow.com/questions/5069489/performance-of-built-in-types-char-vs-short-vs-int-vs-float-vs-double
x82_nicole has quit [Quit: Computer has gone to sleep.]
<dominikh> stackoverflow? that's cheating :P
chson has joined #ruby
<csmrfx> oh well I'll just leave the floats for now
<dominikh> csmrfx: don't you dare walk away now
Takehiro has joined #ruby
<dominikh> apeiros_: tad long :P
<csmrfx> it is just for that sinus range method anyway
<apeiros_> csmrfx: within ruby, it won't matter
<csmrfx> everything else I made to work 0-255
<apeiros_> method call overhead will eat up any difference anyway
<csmrfx> may have to go 32 bit
atmosx has joined #ruby
<dominikh> apeiros_: but no, the stackoverflow thread only says "it is so", not giving an explanation. but really, I don't care enough to further investigate :P
SCommette has quit [Quit: SCommette]
<csmrfx> but, will the reduction in amount of IO data over socket mean a lot, 8 bit vs 32 bit
<apeiros_> dominikh: he supports my POV, so he must be right!
<dominikh> haha
jenrzzz has joined #ruby
<dominikh> csmrfx: depends how many numbers you transmit, and how they get transmitted :P
<csmrfx> or, better yet, just use 4 bits
icole has quit [Remote host closed the connection]
miphe has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
radic has quit [Read error: Connection reset by peer]
kirun has quit [Quit: Client exiting]
<apeiros_> I'd use 1 bit!
Takehiro has quit [Ping timeout: 240 seconds]
<apeiros_> to be or not to be, that's all that really matters!
<dominikh> thanks for stealing that line from me :P
<dominikh> was just typing it
<arietis> hey
<csmrfx> Well, it is a planetary simulation. Sampling EM / Solar / UV irradiance, air pressure, temp, rainfall, biome * effect of gravitation + atmosphere on those
DDAZZA has quit [Ping timeout: 252 seconds]
<arietis> i have text file which i convert to string
<apeiros_> that poor textfile
<arietis> i wanna replace each "#dddd" with char
<apeiros_> gsub
<csmrfx> sampling frequency can be variable, but there are quite a few locations on any given planet
<apeiros_> String#gsub
<arietis> so i'm creating new emty string and iterate trhu string chars
<arietis> empty*
<csmrfx> temporal frequency, like "how often"
ckrailo has quit [Quit: Computer has gone to sleep.]
<arietis> is it good idea?
<blazes816> unless i've massively misunderstood you, no, it is not
<blazes816> use String#gsub like apeiros_ said
<csmrfx> ri String.replace
<csmrfx> or
<csmrfx> ri String.gsub
minijupe has joined #ruby
<arietis> yeah
<apeiros_> String#replace does not do what you think it does
<arietis> somehow i missed it when looking for method in docs
<arietis> yeah replace is wrong
<arietis> but gsub is fine
<csmrfx> haha so better read the ri
stopbit has quit [Quit: Leaving]
<arietis> thanks
vickaita has quit [Ping timeout: 260 seconds]
hefgi has joined #ruby
cantonic_ has joined #ruby
xcvd`` has joined #ruby
shtirlic_ has joined #ruby
<arietis> writing converter between Borland C++ Turbo and Borland C++ Builder 5.0
<arietis> :D
skcin7 has quit [Quit: Computer has gone to sleep.]
<arietis> pretty old stuff but i'm forced to do homework in it
icole has joined #ruby
ebobby_ has joined #ruby
<arietis> and projects are incompatible with each other
<arietis> due to encoding issues
<arietis> :)
<csmrfx> do you realize that the daylenght can vary +-~15 minutes due to orbital effects
Trioke_ has joined #ruby
<apeiros_> it can vary even more due to mountains!
kbeddingfield_ph has quit [Remote host closed the connection]
<csmrfx> the period is only 182 days
<csmrfx> (on earth)
<csmrfx> well, 182.66 dats
adeponte has quit [Remote host closed the connection]
<csmrfx> or somewhere there
hbpoison has quit [Ping timeout: 260 seconds]
jslowe has quit [Read error: Connection reset by peer]
ebobby has quit [Read error: Connection reset by peer]
zz_Cidan has quit [Ping timeout: 264 seconds]
zipkid has quit [Ping timeout: 264 seconds]
Kudos has quit [Ping timeout: 264 seconds]
perryh has quit [Ping timeout: 264 seconds]
shtirlic has quit [Ping timeout: 264 seconds]
ksk has quit [Ping timeout: 264 seconds]
cantonic has quit [Ping timeout: 264 seconds]
Poapfel has quit [Ping timeout: 264 seconds]
araujo has quit [Ping timeout: 264 seconds]
cantonic_ is now known as cantonic
zipkid has joined #ruby
<arietis> weird
Poapfel has joined #ruby
<arietis> sounds like server is down
ksk has joined #ruby
Trioke has quit [Ping timeout: 256 seconds]
Kudos has joined #ruby
ryanf has joined #ruby
drbawb has quit [Ping timeout: 264 seconds]
<csmrfx> hm, orbital is probably a wrong word in english. but due to how earth moves around the sun
<arietis> apeiros_: what if i don't have replacement?
nemesit has quit [Quit: Leaving...]
<apeiros_> arietis: you mean you want to delete it?
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
slainer68 has joined #ruby
<arietis> so i call gsub, i get match but i can only set replacement after converting match to unicode char
<apeiros_> gsub with a block
<arietis> kk, thanks
<arietis> love blocks
<arietis> :)
elico has quit [Remote host closed the connection]
<jrajav> Xeago: Hey, is that you getting the torrent?
perryh has joined #ruby
perryh has quit [Changing host]
perryh has joined #ruby
lupine_85 has quit [Excess Flood]
zz_Cidan has joined #ruby
zz_Cidan is now known as Cidan
Cidan has quit [Changing host]
Cidan has joined #ruby
<davidcelis> so i have a newbie rails programmer who's going through Learn Ruby the Hard Way. they got to exercise 5 and, for some reason, that exercise has syntax errors but only when run as a file. if i paste the whole file into IRB or Pry and run it, it's fine. when I pass the file itself to ruby, it gets a syntax error on line 1 (unless I comment out the rest of the file): https://gist.github.com/5c8849ab27f515c43002
<davidcelis> i can't figure out what's wrong with it
IrishGringo has quit [Read error: Operation timed out]
<csmrfx> comment everything and uncomment until you find
beilabs has quit [Ping timeout: 245 seconds]
catepillar has joined #ruby
<arietis> is it proper format of regexp? str.gsub(%r/\#\d{4}/)
<catepillar> 667 people? wow.
lupine_85 has joined #ruby
radic has joined #ruby
<arietis> it's halloween what do u expect
<arietis> :)
<catepillar> 667 is a low number?
<csmrfx> crazy I didn't realize that orbit accounts for about 50% of temp variation on earth
<dominikh> false, co2 accounts for 100% of temp variations on earth
<catepillar> anyways, i wanted to say that I love ruby and its awesome. learn new things about it every day.
<davidcelis> csmrfx: Commenting out the first line removes the syntax error, but then the script just abruptly halts and nothing ever gets printed.
jeremywrowe has joined #ruby
<davidcelis> something is up with the first line, but I can't figure out what.
<csmrfx> well, surprise!
<csmrfx> you found it!
<jrajav> dominikh: I assume by co2 you mean Al Gore
<dominikh> jrajav: yep
<csmrfx> increase orbit radius by 1% and our co2 would freeze over
<apeiros_> arietis: yes, but if you use / as delimiter anyway, then you don't need %r
<davidcelis> I found what, exactly?
IrishGringo has joined #ruby
<csmrfx> what am I, an irc psychic?
<davidcelis> So you also see nothing wrong there?
<csmrfx> "I see... utf-characters...."
<csmrfx> "its... utf-8 something"
* csmrfx leans into the chrystal ball
mikepack_ has quit [Remote host closed the connection]
JonnieCache has joined #ruby
<davidcelis> wow it's like i'm in #rubyonrails right now or something, crazy
<davidcelis> must be leaking
drbawb has joined #ruby
Dreamer3__ has quit [Quit: Computer has gone to sleep.]
khakimov has joined #ruby
mmitchell has joined #ruby
Markvilla has quit [Quit: Computer has gone to sleep.]
ddd has joined #ruby
Ry has quit [Quit: Ry]
<arietis> is there any transliteration class or 3rd party lib in ruby?
<csmrfx> "the spiri.. uh sprites are whispering: utf-8"
<davidcelis> csmrfx: dude
n00b982 has joined #ruby
* csmrfx hears the wailing of ascii spectres
<davidcelis> can anybody else help me out maybe?
banisterfiend has quit [Read error: Connection timed out]
<arietis> looks like i need something like Iconv
<arietis> but i don't get how it woeks so far
<arietis> works*
Guest26962 has quit [Remote host closed the connection]
<csmrfx> retype the line david
<nohonor> davidcelis, could there be some BOM bullshit going on there?
<csmrfx> then check editor file encoding
Bosma has quit [Ping timeout: 276 seconds]
<apeiros_> arietis: you want to convert #HHHH to the corresponding unicode character?
<blazes816> works fine for me
<n00b982> wow Ruby has a HUGE community
kbeddingfield_ph has joined #ruby
beilabs has joined #ruby
<atmosx> n00b982: huge compared to php community?
* atmosx Bob Marley - we're trolling
mmitchell has quit [Ping timeout: 256 seconds]
<arietis> apeiros_: the #HHHH chars are non-latin so i wanna convert it into latin translit analogues
Bosma has joined #ruby
<n00b982> what is the #php community?
<apeiros_> arietis: oh, have fun
<n00b982> so far this is one of the biggest I have seen
JonnieCache has quit [Ping timeout: 256 seconds]
<davidcelis> csmrfx: The encoding is UTF-8. I've retyped it, and no change
<blazes816> davidcelis: it works fine for me :s
<csmrfx> gonna be more fun translitterating with ruby than with perl
<csmrfx> davidcelis: tell ruby that too
SCommette has joined #ruby
<csmrfx> dont they teach you anything in that book
<blazes816> what version of ruby are you using?
<davidcelis> csmrfx: i tried the magic UTF-8 encoding, no go
Virunga has quit [Remote host closed the connection]
insulator has quit [Ping timeout: 276 seconds]
<davidcelis> blazes816: latest, with the falcon patch
<davidcelis> blazes816: the student is on 1.9.3-p194
<blazes816> damn, same here
<dominikh> I'm late, what's the problem?
<blazes816> shit don't work
<blazes816> that's about as far as we've gotten
<csmrfx> syntax error
<csmrfx> My bet is invalid editor settings
<dominikh> link?
<nohonor> davidcelis, works fine from me, just copy-pasted it from the pastebin
<davidcelis> blazes816: Weird, cloning the gist is fine.
<dominikh> and the exact error?
<davidcelis> csmrfx: On the student's part?
<arietis> looks similar :)
<blazes816> davidcelis: hex edit that shit and and compare
<davidcelis> dominikh: It was getting an ex5.rb:1: syntax error, unexpected tIDENTIFIER, expecting $end
<davidcelis> yeah she must not be configuring her editor correctly, cloning the gist provides a working file
<blazes816> what editor?
<blazes816> notepad++?
<csmrfx> oh you're a she now, david?
<blazes816> he's a he, it's she that's a she
<dominikh> no, his student is
<davidcelis> csmrfx: ?
<dominikh> and yes, that smells a lot like the BOM
bbttxu has joined #ruby
<davidcelis> blazes816: probably TextEdit set formatted to Plain Text
<blazes816> i'm crying now, thanks
<nohonor> the interpreter error could have been more helpful though
samuel02 has quit [Remote host closed the connection]
<davidcelis> could have
<davidcelis> just weird that pasting into IRB worked, even from the badly encoded file.
<dominikh> because you don't copy&paste the BOM
<davidcelis> right, yeah
omry has quit [Read error: Operation timed out]
<dominikh> the file is encoded just fine, it just contains superfluous bytes at the beginning and parsers tend not to like that
<blazes816> what a silly file
<csmrfx> is there a name for the number of the day in year
<blazes816> days_since_last_year?
<csmrfx> like a_official_term_for_such
kbeddingfield_ph has quit [Remote host closed the connection]
<davidcelis> makes sense. thanks for the help dominikh and blazes816
<dominikh> np
Vert has joined #ruby
<dominikh> csmrfx: nope, just that. day in the year :P
<davidcelis> days_since_last_year ?
<csmrfx> what am I gonna ri?
nitti has joined #ruby
<apeiros_> csmrfx: maybe ordinal day?
<csmrfx> yeah!
<csmrfx> just spotted that too
<csmrfx> I am tempted to use julian day but the calendar math gets wieldy quick
djbpython has joined #ruby
<davidcelis> fuck the julian calendar
<davidcelis> we need metric time
seanstickle has joined #ruby
<csmrfx> well julian calendar follows the planetary motions nicely
<dominikh> if only SI told us how long a day/year/whatever was :P
<csmrfx> in a way that metric can not
vitor-br has joined #ruby
<csmrfx> (already pointed out that orbital effect can vary day length by 9.9 + 7.7 minutes at max)
n00b982 has quit [Quit: Page closed]
<csmrfx> The only true calendar is... The Sun Calendar! 8)
Virunga has joined #ruby
nitti has quit [Ping timeout: 260 seconds]
glyytchy has quit [Quit: glyytchy]
<seanstickle> Depends on how fast you're going...
BSaboia has quit [Read error: Connection reset by peer]
<arietis> apeiros_: another stupid question and probably last one :) i have string "1060", how do i get utf-8 char with such value?
<arietis> is there any way to convert str to char?
<arietis> or i should convert to integer 1st
<csmrfx> whats "string"[0] say?
<arietis> it will say 1 in this case
<apeiros_> arietis: is it hex or decimal?
<arietis> decimal
<csmrfx> arietis, impossible
iamjarvo has quit [Quit: Computer has gone to sleep.]
<csmrfx> perhaps your string dont got encodings
erichmenge has joined #ruby
<dominikh> what the heck are you talking about
<apeiros_> arietis: then "1060".to_i.chr(Encoding::UTF_8)
<arietis> kk, thanks
Xeago has quit [Remote host closed the connection]
<apeiros_> but I think I showed you that technique yesterday already…
tomsthumb has joined #ruby
<arietis> not yesterday
<arietis> 2 days ago probably
Xeago has joined #ruby
<csmrfx> as a side note, ordinal is wrong, one get day of the year with .yday like Date.new(2012).yday
tjbiddle has joined #ruby