HNHacker News
TopNewBestAskShowJobs

pavelludiq

2,130 karma · joined June 6, 2008

Nerd from Bulgaria. Im lazy, inpatient and excessively proud of my self.
submissionscomments
pavelludiq··on Ask HN: Lisp as a first language?
Doesn't matter too much. Any language that i listed will do the job. Just pick one and start writing code, any one of them will make learning lisp later easier.
pavelludiq··on Ask HN: Lisp as a first language?
There are several lisp dialects. Some of them have even been used for comercial games. Common lisp and clojure(the two most popular dialects) can be used to write pretty much any kind of software. But as a first language, I don't know. Scheme(the third most popular lisp) was my second language, and i had no trouble with it, but i already had a year of python under my belt. i'd say learn python, ruby or javascript first.
pavelludiq··on Ask HN: Which podcasts do you listen to?
Thanks for the link. I also recommend Hardcore History[1], by Dan Carlin. He recently did a series on the fall of the Roman republic, which I liked a lot. Dan Carlin also has a political podcast titled Common Sense[2], which is also very interesting even if a bit US centered.

[1] http://www.dancarlin.com/disp.php/hharchive [2] http://www.dancarlin.com/disp.php/csarchive

pavelludiq··on Ask HN: Did you learn a language this year?
Common Lisp, although I started learning it last year. I don't know if it counts, but I learned SQL and I’m currently studying relational theory in more depth. I also had to take a course on Prolog, but I'd be bullshiting you all if I said I knew prolog, I know enough of it to write factorial and reverse lists.
pavelludiq··on [dead]
If you're referring to the colors of the article numbers, that’s only for Christmas.
pavelludiq··on Lisp is Too Powerful
Scheme is a successor to Lisp, the same way motorcycles are a successor to trucks. Despite the syntactic and historic link, they are pretty much different languages(as is clojure). Although scheme is a descent intro to lisp-like languages, and racket is an awesome environment, both for teaching, and probably for actual work(haven't done any in it, so I’m only speculating about this), one piece of advice to those who chose to start with it is to keep in mind that scheme is only one way to look at what lisp is(and IMHO not the most enlightening or useful one), and its important to know what assumptions its creators made about what programming should be like.

As I pointed out in a comment at the beginning of the thread, scheme teaches you some habits that don't translate well to other lisps, so to those thinking of picking it up, be mindful of the assumptions of the language, and when you decide to look into other lisps, don't assume they will be the same there as well.

In fact i would actually recommend learning clojure or common lisp before scheme. I consider both of them to be better languages, but i have my own set of assumptions that might not be shared by others :).

pavelludiq··on Lisp is Too Powerful
Here is a short list of awesome lisp abilities, some of them not unique to lisp, but still interesting read: http://random-state.net/features-of-common-lisp.html
pavelludiq··on Lisp is Too Powerful
Is there a 'lispish' way to write code?

