870 karma · joined October 30, 2009
https://fexl.com
https://absolutefundadministration.com
I've been programming since the '70s. I'm very experienced in C, but most of my work since 1998 has been in Perl. HEY! I hear you laughing back there, but it is possible to write beautiful code in Perl. I'm also working on rewriting everything in Fexl.I suppose that implies he's trying to make an anode out of pure lithium or sodium, but you never know with science journalism.
I thought that electrons shuttle from the anode to the cathode.
I guess the "for the Physical Science Basis" report is something different that I haven't found yet.
That said, I am not certain that the recent dramatic spike to 400 ppm of CO2 (from what I've read) could be entirely caused by the fairly moderate temperature rises measured in recent years.
I do say that all humans require energy to survive, and more efficient forms of energy require capital in the hands of innovators.
I'll be happy to read the article if you can give me a link that functions better for me.
There you can see a strong correlation between CO2 levels and temperature going back nearly half a million years. Teasing out cause and effect is the interesting task.
In Lima, the spotters are known as "dateros" (loosely, "data wrangler"). The bus drivers pay them roughly 20 centavos, I think per stop but I'm not certain.
One case where it doesn't work is when certain bus drivers ignore the system and aggressively jump ahead of other buses. Nevertheless, it's pretty smooth.
https://github.com/chkoreff/Fexl/commit/57b841cb6c2347cad147...
That's a non-starter because I find that redefinition is the more common intent:
\x=4
\x=(* x 5)
\x=(+ y x)
In those cases I don't want x defined in terms of itself, but rather in terms of the previous definition of x.That is why I would insist on a special token such as "==" to express the intention of self-reference.
\append==(\x\y x y \h\t [h; append t y])
Maybe I should resurrect that syntax option. :)It was trivial to implement. When the parser sees the "==", it just automatically abstracts the symbol "append" from the definition and applies the fixpoint operator (Y combinator).
The only reason I eliminated "==" in the first place was that I was in the throes of using different syntaxes for lazy, eager, and self-referencing definitions. Now I've settled in on "=" always meaning eager evaluation, without exception. Then I got hyper-minimalist and said that's it, there's only one syntax for definitions, and it's "=", and if you want self-reference, use "@".
However, the decision to settle in on eager evaluation now frees up "==" once again as an option for self-reference. So I may bring that back.
Thanks for the food for thought.
\append=(@\append\x\y x y \h\t [h; append t y])
Where '@' is the Y-combinator.Note that there's no direct self-reference with the symbol "append" there. I could define it equivalently as:
\append=(@\loop\x\y x y \h\t [h; loop t y])Here are a few code samples:
http://rosettacode.org/wiki/99_Bottles_of_Beer#Fexl
http://rosettacode.org/wiki/Fibonacci_sequence#Fexl
This one's a bit more involved:
You'll also find some code samples in the "test" directory:
https://github.com/chkoreff/Fexl/tree/master/src/test
The program a1.fxl there is the definitive test suite. The program a2.fxl reads what you type and echoes it back.
The samples above should help illustrate the nature of the language. Grammatically, it's very simple:
For another quick illustration of the language, I'll give you a sample here:
say "Hello"
\x=(* 4.7 8.6)
put "x = " put x nl
The output is: Hello
x = 40.42This allows for some very nice embedded calls to parsing and evaluation from within a Fexl program itself, which can always be expected to return to the caller instead of halting.
Ultimately I'm going to put a full-powered interpreter right on the web to allow arbitrary programs submitted from strangers, and this release is a necessary prerequisite for that.
The author mentions the lack of ability to renumber the lines in a BASIC program, but I'm quite sure there was a RENUM command that would do that.
In 1976 we got ADS (CRT) terminals in the computer lab, and once I figured out ESC-sequences, I had a shoot-em-up space ship game going. God I wish I still had the source code for that. :(
$ ./Heartbleed yahoo.com:443
(bunch of returned bytes)
2014/04/08 12:59:46 yahoo.com:443 - VULNERABLE
Near the front of the returned bytes is the sequence "yheartbleed.filippo.ioYELLOW SUBMARINE". That is some padding buried inside the Heartbleed source code.I assume that the returned bytes are a peek inside the memory of a yahoo.com server, and we can see the padding supplied by Heartbleed, followed by some more bytes that depend on the server state.
Am I interpreting that correctly?
Instead of this:
assert(buf->pos < buf->str->len);
I could just do this instead: if (buf->pos >= buf->str->len) die("bad pos");
If the die message is unique, I don't really need to include __FILE__, __LINE__, and the expression itself in it.I could even do this, though it's probably overkill for something that should never happen anyway:
if (buf->pos >= buf->str->len)
die("bad pos %d %d", buf->pos, buf->str->len); run: run.c:422: main: Assertion `0==1' failed.
Aborted
That is what I want.You are correct. If I build with -DNDEBUG=1, then the assert is completely ignored: no error message, and no abort. That is not what I want. Therefore I will not build with -DNDEBUG=1.
I will certainly not introduce "logging to a file" as a concept inside buf.c. There is no need for the pure data manipulation code in buf.c to know anything about files or stdio, or a specific name of a log file.
If the assert from assert.h does not do what I want, then I'll make a version that does. However, that is a moot point, since right now it does what I want.