Question to all you newbies (others welcome)

P

Phillip Gawlowski

James said:
Granted. But one should keep in mind that, most often, the person on
the receiving end of such critique are short on time, and if someone has
the time and experience to assembled a lengthy list of alleged problems,
then offering some sort of solution for them seems reasonable.

Of course. At least ideas, and technical solutions (unless the expertise
isn't there, but that is difficult to check), should be part of a
thought out critique. At least, that is what I understand when using
"thought out".

Unless I can't offer arguments or ideas, I don't criticize, but offer
suggestions.


--
Phillip "CynicalRyan" Gawlowski
http://cynicalryan.110mb.com/

Rule of Open-Source Programming #4:

If you don't work on your project, chances are that no one will.
 
B

bino_oetomo

Dear Experts.

I come from LEAF user community.

I'm a damn stupid newbie about RUBY.
I just impresed by someone who post about how easy to write a JABBER client
using ruby.

Since I come from a community of users of Small linux distro, my concern is
about a micro Ruby "distro" (maybe like Micro Perl)

So Here is my question :

1. Is there anyone can give me a list of extremely minimal files that have
to be compiled to got ruby core interreter work properly ?
2. What is the minimal libs have to be loaded/compiled to write :
++ Jabber client
++ BASH similar : Cat, Cut, sed

I'm intended to compile of that minimal files with uCLib .. and may be
create a "*.lrp" package for the LEAF community.

Sincerely
-bino-
 
B

Brian Candler

Since I come from a community of users of Small linux distro, my concern is
about a micro Ruby "distro" (maybe like Micro Perl)

So Here is my question :

1. Is there anyone can give me a list of extremely minimal files that have
to be compiled to got ruby core interreter work properly ?
2. What is the minimal libs have to be loaded/compiled to write :
++ Jabber client
++ BASH similar : Cat, Cut, sed

I'm intended to compile of that minimal files with uCLib .. and may be
create a "*.lrp" package for the LEAF community.

A full Ruby distribution is about one-third of the size of a base Perl
distribution, and yet includes a lot of stuff missing from base Perl (such
as openssl libraries)

Now, I can't give you an exact answer to your question. If you look at
ext/Setup you'll see a bunch of 'optional' C libraries you can disable or
enable. You can leave them all disabled of course, but things like 'socket'
would be important for network clients.

However, most of the libraries supplied with Ruby are written in Ruby.
You'll have to look at the sizes of them and decide which you want to leave
out. If you don't want an XML parser, then you can leave out REXML (but then
again, Jabber is an XML-based protocol I believe).

Regards,

Brian.
 
A

Alex Young

bino_oetomo said:
Dear Experts.

I come from LEAF user community.

I'm a damn stupid newbie about RUBY.
I just impresed by someone who post about how easy to write a JABBER client
using ruby.

Since I come from a community of users of Small linux distro, my concern is
about a micro Ruby "distro" (maybe like Micro Perl)

So Here is my question :

1. Is there anyone can give me a list of extremely minimal files that have
to be compiled to got ruby core interreter work properly ?
I can't answer this directly, but you may wish to see how Debian have
handled this - they've split Ruby up into several different packages for
(as far as I know) precisely this purpose.
 
A

Alexey Verkhovsky

how Debian have
handled this - they've split Ruby up into several different packages

Yeah, without providing a dependency package that just installs
EVERYTHING. Thereby creating a big maintenance headache for every Ruby
application out there. Grr...
 
M

M. Edward (Ed) Borasky

Alex said:
I can't answer this directly, but you may wish to see how Debian have
handled this - they've split Ruby up into several different packages
for (as far as I know) precisely this purpose.
Well ... I know nothing about LEAF. :) But here's a few hints that might
jog someone's memory.

1. During the course of installing Perl from source, an entity called
"Mini Perl" (Minnie Pearl??) is generated. miniperl is used to bootstrap
the install and is, I think, still resident on your system when the full
Perl install has completed.

2. During the course of installing Ruby from source, there is a
"miniruby" built with similar uses. I don't remember whether miniruby
still exists after the install is done.

3. Micro Perl, on the other hand, is a separate project. It is a
stripped down Perl interpreter suitable for usage on "embedded" systems.
It has its own web site.

4. As far as I know, there is no "Micro Ruby" project, although I think
it's a great idea for someone who's into such things.

So for the original poster, I'd start by downloading the source Ruby
distribution and doing "configure", "make" and "make install" and
capture the log files of the operations. You'll see "miniperl" go by,
and you can figure out how it's built, what it's used for and where it
ends up. Or maybe someone else on the list can pick up where my
knowledge leaves off. I haven't dug into this because I'm doing other
things. :)
 
K

Kristoffer Lundén

