thanks
from Peter (cmk...@hotmail.com)
Perhaps when Matz and the team rewrite Ruby in Ruby.
If anybody could do that... it would be them. ;-)
-Robby
--
/******************************************************
* Robby Russell, Owner.Developer.Geek
* PLANET ARGON, Open Source Solutions & Web Hosting
* Portland, Oregon | p: 503.351.4730 | f: 815.642.4068
* www.planetargon.com | www.robbyonrails.com
* Programming Rails | www.programmingrails.com
*******************************************************/
Ruby is an interpreted high level language. You can do a lot of C-like things
in Ruby, but due to performance reasons, Ruby won't replace C, at least until
we have an extremely efficient compiler. It is a perfect language for many
things however.
IIRC there is a project that allows incline C or assembly code. Someone
with more specific memory out there?
> Does ruby have linker script, so i can link any piece to a specific
> address, i need this often in driver programming.
Well, you can write C extensions. And there you can do pretty much
everything C allows (if you respect some caveats, as mem allocation etc.).
> In c, if i declare char[100], it consume 100 bytes, if in ruby, does
> it have a datatype that represent one byte? I heard everything in ruby
> is object, no exception, so the answer should be no.
This is the closest you can get
s = "\000" * 100
> Does ruby have pointer? a cpu-specific pointer? In 32 bit CPU,
> pointer is 32 bits, in 16 bit CPU, pointer is 16 bits.
No. And you don't need them and cannot use them in Ruby. You would have
to deal with this in an extension.
Kind regards
robert
RubyInline - http://rubyforge.org/projects/rubyinline/
Linux only AFAIK (at least, it doesn't work for me on WinXP + VC7)
Regards,
Sean
> Can ruby replace c ?
irb(main):001:0> i = 0; "c".upto("ruby"){ i += 1 }; p i
330639
So there are quite a few iterations left before C will become Ruby (and,
given that D has been around for quite some time and hasn’t become even
close to finished, I’m guessing that the answer is “no”),
nikolai
--
Nikolai Weibull: now available free of charge at http://bitwi.se/!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}
Windows is problematic since you'll need the compiler you built Ruby with
for the RubyInline stuff to work.
It's just fine on Mac's and other unix/linux boxen though.
>
> Regards,
>
> Sean
>
>
--
thanks,
-pate
-------------------------
> On 10/6/05, Sean O'Halpin <sean.o...@gmail.com> wrote:
>> On 10/6/05, Robert Klemme <bob....@gmx.net> wrote:
>>> IIRC there is a project that allows incline C or assembly code. Someone
>>> with more specific memory out there?
>>
>> RubyInline - http://rubyforge.org/projects/rubyinline/
>>
>> Linux only AFAIK (at least, it doesn't work for me on WinXP + VC7)
>
> Windows is problematic since you'll need the compiler you built Ruby with
> for the RubyInline stuff to work.
>
> It's just fine on Mac's and other unix/linux boxen though.
'just fine' is an understatement though- this is a seriously under-rated
project!
cheers.
-a
--
===============================================================================
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| Your life dwells amoung the causes of death
| Like a lamp standing in a strong breeze. --Nagarjuna
===============================================================================
This one really cracked me up! The first time I see a joke written in a
programming language!!!
--
Christophe Grandsire.
http://rainbow.conlang.free.fr
You need a straight mind to invent a twisted conlang.
The improvement to c++?
http://en.wikipedia.org/wiki/D_programming_language
Or Sun's (very useful right now) dtrace language also called D?
http://docs.sun.com/app/docs/doc/817-6223
I am starting to wonder what languages will look like when we hit the
Z programming language. Theoretically it is all over then, I mean we
are out of letters unless we start using Greek or Russian or Japanese
characters.
Although would you really want to program in the beta language? Or
alpha for that matter?
Mitch
On Fri, 7 Oct 2005, Mitch wrote:
> I am starting to wonder what languages will look like when we hit the
> Z programming language. Theoretically it is all over then, I mean we
> are out of letters unless we start using Greek or Russian or Japanese
> characters.
$ ruby -e 'p "Z".succ'
"AA"
:-)
David
--
David A. Black
dbl...@wobblini.net
While programming in Alpha may be problematic, when combined with Omega
it gives you a great amount of power.
#####################################################################################
This email has been scanned by MailMarshal, an email content filter.
#####################################################################################
No, it should work on Windows too provided you built your own Ruby.
You may need to set some ENV vars as well (like HOME or INLINE_DIR).
--
Eric Hodel - drb...@segment7.net - http://segment7.net
FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04
The problem appears to be that it isn't picking up msvcrt-ruby18.lib
on the LINK step. It compiles when I copy the cl command line from the
error output and add the lib like so:
cl -nologo -LD -MD -Zi -O2b2xg- -G6 -I
c:/ruby/lib/ruby/1.8/i386-mswin32 -o Inline_MyTest_cb89.so
Inline_MyTest_cb89.c msvcrt-ruby18.lib -link /INCREMENTAL:no
/EXPORT:Init_Inline_MyTest_cb89
(with c:\ruby\lib added to the LIB environment variable) but how do I
get RubyInline to do this?
Any pointers anyone? (I'd love to play with this)
Sean
http://en.wikipedia.org/wiki/B_programming_language
http://en.wikipedia.org/wiki/C_programming_language
http://en.wikipedia.org/wiki/D_programming_language
http://en.wikipedia.org/wiki/E_programming_language
http://en.wikipedia.org/wiki/F_programming_language
http://en.wikipedia.org/wiki/G_programming_language
http://en.wikipedia.org/wiki/J_programming_language
http://en.wikipedia.org/wiki/K_programming_language
http://en.wikipedia.org/wiki/L_programming_language
http://en.wikipedia.org/wiki/M_programming_language
http://en.wikipedia.org/wiki/Q_programming_language
http://en.wikipedia.org/wiki/R_programming_language
http://en.wikipedia.org/wiki/S_programming_language
http://en.wikipedia.org/wiki/T_programming_language
http://en.wikipedia.org/wiki/Z_programming_language
Also...
A+ is an APL variant
P-code is an intermediate compilation language of Pascal
U is a game programming language (Untermud/UberMud)
AFAIK only H, I, N, O, V, W, X and Y left. So we're approach a crisis akin
to IPv4. ;-)
The C builder has API to do this:
class X
inline(:C) do |builder|
builder.add_link_flags "whatever"
# ...
end
end
It is fairly well documented. Just generate the rdoc and poke around.
The better route to go is to build your own ruby and it'll pick up
all the things it needs automatically.
Read rbconfig.rb for where we get all our building information.
>
> I am starting to wonder what languages will look like when we hit the
> Z programming language. Theoretically it is all over then, I mean we
> are out of letters unless we start using Greek or Russian or Japanese
> characters.
>
Some have already started with Hebrew letters:
http://en.wikipedia.org/wiki/Alef_programming_language
(and http://en.wikipedia.org/wiki/Afnix_programming_language used to be called
Aleph)
:)
> Although would you really want to program in the beta language?
Some people would, it seems:
http://en.wikipedia.org/wiki/BETA
Or
> alpha for that matter?
>
Can't find Alpha but Alphard exists:
http://en.wikipedia.org/wiki/Alphard_programming_language
Anyway, since we have Unicode we shouldn't feel limited to the Latin alphabet.
Let's make a language named after a Tibetan letter! ;)
--
Christophe.
http://rainbow.conlang.free.fr
It takes a straight mind to create a twisted conlang.
Thanks - those are just the pointers I needed.
Sean
> Although would you really want to program in the beta language?
Yes, it is actually very nice. If it were more widespread, I'd
probably still program in it. It has some nice syntactic sugar.
Patrick
M> Which D language?
M> The improvement to c++?
M> http://en.wikipedia.org/wiki/D_programming_language
M> Or Sun's (very useful right now) dtrace language also called D?
M> http://docs.sun.com/app/docs/doc/817-6223
M> I am starting to wonder what languages will look like when we hit the
M> Z programming language. Theoretically it is all over then, I mean we
M> are out of letters unless we start using Greek or Russian or Japanese
M> characters.
Z does exist but is a program specification language, a terrible thing
that you learn in university. Eiffel is a real language based on Z. So
we are just adding one or two more letters to the language name.
--
Best regards, emailto: scholz at scriptolutions dot com
Lothar Scholz http://www.ruby-ide.com
CTO Scriptolutions Ruby, PHP, Python IDE 's
second that! The painful memories of Z (only two lectures, but it was
awful)
Kev
>
> Z does exist but is a program specification language, a terrible thing
> that you learn in university. Eiffel is a real language based on Z. So
> we are just adding one or two more letters to the language name.
>
So *that's* why I found Eiffel so awful when I looked at it!
For what is worth, I'm looking at Sather right now. It is inspired from Eiffel
(up to its name, referring to the Sather tower of Berkeley :) ), but has
derived away from it, and adopted many nice ideas like iterator methods,
closures, etc... that make it look a bit like Ruby. Actually, Sather looks
quite a bit like Ruby, with the main difference being that it is statistically
typed. I often find conventions used by Ruby that are used by Sather too,
although not always for the same use (for instance, Sather uses the ! character
at the end of some methods, but it uses it for iterators rather than for
destructive methods). Method names are often similar to those used in Ruby.
All in all Sather is quite an interesting language from a Ruby point of view.
Too bad that its community is non-existent (although the official compiler, GNU
Sather, is still reasonably supported, last update being in June of this year).
> En réponse à Nikolai Weibull :
>>
>>>Can ruby replace c ?
>> irb(main):001:0> i = 0; "c".upto("ruby"){ i += 1 }; p i
>> 330639
>> So there are quite a few iterations left before C will become Ruby
>> (and,
>> given that D has been around for quite some time and hasn’t become even
>> close to finished, I’m guessing that the answer is “no”),
>> nikolai
>>
>
> This one really cracked me up! The first time I see a joke written in
> a programming language!!!
irb(main):002:0> "c".gsub!(/ruby/, "replacement")
=> nil
No, ruby can not replace c.
> Christophe Grandsire.
--
Christian Neukirchen <chneuk...@gmail.com> http://chneukirchen.org
I'm not familiar with statistical typing. Does this mean that the
compiler guesses a variable's type based on a random sample of similar
variables from previous programs? :-)
> >
> > Actually, Sather looks
> > quite a bit like Ruby, with the main difference being that it is
> statistically
> > typed.
>
> I'm not familiar with statistical typing. Does this mean that the
> compiler guesses a variable's type based on a random sample of similar
> variables from previous programs? :-)
>
LOL! Oops! I naturally meant *statically* typed (never do five things at the
same time!), although I must say I like the idea of statistical typing the way
you describe it ;) . I foresee nice derivatives like fashionable typing (a
variable gets the type the majority of variables get at a certain time), ghetto
typing (the variable gets the type of variables that look like it in similar
programs) or rebel typing (the variable gets a completely different and if
possible opposite type from similar variables in classes in the inheritance
chain of the variable's class ;) ).
And they said Intercal was difficult ;) .
>I'm not familiar with statistical typing. Does this mean that the
>compiler guesses a variable's type based on a random sample of similar
>variables from previous programs? :-)
>
>
Somewhat related:
http://p-nand-q.com/humor/programming_languages/java2k.html
Devin
CG> All in all Sather is quite an interesting language from a Ruby point of view.
CG> Too bad that its community is non-existent (although the official compiler, GNU
CG> Sather, is still reasonably supported, last update being in June of this year).
Because it was never useable in practice. A very bad compiler for
practical use and no libraries. It was always nothing more then a
research project from one professor and his small group.
> Which D language?
>
> The improvement to c++?
> http://en.wikipedia.org/wiki/D_programming_language
>
> Or Sun's (very useful right now) dtrace language also called D?
> http://docs.sun.com/app/docs/doc/817-6223
>
> I am starting to wonder what languages will look like when we hit the
> Z programming language.
> Theoretically it is all over then, I mean we
> are out of letters unless we start using Greek or Russian or Japanese
> characters.
I think I've seen a language called "ya" already, which would be a
cyrillic letter...
> Although would you really want to program in the beta language? Or
> alpha for that matter?
Beta isn't that bad, but I prefer the Smalltalk-OO,
http://www.daimi.au.dk/~beta/
Alpha sounds more like assembler to me. ;-)
I guess we really need to switch over to spy-related themes for naming
programming languages. :-)
> Mitch
And the best known one in the US, thanks to a chain store called "Toys
ya Us" :)
martin