News for hackers. Stuff that matters.

anthay

As I get older what to do with books collected over a lifetime is something I more often wonder about.
Re:Eliza Is Turing Complete on Saturday November 19, 2022 @08:21AM (#33669794)
Thank you for the links. Lovely online ELIZA. I appreciate you responding.
Re:Eliza Is Turing Complete on Thursday November 17, 2022 @02:00PM (#33643841)
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.
Re:Eliza Is Turing Complete on Wednesday November 16, 2022 @02:24PM (#33629016)
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.

Re:Eliza Is Turing Complete on Wednesday November 16, 2022 @11:11AM (#33625497)
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)).
Re:Things to Read to Become a Better Human and Developer on Friday December 13, 2019 @07:15AM (#21780919)
Hasn't this comment been made 100 times before?
Re:Ask HN: Why am I stuck on 51 HN karma points? on Monday August 19, 2019 @01:45PM (#20739928)
Well, I believe you get more privileges in HN when you have more points. And it makes you look more attractive.
Re:Ask HN: Why am I stuck on 51 HN karma points? on Monday August 19, 2019 @01:42PM (#20739889)
Ha! Well, I have 52 karma now. So I'm enjoying the view before the next downvote comes along. :-)
Re:Ask HN: Why am I stuck on 51 HN karma points? on Monday August 19, 2019 @10:49AM (#20738211)
Thank you. I'll do my best.
Re:Ask HN: Why am I stuck on 51 HN karma points? on Monday August 19, 2019 @10:39AM (#20738129)
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.)
Re:Ask HN: Why am I stuck on 51 HN karma points? on Monday August 19, 2019 @07:56AM (#20736956)
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.
Re:Ask HN: Why am I stuck on 51 HN karma points? on Monday August 19, 2019 @06:08AM (#20736429)
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."
Re:Ask HN: Why am I stuck on 51 HN karma points? on Monday August 19, 2019 @05:57AM (#20736370)
Re:Ask HN: Why am I stuck on 51 HN karma points? on Monday August 19, 2019 @05:56AM (#20736358)
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.

Re:Advent of Code 2018 on Saturday December 01, 2018 @05:42AM (#18576219)
If you sum all the numbers in your input do you get the right answer?
Re:Advent of Code 2018 on Thursday November 29, 2018 @12:15PM (#18561801)
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...)
Re:BYTE Magazine's Lisp issue (1979) [pdf] on Thursday August 17, 2017 @07:40AM (#15035788)
Sadly, I couldn't find it on archive.org.
Re:Pascal at Apple on Tuesday July 25, 2017 @08:53AM (#14847298)
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);
Re:Pascal at Apple on Sunday July 23, 2017 @04:39AM (#14831419)
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();
    }
Re:STON – Smalltalk Object Notation (2012) on Wednesday March 15, 2017 @09:54AM (#13876077)
I made a basic LISP-like JSON-like thing: http://loonfile.info
Re:What does it take to be a good programmer? on Tuesday January 24, 2017 @03:18AM (#13469664)
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

Re:Big IPO, Tiny Payout for Many Startup Workers (2015) on Wednesday January 04, 2017 @08:36AM (#13318101)
It was a private sale to a US company. I believe it was for an amount many times that figure.
Re:Big IPO, Tiny Payout for Many Startup Workers (2015) on Wednesday January 04, 2017 @07:21AM (#13317643)
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.
Re:Big IPO, Tiny Payout for Many Startup Workers (2015) on Wednesday January 04, 2017 @05:32AM (#13317079)
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.
Re:Hard Truths and Happiness on Sunday December 04, 2016 @12:11PM (#13100652)
It might also help to remind you about what you already have and what is truly important to you.
Re:Powerwall 2 and Integrated Solar on Saturday October 29, 2016 @07:00AM (#12823462)
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?
Re:Functional programming in C++ on Tuesday September 27, 2016 @04:16PM (#12592751)
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.)

Older »