5 ms·
Putting aside the other controversial things that Graham says in this post, I think we could find common ground and have some fun technical discussion by focusi
by kaycebasques 5y ago
Putting aside the other controversial things that Graham says in this post, I think we could find common ground and have some fun technical discussion by focusing on this angle:
> What can you say in this language that would be impossibly inconvenient to say in others?
The first experience that comes to mind for me was XSLT. Early on in my technical writing career, I needed to convert the Doxygen output of a C library to a more barebones HTML output (so that the reference docs would have the same branding as the rest of our site). I used XSLT to extract only the bits of HTML that I needed and I transformed them into nice, straightforward, semantic HTML. It took me a while to wrap my head around XSLT's flow but I was amazed to find that a task that would have taken probably 50-100 lines of looping and condition checking could be accomplished in literally 1-3 lines of XSLT.
Would love to hear other's experiences along these lines (i.e. concrete examples).
- sthatipamala 5y agoThe whole tidyverse set of packages for R. Its a DSL for data analysis that makes heavy use of R macros. The vocabulary and mental model that it has about data transformation is superior to any other analysis package I've used. Pandas/Numpy is close but R's macro/custom operators make everything much more seamless.
- shepherdjerred 5y agoIs it really better than python? I'm not too much in the data analysis space, but it seems like with python's dominance in machine learning that R's days are numbered.
- sthatipamala 5y agoStrictly speaking about data analysis, tidyverse is way better. Even in adjacent spaces such as plotting and interactive data, tools like Shiny [0] are ahead of the Python ecosystem. R is definitely weird language, not as useful for general purpose computing, and has far less marketshare. But that's kinda the point of pg's essay. [0] https://shiny.rstudio.com/ https://shiny.rstudio.com/
- Dumblydorr 5y agoI've done data analysis for a decade in the healthcare space, ML is not at all common. Basic statistics and data munging is 99% of what you need, you're mostly doing SQL to gather the data, then a lot of older folks still use SAS, my god. R looks way more "shiny" than SAS, nevermind python. Python is trendier in all other fields it seems, it really hasn't penetrated healthcare in my experience. R on the other hand, so many healthcare researchers come from academics and statistics courses where R is way way more popular than python.
- goatlover 5y agoUnless you think machine learning by is going to put statisticians out of work, R will stick around. It also has a lot of libraries useful to scientists.
- CornCobs 5y agoIn particular I'd shoutout ggplot as an amazing DSL for graphics. It truly is a language of itself for describing visualizations as mappings from data to graphical layers. And yet being a library it seamlessly interacts with the rest of R just as you expect
- leephillips 5y agoInteresting because this is the first time I’ve heard this kind of love for XSLT.
- PaulDavisThe1st 5y agoGot about 600 of my mother's playlists after she died, all in Windows PlayList format (.wpl, an XML-ish variant). Could not find anything better than XSLT to generate portable .m3u files from them. Worked like a charm.
- marcosdumay 5y agoIt's a very badly designed language (that's true for anything that came from the XML way of thinking). But it's amazingly powerful and capable. XSLT is basically SQL for structured text.
- kaycebasques 5y agoTo be fair, I only used it that one time and I was new to programming. Nonetheless it was very much a "wow, this is a different way to do things" experience. And at the time it seemed to magically solve much more accurately and with much less work than an imperative approach.
- vidarh 5y agoXSLT is great when you try to do simple things. Then you try to e.g. format a date or something. As long as you stick to what it is good at and relegate everything else to another layer, it's fine (it could certainly be a lot better, though)
- poetaster 5y agoOnce implimented a mulitlingual cms using xml schema, doctypes and xslt. The lifting was done by a server i called saw. Servlet action wrappers. Maps for namespaces led to varying transforms. XSLTs produced html, applet editors, flash, etc. Was fun. 29 markets. Bonus, was running in blackdown jvm on netbsd. Had to use oracle for db. But there were idls for as400s in the mix to.
- thriftwy 5y agoShameless plug: The xmlstarlet utility allows creating implicit XSLT from command line args, so it would also be one line of shell. This way the XSLT verbosity is also gone: xsl:value-of becomes -v for example.
- greggman3 5y agoMy experience with XSLT is it only works until you hit an edge case, and then it's impossibly hard and you need a full programming language. I usually hit those edge cases quickly so I'd prefer XSLT didn't exist and that I just had a well designed XML library in something like python
- math-dev 5y agoWow! Would you be able to share the xlst code? Would love to learn more
- Const-me 5y agoReflection combined with runtime code generation is very powerful in C#. Here's moderately complicated example https://github.com/Const-me/ComLightInterop/tree/master/ComLight/Emit https://github.com/Const-me/ComLightInterop/tree/master/ComL...