Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.arch.embedded > #21524
| From | Don Y <this@is.not.me.com> |
|---|---|
| Newsgroups | comp.arch.embedded, comp.lang.forth |
| Subject | Re: Which scripting for embedded automation? |
| Date | 2015-07-24 17:00 -0700 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <moujig$4kn$1@speranza.aioe.org> (permalink) |
| References | <0e930740-22d8-4e2b-833f-bb5843437d0d@googlegroups.com> <87y4i6rvyc.fsf@jester.gateway.sonic.net> <motoev$eeu$1@dont-email.me> <87lhe5sciz.fsf@jester.gateway.sonic.net> <mougdl$b1d$1@dont-email.me> |
Cross-posted to 2 groups.
On 7/24/2015 4:06 PM, WJ wrote: > It's obvious that the reason that he is recommending Forth > over all other languages is that he knows no language that > is higher-level than Forth. And he finds it too difficult > to learn another language. > > If a hammer is the only tool that you have, then you use > a hammer for everything. > > How would these tasks be done with a hammer? > > Using Gauche Scheme: > > Write a function that accepts a vector (1-dimensional array) of > 16-bit numbers and replaces each number with its difference > from the average. > > (use gauche.uvector) > (use gauche.collection) > > (define (relativize vec) > (let ((avg (round->exact (/ (fold + 0 vec) (s16vector-length vec))))) > (s16vector-sub! vec avg))) > > (define my-vec (s16vector 0 1 2 3 4 5 6 7 8 9)) > (relativize my-vec) > my-vec > ===> > #s16(-4 -3 -2 -1 0 1 2 3 4 5) > > > Take a string that contains numbers separated by semicolons or > commas and convert it to a list of numbers. > > (map string->number (string-split "2,3.14;5.8,9" #/[,;]/)) > ===> > (2 3.14 5.8 9) What role would these have in the scripting of an automation system? IME, tasks in that domain tend to be more procedural oriented.
Back to comp.arch.embedded | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Which scripting for embedded automation? abhishekkumardwivedi@gmail.com - 2015-07-23 02:24 -0700
Re: Which scripting for embedded automation? Les Cargill <lcargill99@comcast.com> - 2015-07-23 12:18 -0500
Re: Which scripting for embedded automation? Don Y <this@is.not.me.com> - 2015-07-23 10:42 -0700
Re: Which scripting for embedded automation? rickman <gnuarm@gmail.com> - 2015-07-23 15:08 -0400
Re: Which scripting for embedded automation? rickman <gnuarm@gmail.com> - 2015-07-24 18:44 -0400
Re: Which scripting for embedded automation? Paul Rubin <no.email@nospam.invalid> - 2015-07-23 22:00 -0700
Re: Which scripting for embedded automation? rickman <gnuarm@gmail.com> - 2015-07-24 12:19 -0400
Re: Which scripting for embedded automation? Paul Rubin <no.email@nospam.invalid> - 2015-07-24 10:15 -0700
Re: Which scripting for embedded automation? "WJ" <w_a_x_man@yahoo.com> - 2015-07-24 23:06 +0000
Re: Which scripting for embedded automation? Don Y <this@is.not.me.com> - 2015-07-24 17:00 -0700
Re: Which scripting for embedded automation? rickman <gnuarm@gmail.com> - 2015-07-24 20:52 -0400
Re: Which scripting for embedded automation? "WJ" <w_a_x_man@yahoo.com> - 2015-11-28 18:06 +0000
Re: Which scripting for embedded automation? rickman <gnuarm@gmail.com> - 2015-11-29 02:45 -0500
Re: Which scripting for embedded automation? Paul Rubin <no.email@nospam.invalid> - 2015-11-29 23:02 -0800
Re: Which scripting for embedded automation? rickman <gnuarm@gmail.com> - 2015-11-30 02:55 -0500
csiph-web