[GTALUG] Looking for Someone to Answer some Question

ted leslie ted.leslie at gmail.com
Wed Jan 16 00:39:27 EST 2019


I have done some embedded work, but not with such small ram limitation.
The first thing you need to do is to see what version of gcc [clang] (and
libs) you may
be dead-end at based on perhaps drivers, vendor restriction, etc. Maybe
your
not restricted at all, you can push a full new linux kernel and trimmings
to it.
If you can get C++17 or  14 then things are looking great for the solution
of C++
and all the new toys it has! Also benefit - people don't steal your script
code
(but you can always go to a native compiler for python maybe). You would
never write
cgi in C unless you are dead-ended on gcc support prior to C++11(ish). I
think
I got wt (web toolkit) down to a small foot print, and it would make an
amazing web platform on
that foot print. regex lib was big trouble , as I was targeting < 200MB
ram, but that was because other stuff had to run. If you need a small regex
lib, I can give info to you.
As for saving state, depends on amount of data, if you are taking about
session state, etc,
some embedded devices come with libs for that, maybe some using sharedmem.
 if state does need to stay over reboot, then want to avoid burning flash
cycles on DB (of course). I am pretty sure you will a decent chance of
finding a  key-pair ram storage ability provided (or available lib), unless
its a very odd platform.  If you need across boot persistence, then you
have to look at a some flushing and startup loading.
Interpreted languages give you garbage collection, reflection, dynamic
interp. execution, say, over C++(old). With C++(new) new memory management
options, , memory leaks, etc are pretty much way of the past., reflection
can be tackled pretty well if you have control of code (meta data
reflection libs), but if you need dynamic script execution, then of course
c++ is out, unless you have much more memory and can bring in the C++
interp. to run dynamic C++ scripting (i.e. .Cling). On such a small
footprint you almost certainly can't run [Cling] C++ in its  interpreted
language format.

-tl

On Tue, Jan 15, 2019 at 10:53 PM William Park via talk <talk at gtalug.org>
wrote:

> On Tue, Jan 15, 2019 at 07:49:15PM -0500, Kevin Cozens via talk wrote:
> > On 2019-01-14 12:35 a.m., William Park via talk wrote:
> > > It so happens that I'm looking for interpretor suitable for embedded
> > > applications. I read up on "Lua".  Maybe there are other options?
> >
> > Without knowing your intended use case(s) it is hard to know what
> > language(s) would be considered suitable. Other options are
> implementations
> > of interpreted C, Forth, or dare I say, BASIC.
>
> My working environment is 256MB storage, 256MB ram, F2FS filesystem,
> ARM cpu, stripped down Linux kernel, and Busybox.  Most things are
> written in C.  But, comments and requests from customers, nowdays, are
> more "web" direction.  So, if we write web apps, I'm wondering whether
> we shoud write all those CGIs in C or some interpreted language.  It
> doesn't have to be that fast, as long as it's not too slow. :-)
>
> Main feature I need is ability to save "state" of some data structure,
> say variables, array, or dictionary, without having to parse/reparse
> when writing/reading from filesystem.  Python can do that.  I can do
> that in C too.  My last choice would be SQLite, though, it has its
> advantages.
> --
> William Park <opengeometry at yahoo.ca>
> ---
> Talk Mailing List
> talk at gtalug.org
> https://gtalug.org/mailman/listinfo/talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/talk/attachments/20190116/589d10d6/attachment.html>


More information about the talk mailing list