HNHacker News
TopNewBestAskShowJobs

vcdimension

226 karma · joined July 9, 2015

statistician / machine learning consultant and programmer. vapniks at yahoo dot com
submissionscomments
vcdimension··on TXR Lisp
If you already know a lisp such as scheme, much of it should already be familiar to you. You can program in a lisp-1/scheme like way using square brackets, and a lisp-2/common lisp way using round brackets. The thing that really makes txr lisp different is the pattern language DSL, and that was what motivated me to learn it because I had a specific use case (processing my personal bank statements). The manpage is huge due to the large amount of builtin functions and features to make up for the lack of external libraries, but there is a lot of overlap with other lisps. I learnt by reading the manpage, looking at examples on stackoverflow and rosetta stone, and playing around with it in the REPL. The pattern matching language takes some getting used to, and it helps to have a good understanding of what its doing under the hood, otherwise you can get very frustrated. Also it uses non-standard regular expressions which lack features such as repetition operators and capture groups, but you can work around this (e.g. by using the pattern language). I recommend finding some non-time-critical use case to motivate you, and work on it in your spare time. Learn how to use the txr repl & command syntax, and create a directory containing some example text files to quickly test things and get a better understanding of how it works. Also create a file for keeping notes about txr & its quirks which you can easily refer to.
vcdimension··on TXR Lisp
It should be easy to implement miniKanren in txr lisp.
vcdimension··on TXR Lisp
I got stuck into txr lisp a few years ago, and wrote some code for parsing bank statements. It has a builtin DSL (the @ syntax) which is great for text processing (better than perl IMO). It's also a fun language to learn, with lots of cool features such as combinators, continuations, macros, pattern matching, range objects, JSON objects, etc. It's more powerful than python, R or julia and would make a great successor to those languages for data science, but there are very few libraries ATM so that's a long journey. Here are some I wrote (including a zsh script for browsing the manual): https://github.com/vapniks/txr-libs IMO a good first step would be to use the txr FFI to write a library for Apache arrow: https://arrow.apache.org/
vcdimension··on Fine, I'll run a regression analysis but it won't make you happy
Sorry, I should have said quality-adjusted life years: https://en.wikipedia.org/wiki/Quality-adjusted_life_year
vcdimension··on Fine, I'll run a regression analysis but it won't make you happy
Most people don't even know how to mentally frame the problem. It's the number of life years lost that matters, not the number of lives, e.g. the death of a child with their whole life before them is worse than the death of an elderly person who's already on deaths door. Current statitics focus solely on number of deaths rather than expected years of life lost so we can't even make a fair assessment of the trade-offs involved in different policies.
vcdimension··on Fine, I'll run a regression analysis but it won't make you happy
There's also this one: https://sites.krieger.jhu.edu/iae/files/2022/01/A-Literature... which is summarised here: https://www.facebook.com/econometricsguru/posts/pfbid0wtvVjJ...
vcdimension··on λ Calculus (2013) [pdf]
There are several games and other online resources for learning lambda calculus and combinators:

For kids: http://worrydream.com/AlligatorEggs/ and: https://metatoys.org/alligator/

A lambda calculus calculator: https://lambster.dev/

A tetris style game for learning combinators: https://dirk.rave.org/combinatris/

vcdimension··on So you've installed `fzf` – now what?
I wrote a couple of shell tools based on fzf:

https://github.com/vapniks/fzfrepl: Edit commands/pipelines with fzf, and view live output while editing. There's a cool example using ffmpeg, graph2dot & graph-easy for displaying ffmpeg filter graphs.

https://github.com/vapniks/fzf-tool-launcher: Browse & preview contents of files, and launch tools/pipelines to process selected files. You can use fzfrepl in sequence to process each part of a dataprocessing pipeline with different tools.

vcdimension··on Techniques to improve reliability
These techniques are similar to those that I use for teaching maths & statistics to humans.
vcdimension··on Compilable Lightweight Markup Language for Linear Algebra
Would also be good to have a dedicated emacs mode for faster editing; you could use it with polymode and latex/python/cc/matlab-mode with some function for converting regions of iheartla to the appropriate language inline.
vcdimension··on Compilable Lightweight Markup Language for Linear Algebra
This is begging for an emacs org-babel library: https://orgmode.org/worg/org-contrib/babel/
vcdimension··on Ferret: A functional, lazy language for realtime embedded control systems
Does anyone know how it compares to ulisp? http://www.ulisp.com/
vcdimension··on AlphaFold won’t revolutionise drug discovery
This proposed improvement in the way RCT's are conducted could have a big impact on the speed of drug discovery: https://arxiv.org/pdf/1810.02876.pdf
vcdimension··on “Burning Ship” fractal
This video is amazing. Its one of my favourites. "Inside the burning ship": https://youtu.be/yaPTk-DqT1g You can see some thought has gone into not just the mathematics and rendering process, but also the artistic direction (lighting, choice of flight path) and music.
vcdimension··on Glucosamine significantly reduces risk of lung cancer and lung cancer mortality
@Gatsky: ah I see, yes that sounds highly plausible, but can you supply any evidence of this, or is it just hearsay?
vcdimension··on Glucosamine significantly reduces risk of lung cancer and lung cancer mortality
@gojomo: Isn't it normally the case that an RCT follows an observational study? There's not much point in doing an observational study if someone's already done an RCT, but there is the other way round, since RCT's are more trusted.

