Showing posts with label language. Show all posts
Showing posts with label language. Show all posts

Wednesday, February 27, 2008

If Programming Languages were Lego...

  • Assembly would be a huge set of 1x1 blocks. You could do everything other blocks could do, and more, but it took a lot of time and planning to put them all together the right way.
  • C would be 1x1 with a few 2x1 and 4x1 thrown in for convenience.
  • C++ would be just like C, but there would be all these new highly specific pieces which would only be used by a few people. Of course, there would be a large collection of prebuilt objects like roads, and doors and windows, and roofs that you could put together.
  • Java would be a set of Duplo. Easy to learn, but bulky, crappy, and basically needing about 2 layers of blocks below your own to be able to do anything useful. And you would need all kinds of wrapping objects to reach to a particular height, because Duplos are twice the height
  • Python would be a mix of Legos and Technic, easy to read, yet able to do all kinds of complex cool stuff you wanted too. But each part would be made out of silicone, to be moulded to almost any kind of arrangement.
  • Ruby would be like Python, but with a added Framework and a community with their own Religion.
  • PHP would be what happens when different Legos end up mixing on the floor. You would have thousands of pieces, but gluing them together would be difficult, because you wouldn't know what they were called.
  • Factor and other stack based languages, would be the dark horses. Lego bricks with connectors on only one side. Fun to use, but a bit challenging as well.

This is a work in progress, I haven't got all the right comparisons yet.

Sunday, February 17, 2008

Why factor is cool

Before beginning, I must admit I haven't messed with Factor for a couple of weeks now, nor do I contribute to it, I'm a Factor n00b. Please contradict peacefully.

Of course there are the usual reasons that it is open source, most of the standard libraries are in Factor itself, and that it has a really cool development environment. But almost every popular language these days has all that stuff.

The real reason I think factor is cool is because it still isn't near complete!

It's small and so the sense of community is much stronger, you can be the first to do things in Factor, when they've already been done elsewhere, and anyone with a decent education and experience could easily grok the theory too.

Small syntax


I would say Factor's basic constructs are even smaller than Python's. Just knowing a few shuffle words and USING:, defining words and quotations, gives you almost everything you need to know.

Everything else is just built on top of this.

Small population


At present Factor users are probably just in 2 digits. And there are no products (that I know of). Which means you could probably restructure the whole language without affecting anyone. This allows Factor to improve by rewrite, rather than by add-on.

Educational


Writing libraries for a new language means doing stuff that most have probably never done. So you have to learn about Unicode, or just traverse strings recursively (?!?) like I had to do in brainfacktor. ( Could it be better? )

Basically by keeping the core small, keeping a single stack and enforcing recursion by not having loops, Factor really forces iterative programmers to go stack based/functional. And that itself is a lot of fun, even though it is hard.

Reading about all the developers coding the standard libraries is also very informative, as is looking through the Factor sources.

And it would be fun to look at the interpreter, though I've never done it.



So that was my attempt at some evangelism :D

Most programmers are atheists

If this survey represents a signifact portion of them. Of course these are the programmers who are involved on the web, not much of all the zombies coding for the sake of it.

Thursday, September 20, 2007

Wanna learn a language. Try Mango

I learnt through Lifehacker
about new site Mango which aims to make language learning free, quick and easy. So I just played around with it for a few minutes and it seems to be really good.
The first thing I really liked was the password less login. You basically just register with your email id and use that as the login. It's really annoying when a site which doesn't hold any of your private information requires a password.
Created in flash, it requires flash 9. But the interface is quite snappy and quick loading, without unnecessary bloat.
I tried the french lessons, and apart from loading quickly they were of high quality. On of the coolest things is that each phrase is colourcoded and anchored. So you can click on a specific phrase to hear it again. The slides constantly make you remember what you just learnt a few minutes ago, but that tends to get a bit repetitive and should perhaps be spaced out wider.
Overall Mango is really good for a beta. I look forward to learning something from it.