HNHacker News
TopNewBestAskShowJobs

fexl

870 karma · joined October 30, 2009

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.
submissionscomments
fexl··on Epic commit message
I was using "epic" with a Jeff Spicoli accent, not in the classical sense. But thanks for the comments!
fexl··on How I salt my own passwords and sleep a little better at night
If you use a distinct random passphrase on each site, they are virtually guaranteed not to hash to the same value under any hashing scheme. What obvious point am I missing here?
fexl··on Vim: Buffers, Windows, and Tabs
Also:

  Ctrl-w <    make vertical window narrower
  Ctrl-w >    make vertical window wider
(You can put a numeric count before the < or >)

Also:

  Ctrl-w =    make windows of equal size
And, when I want two vertical windows each of width 80:

  se co=161
  :vsplit
  Ctrl-w =
I gotta use 161 there because apparently one column is taken by the vertical separator.
fexl··on How I salt my own passwords and sleep a little better at night
Use five random words from diceware.com to create a password, and you will have 65 bits of strength. No more tossing and turning.
fexl··on No password rules...please.
Right, the use of numbers is not necessary. For example, I could publicly advertise that my password for a particular site consisted of exactly six words chosen randomly from the word list at http://world.std.com/~reinhold/diceware.html .

People would be free to attack it at will, but it wouldn't do much good because that password contains approximately 78 bits of entropy. The attack would be slow enough offline (for example if they somehow possessed a bcrypt hash of my passphrase), but far slower online (if they had to send each guess across the internet one by one).

I could of course cleverly substitute some digits here and there, which would make my public declaration a lie. I suppose some "security through obscurity" can help, though I could have accomplished just as much if not more by simply using seven words instead of six.

fexl··on What's That Programming Language?
I knew it was from Rosetta -- coincidentally, only a few days ago I submitted my own entry there http://rosettacode.org/wiki/99_Bottles_of_Beer#Fexl .
fexl··on Ask HN: What is the best laptop for Utbuntu - 12.04
No chicklets on mine!

Also, the SSD is an option, not standard, in case you want that. (I certainly did.)

You can call them on the phone with any questions -- I found them responsive and helpful.

fexl··on Ask HN: Is the future about functional programming languages?
My own future certainly is. I've written my own language Fexl http://fexl.com for very specific purposes in my work.
fexl··on New "spawn" function in Fexl makes it easy to interact with a child process.
And here's a Rosetta Code entry explaining everything: http://rosettacode.org/wiki/Fork#Fexl
fexl··on New "spawn" function in Fexl makes it easy to interact with a child process.
Here's the direct link to spawn:

https://github.com/chkoreff/Fexl/blob/b1e149d1a0795aa191b887...

fexl··on Ask HN: What is the best laptop for Utbuntu - 12.04
I'm using a Lenovo LC2430HD that I ordered from LinuxCertified.com about a year ago. It has a Solid-State Drive, so no moving parts except the occasional fan and it's whisper-quiet. Good battery life too -- about 6 hours I think. It came pre-installed with Ubuntu 11.10 or so, and it worked perfectly out of the box, but I did re-install Ubuntu anyway with the Alternative CD because I wanted to encrypt the hard drive.

It's a great machine!