T24gNC84LzA3LCBBbGV4ZXkgVmVya2hvdnNreSA8YWxleGV5LnZlcmtob3Zza3lAZ21haWwuY29t
PiB3cm90ZToKPiBPbiA0LzgvMDcsIEFsZXggWW91bmcgPGFsZXhAYmxhY2trZXR0bGUub3JnPiB3
cm90ZToKPiA+ID4gMS4gSXMgdGhlcmUgYW55b25lIGNhbiBnaXZlIG1lIGEgbGlzdCBvZiBleHRy
ZW1lbHkgbWluaW1hbCBmaWxlcyB0aGF0IGhhdmUKPiA+ID4gdG8gYmUgY29tcGlsZWQgdG8gZ290
IHJ1YnkgY29yZSBpbnRlcnJldGVyIHdvcmsgcHJvcGVybHkgPwo+ID4gaG93IERlYmlhbiBoYXZl
Cj4gPiBoYW5kbGVkIHRoaXMgLSB0aGV5J3ZlIHNwbGl0IFJ1YnkgdXAgaW50byBzZXZlcmFsIGRp
ZmZlcmVudCBwYWNrYWdlcwo+Cj4gWWVhaCwgd2l0aG91dCBwcm92aWRpbmcgYSBkZXBlbmRlbmN5
IHBhY2thZ2UgdGhhdCBqdXN0IGluc3RhbGxzCj4gRVZFUllUSElORy4gVGhlcmVieSBjcmVhdGlu
ZyBhIGJpZyBtYWludGVuYW5jZSBoZWFkYWNoZSBmb3IgZXZlcnkgUnVieQo+IGFwcGxpY2F0aW9u
IG91dCB0aGVyZS4gR3JyLi4uCj4KCkkgaGF2ZW4ndCBhY3R1YWxseSBoYWQgYW55IHByb2JsZW0g
ZHVlIHRvIHRoaXMgaW4gRGViaWFuIG9yIFVidW50dSwKYnV0IHRoYXQgbWlnaHQgYmUgY29uc2lk
ZXJlZCBhIGJ1Zy4gWW91IGNvdWxkIGF0IGxlYXN0IGZpbGUgb25lIGFuZApzZWUgd2hhdCB0aGUg
ZGV2cyBzYXkuLi4gOikKCgoKLS0gCktyaXN0b2ZmZXIgTHVuZMOpbgrinIkga3Jpc3RvZmZlci5s
dW5kZW5AZ21haWwuY29tCuKciSBrcmlzdG9mZmVyLmx1bmRlbkBnYW1lbWFrZXIubnUKaHR0cDov
L3d3dy5nYW1lbWFrZXIubnUvCuKYjiAwNzA0IDQ4IDk4IDc3Cg==
 
C

Chad Perrin

So for the original poster, I'd start by downloading the source Ruby
distribution and doing "configure", "make" and "make install" and
capture the log files of the operations. You'll see "miniperl" go by,
and you can figure out how it's built, what it's used for and where it
ends up. Or maybe someone else on the list can pick up where my
knowledge leaves off. I haven't dug into this because I'm doing other
things. :)
gsub!(/perl/, 'ruby')
 
A

Alexey Verkhovsky

I haven't actually had any problem due to this in Debian or Ubuntu,
but that might be considered a bug. You could at least file one and
see what the devs say... :)

I am not a Debian user, but in a couple of years of me being Instiki
maintainer I've seen perhaps a hundred "help me!" emails that
eventually came down to that same problem.

Needless to say, none of these people were experienced Ruby
programmers, they just wanted to use the application.
 
M

M. Edward (Ed) Borasky

Chad said:
.gsub!(/perl/, 'ruby')
Uh, yeah :) And:

1. The "miniruby" executable is left behind in the build directory but
apparently it isn't installed anywhere.
2. It is (on Linux, anyhow) an executable.

$ file miniruby
miniruby: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for
GNU/Linux 2.6.9, dynamically linked (uses shared libs), not stripped

3. It can at least do this:

$ ./miniruby -e 'puts "Hello, world!"'
Hello, world!

So there you have it. What *else* miniruby can do I can't tell you. But
it's there after a build and apparently *not* installed.
 
B

bino_oetomo

Hi ...
----- Original Message -----
From: "Chad Perrin" <[email protected]>
To: "ruby-talk ML" <[email protected]>
Sent: Monday, April 09, 2007 1:47 AM
Subject: Re: Minimum ruby installation.
Kindly please don't missunderstanding about me.
I am not PERL hacker.
I'm just a LEAF (ucBering) user.
The only scripting language that I "knew" currently is BASH.
I never get in touch with servers .. the only network engine that I got in
touch is Router and Firewall.
And I'm dreaming of using ruby (and Jabber protocol) as two-way network
management system.

sincerely
-bino-
 
U

Uma Geller

1. Is there anyone can give me a list of extremely minimal files that have
to be compiled to got ruby core interreter work properly ?
2. What is the minimal libs have to be loaded/compiled to write :
++ Jabber client
++ BASH similar : Cat, Cut, sed

It seems others have done work on embedded systems
with Ruby before, so this may be useful.

some links on MiniRuby:

http://wiki.rubygarden.org/Ruby/page/search?search_data[title_data]=miniruby&commit=in+Body

please let us know about your project progress

good luck !
 
P

Phillip Gawlowski

C

Chad Perrin

bino_oetomo said:
CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
print substr("Just another Perl hacker", 0, -2);
Kindly please don't missunderstanding about me.
I am not PERL hacker.

