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
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
<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.
<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>
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++
<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.
<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 :(
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
<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
<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
<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
<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]
<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
<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
<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?
<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
<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"
<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
<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
<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
<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]
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]
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?