apeiros_ changed the topic of #ruby to: Ruby 2.0.0-p0: http://ruby-lang.org (Ruby 1.9.3-p392) || Paste >3 lines of text on http://gist.github.com
JMcAfreak has left #ruby ["Still here. /msg me if you really really need me."]
<snugglepus> apeiros_, thanks for the help.
j^2 has joined #ruby
tcstar has quit [Read error: Connection reset by peer]
hybris has quit [Quit: hybris]
reset has quit [Ping timeout: 245 seconds]
adamjleonard has quit [Quit: Leaving...]
arya has quit [Ping timeout: 256 seconds]
arya has joined #ruby
ph^ has joined #ruby
Fitzsimmons has left #ruby ["Leaving"]
pyx has quit [Quit: WeeChat 0.4.0]
love_color_text has quit [Read error: Connection reset by peer]
drKreso has joined #ruby
samuel02 has quit [Remote host closed the connection]
zoned has quit [Quit: zoned]
jodjdu has joined #ruby
endzyme has quit [Ping timeout: 272 seconds]
<jodjdu> Hello - I know that Math::sqrt(1) and Math.sqrt(1) are the same, so why doesn't Math.PI work?
<apeiros_> PI is a constant, sqrt a method
nik_-_ has quit [Quit: nik_-_]
<Paradox> pi is a c…oh damnit apeiros_
<Paradox> you beat me
<Paradox> lol
<Paradox> :)
zenergi has quit [Remote host closed the connection]
<apeiros_> while :: works to invoke methods (everywhere, afaik), . does not work to resolve constants
zenergi has joined #ruby
zenergi has quit [Changing host]
zenergi has joined #ruby
bradhe has quit [Remote host closed the connection]
zenergi has quit [Client Quit]
<apeiros_> note though, :: to invoke methods looks rather antiquated
bradhe has joined #ruby
ph^ has quit [Ping timeout: 252 seconds]
tish has joined #ruby
<jodjdu> Ok, so I'm confused about what :: and . are really intended for. :: resolves either a constant, or any other variable, or dispatches a method, and . just dispatches a method?
j^2 has quit [Quit: for i in `/names` ; do adios $i; done]
<apeiros_> "or any other variable"?
<Paradox> jodjdu, no
<apeiros_> :: only resolves constants
<Paradox> . is how you dispatch methods on things
tish has quit [Read error: Connection reset by peer]
angusiguess has joined #ruby
<jodjdu> aepiros_: i say or any other variable, because a constant is just a variable with a naming convention isn't it?
<Paradox> :: is how you call constants
tish has joined #ruby
<Paradox> no, they're different internally two
<Paradox> constants are…constant
<Paradox> they never change
_nitti has joined #ruby
<Paradox> during the runtime of the program
<Paradox> two
<apeiros_> (sadly) only theoretically true
<Paradox> stupid swiftkey
<jodjdu> Paradox: that's just a convention, not the actual semantics tho isn't it?
<Paradox> nope
<apeiros_> >> Foo = 1; Foo = 2; p Foo
<eval-in> apeiros_: Output: "/tmp/execpad-4ea00596171c/source-4ea00596171c:1: warning: already initialized constant Foo\n2\n" (http://eval.in/11416)
<Paradox> but if you dont follow convention people wont want to use your code or help with your code
<jodjdu> Paradox: yeah, so as i say just a convention, not actual semantics
<apeiros_> all ruby does is give you a slap on your hand (a warning)
<Paradox> ruby doesn't have a PDP-8 because of MINSWAN
snugglepus has quit [Ping timeout: 248 seconds]
<Paradox> but instead there is a much more nebulous construct of "idiom"
<jodjdu> So why can I use :: to call a method? Is it just a historical leftover?
<burgestrand> >> Object.const_set("moo", 5)
<eval-in> burgestrand: Output: "/tmp/execpad-9f5007f50d90/source-9f5007f50d90:1:in `const_set': wrong constant name moo (NameError)\n\tfrom /tmp/execpad-9f5007f50d90/source-9f5007f50d90:1:in `<main>'\n" (http://eval.in/11417)
<burgestrand> :)
<apeiros_> jodjdu: I guess so
<Paradox> probably because in the case of math
<burgestrand> >> Object.const_set("Moo", 5); p Moo
<eval-in> burgestrand: Output: "5\n" (http://eval.in/11418)
<apeiros_> there have been talks about removing :: for method invocations. but ruby 2.0 still allows it - even without warning
<Paradox> its not an instance method
rippa has quit [Ping timeout: 240 seconds]
<Paradox> its a class method
<apeiros_> Paradox: it's both actually
<burgestrand> hehe
<Paradox> apeiros_, is one an alias?
<burgestrand> an instance method on the class instance
<apeiros_> no, module_function
<Paradox> oh
<Paradox> tricky
<Paradox> i can see why jodjdu is confused
<apeiros_> >> include Math; p sin(0)
<eval-in> apeiros_: Output: "0.0\n" (http://eval.in/11419)
bradhe has quit [Ping timeout: 248 seconds]
<apeiros_> ruby is easy. but it has lots of complexity when you look closer.
<Paradox> jodjdu, this isnt going to hold true in all cases, but generally its because something would be a class method
<Paradox> a good rule of thumb is
<Paradox> only use :: for constants
<burgestrand> ^
<Paradox> and use . for most other things
<apeiros_> seconded
<apeiros_> use . for method invocations. always.
<apeiros_> use :: for constants (well, always, since there's no other way)
<Paradox> for example, someone recently asked me to add a method to my snoo gem
<Paradox> that lets people do Snoo.new
<Paradox> to create new Snoo::Clients
mfcabrera has quit [Quit: This computer has gone to sleep]
<Paradox> i decided not to go with that, because snoo is not a class, its a module
<burgestrand> Object.get_const("Math").get_const("PI")
<burgestrand> >> Object.get_const("Math").get_const("PI")
<eval-in> burgestrand: Output: "/tmp/execpad-4c0eceec6615/source-4c0eceec6615:1:in `<main>': undefined method `get_const' for Object:Class (NoMethodError)\n" (http://eval.in/11420)
<burgestrand> Hm.
<burgestrand> Ah.
_nitti has quit [Ping timeout: 260 seconds]
<burgestrand> >> Object.const_get("Math").const_get("PI")
<apeiros_> Paradox: I usually do e.g. Snoo.client then
<eval-in> burgestrand: Output: "" (http://eval.in/11421)
predator117 has quit [Ping timeout: 246 seconds]
<Paradox> apeiros_, erm
<Paradox> yeah
<Paradox> Snoo.client
<Spooner_> Paradox, You could use a different name to put a factory method on the module.
jgarvey has quit [Quit: Leaving]
rezzack has quit [Quit: Leaving.]
<Paradox> i woke up like half an hour ago
<apeiros_> I'd agree that Snoo.new would be confusing
<Paradox> so im still a bit brain fuzzy
<apeiros_> given that the general expectation is that Foo.new.instance_of?(Foo)
<jodjdu> What I really want to know i guess, is whether or not :: and ., when used as method dispatch, are semantically equivalent? do they produce the same AST? and from what you're saying i guess they are
<Paradox> again
<apeiros_> they are
<Paradox> nothing we say will be 100% true
<Paradox> but mostly yes
benlieb has quit [Quit: benlieb]
<banisterfiend> apeiros_: Paradox: thought :: can be useeful for methods that are 'fake' constructors
<apeiros_> :: is 100% usable where . is
<banisterfiend> though*
daniel_- has joined #ruby
<apeiros_> banisterfiend: you mean like Nokogiri::XML() ?
<Paradox> sigh, nokogiri
<banisterfiend> apeiros_: yeah i guess
<apeiros_> fugly IMO. but maybe that's just me.
<Paradox> fugly as sin
<apeiros_> I use that as Nokogiri.XML in all my code.
<Paradox> i always have to open an old file or something if its been months since i used nokogiri
<Paradox> just to remember to do it right
predator117 has joined #ruby
<banisterfiend> apeiros_: well, i usually use it like this: A::B(c) instead of A::B.new(c)
<burgestrand> >> RubyVM::InstructionSequence.compile("Math.sin").to_a == RubyVM::InstructionSequence.compile("Math::sin").to_a
<eval-in> burgestrand: Output: "" (http://eval.in/11422)
<burgestrand> Bah.
<burgestrand> >> p RubyVM::InstructionSequence.compile("Math.sin").to_a == RubyVM::InstructionSequence.compile("Math::sin").to_a
<eval-in> burgestrand: Output: "true\n" (http://eval.in/11423)
<apeiros_> banisterfiend: I prefer A.b(c)
<apeiros_> less confusion IMO
<Paradox> hmm
angusiguess has quit [Ping timeout: 260 seconds]
<Paradox> why io-console not install native binary
<Paradox> its compilation fails
jodjdu has quit [Quit: Page closed]
<banisterfiend> apeiros_: i think, (to use an example from p-dogg): Pry::Method(method) (which returns a Pry::Method instance) is nicer than: Pry.Method(method)
<banisterfiend> apeiros_: it looks weird invoking a method that starts with a capital
<apeiros_> banisterfiend: that's why I said b, not B
<apeiros_> Pry.method, but that'd collide with Object#method
<banisterfiend> apeiros_: ah
<apeiros_> Nokogiri.xml(doc)
<banisterfiend> fair enough, i just like that: Pry::Method(meth) makes it clear that an instance of Pry::Method will be returned
<apeiros_> I understand that
<apeiros_> I find it reasonable, but it's not the way I prefer
<apeiros_> bedtime for me anyway :-/
<banisterfiend> sleep well bb
<apeiros_> gn8
<banisterfiend> i should sleep too
<banisterfiend> we're in teh same timezone :)
adkron has quit [Ping timeout: 264 seconds]
<banisterfiend> >> p RubyVM::InstructionSequence.compile("Math.sin")
<eval-in> banisterfiend: Output: "<RubyVM::InstructionSequence:<compiled>@<compiled>>\n" (http://eval.in/11424)
<banisterfiend> >> p RubyVM::InstructionSequence.compile("Math.sin").decompile
<eval-in> banisterfiend: Output: "/tmp/execpad-0a5dd800792e/source-0a5dd800792e:1:in `<main>': undefined method `decompile' for <RubyVM::InstructionSequence:<compiled>@<compiled>>:RubyVM::InstructionSequence (NoMethodError)\n" (http://eval.in/11425)
statarb3 has quit [Read error: Connection reset by peer]
joshman_ has quit [Quit: Computer has gone to sleep.]
<banisterfiend> >> p RubyVM::InstructionSequence.compile("Math.sin").disasm
<eval-in> banisterfiend: Output: "\"== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========\\n0000 trace 1 ( 1)\\n0002 getinlinecache 9, <ic:0>\\n0005 getconstan ..." (http://eval.in/11426)
moos3 has joined #ruby
Kuifje has quit [Ping timeout: 244 seconds]
jimeh has quit [Quit: Computer has gone to sleep.]
<burgestrand> >> p RubyVM::InstructionSequence.compile("Math.sin").disasm; p RubyVM::InstructionSequence.compile("Math::sin").disasm
<eval-in> burgestrand: Output: "\"== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========\\n0000 trace 1 ( 1)\\n0002 getinlinecache 9, <ic:0>\\n0005 getconstan ..." (http://eval.in/11427)
moos3 has quit [Client Quit]
straind has joined #ruby
<apeiros_> tsk
<apeiros_> >> p RubyVM::InstructionSequence.compile("Math.sin").disasm == RubyVM::InstructionSequence.compile("Math::sin").disasm
<eval-in> apeiros_: Output: "true\n" (http://eval.in/11428)
<apeiros_> there, that's all you wanted to know, right? :-p
<burgestrand> Same thing that I did before :
<burgestrand> :p
<burgestrand> I wonder…
<burgestrand> >> p RubyVM::InstructionSequence.compile("Math::PI").disasm; p RubyVM::InstructionSequence.compile("Math.PI").disasm
<eval-in> burgestrand: Output: "\"== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========\\n0000 trace 1 ( 1)\\n0002 getinlinecache 11, <ic:0>\\n0005 getconsta ..." (http://eval.in/11429)
Targen has joined #ruby
<apeiros_> burgestrand: um, no?
<apeiros_> you printed the sequences, I printed whether they're ==
<burgestrand> apeiros_: earlier, I compared the output of to_a
<apeiros_> that must have been quite a bit earlier…
<burgestrand> 8 minutes ago
<burgestrand> ^^
<apeiros_> aha, I see
<apeiros_> n8
apeiros_ has quit [Remote host closed the connection]
<burgestrand> \o.
NemesisD has quit [Quit: leaving]
bonhoeffer has joined #ruby
huoxito has quit [Quit: Leaving]
brianpWins has quit [Quit: brianpWins]
stopbit has quit [Quit: Leaving]
tatertots has joined #ruby
tatertots has left #ruby [#ruby]
alexim has quit [Quit: sleep]
wmoxam has quit [Ping timeout: 248 seconds]
bradhe_ has joined #ruby
wmoxam has joined #ruby
bradhe_ has quit [Read error: Connection reset by peer]
bradhe__ has joined #ruby
bradhe__ has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
bradhe has quit [Read error: Connection reset by peer]
frem has quit [Ping timeout: 260 seconds]
pac1 has joined #ruby
chrishough has quit [Quit: chrishough]
mneorr has quit [Read error: Connection reset by peer]
samphippen has quit [Quit: Computer has gone to sleep.]
banisterfiend is now known as banister`sleep
Artheist has quit [Remote host closed the connection]
mrsolo has quit [Quit: Leaving]
arya__ has joined #ruby
jphpsf has quit [Ping timeout: 244 seconds]
lewix has joined #ruby
lewix has joined #ruby
lewix has quit [Changing host]
Bosma has quit [Quit: leaving]
niklasb has quit [Ping timeout: 248 seconds]
jjbohn has joined #ruby
undersc0re97 has quit [Quit: "Fascism is capitalism in decay" - Vladimir Lenin]
zmanfx has quit [Quit: Textual IRC Client: www.textualapp.com]
Pandaen has quit [Remote host closed the connection]
arya has quit [Ping timeout: 256 seconds]
chrishough has joined #ruby
NiteRain has quit [Ping timeout: 246 seconds]
kirchevsky has quit [Ping timeout: 245 seconds]
joofsh has quit [Remote host closed the connection]
Pandaen has joined #ruby
undersc0re97 has joined #ruby
undersc0re97 has joined #ruby
undersc0re97 has quit [Changing host]
tish has quit [Quit: Leaving.]
Es0teric has joined #ruby
nazty has quit [Ping timeout: 240 seconds]
apok has quit [Quit: apok]
dayepa has quit [Quit: dayepa]
dayepa has joined #ruby
apeiros_ has joined #ruby
emergion has joined #ruby
undersc0re97 has quit [Quit: "Fascism is capitalism in decay" - Vladimir Lenin]
undersc0re97 has joined #ruby
undersc0re97 has joined #ruby
undersc0re97 has quit [Changing host]
snugglepus has joined #ruby
kirchevsky has joined #ruby
kirchevsky has quit [Client Quit]
dreda has joined #ruby
skattyadz has quit [Quit: skattyadz]
hashmal has quit [Quit: Computer has gone to sleep.]
kraljev2 has left #ruby [#ruby]
horofox__ has quit [Quit: horofox__]
marr has quit [Ping timeout: 256 seconds]
ephemerian has quit [Quit: Leaving.]
jeremywrowe has joined #ruby
jeremywrowe has quit [Client Quit]
ph^ has joined #ruby
Catbuntu has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
jeremywrowe has joined #ruby
TDJACR has joined #ruby
apeiros_ has quit [Ping timeout: 255 seconds]
ph^ has quit [Ping timeout: 257 seconds]
spider-mario has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
subbyyy has joined #ruby
occupant has quit [Quit: Leaving]
Bosma has joined #ruby
chrishough has quit [Quit: chrishough]
rupee has quit [Quit: Leaving]
chrishough has joined #ruby
angusiguess has joined #ruby
bradhe has joined #ruby
apok has joined #ruby
reset_ has quit [Quit: Leaving...]
danblack has quit [Ping timeout: 276 seconds]
splud has quit [Quit: splud]
rburton- has quit [Quit: Leaving...]
newUser1234 has joined #ruby
angusiguess has quit [Ping timeout: 256 seconds]
skattyadz has joined #ruby
jpcamara has quit [Quit: jpcamara]
nachtwandler has quit [Remote host closed the connection]
sambao21 has joined #ruby
cableray has quit [Quit: cableray]
codespectator has quit [Ping timeout: 252 seconds]
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
codespectator has joined #ruby
codespectator has quit [Max SendQ exceeded]
takeru has joined #ruby
dhruvasagar has joined #ruby
codespectator has joined #ruby
codespectator has quit [Max SendQ exceeded]
juarlex has quit [Ping timeout: 264 seconds]
charliesome has joined #ruby
codespectator has joined #ruby
codespectator has quit [Max SendQ exceeded]
Chryson has joined #ruby
codespectator has joined #ruby
codespectator has quit [Max SendQ exceeded]
jrendell has quit [Ping timeout: 252 seconds]
ortuna has quit [Ping timeout: 272 seconds]
codespectator has joined #ruby
kristofers has quit []
etcetera has quit []
aleph-null has quit [Remote host closed the connection]
rupee has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
chrishough has quit [Quit: chrishough]
takeru has quit [Ping timeout: 248 seconds]
chrishough has joined #ruby
newUser1234 has quit [Remote host closed the connection]
newUser1234 has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
newUser1234 has quit [Read error: Connection reset by peer]
MrZYX is now known as MrZYX|off
dhruvasagar has quit [Ping timeout: 246 seconds]
newUser1234 has joined #ruby
thecarlhall has joined #ruby
dhruvasagar has joined #ruby
chrisnicola has quit [Quit: This computer has gone to sleep]
splud has joined #ruby
thecarlhall has quit [Client Quit]
SCommette has joined #ruby
freeayu has joined #ruby
pskosinski has quit [Ping timeout: 245 seconds]
chrishough has quit [Client Quit]
apeiros_ has joined #ruby
mikurubeam has joined #ruby
emanu has joined #ruby
tylersmith has quit [Quit: tylersmith]
ortuna has joined #ruby
angle has joined #ruby
daniel_- has quit [Ping timeout: 252 seconds]
hadees has quit [Quit: hadees]
takeru has joined #ruby
sambao21 has quit [Ping timeout: 252 seconds]
joeycarm_ has joined #ruby
joeycarmello has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Ping timeout: 244 seconds]
Kruppe has joined #ruby
werdnativ has quit [Ping timeout: 255 seconds]
chrishough has joined #ruby
dogweather has joined #ruby
takeru has quit [Ping timeout: 252 seconds]
zeade has quit [Quit: Leaving.]
jpfuentes2 has joined #ruby
bw_ has joined #ruby
apok has quit [Quit: apok]
apeiros_ has quit [Ping timeout: 246 seconds]
joeycarm_ has quit [Remote host closed the connection]
codespectator has quit [Ping timeout: 244 seconds]
adamjleonard has joined #ruby
danblack has joined #ruby
jpcamara has joined #ruby
dhruvasagar has joined #ruby
newUser1234 has quit [Remote host closed the connection]
newUser1234 has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
jpcamara has quit [Client Quit]
enebo has quit [Quit: enebo]
newUser1234 has quit [Ping timeout: 256 seconds]
ortuna has quit [Ping timeout: 252 seconds]
NiteRain has joined #ruby
aleph-null has joined #ruby
<lewix> what's the difference between array[4] = "four" and array.replace("four")
<lewix> sorry
<lewix> what's the difference between array[4] = "four" and array[4].replace("four")
reset has joined #ruby
reset_ has joined #ruby
slainer68 has joined #ruby
pdamer has joined #ruby
ebobby has quit [Quit: Lost terminal]
<Spooner_> lewix, The former creates a new string and puts it into the array. The latter replaces the characters in the string already in the array.
joeycarmello has joined #ruby
ph^ has joined #ruby
<lewix> Spooner_: what's the difference between the two things youhave just said
reset has quit [Ping timeout: 272 seconds]
emergion has joined #ruby
<Spooner_> In the latter case the string contents change, but the array is unchanged. In the former the array changes and the old string is thrown away.
skattyadz has quit [Quit: skattyadz]
mibitzi has joined #ruby
emergion has quit [Client Quit]
etcetera has joined #ruby
skattyadz has joined #ruby
aleph-null has quit [Ping timeout: 272 seconds]
<lewix> Spooner_: if the string contents change doesn't it mean that the array changed
<Spooner_> Well, not directly.
squidBits has quit [Quit: whoops]
ph^ has quit [Ping timeout: 272 seconds]
<Spooner_> There is a difference between a String (object) and the characters (data) it contains.
dogweather has quit [Remote host closed the connection]
<lewix> Spooner_: can you elaborate on the string contents change, but the array is unchanged
aleph-null has joined #ruby
senayar has quit [Quit: Quitte]
sam113101 has quit []
rburton- has joined #ruby
dhruvasagar has quit [Ping timeout: 256 seconds]
bradhe has quit [Remote host closed the connection]
<Spooner_> lewix, x, y = "x", "y"; p [x.object_id, y.object_id]; x = "a"; y.replace("b"); p [x.object_id, y.object_id] #=> output is [26550460, 26550420] then [26550180, 26550420]
aleph-nu_ has joined #ruby
bradhe has joined #ruby
<Spooner_> x becomes a completely new String. y stays the same String, but its contents are changed.
<lewix> I'm under the impression that the string contents change either way but one return a new array while another return the same?
havenwood has joined #ruby
aleph-nu_ has quit [Remote host closed the connection]
<Spooner_> No, you are missing the difference between a variable and the Object that it points to.
apeiros_ has joined #ruby
Demux has left #ruby [#ruby]
Bosox20051 has joined #ruby
etcetera has quit []
codespectator has joined #ruby
aleph-null has quit [Ping timeout: 272 seconds]
thmz has quit []
<Spooner_> If I do x = "frog" then x = "fish" then the String that is in x has been replaced. The old one will then be garbage collected since it has no references to it.
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
<lewix> Spooner_: what do you mean. didn't i just say the same thing you said phrased differently
bradhe has quit [Ping timeout: 248 seconds]
<lewix> Spooner_: I understand that. I was referring to array in particular
<Spooner_> If I do x << "y" it appends y to the end of the String in x (so it becomes "fishy" now). It is the same String object, but it has been altered.
<lewix> Spooner_: so it returns a new array while the other don't
<Spooner_> The fact that it is an array isn't important. An array just contains a list of objects; a regular variable holds one.
skattyadz has quit [Quit: skattyadz]
<lewix> Spooner_: thanks y the way
<lewix> by*
<lewix> Spooner_: right I don't think you understood me. but you enlighten me. thank you
<bluesnow> Hi, I'm getting a stack level too deep error from the line Dir[dump_dir.to_s+"/*.jpg"].sort
<bluesnow> And I'm not sure why it's happening. There's a single .jpg file in the dump_dir directory
Voodoofish430 has quit [Quit: Leaving.]
ortuna has joined #ruby
<Spooner_> Each Object has a unique ID, so you can see the way the String changes in my earlier example where I print out the ID at different points. The id of x changes; the id of y stays the same.
<Spooner_> So, say I did z = y early on, it would still refer to the same String as y at the end, but if I did z = x, it would point to a different Object at the end than x does.
<lewix> Spooner_: i do understand that. As I said,I was confused with reference to an object inside a collection
gtc has quit [Quit: kill -9 gtc]
Icarot has joined #ruby
arya__ has quit [Ping timeout: 248 seconds]
<Spooner_> I see. It is just the same.
bonhoeffer has quit [Quit: bonhoeffer]
reset_ has quit [Ping timeout: 252 seconds]
sam113101 has joined #ruby
gtc has joined #ruby
<havenwood> bluesnow: I don't know what is causing your problem, but (if you don't need File.join) good idea to: Dir["#{dump_dir}/*.jpg"].sort
<Spooner_> bluesnow, Depends what dump_dir is. Maybe the stack is locked inside that (if it is a method), not in the Dir[] part.
iamjarvo has joined #ruby
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<Spooner_> bluesnow, I'd advise you to try "p dump_dir.to_s" before that line to see if it fails there.
<havenwood> bluesnow: What do you get for?: p dump_dir
<bluesnow> Okay, I'll try p dump_dir.to_s
lledet has joined #ruby
<Spooner_> Or it could be that the #to_s is broken. Who knows? ;)
<lewix> Spooner_: I think the problem here was more english than anything else lol
apeiros_ has quit [Ping timeout: 264 seconds]
arya has joined #ruby
<bluesnow> Spooner: Yeah, it fails with the same stack is too deep error on the p dump_dir.to_s line
<Spooner_> try it with just "p dump_dir" if that is a method itself.
<havenwood> bluesnow: What is??: p dump_dir
kofno has quit [Remote host closed the connection]
<bluesnow> havenwood: dump_dir is https://gist.github.com/davidxc/5069434
<Spooner_> The recursion error message in Ruby has always been absurd. I can't understand why it can't give you a stack trace at least for the last few methods it has passed through.
<lewix> Spooner_: I would still say that the string content changed in both, the string object didn't change when i use the method replace.. what I didn't know was that Array[number] = foo returned a new array
<bluesnow> The odd thing is that the dump_dir method was working before..
sn0wb1rd has quit [Ping timeout: 244 seconds]
<bluesnow> Not sure what I changed to make it keep recursing
<havenwood> bluesnow: What do you get for?: p now
kofno has joined #ruby
<havenwood> nvm
<bluesnow> I'm getting #<Pathname:/home/david/work_projects/digital_film_tree/capsapp/tmp/ffmbc/frame_grabs/dump_03_01_13-18_30_45PM.8986c836-e841-4cbb-8694-bf2b6461b5b2>
<bluesnow> And that keeps recursing on my terminal screen
<bluesnow> But I'm not sure why it's recursing. I feel like I'm missing something obvious here :(
<lewix> Spooner_: no I'm wrong. grr I need a break
<Spooner_> It is a complex subject.
<bluesnow> Any idea what's going on?
huoxito has joined #ruby
<Spooner_> bluesnow, Your problem is using Rails. Everyone knows it :P
<bluesnow> Spooner: Yeah, I'm using Rails. Why would that give me that error though?
stkowski has quit [Quit: stkowski]
<Spooner_> Not the slightest clue. Sorry!
chrishough has quit [Quit: chrishough]
atno has quit [Remote host closed the connection]
mneorr has joined #ruby
<lewix> Spooner_: ok it's clear now. =) took me a glass of water
kofno has quit [Ping timeout: 256 seconds]
<Spooner_> I had a glass of water earlier, so I should have been able to explain it better :D
zubov has joined #ruby
atno has joined #ruby
Icarot has quit [Ping timeout: 252 seconds]
io_syl_ has joined #ruby
kofno has joined #ruby
mneorr_ has joined #ruby
mneorr has quit [Ping timeout: 244 seconds]
nfk is now known as Kamijou_Touma
io_syl has quit [Ping timeout: 264 seconds]
io_syl_ is now known as io_syl
<lewix> Spooner_: what was really bugging me was i didn't dissociate collection of elements with the individual elements I guess
<lewix> Spooner_: thanks. now back to business
ffranz1 has joined #ruby
tish has joined #ruby
dogweather has joined #ruby
heliumsocket has joined #ruby
atno has quit [Remote host closed the connection]
BRMatt has quit [Ping timeout: 272 seconds]
rickmasta has joined #ruby
havenwood has quit [Remote host closed the connection]
ffranz has quit [Ping timeout: 260 seconds]
BadLarry has quit [Quit: quitting]
havenwood has joined #ruby
Hanmac has quit [Ping timeout: 246 seconds]
atno has joined #ruby
sn0wb1rd has joined #ruby
BadLarry has joined #ruby
ortuna1 has joined #ruby
ortuna has quit [Ping timeout: 252 seconds]
freeayu has quit [Read error: Connection reset by peer]
atno has quit [Remote host closed the connection]
rupee has quit [Ping timeout: 246 seconds]
bigmac has joined #ruby
havenwood has quit [Ping timeout: 264 seconds]
robert__ has joined #ruby
mattbl has joined #ruby
bluesnow has left #ruby [#ruby]
jjbohn is now known as jjbohn|afk
danblack has quit [Ping timeout: 256 seconds]
bigmac has quit [Remote host closed the connection]
apeiros_ has joined #ruby
mattbl has quit [Client Quit]
robert_ has quit [Ping timeout: 246 seconds]
bigmac has joined #ruby
havenwood has joined #ruby
havenwood has quit [Remote host closed the connection]
mneorr_ has quit [Read error: Connection timed out]
havenwood has joined #ruby
Hanmac has joined #ruby
neurotech has quit [Remote host closed the connection]
codespectator has quit [Ping timeout: 252 seconds]
philcrissman has quit [Remote host closed the connection]
ortuna1 has quit [Ping timeout: 272 seconds]
havenwood has quit [Ping timeout: 245 seconds]
codespectator has joined #ruby
jpcamara has joined #ruby
<bigmac> im having this stupid problem with my algorithm breaks do to a var.scan => private method `scan' called for nil:NilClass (NoMethodError)
<bigmac> c_user=block.to_s.split(":::")[0].scan(/c_user................/)#=> ["c_user=100000388969195"]
<bigmac> c_user=block.to_s.split(":::")[0].scan(/c_user................/)#=> NIL so it breaks
atno has joined #ruby
dmerrick has joined #ruby
apeiros_ has quit [Ping timeout: 256 seconds]
ph^ has joined #ruby
freeayu has joined #ruby
<wedgeV> how do i update my gem to the latest version on https://github.com/rubygems/rubygems
ortuna1 has joined #ruby
<wedgeV> "gem --version" is 2.0.0 and "gem update --system" says latest version is installed. but the github repo has 2.0.1
atno has quit [Remote host closed the connection]
utf1000 has joined #ruby
kpshek has joined #ruby
araujo has quit [Quit: Leaving]
kpshek has quit [Client Quit]
<utf1000> on a mac I can do this in ruby: exec 'say "test"' ... let's say I have a variable called "insult", what do I type?>
malkomalko has quit [Remote host closed the connection]
ph^ has quit [Ping timeout: 248 seconds]
<utf1000> exec 'say "', insult, '"' isn't working
chico_chicote has quit [Remote host closed the connection]
jpcamara has quit [Quit: jpcamara]
<elliottcable> you can embed a variable into a string, between the quotes
<elliottcable> you have to put it inside curly brackets, with an octothorpe
<utf1000> like a ${insult} ?
<elliottcable> like this:
<elliottcable> #{insult}
<utf1000> ah
<elliottcable> but, better yet, you don't need to use exec for that; you can use backticks
<elliottcable> like this:
<elliottcable> `say #{insukt}`
<elliottcable> er, insult*
<elliottcable> ... incase it wasn't clear, you don't type that after exec; you just put it all alone
<utf1000> sweeeet it works yes
<utf1000> octothorpe eh? I'll note that.
philcrissman has joined #ruby
Es0teric has quit [Remote host closed the connection]
<elliottcable> I just think “hash” is a stupid name for it (pot.); and “number sign” is even worse (that's №.)
karl___ has joined #ruby
danblack has joined #ruby
thinkclay has quit [Quit: Leaving.]
<utf1000> pound?
alvaro_o has quit [Quit: Ex-Chat]
<utf1000> "thingy" always works too
jjbohn|afk is now known as jjbohn
<karl___> can the =~ and !~ operators be used to match a single character in a string? ie, should 'Albion' =~ /a/ return true?
<sam113101> no because it's case sensitive by default
<sam113101> 'Albion' =~ /A/ works though
jdunck has quit [Quit: Computer has gone to sleep.]
<karl___> thank you very much
blahwoop has joined #ruby
<sam113101> (but what it really says is "does it contain an A?")
<sam113101> don't know if that's what you wanted
<karl___> that's exactly what i want
<karl___> :)
<sam113101> ok
<sam113101> you could do 'Albian'['A'] also
<sam113101> puts 'it does contain A' if 'Albian'['A']
<Spooner_> Or 'Albion'.include? 'A'
<karl___> this is all great stuff
<karl___> much appreciated
twoism has quit [Remote host closed the connection]
<Spooner_> For the regexp, you might have wanted 'Albion' =~ /a/i #=> 0 (which is a match)
Spooner_ has quit [Quit: Leaving]
luckyruby has quit [Remote host closed the connection]
ortuna1 has quit [Ping timeout: 248 seconds]
jjbohn has quit [Quit: Leaving...]
allaire has joined #ruby
jamesfung14 has quit [Ping timeout: 248 seconds]
Beakr has joined #ruby
apeiros_ has joined #ruby
philcrissman has quit [Remote host closed the connection]
Es0teric has joined #ruby
dogweather has quit [Remote host closed the connection]
<Beakr> I know this is pretty nebbish, but since I've never done it before, if you declare a method like 'def something(arg=12)' will it make 'arg' optional, and unless explicitly defined in the functions arguments have a default value of 12?
jpcamara has joined #ruby
benlieb has joined #ruby
Takehiro has joined #ruby
lewix has quit [Remote host closed the connection]
Eerbin has quit [Read error: Connection reset by peer]
rickmasta has quit [Quit: Leaving...]
aeontech has quit [Quit: aeontech]
ryanf has quit [Quit: leaving]
bigmac has quit [Quit: Leaving]
ananthakumaran has joined #ruby
jamesfung14 has joined #ruby
zeade has joined #ruby
blahwoop has quit [Ping timeout: 276 seconds]
waxjar has quit [Ping timeout: 245 seconds]
lewix has joined #ruby
apeiros_ has quit [Ping timeout: 248 seconds]
thomasfedb has quit [Ping timeout: 276 seconds]
snugglepus has quit [Ping timeout: 272 seconds]
waxjar has joined #ruby
dhruvasagar has joined #ruby
rburton- has quit [Quit: Linkinus - http://linkinus.com]
thomasfedb has joined #ruby
adamjleonard has quit [Quit: Leaving...]
zeade has quit [Quit: Leaving.]
slainer68 has quit [Remote host closed the connection]
adamjleonard has joined #ruby
codespectator has quit [Ping timeout: 264 seconds]
heliumsocket has quit [Quit: heliumsocket]
heliumsocket has joined #ruby
poikon_work has joined #ruby
codespectator has joined #ruby
rickmasta has joined #ruby
ortuna1 has joined #ruby
hbpoison has quit [Ping timeout: 260 seconds]
waxjar has quit [Ping timeout: 264 seconds]
robert__ is now known as robert_
poikon_work has quit [Ping timeout: 260 seconds]
waxjar has joined #ruby
codespectator has quit [Ping timeout: 252 seconds]
mercwithamouth has quit [Ping timeout: 252 seconds]
DrShoggoth has joined #ruby
brooks has joined #ruby
ortuna1 has quit [Ping timeout: 252 seconds]
dmerrick has quit [Quit: dmerrick]
<brooks> how come no one talks in here??
fire has joined #ruby
hbpoison has joined #ruby
nik_-_ has joined #ruby
nik_-_ has quit [Client Quit]
<aytch> we do
<aytch> it's more active during US working hours
huoxito has quit [Ping timeout: 244 seconds]
razibog has quit [Read error: Operation timed out]
kofno has quit [Remote host closed the connection]
d2dchat has joined #ruby
naughtystyle has joined #ruby
ph^ has joined #ruby
lledet has quit [Quit: lledet]
sayan has joined #ruby
mneorr has joined #ruby
Chryson has quit [Ping timeout: 264 seconds]
hbpoison has quit [Ping timeout: 256 seconds]
dopie has quit [Ping timeout: 245 seconds]
ph^ has quit [Ping timeout: 255 seconds]
yacks has joined #ruby
apeiros_ has joined #ruby
ocnam has joined #ruby
philcrissman has joined #ruby
mneorr has quit [Ping timeout: 255 seconds]
hakunin_ has joined #ruby
mneorr has joined #ruby
<brooks> hello
<brooks> is anyone in here?
<aytch> hi
naughtystyle is now known as naughtystyle458
<brooks> let's talk about ruby!
<aytch> Got a topic in mind?
<brooks> no, I was hoping others would be in the room discussiong ruby issues… it seems this room isn't very active
hakunin has quit [Ping timeout: 245 seconds]
<aytch> It does get active, but late friday evenings is not that time
d2dchat_ has joined #ruby
<brooks> what?? that's when programmers are supposed to be on the computer eating cold pizza lol
cyberflux has quit []
<aytch> strangely enough...not everyone is a stereotype
<brooks> haha - I understand
<aytch> for example, I'm a neckbeard, and I have little *nix-fu
<aytch> I'm also skinny
<brooks> yeah, I figured you were a unix guy if you have a beard!
codespectator has joined #ruby
<brooks> go check out linus' most recent rant at some of the other contributors over microsoft's secure boot issue - interesting read
radic has quit [Disconnected by services]
radic_ has joined #ruby
<aytch> I'm currently working through the Ruby Koans, but that sounds interesting
d2dchat has quit [Ping timeout: 248 seconds]
<brooks> you just starting?
<aytch> pretty much, yeah
<brooks> cool
rickmasta has quit [Quit: Leaving...]
<aytch> I'm a sysadmin, not a developer, but I learned some Puppet, got interested in Ruby so I could use Puppet better, and now I think Ruby is awesome
<brooks> oh yeah, that is cool.
waxjar has quit [Ping timeout: 264 seconds]
kofno has joined #ruby
<aytch> Now I've written horrible things like using Powershell to write out Puppet configs, and Ruby programs that run powershell scripts
kofno has quit [Read error: Connection reset by peer]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
angusiguess has joined #ruby
lewix has quit [Remote host closed the connection]
codespectator has quit [Ping timeout: 245 seconds]
VonKingsley has joined #ruby
codespectator has joined #ruby
sambao21 has joined #ruby
<aytch> I will say my scripting is *way* more robust now, though
apeiros_ has quit [Ping timeout: 255 seconds]
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
sambao21 has quit [Client Quit]
codespectator has quit [Ping timeout: 272 seconds]
codespectator has joined #ruby
sambao21 has joined #ruby
jamesfung14 has quit [Ping timeout: 245 seconds]
dhruvasagar has quit [Ping timeout: 255 seconds]
IrishGringo has joined #ruby
tish has quit [Quit: Leaving.]
tjbiddle has joined #ruby
bradhe has joined #ruby
rupee has joined #ruby
philcrissman has quit [Remote host closed the connection]
kofno has joined #ruby
[rupee] has joined #ruby
[rupee] has quit [Read error: Connection reset by peer]
chrishunt has quit [Quit: ZzZzZz...]
chrishunt has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
rupee has quit [Ping timeout: 245 seconds]
mneorr has quit [Read error: Connection timed out]
aeontech has joined #ruby
hbpoison has joined #ruby
mneorr has joined #ruby
poikon has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
xemu has quit [Ping timeout: 256 seconds]
pdamer has quit [Quit: pdamer]
crackfu has joined #ruby
takeru has joined #ruby
sambao21 has quit [Quit: sambao21]
jamesfung14 has joined #ruby
sambao21 has joined #ruby
takeru has quit [Ping timeout: 248 seconds]
sambao21 has quit [Client Quit]
pdamer has joined #ruby
jamesfung14 has quit [Read error: Operation timed out]
Cyrus has joined #ruby
Cyrus has quit [Max SendQ exceeded]
apeiros_ has joined #ruby
Cyrus has joined #ruby
phantasm66 has joined #ruby
phantasm66 has quit [Changing host]
phantasm66 has joined #ruby
Cyrus has quit [Max SendQ exceeded]
naughtystyle458 has quit [Quit: naughtystyle458]
pdamer has quit [Client Quit]
sirish has joined #ruby
SDr is now known as NightCreature
JaTochNietDan has quit [Ping timeout: 276 seconds]
uris has quit [Quit: Leaving]
Pandaen has quit [Ping timeout: 244 seconds]
trumpeter2003 has quit [Read error: Connection reset by peer]
arya has quit [Ping timeout: 248 seconds]
trumpeter2003 has joined #ruby
joofsh has joined #ruby
Beakr has quit [Quit: Beakr]
rickmasta has joined #ruby
mneorr has quit [Read error: Connection timed out]
sirish has quit [Ping timeout: 245 seconds]
angusiguess has quit [Ping timeout: 264 seconds]
sirish has joined #ruby
mneorr has joined #ruby
d34th4ck3r has joined #ruby
aeontech has quit [Quit: aeontech]
JaTochNietDan has joined #ruby
arya has joined #ruby
apeiros_ has quit [Ping timeout: 246 seconds]
sambao21 has joined #ruby
dogweather has joined #ruby
elico has joined #ruby
miso1337 has quit [Quit: afk]
codespectator has quit [Ping timeout: 252 seconds]
pepper_chico has joined #ruby
phantasm66 has quit [Quit: *poof*]
dogweather has quit [Remote host closed the connection]
io_syl has quit [Quit: Textual IRC Client: www.textualapp.com]
ph^ has joined #ruby
sirish_ has joined #ruby
codespectator has joined #ruby
io_syl has joined #ruby
sirish has quit [Ping timeout: 264 seconds]
girija has joined #ruby
mneorr has quit [Read error: Operation timed out]
d34th4ck3r has quit [Ping timeout: 245 seconds]
sambao21 has quit [Quit: sambao21]
trumpeter2003 has quit [Ping timeout: 248 seconds]
codespectator has quit [Ping timeout: 255 seconds]
jpcamara has quit [Quit: jpcamara]
ph^ has quit [Ping timeout: 272 seconds]
lewix has joined #ruby
poikon has joined #ruby
mneorr has joined #ruby
d34th4ck3r has joined #ruby
iamjarvo has quit [Quit: Leaving.]
dmerrick has joined #ruby
mahmoudimus has joined #ruby
jpcamara has joined #ruby
dmerrick has quit [Client Quit]
codespectator has joined #ruby
benlieb has quit [Quit: benlieb]
tjbiddle has quit [Quit: tjbiddle]
pac1 has quit [Ping timeout: 260 seconds]
otters is now known as otters`away
dogweather has joined #ruby
otters`away is now known as otters
codespectator has quit [Ping timeout: 256 seconds]
jpcamara has quit [Quit: jpcamara]
danblack has quit [Ping timeout: 256 seconds]
ortuna has joined #ruby
poikon has quit [Ping timeout: 248 seconds]
codespectator has joined #ruby
blahwoop has joined #ruby
Jebron has quit [Quit: Leaving]
tomzx_mac has joined #ruby
hashmal has joined #ruby
codespectator has quit [Ping timeout: 256 seconds]
Nanuq has quit [Quit: .]
jpfuentes2 has joined #ruby
dhruvasagar has joined #ruby
apeiros_ has joined #ruby
miso1337 has joined #ruby
toekutr has joined #ruby
_veer has joined #ruby
mibitzi has quit [Quit: Leaving]
otters is now known as otters`away
d34th4ck3r has quit [Ping timeout: 245 seconds]
eliasp has quit [Ping timeout: 248 seconds]
sepp2k has quit [Remote host closed the connection]
otters`away is now known as otters
dhruvasagar has quit [Read error: Connection reset by peer]
Nanuq has joined #ruby
girija has quit [Read error: Connection reset by peer]
miso1337 has quit [Client Quit]
hogeo has joined #ruby
otters is now known as otters`away
blahwoop has quit [Ping timeout: 256 seconds]
dhruvasagar has joined #ruby
kumavis has quit [Quit: kumavis]
otters`away is now known as otters
crackfu has quit [Read error: Connection reset by peer]
otters is now known as otters`away
crackfu has joined #ruby
mneorr has quit [Read error: Connection timed out]
mneorr has joined #ruby
Myconix has joined #ruby
kumavis has joined #ruby
ortuna has quit [Ping timeout: 252 seconds]
m3pow has quit [Quit: ChatZilla 0.9.90 [Firefox 19.0/20130218103006]]
m3pow has joined #ruby
crackfu has quit [Remote host closed the connection]
eliasp has joined #ruby
apeiros_ has quit [Ping timeout: 260 seconds]
joofsh has quit [Remote host closed the connection]
blahwoop has joined #ruby
t-mart has joined #ruby
t-mart has quit [Read error: Connection reset by peer]
t-mart has joined #ruby
jonahR has joined #ruby
BizarreCake has joined #ruby
one has joined #ruby
arya has quit [Ping timeout: 248 seconds]
angusiguess has joined #ruby
dogweather has quit [Remote host closed the connection]
arya has joined #ruby
mneorr has quit [Read error: Connection timed out]
codespectator has joined #ruby
ananthakumaran has quit [Ping timeout: 260 seconds]
mercwithamouth has quit [Read error: Operation timed out]
Bosox20051 has quit [Quit: Leaving]
sirish_ has quit [Ping timeout: 248 seconds]
blahwoop has quit [Ping timeout: 256 seconds]
pnbeast has quit [Quit: leaving]
one has quit []
mercwithamouth has joined #ruby
one has joined #ruby
hadees has joined #ruby
one has quit [Client Quit]
one has joined #ruby
ph^ has joined #ruby
one has quit [Client Quit]
one has joined #ruby
malkomalko has joined #ruby
apeiros_ has joined #ruby
codespectator has quit [Ping timeout: 248 seconds]
malkomalko has quit [Remote host closed the connection]
mneorr has joined #ruby
ph^ has quit [Ping timeout: 245 seconds]
Weazy has quit [Ping timeout: 246 seconds]
wmoxam has quit [Ping timeout: 256 seconds]
bigmac has joined #ruby
havenwood has joined #ruby
arya has quit [Ping timeout: 248 seconds]
havenwood has quit [Read error: Connection reset by peer]
tommyvyo has quit [Quit:]
angle has quit [Read error: Connection reset by peer]
angle has joined #ruby
Kruppe has quit [Remote host closed the connection]
breadtk has left #ruby [#ruby]
arya has joined #ruby
freeayu has quit [Ping timeout: 255 seconds]
miso1337 has joined #ruby
angle has quit [Client Quit]
apeiros_ has quit [Ping timeout: 248 seconds]
miso1337_ has joined #ruby
freeayu has joined #ruby
JaTochNietDan has quit [Quit: Right.]
rickmasta has quit [Quit: Leaving...]
mneorr has quit [Read error: Connection timed out]
miso1337 has quit [Ping timeout: 260 seconds]
miso1337_ is now known as miso1337
angusiguess has quit [Ping timeout: 256 seconds]
mneorr has joined #ruby
rippa has joined #ruby
ershad has joined #ruby
Takehiro has quit [Remote host closed the connection]
sayan_ has joined #ruby
sayan_ has quit [Read error: Connection reset by peer]
danrasband has joined #ruby
danrasband has left #ruby [#ruby]
cha1tanya has quit [Quit: Leaving]
jeremywrowe has quit [Quit: jeremywrowe]
inokenty has joined #ruby
inokenty has quit [Max SendQ exceeded]
inokenty has joined #ruby
inokenty has quit [Max SendQ exceeded]
emergion has joined #ruby
inokenty has joined #ruby
inokenty has quit [Max SendQ exceeded]
Lemtzas has joined #ruby
codespectator has joined #ruby
JaTochNietDan has joined #ruby
mneorr has quit [Remote host closed the connection]
mfcabrera has joined #ruby
wmoxam has joined #ruby
dhruvasagar has quit [Ping timeout: 245 seconds]
Loaft has joined #ruby
MetaCosm has quit [Quit: ZNC - http://znc.in]
<VonKingsley> is the code example for ruby incorrect on this page? http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29
codespectator has quit [Ping timeout: 256 seconds]
Takehiro has joined #ruby
takeru has joined #ruby
codespectator has joined #ruby
wmoxam has quit [Ping timeout: 256 seconds]
apeiros_ has joined #ruby
Honeycomb has joined #ruby
codespectator has quit [Ping timeout: 245 seconds]
takeru has quit [Ping timeout: 260 seconds]
allaire has quit []
redbaritone has joined #ruby
arya has quit [Ping timeout: 248 seconds]
codespectator has joined #ruby
redbaritone has quit [Client Quit]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
mibitzi has joined #ruby
mockra has quit [Remote host closed the connection]
codespectator has quit [Ping timeout: 252 seconds]
Myconix has quit [Quit: Server Error 482: The server has been shot by a 12-gauge, please contact an administrator]
ershad has quit [Quit: ershad]
Takehiro has quit [Remote host closed the connection]
JaTochNietDan has quit [Ping timeout: 256 seconds]
<lewix> VonKingsley: it's correct
SCommette has quit [Quit: SCommette]
<reactormonk> nope. return in initialize tends to fail
<VonKingsley> lewix: doesn't the constructor return the object not a string from return?
arietis has joined #ruby
<reactormonk> VonKingsley, changed it.
<lewix> return is optional
codespectator has joined #ruby
hakunin has joined #ruby
<reactormonk> return is useless
apeiros_ has quit [Ping timeout: 246 seconds]
<VonKingsley> reactormonk: thanks for the change, I get whats going on now.
SCommette has joined #ruby
hakunin_ has quit [Ping timeout: 272 seconds]
HecAtic has joined #ruby
<lewix> VonKingsley: puts was missing, I missed that. you were right. return is optional, most people don't use it
<reactormonk> aytch, small warning: puppet is messy
<reactormonk> lewix, it is _not_ optional in initialize. It is useless, because it will always return the new instance.
<Hanmac> isnt the return value of initialize totaly ignored?
ph^ has joined #ruby
codespectator has quit [Ping timeout: 248 seconds]
<lewix> reactormonk: you get the exact same output in irb whether you use return on not
drKreso has quit [Quit: drKreso]
Apocalypse has quit [Ping timeout: 245 seconds]
<VonKingsley> thats because the code is run in initialize the return in the object that was created
tomzx_mac has quit [Ping timeout: 252 seconds]
jankly has joined #ruby
drKreso has joined #ruby
drKreso has quit [Client Quit]
ph^ has quit [Ping timeout: 272 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
subbyyy has quit [Ping timeout: 252 seconds]
mockra has joined #ruby
<lewix> VonKingsley: what?
Apocalypse has joined #ruby
whowantstolivefo has joined #ruby
yashshah has joined #ruby
arya has joined #ruby
ClownZ has joined #ruby
ClownZ has left #ruby [#ruby]
ClownZ has joined #ruby
<ClownZ> clear
<ClownZ> ops
mockra has quit [Remote host closed the connection]
znode has joined #ruby
<VonKingsley> lewix: Are you doing return puts "foo" in the initialize method? Or just return "foo" ?
<lewix> return puts "foo"
znode has quit [Remote host closed the connection]
IrishGringo has quit [Quit: ChatZilla 0.9.90 [Firefox 19.0/20130215130331]]
<VonKingsley> when Class.new is called, the puts "foo" is still evaluated and shows up in irb, its not really returned, the return is ignored and instead an instance of the class is returned
yshh_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby
<ClownZ> *o apeiros
araujo has joined #ruby
bubblehead has quit [Remote host closed the connection]
<lewix> VonKingsley: ok . thanks
toekutr has quit [Remote host closed the connection]
aedornm has joined #ruby
yshh has joined #ruby
hbpoison has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
adamjleonard has quit [Quit: Leaving...]
yshh has quit [Ping timeout: 252 seconds]
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
hbpoison has joined #ruby
arya has quit [Ping timeout: 248 seconds]
mercwithamouth has quit [Ping timeout: 248 seconds]
apeiros_ has quit [Ping timeout: 248 seconds]
<reactormonk> lewix, puts returns nil anyway
drKreso has joined #ruby
drale2k has joined #ruby
jerius has joined #ruby
arya has joined #ruby
arya has quit [Ping timeout: 248 seconds]
mneorr has joined #ruby
Todd has quit [Ping timeout: 256 seconds]
jerius has quit []
ocnam has quit [Quit: Tan Tan!]
dhruvasagar has quit [Ping timeout: 246 seconds]
arya has joined #ruby
himsin has quit [Ping timeout: 272 seconds]
mneorr has quit [Ping timeout: 272 seconds]
VonKingsley has left #ruby [#ruby]
Artheist has joined #ruby
MrZYX|off is now known as MrZYX
mneorr has joined #ruby
TomJ has quit [Ping timeout: 240 seconds]
TomJ has joined #ruby
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
shadowshell has quit [Remote host closed the connection]
emergion has joined #ruby
apeiros_ has joined #ruby
codespectator has joined #ruby
ph^ has joined #ruby
ClownZ has quit [Read error: Connection reset by peer]
AlSquirrel has quit [Read error: Connection reset by peer]
AlSquire has joined #ruby
oposomme has joined #ruby
AndroUser has joined #ruby
AndroUser has quit [Client Quit]
TDJACR has quit [Ping timeout: 255 seconds]
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby
ph^ has quit [Ping timeout: 272 seconds]
mattp_ has quit [Ping timeout: 255 seconds]
kseifried has quit [Read error: No route to host]
newUser1234 has joined #ruby
TDJACR has joined #ruby
backjlack has joined #ruby
<backjlack> "certificate verify failed" - taking this thing seriously is getting more and more difficult.
mattp_ has joined #ruby
Artheist has quit [Remote host closed the connection]
mneorr has quit [Read error: Connection timed out]
mneorr has joined #ruby
Bry8Star has quit [Ping timeout: 276 seconds]
codespectator has quit [Ping timeout: 244 seconds]
lkba has quit [Ping timeout: 246 seconds]
khismetix has joined #ruby
adambeynon has joined #ruby
SCommette has quit [Quit: SCommette]
ananthakumaran has joined #ruby
miso1337 has quit [Ping timeout: 248 seconds]
browndawg has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
chussenot has joined #ruby
miso1337 has joined #ruby
earthquake has joined #ruby
miso1337 has quit [Remote host closed the connection]
techlife has quit [Ping timeout: 256 seconds]
joeycarmello has quit [Remote host closed the connection]
codespectator has joined #ruby
hbpoison has quit [Ping timeout: 248 seconds]
angusiguess has joined #ruby
t-mart has quit [Remote host closed the connection]
cableray has joined #ruby
kodeart has joined #ruby
mockra has joined #ruby
mpfundstein has joined #ruby
hbpoison has joined #ruby
verysoftoiletppr has joined #ruby
techlife has joined #ruby
mneorr has quit [Remote host closed the connection]
newUser1234 has quit [Remote host closed the connection]
yshh has joined #ruby
newUser1234 has joined #ruby
timonv has joined #ruby
mockra has quit [Ping timeout: 245 seconds]
codespectator has quit [Ping timeout: 256 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
Takehiro has joined #ruby
<backjlack> Why is SSL broken if the CA certs are where they should be?
newUser1234 has quit [Ping timeout: 244 seconds]
<backjlack> I don't get it. It's really stupid something like this is broken.
khismetix has quit [Quit: Computer has gone to sleep.]
ershad has joined #ruby
dogweather has joined #ruby
yshh has quit [Ping timeout: 255 seconds]
chussenot has quit [Quit: chussenot]
nachtwandler has joined #ruby
<Hanmac> backjlack: what OS?
ershad has quit [Quit: ershad]
arya has quit []
marr has joined #ruby
Honeycomb has quit [Quit: Leaving.]
Mon_Ouie has joined #ruby
gtuckerkellogg has joined #ruby
codespectator has joined #ruby
chussenot has joined #ruby
Morkel has joined #ruby
newUser1234 has joined #ruby
<backjlack> Hanmac: rubyinstaller + windows
codespectator has quit [Ping timeout: 248 seconds]
newUser1234 has quit [Remote host closed the connection]
yshh has joined #ruby
newUser1234 has joined #ruby
ClownZ has joined #ruby
codespectator has joined #ruby
mpfundstein has quit [Read error: Connection reset by peer]
yshh has quit [Ping timeout: 245 seconds]
joeycarmello has joined #ruby
newUser1234 has quit [Ping timeout: 255 seconds]
mpfundstein has joined #ruby
codespectator has quit [Ping timeout: 252 seconds]
chussenot has quit [Quit: chussenot]
r4um has joined #ruby
codespectator has joined #ruby
drale2k has quit [Quit: Leaving...]
Morkel has quit [Quit: Morkel]
yshh has joined #ruby
drale2k has joined #ruby
wallerdev has quit [Quit: wallerdev]
pandawarrior has joined #ruby
<pandawarrior> hi, in a spreadsheet what it the name of the greyed out, top-left hand corner thing?
velCzupa has joined #ruby
Czupa has joined #ruby
Czupa has quit [Remote host closed the connection]
verysoftoiletppr has quit []
ph^ has joined #ruby
verysoftoiletppr has joined #ruby
eka has joined #ruby
samphippen has joined #ruby
chussenot has joined #ruby
ph^ has quit [Ping timeout: 272 seconds]
drale2k has quit [Quit: Leaving...]
chussenot has quit [Client Quit]
ClownZ has quit [Ping timeout: 252 seconds]
chussenot has joined #ruby
khismetix has joined #ruby
Nisstyre-laptop has quit [Quit: Leaving]
b0oh has joined #ruby
d2dchat_ has quit [Remote host closed the connection]
monkegjinni has joined #ruby
ershad has joined #ruby
testingb0t has joined #ruby
akashj87 has joined #ruby
trumpeter2003 has joined #ruby
velCzupa has quit [Remote host closed the connection]
d2dchat has joined #ruby
d34th4ck3r has joined #ruby
jankly has quit [Ping timeout: 260 seconds]
razibog has joined #ruby
nachtwandler has quit [Quit: leaving]
kushalkhandelwal has joined #ruby
jalcine has joined #ruby
toto_ has joined #ruby
doja has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
dhruvasagar has joined #ruby
bubbajones has joined #ruby
ershad has quit [Quit: ershad]
robbyoconnor has joined #ruby
Beoran__ has joined #ruby
hiroyuki has quit [Read error: Connection reset by peer]
kevinfagan has quit [Quit: Leaving...]
d3vic3 has joined #ruby
hiroyuki has joined #ruby
frihd has joined #ruby
Beoran_ has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby
pavilionXP has joined #ruby
doja has quit [Quit: Linkinus - http://linkinus.com]
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
b0oh has left #ruby [#ruby]
doja has joined #ruby
krz has joined #ruby
drale2k has joined #ruby
kevinfagan has joined #ruby
mahmoudimus has joined #ruby
decentrality has joined #ruby
doja has quit [Quit: Linkinus - http://linkinus.com]
doja has joined #ruby
codecop has joined #ruby
lolmaus has joined #ruby
oposomme has quit [Quit: Leaving...]
<pandawarrior> i want to include a module into a singleton class, but when I do - i get no method error for the module methods. do i have to extend the module in order to gain access to its instance methods?
<apeiros_> module X; def foo; "foo"; end; end; class Y; extend X; end; Y.foo # => "foo"
toto- has joined #ruby
<apeiros_> that what you want?
toto_ has quit [Ping timeout: 248 seconds]
maxmanders has joined #ruby
maxmanders has quit [Client Quit]
<apeiros_> oh, gtg. back in ~30m
khismetix has quit [Quit: Computer has gone to sleep.]
apeiros_ has quit [Remote host closed the connection]
mulinux has joined #ruby
samuel02 has joined #ruby
Chryson has joined #ruby
maxmanders has joined #ruby
khismetix has joined #ruby
drale2k has quit [Read error: Connection reset by peer]
sheerun_ has quit [Remote host closed the connection]
<pandawarrior> apeiros_ yup, that's precisely what i wanted
dogweather has quit [Remote host closed the connection]
hbpoison has quit [Ping timeout: 248 seconds]
d2dchat has quit [Remote host closed the connection]
imami|afk is now known as banseljaj
samphippen has joined #ruby
kevinfagan has quit [Ping timeout: 252 seconds]
ph^ has joined #ruby
eldariof has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
JaTochNietDan has joined #ruby
doja has quit [Quit: Linkinus - http://linkinus.com]
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
ph^ has quit [Read error: Connection reset by peer]
maxmanders has quit [Quit: Computer has gone to sleep.]
oposomme has joined #ruby
elaptics`away is now known as elaptics
yshh has quit [Read error: Connection reset by peer]
yshh has joined #ruby
wf2f has quit [Read error: Connection reset by peer]
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
ph^_ has joined #ruby
codespectator has quit [Ping timeout: 264 seconds]
ezkl has joined #ruby
frihd has quit [Quit: Leaving.]
ezkl has quit [Client Quit]
ryanf has joined #ruby
chussenot has quit [Quit: chussenot]
backjlack has quit [Remote host closed the connection]
d34th4ck3r has quit [Ping timeout: 255 seconds]
m3pow has quit [Read error: Connection reset by peer]
chussenot has joined #ruby
khismetix has quit [Quit: Computer has gone to sleep.]
daniel_- has joined #ruby
maxmanders has joined #ruby
codespectator has joined #ruby
pandawarrior has quit [Quit: Leaving.]
hbpoison has joined #ruby
banister`sleep has quit [Remote host closed the connection]
apeiros_ has joined #ruby
Es0teric has joined #ruby
cmouse has joined #ruby
<cmouse> in perl, I can write: if ($data=~/foo=(.*)/) { print $1; }
rdark has joined #ruby
<cmouse> how can I do this in ruby?
lkba has joined #ruby
banseljaj is now known as imami|afk
gokul has joined #ruby
<apeiros_> print $1 if data =~ /foo=(.*)/
<apeiros_> or more idiomatically: print data[/foo=(.*)/, 1]
jjbohn has joined #ruby
<cmouse> apeiros_: sure, but i need the if clause
<apeiros_> puts if you want a newline at the end
<apeiros_> not really
<apeiros_> nil.to_s => ""
<apeiros_> and print "" is more or less a no-op
<cmouse> apeiros_: =)
<apeiros_> with puts, yes
<cmouse> apeiros_: i intend to do something else than print $1 =)
pandawarrior has joined #ruby
<apeiros_> well, then you still have the other one I showed
<apeiros_> personally I prefer not using $1 unless necessary, though, so I'd go multiline
<apeiros_> match = data[/foo=(.*)/, 1]; do_stuff(match) if match
mahmoudimus has quit [Quit: Computer has gone to sleep.]
maxmanders has quit [Quit: Computer has gone to sleep.]
horofox has joined #ruby
seich- has quit [Ping timeout: 276 seconds]
maxmanders has joined #ruby
takeru has joined #ruby
whitedawg has joined #ruby
codespectator has quit [Ping timeout: 256 seconds]
rdark has quit [Quit: leaving]
codespectator has joined #ruby
d34th4ck3r has joined #ruby
takeru has quit [Ping timeout: 256 seconds]
banister`sleep has joined #ruby
hogeo_ has joined #ruby
pskosinski has joined #ruby
lewix has quit [Remote host closed the connection]
hogeo has quit [Ping timeout: 245 seconds]
codespectator has quit [Ping timeout: 252 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
codespectator has joined #ruby
oposomme has quit [Quit: Leaving...]
Chryson has quit [Ping timeout: 272 seconds]
noxoc has joined #ruby
d3vic3 has quit [Ping timeout: 248 seconds]
seich- has joined #ruby
skattyadz has joined #ruby
banister`sleep has quit [Remote host closed the connection]
jjbohn is now known as jjbohn|afk
jjbohn|afk has quit [Quit: Linkinus - http://linkinus.com]
kristofers has joined #ruby
drale2k has joined #ruby
joschi has quit [Remote host closed the connection]
joschi has joined #ruby
mulinux has quit [Quit: mulinux]
khismetix has joined #ruby
Kuifje has joined #ruby
Kuifje has joined #ruby
Kuifje has quit [Changing host]
skattyadz has quit [Client Quit]
horofox has quit [Quit: horofox]
velCzupa has joined #ruby
sayan has quit [Ping timeout: 272 seconds]
zoonfafer has quit [Remote host closed the connection]
m8 has joined #ruby
ozgura has quit [Remote host closed the connection]
banister`sleep has joined #ruby
drale2k has quit [Ping timeout: 245 seconds]
codespectator has quit [Ping timeout: 255 seconds]
horofox has joined #ruby
BRMatt has joined #ruby
whitedawg has quit [Quit: Leaving.]
BRMatt has quit [Client Quit]
banister`sleep is now known as banisterfiend
gokul has quit [Quit: Leaving]
d34th4ck3r has quit [Read error: Connection reset by peer]
ph^_ has quit [Remote host closed the connection]
atno has joined #ruby
elaptics is now known as elaptics`away
codecop has quit [Ping timeout: 248 seconds]
jetblack has quit [Ping timeout: 240 seconds]
codespectator has joined #ruby
tritlo has joined #ruby
m3pow has joined #ruby
nari has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
spider-mario has joined #ruby
Break has joined #ruby
Break has quit [Client Quit]
cephalopod has joined #ruby
noxoc has quit [Quit: noxoc]
<cephalopod> when I .capitalize a string, shouldn't all words in the string get capitalized?
elaptics`away is now known as elaptics
<cephalopod> i.e. hello = "hello world"; hello.capitalize
elaptics is now known as elaptics`away
himsin has joined #ruby
pac1 has joined #ruby
<apeiros_> no
<apeiros_> capitalize is first character of string upcase, rest downcase. there's no concept of words.
<heftig> activesupport has #titlecase
sayan has joined #ruby
quazimodo has quit [Ping timeout: 264 seconds]
elico has quit [Quit: elico]
<cephalopod> ah. it activesupport a gem?
horofox has quit [Quit: horofox]
chussenot has quit [Quit: chussenot]
Morkel has joined #ruby
<cephalopod> basically I'm on linux and I'm a fan of Tomboy (notes) and it's wiki-word function. I wanted to convert user input say: "Three blind mice" to convert into "ThreeBlindMice" so I can then turn that string into a link
tritlo has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<apeiros_> I think rails has a helper for that. I'd ask in #rubyonrails
<cephalopod> now that I think of it... it's probably just going to be easier to have the tomboy-notes on the site and just tell them to use the WikiWord format
<cephalopod> I appreciate the input.
tritlo has joined #ruby
krz has quit [Quit: krz]
<banisterfiend> cephalopod: its*
<banisterfiend> how does tomboy compare to evernote?
<Hanmac> >> p "Three blind mice".scan(/\w+/).map(&:capitalize).join
<eval-in> Hanmac: Output: "\"ThreeBlindMice\"\n" (http://eval.in/11450)
<cephalopod> lol... thanks banisterfiend
Spooner has joined #ruby
<cephalopod> never tried nevernote.. tomboy is pretty basic, but I like the simplicity. I've had a lot of trouble getting tomboy to convert notes into a mindmap.... that's my next mini-project
tritlo has quit [Quit: leaving]
tritlo has joined #ruby
<banisterfiend> cephalopod: evernote is simple too, but the cool thing is it's cloud-based
<banisterfiend> so you access/add/modify notes on all your devices
takeru has joined #ruby
<cephalopod> what's with #rubyonrails? the chanserv keeps replying in #railsnoob...
browndawg has quit [Quit: Leaving.]
<cephalopod> and my nick is already reg'd on freenode
Stilo has joined #ruby
ozgura has joined #ruby
<cephalopod> when I try and do anything re: nickserv.... freenode responds
<cephalopod> darn
* cephalopod gives up and tries another day
<cephalopod> o/
tritlo has quit [Client Quit]
jonahR has quit [Quit: jonahR]
pskosinski has quit [Quit: Red Eclipse, game of racist admins/devs: http://pawelk.pl/racist-red-eclipse-quin-zeroknight-gingerbear/]
tritlo has joined #ruby
pskosinski has joined #ruby
ph^ has joined #ruby
hbpoison has quit [Ping timeout: 264 seconds]
drKreso has quit [Read error: Connection reset by peer]
drKreso has joined #ruby
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Vert has joined #ruby
malkomalko has joined #ruby
wobblini has joined #ruby
fire has quit [Ping timeout: 256 seconds]
icetritlo has joined #ruby
drKreso has quit [Quit: drKreso]
ph^ has quit [Ping timeout: 272 seconds]
tritlo has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
icetritlo is now known as tritlo
hbpoison has joined #ruby
nachtwandler has joined #ruby
tritlo has quit [Client Quit]
tritlo has joined #ruby
bonhoeffer has joined #ruby
backjlack has joined #ruby
fire has joined #ruby
horofox has joined #ruby
velCzupa has quit [Ping timeout: 264 seconds]
cableray has quit [Quit: cableray]
kaen has quit [Remote host closed the connection]
emergion has quit [Quit: Computer has gone to sleep.]
khismetix has quit [Quit: Computer has gone to sleep.]
fuzai has joined #ruby
khismetix has joined #ruby
nari has quit [Ping timeout: 256 seconds]
HecAtic has quit [Quit: Àá¼ö]
smokie has quit [Read error: Connection reset by peer]
bjhaid has joined #ruby
ph^ has joined #ruby
<bjhaid> hi all, I am having a small issue here, and cant seem to figure it out
<bjhaid> [[:x,1,2,3],[:y,1,2,4],[:x,1,6,3],[:y,1,7,4]].inject({}) { |x,y| x[y.first] = []; x[y.first] << y[1..3]; x }
emergion has joined #ruby
<bjhaid> expected outcome: {:x=>[[1,2,3],[1, 6, 3]], :y=>[[1,2,4],[1, 7, 4]]}
<bjhaid> outcome: {:x=>[[1, 6, 3]], :y=>[[1, 7, 4]]}
<bjhaid> any suggestions on what I am doing wrong here
<fuzai> well
<fuzai> it looks, like you overwrite it in your array
horofox has quit [Quit: horofox]
<bjhaid> fuzai: yeah, but << should append the array
<fuzai> but i'm really new to this
quazimodo has joined #ruby
<Hanmac> >> p [[:x,1,2,3],[:y,1,2,4],[:x,1,6,3],[:y,1,7,4]].inject({}) { |x,y| (x[y.first] ||= []) << y[1..3]; x }
<eval-in> Hanmac: Output: "{:x=>[[1, 2, 3], [1, 6, 3]], :y=>[[1, 2, 4], [1, 7, 4]]}\n" (http://eval.in/11451)
Progster has quit [Ping timeout: 276 seconds]
<shevy> I am full of energy!!!
<bjhaid> Hamac thanks
<Hanmac> bjhaid your problem is that you forgot the || before the = []
<shevy> bjhaid are you using ruby since years?
ph^ has quit [Ping timeout: 272 seconds]
<bjhaid> shevy been coding ruby for 2 - 3 years, but I have never met a ruby developer in person, so I learn all off the internet, moreover, I work in a coy where most of the developers are java dudes
<Hanmac> also interesting:
<Hanmac> >> p [[:x,1,2,3],[:y,1,2,4],[:x,1,6,3],[:y,1,7,4]].group_by(&:first)
<eval-in> Hanmac: Output: "{:x=>[[:x, 1, 2, 3], [:x, 1, 6, 3]], :y=>[[:y, 1, 2, 4], [:y, 1, 7, 4]]}\n" (http://eval.in/11452)
<shevy> yeah, not many (pure) ruby guys I know either... I know some railsers in vienna though
<Hanmac> "ruby developer in person" does not exists ... we are all bots there :P
<QKO> very intelligent bots
<bjhaid> Hanmac: sorry quick question, why do I need the || ??
<bjhaid> :D
<QKO> from the google code project
<Hanmac> bjhaid: "x[y.first] = []" resets the entry everytime, "x[y.first] ||= []" does it only the first time
one has quit [Ping timeout: 245 seconds]
<bjhaid> oh okay, nice one, wouldnt forget that
takeru has quit [Remote host closed the connection]
tritlo has quit [Quit: restarting irc client]
<QKO> oh and our responses are so slow because we're all running from the same 486 with 56k
<QKO> with 32mb diskspace
tritlo has joined #ruby
<bjhaid> Hanmac thanks for saving my day(s) though :-)
<banisterfiend> bjhaid: i would never write code this complicated :P [[:x,1,2,3],[:y,1,2,4],[:x,1,6,3],[:y,1,7,4]].inject({}) { |x,y| x[y.first] = []; x[y.first] << y[1..3]; x }
<banisterfiend> sounds like you need an object there
philcrissman has joined #ruby
ianfleeton has joined #ruby
<banisterfiend> [:x, 1, 2, 3] ==> make that into some kind of class
khismetix has quit [Quit: Computer has gone to sleep.]
mootpointer has joined #ruby
<pandawarrior> is there a way to get something from the command line but if nothing is given use a default value in the code
<bjhaid> banisterfiend: its a result from quering with OCI8, previously I had to split all this into separate classes and sorts,but I just thought of it, why not use ruby syntatic sugar??
tjbiddle has joined #ruby
<pandawarrior> i tried number = ARGV[0] ||= 3
<pandawarrior> but that always uses ARGV even if nothing was entered into the command line
kristofers has quit []
Mon_Ouie has quit [Ping timeout: 255 seconds]
kofno has quit [Read error: Connection reset by peer]
<Spooner> with_object makes more sense than inject here: [[:x,1,2,3],[:y,1,2,4],[:x,1,6,3],[:y,1,7,4]].with_object({}) { |y, x| (x[y.first] ||= []) << y[1..3] }
<shevy> pandawarrior no need to use ARGV directly, pass it through a method instead
jphpsf has joined #ruby
techlife has quit [Ping timeout: 244 seconds]
kofno has joined #ruby
Zta has quit [Ping timeout: 260 seconds]
<shevy> DEFAULT_COLOUR = 'green'; def set_colour(default_colour = nil); default_colour = DEFAULT_COLOUR unless default_colour; @colour = default_colour; end
<pandawarrior> shevy: how would i know if something has been entered, though?
yshh has quit [Remote host closed the connection]
<shevy> ARGV always exists
<shevy> if you dont provide commandline arguments, ARGV will be empty
<shevy> so in your code, the method, you could check whether you pass an array or not, if yes, you could assume that you try to use ARGV
<pandawarrior> so i can say: number = 2 if ARGV[0].empty?
<shevy> and if it is empty, you can use default values
<shevy> yes, but dont use ARGV directly
<shevy> pass it through a method
<pandawarrior> k
<pandawarrior> got it
<pandawarrior> i'll use a ternay operator
bonhoeffer has quit [Quit: bonhoeffer]
<pandawarrior> the ARGV stuff will be in a method
<shevy> ARGV may used be tainted input, so that's one more reason to not use it directly
<Spooner> pandawarrior, number = ARGV[0] || 3
<shevy> or frozen, I forgot the proper term
<apeiros_> if you want to use inject, use merge: ary.inject({}) { |h,(k,*v)| h.merge({k => v}) { |_k,v1,v2| v1+v2 } }
<pandawarrior> Spooner: that looks good
<apeiros_> ^ @ pandawarrior
<apeiros_> or actually
<apeiros_> whose question was that? :)
jphpsf has quit [Ping timeout: 248 seconds]
<pandawarrior> which question in particular?
<Spooner> apeiros_, It was bjhaid
<shevy> Spooner always is in full control on #ruby :)
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
bonhoeffer has joined #ruby
techlife has joined #ruby
cephalopod has quit [Quit: Nice Scotty, now beam my clothes up too!]
<Spooner> I wish.
cephalopod has joined #ruby
monkegjinni has quit [Remote host closed the connection]
monkegjinni has joined #ruby
cephalopod has quit [Client Quit]
cephalopod has joined #ruby
banisterfiend has quit [Remote host closed the connection]
cephalopod has quit [Client Quit]
cephalopod has joined #ruby
nicoulaj has joined #ruby
pandawarrior has quit [Quit: Leaving.]
xardas has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
cuci has joined #ruby
`brendan has joined #ruby
<cuci> hi guys! I'm trying to populate, through a rake task in rails, a sql database form a csv file but it takes forever and a day and I was thinking maybe using multithreads or multiprocessing would help
<cuci> what should I google for here?
<cuci> could point me to a nice tutorial in that direction?
<Hanmac> cuci #rubyonrails ?
<Spooner> cuci look at parallel gem perhaps? If it is primarily waiting for the database, however, parallelising it isn't going to help too much.
drale2k has joined #ruby
poga has quit [Remote host closed the connection]
browndawg has joined #ruby
<Spooner> cuci, You might be better off trying to optimise the code by, for example, setting several records in the DB with a single action if you aren;'t already doing that now.
codecop has joined #ruby
cephalopod has quit [Quit: Nice Scotty, now beam my clothes up too!]
cephalopod has joined #ruby
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
nari has joined #ruby
sandGorgon has joined #ruby
Morkel has quit [Quit: Morkel]
bonhoeffer has joined #ruby
drale2k has quit [Read error: Connection reset by peer]
krz has joined #ruby
drale2k has joined #ruby
robustus has quit [Ping timeout: 248 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
cephalopod has quit [Quit: Nice Scotty, now beam my clothes up too!]
robustus has joined #ruby
cephalopod has joined #ruby
tritlo has quit [Quit: leaving]
samphippen has joined #ruby
pandawarrior has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
Drager has quit [Changing host]
Drager has joined #ruby
cephalopod has quit [Client Quit]
cephalopod has joined #ruby
heidar has quit [Quit: leaving]
heidar has joined #ruby
sandGorgon has quit [Ping timeout: 272 seconds]
cephalopod has quit [Changing host]
cephalopod has joined #ruby
nari has quit [Ping timeout: 272 seconds]
banisterfiend has joined #ruby
ph^ has joined #ruby
chussenot has joined #ruby
<shevy> Hanmac you have way too much time man ;)
horofox_ has joined #ruby
AlSquire has quit [Read error: Connection reset by peer]
AlSquire has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
TheFuzzball has quit [Quit: Leaving...]
xardas has quit [Quit: ChatZilla 0.9.90 [Firefox 19.0.1/20130226172142]]
ph^ has quit [Ping timeout: 272 seconds]
bjhaid has quit [Ping timeout: 245 seconds]
ffranz1 has quit [Ping timeout: 272 seconds]
slainer68 has joined #ruby
Xeago has quit [Remote host closed the connection]
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
pdamer has joined #ruby
wmoxam has joined #ruby
skattyadz has joined #ruby
angusiguess has quit [Ping timeout: 248 seconds]
ph^ has joined #ruby
jimeh has joined #ruby
drKreso has joined #ruby
ph^ has quit [Read error: Connection reset by peer]
ph^ has joined #ruby
angusiguess has joined #ruby
cephalopod has quit [Quit: Nice Scotty, now beam my clothes up too!]
mootpointer has quit [Quit: Computer has gone to sleep.]
cephalopod has joined #ruby
`brendan has quit [Ping timeout: 244 seconds]
techlife has quit [Ping timeout: 246 seconds]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
quazimodo has quit [Ping timeout: 264 seconds]
<pandawarrior> is there a way to access a class variable outside a class
<pandawarrior> and is that a code smell if i need to do that?
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
Eldariof-ru has joined #ruby
Stilo has joined #ruby
Beakr has joined #ruby
<banisterfiend> pandawarrior: yes and not necessarily
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
root has joined #ruby
techlife has joined #ruby
root is now known as Guest23327
<apeiros_> pandawarrior: class variables are accessible by the class, all its instances, all its descendants, and all instances of all descendants.
arya has joined #ruby
eldariof has quit [Ping timeout: 248 seconds]
<apeiros_> if you mean "outside all of these", then no, you have to provide an accessor or use some kind of eval (instance/class eval)
Stilo has quit [Client Quit]
<Hanmac> apeiros_ what about class_variable_get ?
<apeiros_> I'd qualify that as 'an accessor'
<pandawarrior> i have a range of class types that inherits from another class and a class variable that stores all it's instance
<apeiros_> but granted, not provided by you :)
philcrissman has quit [Remote host closed the connection]
tish has joined #ruby
<pandawarrior> and i want to clear the class variable after each operation
<apeiros_> pandawarrior: just to be sure, @@cvars are class variables
<apeiros_> (and only those)
<pandawarrior> yeah @@
bonhoeffer has quit [Quit: bonhoeffer]
<Guest23327> /exit
Stilo has joined #ruby
Guest23327 has quit [Client Quit]
yshh has joined #ruby
subbyyy has joined #ruby
Vert has quit [Read error: Connection reset by peer]
ffranz has joined #ruby
jetblack has joined #ruby
xemu has joined #ruby
DaltonUS has joined #ruby
`brendan has joined #ruby
Xeago has joined #ruby
sambao21 has joined #ruby
bonhoeffer has joined #ruby
enebo has joined #ruby
yshh has quit [Ping timeout: 248 seconds]
sandGorgon has joined #ruby
kevingriffin has joined #ruby
drale2k has quit [Quit: Leaving...]
<cephalopod> I'm working through CodeCademy ruby: any reason why a string would get an undefined method for length for a string?
drale2k has joined #ruby
<cephalopod> e.g. str = "string"; puts str.length; if str.length = 6; print true; end
philcrissman has joined #ruby
hashmal has quit [Quit: Computer has gone to sleep.]
<MrZYX> == 6 but should work.
<MrZYX> >> str = "string"; puts str.length; puts "true" if str.length == 6
<eval-in> MrZYX: Output: "6\ntrue\n" (http://eval.in/11453)
<cephalopod> I'll give that a try (could just be a script error on CodeCademy). thx
<kevingriffin> You're actually getting no method "length=", i.e. there's no method to set the length
sandGorgon has quit [Read error: Connection reset by peer]
xemu2 has joined #ruby
akashj87 has quit [Ping timeout: 255 seconds]
sandGorgon has joined #ruby
xemu has quit [Ping timeout: 272 seconds]
slainer68 has quit [Remote host closed the connection]
slainer68 has joined #ruby
<pandawarrior> in rspec can i have a context after an 'it'
justsee has quit [Quit: Leaving...]
kofno has quit [Remote host closed the connection]
quazimodo has joined #ruby
kofno has joined #ruby
wmoxam has quit [Quit: leaving]
kofno has quit [Remote host closed the connection]
blahwoop has joined #ruby
kraljev has joined #ruby
<kraljev> Please help me, I'm stuck
<kraljev> #map has no effect
<kraljev> @data[:cards].map { |deck|
samphippen has joined #ruby
<kraljev> 1
<kraljev> }
<kraljev> p @data[:cards]
<kraljev> still outputs the original array
jekotia has joined #ruby
<kevingriffin> You're not changing the array, only returning a new one
<MrZYX> yes, map returns a copy and doesn't modify the array, you want map!
<kevingriffin> Try .map!
bonhoeffer has quit [Quit: bonhoeffer]
<kraljev> damn, i'm so stupid
<kraljev> thanks!
mpfundstein has quit [Remote host closed the connection]
arya_ has joined #ruby
<kraljev> if i define <=> operator for class
DaltonUS has quit [Quit: DaltonUS]
<kraljev> will it apply also when i do ==
<kraljev> check if returns zero
arya has quit [Ping timeout: 248 seconds]
niklasb has joined #ruby
<kevingriffin> You'll need to mix in Comparable
bonhoeffer has joined #ruby
ozgura has quit [Remote host closed the connection]
<kevingriffin> But then, yes
tish has quit [Quit: Leaving.]
tish has joined #ruby
sonda has joined #ruby
<kraljev> if I extend comparable is also ok?
maycon_ has joined #ruby
mpfundstein has joined #ruby
arya_ has quit [Disconnected by services]
mpfundstein has quit [Remote host closed the connection]
carlyle has joined #ruby
TheFuzzball has joined #ruby
<kevingriffin> That would give the class access to the module's methods
arya has joined #ruby
<kevingriffin> But it doesn't really make sense, right?
TheFuzzball has quit [Max SendQ exceeded]
TheFuzzball has joined #ruby
maycon has quit [Ping timeout: 260 seconds]
drale2k has quit [Quit: Leaving...]
otherj has joined #ruby
ortuna has joined #ruby
drale2k has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
horofox_ has quit [Quit: horofox_]
angusiguess has quit [Ping timeout: 248 seconds]
jerius has joined #ruby
takeru has joined #ruby
philcrissman has quit [Remote host closed the connection]
cuci has quit [Read error: Connection reset by peer]
ianfleeton has quit [Quit: ianfleeton]
cuci has joined #ruby
b26 has joined #ruby
ddd has joined #ruby
`brendan has quit [Read error: Connection reset by peer]
takeru has quit [Ping timeout: 245 seconds]
verysoftoiletppr has quit []
allaire has joined #ruby
allaire has quit [Excess Flood]
cyberflux has joined #ruby
slainer68 has quit [Remote host closed the connection]
crackfu has joined #ruby
marwinism has joined #ruby
carlyle has quit [Remote host closed the connection]
skattyadz has quit [Quit: skattyadz]
bonhoeffer has joined #ruby
huoxito has joined #ruby
<shevy> guys, anyone knows if I can find out whether a remote file exists, in ruby-ftp ?
<shevy> I'd like to do: "if remote file bla.txt exists, download it, else display that it does not exist"... but it seems as if there either is no direct way to do that, or I can't find it
<shevy> for ftp that is
bonhoeffer has quit [Client Quit]
sonda has quit [Ping timeout: 252 seconds]
sonda has joined #ruby
b26 has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
<epitron> what happens if you download a nonexistant file?
<epitron> does it just write a zero-byte file?
<ddd> it *should* error the attempted GET
<epitron> you mean RETR :)
<ddd> hehe yeah sorry
<epitron> and yes, ruby-ftp sounds like it needs a patching
daniel_-_ has joined #ruby
<epitron> a good hard patching
<ddd> been talking in rails chan, so got gets and puts on the brain right now :)
<epitron> the web is taking over!!!!
<ddd> yeah no shit :)
<epitron> eventually the CPU will just be an http server
<epitron> GET 0x0e817f7
hbpoison has quit [Ping timeout: 256 seconds]
<epitron> PUT ax
<ddd> i was reading Bill Gate's Business @ the Speed of Thought. Most of his predictions are already true or are happening now. He predicted it would become not only mainstream but critical infrastructure.
khismetix has joined #ruby
<epitron> wasn't bill's plan to crush the web and replace it with a microsoft platform like .NET?
<epitron> or had he accepted his fate in 1999?
quazimodo has quit [Ping timeout: 246 seconds]
ortuna has quit [Ping timeout: 252 seconds]
tomzx_mac has joined #ruby
daniel_- has quit [Ping timeout: 252 seconds]
<epitron> in the review it says he's talking about a digital nervous system
<epitron> that doesn't have to be the web, necessarily
<ddd> hehe he never planned to do that.
drale2k has quit [Quit: Leaving...]
cuci has quit [Read error: Connection reset by peer]
<epitron> that was his approach when he crushed netscape and extended java in the mid-late nineties :)
cuci has joined #ruby
<ddd> yeah he's talking about a digital nervous system as the computer network being like the neural system inthe human body
<epitron> maybe he wrote that in the book because of his antitrust problems
sambao21 has quit [Quit: sambao21]
drale2k has joined #ruby
<ddd> being able to conduct business at near-same speeds
emergion has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<epitron> sure, that's just the evolution of all large organisms
<epitron> businesses included
<ddd> true, but for a long time, even business execs didn't realize that
<epitron> you need all your "limbs" coordinated :)
<shevy> epitron hmm it throws a Net::FTPPermError
locriani_ has joined #ruby
<ddd> the integration of the web and the Web Lifestyle was *just* beginning to take shape and form
<epitron> shevy: oic. i guess that's how they expect you to check if a file exists then :)
<shevy> "#<Net::FTPPermError: 550 DELE: Couldn't get file status for bla.txt"
<shevy> epitron yeah :(
<ddd> actually, many predicted the web would fail. funnily
<epitron> DELE?
<epitron> i thought the problem was RETR :)
sambao21 has joined #ruby
<shevy> not right now, I am killing some ancient remote files before I upload new ones hehehe
<epitron> ddd: i think most people just hoped the web would be replaced with something that didn't suck so hard
<epitron> but, alas, for-profit corporations can't agree on anything
<epitron> and their fighting allowed the browser to glacially evolve
jpcamara has joined #ruby
<ddd> the underlying tech is facinating, from the IP protocol suite to the languages in use to design / code for it.
<shevy> until everyone is using chrome!
<ddd> i truly find the tech we use daily simply amazing.
<epitron> 20 years later, and look! we can almost write games in a browser! if not for that lousy caching
sambio has joined #ruby
locriani_ has quit [Remote host closed the connection]
<epitron> but chrome extensions solve the caching problem!
<epitron> everyone just has to use chrome
<epitron> :D
<ddd> i was thinking last night about just whats involved generically in just something like downloading a file to my computer and displaying it via wifi
locriani has quit [Ping timeout: 245 seconds]
atno has quit [Remote host closed the connection]
<ddd> if you stop and think about all the individual tech involved, and then think back to say 1988 (I was 18) and now.. man has the world changed
<shevy> well, a protocol for communication
<epitron> it is truly amazing that our systems work at all :D
<ddd> and then twitter and facebook.. interactive web, movies and tv by network.. phone calls, email, etc. our world has been transformed more by just the internet and the various techs it makes use of or caused to grow up FOR it, than all the inventions previously like the car etc
daniel_-_ has quit [Quit: WeeChat 0.3.9.2]
<epitron> you're right, if you look at the big picture, humanity makes amazing progress
<epitron> it just takes lifetimes to do it
<epitron> that's so goddamn slow, in my opinion :)
<ddd> yeah, we're slow to mainstream, but when we do.. wow
<shevy> ddd yeah, it always reminds me of the phrase "to stand on the shoulders of giants"
<epitron> that's pretty scary, actually
fatih1982 has joined #ruby
<epitron> if something that mainstreams destroys the planet, it's like, "ah well! too late to stop it now!"
<ddd> shevy: I have that book. with the foreword by Stephen Hawking
<ddd> epitron: hehe, nukes
<epitron> "i guess we'll just all have to die!"
<shevy> a friend had a smartphone with us here, he was shaking it forward, and it made a whipping sound effect (like indiana jones movie whip)
<epitron> not nukes.. the insidious, useful things
<epitron> like oil
postmodern has quit [Quit: Leaving]
<ddd> ah yeah
<shevy> and I thought... a smartphone is like a sound maker!
kirun has joined #ruby
<epitron> guns, germs, and steel talks about how civilizations just destroy themselves because they don't want to give up conveniences
<ddd> when humanity as a whole decides to move off fossil fuels to some alternative, that will be our next 'revolution' i believe
<epitron> some ancient island civilzation just cut down all their trees, then died off
<shevy> epitron I think if one thing would destroy humanity, it would be either greed or boredom
<epitron> they knew they were running out of trees
<ddd> Michio Kaku was mentioning that very thing
<epitron> but they were like, "eih, what're we gunna do"
<shevy> ddd but as long as you can generate huge profits, how is moving away from it possible?
cuci has quit [Read error: Connection reset by peer]
cuci has joined #ruby
<ddd> shevy: its not
<epitron> ddd: hopefully it will be mainstreamed quickly, and won't itself be an insidious destroyer :D
ozgura has joined #ruby
girija has joined #ruby
<shevy> one would need a better alternative to replace existing (sucking) tools
<ddd> the world is so money centric that until we can make it more advantageous TO change, we're going to be in a fight with the fossil fuel moguls
<shevy> like ruby versus php :D
<shevy> yeah ddd
atno has joined #ruby
<shevy> and, fossil fuel is also hugely important for the synthetic chemistry, it's not easy to replace all that
<epitron> shevy: how would boredom destroy civilization? you mean, because people would end up doing pathological things to while away the time?
davetherat has quit [Remote host closed the connection]
niklasb has quit [Ping timeout: 260 seconds]
<ddd> epitron: the problem will be laws and corporate mentalities. Buy alternative techs that could *feasibly* replace fossil fuels and bury them in corporate vaults is the norm right now
davetherat has joined #ruby
<ddd> another is the cost of retooling
<ddd> so many industries to retool
<shevy> epitron well, I think that people do stupid things when they are bored
cuci has quit [Read error: Connection reset by peer]
<epitron> shevy: yeah. some scientists were saying that it would be way better to save all the remaining oil and use it as a building material instead of burning it. you can turn a barrel of oil into lots of awesome things.
<epitron> and those things don't pollute :)
<epitron> they're inert, like plastic
kraljev has left #ruby [#ruby]
<epitron> (there's probably some runoff in the production process, tho)
<shevy> epitron and imagine a perfect society where everyone has everything he/she wants to have
ceez has joined #ruby
<shevy> then I would be almost sure that idiots pop up, the more bored they are :)
<epitron> utopia \o/
<shevy> hehehe
<ddd> another problem is power
skattyadz has joined #ruby
<epitron> robots can have power
<epitron> let the humans just be pets
<epitron> :D
<shevy> ddd what kind of power? you mean in society?
adkron has joined #ruby
<epitron> galactitron megabrain is the best ruler
<ddd> controlling the source (mining, delivery, etc) gives you tons of societal and social-mindspace power
sambao21 has quit [Quit: sambao21]
<shevy> yeah
cuci has joined #ruby
<shevy> or patents. you can use them strategically to exclude or limit (or milk money) from competition
<ddd> yeah
<epitron> eventually, all our activity will be turned over to computer coordination
jpcamara has quit [Quit: jpcamara]
<shevy> I should have become a lawyer
Morkel has joined #ruby
<epitron> i suppose whoever put the backdoors into that computer will be the ultimate power
khismetix has quit [Quit: Computer has gone to sleep.]
<shevy> epitron hehe
<shevy> epitron and implanted id chips to get rid of anonymity
<epitron> lawyering is weird. it's like programming. it mostly involves understanding arcane systems, and logic.
<ddd> i understand this is how humans work. we're warrior-minded at heart. self centered (whether personally or business-wise), however, if we *don't* destroy ourselves first (like the Civilization Type model predicts) we'll eventually get out of this mind-phase, but we're probably still several 100 years away from that
ceez has left #ruby [#ruby]
<epitron> i guess it also involves human psychology to a large degree
<epitron> kinda like economics
<shevy> well, with programming I at least have the feeling that sometimes I build/write something that is useful
<shevy> lawyers for the most part seem to be cargo-cult carriers
sambao21 has joined #ruby
<ddd> i'd say probably 200 years before we see humankind start aggregating (like countries on the same landmass or hemisphere combining into huge global voting and buying blocks)
<epitron> you're right -- if you want to make big changes, you gotta go from lawyering/economics to congress :D
<epitron> then you can change the outcomes of MILLIONS of court cases
<epitron> not just one :D
<shevy> yeah
<shevy> and lobbyist
<ddd> well, humankind isn't going to *really* accomplish *global* unity projects until we start combining
<ddd> for example
<shevy> ddd hard to do so as long as there is the "us versus them" mentality of trying to find enemies to fight against on the planet
cuci has quit [Read error: Connection reset by peer]
<ddd> Say the EU's space agency and the US's space agency combine together as a single entity. Combining for research, purchasing, etc in order to build a space bridge
<epitron> shevy: that's just the result of (real or perceived) scarcity
<ddd> meaning moving the building of space vehicles TO space in order to launch farther out than our solar system.
iamjarvo has joined #ruby
<shevy> yeah, they do that a lot already though. didn't NASA hire russian carriers for the next ~10 years to bring them into orbit?
<epitron> the planet does have a lot of limits -- amount of resources, amount of land, amount of pretty caribbean islands
<epitron> too many people who want those things == war
<shevy> epitron yeah... once again it comes down to profit!
<ddd> the cost of moving the initial construction equipment and resources to build a large spaceport is prohibitive for individual countries. but *combined* its cheaper
<epitron> political and religious reasons are like... boredom :)
cuci has joined #ruby
<epitron> actually, that's true
S2kx has quit [Quit: Leaving]
<epitron> religions are about profit too
<epitron> NEED MORE CUSTOMERS
<shevy> yeah... the vatican bank
<ddd> but with humankind's penchant for wanting and demanding profit position advantagous JUST for themselves rather than as a species, its not going to happen until the species as a whole realises the valueof doing it together
khismetix has joined #ruby
<ddd> and then finding a way to actually make that come about
<epitron> ddd: coordination is how single cells turned into mammals :)
joofsh has joined #ruby
<epitron> it required every cell to be running the same program though
<epitron> ROBOTS!
<shevy> quite a big leap you stay here ;)
<shevy> I mean, describe
<ddd> epitron: true, but look how long it takes even mother nature to do so :)
<shevy> Bacteria: "Hey, I am bored... let's team up and become a mammal guys!"
<epitron> well, mother nature is doing it randomly
<ddd> epitron: actually, i believe that robots are going to BE our saving grace
<epitron> which is how humans are doing it too, for the most part
<ddd> its whats REALLY going to open the human race to the stars
skattyadz has quit [Quit: skattyadz]
<epitron> or our terminator downfall :D
atno has quit [Remote host closed the connection]
<shevy> ddd we haven't even brought humans to mars yet!
<epitron> it can go both ways
<shevy> robots should start building towns on the mars though
<epitron> shevy: i think what's going to drive people into space is asteroid mining
<ddd> robotic mining of asteroid belts, robotic construction builders etc
<epitron> there are asteroids out there made entirely of gold
<epitron> or platinum
<epitron> or uranium
<ddd> shevy: yeah thats why i'm predicting at least 200 years out
<shevy> epitron is that worth it at all? I mean, that surely costs a lot
<ddd> I just wish i could live long enough to see if my prediction ends up being true
jphpsf has joined #ruby
<shevy> ddd how long would you want to live :P
<epitron> shevy: it costs a lot, but there's more gold out in a single asteroid than on the entire planet
<ddd> 150
<shevy> epitron cool
<epitron> (well, there's a lot of gold in the earth's core, but we can't get to it)
<shevy> ddd why 150... why not 200... or 250... or 1000 ...
<epitron> all the gold on our surface came from asteroid impacts
<ddd> thats basically 2 human generations
davetherat has quit [Remote host closed the connection]
<ddd> shevy: because i don't want to live forever
<shevy> hehe
davetherat has joined #ruby
<ddd> i'm 42 and thats a long time so far.
<shevy> in medieval times you might have been well dead by now
<ddd> i've seen lots change in this world. even doubling that i'll see many more great (and some terrible) things
<ddd> but i don't want to live forever
<epitron> ddd: i'm sure by the time you're 150 there will be lots of technologies that allow you to reincarnate yourself, like Doctor Who
<epitron> you won't need to die :)
<ddd> oh yeah. iirc the average age was 32
ortuna has joined #ruby
<epitron> when you get bored, you can just reformat and reinstall
<ddd> epitron: hahahah
<ddd> niiiice
jerius has quit []
<epitron> again, assuming we make it through robocalypse
atno has joined #ruby
<ddd> i just find all this stuff facinating
<ddd> the world, she be a'changing
<shevy> epitron hah "when you get bored" told you! boredom :D
<epitron> humanity's early 20's will be interesting
<epitron> lots of experimentation
<epitron> :D
<shevy> after a few thousand years living, I think things just become repetitive
<ddd> my 6yo is growing up with computers being as commonplace as dirt.
<ddd> can you imagine what the world will be like for *his* kids?"
<Spooner> epitron, I am planning to snuff it in the zombiapocalypse, long before the robot one.
<ddd> s/'//
<ddd> grr
<epitron> shevy: yeppp... marvin the manically depressed robot \o/
<shevy> lol
<ddd> lol
<shevy> I dont get why robots must have emotions
<ddd> shevy: because its emotions that let us see the grey areas of life
<shevy> not quite logical is it?
<epitron> Spooner: what if you become a zombie?
<shevy> ddd yeah but that is human centric
<ddd> it grants us compassion, empathy, etc
<ddd> rather than just straight logic
<shevy> yes yes yes... you sound like a girl! :P
<epitron> Spooner: do you have a plan for that? :)
<ddd> right, but its humans' ability to have emotions that give us shades of grey
kofno has joined #ruby
<shevy> ddd I'd like to view it purely as an intellectual thing, like the question: How can we populate the universe with robots
BizarreCake has quit [Ping timeout: 255 seconds]
<ddd> shevy: i don't care if i sound like a girl, they got it right
jphpsf has quit [Ping timeout: 260 seconds]
drale2k has quit [Quit: Leaving...]
preyalone has joined #ruby
preyalone has quit [Remote host closed the connection]
<ddd> i know that when I make decisions based soley on logic, many times the better decision would have been one that allowed emotions to at least color my decision data.
<epitron> ddd: if you're interested in what our kids' kids world will be like, you should check this out -- http://www.amazon.com/Rainbows-End-Vernor-Vinge/dp/0812536363/
<Spooner> epitron, No, that was the plan. I'd maybe last an hour in the zombiapocalypse as a human.
jphpsf has joined #ruby
<ddd> epitron: reading snippet. brb
atno has quit [Remote host closed the connection]
<epitron> shevy: emotions are what make sure animals don't do socopiathic things
<epitron> some things make you feel bad, some things make you feel good
<epitron> it's our social programming
drale2k has joined #ruby
<ddd> exactly
<epitron> they're just a subset of all of our neural signals
<ddd> and hard logic, while definitely a plus, does not always make the best decision in the human world
<epitron> they're fuzzier because social situations are fuzzy :)
<epitron> you get very clear messages when you stub your toe
<epitron> ddd: hard logic requires pre-programming everything
<epitron> it's not adaptive
<ddd> like someone steals your wallet. cold logic says have him or her arrested and put in jail. But, that person stole your wallet to get the money to feed his two kids that haven't eaten in 2 weeks. Should he really be put in jail?
<epitron> NOT ADAPTIVE DIES
atno has joined #ruby
<ddd> well not 2 weeks because th body can only survive a week without food
<ddd> 3 days without water
<pandawarrior> i've got a test that needs to read from stdout.how can i gain access to stdout in rspec?
<epitron> ddd: seems like a waste to pay hundreds of thousands of dollars of taxpayer money to put a guy in jail for stealing $200 in a wallet
<epitron> :D
sambio has quit [Ping timeout: 245 seconds]
<apeiros_> ddd: you can still use straight logic to solve that "moral" problem
<ddd> isn't it $std.out?
<Spooner> I was going to say that trying to get money to feed corpses implied they should be in a loony bin, rather than jail.
<ddd> i do forget
<epitron> this is why megatron omnibrain will be a better ruler
<epitron> it can see the big picture
hbpoison has joined #ruby
<ddd> apeiros_: expand on that?
jpfuentes2 has joined #ruby
<apeiros_> ddd: a) likeliness of family becoming criminal due to person in jail, b) cost to community to support the family
<ddd> epitron: ahh but we do still do that
<apeiros_> you might not put him into jail for logical reasons, i.e., change his punishment to something that avoids a&b
<epitron> apeiros_: sure, but the point we were talking about was flexibility
<ddd> apeiros_: recitivism
BizarreCake has joined #ruby
<epitron> apeiros_: "Cold hard logic" is fixed
<ddd> right
jerius has joined #ruby
<apeiros_> are we making up terms or is "cold hard logic" somewhere defined?
mpfundstein has joined #ruby
<epitron> you can add massive amounts of detail, but then the world changes, and there are more cases missing
<ddd> i see apeiros_'s point, but its the emotional and fuzziness of compassion that comes from the emotional response to that situation that allows us to make a better decision
<ddd> both for society and for the individual that committed the 'crime'
<epitron> ddd: the fuzziness is because we don't know what the outcomes will be
<epitron> if we did, it wouldn't be fuzzy :)
<ddd> well partly
<epitron> it would be like pain
<apeiros_> I think emotion is a kind of pattern matching, evolved to increase survival rate of the community
<epitron> we know exactly where we cut ourselves
<Spooner> pandawarrior, You can do stuff like $stdout.should_receive(:puts).with("hello") or just replace $stdout with a StringIO object if you want a lot of output collected.
drale2k has quit [Quit: Leaving...]
<apeiros_> iow, it could be emulated/simulated/calculated
<ddd> apeiros_: cold hard logic for this conversation is no emotional input allowed
<epitron> apeiros_: yeah, that's what i said earlier
sandGorgon has quit [Read error: Connection reset by peer]
sandGorgon has joined #ruby
cuci has quit [Read error: Connection reset by peer]
<ddd> epitron: ahh, but what about in cases like mine. i have nerve damage. i don't feel when i walk into a coffee table.
cuci has joined #ruby
<pandawarrior> Spooner: i tried that but go expected 1 but received 0 times… i haven't tried StringIO, though
<pandawarrior> so i'll give that a bash..
<ddd> so there are additionals that impact
<epitron> ddd: you are defective!
<ddd> hahah
* epitron recycles ddd
<ddd> ass;)
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
<epitron> my emotions tell me that that is a waste
<ddd> pandawarrior: also, check out Session
<epitron> but my logic tells me that that is efficient use of resources
<ddd> gem seach session
adkron has quit [Ping timeout: 264 seconds]
<pandawarrior> ddd ok
<ddd> epitron: right, so logic says recycle me. emotion says i have a right to live
<ddd> it also says that maybe i have other skills that my neuro deficiency doesn't affect
<ddd> it allows for the 'maybe'
dagnachew has joined #ruby
oguzcanhuner has joined #ruby
<apeiros_> epitron: recycles, as in recycled labor? http://www.casualvillain.com/Unsounded/comic/ch03/ch03_25.html
<ddd> society in general is a combination of both
<ddd> apeiros_: no, as in recycle my body i think he means
<apeiros_> ddd: see link :-p
<ddd> sure. sec
<apeiros_> might become more evident what it is on the next page, though
zubov has quit [Quit: This computer has gone to sleep]
* banisterfiend sets mode: +stfu epitron
<ddd> yeah
<ddd> banisterfiend: hehe its conversations like these, in the small segments of society that breed the ideas into the larger part of society
kevingriffin has quit []
<ddd> one reason i love having conversations like this
oguzcanhuner has left #ruby [#ruby]
monkegjinni has quit [Remote host closed the connection]
Beakr has quit [Quit: Beakr]
khismetix has quit [Quit: Computer has gone to sleep.]
<epitron> banisterfiend is just too lazy to read scrollback
sambao21 has quit [Quit: sambao21]
quazimodo has joined #ruby
<banisterfiend> no, actually i jsut thought +stfu was cute
<ddd> hehe
<banisterfiend> also, epitron is my girl
<epitron> oh right
<banisterfiend> she likes a bit of rough and tumble
<epitron> banisterfiend is a sociopath :D
<banisterfiend> hard words, etc
<epitron> he doesn't realize that being mean makes others feel bad
<apeiros_> he might also just be on drugs
razibog has quit [Read error: Connection reset by peer]
<epitron> tru tru
razibog has joined #ruby
newUser1234 has joined #ruby
F1skr has joined #ruby
cuci has quit [Read error: Connection reset by peer]
cuci has joined #ruby
monkegjinni has joined #ruby
cuci has quit [Read error: Connection reset by peer]
malcolmva has quit [Read error: Connection reset by peer]
Beakr has joined #ruby
malcolmva has joined #ruby
d2dchat has joined #ruby
drKreso has quit [Quit: drKreso]
cuci has joined #ruby
tish has quit [Quit: Leaving.]
cuci has quit [Read error: Connection reset by peer]
sambao21 has joined #ruby
ianfleeton has joined #ruby
cuci has joined #ruby
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
arya has quit [Ping timeout: 248 seconds]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
atno has quit [Remote host closed the connection]
atno has joined #ruby
tommyvyo has joined #ruby
gyre007 has joined #ruby
chrishunt has quit [Quit: ZzZzZz...]
cuci has quit [Read error: Connection reset by peer]
arya has joined #ruby
cuci has joined #ruby
sambao21 has quit [Quit: sambao21]
girija has quit [Ping timeout: 256 seconds]
cuci has quit [Read error: Connection reset by peer]
jerius has quit []
endzyme has joined #ruby
drale2k has joined #ruby
r0f0 has joined #ruby
cuci has joined #ruby
fatih1982 has left #ruby [#ruby]
apeiros_ has quit [Remote host closed the connection]
<robert_> so for whatever reason, the CSV gem isn't generating auto-quoted columns...
S1kx has joined #ruby
S1kx has quit [Changing host]
S1kx has joined #ruby
Eldariof93-ru has joined #ruby
arya has quit [Ping timeout: 248 seconds]
cuci has quit [Read error: Connection reset by peer]
sonda has quit [Remote host closed the connection]
staafl has joined #ruby
Es0teric has joined #ruby
cuci has joined #ruby
Eldariof-ru has quit [Ping timeout: 244 seconds]
wallerdev has joined #ruby
wallerdev has quit [Client Quit]
Es0teric has quit [Client Quit]
cuci has quit [Read error: Connection reset by peer]
cmouse has left #ruby [#ruby]
girija has joined #ruby
arya has joined #ruby
pdamer has quit [Quit: pdamer]
<aedornm> I'm having a problem, but I haven't decided what it is yet.
cuci has joined #ruby
aqabiz has joined #ruby
pavilionXP has quit [Read error: Connection reset by peer]
<banisterfiend> aedornm: this guy will help http://imgur.com/r/pics/F3PAIUL
<aedornm> That looks promising!
cuci has quit [Read error: Connection reset by peer]
tommyvyo has quit [Quit:]
Morkel has quit [Quit: Morkel]
cuci has joined #ruby
adkron has joined #ruby
cuci has quit [Read error: Connection reset by peer]
tommyvyo has joined #ruby
bonhoeffer has joined #ruby
Eldariof28-ru has joined #ruby
cuci has joined #ruby
girija has quit [Ping timeout: 246 seconds]
aqabiz has quit [Quit: aqabiz]
cuci has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
drale2k has quit [Ping timeout: 246 seconds]
mneorr has joined #ruby
Eldariof93-ru has quit [Ping timeout: 272 seconds]
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
davetherat has quit [Read error: Connection reset by peer]
cuci has joined #ruby
eldariof has joined #ruby
Eldariof28-ru has quit [Read error: Operation timed out]
apeiros_ has joined #ruby
cuci has quit [Client Quit]
<pandawarrior> ello… how can i make a class method private?
takeru has joined #ruby
<apeiros_> private_class_method :foo
<apeiros_> or: class << self; private :foo; end
<apeiros_> or: class << self; private; def foo; end; end
frihd has joined #ruby
Eldariof-ru has joined #ruby
mneorr has quit [Remote host closed the connection]
<pandawarrior> apeiros_: looks like that's done the trick
<pandawarrior> lovely
<robert_> blah; CSV doesn't want to quote my fields. and it's causing upstream errors parsing my CSV file. :/
eldariof has quit [Ping timeout: 248 seconds]
takeru has quit [Ping timeout: 245 seconds]
Beakr has quit [Quit: Beakr]
d34th4ck3r has joined #ruby
<pandawarrior> scared to upgrade to ruby 2
<pandawarrior> all my lovely code might end up like a fart in a bag
<pandawarrior> :S
<Spooner> robert_, Use CSV.open(file, "w", force_quotes: true)
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
sayan has quit [Read error: Connection reset by peer]
<robert_> Spooner: wrong direction. I'm generating the CSV files. Upstream meaning upstream from the company I'm working for.
lastk has joined #ruby
jphpsf has quit [Ping timeout: 248 seconds]
<Spooner> robert_, That is for generating the CSV.
chrisnicola has joined #ruby
newUser1234 has quit [Remote host closed the connection]
<robert_> but I'm using ::generate :/
heliumsocket has quit [Quit: heliumsocket]
heliumsocket has joined #ruby
<Spooner> OK. generate(str, force_quotes: true) then. It is all in the docs...
samuel02_ has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
<robert_> I've tried :force_quotesm though.
ffranz has quit [Quit: Leaving]
jphpsf has joined #ruby
<apeiros_> pandawarrior: that's the right time to add test units to your code
<Spooner> robert_, Works for me. I expect a problem elsewhere.
macq has quit [Ping timeout: 240 seconds]
<Spooner> robert_, CSV.generate(force_quotes: true) {|c| c << ["fish", "frog pie"] }=> "\"fish\",\"frog pie\"\n"
macq has joined #ruby
samuel02 has quit [Ping timeout: 256 seconds]
<apeiros_> oh, since when does IO#lineno exist?
Stilo has joined #ruby
ffranz has joined #ruby
hadees has quit [Ping timeout: 245 seconds]
<apeiros_> oooh, :( useless: "lineno counts the number of times #gets is called rather than the number of newlines encountered"
wallerdev has joined #ruby
<robert_> apeiros_: wtf?
<Spooner> apeiros_, You can use gets("\x00") to separate by whatever you like, so it does sort of make sense to do it that way.
<apeiros_> Spooner: not really
<apeiros_> File should have #line_separator and then "just do the right thing"
Takehiro has quit [Remote host closed the connection]
jphpsf has quit [Ping timeout: 252 seconds]
<apeiros_> relying on a global is stupid anyway…
horofox has joined #ruby
<pandawarrior> apeiros_: yup i'm adding rspec tests now, then i'm going to migrate
<Spooner> Yeah, I'm not a fan of $anything, but it is how it is ;(
<apeiros_> ew rspec
<pandawarrior> ?
* apeiros_ does not like rspec
<apeiros_> but it's your choice ;-)
<pandawarrior> apeiros_: ...
eliasp has quit [Ping timeout: 248 seconds]
<pandawarrior> the rspec channel is pretty dead, that's why i'm here asking for rspec help
Eldariof-ru has quit [Read error: Operation timed out]
<pandawarrior> it's a bit late for me to switch, but out of curiosity
<pandawarrior> which other test frameworks do you prefer?
<Spooner> I've tried others, but I end up back with rspec ;)
Eldariof-ru has joined #ruby
<apeiros_> pandawarrior: until I finally finish my own baretest - plain test/unit with a bit of helper code
lledet has joined #ruby
Beakr has joined #ruby
generalissimo has joined #ruby
<Spooner> I do use rr though, to replace rspec's verbose mocking though, if I have a lot of it to do.
<apeiros_> rr+
mpfundstein has quit [Remote host closed the connection]
<pandawarrior> i've sean steak
<apeiros_> *rr++
<pandawarrior> seen *
crackfu has quit [Remote host closed the connection]
<pandawarrior> not seen rr
<pandawarrior> will check it out
<pandawarrior> what about steak, thoughts on that?
hogeo has joined #ruby
statarb3 has quit [Quit: Leaving]
mityaz has joined #ruby
freakazoid0223 has joined #ruby
samphippen has joined #ruby
hogeo_ has quit [Ping timeout: 260 seconds]
jphpsf has joined #ruby
m_3 has quit [Remote host closed the connection]
<aedornm> I like steak medium-rare
lolmaus has quit [Read error: Connection reset by peer]
lolmaus has joined #ruby
dagnachew has quit [Read error: Connection reset by peer]
jphpsf has quit [Ping timeout: 248 seconds]
adayzdone has joined #ruby
Voting has joined #ruby
endzyme has quit [Remote host closed the connection]
<Spooner> pandawarrior, Main advantage of rr is that it's syntax looks like a method call, rather than a sentence ;)
sayan has joined #ruby
<adayzdone> this AppleSript reserves a pdf file to pdf … Is there a quick way of tweaking this to have it accept html as the in file? http://bpaste.net/show/1niHKqQJFmqJQTzqUoux/
locriani has joined #ruby
<adayzdone> resaves*
mneorr has joined #ruby
<Spooner> I've also considered using wrong as well. I've used a similar library in Python and it seems cleaner too. So Ideally, I'd use rspec without rspec :D
<banisterfiend> adayzdone: this is #ruby
<adayzdone> banisterfiend Hi … the meat of the script is ruby
<banisterfiend> adayzdone: but the part you want help with is not ruby ;)
<Spooner> "reserves a pdf file to pdf" - huh?
<adayzdone> Spooner … For a strange bug in indesign
Eldariof-ru is now known as eldariof
<Spooner> Why not just use Ruby for the conversion of the HTML-> pdf rather than generating a script for another language in Ruby? *boggles*
<adayzdone> Spooner It is a small part of a larger AppleScript
<Spooner> Oh no, you generate Ruby with Applescript. Crazy days :D
mercwithamouth has joined #ruby
<adayzdone> So is there a way to change the ruby section to accept html files ?
<adayzdone> Spooner … I don't know ruby yet … I hear it is fantastic
<Tricon> I <3 Ruby.
<Spooner> adayzdone, Most people in here are biased for Ruby though ;)
<Tricon> JAVA FOREVER!
pdamer has joined #ruby
<Tricon> LOLJKBRO.
enebo has quit [Quit: enebo]
crackfu has joined #ruby
<adayzdone> Spooner :) … So is it possible to convert the script to accept a html file an output a pdf ?
<apeiros_> why kidding? there must be a place to send all those who need punishment
<adayzdone> I tried using cupsfilter but the output is horrible
<Spooner> Easy google - pdfkit does the job.
wallerdev has quit [Quit: wallerdev]
takeru has joined #ruby
<Tricon> PDFKit works well.
heliumsocket has quit [Quit: heliumsocket]
browndawg has quit [Quit: Leaving.]
pdamer has quit [Quit: pdamer]
m_3 has joined #ruby
<adayzdone> Spooner Would you help me change this script? http://bpaste.net/show/1niHKqQJFmqJQTzqUoux/ Is it a matter of changing the PDFDocument.alloc.initWithURL statement?
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
<adayzdone> to something like HTMLDocument....
SCommette has joined #ruby
tommyvyo has quit [Quit:]
<Spooner> adayzdone, There is a simple example on that page I linked. Admittedly, ignore the stuff about markdown and just put the html in directly.
Eldariof-ru has joined #ruby
lledet has quit [Quit: lledet]
chussenot has quit [Quit: chussenot]
<Spooner> Oh, since you are getting the code from a url, the second example is directly what you need.
<Spooner> *getting the html from a url
<adayzdone> I am getting the html for a file
<adayzdone> kit.to_file("my_web_site.pdf") this ?
Takehiro has joined #ruby
eldariof has quit [Ping timeout: 244 seconds]
chussenot has joined #ruby
ffranz has quit [Quit: Leaving]
Takehiro has quit [Remote host closed the connection]
mikurubeam has joined #ruby
<Spooner> PDFKit.new(infile).to_file(outfile)
<Spooner> However, I believe that your script is getting PDFKit from Cocoa, not from Ruby. Never used Cocoa though, so not 100% sure.
newUser1234 has joined #ruby
<banisterfiend> Hanmac: do u have a Backpfeifengesich ?
fire has quit [Quit: WeeChat 0.4.0]
crackfu has quit [Remote host closed the connection]
imami|afk is now known as banseljaj
samphippen has quit [Quit: Computer has gone to sleep.]
drale2k has joined #ruby
* apeiros_ hands banisterfiend a 't'
BizarreCake has quit [Ping timeout: 256 seconds]
samphippen has joined #ruby
sepp2k has joined #ruby
samuel02 has joined #ruby
drale2k has quit [Ping timeout: 248 seconds]
pen has quit [Remote host closed the connection]
samuel02_ has quit [Ping timeout: 248 seconds]
d2dchat has quit [Remote host closed the connection]
<adayzdone> Spooner what does this line do ? pdf = PDFDocument.alloc.initWithURL(url)
<adayzdone> takes the first argv and does what ?
Kruppe has joined #ruby
<Spooner> I assume it is wrapping some Cocoa code. Creates a new PDF document from a url.
bonhoeffer has quit [Quit: bonhoeffer]
samphippen has quit [Quit: Computer has gone to sleep.]
<Spooner> adayzdone, Yeah, it seems to be just wrapping Mac stupidlanguage: pdfDoc = [[PDFDocument alloc] initWithURL: [NSURL fileURLWithPath: [self fileName]]]
<Spooner> But all this info is readily googleable.
lewix has joined #ruby
lewix has quit [Changing host]
lewix has joined #ruby
chussenot has quit [Quit: chussenot]
ddd has quit [Ping timeout: 245 seconds]
noxoc has joined #ruby
otters`away is now known as otters
lolmaus has quit [Read error: Connection reset by peer]
zul_ has joined #ruby
lolmaus has joined #ruby
Chryson has joined #ruby
BizarreCake has joined #ruby
ddd has joined #ruby
whowantstolivef1 has joined #ruby
<zul_> hi guys I have a problem, I assign to a string variable a html code which refer to a file in the file system, http://pastebin.com/7m57yPNz when I try to run it I get localhost - - [02/Mar/2013:18:29:12 CET] "GET /tmp/data.tsv HTTP/1.1" 404 483
<zul_> why?
<Spooner> zul_, Either use separate files for your css/html or use the standard Sinatra way of embedding them in your source.
<zul_> spooner that is all the code, just that file.rb
<Spooner> But the reason you are getting 404 is because you aren't accepting anything but / and /a, but you are requesting /tmp/data.tsv
<zul_> mmm ok then? I could I change the code?
blahwoop has quit [Ping timeout: 256 seconds]
<Spooner> http://www.sinatrarb.com/intro and search for @@ to see how it is suipposed to be done.
bryanjswift has joined #ruby
txdv has joined #ruby
mibitzi has quit [Ping timeout: 264 seconds]
<zul_> ok spooner I look.. thanls
<zul_> thanks
<Spooner> But to fix the code to work (rather than to be "correct"), you need to do get '/tmp/data.tsv' do; a; end
Mattix has joined #ruby
testingb0t has quit [Quit: Leaving.]
<Spooner> zul_, @@ marks an inline template (which makes it googleable :D).
chrisramon has joined #ruby
enebo has joined #ruby
wallerdev has joined #ruby
horofox has quit [Quit: horofox]
<Spooner> zul_, Though if you are using Sinatra to serve just a single static page, it is slightly overkill!
<nmeum> seems legit
kodeart has quit [Ping timeout: 240 seconds]
mneorr has quit [Remote host closed the connection]
drale2k has joined #ruby
elico has joined #ruby
adamjleonard has joined #ruby
mneorr has joined #ruby
crackfu has joined #ruby
drale2k has quit [Ping timeout: 256 seconds]
philcrissman has joined #ruby
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
yshh has joined #ruby
browndawg has joined #ruby
DrShoggoth has quit [Quit: Leaving]
browndawg has left #ruby [#ruby]
uris has joined #ruby
bryanjswift has quit [Ping timeout: 248 seconds]
<pandawarrior> when is enough, enough?
niklasb has joined #ruby
<pandawarrior> i have a module that gets included in a class
tommyvyo has joined #ruby
samuel02_ has joined #ruby
<pandawarrior> i have tested the class
<pandawarrior> but now i'm thinking of testing the modules methods too
yashshah has quit [Ping timeout: 244 seconds]
sepp2k has quit [Remote host closed the connection]
<pandawarrior> all of the methods in this module get used to produce a final result and i have tests against what the results should look like and what they should contain
<pandawarrior> that said is it good to just leave the module alone?
samuel02 has quit [Ping timeout: 252 seconds]
<pandawarrior> if i do test it, it will be on line of test code for every line in the module
<pandawarrior> and that seems a bit off
yshh has quit [Ping timeout: 272 seconds]
mpfundstein has joined #ruby
<apeiros_> 1:1 test ratio isn't bad
<apeiros_> some advocate even higher test:code ratios
fire has joined #ruby
elico has quit [Remote host closed the connection]
newUser1234 has quit [Remote host closed the connection]
hbpoison has quit [Ping timeout: 248 seconds]
hbpoison has joined #ruby
<pandawarrior> true..
<pandawarrior> i suppose
<pandawarrior> but i was hoping to hear the other
<apeiros_> then don't ask :-p
<shevy> nah
<shevy> pandawarrior, don't test
* apeiros_ 's curios for the rationale…
<pandawarrior> lol
<apeiros_> *is
<shevy> extra time spent
<apeiros_> saved time
<pandawarrior> i should have tested *first*
<apeiros_> saved time upon every bug which doesn't happen in the first place
<pandawarrior> retro fitting tests sucj
<apeiros_> saved time upon every bug which still does happen
generalissimo has quit [Remote host closed the connection]
<apeiros_> saved time upon every change/refactor/rewrite
crackfu has quit [Remote host closed the connection]
codespectator has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
shadowshell has joined #ruby
mpfundstein has quit [Remote host closed the connection]
<epitron> a big refactor means you have to throw out all your tests tho
<epitron> :)
<epitron> (well, a subset of them)
mockra has joined #ruby
<Kuifje> good morning
jonathanwallace has quit [Read error: Connection reset by peer]
thone has joined #ruby
thone_ has quit [Read error: Operation timed out]
maxmanders has joined #ruby
<apeiros_> epitron: that's not a refactor then
adamjleonard has quit [Quit: Leaving...]
<apeiros_> or you completely messed up coupling
bryanjswift has joined #ruby
<pandawarrior> i must admit tests make me less scared to move stuff around
<apeiros_> epitron: `Code refactoring is a "disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior"`
jonathanwallace has joined #ruby
drale2k has joined #ruby
<apeiros_> emphasis on 'without changing its external behavior'
<apeiros_> so either you a) don't refactor, or b) screwed up your tests if you have to rewrite your tests upon refactoring
stopbit has joined #ruby
<apeiros_> pandawarrior: exactly
bubblehead has joined #ruby
drale2k has quit [Ping timeout: 272 seconds]
heliumsocket has joined #ruby
bubblehead has quit [Ping timeout: 260 seconds]
yshh has joined #ruby
VonKingsley has joined #ruby
generalissimo has joined #ruby
joeycarmello has quit [Remote host closed the connection]
joeycarmello has joined #ruby
d34th4ck3r has quit [Ping timeout: 256 seconds]
fire has quit [Quit: WeeChat 0.4.0]
mtfk__ is now known as mtfk
chrishough has joined #ruby
philcrissman has quit [Remote host closed the connection]
ananthakumaran has quit [Ping timeout: 252 seconds]
sayan has quit [Ping timeout: 272 seconds]
adkron has quit [Ping timeout: 256 seconds]
Weazy has joined #ruby
bryanjswift has quit [Quit: Computer has gone to sleep.]
VegetableSpoon has joined #ruby
cpruitt has quit [Quit: cpruitt]
colonolGron has joined #ruby
LouisRoR has joined #ruby
mikurubeam has quit [Ping timeout: 272 seconds]
fire has joined #ruby
noxoc has quit [Ping timeout: 272 seconds]
kushalkhandelwal has quit [Quit: Leaving.]
noxoc has joined #ruby
samuel02 has joined #ruby
r0f0 has quit [Quit: Leaving]
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
freakazoid0223 has quit [Read error: Connection reset by peer]
moos3 has joined #ruby
fire has quit [Client Quit]
samuel02_ has quit [Ping timeout: 255 seconds]
cableray has joined #ruby
Takehiro has joined #ruby
chrisramon has quit [Quit: chrisramon]
drale2k has joined #ruby
moos3 has quit [Client Quit]
arya has quit [Ping timeout: 248 seconds]
drale2k has quit [Ping timeout: 248 seconds]
heliumsocket has quit [Read error: Connection reset by peer]
moos3 has joined #ruby
sepp2k has joined #ruby
Takehiro has quit [Ping timeout: 264 seconds]
arya has joined #ruby
cephalopod has quit [Ping timeout: 256 seconds]
himsin has quit [Ping timeout: 255 seconds]
generalissimo has quit [Remote host closed the connection]
BizarreCake has quit [Quit: Leaving]
Beakr_ has joined #ruby
horofox has joined #ruby
<epitron> apeiros_: "external behaviour" could be an api, or it could be the behaviour from the end-user's perspective
<apeiros_> epitron: you're stretching it
<epitron> there are many layers to a piece of software
<epitron> you're telling me you've never refactored a system, and needed to change an API? :)
<apeiros_> what behaviour wrt libraries is, is well discussed
<apeiros_> I'm telling you you're abusing the term "refactor" if you really mean "rewrite"
chussenot has joined #ruby
niklasb has quit [Ping timeout: 248 seconds]
Beakr has quit [Ping timeout: 248 seconds]
Beakr_ is now known as Beakr
<epitron> okay, throwing away all tests could be a rewrite situation
<apeiros_> no. not "could". is.
<epitron> depending on how you wrote your tests, though... a serious API change could break all of them
<epitron> (probably bad test design tho :)
<apeiros_> you do very much by definition NOT refactor if you have to change your tests. Or you test internal state in your tests (which may be valid, but usually should not be done)
SCommette has quit [Quit: SCommette]
moos3 has quit [Quit: Computer has gone to sleep.]
<epitron> this sounds like a good working definition of refactor vs. rewrite. thank you for correcting me.
<apeiros_> yw :)
mpfundstein has joined #ruby
<epitron> i've always taken a more broad definition of "factor"
undersc0re97 has quit [Ping timeout: 248 seconds]
<epitron> like in mathematics, where you decompose and recompose "things"
<aytch> I've taken to understanding it as refactoring being "cleaning up the code" in order to make it easier to read; rewriting would be starting over to achieve the same functions in a different way. Is that a valid description?
<epitron> in software, those things could be at any level of absrtaction
lastk has quit [Quit: Leaving]
<epitron> hmmm
<apeiros_> aytch: the deciding thing is whether you break your API in the process
fire has joined #ruby
<epitron> refactoring can involve rewriting large parts of the code.
<aytch> hmmm...in the codeacademy courses, they most teach refactoring as things like using one-line do blocks instead of the multi-line style
<apeiros_> epitron: re different layers of software/code - yes, but there's different layers of tests too. if you refactor one given layer, you should not have to change any of the tests for *that* layer
<epitron> again, it depends on the level.
undersc0re97 has joined #ruby
<epitron> right.
<epitron> that makes sense.
SCommette has joined #ruby
<apeiros_> aytch: usually the intent of a refactor is to simplify the internal code, yes
<apeiros_> at least I see no other reason to refactor
<epitron> performance is a good reason :)
vlad_starkov has joined #ruby
<apeiros_> ah, right
<apeiros_> good point :)
kirun_ has joined #ruby
<apeiros_> so we have: improve cpu footprint, improve memory footprint, make code nicer
<aytch> is there a performance hit to using multi-line blocks as opposed to one-line blocks?
<apeiros_> no
<apeiros_> on how many lines you spread the same code makes no difference
<aytch> then "refactoring" for performance would change your methodology, which would be a rewrite, yeah?
<apeiros_> no
mikurubeam has joined #ruby
Edward__ has joined #ruby
kirun has quit [Ping timeout: 256 seconds]
<apeiros_> take Array#sort
<epitron> ruby's parser takes 378 nanoseconds longer to read a multiline codeblock actually
<apeiros_> as long as the result is the same, it doesn't matter what algorithm is used internally
fire has quit [Client Quit]
Virunga has joined #ruby
<apeiros_> but the different algorithms could vary wildly with regards to all three - readability, perfomance, used memory
<apeiros_> *performance
sambao21 has joined #ruby
<epitron> always write your code the simplest way first. :)
<epitron> optimize later
jamesfung14 has joined #ruby
fire has joined #ruby
<epitron> premature optimization is the root of all evil
thinkclay has joined #ruby
<epitron> (that doesn't mean you shouldn't think about how you're structuring things though)
<epitron> (analysis is also important)
<apeiros_> those things change with experience
davorb_laptop has joined #ruby
<apeiros_> but it's a solid advice for a long time at the start of your coding career
fir_ed has quit [Ping timeout: 248 seconds]
<epitron> sure, if you've written some kind of app like 50 times, you generally can optimize it in your head
<epitron> that's kinda what happens when you're an expert at anything -- you stop experimenting in the real world, and you start simulating the results of the experiments in your head
<epitron> it leads to much faster evolution of the thing you're making
<apeiros_> or you get "a feel" for it
<epitron> frank lloyd wright, in his 80's, could "shake a design out of his sleeve"
scruple has joined #ruby
<apeiros_> where you rarely even have to experiment, you just know a given solution will likely be the better (for whatever value of "better" in the given context)
<epitron> he made the plans for "falling water" in about 2 hours
lledet has joined #ruby
<epitron> he spent 3 months thinking about it though :)
<apeiros_> and that's another important aspect of experience - you'll judge on what aspect means "better"
<apeiros_> since quite often performance, memory footprint and readability are tradeoffs of each other
lledet has quit [Client Quit]
newUser1234 has joined #ruby
himsin has joined #ruby
<epitron> you can actually solve all of those at once, but you also have to build your own compiler :)
drale2k has joined #ruby
fire has quit [Quit: WeeChat 0.4.0]
<epitron> slight initial cost there
fire has joined #ruby
mfcabrera has quit [Quit: This computer has gone to sleep]
sambao21 has quit [Ping timeout: 272 seconds]
bonhoeffer_ has joined #ruby
blahwoop has joined #ruby
samuel02_ has joined #ruby
drale2k has quit [Ping timeout: 264 seconds]
VegetableSpoon has quit [Quit: Leaving]
chrisramon has joined #ruby
samuel02 has quit [Ping timeout: 256 seconds]
chrisramon has quit [Client Quit]
chrisramon has joined #ruby
chrisramon has quit [Client Quit]
sambao21 has joined #ruby
sirfilip has joined #ruby
himsin has quit [Ping timeout: 272 seconds]
blahwoop has quit [Ping timeout: 256 seconds]
yacks has quit [Read error: Connection reset by peer]
RyanD has joined #ruby
bonhoeffer_ has quit [Quit: bonhoeffer_]
tenmilestereo has joined #ruby
etcetera has joined #ruby
thinkclay has quit [Quit: Leaving.]
Voting has quit [Read error: Connection reset by peer]
lewix has quit [Remote host closed the connection]
shevy has quit [Ping timeout: 252 seconds]
Voting has joined #ruby
Virunga has quit [Remote host closed the connection]
lolmaus has quit [Read error: Connection reset by peer]
lolmaus has joined #ruby
<apeiros_> damit, stupid 1.8, no String#end_with?
<davorb_laptop> i hate old systems with 1.8
razibog has quit [Ping timeout: 248 seconds]
dhruvasagar has quit [Ping timeout: 248 seconds]
asdasdasdasdas has joined #ruby
drale2k has joined #ruby
fire has quit [Ping timeout: 246 seconds]
mockra has quit [Remote host closed the connection]
d2dchat has joined #ruby
<asdasdasdasdas> i know this is ruby channel but... is ruby dead as many websites say?
drale2k has quit [Ping timeout: 245 seconds]
<asdasdasdasdas> i would like to start learning ruby, it just looks cool, but if its dead...
<apeiros_> news to me that many websites would say that
<apeiros_> sources?
maxmanders has quit [Quit: Computer has gone to sleep.]
<apeiros_> you quote a 4y old source?
<apeiros_> srsly?
<MrZYX> that's nothing in computer sience!
<sirfilip> who told you that ruby is dead asdasdasdasdas ?
shevy has joined #ruby
<apeiros_> asdasdasdasdas: also, ruby != rails
<sam113101> rails was only a few years old at that time, no?
punchfacechamp has quit [Read error: Connection reset by peer]
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
<sirfilip> and ruby on rails is not dead
<apeiros_> but to answer that articles question - the past 54 months indicate that it wasn't dead back then
<sirfilip> still live and kicking
<apeiros_> and it doesn't look dead now either.
<davorb_laptop> asdasdasdasdas ruby if probably the opposite of dead
mikurubeam has joined #ruby
<asdasdasdasdas> but it was dead in 2008 then?
<Spooner> asdasdasdasdas, Just look on any job site and see how much you get as a Rails dev and see how keen people are for it :D
<apeiros_> asdasdasdasdas: ok, lets make this short:
<apeiros_> NO ruby is not dead
<apeiros_> and NO, rails isn't dead either.
punchfacechamp has joined #ruby
scruple has quit [Quit: Leaving]
adambeynon has joined #ruby
<asdasdasdasdas> i hope i didnt offend anyone :P
r0bby has joined #ruby
<apeiros_> and by that query, pretty much all languages are the same dead (tried python, java, c#)
<asdasdasdasdas> i just dont want to learn a language where the community is dying everyday..
philcrissman has joined #ruby
<apeiros_> asdasdasdasdas: #ruby channel grew from ~400 users to 800 in the last 4y
<apeiros_> opposite of dying.
robbyoconnor has quit [Ping timeout: 255 seconds]
<asdasdasdasdas> thats good then
<sirfilip> nope you havent asdasdasdasdas
<sirfilip> ruby is a great language to start cause it will teach you a culture of programming
samphippen has joined #ruby
<VonKingsley> the ruby group I joined just had to split into multiple sessions because of all the new learners
adamjleonard has joined #ruby
maxmanders has joined #ruby
<asdasdasdasdas> well, im a 10y experienced php developer, so..
<sirfilip> go with ruby then
frihd has quit [Quit: Leaving.]
<sirfilip> you will do all that php programmers are talking this days
<asdasdasdasdas> i wanted to learn something fresh
<sirfilip> bdd for example and you will gain great mind set
<sirfilip> will write your php apps much better
<sirfilip> can use that in php programming
jekotia_ has joined #ruby
d34th4ck3r has joined #ruby
chussenot has quit [Quit: chussenot]
hiroyuki has quit [Ping timeout: 245 seconds]
motto has joined #ruby
chrishough has quit [Ping timeout: 256 seconds]
<sam113101> learning ruby helps you write better php code?
samuel02 has joined #ruby
<asdasdasdasdas> i focus my code in readability, simplicity and extensibility
<asdasdasdasdas> thats why i thought learn ruby was a good idea
<sirfilip> yes it does
jekotia has quit [Ping timeout: 272 seconds]
<sam113101> how so
<asdasdasdasdas> in PHP is too hard to simplicity the code
jekotia_ is now known as jekotia
<sirfilip> i started as ruby dev and now i am working as php dev
<sirfilip> no it is not
mneorr has quit [Remote host closed the connection]
<sirfilip> the mindset is what matters
<sam113101> explain this to me, sirfilip
<asdasdasdasdas> so why did u switch from ruby to php¿
Nisstyre-laptop has joined #ruby
<sam113101> not that I don't believe you, I'm just curious
<sirfilip> i met php devs that was arguing so what it works why should i organize it
cephalopod has joined #ruby
<sirfilip> and comming from the ruby world (rails dev) that was just not acceptable to me
samuel02_ has quit [Ping timeout: 248 seconds]
freakazoid0223 has joined #ruby
m8 has quit [Ping timeout: 244 seconds]
<sirfilip> also importance of testing, restful apis
toekutr has joined #ruby
<sirfilip> i had that back in 2006
staafl has quit [Read error: Connection reset by peer]
fire has joined #ruby
chrishough has joined #ruby
<sirfilip> all of the new fresh ideas are generally worked in ruby at first cause it is very easy to implement them
<sirfilip> except for the Rack interface that came in form of WSGI
<sirfilip> from the python world
chrisnicola has quit [Quit: This computer has gone to sleep]
workmad3 has joined #ruby
mneorr has joined #ruby
<sirfilip> so doing ruby programming for a programmer in a different language feels like a look into the window of future
<sirfilip> something that will get implemented in their language
<sirfilip> couple of years from now
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
<sirfilip> so sam113101 that is why i think that doing ruby will help you a lot in your native language programming
<sirfilip> also it is a curse in the same time
<sirfilip> cause you wont be happy with the implementation
<sirfilip> cause it is not the Ruby way
<sam113101> I'm new to ruby, I'll see if it does influence the way I code in other languages
ryanf has quit [Ping timeout: 245 seconds]
<sam113101> it's interesting
rippa has quit [Ping timeout: 240 seconds]
slainer68 has joined #ruby
IceDragon has joined #ruby
etcetera has quit []
vlad_starkov has quit [Remote host closed the connection]
blacktulip has joined #ruby
cephalopod has quit [Ping timeout: 255 seconds]
<apeiros_> I think every language you learn, if you learn it with all its idioms, will influence how you code in every language
<MrZYX> ^ +1
<asdasdasdasdas> every language have its own pros and cons
etcetera has joined #ruby
<asdasdasdasdas> the more languages u learn the more pros u can take
<ddd> ruby definitely influences my java
drale2k has joined #ruby
ryanf has joined #ruby
sandGorgon has quit [Ping timeout: 244 seconds]
hiroyuki has joined #ruby
takeru has quit [Remote host closed the connection]
davorb_laptop has quit [Quit: Computer has gone to sleep.]
jphpsf has joined #ruby
<sirfilip> yup apeiros_ i am i learn new language every year kind of person
cephalopod has joined #ruby
Azure has quit [Quit: ZNC - http://znc.in]
<sirfilip> learning erlang atm
Azure has joined #ruby
d34th4ck3r has quit [Quit: Konversation terminated!]
Kamijou_Touma has quit [Quit: yawn]
quazimodo has quit [Ping timeout: 272 seconds]
hiroyuki has quit [Ping timeout: 248 seconds]
himsin has joined #ruby
sirfilip has quit [Quit: Leaving]
chrisnicola has joined #ruby
drale2k has quit [Quit: Leaving...]
fermion has quit [Quit: Textual IRC Client: www.textualapp.com]
chrisnicola has quit [Client Quit]
philcrissman has quit [Remote host closed the connection]
pdamer has joined #ruby
razibog has joined #ruby
razibog1 has joined #ruby
razibog1 has quit [Client Quit]
emmanuelux has joined #ruby
bryanjswift has joined #ruby
enebo has quit [Quit: enebo]
lewix has joined #ruby
lewix has quit [Changing host]
lewix has joined #ruby
mneorr has quit [Remote host closed the connection]
sw99 has joined #ruby
tealmage has joined #ruby
<sw99> How do I read the first 6 bytes in a file? What about bytes 7 to 10 only?
quazimodo has joined #ruby
banseljaj is now known as imami|afk
yshh has quit [Read error: Connection reset by peer]
subbyyy has quit [Read error: Connection reset by peer]
yshh has joined #ruby
pandawarrior has quit [Quit: Leaving.]
subbyyy has joined #ruby
faunty has joined #ruby
Beakr has quit [Quit: Beakr]
Eldariof-ru has quit []
faunty has quit [Read error: Connection reset by peer]
<pskosinski> So file.read(6) or file.seek(7); file.read(3)
<pskosinski> If I understand correctly seek…
samuel02_ has joined #ruby
<pskosinski> read(4) …
hbpoison has quit [Ping timeout: 244 seconds]
<pskosinski> Well, nvm, depends :p
<apeiros_> yes, read & seek
<sw99> ok, thanks!
<sw99> also, C has this ~ operator to invert the bits of a variable
<sw99> how do I invert bits in ruby
hbpoison has joined #ruby
vlad_starkov has joined #ruby
<sw99> of some foo variable containing the contents of a binary file
karl___ has quit [Quit: Page closed]
<sw99> or a portion of a binary file
Beakr has joined #ruby
quazimodo has quit [Ping timeout: 245 seconds]
samuel02 has quit [Ping timeout: 272 seconds]
<apeiros_> ~9
<apeiros_> but in order to invert the bits, you need to know how many. ruby doesn't put a limit on it.
mityaz has quit [Quit: See ya!]
<apeiros_> you can use & to limit the bits: ~9 & 0xff # 1 byte inverted
emmanuelux has quit [Ping timeout: 248 seconds]
statarb3 has joined #ruby
axtran has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
otters has quit [Ping timeout: 264 seconds]
rburton- has joined #ruby
emanon_ has joined #ruby
pdamer has quit [Read error: Connection reset by peer]
pdamer has joined #ruby
arya has quit [Ping timeout: 248 seconds]
tealmage has quit [Remote host closed the connection]
rburton- has quit [Client Quit]
pdamer has quit [Read error: Connection reset by peer]
pdamer_ has joined #ruby
testingb0t has joined #ruby
djwonk has joined #ruby
otters has joined #ruby
Chryson has quit [Ping timeout: 272 seconds]
arya has joined #ruby
pdamer_ has quit [Read error: Connection reset by peer]
pdamer has joined #ruby
Stilo has joined #ruby
rburton- has joined #ruby
wmoxam has joined #ruby
emmanuelux has joined #ruby
pdamer has quit [Read error: Connection reset by peer]
pdamer_ has joined #ruby
rburton- has quit [Client Quit]
razibog has quit [Ping timeout: 256 seconds]
zigomir has joined #ruby
decentrality has quit [Read error: Connection reset by peer]
decentrality has joined #ruby
pdamer_ has quit [Read error: Connection reset by peer]
pdamer has joined #ruby
cyong has joined #ruby
Hydroxide has quit [Ping timeout: 244 seconds]
Neomex has joined #ruby
Neomex has quit [Client Quit]
jpfuentes2 has joined #ruby
zul_ has quit [Ping timeout: 272 seconds]
pdamer has quit [Read error: Connection reset by peer]
pdamer has joined #ruby
slainer68 has quit [Remote host closed the connection]
rburton- has joined #ruby
pdamer has quit [Read error: Connection reset by peer]
pdamer has joined #ruby
BRMatt has joined #ruby
Virunga has joined #ruby
cyong has quit [Ping timeout: 248 seconds]
otherj has quit []
VonKingsley has left #ruby [#ruby]
etcetera has quit []
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
zul_ has joined #ruby
drale2k has joined #ruby
V8Energy has quit [Read error: Connection reset by peer]
pdamer has quit [Read error: Connection reset by peer]
pdamer has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
V8Energy has joined #ruby
pdamer has quit [Read error: Connection reset by peer]
pdamer has joined #ruby
d34th4ck3r has joined #ruby
bryanjswift has quit [Quit: Computer has gone to sleep.]
io_syl has quit [Ping timeout: 256 seconds]
kaen has joined #ruby
workmad3 has quit [Quit: leaving]
lewix has quit [Remote host closed the connection]
rburton- has quit [Ping timeout: 245 seconds]
swex has joined #ruby
io_syl has joined #ruby
swex_ has quit [Ping timeout: 252 seconds]
adayzdone has quit [Quit: Textual IRC Client: www.textualapp.com]
<sw99> if i have a 6 byte string
<sw99> how do I get the first 2 bytes
<sw99> is it the same as with a file?
dreda has left #ruby [#ruby]
Astral_ has joined #ruby
<sw99> sixbytestring.read(2) ?
lewix has joined #ruby
lewix has quit [Changing host]
lewix has joined #ruby
samuel02 has joined #ruby
<MrZYX> there's .byteslice
enebo has joined #ruby
samuel02_ has quit [Ping timeout: 244 seconds]
end_guy has quit [Remote host closed the connection]
DrCode has quit [Write error: Broken pipe]
Astralum has quit [Ping timeout: 264 seconds]
statarb3 has quit [Read error: Connection reset by peer]
testingb0t has quit [Quit: Leaving.]
enebo has quit [Ping timeout: 252 seconds]
arya has quit [Ping timeout: 248 seconds]
one has joined #ruby
<apeiros_> sw99: make sure your encoding is set to binary
<sw99> yeah byteslice worked, thx
<apeiros_> then you can just use str[0,2]
<sw99> ah ok
Es0teric has joined #ruby
blahwoop has joined #ruby
arya has joined #ruby
sw99 has quit [Quit: sw99]
RyanD has quit []
cephalopod has quit [Ping timeout: 252 seconds]
emanon_ has quit [Read error: Connection reset by peer]
nopolitica has joined #ruby
emanon_ has joined #ruby
ukd1 has joined #ruby
ukd1 has quit [Client Quit]
kirun_ has quit [Ping timeout: 252 seconds]
garbagecollectio has joined #ruby
<garbagecollectio> does rails implicitly render views after the controller code completes or at some other point?
<Spooner> garbagecollectio, #rubyonrails
<garbagecollectio> you know the answer?
<Spooner> Nope, but Rails questions will be answered better in a Rails channel.
hiroyuki has joined #ruby
Loaft has quit []
Loaft has joined #ruby
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
pdamer has quit [Quit: pdamer]
pdamer has joined #ruby
kirun has joined #ruby
Virunga has quit [Remote host closed the connection]
hiroyuki has quit [Ping timeout: 260 seconds]
drale2k has quit [Ping timeout: 272 seconds]
lledet has joined #ruby
statarb3 has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
ianfleeton has quit [Quit: ianfleeton]
zigomir has quit [Quit: zigomir]
enebo has joined #ruby
blahwoop has quit [Ping timeout: 256 seconds]
emanon_ has left #ruby [#ruby]
aapzak has quit [Read error: Operation timed out]
ebobby has joined #ruby
rburton- has joined #ruby
djwonk has quit []
coolj1 has joined #ruby
djwonk has joined #ruby
newUser1234 has quit [Remote host closed the connection]
reset has joined #ruby
aapzak has joined #ruby
reset has quit [Client Quit]
rburton- has quit [Client Quit]
otherj has joined #ruby
otherj has quit [Max SendQ exceeded]
otherj has joined #ruby
nomenkun has quit [Remote host closed the connection]
gyre007 has quit [Ping timeout: 244 seconds]
slyv has joined #ruby
farnearer has joined #ruby
farnearer has quit [Remote host closed the connection]
drKreso has joined #ruby
Tricon has quit [Quit: Leaving...]
nicoulaj has quit [Remote host closed the connection]
jpfuentes2 has joined #ruby
drKreso has quit [Remote host closed the connection]
ortuna1 has joined #ruby
blacktulip has quit [Remote host closed the connection]
djwonk has quit []
cantonic_ has joined #ruby
JarJar has joined #ruby
arya has quit [Ping timeout: 248 seconds]
enebo_ has joined #ruby
ortuna has quit [Ping timeout: 252 seconds]
cantonic has quit [Ping timeout: 252 seconds]
cantonic_ is now known as cantonic
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
enebo has quit [Ping timeout: 272 seconds]
enebo_ is now known as enebo
takeru has joined #ruby
solancer has joined #ruby
<solancer> hey there
<solancer> what are we talking about ?
arya has joined #ruby
drale2k has joined #ruby
nomenkun has joined #ruby
ortuna1 is now known as ortuna
<Boohbah> solancer: ruby
nachtwandler has quit [Quit: leaving]
<solancer> Boohbah, oh really ?
hiroyuki has joined #ruby
<Boohbah> yes
<Kuifje> who's ruby?
takeru has quit [Ping timeout: 248 seconds]
<coolj1> rube
<coolj1> rube goldberg
blahwoop has joined #ruby
sambao21 has quit [Ping timeout: 260 seconds]
hiroyuki has quit [Ping timeout: 272 seconds]
codecop has quit [Remote host closed the connection]
one has quit [Ping timeout: 252 seconds]
ortuna1 has joined #ruby
<solancer> booby
benlieb has joined #ruby
pmros has joined #ruby
<pmros> hi
zul_ has quit [Quit: Ex-Chat]
ortuna has quit [Ping timeout: 252 seconds]
Virunga has joined #ruby
tylersmith has joined #ruby
solancer has left #ruby ["Leaving"]
hiroyuki has joined #ruby
tylersmith has quit [Client Quit]
maxmanders has quit [Quit: Computer has gone to sleep.]
bigmac has quit [Quit: Leaving]
tylersmith has joined #ruby
bahhh has joined #ruby
daniel_- has joined #ruby
Beakr has quit [Quit: Beakr]
iamjarvo has quit [Quit: Leaving.]
zooz has joined #ruby
<zooz> hey guys
oalvarez has joined #ruby
chrishough has quit [Quit: chrishough]
<zooz> what ruby mysql module would you suggest? I just basically need to do simple operations, like user, db and grants management.
arya has quit [Ping timeout: 248 seconds]
statarb3 has quit [Quit: Leaving]
blahwoop has quit [Ping timeout: 276 seconds]
hiroyuki has quit [Ping timeout: 245 seconds]
kirun has quit [Quit: Client exiting]
ph^ has quit [Remote host closed the connection]
hogeo_ has joined #ruby
one has joined #ruby
arya has joined #ruby
ortuna1 is now known as ortuna
hogeo has quit [Ping timeout: 255 seconds]
whowantstolivef1 has quit [Ping timeout: 272 seconds]
hiroyuki has joined #ruby
maxmanders has joined #ruby
mahmoudimus has joined #ruby
Myconix has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
daniel_- has quit [Ping timeout: 272 seconds]
`p has quit [Remote host closed the connection]
chichou has quit [Ping timeout: 264 seconds]
chichou has joined #ruby
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
[1]Nick has joined #ruby
justsee has quit [Quit: Leaving...]
pdamer has quit [Quit: pdamer]
alanp has joined #ruby
alanp has quit [Read error: Connection reset by peer]
pskosinski has quit [Ping timeout: 246 seconds]
alanp has joined #ruby
oalvarez has left #ruby [#ruby]
hiroyuki has quit [Ping timeout: 255 seconds]
benlieb has quit [Quit: benlieb]
zooz has left #ruby ["Leaving"]
pdamer has joined #ruby
mockra has joined #ruby
alanp_ has quit [Ping timeout: 252 seconds]
dogweather has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
undersc0re97 has quit [Ping timeout: 248 seconds]
sambao21 has joined #ruby
iamjarvo has joined #ruby
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
angusiguess has joined #ruby
____swanson has joined #ruby
Virunga has quit [Remote host closed the connection]
newUser1234 has joined #ruby
palladium has joined #ruby
<palladium> Ruby.
nopolitica has quit [Quit: Lost terminal]
garbagecollectio has quit [Quit: garbagecollectio]
feedbackloop has quit [Ping timeout: 255 seconds]
<epochwolf> palladium: Topaz.
<palladium> epochwolf: malachite.
<epochwolf> palladium: Granite.
<palladium> epochwolf: marble
<epochwolf> palladium: Yellow-bellied sapsucker.
<palladium> epochwolf: tanzanite.
<palladium> damn
<palladium> You word-association shifted on me
<epochwolf> :P
<palladium> THis is why I love Ruby people -- You go into a Java room and people would just get pissy
<palladium> "You're not being serious enough"
<epochwolf> walk into a ruby chatroom and get you get the one lonely mammal that's been suffering since 8am without human contact. :D
<palladium> hahaha
JonathanVeg has joined #ruby
<palladium> It's been a while since I've been on IRC. Taking a foray back into thte Linux world.
<palladium> How do I register my nick on Freenode?
<epochwolf> palladium: just don't meantion rails. The thugs come out of the wall and beat the shit out of you.
<palladium> Thugs or hipsters?
<epochwolf> um… /msg nickserv help register
otherj has quit []
<epochwolf> palladium: hipsters from the SeattleRB crowd.
<epochwolf> palladium: I've had a bad experience with them.
vlad_starkov has joined #ruby
<palladium> really?
<epochwolf> they gave me mean looks and called me names for working on a rails application at their meetup.
<palladium> sheeet
<epochwolf> palladium: everyone else in here had been nice :) just don't bring rails questions in here. They go in #rubyonrails.
<palladium> I'm not even a programmer -- just an enthusiast
<epochwolf> That rule exists mostly because if they allowed rails questions all the idiots banned from #rubyonrails would hang out here.
d2dchat has quit [Remote host closed the connection]
<palladium> naughty blokes
<epochwolf> palladium: most people are nice, but there's always a few bad apples. :)
<palladium> tw-oo
<epochwolf> #ruby is nice, they don't let me troll people.
[1]Nick has left #ruby [#ruby]
ph^ has joined #ruby
<aytch> GUYZ I AM LEARN RAILS how do ActiveRecord? I need to put database in app.
<aytch> ...I'm joking.
<epochwolf> aytch: go away :(
<palladium> Hah I dont even know what that means!
<epochwolf> aytch: you're killing the property values.
<palladium> anyone try out Ubuntu touch yet? I jut threw it on my galaxy nexus gsm that I ditched a few months ago
<epochwolf> palladium: us helpers in #rubyonrails don't know either. We most definitely don't know how to help you "lurn2database"
<palladium> It's pretty nifty -- wish it was full on developed though
end_guy has joined #ruby
<palladium> hahah
<palladium> im trying to learn SQL dont dis :-P
charliesome has joined #ruby
garbagecollectio has joined #ruby
pdamer has quit [Quit: pdamer]
<epochwolf> palladium: learn sql isn't lurn2database. :P
backjlack has quit [Remote host closed the connection]
<aytch> I hang in #rubyonrails so I can watch people ask questions, because sometimes they ask smart questions and I can learn from the answers.
<epochwolf> yay, another witness to my dickery. :/
undersc0re97 has joined #ruby
joofsh has quit [Remote host closed the connection]
<aytch> Even if it's not a problem I have, it's a problem I may one day encounter.
<epochwolf> aytch: yeah, there's plenty of room for funky problems.
coolj1 has quit [Remote host closed the connection]
hiroyuki has joined #ruby
<aytch> I like seeing people's different approaches to problems, I think
statarb3 has joined #ruby
<aytch> You get an idea for common problems and edge cases
<palladium> interesting
<palladium> smart move
<epochwolf> aytch: I wish I worked with people who's approach to problems was enlightening instead of baffling.
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
<palladium> i'm trying to make a career change eventually but i have no formal training in CS just an undying passion to do anything other than what im doing
<epochwolf> insurance = poor quality programmers
orospakr has quit [Excess Flood]
orospakr has joined #ruby
vlad_starkov has quit [Ping timeout: 256 seconds]
cyong has joined #ruby
endzyme has joined #ruby
<epochwolf> palladium: the basics of programming is easy to learn if you have the right mindset. Mastering it requires a lot of work.
enebo has quit [Quit: enebo]
<aytch> I take it you're both newbies to programming, palladium & epochwolf?
endzyme has quit [Remote host closed the connection]
<palladium> I've been fiddling for years but never formally
<epochwolf> aytch: I've been doing rails applications for 5 years
<aytch> (that's not intended to be offensive, I'm a newbie myself)
<epochwolf> programming for 7.
<palladium> I like Ruby and I like SQL
mockra has quit [Remote host closed the connection]
<epochwolf> I'd consider myself an expert.
<Boohbah> you like SQL? what's wrong with you?
<aytch> I'm a systems admin who is trying to get better with devops
<epochwolf> Boohbah: he hasn't used it enough to hate it yet.
<palladium> My industry is all about datamining yet
<aytch> I've found the Ruby Koans to be pretty awesome for learning
<palladium> So I've been using Crystal Reports and learning SQL on the side
<palladium> I did a couple of Ruby courses on Codeschool too
justsee has quit [Quit: Leaving...]
<palladium> and I did Peter's Ruby 1.9.2 book
<banisterfiend> palladium: cool, teach me about outer joins :P
<palladium> Any recommendations on a good IRC client for Linux (Mint)?
<epochwolf> banisterfiend: you mean hinges?
<epochwolf> palladium: xchat or irssi
mahmoudimus has joined #ruby
<aytch> palladium: screen+irssi
JonathanVeg has quit []
<Boohbah> irssi
<epochwolf> irssi if you like console
joofsh has joined #ruby
<epochwolf> xchat if you are one of those poor gui lovers.
<Boohbah> with screen or tmux
<palladium> I'm a poor GUI lover
<aytch> Gui lovers belong on windows, like they deserve.
<Morrolan> KVIrc \o/
<palladium> although MySQL is teaching me to love CLI
<Morrolan> aytch - Shush.
<epochwolf> and before I troll too much, I'm a mac user that is 60% gui tooling.
<palladium> I was using MS SQL Server for the first course I took but I might move to MySQL
<epochwolf> palladium: bah… navicat.
<aytch> ...I'm on a mac, too.
<Boohbah> Morrolan: have you tried Konversation?
<aytch> And I'm using Limechat
<palladium> Whuz navicat?
ph^ has quit [Ping timeout: 272 seconds]
<epochwolf> palladium: I love me gui tools.
<palladium> shit...
<Morrolan> Boohbah - I have not.
<palladium> That's a whole new ball park
<Morrolan> Boohbah - Not using KDE on my Linux machines.
<Boohbah> i love me some QT
<palladium> I've been hacking away at CLI for the last 7 hours wishing I had a GUI
<epochwolf> palladium: navicat is a paid gui database client.
<epochwolf> $20 for the basic version
<palladium> Sweet
<Boohbah> Morrolan: so kvirc is a qt client with no kdelibs dependencies?
<epochwolf> Don't get me wrong, I use terminals for 40% of my work.
<Morrolan> Boohbah - Oh, no, KVIrc is on my Windows machine.
angusiguess has quit [Ping timeout: 246 seconds]
<epochwolf> but I also use gui tools.
cyong has quit [Quit: Leaving.]
<palladium> Linux or otherwise?
<epochwolf> if I'm remoted into a server, I can do all command line.
* Boohbah cheers for cross-platform gui toolkits
<epochwolf> palladium: OS X has bash just like linux doe.
<palladium> yes
<palladium> Ive got an Imac I never euse anymore
<epochwolf> my servers are linux
<Boohbah> epochwolf: i've heard OS X's bash is very old...
Kuifje has quit [Ping timeout: 272 seconds]
<palladium> I use a dual boot HP laptop but I spent more time in Linux the lat week or so
<epochwolf> my secondary machine is a chromebook
<epochwolf> Boohbah: I use zsh. :P
enebo has joined #ruby
<Boohbah> oh right, all the cool kids are using zsh
<palladium> I dunno if Navicat is $20 I can't see it
<epochwolf> chromebook in dev mode is a fine ssh terminal
freakazoid0223 has quit [Read error: Connection reset by peer]
<epochwolf> palladium: there's some free mysql gui tools, those will work well enough
lledet has quit [Quit: lledet]
<epochwolf> palladium: I just buy pretty software because I can afford it.
<epochwolf> finally purchased omnigraffle last week. $200 and I'm a happy wolf.
<epochwolf> Google draw works in a pinch though
<arusso> omnigraffle is amazing. i'll miss it most when i leave OSX.
<arusso> that is, if it doesnt keep me from jumping ship :)
<epochwolf> arusso: I've used it a few times in my life and I decided I'm ont going to live without it.
<aytch> omnigraffle++
v0n has joined #ruby
<arusso> yea, im in that boat now. i do a lot of presentations, and i havent found anything as easy and pretty to use.
<epochwolf> I have a 15" retina macbook pro. Omnigraffle isn't expensive in comparision :P
<arusso> i work for a university, so it costs me like 40 bucks
<arusso> :)
<epochwolf> though I will say my computer costs more than my car D:
<arusso> in the bay area, thats not uncommon
<epochwolf> arusso: I got the pro version so I could use it at work.
<arusso> so dont feel too bad
<epochwolf> I'm in Seattle. :)
<epochwolf> I've got a 12 yera old suv.
greenarrow has quit [Quit: IRC is just multiplayer notepad]
<arusso> ah, you guys have a good bus system though right?
<epochwolf> not here.
<epochwolf> Seattle sucks for transit.
<arusso> huh. Grey's Anatomy lied to me.
<epochwolf> I drive everywhere.
<epochwolf> I live in bothell though, not down town
<epochwolf> Seattle is between 30 to 90 minutes from my place.
Bosma has quit [Quit: leaving]
<arusso> ah yea. that's a bit far for good public transit :)
<epochwolf> arusso: being across the lake means transit sucks
iamjarvo has quit [Quit: Leaving.]
jpfuentes2 has joined #ruby
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
Bosma has joined #ruby
<epochwolf> okay, I need to drive home from this cafe.
<arusso> gl. hf.
<arusso> gg
<epochwolf> Seattle has amazing coffee.
<Paradox> epochwolf, cafe.leave
<Paradox> car.unlock.get_in.drive(destination: :home)
BRMatt has quit [Quit: Leaving]
<epochwolf> epochwolf.teleport(:current_location, :home)
jpfuentes2 has quit [Client Quit]
greenarrow has joined #ruby
lewix has quit [Remote host closed the connection]
<epochwolf> I shall leave the behavior of options other than :current_location to the user.
statarb3 has quit [Ping timeout: 272 seconds]
<Paradox> NoMethodError: teleportation method hasn't been invented yet
<epochwolf> :P
v0n has quit [Ping timeout: 248 seconds]
<Paradox> so
mneorr has joined #ruby
<Paradox> you guys know the close_enough gem?
<Paradox> i thought of something last night as i was going to sleep
<Paradox> how about let it fail, but do a google-esque "did you mean"
brooks has quit [Quit: brooks]
mockra has joined #ruby
greenarrow has quit [Read error: Connection reset by peer]
lolmaus has quit [Read error: Connection reset by peer]
mneorr_ has joined #ruby
lolmaus has joined #ruby
greenarrow has joined #ruby
mercwithamouth has quit [Ping timeout: 246 seconds]
tenmilestereo has quit [Read error: Connection reset by peer]
hiroyuki has quit [Ping timeout: 248 seconds]
mockra has quit [Remote host closed the connection]
mockra has joined #ruby
mneorr has quit [Ping timeout: 260 seconds]
<V8Energy> can someone recommend me a good ruby GUI kit except for Jruby's swing?
mockra_ has joined #ruby
etcetera has joined #ruby
malkomalko has quit [Remote host closed the connection]
mockra_ has quit [Remote host closed the connection]
mockra_ has joined #ruby
malkomalko has joined #ruby
<Boohbah> V8Energy: qt
tylersmith has quit [Quit: tylersmith]
<V8Energy> do you mind pointing me to a decent tutorial?
cschneid has quit [Quit: ZNC - http://znc.sourceforge.net]
mockra has quit [Ping timeout: 246 seconds]
sambao21 has quit [Quit: sambao21]
garbagecollectio has quit [Quit: garbagecollectio]
V8Energy has quit []
maxmanders has quit [Quit: Computer has gone to sleep.]
V8Energy has joined #ruby
vierja has joined #ruby
<V8Energy> oops
<V8Energy> got disconnected
jhchabran has quit [Ping timeout: 255 seconds]
sambao21 has joined #ruby
<Boohbah> use teh google
LouisRoR has quit [Ping timeout: 260 seconds]
<V8Energy> Yea I already found this one
aedorn has joined #ruby
<V8Energy> I thought maybe there's one that is not showing up on google or something
malkomalko has quit [Ping timeout: 245 seconds]
mockra_ has quit [Ping timeout: 260 seconds]
<Boohbah> unheard of
<V8Energy> Can I package ruby qt applications with Ocra?
philcrissman has joined #ruby
poikon_ has joined #ruby
ph^ has joined #ruby
horofox has quit [Quit: horofox]
philcrissman has quit [Remote host closed the connection]