Wrt publication bias; an underestimation of the false positive rate of observational studies wrt RCTs could occur if non-significant RCTs are being held back at a higher rate than observational ones, but it seems more likely to me that it's the other way around since RCTs are generally more expensive and time consuming than observational studies, and more trusted, so it's a bigger loss if the result isn't published.

vcdimension··on Glucosamine significantly reduces risk of lung cancer and lung cancer mortality
Actually, you're wrong about that. According to this Cochrane systematic review, RCT's and observational studies are usually in close agreement: https://www.cochranelibrary.com/cdsr/doi/10.1002/14651858.MR...
vcdimension··on Alan Turing using math to repair his bike
You could make some of the money back from those tools, and help others in a similar situation, by renting them out on https://fatllama.com (or some other sharing website/app such as https://olioex.com/). Sharing & hiring saves money and environmental impact.
vcdimension··on Alan Turing using math to repair his bike
It's kept upto date by employees of the bike shop he worked for (Harris Cyclery), his widow, and his friend John Harris (a nationally recognized bicycle expert). The most recent post was about 3 weeks ago: https://sheldonbrown.com/blog/
vcdimension··on Alan Turing using math to repair his bike
Interestingly the bike repair bible that most of the experts defer to, i.e. https://www.sheldonbrown.com/ is written by a man who claims he was strongly influenced by the writings of Bertrand Russell, and he is married to a mathematician and has two children who are both mathematicians. The webpage contains several simple maths formulas for calculating things such as gear ratios.
vcdimension··on Creating a bash completion script (2018)
Here's a tutorial on creating zsh completion scripts: https://github.com/zsh-users/zsh-completions/blob/master/zsh...

The zsh completion system is better than the bash one; it has a builtin menu system, or you can use fzf: https://github.com/junegunn/fzf

vcdimension··on Ask HN: How much gas we could save in EU if we reduce our heating temp by 3°?
OK, there are many places where extra clothing isn't enough, but I think most people are accustomed to an indoor temperature far higher than is necessary or healthy. It feels comfortable, but then so does morphine. Whether it's -40 or +5 degrees centrigrade outside if the temperature inside is kept at 21, reducing it to 10 will have the same effect on the people (and water pipes) living inside. Elderly & ill people need higher temperatures than the rest of us though.
vcdimension··on GitHub’s database of security advisories is now open source
OK, thanks. I see it says 6,465 advisories, so I guess you are only storing CVE records that haven't been fixed since the main CVE list currently contains 170804 records. Is this correct?
vcdimension··on GitHub’s database of security advisories is now open source
How big is the entire dataset? How many files? I'd like to know that (approximately) before I click download and try to rustle up some command line tooling scripts to query it. Perhaps you can publish that info in the README?
vcdimension··on Ask HN: How much gas we could save in EU if we reduce our heating temp by 3°?
I'm in the south east of the UK, but the point I'm making applies almost anywhere in the Western world; it's perfectly possible, and even healthier, to get by at a much lower indoor temperature than most people are accustomed to.
vcdimension··on Ask HN: How much gas we could save in EU if we reduce our heating temp by 3°?
I hardly used any extra heating at all this winter, neither central heating nor spot heating. I've been having cold showers every morning, and allowing myself to shiver, and I feel great. If it gets uncomfortably cold I just put on more clothes. Sometime I use an electric blanket at night, which uses a fraction of the energy of an electric heater or central heating. The shivering helps to burn fat, and stimulate the production of healthy brown fat which has been implicated in many beneficial health outcomes such as better insulin response, bone density, and longevity: https://en.wikipedia.org/wiki/Brown_adipose_tissue
vcdimension··on Ask HN: How much gas we could save in EU if we reduce our heating temp by 3°?
Apart from the reductions in energy bills & carbon emissions, there would also be a general improvement in health. Central heating has been implicated in the diabetes epidemic that plagues Western socieities: https://www.diabetes.co.uk/news/2017/apr/cooler-temperatures...
vcdimension··on Major breakthrough on nuclear fusion energy
The Chinese & Japanese governments are investing in space based solar which solves the nighttime problem: https://wonderfulengineering.com/china-is-aiming-to-build-a-... https://nextrendsasia.org/japan-pioneer-of-transferring-sola...

But we really need more energy storage, and there are plenty of good ideas in this area too: better batteries, gravity bases systems, crowd sourced storage, etc.

vcdimension··on Major breakthrough on nuclear fusion energy
They're still a very long way from getting a net gain in energy: https://youtu.be/LJ4W1g-6JiY
vcdimension··on The Awk state machine parser pattern (2018)
My first thought when I saw this item in the HN list was TXR :)
← PreviousPage 2 of 5Next →