This (metaprogramming, macros, language as a datastructure in the language)is why I learned Julia, but R + R-studio still draw me back by being just so useful.
I read the first few pages and didn't see any content about R. The first chapter is an introduction to scheme. I scanned it and didn't see any R code all. It's an introduction to scheme that builds up to K means.
R does suck in so many ways, especially the object oriented systems and the horrible default libraries with so many inconsistent idioms, but we put up with it because mainly because it provides the most advanced open source ecosystem for modeling and visualizing data and it is also pretty fast, especially with data.table. If being fast is important we have Julia as a competitor. If having a better designed language with a reasonably complete ecosystem and sometimes being slower is OK we have python. Like pretty much every other domain area, there just isn't a competitive niche in data science for a lisp.
Also, R is already pretty functional and Lisp-like, sure it doesn't have prefix syntax, but it does have first class functions. Using various types of map (lapply, apply &c) is practically mandatory after a certain point.
I love the Wizard Book too, but this is embarrassing.
This is a mis-titled (disingenuous?) introductory book to Scheme, basically using R to draw eyeballs.
Also it's barking up the wrong tree. R is known for its statistics prowess and working with large datasets. ML/AI is just a small subset of it. What's the equivalence in Guile that deals with statistics and data processing?
I've written a jupiter notebook kernel for Guile Scheme https://github.com/jerry40/guile-kernel , I wonder if it is possible to set up a dedicated server using Jupyterhub and made it public in order to make articles about Guile more 'live' and perhaps put SICP examples there but I have no experience in this matter. If anyone give a piece of advice to me, I will be grateful.
Slightly off topic, but after reading a couple of pages from the pamphlet I don't think I'm going to change to a lisp like language anytime soon. My choice of language is between Python and R.
I'm in a position where I can freely choose my own language for my analysis and modeling work, and use Python and R in my day to day.
The thing that really put me off R is the opaqueness of the language. In python I like to think I have a rudimentary understanding of how the language is structured , and I can actually read error messages. But in R, if something fails all bets are off, and you just have iteratively comment out code to find the error.
Rstudio is usually given as a really great IDE for analysis, but it just crashes too often, and is slow to a point where you just have to wait minutes on end if you click the wrong variable.
Pycharm (professional) does the same as Rstudio, and more: I can plot, I can see variables, I have a working debugger and code completion is to my opinion as good as it gets.
Two things in python are not up to snuff: Plotting (ggplot2 is really good) and some statistical models. That's the reason why I still sometimes have to fire up Rstudio. I hope I can phase out R in my work as much as possible though.
Yeah, I do think that lisps have something to offer the stats community, but the “hey just build everything from scratch because look how easy these trivial examples are” sales pitch rings hollow to me. And I’m an avowed fan of lispy things.
I don't think there is anyone in the python ecosystem who is as good as Hadley Wickham at understanding data analysts and designing API's that a budding analyst can reason through and understand.
ggplot2 is of course the prime example. It simply and elegantly allows characteristics of your visualization to either vary based on data, or remain fixed to your specifications. Since so many data visualizations in science and industry are really variations on that theme, you can do the vast majority of what you want.
I don't understand how this relates to R? It starts of saying R is bad (agreed) but then what it just goes off on a tangent about something unrelated without really explaining what's better.
I've said this before and will say it repeatedly - R is a bad programming language by design to allow it to be a brilliant tool for stats/data science. Language geeks who approach data science from a comp sci background seem to miss this point - R works precisely because it's not a good language.
I'm perfectly happy to discuss a better alternative but without first understanding why R is used so widely in the first place misses the point of the discussion
So apart from not really being about R, this author also seems to completely miss the point of scientific computing: it's not about having the cleverest language, it's about having a solid ecosystem and community building useful tools (e.g. RStudio). People work around language warts pretty easily, most people doing scientific computing just need to get shit done and don't give a rats arse about the programing language arcana.
I'd expect a scientific language to be deterministic. A list of numbers as a single element inside another list sometimes in some functions returns the inner list, for example.
R already has a failed lisp predecessor: XLISP-STAT. I don't know that it was bad at all - it was developed by one of the core developers of R and by all accounts was numerically superior. I believe the conclusion regarding its demise was that lisp syntax just does not appear to captivate a large enough audience.
I’ve wondered out loud a few times whether Racket’s language-oriented could facilitate even better / more natural DSLs than R.
R has lots of little DSLs that reduces the cognitive burden of doing stats for people more concerned with applied research than programming. XLisp-Stat’s syntax barrier might have been overcome by better DSLs.
In the case of Racket, creating new syntaxes isn’t a barrier, though if someone needed to break out of the functionality of your DSL, they’d be right back to Racket (or some other equivalently expressive language like typed-racket or rackjure).
Projects like Julia are neat because they’re researching the possibility of building a high level language that obviates resorting to C, C++, and Fortran when speed is needed.
Equally interesting, but less sexy, is figuring out the human interaction aspect of statistical computing. R is a somewhat organic language that has evolved (and in the case of Tidyverse researched and engineered) DSLs. I’d love to see what stats savvy computer scientists could do with Racket to rethink or improve stats DSLs. If I were a tenured prof with time and research money, I’d surely explore this question.
Put another way, I think Julia is tackling numerical and statistical computing the XBox / Playstation way: pushing the state of the art in performance. I think there’s room for a Nintendo approach that speaks to the humans using the system rather than optimizing the technical bit.
R is probably the best, most productive DSL that exists for data analysis work, but it is a horrible programming language, made worse by the fact that I don't think most of its users think of what they're doing as programming. I've never seen an R project that looked like it had learned anything from software engineering best practice of literally any period in history. Your data is flat, your script starts at the top and runs to the bottom. There are rarely any abstractions.
One thing that gives me hope here is that an increasing number of universities have dedicated Research Software Engineering groups who can explicitly apply their expertise (mostly in performance but often just in writing better software) to the problems being approached by academics. But I've yet to see most computer science adjacent courses (including the plethora of new Data Science courses in the last few years) explicitly tackle software engineering as a valuable discipline.
All that said, the R ecosystem is fantastic and you're wasting time turning your nose up at it. I had hoped Incanter would take off in the Clojure world but it did not. Lately I have been lucky enough to be able to confine my needs to Bayadera, a framework for Bayesian data analysis in Clojure. But I think the grand hopes of Lisp becoming a first class language for data analysis will always fall by the wayside - Lisp people (outside of myself) are smart enough to fulfil their own needs, and you don't have the conveyor belt of new algorithms that R gets from academia (and indeed Python gets from the same place, and increasingly from industry giants).
The DSLs are key. As I wrote below, I feel like there is still room for data analysis DSLs that optimize heavily for usability by end users. Racket has best-in-class support for building new languages, and is a nice language itself.
Clojure and Incanter’s failure to capture market share also bums me out. In a lot of ways, I feel that Clojure’s small amount of syntactic sugar and collection abstractions make it a very, very user-friendly language itself even if its meta programming isn’t quite what Racket’s is.
R isnt good in many respects, but it can run most statistical models.
Get back to me when your language of the day has a package to easily run blundell bond type dynamic panels with different iv and gmm estimators, cause that is what R can do.
Until then, stop wasting my time comparing a useful toolkit for a specific thing with some arbitrary language the day that us used by two people and has never solved a real life problem ever.
reply