(Here's where I got it: http://linuxcertified.com/linux_laptops.html)

fexl··on Fexl standard context now defined in terms of elegant combinators
The Fexl standard context is now defined very elegantly, in a way which scales very nicely even to thousands of built-in symbols.

In particular here's the definition of "enhance", which is used to enhance the standard context with a potentially enormous set of extra definitions, spread across multiple files:

https://github.com/chkoreff/Fexl/blob/ced168cae71644ff9a9cb3...

fexl··on Ask HN: Help - I've hit a wall.
Yes. Sometimes when I feel stuck or paralyzed, I like to just fiddle with the existing code, refactoring here and there to do some obvious albeit small improvements. This entrances me into a little "flow" experience, and suddenly some bigger and more interesting opportunities emerge spontaneously. That's when I get really inspired and make a lot of progress.

Sometimes it's good to walk away, as in literally take a walk and utterly ignore all your problems, and sometimes it's good to chip away, as in doing one little easy thing that's within your immediate power, however meaningless it might seem. I find that such small efforts produce a sort of "compound interest" effect, where your gains start to pile up faster than you expect.

fexl··on Ubuntu Releases 12.04 LTS Precise Pangolin
I keep trying Unity every once in a while, but I always find it difficult to bring up exactly the right window I want. So I go back to Gnome, which has the task bar where I can simply click something to maximize it, and click it again to minimize it.

I'm gonna try Unity again, because I want to like it, but I always find myself getting angry at the "application-centric" grouping of my open windows, and how when it zooms out and I click the window I want, all sorts of other things I'm using become obscured.

fexl··on Added file operations to Fexl
This was very straightforward, and I'm amused I didn't do it sooner. The new "file.c" is just 113 lines, and includes wrappers for fopen, fgetc, fputc, and fwrite, along with a handy file_string function which reads the entire content of a file into a single string, using the very efficient buf.c technique.
fexl··on Fexl now has a top-level library written in Fexl itself.
Fexl now uses /usr/share/fexl/top.fxl as the standard context for all scripts.

This gives Fexl a potentially large library of built-in functions written in Fexl itself, in addition to the functions written in C (in the form of routines named fexl_X, where X is the function name).

The directory structure for the installed fexl is now:

  /usr/bin/fexl
  /usr/lib/fexl/
  /usr/share/fexl/
fexl··on Enhanced meta-parsing in Fexl, with example scripts.
This illustrates how Fexl does "modules". A Fexl script parses another Fexl script, resolving the function names used in that script in an appropriate context, which is itself a Fexl function.
fexl··on Iota and Jot: the simplest languages?
This reminds me of W. V. Quine's commentary on Moses Schönfinkel's landmark 1924 paper "Building Blocks of Logic". Schönfinkel pioneered the reduction to K and S, with parentheses, and further suggested that he could reduce the combinators to just one called J, where S = (J J) and K = (J S).

Then Quine observed that one could use a preponent binary operator "o" to dispense with parentheses, at which point ~"" All Schönfinkel's sentences build of "J" and parentheses go over unambiguously into strings of "J" and "o".""

Therefore all valid forms can be represented as binary numerals as well, though the converse is not true: not all binary numerals represent valid forms -- unlike Iota's bijective mapping.

fexl··on '9223372036854775807' == '9223372036854775808'
Incidentally if you try using those numeric constants directly in a C program, it fails to compile:

    #include <stdio.h>

    int main(void)
        {
        long x = 9223372036854775807;
        long y = 9223372036854775808;

        printf("x = %ld\n", x);
        printf("y = %ld\n", y);
        printf("x and y are %s\n", x == y ? "equal" : "not equal");

        return 0;
        }
The error message is:

    gcc -c -Wall -Werror -ansi -O3 -fPIC src/test_num2.c -o obj/test_num2.o
    src/test_num2.c: In function ‘main’:
    src/test_num2.c:6:11: error: integer constant is so large that it is unsigned [-Werror]
    src/test_num2.c:6:2: error: this decimal constant is unsigned only in ISO C90 [-Werror]
    cc1: all warnings being treated as errors
fexl··on '9223372036854775807' == '9223372036854775808'
This is how the strtol function in the standard C library works. Here's a test program:

    #include <stdio.h>
    #include <stdlib.h> /* strtol, strtod */

    /* Convert string to long and return true if successful. */
    int string_long(char *beg, long *num)
        {
        char *end;
        *num = strtol(beg, &end, 10);
        return *beg != '\0' && *end == '\0';
        }

    int main(void)
        {
        char *x_str = "9223372036854775807";
        char *y_str = "9223372036854775808";

        long x;
        long y;

        int x_ok = string_long(x_str, &x);
        int y_ok = string_long(y_str, &y);

        printf("x_str = %s\n", x_str);
        printf("y_str = %s\n", y_str);

        printf("x = %ld (ok=%d)\n", x, x_ok);
        printf("y = %ld (ok=%d)\n", y, y_ok);
        printf("x and y are %s\n", x == y ? "equal" : "not equal");

        return 0;
        }

And here's the output:

    x_str = 9223372036854775807
    y_str = 9223372036854775808
    x = 9223372036854775807 (ok=1)
    y = 9223372036854775807 (ok=1)
    x and y are equal
I compiled it like so:

    gcc -c -Wall -Werror -ansi -O3 -fPIC src/test_num.c -o obj/test_num.o
fexl··on Fexl meta-parsing and symbol resolution radically simplified.
Instead of the complex chaining mechanism I used before, the Fexl meta-parser is now like this:

Parse the source text, returning (pair ok; pair exp; symbols).

ok is true if the source is well-formed, i.e. no syntax errors.

If ok is true, exp is the parsed expression. If ok is false, exp is the string error message.

symbols is the list of all symbols used but not defined within the source text. It is a list of entries (pair sym line_no), where line_no is the line number on which the symbol first occurred.

If ok is true, then the caller can take the exp and successively apply the definitions of each symbol in the symbols list. The result will be the actual executable function which can then be run with "eval" in the Fexl intepreter.

fexl··on Fexl version b26 released
Uses chained resolution to report all occurrences of undefined symbols.
fexl··on On the use of "pointerness" in typedef
Here are the links:

http://lkml.indiana.edu/hypermail/linux/kernel/0206.1/0402.h...

https://github.com/chkoreff/Fexl/commit/9e361240168151706bcc...

fexl··on Fexl now uses dynamic symbol lookup.
The resolve function now looks up symbols dynamically in the Fexl library linked with the executable. Any function named "type_X" is now automatically available as a function "X" in Fexl.

Refactored the code so it's cleaner, faster, smaller, and with fewer inter-dependencies. The .bench2 test is about 6% faster.

fexl··on Fexl release b14
This is a complete rewrite, and it now has the beginnings of a module system based on meta-parsing (i.e. "parse" is now a combinator in the system). Still plenty of TODOs, but it's moving forward.
fexl··on Why The Linux Desktop Still Rocks
Yes, I've been using Ubuntu exclusively on the desktop for about 6 years now. I recently bought a new laptop (from LinuxCertified.com) and tried out 11.10 (Unity) for the first time. At first I liked it pretty well, but a few days later realized that I really missed the GNOME task bar, where I could see everything running at a glance, and click to open an active window, and click again to minimize it.

That feels indispensable to my work flow, so I'm logging in with GNOME Classic now instead of Unity. Although I commend Mark Shuttleworth and his crew on their achievements with Unity, I just gotta have that task bar. Right now the laptop feels like a dream machine -- the keyboard is perfect and I'm a master with the touchpad.

Also, the desktop behaves so beautifully that it makes my wife slightly jealous, so when her Windows computer gives up the ghost I think she's gonna want the Linux desktop.

fexl··on How To Optimize Your Site With HTTP Caching
And it links to another great article on gzip compression.
fexl··on Fuck passwords
Javascript is enabled; no problem there.

I'm pretty sure the problem is actually related to my deletion of all root CAs. Why? Because there's a red exclamation mark over the lock icon at bottom right of window, and when I hover it says "Warning: Contains unauthenticated content."

I already force-accepted the dswi.net certificate as a specific exception when I first played with DSWI yesterday. I would think that acceptance should apply to the JS content as well. But apparently not. So I'm poking around in my FF settings to see how I can trust your certificate even more than I already have -- yet without installing Comodo's root CA certificate.

It's all my fault, because of my bold yet insane experiment in distrusting all root CAs.

fexl··on Fuck passwords
When I click "Login with DSSID", the page says nothing except "Welcome to DSSID". No login box, button, or anything. Of course, it's not your fault, because when I do a View Source, I see all those things. They just don't appear to me visually.

This is happening on two different Firefox browsers on two different Linux machines. It must be a problem with settings or a plugin. I'll try it on a brand new Linux machine with a fresh install of FF and let you know.

fexl··on Fuck passwords
Yes, thanks for clarifying. I see that now. I've been through your demo a few times in Chromium, and I've been poking around and looking at the "Cookies and Other Data" values. So yes, I see now that my actual private key is in "Local Storage".

By the way, these concepts of localStorage and sessionStorage are new to me. Evidently they're something like glorified large cookies in HTML5. Chromium handles it just fine, but I don't think my Firefox browser even understands it yet. I see where I can examine all my live cookies there, but I don't see any mention of "storage" there. (I'm using Firefox 3.6.24 on Ubuntu.)

Consequently I haven't been able to get it to work yet on FF. But maybe that's because long ago I did a bold yet insane experiment wherein I deleted all trusted root CAs in that browser. So it might be my problem, not yours.

← PreviousPage 5 of 18Next →