HNHacker News
TopNewBestAskShowJobs

anthay

54 karma · joined February 27, 2013

I'm a programmer.

I wrote some stuff here: http://howtowriteaprogram.blogspot.com/

I'm trying to complete this: http://logfilerobot.com/

submissionscomments
anthay··on The Ever-Difficult Task of Saving and Discarding Beloved Books
As I get older what to do with books collected over a lifetime is something I more often wonder about.
anthay··on ELIZA is Turing Complete
Thank you for the links. Lovely online ELIZA. I appreciate you responding.
anthay··on ELIZA is Turing Complete
I agree with you. I think the presence of START is accidental and is not supposed to be part of the script. The ELIZA code uses a Slip function called LISTRD to read the script rules one by one. If it reads an empty list it stops reading the script and begins the conversation. So I think the empty list at the end of the script had a reason to be there. Another accidental thing about the script in the CACM paper is that there are 6 duplicated lines, each one 34 lines from the previous one. I had not heard of Moiré logic. I'm contributing to a book about ELIZA and its legacy. No publisher yet. The editors may be looking for other contributors. I realize this is not much to go on, but say if it might be of interest to you.
anthay··on ELIZA is Turing Complete
Weizenbaum says the list must be there, but may be empty: "Finally, the script writer must begin his script with a list, i.e., a message enclosed in parentheses, which contains the statement he wishes ELIZA to type when the system is first loaded. This list may be empty." page 42 of the 1966 CACM ELIZA paper.

And the MEMORY keyword "must be an ordinary keyword as well." So you'd need a (XYZZY ...) rule.

Also, the START symbol appears in the DOCTOR script, but is never mentioned in the body of the paper.

Another thing Weizenbaum doesn't mention in his description is the final empty list in the DOCTOR script. This does seem to be expected by the code.

anthay··on ELIZA is Turing Complete
That's really cool. (The paper uses the palidrome example to try to demonstrate how a Turing machine might be encoded in an ELIZA script.) ELIZA scripts must begin with some opening remarks, e.g. (HELLO. PLEASE TELL ME YOUR PROBLEM), and they must have a MEMORY rule, e.g. (MEMORY PALIN (0 = 1) (0 = 1) (0 = 1) (0 = 1)).
anthay··on Things to Read to Become a Better Human and Developer
Hasn't this comment been made 100 times before?
anthay··on Ask HN: Why am I stuck on 51 HN karma points?
Well, I believe you get more privileges in HN when you have more points. And it makes you look more attractive.
anthay··on Ask HN: Why am I stuck on 51 HN karma points?
Ha! Well, I have 52 karma now. So I'm enjoying the view before the next downvote comes along. :-)
anthay··on Ask HN: Why am I stuck on 51 HN karma points?
Thank you. I'll do my best.
anthay··on Ask HN: Why am I stuck on 51 HN karma points?
All I did was submit this Ask HN here. I've not posted a link to it anywhere. As I write the post has 13 points and I have 51 points. Again. I'm sure my life would be much better if only I could escape from the clutches of 51. (I've been down to 49 and up to 52 since I posted.)
anthay··on Ask HN: Why am I stuck on 51 HN karma points?
Thank you. So for example, and I realise this isn't a great news story, this Ask HN post of mine is showing me it has 6 points (upvotes?), but my karma is still 51.
anthay··on Ask HN: Why am I stuck on 51 HN karma points?
Awesome, back to 51 points. Is it because I'm talking about karma and get automatically downvoted? I don't usually mention karma and yet still my little 1 point doesn't get added to my "score."
anthay··on Ask HN: Why am I stuck on 51 HN karma points?
I posted one yesterday. https://news.ycombinator.com/item?id=20722765
anthay··on Ask HN: Why am I stuck on 51 HN karma points?
I see after your comment I've jumped to 52 points.

Usually, I write a short reply on some thread and although my post shows me "1 point by anthay" my karma doesn't change. I'm sure it used to.

anthay··on NOAA Data Confirms July Was Hottest Month Ever Recorded
Join XR? https://rebellion.earth/
anthay··on Advent of Code 2018
If you sum all the numbers in your input do you get the right answer?
anthay··on Advent of Code 2018
I did the AoC last year for the first time and was amazed how quickly some participants solved the puzzles, e.g. < 60 seconds. (I wrote about my experience here: http://howtowriteaprogram.blogspot.com/2017/12/advent-of-cod...)
anthay··on BYTE Magazine's Lisp issue (1979) [pdf]
Sadly, I couldn't find it on archive.org.
anthay··on Pascal at Apple
It's probably a bit late for this reply, but... Another clumsy workaround is to use operator(). Again, standard C++ and this one has access to local variables:

    int g()
    {
        int x, y;

        struct local {
            int & a_;
            int & b_;
            local(int & a, int & b) : a_(a), b_(b) {}
        
            int operator()()
            {
                return a_ + b_;
            }

        } nested(x, y);

        x = 99; y = 1;
        return nested();
    }

    assert(g() == 100);
anthay··on Pascal at Apple
In the past I've sometimes used standard C++ local structs to nest functions. E.g.:

    int f()
    {
        struct local {
            static int nested_func()
            {
                return 123;
            }
        };

        return local::nested_func();
    }
anthay··on STON – Smalltalk Object Notation (2012)
I made a basic LISP-like JSON-like thing: http://loonfile.info
anthay··on What does it take to be a good programmer?
Will you permit a couple more quotes apropos taste?

"Good judgement is the result of experience and experience is the result of bad judgement." - Mark Twain

and

"To write a good program takes intelligence, taste, and patience. You are not going to get it right the first time; experiment!" - Bjarne Stroustrup

anthay··on Big IPO, Tiny Payout for Many Startup Workers (2015)
It was a private sale to a US company. I believe it was for an amount many times that figure.
anthay··on Big IPO, Tiny Payout for Many Startup Workers (2015)
You may well be right and to be honest I don't really understand exactly what happened. But I do know I thought I'd get more than I did.
anthay··on Big IPO, Tiny Payout for Many Startup Workers (2015)
I was one of the first employees in a UK tech startup. I was given share options that I calculated represented about 0.5% of the value of the company. When the company was sold about 10 years later, making the founders multi-millionaires, I got about £30K. I was clueless and didn't realise the shares could and would be diluted many times.
anthay··on Hard Truths and Happiness
It might also help to remind you about what you already have and what is truly important to you.
anthay··on Powerwall 2 and Integrated Solar
I was pleasantly surprised to see prices quoted in £GBP - the Powerwall is available in the UK! But, we don't have enough sunlight here to run a typical house off-grid year-round, do we?
anthay··on Functional programming in C++
That's cool and I agree about the advantages you mention.

In your code \n must be a line separator rather than a line terminator. (Otherwise, if the last line is \n terminated, the function returns 0.)

anthay··on Functional programming in C++
The Medium article has been removed. I think the same article (possibly under a different author's name?) appeared here https://github.com/Dobiasd/articles/blob/master/functional_p...
anthay··on Hjson, the Human JSON
Off topic, but related: I made a simple data-serialisation file format based on S-expressions, which may be of interest to some: http://loonfile.info/
Page 1 of 2Next →