56 karma · joined Dec 25, 2017 (8y ago) · 30 submissions
comment 4y ago · link · parent
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).
comment 4y ago · link · parent
Yes please! Can I get this for Google Sheets? :/
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 5y ago · link · parent
comment 5y ago · link · parent
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."
comment 5y ago · link · parent
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.
comment 5y ago · link · parent
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.
comment 5y ago · link · parent
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.
comment 5y ago · link · parent
comment 6y ago · link · parent
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).
17.
Ask HN: Software for online group meetings or discussions?
1 points · by jhokanson · 6y ago · discuss
comment 6y ago · link · parent
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.
comment 8y ago · link · parent
comment 8y ago · link · parent
Edit: Here's a link discussing the issue: https://www.fastcompany.com/3063238/why-wont-apple-fix-the-i...
26.
Senate planning on passing bill to relax banking regulations(politico.com ↗)
1 points · by jhokanson · 8y ago · discuss
comment 8y ago · link · parent
http://www.motherjones.com/kevin-drum/2013/11/its-doctors-wh...
comment 8y ago · link · parent