Chad Perrin's signatures are more-or-less randomly generated.

Indeed.

I'm thinking of replacing the current script I use for that by writing
one in Ruby. I'm going to keep the Perl sig in the list, though.
 
D

Dan Stevens (IAmAI)

Perhaps a small advert for RubyMentor in the Welcome message for this
mailing list would be a nice idea?
 
R

Rick DeNatale

1. The "miniruby" executable is left behind in the build directory but
apparently it isn't installed anywhere.
2. It is (on Linux, anyhow) an executable.

$ file miniruby
miniruby: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for
GNU/Linux 2.6.9, dynamically linked (uses shared libs), not stripped

3. It can at least do this:

$ ./miniruby -e 'puts "Hello, world!"'
Hello, world!

So there you have it. What *else* miniruby can do I can't tell you. But
it's there after a build and apparently *not* installed.

It's a build tool, which is why it's not installed. It's used to
bootstrap building the real ruby since some of the installation tools
like instruby.rb, and extmk.rb are written in Ruby so a minimal ruby
is needed to install ruby!

What it can and can't do is a little mysterious, and appears to be
platform dependent.

http://article.gmane.org/gmane.comp.lang.ruby.general/68084
 
M

M. Edward (Ed) Borasky

Rick said:
It's a build tool, which is why it's not installed. It's used to
bootstrap building the real ruby since some of the installation tools
like instruby.rb, and extmk.rb are written in Ruby so a minimal ruby
is needed to install ruby!

What it can and can't do is a little mysterious, and appears to be
platform dependent.

http://article.gmane.org/gmane.comp.lang.ruby.general/68084
In any event, I doubt if it will ever be something "supported for
general use and widely useful", which is what I suspect the original
poster wants. I haven't had much chance to fool around with Rubinius
yet, but that looks to me like the way to get something like this --
most of Rubinius is written in "the real Ruby" and should be capable of
making a micro Ruby interpreter.
 
J

John Joyce

RubyMentor should request a link and a blurb on as many of the Ruby
and Rails local user group sites as possible. This is surely one of
the most effective and useful ways to reach a mentor locally!
 
B

Brian Candler

I come from LEAF user community.

I'm a damn stupid newbie about RUBY.
I just impresed by someone who post about how easy to write a JABBER client
using ruby.

Since I come from a community of users of Small linux distro, my concern is
about a micro Ruby "distro" (maybe like Micro Perl)

So Here is my question :

1. Is there anyone can give me a list of extremely minimal files that have
to be compiled to got ruby core interreter work properly ?

You have to compile the whole thing. If you wish, you can disable the
building of the C native extensions (such as socket, zlib etc) - but they
all are built as separate .so loadable modules, so you might as well just
build them and then not copy them onto the target system if you don't want
them.
2. What is the minimal libs have to be loaded/compiled to write :
++ Jabber client
++ BASH similar : Cat, Cut, sed

Your Jabber client will need at least socket, and probably an XML parser
like REXML. There may be a higher-level Jabber library which you can use.

Bash-like functionality probably doesn't need any libraries, although you
might want readline.
I'm intended to compile of that minimal files with uCLib .. and may be
create a "*.lrp" package for the LEAF community.

In case it's of interest, there's a ruby-1.8.6 package for OpenWrt
http://www.openwrt.org/
https://dev.openwrt.org/browser/packages/lang/ruby

I made a squashfs filesystem containing for a complete OpenWrt installation
with all the usual bits (kernel, uclibc etc) plus ruby with an almost
complete(*) set of ruby libraries, and the whole lot takes 2.8MB. So it fits
quite nicely in a device with 4MB flash.

It might be possible to slice'n'dice the ruby standard libraries so that
parts can be omitted, but deciding how to put them into coherent bundles may
be hard, and other people would probably disagree with your choices. For
example, you could argue that all XML and YAML plus everything that depends
on them (e.g. SOAP, XMLRPC) should go in a library bundle. But that wouldn't
be much use to you, as your Jabber client would probably want at least
REXML, in which case you'll end up loading everything else.

If memory really is that tight, I'd say it's probably easier to work the
other way round: start with just ruby and *no* libraries. Give your
application a lib/ directory and manually install in there all the libraries
that you find you need to make it work.

Regards,

Brian.

(*) Actually, rdoc, test::unit and nkf are in separate packages and I left
these out. But it includes all the rest of the .rb libraries, plus C
extensions such as socket and yaml, and irb.
 
A

Austin Ziegler

I can't answer this directly, but you may wish to see how Debian have
handled this - they've split Ruby up into several different packages for
(as far as I know) precisely this purpose.

Except that Debian got it wrong and split some things out based on
politics instead of technical considerations (e.g., the openssl issue
in Debian). And split things out further than they should have been.

To answer the OP: you definitely don't need Tk by default. You need
zlib and openssl to get full RubyGems (including signed gem) support.
Jabber can be handled with Jabber4R which requires REXML (included
with the Ruby stdlib).

-austin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,130
Latest member
MitchellTe
Top