From: Dave Taht <dave.taht@gmail.com>
To: cerowrt-devel@lists.bufferbloat.net
Subject: [Cerowrt-devel] Adopting lua
Date: Tue, 13 Dec 2011 22:52:05 +0100 [thread overview]
Message-ID: <CAA93jw5hn-13BGxBVfNTmwLwn879V4p+dNYM6exaEP7D8qzzkA@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1776 bytes --]
One both good and horrible thing I did back in june...
http://lists.noise.gatech.edu/pipermail/bismark-devel/2011-July/000251.html
was to swap the default gui from xwrt to luci. Good, in that that GUI keeps
getting better and better. Bad, because neither jim, nor I, know lua the
language at all, and can't add features nor fix gui issues.
I've learned a lot of languages in my life, but can write shell and C and
SQL in my sleep. In olden days I could count LISP among those, too, and a
dozen others, but not of late.
Recently I shot myself in the foot, trying to scale kleinrock up and down
by doing a simple lookup table for 'sqrt' for various amounts of flows in
the various AQM attempts I have going using 'tc' in the deBloat.git repo.
The numbers were so off from correct, that I realized that I really needed
to take a sqrt directly...
and the only way to do that (or so I thought) was to write a shell script
wrapper around 'bc'...
and to get bc, I needed to compile and install it on cerowrt.
Not only that, but the shell script was horribly slow, taking 2 minutes in
one version, to create the tc rules. I rewrote it in C, cutting that time
down to 6 ms (and getting my !@! sqrt function for free), but that lacks
the run time flexibility of an interpreter.
Then I realized that lua could do the job...
lua -e "print(math.sqrt(12))"
and then I realized, why not try writing the AQM stuff entirely in lua and
see if I got a good compromise between shell and C.
and finally be able to do gui stuff, eventually.
It's an odd way to bite the bullet and decide to try to learn a new
language, but, there it is.
--
Dave Täht
SKYPE: davetaht
US Tel: 1-239-829-5608
FR Tel: 0638645374
http://www.bufferbloat.net
[-- Attachment #2: Type: text/html, Size: 2048 bytes --]
next reply other threads:[~2011-12-13 21:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-13 21:52 Dave Taht [this message]
2011-12-13 22:52 ` Dave Taht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.bufferbloat.net/postorius/lists/cerowrt-devel.lists.bufferbloat.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAA93jw5hn-13BGxBVfNTmwLwn879V4p+dNYM6exaEP7D8qzzkA@mail.gmail.com \
--to=dave.taht@gmail.com \
--cc=cerowrt-devel@lists.bufferbloat.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox