Having done both, I will vote that Ruby is much easier to extend with C than Lua.
It was also next to impossible to extend Lua in an Object Oriented way, aside from one effort that was impossibly messy and in the programmers way.
In fact, if the project/library/whatever that you want to make into an extention uses C++, you will need to create a wrapper function for every single C++ class's methods (or make them all static, boo) , because the signature for a Lua exported function must be a regular C function signature.
Not to mention that you have to get intimate with Lua's stack as you pop each of the functions arguments, etc. etc.
Ruby, writen in pure C, is possibly the most clean, and easy to extend scripting language I've seen yet. In fact when writing the extention itself, the C code almost exactly mirrors Ruby to the extent that you are basically writing Ruby code in C.
Since Lua has essentially no libraries compared to the major scripting languages, and writing exentions is painful, I don't see it hosting the next big web anything framework any time soon.
Yes but if you went to go grab the guy off the lawn to stop it from randomly shooting people, and you pick it up and it accidentally shoots someone you are going to end up in trouble with the law.
Anyway just because it's against the law doesn't mean you shouldn't do something. So I am in agreement with you anyhow.
Yeah, Ruby1.8's interpreter is quite slow. I suppose it helps that this is done by compiling to opcode with the new Ruby1.9 YARV interpreter which is a lot faster.
I for some reason still thought the bottleneck would be running those opcodes through Javascript. I always thought of Javascript on browsers as quite slow, I suppose I am really thinking of how browsers can be slow in updating the graphical parts of the DOM.
The most interesting part in the last link is that the following process:
- Ruby code in tag sent to the server via XMLHttpRequest
- Code recieved by a Ruby1.9 Cgi program.
- Cgi script compiles the code with YARV to opcodes and sends it back formatted as JSON.
- Browser takes the Ruby opcodes and translates it to javascript with HotRuby and runs it.
..is somehow 5x faster in their example than running the same ruby script on Ruby1.8 as a shell script on the commandline. Their example is incredibly simple, but I am still surprised that it wasn't 5x slower.
In any case I can't wait to be able to have all my application code written in Ruby.
My gut also tells me all these Chinese hackers stories are bullshit, but we'll have to see about that.
It would really not be hard to just *say* Chinese hackers did whatever you want and have the general population believe you, there's no need to even have proof because proof would be over most people's heads anyway.
"Super user do", sounds better than "switch user do", so from here on, that's what it's going to stand for.
I'm also changing the G in GNU to stand for GNU *is* Unix.
Good day to you.
Yeah games sure suck, that's for sure, yep, I hate every Zelda, I hate playing RTS games with my friends, I hate playing Mario Party on a friday with people, Portal is stupid. Soul Caliber is no fun, and nor is Street Fighter. I hate Puzzle Bobble/Busta Move. Tony Hawk is a waste of time, and Dance Dance Revolution is just like everything else.
Nolan Bushnell, thanks for inventing video games, but your opinion does not match mine at all, and I'm not sure where you're coming from. Some games suck and some are awesome, recognize.
Odd, I thought you could see various human light sources over the face of the earth at night, but this shot seems totally dark.
Perhaps that is only when up closer as this shot is pretty far from earth. I can't remember where I saw images showing all the night time light, but it was neat looking, and so is this image.
Speaking of this distance to resolution problem, and no I'm not trying to pull a moon landing hoax, but it would be nice to see some shots of the landing site from this probe if possible, specifically because it is non-US.
"the most secure release of Windows you can humanly make," said Ballmer. "We have had better security, we have had fewer vulnerabilities, fewer issues with Windows Vista in its first six months than any OS that preceded it.
Because hardly anyone has switched to it during these first six months?
The most secure release they can humanly make? What a claim, we'll see about that if it ever becomes something worth targeting.
They used to do that, but the difference being that they asked for your Gmail password and they would log in and yank your contact list for this purpose, and it was optional.
I feel that in that 12 year period that kids go to public school, and perhaps beyond, students should instead partake in something akin to a apprenticeship. An apprenticeship that can change according to their growing interests at some sort of interval (yearly or maybe every 3 years or something). Even if they change their minds a lot, the amount of transferable skills would make a really well rounded person, in my opinion.
Young minds can learn how to program a computer but maybe my mom or dad can't, young minds are sponges, whatever you throw at them they will learn. If a young ready to learn mind was subjected to an apprenticeship for an actual job, with enough attention, to something they were interested in at the time, everything might be less boring for everyone involved.
To think that we can get a university degree in 4 years when we are older, but not soak up something just as great when our minds are more malleable and ready to learn, is stupid. I understand that kids don't have as great of abstract thinking as adults, but there has to be some middle ground between apprenticeship and this stupid general schooling that goes on now.
The details of designing an education system in this way isn't simple but if you think people got to the moon, or planned out any other elaborate system, you might think we could do it.
Yeah I had pretty much the same reaction. That caustic edge left me wondering if maybe he was a nut case. I decided to look up his credentials on Wikipedia.
Ahh, Cory is the author of 0wnz0red. I remember reading that story and liking it a lot. I sent an email to him to thank him for releasing it for free, and he sent me back a really nice reply.
You can add my thumbs up to his credentials, whatever that may be worth.
Having done both, I will vote that Ruby is much easier to extend with C than Lua.
It was also next to impossible to extend Lua in an Object Oriented way, aside from one effort that was impossibly messy and in the programmers way.
In fact, if the project/library/whatever that you want to make into an extention uses C++, you will need to create a wrapper function for every single C++ class's methods (or make them all static, boo) , because the signature for a Lua exported function must be a regular C function signature.
Not to mention that you have to get intimate with Lua's stack as you pop each of the functions arguments, etc. etc.
Ruby, writen in pure C, is possibly the most clean, and easy to extend scripting language I've seen yet. In fact when writing the extention itself, the C code almost exactly mirrors Ruby to the extent that you are basically writing Ruby code in C.
Since Lua has essentially no libraries compared to the major scripting languages, and writing exentions is painful, I don't see it hosting the next big web anything framework any time soon.
Yes but if you went to go grab the guy off the lawn to stop it from randomly shooting people, and you pick it up and it accidentally shoots someone you are going to end up in trouble with the law.
Anyway just because it's against the law doesn't mean you shouldn't do something. So I am in agreement with you anyhow.
Never get married or have children and this can never happen to you.
Yeah, Ruby1.8's interpreter is quite slow. I suppose it helps that this is done by compiling to opcode with the new Ruby1.9 YARV interpreter which is a lot faster.
I for some reason still thought the bottleneck would be running those opcodes through Javascript. I always thought of Javascript on browsers as quite slow, I suppose I am really thinking of how browsers can be slow in updating the graphical parts of the DOM.
The most interesting part in the last link is that the following process:
..is somehow 5x faster in their example than running the same ruby script on Ruby1.8 as a shell script on the commandline. Their example is incredibly simple, but I am still surprised that it wasn't 5x slower.
- Ruby code in tag sent to the server via XMLHttpRequest
- Code recieved by a Ruby1.9 Cgi program.
- Cgi script compiles the code with YARV to opcodes and sends it back formatted as JSON.
- Browser takes the Ruby opcodes and translates it to javascript with HotRuby and runs it.
In any case I can't wait to be able to have all my application code written in Ruby.
I wouldn't.
Right, no one would ever make great software for no money.
Getting what you pay for in terms of software is an odd thing to hear from Slashdot.
My gut also tells me all these Chinese hackers stories are bullshit, but we'll have to see about that.
It would really not be hard to just *say* Chinese hackers did whatever you want and have the general population believe you, there's no need to even have proof because proof would be over most people's heads anyway.
I will quit working with the internet and computers completely if the term faceboogle becomes real industry jargon.
That article literally had no content whatsoever. In fact I think it was so content free that I might know less about how Google does security now.
Is there a page two I'm missing?
"Super user do", sounds better than "switch user do", so from here on, that's what it's going to stand for. I'm also changing the G in GNU to stand for GNU *is* Unix. Good day to you.
It's not assault when police spray crowds with water?
Only to be thwarted by needing to type the domain name anyway in the Host: http/1.1 header on every server running multiple domains.
Since when does Slashdot eat sarcasm tags?
Yeah games sure suck, that's for sure, yep, I hate every Zelda, I hate playing RTS games with my friends, I hate playing Mario Party on a friday with people, Portal is stupid. Soul Caliber is no fun, and nor is Street Fighter. I hate Puzzle Bobble/Busta Move. Tony Hawk is a waste of time, and Dance Dance Revolution is just like everything else.
Nolan Bushnell, thanks for inventing video games, but your opinion does not match mine at all, and I'm not sure where you're coming from. Some games suck and some are awesome, recognize.
Odd, I thought you could see various human light sources over the face of the earth at night, but this shot seems totally dark.
Perhaps that is only when up closer as this shot is pretty far from earth. I can't remember where I saw images showing all the night time light, but it was neat looking, and so is this image.
Speaking of this distance to resolution problem, and no I'm not trying to pull a moon landing hoax, but it would be nice to see some shots of the landing site from this probe if possible, specifically because it is non-US.
Because hardly anyone has switched to it during these first six months?
The most secure release they can humanly make? What a claim, we'll see about that if it ever becomes something worth targeting.
Right, so the radio waves from the camera have mutated them into genius tool-using crows.
They used to do that, but the difference being that they asked for your Gmail password and they would log in and yank your contact list for this purpose, and it was optional.
I feel that in that 12 year period that kids go to public school, and perhaps beyond, students should instead partake in something akin to a apprenticeship. An apprenticeship that can change according to their growing interests at some sort of interval (yearly or maybe every 3 years or something). Even if they change their minds a lot, the amount of transferable skills would make a really well rounded person, in my opinion.
Young minds can learn how to program a computer but maybe my mom or dad can't, young minds are sponges, whatever you throw at them they will learn. If a young ready to learn mind was subjected to an apprenticeship for an actual job, with enough attention, to something they were interested in at the time, everything might be less boring for everyone involved.
To think that we can get a university degree in 4 years when we are older, but not soak up something just as great when our minds are more malleable and ready to learn, is stupid. I understand that kids don't have as great of abstract thinking as adults, but there has to be some middle ground between apprenticeship and this stupid general schooling that goes on now.
The details of designing an education system in this way isn't simple but if you think people got to the moon, or planned out any other elaborate system, you might think we could do it.
Oh, until the second page, which I didn't see.
The word Linux doesn't even appear anywhere in that entire article.
Where exactly do researchers get rats with broken backs?
All religions do not marginalize women.
Ahh, Cory is the author of 0wnz0red. I remember reading that story and liking it a lot. I sent an email to him to thank him for releasing it for free, and he sent me back a really nice reply.
You can add my thumbs up to his credentials, whatever that may be worth.