HN user

tylermw

1,012 karma

https://www.tylermw.com

Posts23
Comments152
View on HN
www.tylermw.com 4mo ago

Atmospheric Simulation in R

tylermw
4pts1
www.tylermw.com 1y ago

Debugging Compiled Code for R with Positron

tylermw
15pts10
www.tylermw.com 2y ago

Sculpting the moon in R: Subdivision surfaces and displacement mapping

tylermw
144pts32
www.npr.org 2y ago

First human transplant of a genetically modified pig kidney performed

tylermw
3pts1
www.tylermw.com 2y ago

Building 3D Rooftops and Bevels with Straight Skeletons

tylermw
3pts0
www.tylermw.com 5y ago

Building 3D Rollercoaster Tours of Your Data in R

tylermw
2pts0
www.tylermw.com 5y ago

Cartography in R with Rayshader and Open Street Map: A Tutorial

tylermw
2pts0
www.tylermw.com 5y ago

Visualizing 30 Years of Polar Sea Ice Data in 3D

tylermw
1pts0
www.tylermw.com 5y ago

Plinko Statistics: Insights from the Bean Machine

tylermw
1pts0
www.tylermw.com 5y ago

Loading and Visualizing OpenSky Network Flight Data in R

tylermw
2pts0
www.tylermw.com 5y ago

Raybonsai: Generative Fractal 3D Trees in R

tylermw
2pts0
www.tylermw.com 6y ago

Guide to Making 3D Maps with Satellite Imagery in R

tylermw
232pts29
www.tylermw.com 6y ago

Show HN: Pathtracing Neon Landscapes in R

tylermw
5pts1
github.com 6y ago

Show HN: A library for custom scientifically accurate 3D models of SARS CoV2

tylermw
4pts3
www.tylermw.com 6y ago

Raytracing Lenticular Prints in R with Rayrender

tylermw
2pts0
www.tylermw.com 7y ago

Show HN: 3D ggplots in R with rayshader

tylermw
4pts3
www.tylermw.com 7y ago

Show HN: Rayrender, an open source R package to craft and raytrace 3D scenes

tylermw
2pts1
www.tylermw.com 7y ago

Show HN: An open source R package to add depth of field to images

tylermw
4pts3
www.tylermw.com 7y ago

Show HN: A raytracer to shade, plot, and 3D print topographic maps in R, part 4

tylermw
4pts1
www.tylermw.com 7y ago

Show HN: A raytracer to shade and visualize topographic maps in R, part 3

tylermw
42pts5
www.tylermw.com 8y ago

Show HN: A raytracer to shade topographic maps in R, Part 2

tylermw
76pts13
tylermw.com 8y ago

Show HN: A raytracer to shade topographic maps in R

tylermw
198pts47
github.com 8y ago

Build better experiments with skpr

tylermw
1pts0

Yep, as someone who both uses lots of R packages and writes lots of R packages (which, in turn, import other R packages), I've grown to appreciate the strictness of CRAN: if a package is on the CRAN, I'm just about guaranteed to not have installation issues or have it screw up my environment. To me, that's the one major job of a package repository, and CRAN does it well, even if it does cause package authors pain at times :)

The proof is in the pudding. Every single grad student of mine that was brought up on the tidyverse produces gigantic R markdown files with 20 imports to accomplish something that would be shorter and much much easier to understand (and review!) with a base package or with one of a small number of packages (box, data.table) designed by people who understand programming.

The fact that young people are producing sub-optimal code (in terms of whatever optimization criteria you are choosing--here, it sounds like terseness) is not strong evidence that a particular software ecosystem (tidyverse) is flawed. Young people producing bad code is not surprising. They're your grad students, mentor them, and maybe they'll adapt to your ways of thinking. Or not.

One of the reasons R has lost ground to other languages recently is that most R code these days is ugly

Citation needed, surely. The fact that this article is about an increase in the number of CRAN submissions and pseudo-quantitative indices like the TIOBE index show R's slice of the pie is growing provides evidence to the contrary.

Yes, the main benefit is caching and reproducibility: with targets (or any other DAG-based approach), you only recompute what needs to be recomputed and you are assured that no stale inputs or temporary analysis artifacts end up in the final product. If you don't own the underlying data sources and those sources can change at any point, a DAG-based approach helps ensure that.

I read this article a week or so ago and immediately implemented a VS Code extension that I've always wanted: a static analysis tool for targets pipelines. targets is an R package which provides Make-like pipelines for data science and analysis work. You write your pipeline as a DAG and targets orchestrates the analysis and only re-runs downstream nodes if upstream ones are invalidated and the output changes. Fantastic tool, but at a certain level of complexity the DAG becomes a bit hard to navigate and reason about ("wait, what targets are downstream of this one again?"). This isn't really a targets problem, as this will happen with any analysis of decent complexity, but the structure targets adds to the analysis actually allows for a decent amount of static analysis of the environment/code. Enter tree-sitter.

I wrote a VS Code extension that analyzes the pipeline and provides useful hover information (like size, time last invalidated, computation time for that target, and children/parent info) as well as links to quickly jump to different targets and their children/parents. I've dogfooded the hell out of it and it's already vastly improved my targets workflow within a week. Things like providing better error hints in the IDE for targets-specific malformed inputs and showing which targets are emitting errors really take lots of the friction out of an analysis.

All that to say: nice work on extending tree-sitter to R!

tarborist: targets + tree-sitter https://open-vsx.org/extension/tylermorganwall/tarborist

GH: https://github.com/tylermorganwall/tarborist

Author here. I wrote an R package to generate realistic sky maps for a given location and datetime (with scattered light, realistic moon phases, stars, and planets all at physically-based brightness values) to support plausible 3D renders of real terrain and data visualizations.

This is pretty astounding. Honestly, this is the feel-good "our company is helping save dogs" story that should have been featured at the super bowl. The fact that AI can be used by a motivated and smart person to facilitate the production of custom mRNA immunotherapy via genomic sequencing for their dogs cancer just hints at the possibilities of the future, if we choose to embrace science rather than reject it.

Nice results! SIMD can be a pain, good to know Zig makes it easy.

However, note that the plot under "Native SIMD Throughput Comparison" is extremely misleading: for an accurate proportional comparison between bar charts, you should start the y-axis at zero. The way the data are presented makes it look like a 10-100x gain, rather than the actual 2x improvement.

When you're dealing with large populations (here, the study include 230,065 students--a very large number), even small shifts due to some treatment can be significant. It is very hard to generate top-down policy interventions that shift the mean of a population in significant ways: if this treatment effect (banning phones) is real, 1.1 points represents a very big policy win that can easily be applied elsewhere. The devil is in the details, however: they exclude some recent data based on the pandemic, but baseline off of 2022-2023, which was still in the throes of the pandemic. The data they show looks to have around a 0.5-1 sigma variation in percentile from 2022-2024, so the shift from the baseline of around 1 to 4 definitely looks significant, but it will be interesting to see if sticks over time.

There is a way to model this type of situation for watertight dielectrics with interface tracking: you assign each material a priority value, and a transition between materials occurs when entering that material only if it has a higher priority than your current material. Yining Karl Li has a great article about it:

https://blog.yiningkarlli.com/2019/05/nested-dielectrics.htm...

that inspired me to add the feature to my renderer (rayrender.net).

The downside to priority tracking (and possibly why PBRT does not include it) is it introduces a lots of overhead to ray traversal due to each ray needing to track a priority list. Modern raytracers use packets of rays for GPU/SIMD operations, and thus minimizing the ray size is extremely important to maximize throughput and minimize cache misses.

Yes, you are correct, I should have typed "runs". But the point is that MITRE runs the U.S. National Cybersecurity FFRDC that maintains the CVE system, and FFRDCs are deliberately structured to minimize potential conflicts of interest (GP comment) and are definitely distinct from private industry (parent comment).

MITRE is a Federally Funded Research and Development Center (FFRDC), which is a distinct type of federal contractor with strict conflict of interest regulations. They are owned by the federal government, but operated by contractors and are specifically structured and regulated to minimize conflicts of interest, so are distinct from "private industry" in many regards.

You can read a congressional report by the CRS describing FFRDCs and their role here: https://www.congress.gov/crs-product/R44629.

Big Book of R 1 year ago

trace is great for shimming in your own code to an existing function, but it’s not an interactive debugging tool.

Big Book of R 1 year ago

Funny you mention namespacing: R 4.5.0 was just released today with the new `use()` function, which allows you import just what you need instead of clobbering your global namespace, equivalent to python’s `from x import y` syntax.

e.g. avoid dplyr overriding base::filter

use(“dplyr”, c(“mutate”, “summarize”))

Big Book of R 1 year ago

I’m using ellmer to power some research on LLMs at my job—it’s great!

For simple operations like the dot product (that also map extremely well to SIMD operations), yes, the CPU is often better, as there not much actual "computation" being done. More complex computations where the data does not need to transfer between the host and device amortize that transfer cost across multiple operations, and the balance can quickly weigh in favor of the GPU.

DuckDB is great for medium data: Too big for memory, but small enough to fit on local storage. It's also extremely performant for loading data and supports a wide range of storage backends. It's also really well integrated with R and can really speed up certain queries, as long as the DuckDB engine can translate them to valid SQL.