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 Functional programming isn't the answer
I'm pretty sick of all high-level languages actually. I even wrote my own functional programming language "Fexl", and I'm sick of it too. Here's a totally general purpose quicksort:

    # (sort keep compare xs) sorts the list xs using the three-way comparison
    # function.  It keeps duplicates if the keep flag is true, otherwise it
    # discards them and returns only the unique entries.

    \sort =
        (@\sort\keep\compare\xs
        xs [] \x\xs
        \lo = (filter (\y compare y x T F F) xs)
        \hi = (filter (\y compare y x F keep T) xs)
        \sort = (sort keep compare)
        append (sort lo) [x; sort hi]
        )
I'm tired of all of it. The language I really like is plain old C.

To handle arbitrary strings reliably, I can just use this code:

https://github.com/chkoreff/Fexl/blob/master/src/str.h

https://github.com/chkoreff/Fexl/blob/master/src/str.c

To deal with dynamic allocation, detecting any memory leaks upon program exit, I use this:

https://github.com/chkoreff/Fexl/blob/master/src/memory.h

https://github.com/chkoreff/Fexl/blob/master/src/memory.c

For high-speed buffering of data, one character at a time, I can use this:

https://github.com/chkoreff/Fexl/blob/master/src/buf.h

https://github.com/chkoreff/Fexl/blob/master/src/buf.c

fexl··on What Google would have looked like in the 1960s
I get pangs of nostalgia watching this thing. I'm old enough to have worked with punch cards, teletypes, mag tapes, line printers, front panel switches, and such -- in the '70s anyway. (... now where the hell are my cigarettes ...)
fexl··on Why Bitcoin Will Never Be a Currency
Until the advent of the Federal Reserve, the dollar itself was a deflationary currency:

http://nothirdsolution.com/wp/wp-content/uploads/2008/07/cpi...

fexl··on What Gives Gold that Mellow Glow? (2006)
Nice.

You may also recall this article about the nature of mercury: http://blogs.scientificamerican.com/the-curious-wavefunction...

fexl··on Here’s who probably did that $150 million Bitcoin transaction
Point taken, but in spite of their aspirations, they are neither omniscient nor omnipotent. Thank goodness.
fexl··on Machine learning is easier than it looks
I admit that was an unfair swipe at formalism, but I do think that formalism is far more effective in the light of a clear, intuitive exposition that conveys the concept straight into the mind. Formalism is good for battening things down tightly, after the fact.
fexl··on Here’s who probably did that $150 million Bitcoin transaction
I make sure Uncle Soprano gets his cut.
fexl··on Here’s who probably did that $150 million Bitcoin transaction
The term "money laundering" originally referred to the practice of concealing the movement of funds involved in a crime. Now they've redefined it so that concealing the movement of funds is itself a crime, even if the funds are entirely legitimate and no other crime is involved.
fexl··on Sudden Progress on Prime Number Problem Has Mathematicians Buzzing
I will hazard a guess that making his living at Subway helped his math endeavours. He did not have to endure the stress of a corporate or academic rat race, and nobody claimed to own his intellectual products.
fexl··on Machine learning is easier than it looks
I like the simple explanation of K-Means, and I like the contrast with the dense set-theoretic language -- a prime example of "mathematosis" as W.V.O. Quine put it.
fexl··on Where to begin when learning C? Part 2 - Entry points
Brilliant job. I've been a C programmer for over 30 years and I love your approach here.
fexl··on Why GitHub is not your CV
As a personal anecdote, one recruiter from a well-known organization did mention my Github page as an indication of drive and initiative, but it was by no means a deciding factor. Just another piece of evidence on top of a lot of other things.
fexl··on Why GitHub is not your CV
Why are females with CS degrees less likely to have Github pages than males with CS degrees? Is it because of the testosterone which tends to make males show off more than females? If not that, then what?
fexl··on Self-driving cars projected to reduce injuries by 90%, save $450B annually
I upvoted you before I read your last paragraph. I am massively in favor of personal freedom, but I am not rooting for massive disasters or scandals with self-driven cars. Nevertheless, it creeps me out in the same way it must creep out Richard Stallman.
fexl··on How a Radical New Teaching Method Could Unleash a Generation of Geniuses
"The exterior of his schools will be mostly glass, so outsiders can peer in."

That reminds me of one of the technical schools I saw in downtown Lima, Peru. It had a huge number of large glass windows on the front, and as I walked along the main street, I could peer in and see row after row of tables, each with several large Apple monitors, each with a student or two in front of it. It was massive.

I'd really like to go in there next time I visit and find out more about their techniques.

(Incidentally, several blocks away there was a high school named "The Albert Einstein Institute". :)