Yes. If you read enough Clojure, Scheme and Common Lisp code you'll see that they have their own different styles. On a few occasions I read Common Lisp code written by schemers, it was somewhat ugly and inelegant, although the same code would have been elegant if written in scheme. Here's an example from an Erik Naggum article( http://www.xach.com/naggum/articles/3195982690560792@naggum.... ). First the Scheme in common lisp:

  (defun make-account (balance)
    (labels ((withdraw (amount)
                       (if (>= balance amount)
                           (progn
                             (setf balance (- balance amount))
                             balance)
                         (format t "Insufficient funds")))
             (deposit (amount)
                      (setf balance (+ balance amount))
                      balance)
             (dispatch (m)
                       (cond
                        ((equal m 'withdraw) withdraw)
                        ((equal m 'deposit) deposit)
                        (t (format t "Unknown request -- MAKE-ACCOUNT")))))
      dispatch))
Perfectly reasonable way to do it in Scheme, not in Common Lisp. Heres how you do it in idiomatic Common Lisp:

  (defclass account ()
     ((balance :initarg :deposit :initform 0 :accessor balance)))

  (defmethod withdraw ((account account) amount)
     (decf (balance account) amount))

  (defmethod deposit ((account account) amount)
     (incf (balance account) amount))

  (defmethod withdraw :before ((account account) amount)
     (unless (<= amount (balance account))
       (error "~A has insufficient funds to withdraw ~A." account amount)))
I'll let the code speak for itself :)

Lisp allows you to turn code like the first example into code like the second.

edit: formatting

pavelludiq··on Lisp is Too Powerful
A well engineered lisp(and any other language actually) program isn't a stream of beautiful lines, but a set of components, any of which might have a complicated implementation, but all of which have a good clean interface. Lisp is beautiful not because it allows you to write beautiful 20 line programs, but because it allows you to design large systems that still have a chance to be maintainable, despite the complexity of the problem they are solving.

I can still show you examples of beautiful and horrible 20 line lisp programs, but I'd rather show you examples of large scale design. The most popular might be Emacs. Emacs has a million lines of elisp, imagine if it was written in java or C++, scary thought :)

In a large system like emacs you'll find many examples of beautiful and ugly code, but the overall system is still beautiful and maintainable. This talk by Stuart Halloway might explain what i mean by that: http://vimeo.com/1013263

In a nutshell, emacs is big, but small for its size, meaning that those 1000000 lines of lisp do much more than a million lines of java will ever be able to do. That property comes in part by using a lisp as an implementation language(and not a very good lisp at that :)

pavelludiq··on Ask HN: What functional programming language should I start with?
I've played around with at least half a dozen lisp dialects. Currently only Clojure and Common Lisp are good practical general purpose lisps(maybe Racket too, but I've only played with r5rs Scheme, so I don't know for sure). Both are excellent languages, both with their own strengths and weaknesses. After using Common Lisp for a while now, its my favorite language, and Clojure comes in as a very close second. IMHO these are the two BEST dynamically typed languages that are currently used in practice.

Choosing between the two could be hard, but my general advice is that if one prefers a more strict FP approach, Clojure is better, and if one prefers to have more choice over what paradigm to use when, a good multi-paradigm language like Common Lisp can make you happy. I happen to like the latter. Which reminds me, I have a lot of lisp hacking to do, enough HN for the evening.

pavelludiq··on Programming Languages: What tool is right for which job?
You wonder what would happen if we all wrote C++ on Windows? I hope you can answer that question yourself :).

But seriously, i think its great that we can all work in our favorite language, and we can get away with it. I can write a web service in common lisp, and you can use it in your Rails cat picture app, that also uses a brainf*ck script to convert the cat pictures in a suitable format. And your company can also write an iPhone version of your app in objC and a desktop version in C++ for windows and Linux. Man, protocols are awesome :)

pavelludiq··on Let me see your Lisp implementation. Here's mine.
If only all the toy lisps were instead patches for sbcl, abcl, ccl, clisp, clojure, racket, chicken or gambit...
pavelludiq··on How to Rock an Algorithms Interview
I have to disagree. How did those people become brilliant? Hanging around smarter people probably had something to do with it. That's why I joined HN in the first place, 1207 days ago I was probably among the most inexperienced, and stupid people on this site, probably still am, even though I've grown so much since. I think there is no shame in choosing the simpler route, but i can't make this choice for my self. I care too much about doing good work, even if i suck at it at the moment.
pavelludiq··on How to Rock an Algorithms Interview
I'll give you my point of view. I'm young(21), I'm in my third year as an informatics student, and I feel greatly intimidated by all these hard stuff. I can barely write a working web app, even with all the hand-holding modern frameworks give me. I don't consider myself smart(i'm bright enough to be a programmer, but nothing more).

Recently I sat down and thought about where I want to be in 5-10 years. I don't want to be writing django apps in 10 years, I don't want to write software that sort of works some of the time, and i don't want to be a replaceable commodity programmer working on outsourced software that the real programmers didn't feel like working on, so they send it to India, or Eastern Europe(which is where I’m from). Sure, I can make a comfortable living that way, but what I want to be in 10 years is a competent expert.

I want to work in diverse fields, with people much smarter than me, and the little knowledge and experience I can gain in my career I want to pass down to younger programmers. I want to wake up in the morning and be proud that I've build things that actually matter, and not just the latest social networking pop-culture crap that many of us are dealing with now. In short, i want to e a hacker!

To do this, I decided to dedicate myself to actually learn the hard stuff that most people shy away from, just because they can get by with only some python/ruby/php and jquery knowledge. Math, CS(algorithms, data structures, languages, compilers, architectures, networks, operating systems), science, philosophy, history, art, etc. All hard stuff that I'll never need to know in order to build a web store site for a small business that barely gets the web, get paid, and go wash the car on the weekend. Even if i can never learn all of it, even a fraction is better that writing the same simple web apps for 10 years.

pavelludiq··on The future of Lisp
Tools like Emacs and Common Lisp are exactly the kind that I actively seek. I needed novice friendly tools four years ago when I was starting with python, I don't need them anymore. You're a novice only once, you're an expert for life.

I was already playing around with Scheme and Clojure for at leas two years when I started learning Common Lisp, very few things have been exceptionally hard or foreign for me, loop was definitely not one of them.

That's the reason I get so hot-headed about these kinds of things. I have invested a lot in bettering my self as a programmer. Articles like this one insult years of hard work, and my own effort is just a very small part of it. People have been building these tools and communities for 50 years before I even knew what a computer was, dismissing it so lightheartedly pisses me off. I only hope others understand. Maybe I just have too high standards. Comes with being young I guess :)

pavelludiq··on The future of Lisp
With the risk of making myself sound even more defensive about common lisp that I already did, common lisp was not designed by a committee, it was standardized after a lot of use and discussion within the community.

p.s. And an expert is exactly what I want to become, I have no ambition to be a code monkey. I'm truly sorry if expertise and skill are valued less these days in the tech circles. "Good enough" is not good enough for me. I look up to the experts and brilliant minds of our community and aspire to be as good one day, I don't care much for the general case, i have no use for "a language for everybody".

pavelludiq··on The future of Lisp
Thank you for the response. I agree in general. But so far I haven't seen too much fruit in this discussion, because the lisp community(all dialects) has had this conversation too many times, I appreciate your submissions and blog posts that give us a new way to look at things, there are certainly much better topics for us to discuss. The future of lisp is certainly important enough, but we could have had just a better way of starting it(continuing it actually).
pavelludiq··on The future of Lisp
I love most lisps I’ve had the pleasure to study. When clojure prospers, I’m happy. When individuals express such opinions clojure does not prosper, because the rest of the otherwise excellent community now has to explain that not all clojure programmers are ignorant fanboys, the same way Common Lisp programmers now have to explain that it's not a dead language that's like C++ with more parenthesis, and scheme isn't all just about teaching, and yes, there are libraries we can use. Its hard enough to use lisp, why make it harder? No lisp dialect needs to push others down in order to prosper, were better than that.
pavelludiq··on The future of Lisp
Insulting Perl helped Python and Ruby, but I doubt that insulting Common Lisp and Scheme will help Clojure.

If the Clojure community thinks that its better to attract more Ruby and Java programmers, and alienate other lispers, please, keep producing ignorant crap like this.

Claiming Common Lisp is dead and comparing it to C++? Why should anybody listen to somebody’s extremely narrow minded opinion on THE FUTURE OF LISP, when that person has shown that he knows NOTHING about lisps past and present.

Mr. Fogus, you know much better that to post such ignorance to Hacker News. Keep Clojure awesome, don't let the fanboys spread FUD. Inter-dialect respect, yaw! :)

pavelludiq··on Results of the 2011 State of Clojure survey
As was noted in the article, protocols and multimethods seem to be somewhat undervalued by the community. Maybe its because so many new users come from Java, Ruby and Python, where you only have standard OO(whatever that means). It would seem prudent to me to address this issue, and popularize them more, with more tutorials or blog posts.

I don't use clojure much these days, but in Common Lisp I use generic functions(the original inspiration for protocols and multimethods) all the time, and find them the second most important feature of CL after macros.

pavelludiq··on Ask HN: How long does it take to learn Common Lisp
Lisp doesn't take any more time to get productive in it, than any other modern language. It takes a bit longer to really get it though. There are a lot of things in Common Lisp that take some time to sink in, because you rarely see them in other languages, like macros, generic functions, conditions, etc. But you don't need to know these things to start using lisp right away.
pavelludiq··on Ask HN: What book should I recommend to someone who just finished LPTHW?
After i learned python i went on to learn scheme,he might like "How to design programs". http://www.htdp.org/

I haven't been paying attention to the world of python books for a while, but i started with the O'Reilly books by Mark Lutz.

pavelludiq··on Ask HN: how to overcome paralysis by analysis when coding?
Use a language like lisp, or something sufficiently flexible, so you don't have to make such decisions too early. With lisp, changing your design later(after you've learned more about your problem) is really easy. Something like java or C++, not so much.

Read this: http://www.paulgraham.com/progbot.html

pavelludiq··on Lisp for web application development
Nothing in production. I've build a couple of clojure and common lisp toy apps, and a few 2D games in common lisp with lispbuilder-sdl(and like any other python programmer, I've build a blog in Django :D). This is my first serious attempt at a commercial system, since I'm still in school and have limited time.

p.s. try http://www.hnsearch.com/

pavelludiq··on Lisp for web application development
I recently began working on a web app in common lisp(hunchentoot, restas, postmodern). I chose lisp because:

* I love lisp. I admit that as long as i can't find a reason NOT to use it, i will.

* Me and my partner still don't know exactly what we want to do. We have a few ideas, but both of us are pretty inexperienced, both technically and business wise. Common lisp is excellent for experimentation and many people have had success using it to fill in the gaps in their knowledge about a certain domain. My next couple of weeks will consist of just building "stuff".

* I don't understand what other advantage does a full stack framework have, except that it made a bunch of choices for you(ORM,template engine, structure of your program). If I were to write an app in python, i might be tempted to use something like flask(or some other "micro-framework"). I like the idea of hooking together different libraries, rather than filling in the blanks of a full stack framework.

Basically I've found no reason not to use lisp, if you know it. Don't let the reddit story scare you, things have changed TREMENDOUSLY in the past several years.

Now there are a lot of common lisp success stories, i made the time to search for them(I'm not about to invest my entire summer in something without learning from others first :D). Check out mahmud's comments here on HN, for some of his experience, to cite just one example. Search, don't just ask. This this thread is mostly identical to at least 3 others I read in the past week while reading old threads about lisp and web development.

Another excellent lisp is clojure, and people have been using it for web apps to great success as well. I chose common lisp over it, because I prefer multi-paradigm languages over ones with stronger accents(whether its OOP or FP). But clojure is still my second favorite language, and if you're into FP, check it out.

pavelludiq··on [dead]
The site is fine, its the content thats been sucking lately, fortunately, theres this convenient and usable "flag" link, i think I'll use it.
pavelludiq··on Ask HN: How to get paid to program in Lisp?
I'm in the same position, and asking the same question :D I have a free summer, nothing to do, no money, and i can't be bothered to find a non-programming job.
pavelludiq··on Ask HN: What personal projects/goals are people working on for this summer?
I'm trying to teach myself how to write games using common lisp, and will be documenting my experience in the form of a series of screencasts. Mostly because i want to learn lisp better, learn game programming, and learn how to produce good screencasts.
pavelludiq··on Exploring Lisp Libraries - and building a webapp on the way
The confusion over the term "lisp" goes both ways, i have spent an infinite amount of time explaining to people that common lisp is not the small subset of a subset of scheme your CS professor tortured you with.
pavelludiq··on Why are Black Boxes so Hard to Reuse? (OOPSLA ’94)
Doesn't common lisp already give you most, if not all of those things?
← PreviousPage 6 of 22Next →