jhokanson | 3 years ago | on: How to choose the right Python concurrency API
jhokanson's comments
jhokanson | 4 years ago | on: Spreadsheets Are Hot–and Cranking Out Complex Code
Yes please! Can I get this for Google Sheets? :/
jhokanson | 4 years ago | on: Why tensors? A beginner's perspective
Is it just me or are we horrible at teaching advanced math? Where are the examples (with actual numbers)? Where is the motivation? Where are the pictures?
jhokanson | 4 years ago | on: Failing to reach DDR4 bandwidth
jhokanson | 4 years ago | on: Failing to reach DDR4 bandwidth
jhokanson | 4 years ago | on: Failing to reach DDR4 bandwidth
jhokanson | 4 years ago | on: Improving GitHub Code Search
jhokanson | 4 years ago | on: Nuclear waste is a solved problem
jhokanson | 4 years ago | on: Beating TimSort at Merging
Oops, just for fun the numpy documentation currently states: "The datatype determines which of ‘mergesort’ or ‘timsort’ is actually used, even if ‘mergesort’ is specified. User selection at a finer scale is not currently available." Awesome ...
Also, apparently mergesort may also be done using radix sort for integers "‘mergesort’ and ‘stable’ are mapped to radix sort for integer data types."
jhokanson | 5 years ago | on: Why the Wuhan lab leak theory shouldn't be dismissed
jhokanson | 5 years ago | on: Why the Wuhan lab leak theory shouldn't be dismissed
But here's the kicker. Let's say this was a lab leak and as a reporter (which I'm not) I thought the evidence was good enough to warrant reporting. I'm not sure I would share it. The previous occupant of the white house did a great disservice in giving this whole thing a racially charged tone. I'm genuinely scared by the increased acts of violence against southeast Asians in the US and worry that stories like this will make it worse. I'm hoping that the new US government is secretly taking steps to help prevent what may have happened in that lab -- in addition to the large effort needed elsewhere to improve our handling after things had begun to spread.
Anyway, main point is that this was the first time in a long time (ever?) where I really wondered whether, given the circumstances, if it was good to share "the whole truth" (as best we know it) given that we don't know what happened and the potential real-life implications to many people in the US.
jhokanson | 5 years ago | on: GitHub Should Start an App Store
Mathworks (MATLAB) has a decent version of this: https://www.mathworks.com/matlabcentral/fileexchange/
People can provide feedback and ratings which makes it easy to see when projects are dead or when there are big issues that aren't being fix. You can also reference other projects - "This project is like that project but it is faster ..."
I don't think PyPi is all that good for this. Also, I've never really invested the effort to learn how to deploy an application to PyPi whereas something that simply points to my repo may be valuable?
Anyway, the main problem I want solved is not having people discover my code (although that would be great too), but being able to find other code more easily so I don't need to constantly reinvent the wheel.
jhokanson | 5 years ago | on: Number Parsing at a Gigabyte per Second
That highlights the complexity of benchmarking in general and the importance of comparing within the same benchmark. I haven't looked at this in a while but I thought some of the newer JSON parsers were standards compliant (maybe not?).
Anyway, that other blog post answers my question as it looks like the big insight is that you use the fast approach (that everyone uses) when you can, and fall back to slow if you really have to. From that blog link:
"The full idea requires a whole blog post to explain, but the gist of it is that we can attempt to compute the answer, optimistically using a fast algorithm, and fall back on something else (like the standard library) as needed. It turns out that for the kind of numbers we find in JSON documents, we can parse 99% of them using a simple approach. All we have to do is correctly detect the error cases and bail out."
Again, I swear I've seen this in one of the other JSON parsers but maybe I'm misremembering. And again, good for them for breaking it out into a header library for others to use.
jhokanson | 5 years ago | on: Number Parsing at a Gigabyte per Second
jhokanson | 5 years ago | on: Cardio fitness notifications are available today on Apple Watch
jhokanson | 5 years ago | on: Wireless Is a Trap
I'm constantly having problems with my mac laptops and after many hours (10+) of internet searching I still have no idea why the wifi doesn't always work reliably. Some days or weeks (months?) it is great. Other days every hour it is disconnecting. Sometimes resetting the router helps, sometimes it doesn't. The whole situation is extremely frustrating.
Some issues: Why am I getting a DNS issue when my wired desktop never has a wireless issue?
Sometime I swear that the laptops becomes much less reliable at the opposite end of my house as my router but the signal strength is generally still excellent (4 bars).
Anyway, I'm not asking to have my particular issues solved (although that would be much appreciated!!!!). The real issue just seems to be that debugging these issues is extremely difficult and not based on principles but just random things that people can try (e.g., delete your plist files).
jhokanson | 5 years ago | on: The Hard Part of Learning a Language
jhokanson | 5 years ago | on: The Hard Part of Learning a Language
I just wanted to work through an example in a book that I'm reading that has corresponding R code. I type require(package_name) into the command window and that doesn't work. I look at the help for "require" and there is nothing about how to install packages - I would think a reference to the install packages command would be useful (they link to how to check, but nothing obvious on how to install, maybe I missed it). After some searching I find the command and it prompts about whether I want to use the source code or not (after a few reads I understood what was going on but it could be improved). Things started compiling and then I tried to run my package again, no luck. So then I try reinstalling and this time I noticed the error - something like "exited with non 0 status". Awesome. Looking a bit closer I noticed one of the dependencies was not installing. After trying to install the dependency manually I somehow realized it was only for R version > 3.6, I'm on 3.5. So I figured updating RStudio would fix the problem, no luck. It's not like RStudio advertises what version of R they are shipping with Rstudio .... Now I'm on someone's Linkedin post (wtf?) looking at how to upgrade R from within RStudio. They indicate that on my mac I should updateR (or wait, they say that turns out to be not good, so just install from CRAN). Hopefully that works. Do I try my luck with R v4? Nothing's going to break there right ...?
This isn't meant to be a "R is bad" rant. Maybe C# or some other language really does avoid these problems, I don't know. However my experience has been the problems the author mentions are a problem everywhere.
jhokanson | 6 years ago | on: Don't write documentation in Markdown
jhokanson | 7 years ago | on: Spectrum is joining GitHub
All kidding aside, I used the multiprocessing module lately and it was a mess. Do I want 'map', 'starmap', 'imap', etc.? All I wanted was to run a function multiple times with different inputs (and multiple inputs per function call) and to fail when any launched process failed rather than waiting for every input variation to execute and then telling me about the error(which honestly I didn't think was asking for too much).