Best products from r/ProgrammingLanguages
We found 27 comments on r/ProgrammingLanguages discussing the most recommended products. We ran sentiment analysis on each of these comments to determine how redditors feel about different products. We found 30 products and ranked them based on the amount of positive reactions they received. Here are the top 20.
1. Compiling with Continuations
- Save up to 15% when buying these two titles together.
- The Pragmatic Programmer cuts through the increasing specialization and technicalities of modern software development to examine the core process--taking a requirement and producing working, maintainable code that delights its users.
- It covers topics ranging from personal responsibility and career development to architectural techniques for keeping your code flexible and easy to adapt and reuse.
Features:
2. Object-Oriented Programming in COMMON LISP: A Programmer's Guide to CLOS
- Used Book in Good Condition
Features:
4. The Systems Bible: The Beginner's Guide to Systems Large and Small
General Systemantics Pr
5. Modern C++ Design: Generic Programming and Design Patterns Applied
- Used Book in Good Condition
Features:
6. The Optimal Implementation of Functional Programming Languages (Cambridge Tracts in Theoretical Computer Science)
7. The Implementation of Functional Programming Languages (Prentice-hall International Series in Computer Science)
8. Type Theory and Formal Proof: An Introduction
- Cambridge University Press
Features:
10. Compilers: Principles, Techniques, and Tools (2nd Edition)
- O Reilly Media
Features:
13. Structure and Interpretation of Computer Programs - 2nd Edition (MIT Electrical Engineering and Computer Science)
- New
- Mint Condition
- Dispatch same day for order received before 12 noon
- Guaranteed packaging
- No quibbles returns
Features:
14. The Design of Design: Essays from a Computer Scientist
- Small, Light Weight Hanger supports only 3 pounds
- 1 1/8" Long x 9/16" Wide Triangle Strap Hanger
- Includes 100 #6 x 3/8" Combo Top Slotted/Phillips Screws
- Small One Hole Ring Hanger for Wood Picture Frames supports 3 pounds
Features:
15. Computer Systems: A Programmer's Perspective (3rd Edition)
- Privacy And Decoration: Con-Tact Brand Clear Covering Film Provides Some Window Privacy While Still Allowing Tons Of Natural Light To Shine Through Your Home. It Is Ideal For The Front Door, Windows, Glass Kitchen Cabinet, Bathroom Or As Etched Glass Decor. It Can Assist To Retain Heat In Winter Comfort And Keep It Out During The Summer
- Diy: Use This To Protect Items In Your Home Such As Kitchen Or Bathroom Counters, Shelving, Cabinets, Furniture, Windows, Crafts, Bookcases, Book Covers, Doors And More. Suitable For Smooth And Flat Surfaces
- Get Creative: Con-Tact Brand Clear Covering Shelf Liner Can Be Used For Fun Artistic Projects That Include Scrapbooking, Invitations, Party Décor, Center Pieces, Making Snowflakes, Creating Window Patterns, Stencils, School Projects, Etching And Sketching, And So Much More. Let Your Creative Juices Flow
- Generously Sized Roll: Con-Tact Brand Rolls Can Come In 3 Different Sizes At 18-Inches Wide By 9-Feet, 20-Feet, Or 60-Feet Long Rolls
Features:
16. Hacking: The Art of Exploitation, 2nd Edition
- Easy to read text
- It can be a gift option
- This product will be an excellent pick for you
Features:
17. Design Concepts in Programming Languages (MIT Press)
NewMint ConditionDispatch same day for order received before 12 noonGuaranteed packagingNo quibbles returns
18. Concepts of Programming Languages (11th Edition)
- Easy installation by hand
- Secure mugs, feeders, kitchen towels, etc.
- 18 per package
- Easy to use
- Made with steel
Features:
Oh wow, I just went down the rabbit hole of CPS, SSA, and ANF while developing my compiler for a strict Haskell-like functional programming language.
I read the outstanding book by Appel on compiling using CPS, and was all ready to go to refactor my pre-LLVM IR to be CPS. Then I did more research and realized that while a number of optimizations are very natural in CPS, compiling CPS to machine code is not as simple. It felt like a really daunting project, and after wrestling with my CPS transformations for about a week I filed a CPS IR away in the "research again someday" bucket.
The best intermediate representation for a functional language I've found is A-Normal Form (ANF). Here is the original paper on the subject. The argument goes that ANF is much more compact and easier to understand than CPS, and still enables almost all of the same optimizations. Some recent work with join points in GHC and a few other papers/theses I read (linked below) convinced me that ANF was going to be my choice of IR.
I highly recommend sticking with LLVM. It is a very mature ecosystem and it gives you so much "for free". I think it's neat that my optimization pipeline will look like:
Even now, I only have some very rudimentary optimizations implemented for ANF, but turning on
-O3
when compiling to LLVM makes my toy programs just as fast as equivalent programs I wrote in C. I feel like using LLVM gives you the best of both worlds between ANF and SSA; you hand-write your ANF transformations in your compiler, and let LLVM do the neat things that can be done with SSA optimizations. Note: I am no compiler expert. Maybe I'm being naive in thinking the LLVM optimizations after ANF optimizations give me that much. I'd be happy for someone else to chime in here :)Lastly, you mention ease of use and the ability to get started as important criteria. In that case something like ANF to LLVM is the obvious choice.
Good luck!
---
If anyone is interested, I gathered a lot of resources while researching CPS/ANF/SSA. I'll just dump them here:
Andrew Appel wrote a book called Compiling with Continuations
(https://www.amazon.com/Compiling-Continuations-Andrew-W-Appel/dp/052103311X),
where he explains how continuations can be used as the back end of a compiler.
Lots of stuff since then has been written on how using continuations makes lots
of optimizations a lot simpler, and how it is pretty much equivalent to SSA.
More stuff:
https://www.cs.indiana.edu/~achauhan/Teaching/B629/2006-Fall/CourseMaterial/1998-notices-appel-ssa_fnprog.pdf
https://news.ycombinator.com/item?id=7150095
ftp://ftp.cs.princeton.edu/techreports/1988/183.pdf
http://manticore.cs.uchicago.edu/papers/ml16-cwc-llvm.pdf
https://www.microsoft.com/en-us/research/wp-content/uploads/2016/11/compiling-without-continuations.pdf
https://www.microsoft.com/en-us/research/wp-content/uploads/2007/10/compilingwithcontinuationscontinued.pdf
http://code.ouroborus.net/fp-syd/past/2014/2014-08-Sloane-CPS.pdf
https://jozefg.bitbucket.io/posts/2015-04-30-cps.html
ANF and SSA resources:
https://slang.soe.ucsc.edu/cormac/papers/pldi93.pdf
http://mlton.org/pipermail/mlton/2003-January/023054.html
https://www.jantar.org/talks/zadarnowski03languages.pdf
https://www.jantar.org/papers/chakravarty03perspective.pdf
http://www.ccs.neu.edu/home/matthias/369-s10/Transcript/anf-vs-cps.pdf
Code Optimiziations for a Type-Directed Compiler for Standard ML. PhD thesis,
School of Computer Science, Carnegie Mellon University, December 1996
http://www.dtic.mil/dtic/tr/fulltext/u2/a326493.pdf
monorphic code should not be slower simply because the language supports
higher-level code.
functions.
recursive functions.
https://pdfs.semanticscholar.org/55bc/5ceee768223f4b233de568a7181297eb2c4d.pdf
Assignment. (IR'95, published as ACM SIGPLAN Notices, 3(30), March 1995)
http://mumble.net/~kelsey/papers/cps-ssa.ps.gz
Well I wasn't suggesting that the compiler infer the right allocation type. I was suggesting that there be tools so that programmers can figure out the allocation types to tell the compiler.
In other words it doesn't seem sufficient to just have a mechanism for the compiler to safely combine different allocation types. I would like some kind of dialogue and feedback with the compiler based on real measurements -- I actually don't want it to be magic.
Most GCs already use a fixed 2- or 3-level policy, e.g. a young generation and an old generation. But once you allow more flexibility than that, you not only have the opportunity for optimization, but also pessimization :)
I mean it depends how big the codebases you're targeting are. If you are thinking of 20K lines of code all written by one programmer, then yes maybe that person can do a great job of choosing the allocation type.
But if you're thinking of 100K or 1M line codebases written by many people, I think the mechanism is only beginning. Consider that C++ allows you tons of knobs to tune performance. Yet in real codebases people are not able to do it.
Here is an example:
https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/EUqoIz2iFU4
std::string is responsible for almost half of all allocations in the Chrome browser process; please be careful how you use it! In the course of optimizing SyzyASan performance, the Syzygy team discovered that nearly 25000 (!!) allocations are made for every keystroke in the Omnibox. We've since built some rudimentary memory profiling tools and have found a few issues:
This is in Chrome, one of the most widely used C++ programs out there. It is also highly optimized -- in some components, like v8. The quality of engineers is high; they all know how to write good C++, but when you put them all together the result is really suboptimal.
I have a pessimistic view of software -- one book that exemplifies it is this:
https://www.amazon.com/Systems-Bible-Beginners-Guide-Large/dp/0961825170
e.g. "large systems always operate in degraded mode". I don't think anyone would argue that's not true of the web -- it operates in a perpetual and permanent degraded mode (while being fantastically useful). While I don't understand that much about 3DWeb, the same could be true if it gets large enough.
Anyway this might seem like it's coming out of left field... it's kind of a philosophical critique. The point is that I like the idea of gradual memory management in the abstract -- in fact I have a really inefficient codebase now in OSH that might benefit from it. But I guess from the incomplete picture I have it seemed like a lot the annotations were for single variables? e.g.
lex
orvar
? That doesn't seem like it will work well in a large program. Maybe I am misunderstanding.I also think there is the idea of not devoting too much language real estate to one feature. I mentioned automatic data layout as a related performance optimization that could be just as important, and you might need "room" for that in your new language Cone.
tl;dr:
Here's my attempt to be helpful!
Regarding Asperti and Guerrini, there are a few people on this subreddit who are working on cutting edge research compilers for functional languages based on term-rewriting. I've found this subreddit as well as r/Compilers to be very friendly and helpful in general, so I encourage you to take advantage of them. Ask questions, bounce ideas off of people, etc.
I thought the extreme use of comic sans on this site was pretty amusing. :D
The Lambda Cube is pretty cool - http://www.rbjones.com/rbjpub/logic/cl/tlc001.htm - I'm not sure the page does the best job at explaining it though. The first time I saw a good explanation was in Type Theory and Formal Proof: An Introduction.
I've peeked at this free online book a few times when implementing things. I think it's a pretty solid reference with more discussion of these sorts of things!
Another option is a "real" textbook.
My programming languages course in university followed Programming Languages: Application and Interpretation (which is available online for free). It's more theory-based, which I enjoyed more than compilers.
But the dragon book is the go-to reference on compilers that is slightly old but still good. Another option is this one, which is a bit more modern. The latter was used in my compilers course.
Outside of that, you can read papers! The older papers are actually pretty accessible because they're fairly fundamental. Modern papers in PL theory can be tricky because they build on so much other material.
TPL is great for type theory stuff.
I'm working through Compiling with Continuations right now, and it's pretty good as a practical way to specify semantics that also has a history as useful in compilers. Matt Might's writeup gives a flavor.
All of your questions are pretty much the set of reasons why the Lisp family of languages was invented. Have a look at Common Lisp, Scheme, and the many programming languages books based on these languages. An "introductory" one is here, and advanced one here, and an even more advanced one here.
(Check whether there are newer editions of these. You'll probably want the newest ones so that you can easily type their code into a modern Scheme or Common Lisp implementation.)
I would say go with whatever your computer uses so that you can follow along (unless your computer uses something really obsucre).
As for books, I can only really recommend the places I learned X86 from which would be Hacking: the art of exploitation since it puts assembly the context you'll find it most often (looking through assembled code) so you learn many useful tools along the way. Also the textbook I had in college (you can find it cheaper if you look around) which covers many other topics too relating to computer memory and whatnot.
Though for just learning some basic assembly, look for some simple resources online. It's not too hard to learn generally speaking so you should be fine.
Yes. Here are some papers about it if you're interested: https://web.archive.org/web/20050510122857/http://www.iis.sinica.edu.tw/~trc/languages.html They refer to earlier work which again refers to Lisp and a precursor of CLOS.
The Art of the Meta Object Protocol describes the MOP. If you're looking for a general book about CLOS then you could e.g. have a look at https://www.amazon.com/Object-Oriented-Programming-COMMON-LISP-Programmers/dp/0201175894.
Thanks.
Are MOP and CLOS the same thing?
Now there are three books mentioned
What are your suggestions to read which books in what order? My post started from understanding the different object models in Python and Smalltalk.
Nice list. But how about DCPL, Design Concepts in Programming Languages?
You can get it from amazon: https://www.amazon.com/Mastering-Functional-Programming-techniques-programming-ebook/dp/B07DTF8N58
I suggest you to read the Dragon Book.
Foundations for Programming Languages by John C. Mitchell
Book: Design Concepts in Programming Languages (MIT Press).