7 ms·
I'm writing a book about algorithms and Lisp
- kkarakk 7y ago>The book will be freely available with a CC BY-NC-ND license. And yet there is no link to any existing download[sad cat sounds]
- phoe-krk 7y ago> will That's future tense that you just quoted. From the first paragraph of the blogpost: > Now, I'm, finally, at the stage when I can start publishing it. But I intend to do that, first, gradually in this blog and then put the final version — hopefully, improved and polished thanks to the comments of the first readers — on Leanpub.
- agumonkey 7y agoAlso HN didn't keep my edited title. I did add a [WIP] tag ..
- justanegg 7y agowould be nice to have a book with a bunch of algos and pseudocode to implement into any language you see fit.
- numlock86 7y agoMy thought exactly. Lisp is probably okay (if not even one of the better choices) to get the general message transferred, though.
- drainyard 7y agoSomething like CRLS? That is fairly implementable pseudocode, but maybe still too hand wavey at times.
- abc_lisper 7y agoIt really is; it's irritating that they say it can be trivially proved with induction, robbing me from understanding the crux of the problem.
- IGI-111 7y agoIsn't that pretty much what CLRS is for?
- okaleniuk 7y agoIf you don't know Lisp, it would be basically a pseudocode in prefix notation for you. It takes some time to get used to reading s-expressions, but it's not that hard at all.
- squarefoot 7y agoOver at Rosettacode they already ported a lot of stuff in a huge number of languages. https://rosettacode.org/wiki/Category:Programming_Tasks https://rosettacode.org/wiki/Category:Programming_Tasks As for books, I liked a lot Niklaus Wirth's "Algorithms + data structures = programs" a couple geological eras back. The book was written with Pascal in mind before the OOP era, but given Pascal's simplicity its examples can be easily translated in other languages. I'd consider more modern books if I knew any; the very few I've briefly skimmed in the past seem either too advanced or too abstract.
- Datenstrom 7y agoThat is basically what The Art of Computer Programming by Donald Knuth is and I cant recommend the books enough.
- cameronbrown 7y agoPseudocode isn't perfect though. It's prone to off-by-one errors among other issues. You end up having to describe the specifics of your "flavour" of pseudocode and at that point you've just made a language.. except it's not well thought out and isn't executable anywhere. TL,DR Just use a language designed for readability, like Python.
- vseloved 7y agoThe idea of this book is not be a 10th version explaining the same algorithms. It is as more about how to implement those algorithms for real — production-level stuff, so to say. And pseudocode isn't an implementation language, you will not face the same difficulties, and not get to feel the tools
- deleted 7y ago[deleted]
- varrock 7y agoMaybe this will ease my OCD brain of feeling like I need to get get an undergrad in CS to continue by programming career and "earn my stripes". Maybe all I need is exposure to algorithms to feel like I'm more fit for the job. This might do just that. Looking forward to it.
- agumonkey 7y agoThat's worth a separate thread. I'm digging deep into analysis and combinatorics[0]. But I'm fairly convinced that the market for this is small. Be sure to look at the situation when doing efforts. [0] I used to find it impossibly hard to work with trendy frameworks and preferred the mental bliss of hard topics. But at one point you need money and being good enough at making a company work can be a good compromise. As long as it's not too hellish.
- valw 7y ago> I'm digging deep into analysis and combinatorics Thanks, could you provide some material recommendations? I'll share one: I've really, really enjoyed 'Graph Theory' by Bondy and Murty (2007 edition): https://www.springer.com/kr/book/9781846289699 https://www.springer.com/kr/book/9781846289699. Disclaimer: it's much more focused on the mathematical / combinatorial aspects of graphs than on concrete algorithms, although there are some algorithms in there. Some math background recommended.
- agumonkey 7y agoThe classic suggestion is Brualdi, there's also R. Stanley Enumerative Combinatorics http://www-math.mit.edu/~rstan/ec/ http://www-math.mit.edu/~rstan/ec/ but right now I'm starting with basics on S. Gill Williamson Foundations of Combinatorics with Application. I don't mind pure reasoning, but I need practical programming uses to at some point. (maybe joblessness anxiety showing) I also have some graph books but since it relies on combinatorics rapidly ..
- harshreality 7y agoCombinatorial Problems and Exercises by Lovasz I don't know much in the way of more advanced expository combinatorics books, other than the more narrow Generatingfunctionology (Wilf) and the already mentioned Enumerative Combinatorics (Stanley).
- okaleniuk 7y agoI would advise to put quite an effort into syntax highlighting, naming, and all the other things that will help an untrained eye to read the code.
- regulation_d 7y agoOne thing I really love about Sandi Metz's POODR is how readable the code examples are.
- mark_l_watson 7y agoHe is planning on using LeanPub and they support specifying what programming language code snippets are written in so listings tend to look pretty good.
- reikonomusha 7y agoAny Lisp book that is written today owes it to the Lisp community and the rest of the world to write in a modern, safe, and digestible style. One issue with many Lisp books, especially older and self-published ones, is that they contain the author’s pet style or pet idioms, and they wouldn’t fly in a team environment. I think this is especially important because Lisp books are for learning, and if it’s just that much more difficult to Google(/ddg/AltaVista), it will be a frustrating disservice. Common Lisp has extremely reasonable and regular syntax if you stick to some basic rules and you don’t “flex” the language gratuitously. Written in such a way, the structure would be familiar to the modern Python or Java programmer. Yet the language is a workhorse when the problems get tough or gnarly. Looking forward to the publication of this book. Seeing introductory algorithms in modern Common Lisp would be a great resource.
- vseloved 7y agoThanks for the comment. The style issue will be addressed in the next chapter that is entitled "Crash-Course into Lisp"
- dtornabene 7y agoGoing to push back on this. Lisp is written to be "flexed". And people can and should write it however they want. I think treating students like they're all incapable of googling is utterly infantilizing and nothing about it serves any purpose other than stroking the authors ego. The vast, and I mean seriously vast, majority of programming books waste pages and often multiple whole chapters on treating the user like they can't find the documentation, like they can't reason about different syntactical constructions, and it leaves the learner hobbled and weakened when going out into the real world and trying to read, let alone write, actually code to accomplish a real task. People can cry about Paul Grahams style in ANSI lisp, or Let over Lambda, anyone who can work through either of those books is going to be fine reading Practical Common Lisp (or whatever). Also, finally, Common Lisp isn't exactly known for being a "team language" and the overwhelming majority of projects that I know of were originated by one person. I for one hope the author contributes his work in whatever way will he feels like. Lisp is a liberating language to use, we should write about it in the same way
- spraveenitpro 7y agoCan u make a JavaScript version?
- cpursley 7y agoSigh...
- hota_mazi 7y agoIt's a legitimate question. As much as I love Lisp and prefer it over Javascript, focusing an algorithm book on just Lisp considerably reduces its audience.
- vseloved 7y agoI would suggest you to read it before jumping to conclusions (as the new chapters will be published). Lisp will not be the main focus of the book, for those who don't plan to use it at work, it may be perceived just as pseudocode. As for Javascript, I believe that explaining algorithms using it is counterproductive as the language has too many limitations that will impede expressing everything I need idiomatically. I'm not saying that you can't program algorithms in JS, but it's not pleasant and productive. Besides, JS is not the language I'm interested in, at all
- kazinator 7y agoThe audience for a JS book is is also possibly tiny; people who want a JS book already either already have one (or more) and are not looking, or else are likely going to choose one of the many JS books that you didn't write.
- cameronbrown 7y agoThe flaws with JS run deep, but it's still the most accessible language out there today. And it does have the most impact. Anybody can make a website. That being said C/C++, Python and Go are more fun for implementing pure algorithms/data structures as the language constructs are more designed around that.
- cpursley 7y agoThis seems like the perfect book to round out these: - Berkeley: Structure and Interpretation of Computer Programs [Racket version] (http://berkeley-cs61as.github.io/textbook.html http://berkeley-cs61as.github.io/textbook.html) - Duke: Discrete Math [Racket] (https://www2.cs.duke.edu/courses/spring15/compsci230/syllabus.html https://www2.cs.duke.edu/courses/spring15/compsci230/syllabu...) Can anyone recommend other core CS books/courses that uses Lisp (or variants) or other functional languages?
- Areading314 7y agoParadigms of Artificial Intelligence Programming (Norvig)
- nextos 7y agoLisp in Small Pieces
- abc_lisper 7y agoThis book is poetry. If you have never seen it, please check it out.
- nextos 7y agoIt's one of my favorites along with SICP, CTM, PAIP and The Art of Prolog.