fexl··on GNU Make 4.0 Released
Done. https://github.com/chkoreff/Fexl/commit/ce1d0f596ab3043e0edf...
fexl··on GNU Make 4.0 Released
Thanks. I'm not using make, so I don't really need a make rule, but I can see that gcc -M does something useful:

  $ gcc -M src/value.c
  value.o: src/value.c src/memory.h src/value.h
The result of my grep/sed gives me just the header dependencies alone, which is really all I need:

  $ cat obj/value.i
  src/memory.h src/value.h
So I might consider replacing the grep/sed with gcc -M, and strip off the first two entries, which would give me the equivalent result, but it doesn't strike me as a "must do" right now. Again, I don't use make, just /bin/sh, so I don't need a make rule per se.

Thanks for the advice about the ".i" suffix. I don't think there's a conflict though, because all my intermediate files go into a completely separate "obj" directory, and no pre-processed source will be going there. However, I will consider choosing a different suffix just for the heck of it. I'm sure anything I choose (such as ".dep" or ".inc") will mean something to somebody somewhere, but since I'm in the entirely orthogonal context of the "obj" directory I don't think it matters.

fexl··on GNU Make 4.0 Released
For this reason and others I just wrote my own build script using /bin/sh:

https://github.com/chkoreff/Fexl/blob/master/build

Configurable with a small src/config file:

https://github.com/chkoreff/Fexl/blob/master/src/config

It automatically greps header dependencies, caching them in obj/*.i files.

fexl··on Police Claim Encryption Use Is Illegal
They do hire some ignorant yahoos from time to time.
fexl··on UAV Provides Colorado Flooding Assistance Until FEMA Freaks Out
Bringing in water is a rescue effort, and it saves more people from suffering or dying from dehydration. No, the last thing FEMA wants is for people to see how useless and counterproductive they are.
fexl··on UAV Provides Colorado Flooding Assistance Until FEMA Freaks Out
In the aftermath of Katrina, people from Walmart and other organizations tried to bring water to stranded people in New Orleans, and FEMA turned them away. What was the motivation there? Maintaining orderly road traffic?
fexl··on How Not to Sell Bitcoin on eBay for 300% Profit
Never forget the May Scale of Monetary Hardness, from my old friend J.P. May:

http://stakeventures.com/articles/2012/03/07/the-may-scale-o...

fexl··on Linux 3.9 introduced a new way of writing socket servers
"in the fork model a number of processes can grow uncontrollably."

You can use setrlimit to prevent that. Plus, your application is likely to have direct control over forking anyway.

fexl··on Functional Programming with Python
I agree that functional programming is wonderful, but imperative programs can often look especially clear. Quite a conundrum.

In Fexl (http://fexl.com), you can reduce the nesting by using the ';' ("pivot") syntax. So instead of this:

  print (fold add 0 (map int (filter valid_int (split "+" exp)))
You can eliminate the nesting as follows:

  print; fold add 0; map int; filter valid_int; split "+" exp
You could simplify that form by redefining "int" to return 0 on any invalid input. So we redefine int as follows:

  \int=(\str valid_int str (int str) 0)
Presumably the original int dies on invalid input. Actually I would prefer that the inner int function returns either no or (yes val), i.e. a "maybe", and then we could wrap the default 0 around that. But in any case we now have a robust, fault-tolerant int function, and we can now say:

  print; fold add 0; map int; split "+" exp
fexl··on Existential Depression in Gifted Children
The article says that freedom refers to the absence of external structure, as if it's a grim state of confused aimlessness. I say that freedom refers to the absence of external coercion, which is a happy state of purpose and possibility.
fexl··on Feds tell web firms to turn over user passwords
They're also demanding private SSL keys: http://news.cnet.com/8301-13578_3-57595202-38/feds-put-heat-...

In that case they can easily sniff passwords as they are used.

fexl··on Bitcoin will prosper until governments or banks decide to crush it
Right, it doesn't seem likely to succeed, especially if these dynamics prevail: "A currency that quintuples in a month, and then loses two-thirds of its value in the following week, is not a currency that inspires confidence in users."

A currency that behaves that way is a currency that appreciates 67% every five weeks. That will not be sustainable for long without hyperinflation. It will also inspire confidence in people who buy the dips.

fexl··on Statement on planned Fourth of July demonstrations
I disagree with two words. :)
fexl··on Why I use spaces over tabs
Happy 50th birthday, TAB! I love you.
fexl··on Avoid Null Checks by Replacing Finders with Tellers
The problem I have with his example is that I would probably want to do this:

    Person person = dataSource.getPersonById(personId);
    if (person != null) {
        person.setPhoneNumber(phoneNumber);
        dataSource.updatePerson(person);
    } else {
        user.notify("That's an invalid ID.");
    }
So I need an "else", in effect, regardless of whether it's implemented as a conditional, block, lambda, exception, or whatever.
← PreviousPage 3 of 18Next →