HN user

fexl

870 karma

Sites:

  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.
Posts69
Comments537
View on HN
fexl.com 6y ago

Parsing in Fexl

fexl
1pts0
github.com 9y ago

This is the functional language I use for real work

fexl
1pts0
fexl.com 11y ago

Symbol resolution in Fexl is now highly simplified and accelerated

fexl
2pts0
fexl.com 11y ago

Resolved dilemma between two methods of functional evaluation

fexl
1pts0
github.com 11y ago

Fexl – Highly robust functional evaluation

fexl
10pts3
github.com 12y ago

Fexl now using purely functional evaluation

fexl
1pts0
github.com 12y ago

New Fexl Release (default is eager evaluation instead of lazy)

fexl
1pts0
prog21.dadgum.com 12y ago

Range-Checks and Recklessness

fexl
22pts19
blather.michaelwlucas.com 12y ago

Installing FreeBSD 10 to ZFS with a script

fexl
2pts1
fexl.com 12y ago

Hey Apple! GOTO Considered Harmful.

fexl
1pts0
io9.com 12y ago

China's Worst Self-Inflicted Environmental Disaster

fexl
5pts0
news.ycombinator.com 12y ago

Ask HN: How do I install the Root CA "Positive SSL CA 2"?

fexl
1pts2
laserhacker.com 12y ago

Atmospheric Electricity Powers Small Motor [video]

fexl
10pts3
www.defenseone.com 12y ago

Drones that can Kill without Explicit Human Direction

fexl
3pts0
blogs.wsj.com 12y ago

Russia to Grab Pension Money, Temporarily

fexl
3pts0
articles.mercola.com 13y ago

A Ketogenic Diet May be the Key to Cancer Recovery

fexl
1pts4
www.youtube.com 13y ago

Bank of Dave (how to start your own bank)

fexl
1pts0
github.com 13y ago

Fexl version with vastly improved handling of repeated side effects

fexl
1pts0
fexl.com 13y ago

Fexl progress report 2012-12-03

fexl
1pts0
fexl.com 13y ago

New "fresh" branch for Fexl (radically simplified version)

fexl
1pts0
github.com 13y ago

Fexl update

fexl
1pts0
github.com 13y ago

You can now call readlink(2) from a Fexl program.

fexl
1pts0
github.com 13y ago

Improved build script for Fexl

fexl
1pts0
github.com 13y ago

I removed the disgusting symbol stacks from Fexl.

fexl
1pts0
github.com 13y ago

Epic commit message

fexl
27pts23
github.com 13y ago

Fexl update

fexl
1pts0
github.com 13y ago

Fexl update

fexl
2pts0
github.com 13y ago

Fexl update

fexl
1pts0
github.com 13y ago

Radically simplified the parse result handling in Fexl.

fexl
1pts0
github.com 13y ago

New release of Fexl

fexl
1pts0

I've noticed that LED bulb packages say they'll last several years, but so many of them die after just a year or so. I should start tracking this precisely, but I've just gotten the sense that they often die prematurely.

I opened the "Summary for Policymakers" listed right on their home page, and it popped up a PDF titled "AR5_SYR_FINAL_SPM-1.pdf". That's where I searched on the word "vapor" and found only one occurrence -- inside the word "evaporation".

I guess the "for the Physical Science Basis" report is something different that I haven't found yet.

Yes I understand that effect, and it makes sense that higher temperatures might cause more CO2 to come out of solution, as in a bottle of soda going flat more quickly at room temperature than in the refrigerator.

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.

Sorry, I can't click through to that article -- when I dismiss the pop-up, the tantalizing "Climate Shock" headline disappears.

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.

Are there any data on water vapor concentrations? I ask that because I have read that the contribution of water vapor to the greenhouse effect is perhaps two to four times greater than CO2.

Sorry I deleted my comment out from under your feet. He was responding to my exclamation about the large spike upward in CO2 levels on that first graph on the EPA site. After posting it, I deleted it because I answered my own question.

Why do buses bunch? 11 years ago

It's bizarre that it would be illegal. For all I know, it might be illegal in Peru too, but it happens, and it works pretty well.

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.

Why do buses bunch? 11 years ago

In Lima Peru the bus drivers pay spotters on the street who report flow conditions by cell phone.

Not only that, they took a lot of money in exchange for that "free" eduction -- often from people who didn't even use the service. So no, they don't have a "stake" in the products of anyone's mind. That's repugnant.

Unsung Geniuses 12 years ago

I sing the praise of the rarely mentioned genius Moses Schönfinkel, who invented combinatorial logic.

We traveled to Lima a few years ago, and the variety and quality of the food in the grocery stores and restaurants was astounding. For the equivalent of 2 to 5 bucks, you could get a lunch that would cost easily six times that in the U.S. -- if you could find anything equivalent.

Postscript: You might well ask why not just use "=" only, and assume that all definitions are potentially self-referencing?

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.

True, I could implement it in terms of direct self-reference. At one point I used the "==" syntax for just that purpose:

    \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.

I do use it directly. For example in Fexl I define the append function for lists as:

    \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])

Fexl is a functional programming language. I used the term "functional evaluation" because Fexl evaluates functions.

Here are a few code samples:

http://rosettacode.org/wiki/99_Bottles_of_Beer#Fexl

http://rosettacode.org/wiki/Fibonacci_sequence#Fexl

http://fexl.com/sample/

This one's a bit more involved:

http://fexl.com/demo/

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:

http://fexl.com/grammar/

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.42

This version handles syntax errors, out of memory errors, and out of time errors, propagating them upward instead of halting with an error message, and reporting them in an orderly fashion at the end of the main program. Now the only calls to "die" are those which should never happen, i.e. they are pure assertions which are never expected to fail.

This 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.

Same here -- I played it in 1974 on an HP 2000F minicomputer via a teletype located in a converted janitor's closet at my high school.

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. :(

I see a funny thing when I test it against yahoo.com:

  $ ./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?

No it's a good point actually, and it pays to know your context. Frankly, looking at the 118 lines in assert.h, it does considerably more than I really need.

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);

Right now, in my code, assert(0==1) produces this output to stderr:

  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.