fflush changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste > 3 lines of text on pastebin.com
recycle has quit [Remote host closed the connection]
<shinobi_one> canton7: why should i not be using the bang methods?
eroc has quit [Quit: eroc]
<havenn> shinobi_one: You aren't modifying the receiver, so unnecessary: gets.chomp; #but; response = gets; response.chomp!
<shinobi_one> well in my case its
SolarBoom1 has left #ruby [#ruby]
<shinobi_one> response = "" .. more code .. response = STDIN.gets.chomp!
<shinobi_one> so i think it's ok :)
beneggett has quit [Quit: Computer has gone to sleep.]
<seanstickle> response = STDIN.gets.chomp is what you want
<seanstickle> There's 0 reason to bang it if you are assigning the value to a variable
<seanstickle> ! is for in-place alteration, which you're not doing
<Banistergalaxy> Sup stick
reset_ has quit [Ping timeout: 276 seconds]
<seanstickle> Hey Bruce Banner
wuzzzzaah has quit [Ping timeout: 246 seconds]
<Banistergalaxy> Hru bb
<shinobi_one> ah yes that is correct
<shinobi_one> either way ruby is returning me a new object for response in this case.
catery has quit [Quit: Page closed]
groszek has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
<Banistergalaxy> Seanstickle hru
mrsolo has quit [Quit: Leaving]
<groszek> hi. does anyone know a text formatter simillar to fmt(1)?
<seanstickle> hru?
<seanstickle> Oh, how are you?
<seanstickle> I am super fantastic
<seanstickle> How are you
<Banistergalaxy> Sleepy
cj3kim has quit [Quit: This computer has gone to sleep]
<seanstickle> You should go to sleep
<seanstickle> I hear that works on sleepiness
shadoi has quit [Quit: Leaving.]
billyoc has quit [Ping timeout: 272 seconds]
cbuxton has quit [Quit: Leaving.]
wuzzzzaah has joined #ruby
<Banistergalaxy> Can't gotta drive 2 hours
<seanstickle> That would make sleeping more difficult
workmad3 has joined #ruby
<seanstickle> Should you be IRCing while driving?
<xiphiasx_> nope
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
<xiphiasx_> it's worse than texting while driving
<xiphiasx_> since you have a constant flow of shit to look at all the time
reset has joined #ruby
cj3kim has quit [Client Quit]
SegFaultAX|work2 has quit [Quit: leaving]
windowns has quit [Quit: Leaving]
groszek has left #ruby ["."]
seanyo has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
programR has left #ruby ["Leaving"]
justsee has quit [Quit: Leaving...]
stopbit has quit [Quit: Leaving]
sepp2k1 has quit [Read error: Connection reset by peer]
ezra has joined #ruby
ezra has quit [Changing host]
ezra has joined #ruby
sdwrage has quit [Quit: geekli.st/programmer]
locriani_ has quit [Remote host closed the connection]
locriani has joined #ruby
tyfighter has quit [Quit: tyfighter]
wuzzzzaah has quit [Ping timeout: 255 seconds]
shadoi has joined #ruby
pdtpatrick has quit [Quit: pdtpatrick]
adeponte has quit [Remote host closed the connection]
rcloak has quit [Quit: rcloak]
<ryanf> he ircs while driving all the time
<ryanf> it's terrifying
workmad3 has quit [Ping timeout: 246 seconds]
<fowl> not only does he irc while driving he reads the join/part messages out loud, with full elocution on hostmasks
<fowl> its actually impressive
<havenn> groszek: ActionPack has word_wrap, which is kinda similar to fmt: https://gist.github.com/3670948
wuzzzzaah has joined #ruby
replore has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
slyv has joined #ruby
sterex has quit [Quit: sterex]
ezra has quit [Ping timeout: 276 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
<karstensrage> who
fyolnish has joined #ruby
punkrawkR has quit [Read error: Connection reset by peer]
seanstickle has quit [Quit: seanstickle]
<karstensrage> can someone point me to a surprisingly well written library so i can get a feel for what good ruby code looks like
Juul has joined #ruby
techsurvivor has joined #ruby
<karstensrage> i came across this, and i know its sarcastic, but its hard to tell what all is sarcastic except the same stuff people complain about wrt Java
adamkittelson has quit [Remote host closed the connection]
<havenn> karstensrage: Sinatra would might be one to look at: https://github.com/sinatra/sinatra/blob/master/lib/sinatra/base.rb
fyolnish has quit [Ping timeout: 244 seconds]
pricees has quit [Ping timeout: 255 seconds]
<havenn> karstensrage: Or Celluloid, Thin, or Pry (all on the Githubs). Hrmm.
zeromodulus has quit [Remote host closed the connection]
machty has joined #ruby
coyo has joined #ruby
coyo has quit [Changing host]
coyo has joined #ruby
coyo has quit [Remote host closed the connection]
mparodi has joined #ruby
<karstensrage> thanks havenn, ill take a look
wuzzzzaah has quit [Ping timeout: 244 seconds]
thomas is now known as chaplain
khakimov has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
wuzzzzaah has joined #ruby
justsee has quit [Client Quit]
gurps has quit [Quit: bye]
<ryanf> wow, unibrow is a great gem name
<ryanf> too bad it's taken
replore has quit [Remote host closed the connection]
ckrailo has quit [Quit: Computer has gone to sleep.]
Jake232 has quit [Quit: Computer has gone to sleep.]
ph^ has joined #ruby
<blazes816> a handlebars fork
<blazes816> perhaps higher up in the stack
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
c0rn_ has quit [Quit: Computer has gone to sleep.]
sduckett has joined #ruby
seanyo has quit [Ping timeout: 272 seconds]
havenn has quit [Ping timeout: 245 seconds]
ph^ has quit [Ping timeout: 244 seconds]
adeponte has joined #ruby
zeromodulus has joined #ruby
timonv has quit [Remote host closed the connection]
RegEchse has quit [Quit: <3 WeeChat (v0.3.9-dev)]
Spooner has quit [Ping timeout: 244 seconds]
sdwrage has joined #ruby
havenn has joined #ruby
pricees has joined #ruby
Hanmac1 has joined #ruby
joelsotherbeard has quit [Ping timeout: 252 seconds]
gverri has joined #ruby
mercwith1mouth has quit [Quit: leaving]
mercwithamouth has joined #ruby
Hanmac has quit [Ping timeout: 245 seconds]
apok has quit [Ping timeout: 272 seconds]
wuzzzzaah has quit [Ping timeout: 272 seconds]
jenrzzz has quit [Ping timeout: 244 seconds]
bricker88 has quit [Quit: Leaving.]
richwestcoast has joined #ruby
wuzzzzaah has joined #ruby
adeponte has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 276 seconds]
voodoofish430 has quit [Quit: Leaving.]
Banistergalaxy has joined #ruby
sterex has joined #ruby
Juul has quit [Ping timeout: 252 seconds]
peterpan has joined #ruby
dpk has quit [Quit: Asleep at the keyboard.]
kiler6 has joined #ruby
15SACPM77 has joined #ruby
chessguy_ has joined #ruby
chessguy_ has quit [Remote host closed the connection]
chessguy_ has joined #ruby
wuzzzzaah has quit [Ping timeout: 246 seconds]
15SACPM77 has quit [Ping timeout: 244 seconds]
havenn has quit [Remote host closed the connection]
shadoi has quit [Ping timeout: 272 seconds]
justinmcp has joined #ruby
deo has joined #ruby
kvirani has quit [Remote host closed the connection]
deo has quit [Read error: Connection reset by peer]
deo_ has joined #ruby
<RubyPanther> Convert C comments for Ruby 2 (using sed) https://gist.github.com/3671304
mwilson` has quit [Excess Flood]
mwilson` has joined #ruby
quazimodo has quit [Ping timeout: 272 seconds]
<RubyPanther> I'm compiling all kinds of extensions successfully with this sucker, even ruby-gnome2
wuzzzzaah has joined #ruby
<RubyPanther> Ruby 2 is here. It is dev but it seems to run everything.
kvirani has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
sduckett has quit [Ping timeout: 276 seconds]
Ruler_Of_Heaven_ has joined #ruby
pipopopo has quit [Ping timeout: 246 seconds]
kvirani has quit [Ping timeout: 244 seconds]
ph^ has joined #ruby
devnull_ has quit [Remote host closed the connection]
radic has quit [Disconnected by services]
radic_ has joined #ruby
chessguy_ has quit [Remote host closed the connection]
radic_ is now known as radic
ezra has joined #ruby
ezra has quit [Changing host]
ezra has joined #ruby
ph^ has quit [Ping timeout: 246 seconds]
Ruler_Of_Heaven_ has quit [Ping timeout: 255 seconds]
alvaro_o has quit [Quit: Ex-Chat]
pipopopo has joined #ruby
yasushi has joined #ruby
tyfighter has joined #ruby
yasushi has quit [Remote host closed the connection]
gverri has quit [Read error: No route to host]
gverri has joined #ruby
tyfighter has quit [Ping timeout: 240 seconds]
wuzzzzaah has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
igotnolegs has joined #ruby
shadoi has joined #ruby
seanstickle has joined #ruby
yasushi has joined #ruby
emmanuelux has quit [Quit: emmanuelux]
pu22l3r has joined #ruby
ezra has quit [Ping timeout: 276 seconds]
chrishunt has joined #ruby
maletor has joined #ruby
wuzzzzaah has joined #ruby
nateberkopec has quit [Quit: Leaving...]
krz has quit [Quit: krz]
mwilson` has quit [Excess Flood]
quazimodo has joined #ruby
mwilson` has joined #ruby
pricees has quit [Ping timeout: 240 seconds]
ezra has joined #ruby
ezra has quit [Changing host]
ezra has joined #ruby
BrokenCog has quit [Quit: leaving]
CodeFriar has joined #ruby
stabby_lambda has joined #ruby
areil has joined #ruby
mwilson` has quit [Excess Flood]
mwilson` has joined #ruby
pu22l3r has quit [Remote host closed the connection]
sduckett has joined #ruby
slyv has quit [Quit: Cya]
wpaulson has joined #ruby
replore_ has joined #ruby
artOfWar has quit [Ping timeout: 252 seconds]
wuzzzzaah has quit [Ping timeout: 255 seconds]
pskosinski has quit [Quit: http://www.redeclipse.net -- Fast-paced online FPS]
blazes816 has quit [Quit: blazes816]
wuzzzzaah has joined #ruby
pu22l3r has joined #ruby
greasegum has joined #ruby
fyolnish has joined #ruby
yubiwasabi2 has joined #ruby
fyolnish has quit [Ping timeout: 264 seconds]
stephenjudkins has quit [Quit: stephenjudkins]
charliesome has joined #ruby
banisterfiend has joined #ruby
<banisterfiend> lectrick: interesting how did you find out? :)
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
seanstickle has quit [Quit: seanstickle]
yasushi has quit [Read error: Connection reset by peer]
yasushi_ has joined #ruby
replore_ has quit [Remote host closed the connection]
richwestcoast has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 240 seconds]
riley526 has joined #ruby
ph^ has joined #ruby
nateberkopec has joined #ruby
sonkei has joined #ruby
yasushi_ has quit [Ping timeout: 244 seconds]
jenrzzz has joined #ruby
wpaulson has joined #ruby
replore_ has joined #ruby
nateberkopec has quit [Client Quit]
ezra has quit [Ping timeout: 276 seconds]
wuzzzzaah has quit [Ping timeout: 255 seconds]
gtuckerkellogg has joined #ruby
gtuckerkellogg has quit [Client Quit]
ph^ has quit [Ping timeout: 260 seconds]
wuzzzzaah has joined #ruby
sonkei has quit [Quit: Computer has gone to sleep.]
bananagram is now known as `
` is now known as bananagram
cantonic has quit [Quit: cantonic]
cantonic has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
mengu has quit [Remote host closed the connection]
emmanuelux has joined #ruby
sonkei has joined #ruby
sonkei has quit [Remote host closed the connection]
peterpan has quit [Ping timeout: 268 seconds]
peterpan has joined #ruby
sterex has quit [Quit: sterex]
mahmoudimus has joined #ruby
replore_ has quit [Remote host closed the connection]
snuglepuss has quit [Remote host closed the connection]
tommyvyo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<fowl> >>1024+512
<al2o3cr> (Fixnum) 1536
<fowl> ty
pingfloyd has joined #ruby
sambio has quit [Quit: Saliendo]
thunderstrike has quit [Remote host closed the connection]
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
AnarchoTroll has joined #ruby
greasegum has quit [Remote host closed the connection]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
slyv has joined #ruby
zii has quit [Read error: Connection reset by peer]
zii has joined #ruby
hadees has joined #ruby
clj_newb has joined #ruby
clj_newb has quit [Client Quit]
jenrzzz has joined #ruby
CodeFriar has quit [Quit: Leaving...]
peterpan has quit [Quit: leaving]
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
jarred has quit [Quit: jarred]
tk___ has joined #ruby
fyolnish_ has joined #ruby
sonkei has joined #ruby
riley526 has quit [Remote host closed the connection]
fyolnish_ has quit [Ping timeout: 246 seconds]
asklov has quit [Ping timeout: 248 seconds]
dimday has joined #ruby
Tomasso has quit [Ping timeout: 245 seconds]
yasushi has joined #ruby
dimday has quit [Ping timeout: 246 seconds]
stephenjudkins has joined #ruby
mikepack has joined #ruby
rking has quit [Read error: Connection reset by peer]
davidokner has joined #ruby
<davidokner> Hi
yubiwasabi2 has quit [Quit: Computer has gone to sleep.]
<davidokner> I'm having trouble understanding the difference between a variable and an object in practice. I understand the difference in concept, but in actual code I don't see how a variable can not be an object in some instances.
<davidokner> As I understand it a variable is just a pointer.
<davidokner> So take this example.
<davidokner> text = "#{name.capitalize} has a health of #{health}."
<davidokner> The tutorial I'm reading says that "name" is an object and "text" is a variable.
ph^ has joined #ruby
<davidokner> But, wasn't name a variable too when you created it?
<Spitfire> Everything is an object.
* Spitfire mindsplode
<davidokner> Spitfire: But what about pointers to objects.
<Spitfire> Everything is an object except pointers to objects.
<davidokner> Ok, that is what I'm trying to get the difference.
<RubyPanther> davidokner: a variable is like a pointer, but since everything is an object it is just thought of as a generic container.
<davidokner> In my tutorial is says that "text" is a variable and that "name" is an object.
<davidokner> text = "#{name.capitalize} has a health of #{health}."
<RubyPanther> So when you are using a variable, you often talk about it as "being" the object. Just as if you have a box of foo in your hand, you might point at the box and call it foo.
<davidokner> So, I never get to address the object directly then, right?
jenrzzz has quit [Ping timeout: 252 seconds]
<shadoi> it's best to think of variables as things that become objects when they are assigned.
<RubyPanther> No. Unless you're using the C API...
ph^ has quit [Ping timeout: 246 seconds]
sterex has joined #ruby
<shadoi> davidokner: in your example text becomes a string object when you assign it.
xorgnak has joined #ruby
<davidokner> shadoi: It creates a new object.
<RubyPanther> davidokner: in the example text and name are both variables, and like all variables they hold an object.
freeayu has quit [Ping timeout: 246 seconds]
<shadoi> sure, creates, becomes.
dimday has joined #ruby
<davidokner> Look at this example.
<davidokner> my_favorite_movie = "Goonies"
<RubyPanther> name.capitalize is a local variable name and the object it contains is receiving the message :capitalize, or, is having the instance method :capitalize called on it
reset has quit [Ping timeout: 276 seconds]
<davidokner> your_favorite_movie = my_favorite_movie
<davidokner> In that case you didn't create a new object you just pointed the second pointer to the same object.
<RubyPanther> But you normally don't talk about the variable, just the object, because there are no explicit pointers, which is to say, everything is pass-by-reference
freeayu has joined #ruby
<davidokner> I get it, but I'm aslo confused.
maletor has quit [Quit: Computer has gone to sleep.]
<davidokner> It is because of the example.
<RubyPanther> It sounds like the example sucks. Use _why's poignant guide, or the pickaxe book
dimday has quit [Ping timeout: 260 seconds]
<davidokner> Well the example is good. It is just that if I don't understand the underlying stuff %100 I know I don't get it.
fixl has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
slyv has quit [Quit: Cya]
sdwrage has quit [Quit: geekli.st/programmer]
chendo_ has quit [Ping timeout: 244 seconds]
<davidokner> I think remembering that when you use "=" for a string it is doing String.new() helps
<davidokner> and also calling object_id You can see that it creates a new object.
sduckett has quit [Ping timeout: 248 seconds]
<davidokner> But, if you reassign that variable to a new object, you totally lose the pointer to original object.
<fowl> davidokner: explain that bit about = doing String.new to me, never heard of that
<davidokner> If I say movie = "Goonies"
<davidokner> That is the same as saying movie = String.new("Goonies")
<davidokner> It is doing string.new . It is creating a new object and movie is pointing to that object.
<fowl> by that logic, if you do b = movies does that do b = String.new(movies)
chendo_ has joined #ruby
<davidokner> What is "movies". You didn't make it a string?
<davidokner> It is a varibale?
<davidokner> variable
ananthakumaran has joined #ruby
<fowl> movie
<fowl> my bad
<davidokner> so you are assigning the pointer/variable called movie to the pointer/variable called "b"?
sonkei has quit [Quit: Computer has gone to sleep.]
<davidokner> yes
<davidokner> Oh
<davidokner> What that would do is make "b" point to the same object that "movie" points to
<davidokner> So you would have one object and two pointers both pointing to the same object.
<fowl> yes
<davidokner> And what you do NOT have is one pointer which points to another pointer, which then points to an object. It is not a chain.
<davidokner> Which one might that is what that code would do
<davidokner> It copies by value the reference, not by reference the reference.
yasushi has quit [Remote host closed the connection]
<fowl> yea
<fowl> you understand that part pretty wellg
<davidokner> I think I do, but it still causing me to think a lot because I want to understand it
ZachBeta has joined #ruby
butblack has quit [Quit: butblack]
<davidokner> I wonder if there is a way to copy by reference the reference.
<fowl> davidokner: "" is not String.new, let me show you
<davidokner> If that is the right way to say it
<davidokner> It tested it. If it is a string you are creating it has got to be string.new
<fowl> >> def String.new() :Oh_geez end; p ["quoted string", String.new("herro")]
<al2o3cr> -e:1:in `eval': wrong number of arguments (1 for 0) (ArgumentError), from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
<fowl> >> def String.new(*) :Oh_geez end; p ["quoted string", String.new("herro")]
<al2o3cr> (Array) ["quoted string", :Oh_geez], Console: ["quoted string", :Oh_geez]
<fowl> davidokner: it is a new string, but it doesnt call String.new
<davidokner> How does it not?
<davidokner> Ok, well I think you can do the exact same thing by doing String.new("xyz")
<davidokner> movie = "Goonies" creates the same result as
<davidokner> movie = String.new("Goonies")
<davidokner> It seemed to me that ruby just allowed the shorthand.
<fowl> the same result doesnt mean they are the same thing
<banisterfiend> davidokner: do you understand the idea of an object literal?
<davidokner> I don't think I can define that
<banisterfiend> davidokner: also, do you see that String.new("Goonies") is taking a string literal "Goonies" as a parameter? :P
<davidokner> I can define string literal
maletor has joined #ruby
<davidokner> Yes
sonkei has joined #ruby
<RubyPanther> string literals are optimized, as are the string interpolations
<banisterfiend> davidokner: great, so you then see that "Goonies" is in no sense a short-hand for String.new("Goonies") as String.new("Goonies") requires the use of your so-called short-hand itself
reset has joined #ruby
<davidokner> I don't get it
<RubyPanther> String.new("foo") is actually redundant, you're creating a String instance from a literal and passing it to String.new which probably calls the #to_str on it
<charliesome> davidokner: "Goonies" is a string literal, String.new("foo") is passing a string literal to a method call on a constant
Banistergalaxy has quit [Ping timeout: 276 seconds]
<davidokner> What are you supposed to pass to string.new then?
<banisterfiend> davidokner: String.new("foo") is just the same as "foo".dup
<RubyPanther> You don't have to worry about classes being stored in constants unless you're meta-programming, you can just think of them as classes
<davidokner> Are you saying you are supposed to use single quotes in String.new ?
<davidokner> String.new('test') that is not a string literal because it is not double quotes?
<banisterfiend> davidokner: String.new() is essentially useless, forget about it
<davidokner> ok
<RubyPanther> You don't pass anything to String.new because you don't call it. You either have a string literal, or an object, and an object you would say obj.to_s not String.new(obj)
<davidokner> Ok, but I do have to realize that when you to some = "string" you are creating a new object
cantonic has quit [Quit: cantonic]
<davidokner> So if I do
<davidokner> movie = "Goonies"
<davidokner> And then.
<davidokner> my_favorite_movie = movie
moos3 has quit [Ping timeout: 240 seconds]
<davidokner> It copies by value the refence stored in the pointer "movie"
<charliesome> both of those variables are pointing to the same string object
<davidokner> Yes, I know
<davidokner> Is there a way to make on variable point to another?
<davidokner> "one variable"
<charliesome> no
<davidokner> So it would work like this.
<RubyPanther> No, it copies the reference, there is no such thing as pass-by-value in Ruby, and there are no explicit references. There is just one kind of container, variables (that come in different scopes) and their semantics can only be as references.
<davidokner> my_favorite_movie -> movie -> "Goonies"
<davidokner> instead of
<davidokner> movie -> "Goonies"
<davidokner> my_favorite_movie -> "Goonies"
tommyvyo has quit [Quit: Computer has gone to sleep.]
<charliesome> you cannot take a reference to a variable in ruby
<RubyPanther> If you want to copy a value, you can't copy a value of a reference, you don't get explicit references, and you can't copy a value, you have to call some method that creates a new object and copies the values it carries
<davidokner> You would have to copy the the reference of the variable to the other variable.
<RubyPanther> You can't copy a reference because there are no explicit references
tommyvyo has joined #ruby
<davidokner> What happens if I lose the reference to an object? Can I get back to it?
<davidokner> Say, if I had the object_id for example.
<davidokner> What happens to that object once no variable points to it anymore?
<charliesome> it gets garbage collected
<banisterfiend> davidokner: You can get it back
<davidokner> Yeah, I thoguht so
<banisterfiend> davidokner: ObjectSpace._id2ref
<RubyPanther> You normally don't say "reference" you would say, "the variable points to an instance of Foo" or some such thing. bar = foo = 42 # "foo and bar point to the same object"
mahmoudimus has joined #ruby
<RubyPanther> the _semantics_ are only by-reference, but there _are_no_references_
<banisterfiend> davidokner: that will raise an exception if that object has already been gc'd. Or you could end up with a totally different object which has been allocated the old object's id
maletor has quit [Quit: Computer has gone to sleep.]
<davidokner> oh, ok. Not a good idea
<RubyPanther> Even in the C API, you have a VALUE type and you have to call additional methods to get back a reference to a structure. On the Ruby side that is completely invisible and opaque.
<davidokner> Only solution is to change the object, instead of creating a new object with a new value and reassigning the variable to that new object.
emmanuelux has quit [Quit: emmanuelux]
<RubyPanther> davidokner: methods often change instance state in-place.
<RubyPanther> The problem is even thinking of references or copy-by-value. Better is to not even go there. You have containers, and in those containers, objects. Objects carry state.
fyolnish_ has joined #ruby
<davidokner> But, I can call a method on a variable and it will pass that method to the object
<davidokner> I start getting confused.
<banisterfiend> davidokner: think of variables as just nicknames for a person
<RubyPanther> You can always write all your Ruby in C though, if you are attached to references.
<fowl> davidokner: what's your programming background just curious
<banisterfiend> davidokner: it's the same person, just a different name for him
<davidokner> I'm not. I don't want any C.
<RubyPanther> rb_funcall(rb_mKernel,rb_intern("puts"), 1, rb_str_new2("C is fun"));
<banisterfiend> davidokner: so, okner.read_a_book() is the same as dave.read_a_book() is teh same as davidokner.read_a_book()
emmanuelux has joined #ruby
<banisterfiend> davidokner: okner, dave, davidokner are just different nicknames/names for the same dude
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
<davidokner> Different variables, that all point to the same object.
<davidokner> But that could only happend if I did.
<davidokner> dave = okner = davidokner
fyolnish_ has quit [Ping timeout: 248 seconds]
<banisterfiend> davidokner: the variables dont 'point' at anything, they're just different names for the same object. Internally, there's just a hashtable that connects a variable name to an object
kiler6 has quit [Remote host closed the connection]
<davidokner> oh ok
reset has quit [Quit: Linkinus - http://linkinus.com]
tommyvyo has quit [Quit: Computer has gone to sleep.]
noyb has joined #ruby
<davidokner> Is there any way to change an entire string, instead of just one letter like movie[0]= "L" ?
Tearan has joined #ruby
dimday has joined #ruby
<charliesome> >> a = b = "hello"; a.replace "world"; puts a; puts b
<al2o3cr> (NilClass) nil, Console: world, world
<davidokner> Ok "replace
<davidokner> So if I really wanted to change the value of a string object instead of creating a new one, I need to use "replace" method
<davidokner> I'm on the String doc page, I just couldn't find the right method
<davidokner> That seems like .replace would be a fairly common string method
<ryanf> no it's pretty unusual I think
<ryanf> it's usually better to assign a mutated version of a string locally instead of mutating the original one
<davidokner> Hmmm, I guess there is no reason to change it instead of creating a new one
<charliesome> the only good reason for abusing ruby's mutable strings is if you're appending to a buffer or something
arietis has joined #ruby
<ryanf> there is occasionally but it's usually because something else is bad IME
<RubyPanther> foo = "Hello" ; foo[0..-1] = "World" ; puts foo
<RubyPanther> World
<davidokner> I was thinking you wouldn't want to destroy that object because something else would be calling it, but that would only happen if you alliased one variable to another.
<charliesome> as a general rule.. if there's >1 reference to a string, you shouldn't mutate it
<RubyPanther> We don't normally do that, it would be silly I would just say foo = "World"
<RubyPanther> Containers are happy to hold a new value.
dimday has quit [Ping timeout: 276 seconds]
bananagram has quit [Ping timeout: 276 seconds]
<davidokner> So that would mean it is also not very common to aliase one variable to another?
mparodi has quit [Quit: Leaving]
<davidokner> Because that is the only way you would create a situation where you needed to use .replace
<charliesome> you're not aliasing one variable to another, you've just got two variables pointing to the same objecvt
<charliesome> which is fairly common
<davidokner> Ok, I guess so. But You would have to update all those variables individually.
<RubyPanther> You can't alias a variable because a variable is _only_ a container, it is not an object, and therefore it can't be pointed to
<charliesome> davidokner: there's no good reason to use String#replace really
<davidokner> So if you had a bunch of variables pointing to the same object.
stabby_lambda has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 264 seconds]
<davidokner> If you didn't use .replace, you would have to update all those variables, isntead of just updating the object once.
rmcafee has quit [Quit: rmcafee]
<charliesome> davidokner: if you're in a position where you can 'update all those variables', why don't you just have one variable
<fowl> davidokner: you would not often keep multiple references to one string, its just weird
<ryanf> yes, but it's much more common for that to be a bad thing instead of a good thing
<davidokner> Because if you created anew object all the other variables would be pointing to the old object
<fowl> totally possible, but weird
mercwithamouth has joined #ruby
<davidokner> oh ok
<ryanf> that's kind of like saying
<ryanf> if you have a bunch of variables set to 10
<ryanf> it's good to be able to change all of them to 20 at once
sonkei has quit [Quit: Computer has gone to sleep.]
<ryanf> instead of having to go around changing them separately
<RubyPanther> davidokner: You would have an object that itself had a list of these other objects, you wouldn't have a bunch of variables sitting around being important by themselves.
Bosma has joined #ruby
ph^ has joined #ruby
macmartine has joined #ruby
<davidokner> Is it really common to have a bunch of variables all pointing to the same object? Why would need more than one variable pointing to the same object?
<banisterfiend> davidokner: what's your programming background?
ZachBeta has quit [Quit: Computer has gone to sleep.]
<davidokner> I never got too deep into programming. I took a computer science degree program and they covered things like c, assembly, scheme, c++
<davidokner> I had to use pointers.
<banisterfiend> davidokner: a = "john"; def greet(name); puts "hello #{name}"; end; greet(a)
<banisterfiend> davidokner: there you have 'a' and 'name' both pointing to "john"
<banisterfiend> >> a = "john"; def greet(name); puts "hello #{name}"; end; greet(a)
<al2o3cr> (NilClass) nil, Console: hello john
macmartine has quit [Client Quit]
<banisterfiend> davidokner: so you have a degree in compsci? :P
<davidokner> I do
Smartracer has joined #ruby
<banisterfiend> well, you really should already know this stuff like the back of your hand ;)
<banisterfiend> weird
<banisterfiend> anyway bbs dinner
emmanuelux has quit [Quit: emmanuelux]
<davidokner> I don't know programming very well. But I do know about pass by reference and value.
emmanuelux has joined #ruby
<davidokner> That is why I was trying to understand what ruby is doing in terms I was familiar with.
<banisterfiend> thats kind of weird, after a degree in compsi you really should know programming pretty well
Smartracer has left #ruby [#ruby]
<davidokner> Not me, I hated it
<davidokner> Also, we never spent much time on any one thing so I never got very good at it
ph^ has quit [Ping timeout: 246 seconds]
<davidokner> And programming in c was very hard to do much
davidcelis has joined #ruby
<davidokner> Each semester was a different language or something and all different, so I couldn't really build a programming skill
<davidokner> They started out with c, then assembly, then some c++ and then scheme, then it was over.
<davidokner> A computer science program is probably the last way I could learn programming.
<davidokner> But we certainly didn't learn Ruby, so I don't know these things.
<davidokner> I did ask some general questions, but that is because I don't think the programs I wrote exposed me to the general experience of what I would encounter as a programmer outside of school.
<fowl> thats pretty crazy that you can get a degree and end up not really knowing how to program
<fowl> nice system, eh
<davidokner> It is not a software engineering degree.
<davidokner> I guess you could say I did learn how to program, but not in a very practical way you could use on a job.
ph^ has joined #ruby
digitalcakestudi has joined #ruby
<davidokner> They spend time teaching you the science behind building a shell and a lot of systems programming, not application programming.
pu22l3r has quit [Remote host closed the connection]
<davidokner> And a lot of the degree is not programming. And you learning assembly and scheme don't really help.
<davidokner> If somebody wanted to learn programming I'd suggest to study on their own and not get a degree in computer science.
<davidokner> My school didn't have a software engineering degree
Drewch has quit [Excess Flood]
<davidokner> I haven't programmed much since I graduated so I'm going back now and trying to learn the right way.
emmanuelux has quit [Quit: emmanuelux]
aristidesfl has quit []
<davidokner> We couldn't use .net, IDE's, non-basic libraries, it was not a lot of fun. Just a lot of re-inventing the wheel all the time.
<davidokner> I'm not a fan of computer science as a degree.
<davidokner> Did you all get computer science degree's?
Drewch has joined #ruby
<davidcelis> yes
eataix has joined #ruby
<davidcelis> every one of us
dimday has joined #ruby
adeponte has joined #ruby
<Hanmac1> davidokner ... for my job i learned how to write an Http server ... in C :P
Hanmac1 is now known as Hanmac
<davidokner> Any of the people asking me, did you get a degree is CS?
<davidokner> "in CS?"
<shaman42_> i did.
<shaman42_> i am doing degree in cs:go now.
<shaman42_> i have like half of the achievments already
<davidokner> At least it cost less than a CS degree
Tearan has quit [Quit: Sleepy Badger....]
<davidokner> So anyway, now I'm going to educate myself and do a better job than a CS degree could have.
<davidcelis> davidokner: cool blanket statement bro
dimday has quit [Ping timeout: 276 seconds]
sdwrage has joined #ruby
davidokner has left #ruby [#ruby]
NiteRain has joined #ruby
ph^ has quit [Remote host closed the connection]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
tk___ has quit [Quit: ばいばい]
<ryanf> this is too confusing
<ryanf> one of you get a last name with a different length
justsee has quit [Client Quit]
eataix has left #ruby [#ruby]
<Hanmac> ryanf they trying to hide they ip adress ...
<davidcelis> cool he left
<davidcelis> that guy seemed like a dick
shadoi is now known as davidmehhh
<davidmehhh> totally
davidmehhh is now known as shadoi
Bosma has quit [Quit: leaving]
<fowl> lol shaman42_
diegok has quit [Remote host closed the connection]
* Hanmac has the archivement "luck of the fool" ... :D
beneggett has joined #ruby
pdtpatrick has joined #ruby
sdwrage has quit [Quit: geekli.st/programmer]
sdwrage has joined #ruby
sdwrage has quit [Client Quit]
s1n4 has joined #ruby
keyvan has quit [Remote host closed the connection]
BigFatFatty has joined #ruby
fyolnish has joined #ruby
chimkan has quit [Quit: chimkan]
keyvan has joined #ruby
keyvan has quit [Changing host]
keyvan has joined #ruby
Banistergalaxy has joined #ruby
adeponte has quit [Remote host closed the connection]
justinmcp has quit [Remote host closed the connection]
fyolnish has quit [Ping timeout: 240 seconds]
c0rn_ has joined #ruby
keyvan has quit [Ping timeout: 245 seconds]
adeponte has joined #ruby
Banistergalaxy has quit [Ping timeout: 272 seconds]
Banistergalaxy has joined #ruby
keyvan has joined #ruby
keyvan has quit [Changing host]
keyvan has joined #ruby
banisterfiend has quit [Remote host closed the connection]
chrishunt has quit [Ping timeout: 260 seconds]
spopescu has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
answer_42 has joined #ruby
keyvan has quit [Ping timeout: 276 seconds]
tk___ has joined #ruby
mercwithamouth has quit [Ping timeout: 272 seconds]
Guest5516 has joined #ruby
fyolnish has joined #ruby
noyb has quit [Ping timeout: 252 seconds]
love_color_text has joined #ruby
Guest5516 is now known as Jackneill
Jackneill has quit [Changing host]
Jackneill has joined #ruby
nat2610 has quit [Ping timeout: 245 seconds]
SegFaultAX|work2 has joined #ruby
mucker has joined #ruby
<RubyPanther> I know a sysadmin with no degree who is a senior sysadmin at the university she once dropped out of.
<davidcelis> lol
sterex has quit [Quit: sterex]
Morkel has joined #ruby
BigFatFatty has left #ruby [#ruby]
tyfighter has joined #ruby
dimday has joined #ruby
dimday has quit [Client Quit]
dimday has joined #ruby
lightspeare has joined #ruby
lightspeare has quit [Client Quit]
<shadoi> I got mostly Fs in all my senior year of highschool and I worked at Stanford as a senior engineer. :)
doppler has joined #ruby
jenrzzz has joined #ruby
dimday has quit [Remote host closed the connection]
sterex has joined #ruby
emmanuelux has joined #ruby
<davidcelis> i got a C once...
<davidcelis> i guess
justinmcp has joined #ruby
freeayu has quit [Read error: Connection reset by peer]
<Hanmac> what kind of engineer? mechas? XD
<shadoi> title was "senior performance engineer", but basically it meant systems programmer.
yasushi has joined #ruby
<Hanmac> very cool would be some kind of factory, that can produce the parts of wich the factory is made of :P ... like a factory-factory :P
<shadoi> hehe
zii has quit [Read error: Connection reset by peer]
zii has joined #ruby
freeayu has joined #ruby
yasushi has quit [Read error: Connection reset by peer]
yasushi has joined #ruby
yasushi has quit [Remote host closed the connection]
fyolnish has quit [Remote host closed the connection]
adeponte has quit [Remote host closed the connection]
savage- has quit [Remote host closed the connection]
igotnolegs has quit [Quit: Computer has gone to sleep.]
pdtpatrick has quit [Quit: pdtpatrick]
quazimodo has quit [Ping timeout: 256 seconds]
tyfighter has quit [Quit: tyfighter]
rohit has joined #ruby
doppler has left #ruby [#ruby]
mneorr has joined #ruby
shevy has quit [Ping timeout: 268 seconds]
yasushi has joined #ruby
digitalcakestudi has quit [Ping timeout: 240 seconds]
pablo__ has joined #ruby
banisterfiend has joined #ruby
yasushi has quit [Remote host closed the connection]
mneorr has quit [Quit: Leaving.]
Banistergalaxy has quit [Ping timeout: 272 seconds]
justinmc_ has joined #ruby
Juul has joined #ruby
justinmcp has quit [Ping timeout: 244 seconds]
davidcelis has quit [Ping timeout: 276 seconds]
alanp has quit [Ping timeout: 240 seconds]
davidcelis has joined #ruby
Nanuq has quit [Ping timeout: 245 seconds]
qwerxy has joined #ruby
thone has joined #ruby
myth17 has joined #ruby
etehtsea has joined #ruby
etehtsea is now known as Guest18043
thone_ has quit [Ping timeout: 240 seconds]
ph^ has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
freeayu has quit [Quit: 离开]
alanp has joined #ruby
banisterfiend has quit [Remote host closed the connection]
LouisGB has joined #ruby
Nanuq has joined #ruby
rohit has quit [Quit: Leaving]
khakimov has quit [Quit: Computer has gone to sleep.]
prath has joined #ruby
prathi has joined #ruby
Morkel has quit [Quit: Morkel]
prathi has quit [Remote host closed the connection]
prath has quit [Read error: Connection reset by peer]
Juul has quit [Ping timeout: 246 seconds]
pingfloyd has quit [Quit: pingfloyd]
mneorr has joined #ruby
SegFaultAX|work2 has quit [Ping timeout: 248 seconds]
jakob-_ has joined #ruby
shevy2 has joined #ruby
mercwithamouth has joined #ruby
shevy2 is now known as shevy
Banistergalaxy has joined #ruby
quazimodo has joined #ruby
RudyValencia has quit [Quit: My IRC client doesn't advertise in /quit messages.]
jakob-_ has quit [Client Quit]
jakob- has joined #ruby
savage- has joined #ruby
robustus has joined #ruby
banisterfiend has joined #ruby
savage- has quit [Remote host closed the connection]
jarred has joined #ruby
yasushi has joined #ruby
jenrzzz has joined #ruby
chussenot has joined #ruby
jakob- has quit [Quit: jakob-]
justinmc_ has quit [Remote host closed the connection]
mr_dynamix has joined #ruby
mr_dynamix has quit [Client Quit]
haxrbyte has joined #ruby
haxrbyte_ has joined #ruby
c0rn_ has quit []
imami|afk is now known as banseljaj
mikepack has quit [Remote host closed the connection]
smellynoser has joined #ruby
keyvan has joined #ruby
keyvan has quit [Changing host]
keyvan has joined #ruby
kidoz has quit [Quit: Ухожу я от вас]
haxrbyte has quit [Ping timeout: 246 seconds]
alibaba1998 has joined #ruby
shadoi has quit [Quit: Leaving.]
beneggett has quit [Quit: Computer has gone to sleep.]
alibaba1998 has quit [Client Quit]
birbalucio has joined #ruby
keyvan has quit [Ping timeout: 264 seconds]
dimday has joined #ruby
znake has joined #ruby
birbalucio has quit [Client Quit]
nari has joined #ruby
dangerousdave has joined #ruby
dimday has quit [Ping timeout: 248 seconds]
justinmcp has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
mustnotfap has joined #ruby
stephenjudkins has joined #ruby
jarred has quit [Quit: jarred]
Banistergalaxy has quit [Ping timeout: 276 seconds]
zii has quit [Read error: Connection reset by peer]
zii has joined #ruby
spopescu has quit [Quit: Leaving]
stephenjudkins has quit [Read error: Connection reset by peer]
stephenjudkins has joined #ruby
stephenjudkins has quit [Client Quit]
justinmcp has quit [Remote host closed the connection]
sagax has quit [Ping timeout: 272 seconds]
qwerxy has quit [Quit: offski]
prath has joined #ruby
yasushi has quit [Remote host closed the connection]
freeayu has joined #ruby
Banistergalaxy has joined #ruby
justinmcp has joined #ruby
cazic has joined #ruby
fyolnish has joined #ruby
AnarchoTroll has quit [Ping timeout: 245 seconds]
wuzzzzaah has quit [Quit: wuzzzzaah]
fyolnish has quit [Ping timeout: 248 seconds]
keyvan has joined #ruby
keyvan has quit [Changing host]
keyvan has joined #ruby
cazic has left #ruby ["Leaving"]
love_color_text has quit [Remote host closed the connection]
chussenot has quit [Quit: chussenot]
timonv has joined #ruby
indian has quit [Read error: Operation timed out]
nari has quit [Ping timeout: 272 seconds]
ananthakumaran has quit [Ping timeout: 244 seconds]
ananthakumaran has joined #ruby
mucker has quit [Ping timeout: 276 seconds]
lkba has quit [Read error: Connection reset by peer]
mneorr has left #ruby [#ruby]
justsee has joined #ruby
quazimodo has quit [Ping timeout: 252 seconds]
znake has quit [Quit: znake]
fyolnish has joined #ruby
justinmcp has quit [Remote host closed the connection]
quazimodo has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
jwang has quit [Ping timeout: 244 seconds]
jwang has joined #ruby
Guest18043 has quit [Quit: Computer has gone to sleep.]
pskosinski has joined #ruby
tomeo has quit [Remote host closed the connection]
fyolnish has quit [Remote host closed the connection]
justinmcp has joined #ruby
deo_ has quit [Quit: Leaving]
znake has joined #ruby
diegoviola has quit [Ping timeout: 245 seconds]
chussenot has joined #ruby
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
ananthakumaran has quit [Ping timeout: 240 seconds]
diegoviola has joined #ruby
chussenot has quit [Quit: chussenot]
Virunga has joined #ruby
softy has joined #ruby
ewag has quit [Ping timeout: 252 seconds]
softy has left #ruby ["["Textual IRC Client: www.textualapp.com"]"]
rakunHo has joined #ruby
fyolnish has joined #ruby
qwerxy has joined #ruby
znake is now known as znake|away
sepp2k has joined #ruby
theRoUS has quit [Ping timeout: 268 seconds]
bigmeow has quit [Ping timeout: 276 seconds]
thaz has joined #ruby
znake|away has quit [Ping timeout: 265 seconds]
justsee has quit [Quit: Leaving...]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
headius has quit [Quit: headius]
burgestrand has joined #ruby
bigmeow has joined #ruby
wallerdev has quit [Quit: wallerdev]
znake has joined #ruby
haxrbyte_ has quit [Ping timeout: 252 seconds]
Kneferilis has quit [Disconnected by services]
bigmeow has quit [Excess Flood]
ryanf has quit [Ping timeout: 252 seconds]
justsee has quit [Quit: Leaving...]
<robustus> mh, is it possible, when writing a c extension, to call regex methods directly? (i.e. rb_reg_match_m)
<banisterfiend> robustus: if they're public sure
znake is now known as znake|away
sterex has quit [Quit: sterex]
<robustus> mh ok, then it seems, that they're not public, or i'm forgetting something
<Hanmac> hm maybe this?`rb_reg_nth_match
piotr_ has joined #ruby
<robustus> according to ruby core doc `rb_reg_match_m` is mapped to ruby method `match`
<Hanmac> rb_reg_match ?
<robustus> rb_reg_match gives `TypeError: can't convert Fixnum to String` when executed
fyolnis__ has joined #ruby
fyolnish has quit [Read error: Connection reset by peer]
smellynosery has joined #ruby
dr_bob has joined #ruby
<Hanmac> make me a pastie of your code
smellynoser has quit [Ping timeout: 244 seconds]
<robustus> ah got it, parameters in my function definition were wrong...
<Mon_Ouie> And if there's no such function created, you can just use rb_funcall
aristidesfl has joined #ruby
<robustus> mh that one i knew, but i wanted to prevent using rb_funcall if possible ;)
elaptics`away is now known as elaptics
<banisterfiend> Mon_Ouie: morning
<Mon_Ouie> 'alut
Spooner has joined #ruby
<banisterfiend> Mon_Ouie: working on any interesting programming projects recently?
bigmeow has joined #ruby
sterex has joined #ruby
Xeago has joined #ruby
baphled has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
Drakevr has quit [Ping timeout: 272 seconds]
<Mon_Ouie> Playing with elisp and ruby to render the documentation of methods, etc. in Emacs: http://uppix.net/c/1/6/03eec4ccead2d87aab2bbbcc3d06e.png
Foxandxss has joined #ruby
<Mon_Ouie> It can also evaluate expression into a live Ruby session (like C-x C-e does in lisp with Slime)
Drakevr has joined #ruby
Drakevr has quit [Changing host]
Drakevr has joined #ruby
<banisterfiend> Mon_Ouie: cool, so you have a server running in the process ?
prath is now known as prat-h_a
<Mon_Ouie> Yes
snearch has joined #ruby
workmad3 has joined #ruby
thejoecarroll has joined #ruby
smellynosery has quit [Quit: This computer has gone to sleep]
Morkel has joined #ruby
thejoecarroll has quit [Quit: Bye!]
myth17 has quit [Quit: Leaving]
workmad3 has quit [Ping timeout: 252 seconds]
areil has quit [Remote host closed the connection]
dr_bob has quit [Quit: Leaving.]
prath has joined #ruby
prat-h_a has quit [Ping timeout: 272 seconds]
wpaulson has joined #ruby
etehtsea has joined #ruby
etehtsea is now known as Guest93129
<matti> ;]
mengu has joined #ruby
ENK|2 has joined #ruby
<ENK|2> hello
<matti> Hello
<ENK|2> I try to create a model by 2 references to user "rails g model Work user:references user:references" what is te correct method to create it? (user create a work for other user)
<ENK|2> hello matti
Axsuul has quit [Ping timeout: 272 seconds]
<Spooner> ENK|2 : #rubyonrails or #rails might know better than us here.
<ENK|2> sure I try it on #rails but not resolve it :(
xnm has joined #ruby
ENK|2 is now known as Enekoos
<fowl> yrrrrrrraaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Axsuul has joined #ruby
Axsuul has quit [Excess Flood]
chussenot has joined #ruby
freeayu has quit [Quit: 离开]
Axsuul has joined #ruby
Axsuul has quit [Excess Flood]
Axsuul has joined #ruby
ryanf has joined #ruby
chussenot has quit [Remote host closed the connection]
chussenot has joined #ruby
ryanf has quit [Ping timeout: 246 seconds]
mustnotfap has quit [Quit: brb]
Rochefort has joined #ruby
<matti> Enekoos: #rubyonrails
Beoran__ has joined #ruby
chussenot has quit [Client Quit]
love_color_text has joined #ruby
<Enekoos> yes matti I'm in this channel now tanks :)
LouisGB has quit [Ping timeout: 264 seconds]
Beoran_ has quit [Ping timeout: 244 seconds]
chussenot has joined #ruby
indian has joined #ruby
zigomir has joined #ruby
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
workmad3 has joined #ruby
dpk has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
kvirani has joined #ruby
frogprince_mac has joined #ruby
justinmcp has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
emmanuelux has quit [Quit: emmanuelux]
snearch has quit [Quit: Verlassend]
seanstickle has joined #ruby
qwerxy has quit [Quit: offski]
ananthakumaran has joined #ruby
love_color_text has quit [Remote host closed the connection]
richwestcoast has joined #ruby
love_color_text has joined #ruby
Markvilla has joined #ruby
eldariof has joined #ruby
aristidesfl has quit []
indian has quit [Ping timeout: 276 seconds]
ickmund has quit [Ping timeout: 246 seconds]
LouisGB has joined #ruby
punkrawkR has joined #ruby
lkba has joined #ruby
Banistergalaxy has quit [Ping timeout: 276 seconds]
Banistergalaxy has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
justinmcp has joined #ruby
replore_ has joined #ruby
jenrzzz has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<shevy> matti, help with RubyOS pls
chussenot has quit [Quit: chussenot]
chussenot has joined #ruby
<seanstickle> RubyOS eh?
<matti> ?
<shevy> seanstickle YEAH
<shevy> with as much ruby as possible
<shevy> (and secretly C too but never admit this officially)
<matti> shevy: I am not a Ruby developer / programmer. Ask Mon_Ouie ;]
<shevy> no he speaks only french
<seanstickle> matti: you don't program in Ruby? what an odd channel for you to be on.
specialGuest has joined #ruby
specialGuest has quit [Changing host]
specialGuest has joined #ruby
<shevy> perhaps he is a #perl spy
<matti> seanstickle: I am here just because I am one of many gruppies that follow shevy
<seanstickle> Ah, that makes sense
<shevy> hmm who was the guy here who recently started with ruby, coming from perl...
<matti> I knew you'd understand.
<matti> seanstickle: I am trying to find Ruby-oriented job with very little success ;d
<matti> seanstickle: Therefore, I cannot call myself a Ruby Developer.
love_color_text has quit [Remote host closed the connection]
<charliesome> shevy: rubyos?
<matti> charliesome: shevy is insane ;d
<matti> charliesome: Just smile and wave.
<matti> ;d
<shevy> charliesome yeah, an operating system written in Ruby
<charliesome> shevy: sounds interesting, go on
lkba has quit [Ping timeout: 240 seconds]
<matti> There was an attepmpt to write one on Python some time ago.
<Mon_Ouie> matti: By that definition, I’m not developer at all :p
<seanstickle> Well, Symbolics machines had a very nice Lisp OS
<shevy> charliesome there isn't much to detail :(
<seanstickle> I don't see any reason not to have a Ruby OS
<seanstickle> It would be delightful interesting
<charliesome> i've written one for javascript
<charliesome> it was pretty fun
<matti> Mon_Ouie: Oh noes.
<matti> Mon_Ouie: ;]
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
<matti> We unedd ulsif ;d
<matti> need*
Xeago has quit [Remote host closed the connection]
diegoviola has quit [Ping timeout: 260 seconds]
LouisGB has quit []
ezra has joined #ruby
ezra has quit [Changing host]
ezra has joined #ruby
<shevy> lol
<shevy> we uneed ulsif
Morkel has quit [Quit: Morkel]
<matti> ;p
Paradox has quit [Ping timeout: 240 seconds]
Paradox has joined #ruby
Rochefortes has joined #ruby
baphled has quit [Ping timeout: 260 seconds]
Rochefort has quit [Ping timeout: 246 seconds]
lkba has joined #ruby
baphled has joined #ruby
prath has quit [Remote host closed the connection]
sagax has joined #ruby
fyolnish has joined #ruby
fyolnis__ has quit [Read error: Connection reset by peer]
arslan has joined #ruby
yasushi has joined #ruby
znake|away is now known as znake
znake has quit [Quit: znake]
arslan has left #ruby [#ruby]
baphled has quit [Ping timeout: 246 seconds]
cantonic has joined #ruby
ezra has quit [Ping timeout: 276 seconds]
Rochefortes has quit [Remote host closed the connection]
gfontenot has joined #ruby
Rochefort has joined #ruby
berkes has joined #ruby
hemanth has quit [Ping timeout: 276 seconds]
hemanth has joined #ruby
JeanMertz has joined #ruby
Xeago has joined #ruby
Markvilla has quit [Quit: Computer has gone to sleep.]
specialGuest has quit [Quit: WeeChat 0.3.8]
ezra has joined #ruby
ezra has quit [Changing host]
ezra has joined #ruby
<weeb1e> Can anyone please help me with mkmf? I can't get find_header to find the header I need to inlcude
<weeb1e> s/inlcude/include
<weeb1e> It just says "no"
olrrai has joined #ruby
olrrai has quit [Read error: Connection reset by peer]
jasonkuhrt has joined #ruby
asklov has joined #ruby
ezra has quit [Ping timeout: 276 seconds]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
Kneferilis has joined #ruby
<Kneferilis> quite new in ruby
<Kneferilis> a simple example of a class in ruby?
lesce has joined #ruby
cantonic has quit [Quit: cantonic]
<seanstickle> class Foo; end
<Hanmac> weeb1e show me your mkmf.log
banisterfiend has quit [Remote host closed the connection]
<weeb1e> Hanmac: I'm busy trying to work out how to convert a couple lines from a sample Makefile to use mkmf, can I paste you the sample Makefile?
<weeb1e> I have never used mkmf before
banisterfiend has joined #ruby
Russell^^ has joined #ruby
<Kneferilis> seanstickle: thanks, I need an example with a couple of variable and a method
<Hanmac> weeb1e when you run it, it creates an mkmf.log file ... i want this too
<weeb1e> Hanmac: Well I figured out I was doing to completely wrong, but from what I see you need to nest certain methods inside with_cppflags blocks, but I'm not exactly sure about it
<seanstickle> Kneferilis: class Foo; def bar(baz); puts baz; end; end
TheShadowFog has quit [Quit: pls respond]
<seanstickle> Kneferilis: foo = Foo.new; foo("hello")
<seanstickle> Oops
fyolnish has quit [Remote host closed the connection]
<seanstickle> Kneferilis: foo = Foo.new; foo.bar "hello"
<Hanmac> weeb1e: hm thats not the file i mean
<weeb1e> Kneferilis: It would be far faster for you to just google some simple ruby examples
<weeb1e> Hanmac: I need some pointers on how to rewrite that with mkmf, I am completely lost.
<weeb1e> Hanmac: The only thing I know how to do with mkmf is dir_config(extension_name); create_makefile(extension_name)
justsee has quit [Quit: Leaving...]
<weeb1e> Else I must drop mkmf and write the Makefile by hand, which I'd rather not do if possible...
<weeb1e> I have not been able to find many examples for mkmf
emmanuelux has joined #ruby
awarner has joined #ruby
<Hanmac> you said that find_header says no, then there must be an mkmf.log file
<weeb1e> Hanmac: It says no because I have no idea how to give it the paths that are in the sample Makefile I pasted for you...
Rochefort has quit [Remote host closed the connection]
<weeb1e> Can you please tell me how to define those include paths with mkmf?
<weeb1e> Or anyone for that matter, I'd really appreciate it if someone could point me in the right direction here...
<Hanmac> is possible use pkg_config
awarner has quit [Remote host closed the connection]
<weeb1e> Sigh, how does that help me? Do you even understand what I'm trying to do?
<weeb1e> I thought pasting you the 3 line example Makefile would make it obvious
replore_ has quit [Remote host closed the connection]
justinmcp has quit [Remote host closed the connection]
<weeb1e> I can't believe it is so hard to find out how to use mkmf to include a lib from another path, there is no real documentation or examples
<Hanmac> find_libary("name","main","/usr/lib")
<weeb1e> Bleh
<Hanmac> imo it seems that you first need to know what you realy want ... and you should notic when someone is helping you ... and mkmf is NOT designed for making Testapps ... its for c-ext
<weeb1e> If anyone here knows how to use mkmf, I would really appreciate it if you could tell me how to rewrite the following 2 lines: CPPFLAGS = -m32 -I"/path/to/header/dir" \n LDFLAGS = -m32 -ldl ../Resources/Libs/Linux32/steamclient.a
<Hanmac> i know how to use mkmf ...
Dr4g|bbs is now known as Dr4g
<weeb1e> Hanmac: I need to write an extension that uses this library, I have a 3 line Makefile for a sample application which builds fine. I cannot build my ruby extension without the above two files being included in the Makefile that mkmf builds
<weeb1e> Is that really so hard to understand?
<Hanmac> find_header("name","/path/to/header/dir")
<Hanmac> have you tryed that?
<weeb1e> Yes, it said "no"
<Hanmac> and i said you that you make me a pastie of mkmf.log
jgomez has joined #ruby
qwerxy has joined #ruby
<Kneferilis> I am building various simulation games, one is in ruby and tidesdk, is there something wrong with this code: http://pastebin.com/LHfcqSzX ?
<Mon_Ouie> The fact it uses global variables for everything
<weeb1e> Hanmac: Ah sorry, it was not a path issue. "CSteamID.h:30:22: error: iostream: No such file or directory"
<weeb1e> But I still don't know how to fix that
<weeb1e> It is a path issue, it just isn't an issue finding that header
<Hanmac> its not a path issue ... its an issue that your ruby is to dump
<weeb1e> So again, I'm pretty sure I need to use something equivalent to -m32 -I"/path/to/header/dir"
<Mon_Ouie> $rank should probably be an instance variable, @rank; $chance doesn't seem to be needed at all; $criminal should just be a local variable (again, if needed)
<seanstickle> Kneferilis: yes, don't use global variables
<Hanmac> weeb1e add with_cflags("-x c++"){ .... } around your find methods
<seanstickle> This isn't BASIC
<Kneferilis> seanstickle: I don't know how to use variables in a class
<seanstickle> Kneferilis: perhaps you should read a book on Ruby
<seanstickle> Kneferilis: this stuff isn't something you intuit from the universe
yasushi has quit [Remote host closed the connection]
<weeb1e> Hanmac: The complier failed to generate an executable file. (RuntimeError)\nYou have to install development tools first.
<weeb1e> Hanmac: Any idea what development tools I must be missing?
<Hanmac> is your g++ installed?
<weeb1e> Hanmac: g++ is already the newest version.
<Kneferilis> thanks
<Hanmac> weeb1er ruby-full is installed too?
<weeb1e> Hanmac: /tmp/ccAxRqTR.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'\ncollect2: ld returned 1 exit status
<weeb1e> That is from mkmf.log
<weeb1e> Hanmac: I installed the full ruby from source
niklasb has joined #ruby
<Hanmac> RbConfig::CONFIG["CC"] = CONFIG["CC"] = "g++"
<weeb1e> I really don't know what is causing this, but I can only assume it may be due to the missing LDFLAGS?
<weeb1e> Hanmac: That fixed it, why would that be wrong by default?
<Hanmac> because ruby1.8 is dump, and old, and will be buried in the next sommer
<weeb1e> Hanmac: But now this has broken compilation of my "hello world" extension, even when not including that libs header
<Hanmac> it need find_library too
<weeb1e> Hanmac: For the ruby include?
<Hanmac> no i mean for your steamclient.a
<weeb1e> Hanmac: Yes that will be needed to, but I'm saying even while having the libs #include commented out, my test extension no longer compiles
<weeb1e> Hanmac: error: invalid conversion from âVALUE (*)(VALUE)â to âVALUE (*)(...)â
<weeb1e> Hanmac: initializing argument 3 of âvoid rb_define_method(VALUE, const char*, VALUE (*)(...), int)â
<Mon_Ouie> You need to add explicit casts in C++
<weeb1e> It worked before changing mkmf :S
<Hanmac> Mon_Ouie, no in needs only this around RUBY_METHOD_FUNC(func)
<Mon_Ouie> Which will just add a cast
<weeb1e> I guess the with_cflags("-x c++") { } affects more than the find_header inside its block
<weeb1e> I'm not quite sure what needs to be casted
<Mon_Ouie> The 3rd argument of rb_define_method, as said in the error
<Hanmac> ruby1.9 is inteligent enough to detect C++ when you have cpp files ... ruby1.8 is far to dump
<weeb1e> I am using 1.9, not 1.8
<weeb1e> I guess I'll try find a newer example extension...
jgomez has quit [Ping timeout: 246 seconds]
bananagram has joined #ruby
<Mon_Ouie> That's not related to recency, it's related to language; it's one of the few practical examples showing that C++ is not a superset of C.
mengu has quit [Remote host closed the connection]
seanstickle has quit [Quit: seanstickle]
headius has joined #ruby
<weeb1e> Mon_Ouie: Well could you please tell me how method_test should be casted? I have hardly used C in years and C++ in even longer. rb_define_method(SteamInterface, "test", method_test, 0);
<Mon_Ouie> Just using the type indicated by the compiler error
<Mon_Ouie> Or using the macro Hanmac mentioned
<Hanmac> rb_define_method(SteamInterface, "test", RUBY_METHOD_FUNC(method_test), 0);
<Hanmac> even rdoc support RUBY_METHOD_FUNC
<weeb1e> Oh RUBY_METHOD_FUNC is a macro!
<weeb1e> That makes much more sense, thanks
workmad3 has joined #ruby
<weeb1e> Bleh, now the init function cannot be found
<weeb1e> It was found just fine before, but I assume that was because it was being built as C not C++?
<Hanmac> add extern "c" before the method
frogprince_mac has quit [Read error: Connection reset by peer]
<weeb1e> So the init function cannot be built as C++?
frogprince_mac has joined #ruby
<Hanmac> yes, but the other stuff can
<weeb1e> Hanmac: error: language string â"c"â not recognized
<weeb1e> Heh
Guest93129 has quit [Quit: Computer has gone to sleep.]
<Mon_Ouie> extern "C", capitalization matters
* weeb1e goes back to his corner
<Mon_Ouie> Also notice this directive is just about symbol name exportation, it doesn't prevent you from using C++'s features
paul_andrew has joined #ruby
<weeb1e> Right, ok
workmad3 has quit [Ping timeout: 252 seconds]
<weeb1e> Hanmac: steamclient.a isn't a header, so I can't use find_header to find it can I?
richwestcoast has quit [Read error: Connection reset by peer]
<weeb1e> I don't know how with_ldlflags could be used to find that file like you would with -ldl
<Hanmac> find_library
rippa has joined #ruby
<weeb1e> mkmf really abstracts everything :)
mroth has left #ruby [#ruby]
richwestcoast has joined #ruby
yasushi has joined #ruby
snorkdude has joined #ruby
thaz has quit [Quit: thaz]
philips_ has quit [Excess Flood]
fyolnish_ has joined #ruby
Guedes has quit [Ping timeout: 264 seconds]
philips_ has joined #ruby
Emmanuel_Chanel has quit [Quit: Leaving]
qwerxy has quit [Quit: offski]
fyolnish_ has quit [Ping timeout: 246 seconds]
kidoz has joined #ruby
stephenjudkins has joined #ruby
ttilley has quit [Ping timeout: 265 seconds]
ando has joined #ruby
Emmanuel_Chanel has joined #ruby
yasushi has quit [Remote host closed the connection]
FlyingFoXy has quit [Ping timeout: 252 seconds]
qwerxy has joined #ruby
qwerxy has quit [Client Quit]
SCommette has joined #ruby
ph^ has quit [Remote host closed the connection]
yasushi has joined #ruby
gmci has joined #ruby
ando has quit [Ping timeout: 240 seconds]
asklov has quit [Ping timeout: 240 seconds]
mparodi has joined #ruby
Jake232 has joined #ruby
Xeago has quit [Remote host closed the connection]
yasushi has quit [Ping timeout: 246 seconds]
s1n4 has quit [Quit: leaving]
sambio has joined #ruby
thaz has joined #ruby
sonkei has joined #ruby
doomMonkey has quit [Quit: Leaving]
rking has joined #ruby
Gaby_J has joined #ruby
JeanMertz has quit []
doomMonkey has joined #ruby
CoverSlide has joined #ruby
CodeFriar has joined #ruby
CarlB_the_great has joined #ruby
asklov has joined #ruby
thaz has quit [Quit: thaz]
quazimodo has quit [Ping timeout: 272 seconds]
jastix has joined #ruby
thaz has joined #ruby
snorkdude has quit [Remote host closed the connection]
sonkei has quit [Quit: Computer has gone to sleep.]
ZachBeta has joined #ruby
denysonique has quit []
berkes has quit [Quit: Ex-Chat]
thaz has quit [Client Quit]
grillo has quit [Ping timeout: 260 seconds]
yasushi has joined #ruby
Nisstyre-laptop has joined #ruby
yasushi has quit [Remote host closed the connection]
ZachBeta has quit [Client Quit]
ezra has joined #ruby
ezra has quit [Changing host]
ezra has joined #ruby
digitalcakestudi has joined #ruby
CodeFriar has quit [Quit: Leaving...]
ttilley has joined #ruby
ZachBeta has joined #ruby
fyolnish has joined #ruby
SCommette has quit [Quit: SCommette]
quazimodo has joined #ruby
grillo has joined #ruby
ezra has quit [Ping timeout: 276 seconds]
LennyLinux has joined #ruby
LennyLinux has quit [Client Quit]
SCommette has joined #ruby
centipedefarmer has joined #ruby
sonkei has joined #ruby
Lenny has joined #ruby
Lenny has quit [Client Quit]
mohit has joined #ruby
JSlenny has joined #ruby
<weeb1e> A ruby C extension should have access to LD_LIBRARY_PATH, right?
mohit has quit [Read error: Connection reset by peer]
centipedefarmer has quit [Remote host closed the connection]
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
sonkei has quit [Client Quit]
CarlB_the_great has quit [Remote host closed the connection]
asklov has quit [Ping timeout: 246 seconds]
stabby_lambda has joined #ruby
havenn has joined #ruby
cakehero has joined #ruby
<weeb1e> Hanmac: Are you still around?
<weeb1e> I am pretty sure I still need a way to add the -ldl argument from mkmf :(
<Hanmac> why do you need to play with LD_LIBRARY_PATH?
<Hanmac> weeb1e: find_library("dl","main")
<weeb1e> Hanmac: The only way the library can load the shared libraries is using LD_LIBRARY_PATH and without that -ldl arguement pointing to that .a file it is not loading the shared libraries even with LD_LIBRARY_PATH correctly set
Gaby_J has quit [Ping timeout: 245 seconds]
<weeb1e> Hanmac: That doesn't help either
etehtsea has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
<weeb1e> The make line it generates is g++ -shared -o steam_interface.so steam_interface.o -L. -L/usr/local/lib -Wl,-R/usr/local/lib -L. -rdynamic -Wl,-export-dynamic -ldl -lpthread -lrt -ldl -lcrypt -lm -lc
jasonkuhrt has quit [Quit: Leaving...]
etehtsea is now known as Guest25517
<weeb1e> That is missing "-m32 -ldl /path/to/Resources/Libs/Linux32/steamclient.a"
stabby_lambda has quit [Remote host closed the connection]
<Hanmac> you can add the stuff directly without mkmf functions $LDFLAGS << " -m32 -ldl ../Resources/Libs/Linux32/steamclient.a"
<weeb1e> Ah
horrror has joined #ruby
eldar has joined #ruby
eldariof has quit [Ping timeout: 240 seconds]
<horrror> does anybody know a good NLP lib that doesn't require JRuby?
mikepack has joined #ruby
<weeb1e> Hanmac: Then how do I add -m32 to the mkmf methods? Since now it cannot compile it as x64 with the 32bit libs
banisterfiend has joined #ruby
<Hanmac> hm yeah ... you need an x64 lib of streamclient :(
<Hanmac> horror hm i found libalglib-dev it has * Solvers (linear and "nonlinear") ... i think that is what you want?
<weeb1e> Hanmac: Why? Is ruby compiled as x64?
eldariof has joined #ruby
eldar has quit [Ping timeout: 240 seconds]
<weeb1e> Hanmac: Why exactly can't I compile the extension as m32?
Banistergalaxy has quit [Ping timeout: 264 seconds]
<Hanmac> weeb1e i think you can, but i thon think it will work ... you need libs matching your achitecture
<Hanmac> i mean i dont think it will work
ezra has joined #ruby
ezra has quit [Changing host]
ezra has joined #ruby
<weeb1e> Hanmac: Unless theres something specific about ruby extensions, it should work fine as m32, providing I can figure out how to get mkmf to build a m32 Makefile
seanstickle has joined #ruby
<weeb1e> These libs are in use right now on multiple of my x64 linux servers and work just fine
<Hanmac> debian/ubuntu has multiarch support ... that means you could run 32bit apps in a 64bit system ... but the 64binary needs 64libs and 32binary need 32libs ... it seems that you try to mix them
<weeb1e> Yeah I know that, so the question is what is ruby compiled as
<Hanmac> ruby is comiled as system arch
<Hanmac> so on a 64bit system you has "normaly" an 64bit ruby
<weeb1e> Damn, it is x86-64
<weeb1e> Well this was a huge waste of time :(
techsurvivor has quit [Ping timeout: 240 seconds]
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
<Hanmac> with a bit tricking you could install an other version ... but it may not what you want ...
jastix has quit [Ping timeout: 246 seconds]
mohits has quit [Remote host closed the connection]
elico has quit [Read error: Connection reset by peer]
elico has joined #ruby
stabby_lambda has joined #ruby
banisterfiend` has joined #ruby
horofox has joined #ruby
jgrevich has joined #ruby
banisterfiend has quit [Ping timeout: 252 seconds]
khakimov has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
banisterfiend` is now known as banisterfiend
stabby_lambda has quit [Read error: Connection reset by peer]
chimay has joined #ruby
chimay has quit [Changing host]
chimay has joined #ruby
ezra has quit [Ping timeout: 276 seconds]
crocket has joined #ruby
<crocket> When I execute "gem install bundler", an error output is generated that says "bundler requires RubyGems version >= 1.3.6"
<crocket> How can I check the version of RubyGems?
br4ndon has joined #ruby
<crocket> ok I'm installing rubygems in slackware.
noyb has joined #ruby
<shevy> crocket try gem version or gem help or gem --help
<crocket> shevy, now it's upgraded.
adeponte has joined #ruby
GoGoGarrett has joined #ruby
lesce has quit [Quit: leaving]
mucker has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
thaz has joined #ruby
rakunHo has quit [Read error: Connection reset by peer]
Cache_Money has joined #ruby
sonkei has joined #ruby
chrishunt has joined #ruby
shevy has quit [Ping timeout: 246 seconds]
shevy2 has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
lesce has joined #ruby
lesce has quit [Changing host]
lesce has joined #ruby
Nisstyre-laptop has quit [Remote host closed the connection]
tommyvyo has joined #ruby
noyb has quit [Ping timeout: 246 seconds]
banisterfiend has quit [Read error: Connection reset by peer]
asklov has joined #ruby
lesce has quit [Client Quit]
GoGoGarrett has quit [Remote host closed the connection]
havenn_ has joined #ruby
lesce has joined #ruby
lesce has quit [Changing host]
lesce has joined #ruby
banisterfiend has joined #ruby
Banistergalaxy has joined #ruby
lesce has quit [Client Quit]
lesce has joined #ruby
fyolnish has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
nucc has joined #ruby
nucc has left #ruby [#ruby]
ezra has joined #ruby
ezra has quit [Changing host]
ezra has joined #ruby
sepp2k1 has joined #ruby
spopescu has joined #ruby
<crocket> help me
sepp2k has quit [Ping timeout: 276 seconds]
GeekOnCoffee has quit [Read error: Connection reset by peer]
maletor has joined #ruby
GeekOnCo- has joined #ruby
<Hanmac> crocket whats your ruby version?
macmartine has joined #ruby
frogprince has joined #ruby
jasonkuhrt has joined #ruby
havenn has quit [Ping timeout: 244 seconds]
nucc has joined #ruby
Zespre has quit [Ping timeout: 240 seconds]
thaz has quit [Quit: thaz]
GeekOnCo- is now known as GeekOnCoffee
sonkei has quit [Quit: Computer has gone to sleep.]
frogprince_mac has quit [Ping timeout: 265 seconds]
dpk has quit [Quit: Asleep at the keyboard.]
ezra has quit [Client Quit]
lesce has quit [Quit: leaving]
lesce has joined #ruby
lesce has quit [Changing host]
lesce has joined #ruby
Zespre has joined #ruby
ezra has joined #ruby
ezra has quit [Changing host]
ezra has joined #ruby
rprime has joined #ruby
butblack has joined #ruby
cantonic has joined #ruby
richwestcoast has quit [Read error: Connection reset by peer]
nucc has left #ruby [#ruby]
machty has quit [Quit: machty]
zodiak has quit [Quit: Leaving]
tommyvyo has quit [Quit: Computer has gone to sleep.]
adeponte has quit [Remote host closed the connection]
beachandbytes has joined #ruby
GoGoGarrett has joined #ruby
gour has joined #ruby
<gour> evening
jasonkuhrt has quit [Quit: Leaving...]
<gour> i gave up using D for our multi-platform desktop app and consider using (wx)python, but wonder how does ruby compare with python3 today?
tk___ has quit [Quit: ばいばい]
<gour> any compelling reason to choose it over python?
<gour> is that wxruby's last release is from '09...
RegEchse has joined #ruby
<Hanmac> gour i was developing on an newer wx lib for ruby ... but i am not finish yet :( ... some ogre eat my time
<seanstickle> Just use Ruby and a browser
<seanstickle> Superior cross-platform experience
pdtpatrick has joined #ruby
<gour> Hanmac: wxruby seems quite deserted
<Hanmac> thats why i am begin with this https://github.com/Hanmac/rwx
<gour> seanstickle: we need more sophisticated desktop widgets...not too impressed with html5 & co.
<gour> Hanmac: do you target wx-2.9.x?
<seanstickle> Huh
<Hanmac> gour yeah thats planed
<Hanmac> but currently i an developing at this: https://github.com/Hanmac/libogre-ruby ... 3D in ruby
<gour> Hanmac: i was kind of involved with wxruby since the very beginning many years ago...i remember kevin smith was one of the main dev...
cakehero has quit [Quit: Computer has gone to sleep.]
<Hanmac> because wxruby seems dead ... and it uses swig i tryed an remake
dpk has joined #ruby
<gour> Hanmac: with swig?
<gour> is there something like cython for ruby?
nicebub has joined #ruby
<Hanmac> swig generated the binding code for you ... but i dont like that! ... because i prefer the control
* gour nods
<gour> to provide python bindings, i'd also prefer using cython than swig
beneggett has joined #ruby
mercwithamouth has quit [Ping timeout: 272 seconds]
<gour> is ruby-2.0 going to be significantly better performance-wise?
<gour> for python, i'd use cython to fill the speed-gap...what's available in ruby world?
<Hanmac> there is http://rice.rubyforge.org/ but its not soo much better than swig
<Hanmac> about 2.0 maybe i didnt try it yet ... because it is not yet released
havenn_ has quit [Remote host closed the connection]
<seanstickle> Ruby 2.0 is going to be faster than everything
theRoUS has quit [Remote host closed the connection]
<seanstickle> It will compile classes backwards in time
<seanstickle> That's how fast it is
Cache_Money has quit [Quit: Leaving]
GoGoGarrett has quit [Remote host closed the connection]
<gour> here is the quote from wxruby list: "I'm not aware of any exciting developments in the GUI libraries for Ruby in
<gour> the past few years, but I don't follow it that closely these days.
<gour> it looks main focus is RoR...
<Hanmac> hm ruby does not have a focus on RoR ... only RoR users think that ... i use ruby for 3D apps
Monie has joined #ruby
Monie has quit [Changing host]
Monie has joined #ruby
horrror has quit [Quit: horrror]
<gour> ok, my need is desktop gui app and wonder any compelling reason to use it over python, but seeing the state of gui libs, especially wxruby...
<seanstickle> Nope
<seanstickle> It's a coin toss
<seanstickle> Cross-platform single-GUI-system apps are mostly terrible anyways.
beneggett has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<seanstickle> So pick the language you like the best.
<Hanmac> wxwidgets is cool ... but i am not finish with porting :(
<nicebub> Matz has been working on mruby a lot
br4ndon has quit [Ping timeout: 244 seconds]
<Hanmac> hm mruby may be cool someday ... but not currently for me...
<nicebub> Yeah.
baphled has joined #ruby
<arubin> gour: In the Ruby world there is JRuby.
<arubin> To answer your earlier question about performance.
<nicebub> Or macruby
eroc has joined #ruby
jastix has joined #ruby
br4ndon has joined #ruby
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<Hanmac> arubin but MriRuby and Rubinius are more cool when you want C-extensions
<arubin> I did not know that "coolness" was one of the criteria.
linoj has quit [Quit: linoj]
<arubin> Rubinius also implements 1.8.7.
cakehero has joined #ruby
<Hanmac> arubin there is also rubinus for 1.9.3+ ... i think
<Hanmac> currently my gems only support mri or rubinius ... NO Jruby
syamajala has joined #ruby
wallerdev has joined #ruby
<headius> if they're C extensions, I can understand that…but if they're just Ruby there's no reason JRuby couldn't be supported
shevy2 is now known as shevy
<headius> C extensions are a blight on Ruby, if you ask me
<headius> pretty much every advancement in performance, threading, security that could be made in Ruby *can't* be done on MRI because of the C API
havenn has joined #ruby
<arubin> headius: They are a necessity if one wishes to take advantage of the thousands of C libraries out there.
chussenot has quit [Quit: chussenot]
tommyvyo has joined #ruby
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
<headius> I'm not opposed to native extensions in general…just to MRI's API for implementing them
<headius> you can use FFI today to call C libraries (in JRuby as well), and get similar performance to a C extension
<headius> and with a more reasonable C API, all Ruby impls could support native extensions
<Hanmac> headius i dont think that FFI works on C++ (and all libs i bind are in c++)
<headius> MRI's C API is the #1 thing holding Ruby back
<headius> FFI can't bind C++ classes directly, no, but a non-MRI-API C stub could wrap C++ easily…the same way you write an MRI-API extension now
<headius> i.e. write a C wrapper around the C++ that's not specific to MRI's API, and then bind it with FFI…it would work anywhere FFI works
gverri has quit [Quit: gverri]
<headius> honestly, I have no problem with native extensions and I fully recognize there's a lot of native libraries out there that are useful…but MRI's API cripples Ruby's future
nicebub has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
adeponte has joined #ruby
Enekoos has quit []
<headius> end of rant
<matti> Lol
cj3kim has quit [Quit: Leaving]
<matti> headius: ;-)
conor_ireland has joined #ruby
fyolnish has joined #ruby
workmad3 has joined #ruby
pdtpatrick has quit [Quit: pdtpatrick]
<headius> I'd actually be curious what wx lets you do that SWT doesn't do
<headius> SWT works just fine with JRuby, across platforms, with binary builds and tons of users
<seanstickle> Avoid Java, I'd reckon.
<Hanmac> i try to avoid java
<seanstickle> Boom.
<Hanmac> they keep breaking the apps ...
<headius> seanstickle: you're like…psychic
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
<arubin> Breaking which apps?
<headius> "they" "apps"?
<seanstickle> I can see 2 seconds into the future
<headius> I have no idea what that means
<seanstickle> Which is less useful psychically than you'd imagine
<headius> seanstickle: use your powers for good
<Hanmac> last time i make a patch update of java and eclipse is not working anymore ... that should NOT happen on a patch update!
fyolnish has quit [Ping timeout: 268 seconds]
<headius> reminds me of the Mitchell and Webb skit where he has telekinetic powers…but only for cookies/biscuits
<conor_ireland> I can see 2 seconds into any ruby programs future - I see it still running slowly
<headius> conor_ireland: you must not be running JRuby ;)
nucc has joined #ruby
<headius> Hanmac: good point…no other runtimes ever accidentally break
<conor_ireland> headius: No, that runs on the JVM and is a lot faster than "base" ruby
<Hanmac> conor_ireland the last time i make a test with my 3D test app i get more >200FPS
JSlenny has quit [Remote host closed the connection]
<conor_ireland> Hanmac: yep
shevy has quit [Remote host closed the connection]
PetePorty has joined #ruby
br4ndon has joined #ruby
<headius> I've got nothing against MRI…I have just seen so many potential improvements killed because they couldn't be made compatible with MRI's C API
<Hanmac> can Jruby do that too?
<headius> Hanmac: do what? 200FPS?
shevy2 has joined #ruby
<Hanmac> yeah :P
<headius> I'm sure it can…JRuby's faster than MRI, and there's several OpenGL bindings for JVM
maletor has quit [Quit: Computer has gone to sleep.]
<headius> hell, I've seen apps that didn't use OpenGL and did all rastering of 3D entirely in Ruby in JRuby get reasonable FPS
<Hanmac> opengl itself is lame ... i bind entire Graphic systems like Ogre ... including ParticleSystem or other cool stuff
fyolnish has joined #ruby
urbann has joined #ruby
<headius> there's several other GL toolkits for JVM that are more recently maintained, also
<Hanmac> hm its for java not for ruby
urbann has left #ruby [#ruby]
<arubin> Hanmac: JRuby can use Java libraries.
<PetePorty> Hey guys; objectively speaking, do you consider Ruby to be easier to use than Python? Python was the first language I managed to learn and have played with it a little; I know nothing of Ruby. Is it worth it to swap now to Ruby or should I go on until I'm proficient with Python before changing languages? Thanks in advance for your anshwers. ^_^
<headius> directly, even
<headius> calling Java libraries from JRuby is like calling any Ruby library
shevy2 is now known as shevy
<arubin> PetePorty: Which language do you think that the people in this channel prefer?
<PetePorty> Hanmac: Thanks. ^_^
<shevy> PetePorty, I think both languages are ~of similar complexity, ruby perhaps a bit more complex than python as it allows more freedom
workmad3 has quit [Ping timeout: 245 seconds]
<PetePorty> arubin: I'm assuming most people who are on IRC channels for programming languages are on more than one at a time.
<PetePorty> shevy: thanks. :)
<seanstickle> PetePorty: it doesn't really matter
<seanstickle> PetePorty: it's a coin toss
<Hanmac> PetePorty imo ruby and python are like twinsisters ... but ruby is a bit meaner :P
<PetePorty> Oh?
gverri has joined #ruby
<PetePorty> lol
<seanstickle> PetePorty: hell, pick up APL first, that's what I would recommend.
<PetePorty> O.o
lesce has quit [Quit: leaving]
fyolnish has quit [Ping timeout: 246 seconds]
<seanstickle> PetePorty: or C++ if you're more of a compiled stuff kind of person.
<seanstickle> PetePorty: and Perl has a lot of power and beauty as well.
<seanstickle> PetePorty: it doesn't really matter that much.
<PetePorty> Well, I'm an exceedingly lazy person, seeing both Python and C++ code, I decided Python seemed friendlier.
lesce has joined #ruby
<seanstickle> PetePorty: pick one, learn it, do interesting things with it.
lesce has quit [Changing host]
lesce has joined #ruby
steven- has quit [Read error: Connection reset by peer]
<arubin> gour: So to answer your question, wait a few years for Rust to mature.
steven has joined #ruby
<conor_ireland> Python has two things against it imo - passing self and whitespace
<seanstickle> Everything has some downsides.
<seanstickle> If it didn't, everyone would be using the same thing.
<PetePorty> True. :p
<shevy> no no it is not a coin toss at all
<seanstickle> Of course, part of the problem is that different people rate different things as downsides.
<shevy> the biggest difference is the philosophy
<shevy> yeah
<conor_ireland> seanstickle: two major downsides, obviously everything has downsides
<shevy> I hate explicit self
<seanstickle> I for one have no issue with the whitespace, some people think it's a real problem.
havenn has quit [Remote host closed the connection]
<seanstickle> I like typing also.
<shevy> what about explicit self?
<seanstickle> Doesn't really bother me very much.
<arubin> shevy: That seems like an incredibly minor thing to get hung up on.
<shevy> arubin I cant stand objects that aren't self-aware
<conor_ireland> what annoys me about the self is Guidos pointless answers as to why it is still in the language
<seanstickle> Closing methods with "end" struck me as VBA-like when I started with Ruby
<seanstickle> Now I don't care about that so much either
quiliro has joined #ruby
<seanstickle> I do like a nice functional language. I am less keen on OO-with-state
thaz has joined #ruby
<arubin> conor_ireland: Imagine that you are in charge of a language and all these geeks are whining about ridiculous bullshit.
<shevy> the whitespace is the only thing guido said he would do different if he were to start from zero
<seanstickle> And I love Scheme.
<conor_ireland> arubin: yeah, he is the first person to do that sure
<seanstickle> LOVE it.
<shevy> (scm('is not so bad yeah
<seanstickle> To me, it's like saying "should I learn Japanese or Icelandic?"
<seanstickle> Whichever you want, depending on what you are looking to do.
<seanstickle> Learning Icelandic to watch anime is probably a not-great choice.
mercwithamouth has joined #ruby
<arubin> seanstickle: Ruby and Python have very similar purposes though.
<shevy> why not
<seanstickle> Learning Japanese to read Sagas is a bad idea.
<shevy> anime p0rn with icebears
<quiliro> hello...can this be done in ruby and rendered on a browser by means of an http server http://ompldr.org/vZmNtNQ ?
<seanstickle> arubin: so do Japanese and Icelandic -- to talk with people
<seanstickle> :D
<arubin> seanstickle: To different people though.
lesce has quit [Quit: Leaving]
lesce_ has joined #ruby
workmad3 has joined #ruby
<shevy> quiliro that's html right?
<seanstickle> arubin: Yes, different people, different cultures.
<arubin> How about Attic Greek or Latin?
<seanstickle> arubin: much like choosing Ruby or Python
lesce_ is now known as lesce
<seanstickle> Different cultures
<quiliro> or is it possible only in javascript?
lesce has quit [Changing host]
lesce has joined #ruby
<quiliro> shevy: yes
<seanstickle> Computer languages are incidentally about talking to the machine, much more about talking to other programmers.
<seanstickle> IMO
<seanstickle> arubin: what about Attik and Latin?
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
mparodi has quit [Ping timeout: 244 seconds]
<arubin> seanstickle: I meant that perhaps they made a better analogy.
tpe11etier has joined #ruby
<arubin> Since people often learn them for similar reasons.
<shevy> quiliro the browsers only care about javascript, so you must use it
<seanstickle> arubin: could be
<seanstickle> arubin: some people are scared by ancient languages, so I don't bring them up much
<seanstickle> arubin: outside of our Other Channel
<Hanmac> seanstickle you only need latin when you want to timetravel
<arubin> seanstickle: I like to scare people.
<seanstickle> Hanmac: I need Latin on a weekly basis
<seanstickle> Hanmac: but not for time travel
<shevy> when I go buy bread I speak in latin
<seanstickle> shevy: over at Circus Circus?
<conor_ireland> I heard Latin yesterday at my Grad (in Ireland, a country which never spoke Latin)
<quiliro> shevy: can the server by the way of ruby make shapes like that and change colors while hovering on html output?
<seanstickle> conor_ireland: the Church spoke Latin quite a bit
<shevy> seanstickle hehe
<seanstickle> conor_ireland: I hear stories that the Church used to have a presence in Ireland
* Hanmac remembers that he wants to develop an new language ...
<shevy> quiliro not really... the browsers will only use javascript
<quiliro> shevy: ok thanks
<conor_ireland> seanstickle: yes, but the latin mass has been gone for years and no one in ireland spoke or heard latin in ireland outside of that 30 mins a week
banisterfiend has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 244 seconds]
<seanstickle> conor_ireland: I meant the Church officials.
<seanstickle> conor_ireland: not just the Mass
<shevy> Monty Python taught me all I have to know about the Church in Life of Brian
<seanstickle> conor_ireland: and I was mostly referring to the Middle Ages
savage- has joined #ruby
<seanstickle> conor_ireland: your lawyers don't use Latin terms?
<conor_ireland> seanstickle: in ireland? in the middle ages they mostly spoke irish afaik
<seanstickle> conor_ireland: the Church spoke in Latin for internal purposes
<seanstickle> conor_ireland: even in Ireland
<seanstickle> conor_ireland: obviously, they also spoke Irish
<conor_ireland> seanstickle: mostly irish, except when speaking to officials outside ireland
banisterfiend has joined #ruby
<conor_ireland> they even glossed latin manuscripts with irish - latin never had any real usage in ireland
digitalcakestudi has quit [Ping timeout: 246 seconds]
havenn has joined #ruby
<seanstickle> Barbarians
Bruce`Willis has joined #ruby
Bruce`Willis has left #ruby [#ruby]
<conor_ireland> we did not gather to watch men fight to the death
<arubin> Hibernia is the Classical Latin name for the island of Ireland.
<arubin> That is reason enough to use Latin!
<arubin> Look at the cool name you get!
<seanstickle> I think Cú Chulainn did most of that
<conor_ireland> arubin: we have cooler names for ireland, imo
johnlcox_ has joined #ruby
<seanstickle> Like Drunky Isle
<conor_ireland> seanstickle: fictional characters aside
<seanstickle> And Whiskeytown
johnlcox_ has quit [Client Quit]
<seanstickle> And my favorite -- Dem Der Land O' Potaters
<conor_ireland> seán, ssh
niklasb_ has joined #ruby
niklasb has quit [Ping timeout: 272 seconds]
thunderstrike has joined #ruby
maletor has joined #ruby
<seanstickle> Well, at least someone knows how to accent the name
<arubin> Hiberno-Latin, also called Hisperic Latin, was a learned sort of Latin literature created and spread by Irish monks during the period from the sixth century to the tenth century.
<seanstickle> arubin: impossible!
ryanf has joined #ruby
<seanstickle> arubin: a real leprechaun just told us that they only spoke Irish
nucc_ has joined #ruby
<conor_ireland> bi-lingualism, madness
<arubin> James Joyce's work Finnegans Wake preserves something of the spirit of Hiberno-Latin in English. In fact, book I, chapter 7 of Finnegans Wake quotes bits of the Altus prosator in an untranslatable Latin passage full of toilet humour.
<seanstickle> Oh shit, I thought this was the Other Channe
ctp has joined #ruby
<seanstickle> Channel
<seanstickle> Sorry for my rudeness
<seanstickle> In the more public channels, I try to be more polite
<seanstickle> I try to control my ríastrad
nucc has quit [Ping timeout: 240 seconds]
nucc_ is now known as nucc
<Hanmac> i want to make some "literary language" where you have symbols for "change-reading-order" ... like "when you come from left-to-right, read now up-to-down"
nucc has quit [Client Quit]
<seanstickle> "Alternate lines in boustrophedon must be read in opposite directions."
<seanstickle> How the Greeks used to roll.
mucker has quit [Ping timeout: 260 seconds]
AlbireoX has joined #ruby
<Hanmac> hm i mean like more in a maze ... like "now turn left" ... its interesting when words change the meaning with the order of symbols
thaz has quit [Quit: thaz]
<Hanmac> [Man][Door] means "Guard" but [Door][Man] means "Prisoner"
mucker has joined #ruby
adeponte has quit [Remote host closed the connection]
lesce has quit [Quit: Leaving]
tommyvyo has quit [Quit: Computer has gone to sleep.]
<AlbireoX> a
havenn_ has joined #ruby
pskosinski has quit [Remote host closed the connection]
Xeago has joined #ruby
pskosinski has joined #ruby
apok has joined #ruby
havenn_ has quit [Ping timeout: 244 seconds]
<gour> arubin: well, i had enough waiting for haskell to mature, then D...
<gour> otoh, i do not mind whitespace...although it would be nice not to use self
<arubin> gour: Rust is coming along nicely and is backed by Mozilla.
afex has joined #ruby
<arubin> gour: It is my understanding that they wish to use Rust for cross-platform work instead of C++ eventually.
<gour> arubin: but it's more system language...no GUI bindings for it
<arubin> They already have part of a rendering engine.
<arubin> gour: Not yet.
s1n4 has joined #ruby
<gour> yeah...i took brief look at it...syntax is not so thrilling...it reminds me when i was looking at ocaml
<gour> otoh, i want something higher-level than C(++)
<arubin> gour: Qt has a tool that will allow you to write applications in JavaScript.
* arubin hates to recommend JS.
ZachBeta has quit [Quit: Computer has gone to sleep.]
nucc has joined #ruby
horofox has quit [Ping timeout: 252 seconds]
nucc has left #ruby [#ruby]
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
<gour> Qt5 and their pushing of JS, is really not accoring to my taste
apok has quit [Client Quit]
nucc has joined #ruby
nucc has quit [Client Quit]
horofox has joined #ruby
jrist-afk has quit [Ping timeout: 252 seconds]
<shevy> ack
<shevy> javascript will kill ruby :(
Jake232 has quit [Quit: Computer has gone to sleep.]
jarred has joined #ruby
<gour> is delay of ruby-2.0 'cause of it? i remember talk of ruby-2.0 many years ago...
d3vic3 has joined #ruby
<shevy> dont think so
<shevy> they are just slow :)
<shevy> and I think they want to have named parameters
remi has joined #ruby
remi has quit [Changing host]
remi has joined #ruby
havenn has quit [Remote host closed the connection]
<Hanmac> ruby1.9.3 does have named parameters (or something like that) ... or the users are to dump?
<remi> is there a way to quickly create Hash with an array of keys and another array of values? Like combining [2,5,9] with [:foo, :bar:, :baz] would return { :foo => 2, :bar => 5, :baz => 9 } ?
<lupine_85> remi, not aware of anything one-step, but Array#zip and Hash[] can be combined to do it
Freijo is now known as Fraeon
<lupine_85> Hash[*([1,2,3].zip([2,4,6]))]
<remi> lupine_85: you're right, just found something on stackoverflow: http://stackoverflow.com/a/3359681/114253
<remi> thanks!
<lupine_85> :)
rippa has quit [Ping timeout: 252 seconds]
<shevy> Hanmac hash-only right?
<Hanmac> yeah
nucc has joined #ruby
rippa has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
havenn has joined #ruby
cakehero has quit [Quit: Leaving...]
timonv has quit [Remote host closed the connection]
pingfloyd has joined #ruby
horofox has quit [Ping timeout: 240 seconds]
machty has joined #ruby
burgestrand has quit [Ping timeout: 272 seconds]
bluOxigen has joined #ruby
horofox has joined #ruby
nohonor has joined #ruby
machty has quit [Client Quit]
fyolnish has joined #ruby
reuf has joined #ruby
chrishunt has quit [Quit: WeeChat 0.3.8]
gverri has quit [Quit: gverri]
reuf has quit [Client Quit]
elaptics is now known as elaptics`away
reuf_ has joined #ruby
reuf_ has quit [Read error: Connection reset by peer]
timonv has joined #ruby
GoHuyGo has joined #ruby
<GoHuyGo> Hi everyone :)
fyolnish has quit [Ping timeout: 276 seconds]
horofox has quit [Ping timeout: 272 seconds]
eroc has quit [Quit: eroc]
bananagram has quit [Ping timeout: 244 seconds]
Asher has quit [Ping timeout: 246 seconds]
doctorbh has joined #ruby
horofox has joined #ruby
pyreal has quit [Ping timeout: 244 seconds]
doctorbh is now known as pyreal
headius has quit [Quit: headius]
savage- has quit [Remote host closed the connection]
xnm has quit [Ping timeout: 276 seconds]
<Hanmac> the truth behind Siri:
<Hanmac> >> "Siri".reverse.capitalize
<al2o3cr> (String) "Iris"
fantazo has quit [Quit: Verlassend]
workmad3 has joined #ruby
<seanstickle> Iris Murdoch?
<seanstickle> That explains so much!
ZachBeta has joined #ruby
<Hanmac> seanstickle did you know that every sentence to talk to siri is monitored and analysed?
machty has joined #ruby
<seanstickle> I thought that was the point of Siri
<seanstickle> To analyze what I say
<seanstickle> Is this shocking?
chimkan_ has joined #ruby
<Hanmac> seanstickle and stored in a big database?
jgrevich_ has joined #ruby
<seanstickle> Sure.
<seanstickle> I'm sorry, am I supposed to be surprised by this?
Kneferilis has quit [Disconnected by services]
<seanstickle> I can pretend to be.
jgrevich has quit [Ping timeout: 240 seconds]
jgrevich_ is now known as jgrevich
<seanstickle> OMG, no, stored! In a database! Tell me it's not so!
banisterfiend has quit [Read error: Connection reset by peer]
<shevy> hmm
<shevy> I always wondered why making games is so hard
banisterfiend has joined #ruby
pdtpatrick has joined #ruby
xorgnak has quit [Remote host closed the connection]
<Hanmac> shevy in wich context? do you plan some game?
wallerdev has quit [Quit: wallerdev]
<shevy> Hanmac so far every time I tried, there was so much amount of work required with it that, after a while I simply gave up again :(
digitalcakestudi has joined #ruby
Virunga is now known as LennyLinux
jasonkuhrt has joined #ruby
<nohonor> you can write a decent 'snake' implementation in about 1/2 hour
jasonkuhrt has quit [Read error: Connection reset by peer]
Jake232 has joined #ruby
<Hanmac> for me i cant do graphics or music, and i am not soo good at story ... so i can only make the scripting ...
jasonkuhrt has joined #ruby
busybox42 has quit [Ping timeout: 240 seconds]
<shevy> Hanmac but the scripting logic parts also take a lot of time
<Hanmac> yeah but for me its the easy part ...
seanstickle has quit [Quit: seanstickle]
mercwithamouth has quit [Ping timeout: 252 seconds]
Tearan has joined #ruby
kidoz has quit [Read error: Connection reset by peer]
bluenemo has quit [Ping timeout: 245 seconds]
<shevy> hmm
thaz has joined #ruby
Tearan has quit [Client Quit]
eroc has joined #ruby
eroc has quit [Remote host closed the connection]
xyon has quit [Quit: WeeChat 0.3.8]
PetePorty has quit [Remote host closed the connection]
chimay has quit [Quit: WeeChat 0.3.9-rc1]
lushious has quit [Remote host closed the connection]
lushious has joined #ruby
shikamaru has quit [Quit: ZNC - http://znc.sourceforge.net]
tar_ has joined #ruby
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
shikamaru has joined #ruby
<gour> interesting post...I'm not aware of any exciting developments in the GUI libraries for Ruby in
<gour> the past few years, but I don't follow it that closely these days.
mucker has quit [Ping timeout: 252 seconds]
wallerdev has joined #ruby
<maletor> what is the major difference here? eval("User") === "User".constantize
bluenemo has joined #ruby
fbernier_ has joined #ruby
fbernier has quit [Read error: Connection reset by peer]
yubiwasabi2 has joined #ruby
thaz has quit [Quit: thaz]
<ryanf> the first one evaluates a string of any ruby code, the second one looks up a constant named "User"
beachandbytes has quit [Ping timeout: 244 seconds]
ZachBeta has quit [Quit: Computer has gone to sleep.]
johnjohnson has joined #ruby
<shevy> gour, yeah I think the ruby-GUI world is quite dead :(
Kneferilis has joined #ruby
<shevy> I partially blame the evolution of the www on that too
c0rn_ has joined #ruby
* Hanmac uses his necromatiy skills and revite his rwx brach ... someday
beachandbytes has joined #ruby
Kneferilis has quit [Quit: Page closed]
ryanf has quit [Quit: leaving]
<shevy> lol
<shevy> how can you have so much time Hanmac
<Hanmac> me is currently unemployment ...
paul_andrew has quit [Ping timeout: 268 seconds]
pdtpatrick has quit [Quit: pdtpatrick]
havenn_ has joined #ruby
<maletor> ry4nn: is the first one more suseptible to leaks of memory?
jrist-afk has joined #ruby
gfontenot has quit []
chrishunt has joined #ruby
tar_ has quit [Quit: tar_]
kidoz has joined #ruby
remi has quit [Quit: leaving]
fyolnish_ has joined #ruby
<gour> shevy: yeah...too bad...language seems to be cool otherwise...however, python is stil gui-alive
nohonor has quit [Quit: Leaving]
chimkan_ has quit [Quit: chimkan_]
havenn_ has quit [Ping timeout: 276 seconds]
havenn has quit [Remote host closed the connection]
NimeshNeema has quit [Max SendQ exceeded]
chrishunt has quit [Quit: WeeChat 0.3.8]
havenn has joined #ruby
chrishunt has joined #ruby
Guest25517 has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<shevy> Hanmac yeah but still, there is only 24 hours in a day!
<Spooner> maletor : #constantize is just a Rails helper that uses #const_get: http://api.rubyonrails.org/classes/ActiveSupport/Inflector.html#method-i-constantize - eval is a Ruby built in and just runs any Ruby code (so is completely general).
guns has joined #ruby
fyolnish_ has quit [Ping timeout: 252 seconds]
SegFaultAX has joined #ruby
<Hanmac> shevy yeah :( but you cant blame me for that
NimeshNeema has joined #ruby
jastix has quit [Quit: Leaving]
<Spooner> You supposed to develop your desktop GUI app in Rails! What ever happened to that fad? :D
<shevy> Rails is so huge
<Hanmac> maletor: "Mod::User".split("::").inject(Object,:const_get)
<shevy> it feels like its own, new language
<gour> Spooner: why not django then? ;)
<Spooner> Main problem is that it adds so much cruft that people get confused when it isn't in "vanilla" Ruby :D
havenn_ has joined #ruby
atmosx has joined #ruby
xorgnak has joined #ruby
<Spooner> Anything but web and mobile development is dead (And that is probably going to be the same thing by next week). We might as well pack up and go home.
tar_ has joined #ruby
<gour> lol
baphled has quit [Quit: leaving]
* Spooner packs up and goes home.
* gour is one of those die-hard os2 users
Tearan has joined #ruby
tar_ has quit [Client Quit]
<atmosx> Spooner: what are you developing? Desktop apps in ruby?
ananthakumaran has quit [Quit: Leaving.]
paul_andrew has joined #ruby
xorgnak has quit [Read error: Connection reset by peer]
beachandbytes has quit [Ping timeout: 255 seconds]
johnjohnson has quit []
<shevy> sad but kinda true
<shevy> the www crushed the GUIs (in ruby at least)
<shevy> I had a lot of fun with ruby-gnome ~3 years ago
<atmosx> shevy: why, there were ever guis in ruby?
* atmosx missed that part
<shevy> but I cant get the new bindings to compile at all
<shevy> yeah atmosx
<atmosx> ruby-qt?
<gour> www/mobile hype will come to an end at one point of time
<atmosx> fxruby?
<shevy> maintained by one guy
stan_man_can has joined #ruby
<shevy> fxruby abandoned 3 years ago by lyle
<atmosx> gour: ahm, hm… maybe when people have some sort of bio-tech integration with the mobile-device, in 3.050
<gour> in any case, while ruby seems to be cool, it's not option for us to replace python :-/
fsck3r has joined #ruby
<atmosx> ah, whatevah
chimkan_ has joined #ruby
<Hanmac> last commit of rwx is 4 month old ... but currently i do ogre stuff ...
<shevy> btw it is a good article by him
<shevy> it explains why many other ruby projects are also kinda dead :(
xorgnak has joined #ruby
<shevy> there would need to be more incentive to keep on maintaining and using a (ruby) project
havenn_ has quit [Remote host closed the connection]
xorgnak has quit [Remote host closed the connection]
xorgnak has joined #ruby
xorgnak has quit [Remote host closed the connection]
xorgnak has joined #ruby
mib_mib has quit [Ping timeout: 245 seconds]
<atmosx> shevy: if as he writes there's no new FOX version, why bother?
<atmosx> times are a changin'
<atmosx> anyway, I like desktop apps when run natively. if I wanted to get involved i'd start with Obje-c & cocoa, since every other env sucks big time imho wout there
dpk has quit [Quit: Asleep at the keyboard.]
lupine_85 has quit [Excess Flood]
pdtpatrick has joined #ruby
xorgnak has quit [Remote host closed the connection]
xorgnak has joined #ruby
xorgnak has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
syamajala has quit [Remote host closed the connection]
lupine_85 has joined #ruby
seanyo has joined #ruby
xorgnak has joined #ruby
xorgnak has quit [Remote host closed the connection]
xorgnak has joined #ruby
xorgnak has quit [Remote host closed the connection]
reashlin has joined #ruby
c0rn_ has quit []
<Spooner> atmosx : I am defying all common sense and developing games in Ruby. I used FXRuby back in the day to develop a couple of simple apps; miss that we don't have a (working) GUI library any more.
<atmosx> Spooner: then maybe you should also start working on a decent up-2-date gui library :-D
<reashlin> warning, n00bish ruby question inbound
<reashlin> only the first `puts One.find()` works
<Spooner> atmosx : I made one (fidgit) but it is really only designed for use in pixelly games, so not useful for anyone else. That and it is dreadful...
<reashlin> why does creating instances of Two clear all instances of One from ObjectSpace?
<atmosx> reashlin: I don't understand this part => ObjectSpace.each_object(One)
<atmosx> never saw this
* atmosx newbe as well
<Spooner> reashlin : You are creating the objects, but not preseving references to them, so they get GCed up.
mercwithamouth has quit [Ping timeout: 240 seconds]
<shevy> wow
<shevy> that is the first time I read "GCed up" as "fucked up"
<Spooner> :P
<atmosx> Spooner: I see your poinD
<shevy> hehe upcased d
<atmosx> shevy: that's what you get when you're writing game sin ruby -> Spooner
<shevy> atmosx, it is true that he abandoned fxruby because FOX was dead, but take ruby-gnome, it slowly became less and less important, because upstream changed things so quickly, and downstream, that japanese dude, just couldn't keep up with the pace on his own
mercwithamouth has joined #ruby
kaushik_ has quit [Ping timeout: 246 seconds]
<shevy> what the GUIs would have needed would have been one language alone to prevent fragmentation
<atmosx> Well since it's an open source project, *we* can't ask too much from *that japanese guy* :-P
<shevy> like javascript for the www
jrist-afk has quit [Ping timeout: 260 seconds]
Juul has joined #ruby
<shevy> yeah :(
s1n4 has quit [Quit: peace out]
<shevy> no commercial interests there
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
<atmosx> maybe Spooner should help the Japanese
<reashlin> Spooner: aah, that makes sense
<Spooner> The poor Japanese. I can't even get my own projects to work/be finished, so I wouldn't want to inflict myself on them.
<reashlin> atmosx: yeah, something I found in a guide somewhere. It's a nice syntax
fsck3r has quit [Quit: Leaving...]
<atmosx> reashlin: cool
beachandbytes has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
<Spooner> reashlin : You can use ObjectSpace.each_object(One).to_a instead the code in #find
<atmosx> guys is that the same thing: hash1 = { :key => :value} and hash2 = {key: :value} ?
<Spooner> The latter is the optional 1.9 syntax for Hashes.
<atmosx> ah cool
<Spooner> But yes, they are identical.
<atmosx> actually much cooler
<Spooner> Well, strictly for Hashes keyed by Symbol, not Hashes in general.
<reashlin> Spooner: ah yeah, this has come from some slightly more complex code
maletor has joined #ruby
shadoi has joined #ruby
jbw has quit [Read error: Operation timed out]
<Spooner> And in Ruby, we'd usually:
<Spooner> >> @foo = 1; @bar = 2; "#@foo #@bar"
<al2o3cr> (String) "1 2"
tommyvyo has quit [Read error: Connection timed out]
<Spooner> But I will stop simplifying code ;)
tommyvyo has joined #ruby
maletor has quit [Client Quit]
<reashlin> Spooner: no please continue, I'm new to the language and need to learn fast
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
BrokenCog has joined #ruby
dpk has joined #ruby
chrishunt has quit [Quit: WeeChat 0.3.8]
chrishunt has joined #ruby
pskosinski has quit [Quit: http://www.redeclipse.net -- Fast-paced online FPS]
<Spooner> reashlin : That was about all the code in the example. I won't go as far as prescribing that you use "@foo, @bar = foo.to_i, bar.to_i", though you can if you want :D
<reashlin> I would for this example, but the real code has several more arguments
thunderstrike has quit [Read error: Connection reset by peer]
<reashlin> and I'd end up with very wide code
<Spooner> Yup.
<Hanmac> >>"%<number>d // %<number>f" % {number: 5.6}
<al2o3cr> (String) "5 // 5.600000"
thunderstrike has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
qwerxy has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
gh has joined #ruby
paul_andrew has quit [Read error: Operation timed out]
horofox has quit [Quit: horofox]
gh has quit [Client Quit]
Jackneill has quit [Quit: Jackneill]
k04n has joined #ruby
k04n has quit [Client Quit]
crack_head has joined #ruby
<crack_head> I'm installing ruby...any adice on which version I should install?
<Spooner> 1.9.3 is current, crack_head
<crack_head> I've heard in the past that I should stick with 1.8
<crack_head> does that still hold true
<Spooner> "it depends"
jbw has joined #ruby
<crack_head> what does it depend on?
<GoHuyGo> I'm using 1.9.3
<GoHuyGo> works fine
<atmosx> Hanmac: is that a bot?
<atmosx> crack_head: 1.9.3
<crack_head> I'm starting fresh...so no legacy stuff
<reashlin> oh, then go for the newest
<atmosx> fresh fresh exciting
<crack_head> so fresh and so clean clean
<Spooner> There are things that don't work in it, but unless I know every thing you ever want to do, I can't promise you that you will never have problems with it. Yeah, go for 1.9.3 unless you have legacy stuff floating around.
<crack_head> could it possibly be the case that 1.8 has more support?
<Hanmac> >> "yeah i am a bot"
<al2o3cr> (String) "yeah i am a bot"
<crack_head> btw...I have a perl background...and I'm still waiting for perl 6 to be supported :/
fyolnish has joined #ruby
<shevy> lol
<Spooner> crack_head : No, 1.8 is close to losing support. 1.9.3 works fine.
<shevy> perl 6 will never happen
<shevy> for bootstrapping parrot, you need perl 5 (!!!)
<Hanmac> crack_head: ruby1.8 will die next year
<crack_head> good to know
<crack_head> 1.9.3 it is
<crack_head> !
timonv has quit [Remote host closed the connection]
ph^ has joined #ruby
fyolnish has quit [Ping timeout: 240 seconds]
qwerxy has quit [Quit: offski]
Tearan has quit [Quit: Sleepy Badger....]
br4ndon has quit [Ping timeout: 272 seconds]
<Spooner> Hanmac : 2.0 out in 6 months, in theory, so 1.9 will get thrown out too by the bleeding edge people :D
adeponte has joined #ruby
* Hanmac looks at his fingers ... yeah i am a bloody stupid bleeding edge guy :P
<Spooner> I completely avoided 1.9.1 myself. Not sure if newly released 2.0 will break so many gems. Hoping not!
<havenn> Go to 2.0 already... =O: rvm install ruby-head -n newborn
banisterfiend has joined #ruby
justinmcp has joined #ruby
atmosx_noauth has joined #ruby
atmosx has quit [Read error: Connection reset by peer]
atmosx_noauth is now known as atmosx
<arubin> Why is all of the rvm/rbenv stuff necessary in Ruby?
<arubin> Why would I not just run the latest version on my dev machine?
<arubin> And the proper tested version in prod?
<Spooner> Because people want to run more than one version of Ruby (essentially for developing backward compatible gems).
<Hanmac> arubin rvm is not necessary ...
<arubin> Spooner: Backwards compatible with 1.8?
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
<Spooner> arubin : Yep. Or with JRuby or Rubinius or whatever.
<shadoi> arubin: they're just "convenient" for tinkerers.
cakehero has joined #ruby
ph^ has quit [Remote host closed the connection]
rakl has joined #ruby
<havenn> arubin: 1.9.3, 2.0.0-dev, Rubinius, Jruby, Macruby all installed side-by-side without having to think about the annoying problems.
<atmosx> side by side
<havenn> arubin: Even if you don't use 1.8 ever!
Speed has quit [Client Quit]
<havenn> atmosx: Actually, I follow Chicago Manual of Style on IRC, so "side-by-side" is correct.
doomMonkey has quit [Ping timeout: 246 seconds]
<atmosx> good, I like Chicago Manual of Style
kidoz has quit [Quit: Ухожу я от вас]
cakehero has quit [Quit: Computer has gone to sleep.]
<atmosx> too bad the language is called 'English' and not 'Chicago' :-P haha nice one however
qwerxy has joined #ruby
bluenemo has quit [Remote host closed the connection]
sebastorama has joined #ruby
<arubin> havenn: How many Ruby developers have all of those installed? Or even need more than one version?
mercwithamouth has quit [Ping timeout: 264 seconds]
jarred has quit [Quit: jarred]
banisterfiend has quit [Read error: Connection reset by peer]
* Hanmac dont need rvm because his system ruby is the latest 1.9.3
pskosinski has joined #ruby
<arubin> I am using OS X, which does not come with 1.9.3, but I installed 1.9.3 with homebrew and put /usr/local/bin first in my path.
<arubin> I am just wondering what I am missing.
banisterfiend has joined #ruby
<matti> ;]
<Spooner> arubin : If you don't have a need for rvm (et al) then you don't need it. No problem.
<arubin> Spooner: I am just wondering why it is so frequently mentioned on so many sites.
stan_man_can has quit [Quit: stan_man_can]
<arubin> Whether there is some common problem that I have no experienced yet.
<Spooner> Well, one thing it gains is not having the gems owned by root, so you don't have to sudo everything associated with gems.
<arubin> I do not have to do that now...
Elico1 has quit [Ping timeout: 252 seconds]
paul_andrew has joined #ruby
<Hanmac> arubin because the sites wants anoy you :P
<Spooner> Although, in truth, I've mainly seen people have problems because they sudo gem when they have used rvm, which does cause all sorts of problems.
Elico1 has joined #ruby
<havenn> arubin: I like to switch my Ruby to RBX then show-source standard library methods. Nice to read the implementation of Ruby methods in Ruby rather than C.
havenn_ has joined #ruby
garndt has joined #ruby
<havenn> arubin: Then Jruby for JVM, Macruby for Cocao. And if you are a freelancer or consultant nice to have all versions ready to go.
<arubin> I suppose that I will just have to do Ruby development for a while and then perhaps it will become obvious.
AlbireoX`Laptop has joined #ruby
AlbireoX has quit [Read error: Connection reset by peer]
<Spooner> If you come to a point where you need it, then use it then. It is a good point though, since the assumption is that everyone who uses Ruby is a tinkerer, but if you aren't a tinkerer, why aren't you using Windows? :P
seanyo has quit [Ping timeout: 246 seconds]
stabby_lambda has joined #ruby
Elico1 has quit [Ping timeout: 260 seconds]
havenn_ has quit [Ping timeout: 246 seconds]
eldar has joined #ruby
<shevy> only gamers use windows
raul782 has joined #ruby
<Spooner> I use (and develop on) Windows most of the time. Amusingly, the reception that information gets from Ruby devs is very similar to the reception from C/Java devs when mentioning that I use Ruby, so pah!
qwerxy has quit [Quit: offski]
<atmosx> Spooner: is Java a programming language?
<shadoi> I think it's some sort of coffee
<atmosx> me too
<shadoi> according to teh goggles
eldariof has quit [Ping timeout: 248 seconds]
<atmosx> smells bad
Juul has quit [Ping timeout: 246 seconds]
<Spooner> atmosx : It meant Javascript :D
<atmosx> aaah
<atmosx> coffescript!
<atmosx> :-P
rippa has quit [Ping timeout: 246 seconds]
<atmosx> much more rubish looking forward to get my hands dirty with it, as long as I finnish my sinatra book!
Elico1 has joined #ruby
justinmcp has quit [Remote host closed the connection]
gmci has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
deryl has joined #ruby
cakehero has joined #ruby
jasonkuhrt has quit [Ping timeout: 244 seconds]
spupuser has joined #ruby
qwerxy has joined #ruby
robustus has quit [Quit: ZNC - http://znc.in]
eldar has quit []
adeponte has quit [Remote host closed the connection]
tehgeekmeister has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
gmci has joined #ruby
spupuser has quit [Client Quit]
rakunHo has joined #ruby
banisterfiend has joined #ruby
GoGoGarrett has joined #ruby
raul782_ has joined #ruby
raul782 has quit [Ping timeout: 246 seconds]
dangerousdave has quit [Ping timeout: 264 seconds]
havenn_ has joined #ruby
qwerxy has quit [Quit: offski]
yubiwasabi2 has quit [Quit: Computer has gone to sleep.]
ryanf has joined #ruby
rakunHo has quit [Remote host closed the connection]
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Elico1 has quit [Ping timeout: 248 seconds]
ZachBeta has joined #ruby
answer_42 has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
chrishunt has quit [Quit: Linkinus - http://linkinus.com]
chrishunt has joined #ruby
fyolnish has joined #ruby
thunderstrike has quit [Read error: Connection reset by peer]
chrishunt has quit [Client Quit]
i8igmac has joined #ruby
chrishunt has joined #ruby
d3vic3 has quit [Quit: leaving]
thunderstrike has joined #ruby
Elico1 has joined #ruby
<i8igmac> im having trouble with a http response, (Content-Type: application/x-javascript; charset=utf-8)
<i8igmac> i need to convert this payload into plain text...
<i8igmac> payload/response
<i8igmac> the response also says its Content-Encoding: gzip
explody has quit [Ping timeout: 246 seconds]
mmitchell has joined #ruby
<i8igmac> i have tried gzipreader lib but my test gives me the error of "not in gzip format"
doomMonkey has joined #ruby
fyolnish has quit [Ping timeout: 246 seconds]
butblack has quit [Quit: butblack]
havenn_ has quit [Remote host closed the connection]
Xeago has quit [Ping timeout: 246 seconds]
beachandbytes has quit [Quit: Leaving]
Elico1 has quit [Ping timeout: 246 seconds]
Tearan has joined #ruby
Elico1 has joined #ruby
chrishunt has quit [Quit: WeeChat 0.3.8]
mmitchell has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
chimkan_ has quit [Quit: chimkan_]
<karstensrage> according to the docs this should work : "foo = %{foo}" % { :foo => 'bar' }
<karstensrage> but i get
<karstensrage> ArgumentError: malformed format string - %{
<karstensrage> is that some new feature maybe not in my version of ruby?
<ryanf> what version of ruby are you using?
explody has joined #ruby
pen has joined #ruby
<karstensrage> ruby 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0]
chrishunt has joined #ruby
ph^ has joined #ruby
chrishunt has quit [Client Quit]
gour has left #ruby ["WeeChat 0.3.8"]
pen has quit [Remote host closed the connection]
chrishunt has joined #ruby
pen has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
spopescu has quit [Quit: Leaving]
dagnachewa has joined #ruby
<ryanf> oh yeah
<ryanf> that feature was added in 1.9 I think
<ryanf> or some sub-version of 1.9
yasushi has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
qwerxy has joined #ruby
alanp_ has joined #ruby
Criztian has joined #ruby
alanp has quit [Ping timeout: 255 seconds]
Elico1 has quit [Ping timeout: 264 seconds]
yasushi has quit [Ping timeout: 240 seconds]
diegoviola has joined #ruby
Elico1 has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
i8igmac has quit [Ping timeout: 245 seconds]
wpaulson has joined #ruby
havenn_ has joined #ruby
Elico1 has quit [Ping timeout: 264 seconds]
jgrevich_ has joined #ruby
hiram has joined #ruby
Elico1 has joined #ruby
blazes816 has joined #ruby
jgrevich has quit [Ping timeout: 268 seconds]
jgrevich_ is now known as jgrevich
rgs_ has quit [Quit: WeeChat 0.3.7]
baroquebobcat has joined #ruby
hiram has quit [Quit: leaving]
stabby_lambda has quit [Remote host closed the connection]
<machty> hi, is there a one-liner way to achieve the following:
<machty> messages_hash = {}
<machty> messages_array.each { |m| messages_hash[m.slug] = m }
<machty> messages_hash
tommyvyo has quit [Ping timeout: 240 seconds]
<machty> basically, create a hash from an array by using one of the element properties as the key and the element itself as teh value
<machty> i do this reasonable often
nucc has quit [Ping timeout: 244 seconds]
<ryanf> Hash[messages_array.map { |m| [m.slug, m] }]
<deryl> niice
quiliro has quit [Quit: Leaving.]
<shevy> Spooner ack... you are sitting on windows right now?
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
havenn has quit [Remote host closed the connection]
havenn_ has quit [Remote host closed the connection]
<reactormonk> machty: looks like an index... you could create a new class for that instead of some obscure code
perun has quit [Quit: Leaving]
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
tommyvyo has joined #ruby
perun has joined #ruby
fbernier_ is now known as fbernier
<machty> ryanf: what exactly is the mechanism with the square brackets? is that just some syntactic sugar to define :[] on the Hash class that constructs Hashes based on arrays?
CodeFriar has joined #ruby
bluenemo has quit [Remote host closed the connection]
jenrzzz has joined #ruby
<machty> or is it something a little lower level built into the language?
Elico1 has quit [Ping timeout: 260 seconds]
<machty> nevermind, looks like it's just a method on the Hash class
<machty> ruby doesn't like building shit into the language
Karmaon_ has joined #ruby
adeponte has joined #ruby
iszak has joined #ruby
Criztian has quit [Ping timeout: 246 seconds]
pu22l3r has joined #ruby
<Karmaon_> Hi, how would I create an array from a hash with multiple key-value pairs, such as countries = { :us => { :name => 'united states' }, :cn => { :name => 'china' } }
wpaulson has joined #ruby
<Karmaon_> actually, trying to build an array with each of the countries' names
<blazes816> like ['united states', 'china'] ?
<Karmaon_> blazes816: yes
Elico1 has joined #ruby
<Karmaon_> is country_names = []; countries.each_value { |country| country_names.push(country[:name] } the most efficient?
<blazes816> countries.map{|c| c[1][:name]}
<blazes816> >> countries = { :us => { :name => 'united states' }, :cn => { :name => 'china' } }
<al2o3cr> (Hash) {:us=>{:name=>"united states"}, :cn=>{:name=>"china"}}
<blazes816> >> countries = { :us => { :name => 'united states' }, :cn => { :name => 'china' } }; countries.map{|c| c[1][:name]}
<al2o3cr> (Array) ["united states", "china"]
<blazes816> >> countries = { :us => { :name => 'united states' }, :cn => { :name => 'china' } }; countries.map{|c| c.last[:name]}
banisterfiend has quit [Read error: Connection reset by peer]
<al2o3cr> (Array) ["united states", "china"]
bier has quit [Read error: Operation timed out]
olrrai has joined #ruby
<Karmaon_> blazes816: thanks, i was hoping for a one liner for the new array :)
<blazes816> np
banisterfiend has joined #ruby
olrrai has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
cakehero has joined #ruby
fyolnish has joined #ruby
naturehack is now known as Guest17362
Elico1 has quit [Ping timeout: 252 seconds]
fyolnish has quit [Ping timeout: 244 seconds]
mmitchell has joined #ruby
Elico1 has joined #ruby
bier has joined #ruby
ThatDudeGuy_ has joined #ruby
justsee has joined #ruby
justsee has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
cakehero has quit [Ping timeout: 244 seconds]
igotnolegs has joined #ruby
Elico1 has quit [Ping timeout: 246 seconds]
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
ryanf has quit [Quit: leaving]
mmitchell has quit [Remote host closed the connection]
mmitchell has joined #ruby
banseljaj is now known as imami|afk
slyv has joined #ruby
love_color_text has joined #ruby
seanstickle has joined #ruby
Elico1 has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
banisterfiend has quit [Read error: Connection reset by peer]
love_color_text has quit [Remote host closed the connection]
banisterfiend has joined #ruby
horofox has joined #ruby
thunderstrike has quit [Remote host closed the connection]
qwerxy has quit [Quit: offski]
RudyValencia has joined #ruby
straind has quit [Read error: Connection reset by peer]
BSaboia has joined #ruby
Elico1 has quit [Ping timeout: 276 seconds]
pu22l3r has quit [Remote host closed the connection]
ph^ has quit [Remote host closed the connection]
Elico1 has joined #ruby
raul782 has joined #ruby
raul782_ has quit [Ping timeout: 276 seconds]
cout has quit [Ping timeout: 260 seconds]
Guedes has quit [Remote host closed the connection]
David_Miller has quit [Ping timeout: 244 seconds]
cout has joined #ruby
David_Miller has joined #ruby
mahmoudimus has joined #ruby
igotnolegs has quit [Quit: Fire walk with me]
emmanuelux has quit [Ping timeout: 246 seconds]
CircleDot has joined #ruby
justinmcp has joined #ruby
havenn has joined #ruby
Elico1 has quit [Ping timeout: 246 seconds]
lupine_85 has quit [Excess Flood]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
locriani has quit [Remote host closed the connection]
centipedefarmer has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
<crocket> Hanmac, Are you there?
<crocket> I slept.
blazes816 has quit [Quit: blazes816]
Elico1 has joined #ruby
araujo has quit [Ping timeout: 252 seconds]
<crocket> ruby 1.9.1p431 (2011-02-18 revision 30908) [x86_64-linux]
justinmcp has quit [Ping timeout: 255 seconds]
lupine_85 has joined #ruby
iszak has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
LennyLinux has quit []
wchun has quit [Quit: Leaving]
BSaboia has quit [Ping timeout: 272 seconds]
love_color_text has joined #ruby
Elico1 has quit [Ping timeout: 246 seconds]
Elico1 has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
<crocket> Building ruby 1.9.3
BSaboia has joined #ruby
banisterfiend has joined #ruby
* love_color_text does the ruby build dance O-/-< O-\-< 0-|-<
noyb has joined #ruby
Asher has joined #ruby
jenrzzz has joined #ruby
Russell^^ has quit [Quit: Russell^^]
wchun has joined #ruby
zodiak has joined #ruby
<crocket> What is redis from epel?
xyon has joined #ruby
fyolnish has joined #ruby
Elico1 has quit [Ping timeout: 246 seconds]
<ThatDudeGuy_> It's a package repository run by the Fedora folks: http://fedoraproject.org/wiki/EPEL
<crocket> ThatDudeGuy_, thanks
<ThatDudeGuy_> crocket, np
<crocket> On ruby 1.9.1, "sudo -u gitlab bundle exec rake gitlab:app:setup RAILS_ENV=production" fails.
<crocket> On ruby 1.9.3, it doesn't.
wpaulson has joined #ruby
Elico1 has joined #ruby
jgrevich_ has joined #ruby
cakehero has joined #ruby
stephenjudkins has quit [Ping timeout: 272 seconds]
jgrevich has quit [Ping timeout: 252 seconds]
jgrevich_ is now known as jgrevich
BSaboia__ has joined #ruby
knightblader has joined #ruby
rubious has joined #ruby
fyolnish has quit [Ping timeout: 248 seconds]
stabby_lambda has joined #ruby
stabby_lambda has quit [Remote host closed the connection]
<crocket> damn
<crocket> debian is stuck with ruby 1.9.1
Elico1 has quit [Ping timeout: 252 seconds]
<machty> :ryanf: Hash[messages_array.map { |m| [m.slug, m] }]:
BSaboia has quit [Ping timeout: 244 seconds]
<machty> which is better, the one above, or messages_array.inject({}){|h,m| h.merge m.id => m }
stephenjudkins has joined #ruby
garndt has quit [Quit: garndt]
<arubin> crocket: The package is called 1.9.1.
<arubin> It will install 1.9.3.
<crocket> arubin, why?
<arubin> I do not know the reasons.
<arubin> Use apt-cache show.
vitor-br has quit [Ping timeout: 240 seconds]
<crocket> arubin, Version: 1.9.2.0-2
<arubin> Okay, 1.9.2.
sebastorama has quit [Quit: Bye ;)]
<arubin> I believe that the package in testing is also called 1.9.1. and installs 1.9.3.
<arubin> In the name of this package, `1.9.1' indicates the Ruby library
Elico1 has joined #ruby
<arubin> compatibility version. This package currently provides the `1.9.2'
<arubin> branch of Ruby, which is compatible with the `1.9.1' branch.