Showing posts with label introduction. Show all posts
Showing posts with label introduction. Show all posts

Wednesday, December 25, 2013

Explaining Effes using easy words

I read a nice thing today: the person who wrote it was explaining what they do using only easy words. (He got that idea from another place.) That person works on some very hard problems, but he was still able to explain them. I thought I would do the same for Effes (which isn't as hard as what that other person does!).

In order to get a computer to do something, you have to say what you want in a different way than normal talking. There are many, many ways to do this, but only a few are used by most people. I want to come up with a new way of talking to a computer, but I know that it won't ever be used by most people. I'll probably be the only person to ever use it, if I ever finish it at all! So why do I want to do this?

First of all, it's fun. I like learning about new ways of talking to computers, so coming up with one of my own is interesting. This is the most important reason, and it's why I sometimes don't work on this for weeks, if I'm not in the mood. But I also have some ideas I haven't seen before, and which I think might be fun to try.

Most ways of talking to computers have a way of saying that one thing is a kind of another thing. This idea is very important. You can say that a dog is a kind of animal, and so is a cat. This means you can think of both a dog and a cat as being just an animal — in which case you can ask it to walk or eat — or you can think of a dog as exactly being a dog, in which case you can ask it to sit (which you can't ask a cat to do).

Most ways of talking to computers focus on that idea, but Effes focuses on another one: that a dog is an animal added with something that sits. This lets you add a dog with even more things — like something that chases balls. You can even say that something runs, eats, sits, and chases balls, without saying that it's a dog. That means if you have a horse, you can say easily that it does all those things, without having to say that there is such a thing as a "running, eating, sitting, ball-chasing animal," which a dog and horse are, but a cat is not (remember, the cat does all of those things except sitting).

This idea seems simple, but there are hard parts to it. A dog and a person can both eat, but let's say a person can get full while a dog never can (they like to eat a lot!). So if you have something, and all you know is that it eats (you don't know if it's a dog or a person), then it's hard to know if it should be full after it eats.

A bigger problem is if you add a dog and a person together. That doesn't really make sense, but you can still ask the computer to do it! If you have such a thing, and you ask it to eat, then is it full? Its person-half is full, but its dog-half isn't. But a thing can't be both full and not-full. (There are real cases that are like the dog-person but more normal, but for now let's focus on the dog-person.)

The answer to this problem in Effes is that sometimes the dog-person is both full and not-full, and the computer thinks about things both ways. But other times, you tell the computer that one of the halves is more important, and then the computer only thinks about that half's answer to the question, "are you full?" So if you ask if a dog-person is full after it eats, the answer could be "yes and no," or "yes" (if the person half is more important) or "no" (if the dog half is more important). You get to pick which it is.

So far, I have only thought about some of these ideas. My next step is to get the computer to actually start thinking in this new way.

Sunday, May 26, 2013

Introducing: Project Effes

As I was just saying, the primary goal of this blog is to talk my way through my pipe dream of a new language. I'm calling this language Effes, for a couple of reasons. The language will be functional, and it'll be geared towards scripting rather than hard-core, general programming. F, S... "Effes." It's also the Hebrew word for zero, which is about how far I can reasonably expect my new language to go.

The world already has a bazillion programming languages, nearly all DOA. I expect mine to join that list; in fact, it'd be a major accomplishment if it were even significant enough for someone to add it to such a list. So then, why the hell?
  • It'll be fun.
  • I'll need to implement it in some other language (at least at first?), and that will give me an excuse to try out Haskell or Scala. Or both?
  • I think I have some neat ideas, and I want to try them out
  • There's some semblance of a need, in that I'm not really thrilled with any of the current options for scripting. At least, not the ones I know of.
Those points are ordered pretty much in descending order of validity. Working on a project just because it'll be fun, well, nobody can argue with that. Thinking I'm going to actually solve a slightly-annoying problem is pretty wishful. But hey, why not.

Besides which, anything I come up with can't be uglier or slower than Ruby, right? No, but seriously.

In the next few blog posts, I'll describe some of those neat ideas I have. We'll see if this blog gets any further than that. I'll also throw in a rant about Optional<T> in Java. How's that for a teaser?

Saturday, May 25, 2013

What, again?

Alright, this is take three now. After a failed attempt at a "personal ramblings" blog, and another failed attempt at building the next huffpo, I think it's time to once again litter the web with my crap and mixed metaphors.

What makes this blog different from the previous two? In truth, probably nothing; I'll be surprised if it makes it past a dozen posts. We'll see.

Well then, why put the blog up? In part because I just bought a domain and need something to put here, and in part because this time I have some idea what I want to write about. I've been tinkering with an idea for a new programming language — because if there's anything the world needs, it's another programming language — and I wanted a place to explore some of those ideas, as well as general thoughts about programming. I might throw in some politics too. I don't know, I don't know if we'll have enough time!

PS: One of the earlier posts in my "personal ramblings" blog was about a set I humbly named Shavitian Subprimes. It's a cool little set, in which not only is every number prime, but every substring of the number forms a number that's also prime. For instance, 373 is such a number because 373, 73 (from 373), 37 (from 373), 7 (from 373) and 3 (from 373 and 373) are all prime. A friend burst my bubble when he told me that this set has already been discovered and cataloged. Womp womp.