News for hackers. Stuff that matters.

mattjones

Re:Why MIT switched from Scheme to Python on Wednesday March 25, 2009 @10:56AM (#531877)
That is a great demonstration that Scheme's problems are not Lisp problems. I'm hoping that we're about to see a lot more experimentation with new Lisp dialects.
Re:Why MIT switched from Scheme to Python on Wednesday March 25, 2009 @10:47AM (#531869)
From the point of view of a person at an instant in time, libraries are a concern. But when we're talking about Scheme being displaced by Python at MIT, where Scheme was developed 30 years ago, we really ought to ask what's been happening to Scheme during that 30 years.

The problem, at MIT and elsewhere, is that hackers don't like hacking Scheme enough. Python has more libraries than Scheme now, but that's not the main thing that made more people use it. People use it because they prefer the language. This is something that Sussman and others at MIT should be trying to understand, but it doesn't strike me that they are trying to understand it. They're just saying "Python has a better robotics library -- oh well!" as if this were something completely random that they have no control over. That doesn't seem like the sort of attitude that produced Scheme in the first place.

My point of contention with the comment I replied to is the idea that fixing the problem is a question of writing more libraries for Scheme. Writing or interfacing to libraries for numerics, 3D graphics, etc. is a trivial task compared to making a language hackers love.

Now, maybe hackers' distaste for Scheme is Scheme's fault, or maybe it's hackers'; but in any case, the issue is with the core language, not the libraries. And based on my personal experience with Scheme I would say that enough of the fault lies on Scheme's side that it's worth fixing.

Re:Why MIT switched from Scheme to Python on Tuesday March 24, 2009 @07:32PM (#531079)
Libraries aren't the issue. I use Chicken Scheme for a few things, which has plenty of libraries and a fantastic package system called eggs. Sure, other languages like Perl and Python have more libraries now, but that's not what made them popular.

What made them popular was the design of the core languages. I started using Ruby because it was faster to type and easier to remember how to do things than Perl, not because it had more libraries, which it didn't.

The problem with Scheme is that the core language isn't terse enough, and so it gives the impression that it will be hard to do things. And that's correct. Scheme requires much more typing and is harder to remember than Ruby.

Consider:

Ruby:

  h = {}
  h[:foo] = "hi"
  h[:foo] #=> "hi"
  h[:bar] #=> nil
Scheme (Chicken):

  (define h (make-hash-table))
  (hash-table-set! h 'foo "hi")
  (hash-table-ref h 'foo) ;; "hi"
  (hash-table-ref/default h 'bar #f) ;; #f
That, in a nutshell, is why people don't use Scheme. The people who made Perl etc. popular hate typing, and the core language of Scheme forces you to type a ton. There are other problems like really slow string functions, things that should be core being in SRFIs, libraries being called "SRFI 18" rather than normal things like "threads" so that it's extra hard to tell where a function is coming from, where its documentation is, or what you have to import to get it. Lack of libraries (if indeed that's a problem for you) is downstream of the core problem, which is that Scheme has a lot of clumsy design features that discourage would-be library writers from using the language a lot.

This isn't a Lisp problem, it's a Scheme one. A Lisp with a better core and enough users would get lots of libraries eventually, just like any language.

I think Scheme is good for teaching though, and would rather learn it in a course than Python.

Re:Mirror test shows magpies are self aware on Wednesday August 20, 2008 @06:51PM (#282140)
I don't think "self-aware" is the right way to summarize the results of these tests. One thing that this article doesn't say is that the mirror test is geared toward animals with good vision systems, and therefore is, to a large extent, testing spacial reasoning and visual acuity. Birds have great vision systems. It's necessary for flight, and also for picking out specks of food from a distance. A lot of mammals that are quite intelligent have poor vision -- like mustelids, for instance. The mirror test would make little sense for them.

There are other ways to be aware of your self besides through some complex optical phenomenon. For example, an animal might be aware of whether it can fit through that hole, jump up to that ledge, kill that enemy, or stand on that branch without breaking it. It might be aware of whether other creatures are able to see it inside its hideout, or if its cubs are hurt by its bite. "Self" is a rather broad and subtle thing.

Re:Paul Graham - from social shyness to patronizing on Wednesday July 16, 2008 @07:07PM (#248057)
How different my experience has been. I'm an avid drawer and programmer.

I don't know how similar the mental processes of drawing and programming are. But what I do know is that the state I'm in when I'm drawing feels the same as the state I'm in when I'm programming. When I'm deep into either, I often remark to myself how relaxing it feels.

If painting didn't feel like programming to you, maybe it was because you weren't good at it. When comparing hackers to painters, it only makes sense to compare people who are good at hacking to people who are good at painting. Doing something you're not good at involves so many hurdles and complications that are unique to the novice that all you're getting is noise. If you'd been drawing for as long as you've been able to hold a pencil, PG's thesis might not seem so bollocks.

Re:Ask YC: Django vs Ruby on Rails on Thursday May 22, 2008 @10:03AM (#197124)
I am using Sequel.
Re:Ask YC: Django vs Ruby on Rails on Wednesday May 21, 2008 @06:25AM (#195881)
with Ruby, you only have one choice.

I disagree vehemently. I myself have started using Ramaze, and like it better than Rails. In any case, it's more important to me to know Ruby well than a particular framework.

Re:Why Lisp Is Unpopular on Thursday April 03, 2008 @05:26PM (#154299)
I don't know the specific reasons why CL and Scheme are not very popular for those things; my general answer is that they're adapted to other things (like classrooms and smart students' brains). My point is that it's very hard to figure out, and so the best bet is probably to let a new dialect evolve in response to the demands of one or some of those environments.
Re:Why Lisp Is Unpopular on Thursday April 03, 2008 @01:45PM (#154049)
Actually, it might be more accurate to think of programming languages as genes rather than animals, or at least, to include programmers as an important part of the phenotype. A complication in the adaptation view is that programmers can stop certain "genes" from being expressed. So a language like Lisp might not catch on in certain environments because the features that would make it powerful, like metaprogramming, are never actually used.
Re:Why Lisp Is Unpopular on Thursday April 03, 2008 @12:18PM (#153939)
"Unpopular" needs to be further qualified. Rather than ask, "Why is Lisp unpopular?", ask, "Why is Lisp unpopular for X?". Lisp is actually reasonably popular for some things, and it's those things to which existing dialects are best adapted. Being well adapted to Y often means not being especially well adapted to X, even if it's for subtle reasons.

It's like asking, "Why are Arctic foxes (Alopex lagopus) not very popular on the African savanna?" Because they didn't evolve in response to the demands of that environment. The bat-eared fox, Otocyon megalotis, did.

The differences between Alopex and Otocyon aren't so massive that they seem like totally different kinds of animals. But it would be tricky to predict exactly what they should be, and develop the right kind of fox in a lab. Some adaptations are obvious (thick fur), other less so (specialized circulatory system). I suspect the same is true for programming languages. It's tricky to determine exactly what makes Scheme better suited to the classroom than to developing general applications. Perhaps the best way to solve the problem is the way PG is doing it with Arc, which is to take a very young, malleable dialect of Lisp and plunk it down in the environment to which you want it to become well adapted, and then continue development in response to the demands you encounter.

Interesting question. Perhaps we will witness a renewed proliferation of domesticated animals in this millennium, a sort of "domestication 2.0". Robotics may actually help inspire it, along with our knowledge of so many more kinds of animals. As robot designers study lots of different critters to improve their products, people will start thinking, "Hm, some of these animals have skills." The range of animals we've made use of so far is probably tiny compared to the range that could be useful. And our ability to breed or engineer them in desirable directions has improved a lot. So yes, maybe there will be real mules too, or some other kind animal we haven't thought of yet. (Have you ever seen guide horses? http://www.guidehorse.org )
This excites me. If they become common, people are going to spend a lot of time exploring the world -- an antidote to sitting behind your laptop all day.

These things would make great pack animals. When you go hiking, you'll be able to toss your gear into one of these things and have it trot along behind you. You'll be able to take more risks because robots will be able to rescue you from tight places. If you get tired or sick, you'll be able to ride them.

It's funny to think that the streets of San Francisco in 2100 might superficially look like a town in a developing country. ("Oh, those aren't mules in the street, they're robots.")

Re:Awaiting the Day When Everyone Writes Software on Friday February 29, 2008 @03:55PM (#126315)
Hungarian notation, perhaps.
Re:(1..100).inject(&:+) on Monday February 25, 2008 @04:29PM (#123363)
To some degree, using open classes is just how you write functions in Ruby.

Say there exists a class called Errors in some Ruby library. It doesn't have an each() method, but I'd like it to. Nobody would complain if I wrote a function each_error() which took an Errors object as an argument. Reopening the Errors class and giving it an each() method is the way you do that in Ruby, and it's not really any more dangerous.

Re:Should ORMs Insulate Developers from SQL? on Monday February 25, 2008 @02:55PM (#123277)
I don't think the problem is developers being afraid of SQL. There are still lots of Perl and PHP programmers who don't use ORMs. Instead, ORMs have been sold on the idea of database abstraction, and programmers have been made to feel that using raw SQL is bad practice.
Re:Should ORMs Insulate Developers from SQL? on Monday February 25, 2008 @12:48PM (#123190)
Constructing queries actually isn't one of the things ORMs do very well, so far. What they do well is provide a layer of logic for things like validation, triggers, and security.

Whatever backend your persistence system uses, you'll probably always want to take advantage of tools that are geared to that. If it happens to use flat files, there will probably be situations where you'll want to use grep, or cp, or cat. If it happens to use an RDBMS, there will probably be situations where you'll want to use SQL. I imagine this will be the case for a long time.

So far, I've been dubious of query-generating ORMs (except for basic CRUD), but I'm guessing that that's partly because they've been awkward. They've been getting better though. And I think the quality of the SQL-generating abstractions, and the languages they're written in, makes a big difference. If the abstraction is less powerful than SQL it will be annoying. If it's more powerful it won't be.

How could it be more powerful? By being written in a powerful language; by starting with a low-level, comprehensive mapping to SQL expressions and then using the power of the programming language to build up from there. I know that some Lisp packages offer such mappings, but I don't know much about working with them. It would be interesting to have a play though.

Re:Ask YC: Why? The more time I spend here the more I get done. on Thursday February 21, 2008 @07:46AM (#120383)
Here's a possibility:

I've noticed that the more time I spend here, the less tolerance I have for other sites. So while I spend more time here than I used to, I spend much less time on other, less relevant sites than I used to. The time I have to do work is actually the same or greater.

Re:One benefit of a Lisp-driven website on Tuesday February 12, 2008 @06:19AM (#113937)
As a primary interface for blogging, perhaps not. But using irb and your ORM as an admin interface to your database? Absolutely.
Re:One benefit of a Lisp-driven website on Tuesday February 12, 2008 @06:04AM (#113929)
And it doesn't matter anyway. He's talking about adding records to the DB and uploading images, the same things you'd do through a web interface.
Re:World's most maintainable programming language on Thursday May 17, 2007 @07:02AM (#22750)
There's a place in the comments of the last article in this series where a guy called Tony says, "I have one word: Scheme." And chromatic replies, "I wonder if a language that sticks so closely to the lambda calculus is comprehensible to non-math geeks."

This kind of perspective (chromatic's) is a problem. The thing is, programming languages with the property that you can build powerful abstractions and still keep the program comprehensible and maintainable almost certainly will be closely coupled with some areas of mathematics. Things with such powerful and peculiar properties usually are.

It doesn't mean that the thing in question can only appeal to math geeks. One thing you can do with Scheme's abstraction power is build abstractions that do not seem especially mathematical.