3,509 karma · joined October 21, 2016
https://jstrieb.github.io
https://github.com/jstrieb
For those interested in parallel, functional programming, I recommend taking a look at Futhark, which leverages data parallelism to make very fast parallel programs. It is based on SML, and has similar syntax, but can automatically build programs that (among other targets) run on the GPU using CUDA or OpenCL. It is also worth checking out MPL, which extends the (already awesome) whole-program optimizing compiler MLton to add support for nested, fork-join parallelism.
Which one you learn should depend on what you plan to use it for! I'm partial to SML. Then again, I've only written a handful of real-world programs with it.
The book I'm recommending is pretty far from a textbook. Rather it is an Exercises in Style type book that explores many different ways to express a mathematical proof of the same simple fact. Some of the proofs are whimsical, and others offer genuine insight. Many cover the ways that such mathematical discussions would have taken place in earlier historical periods.
In other words, 99 Variations is more like a jaunt through mathematics culture rather than a book that focuses on actual mathematical content.
I'll take a look at this book, though, because it looks quite good!
If you connected with this essay (or, perhaps, if you did not), I highly recommend checking out a book called 99 Variations on a Proof, by Philip Ording. It is an enjoyable, easy to understand journey through the art of making a mathematical argument by way of showing the many forms such an argument can take.
https://www.amazon.com/99-Variations-Proof-Philip-Ording/dp/...
For anyone looking to get started with it, writing a Monte Carlo simulation is a good first exercise to get familiar. Monte Carlo simulations also happen to perfectly showcase its power to exploit parallelism for massive speedups.
Highlight the following and drag it to your bookmarks bar.
javascript:Object.assign(document.createElement("a"), {href: `https://labs.kagi.com/ai/sum?url=${encodeURIComponent(window.location)}`, target: "_blank"}).click();One of many HN discussions about the topic here:
If you're interested in something similar that can put things back together after you've modified them, check out OFRAK:
https://github.com/redballoonsecurity/ofrak
It's designed with embedded systems in mind, but has support for all kinds of other stuff, too. It also has some very advanced binary patching capabilities.
I work on it as part of my day job.
I understand where you're coming from, but I encourage you to try and power through to the end of the second book. The things you complain about are long gone by then, and you might change your mind like I did!
https://github.com/jstrieb/urlpages
It's a small JavaScript application to store entire web pages in URLs. I made it after learning that links with data URLs are no longer clickable.
This is only true if you've done it before, and know what you're doing. In reality, it looks like a mess of `mod_cgi` configuration, trying different combinations of file permissions, finding the magic `cgi_bin` directory, finding the right obscure log files when there are inevitably errors, wrestling with CORS and other subtleties of HTTP headers, and other complexities that are only easy to navigate if you're already an experienced CGI user.
That being said, I love the philosophy of using CGI for scripts. Instead of using CGI itself, though, I wrote a (single-file, statically-linked) web server called "QuickServ" to bring this philosophy into the twenty-first century. It has all of the upside of CGI, but is much easier to set up and run, especially for beginners.
One of its benefits is that it automatically parses submitted HTTP forms, and converts the form fields to command line arguments. That means it's extremely easy to put existing CLIs on the web with minimal changes other than writing an HTML form front-end.
If you like CGI, I will (shamelessly) ask that you check it out!
If you're interested in learning the fundamentals of some of the math he uses, I can highly recommend the CMU computer graphics course. It's free on YouTube.
https://youtube.com/playlist?list=PL9_jI1bdZmz2emSh0UQ5iOdT2...
The professor, Keenan Crane, puts out a ton of super interesting, high-quality research as well. His website is awesome.
I set everything up to interface with my computer using a web browser on the headset, which might not match your use case.
Besides the handy website, their many-thousand page phsyical catalog is great. We have a copy at work and it's easy to spend a long time flipping through, learning about all of the different things they have, and why they are useful.
Here is Adam Savage talking about why their catalog is awesome: https://youtu.be/8kbu34dk92s
The US department of education collects extremely comprehensive data on colleges every year, and makes the data public. I loaded these CSVs into SQLite and made a bunch of queries to filter schools out, then dumped the rest to a spreadsheet. In the spreadsheet I weighted each column and sorted the rows. The weights were tunable so I could emphasize different factors in the sorting. The process was successful in that it turned up some surprising results I wouldn't have otherwise considered!
I've wanted to write a post on my website about this process for a while, but haven't gotten around to it. In the meantime, for anyone looking to do something similar, the data is here:
https://www.amazon.com/Eyes-Sky-Secret-Gorgon-Stare-ebook/dp...
Congrats on the release!
For anyone trying to understand Bloom filters who may be interested in checking out an alternative C implementation (designed to be compiled to WebAssembly), I'll link mine below.
I used it to build a Bloom filter of every Hacker News submission ever for a privacy-preserving browser extension that tells you if the page you're currently on has been submitted before.
https://github.com/jstrieb/hackernews-button/blob/master/blo...
I learned a lot from working through An Infinite Descent into Pure Mathematics by Clive Newstead. It's designed to get someone with minimal math background started with the basics of pure math. Becoming comfortable with proofs happens along the way.
Lately, I have also really enjoyed 99 Variations on a Proof by Philip Ording, which is not a textbook. Rather it is an Exercises in Style type book that explores many different ways to express a mathematical proof of the same simple fact. Some of the proofs are whimsical, and others offer genuine insight. If you're looking for something lighter than a textbook that is still interesting and somewhat useful, this book is more approachable.
https://www.amazon.com/99-Variations-Proof-Philip-Ording/dp/...
I get a ton of action on my contact form, but mostly from people using Link Lock (one of my projects), or people who use my Cookie Clicker auto clicker bookmarklet.
The course was ambitious and moved at a breakneck pace, and Dr. Harper could be a whirlwind in lecture. As some of the anecdotes mention, he's pretty opinionated. He'd often go on intense (albeit well-informed), tangential rants, particularly about Python.
Personally, I would have preferred a less comprehensive course with more time to let some of the abstract ideas settle, but I can imagine his attitude and approach being well-suited to energetic graduate advising.
For those curious about the material, we covered a significant portion of his Practical Foundations of Programming Languages book: https://www.cs.cmu.edu/~rwh/pfpl/2nded.pdf
It's also nice if you want to run a GUI application in someone else's sandbox.
https://github.com/jstrieb/ctf-collab/blob/9300c57364f71fe29...
For example, the following code translates JSON to YAML using only the Python yaml library:
import yaml
data = yaml.load("""
{
"firstName": "John",
"lastName": "Smith",
"isAlive": true,
"age": 27,
"address": {
"streetAddress": "21 2nd Street",
"city": "New York",
"state": "NY",
"postalCode": "10021-3100"
},
"phoneNumbers": [
{
"type": "home",
"number": "212 555-1234"
},
{
"type": "office",
"number": "646 555-4567"
},
{
"type": "mobile",
"number": "123 456-7890"
}
],
"children": [],
"spouse": null
}
""")
print(yaml.dump(data))
Prints: address:
city: New York
postalCode: 10021-3100
state: NY
streetAddress: 21 2nd Street
age: 27
children: []
firstName: John
isAlive: true
lastName: Smith
phoneNumbers:
- number: 212 555-1234
type: home
- number: 646 555-4567
type: office
- number: 123 456-7890
type: mobile
spouse: null
0: https://yaml.org/spec/1.2.2/#12-yaml-history