As I get older what to do with books collected over a lifetime is something I more often wonder about.
HN user
anthay
I'm a programmer.
I wrote some stuff here: http://howtowriteaprogram.blogspot.com/
I'm trying to complete this: http://logfilerobot.com/
Thank you for the links. Lovely online ELIZA. I appreciate you responding.
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.
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.
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)).
Hasn't this comment been made 100 times before?
Well, I believe you get more privileges in HN when you have more points. And it makes you look more attractive.
Ha! Well, I have 52 karma now. So I'm enjoying the view before the next downvote comes along. :-)
Thank you. I'll do my best.
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.)
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.
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."
I posted one yesterday. https://news.ycombinator.com/item?id=20722765
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.
Join XR? https://rebellion.earth/
If you sum all the numbers in your input do you get the right answer?
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...)
Sadly, I couldn't find it on archive.org.
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);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();
}I made a basic LISP-like JSON-like thing: http://loonfile.info
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
It was a private sale to a US company. I believe it was for an amount many times that figure.
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.
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.
It might also help to remind you about what you already have and what is truly important to you.
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?
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.)
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...
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/