ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:99478] Reduction of ENCODER files for embedded systems
@ 2020-08-04 17:27 Maurice Smulders
  2020-08-05  7:14 ` [ruby-core:99482] " Martin J. Dürst
  0 siblings, 1 reply; 2+ messages in thread
From: Maurice Smulders @ 2020-08-04 17:27 UTC (permalink / raw)
  To: ruby-core

What is the best way to not build/remove the encoder files in enc and
trans in the ruby source tree?

I am building for an embedded system. The code running on it will only
ever support USASCII, and reduction of size is paramount...

Thanks,

-- 
Maurice Smulders

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [ruby-core:99482] Re: Reduction of ENCODER files for embedded systems
  2020-08-04 17:27 [ruby-core:99478] Reduction of ENCODER files for embedded systems Maurice Smulders
@ 2020-08-05  7:14 ` Martin J. Dürst
  0 siblings, 0 replies; 2+ messages in thread
From: Martin J. Dürst @ 2020-08-05  7:14 UTC (permalink / raw)
  To: Maurice Smulders; +Cc: Ruby developers

On 05/08/2020 02:27, Maurice Smulders wrote:
> What is the best way to not build/remove the encoder files in enc and
> trans in the ruby source tree?
> 
> I am building for an embedded system. The code running on it will only
> ever support USASCII, and reduction of size is paramount...
> 
> Thanks,
> 

Hello Maurice,

I have been involved in the transcoding part, but that was quite some 
time ago.

First, for embedded systems, I'd definitely also have a look at mruby 
(http://mruby.org/).

Second, I'd have a look at miniruby, which uses only a few encodings.

Third, I'd just start by removing some of the relevant files in enc and 
enc/trans, and see what happens (with the make process, testing,...).

Quite some effort, such as the automatic generation of encdb.h and 
transdb.h, went into making sure (at least in theory) that new 
encodings/transcodings could be added easily. On the other hand, many 
encodings turn up in special situations, and it may be somewhat 
difficult to get rid of them.

In particular, I'd start removing encodings labeled as 
Japanese/Korean/Chinese (because they use relatively more data), then 
move on to the various Windows-xxxx and ISO-8859-XX variants, leaving 
UTF-16/32, ISO-8859-1, ASCII-8BIT (aka BINARY), and UTF-8 for later. In 
particular UTF-8 may be difficult to remove, because it is used as the 
default source encoding, and there are many optimizations because it's 
widely used and has a very special structure.

Please feel free to ask here again if you run into any issues.

Regards,   Martin.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-05  7:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-04 17:27 [ruby-core:99478] Reduction of ENCODER files for embedded systems Maurice Smulders
2020-08-05  7:14 ` [ruby-core:99482] " Martin J. Dürst

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).