112 karma · joined Oct 28, 2012 (14y ago) · 59 submissions
1.
Luish: A vibe-coded shell that is better than bash or zsh(luispedro.substack.com ↗)
3 points · by luispedrocoelho · 1mo ago · discuss
2.
Technical cantilevers (a better term than "technical debt"?)(luispedro.substack.com ↗)
2 points · by luispedrocoelho · 2y ago · discuss
3.
A small YouTube channel is still pretty large: Internet numbers are weird(luispedro.substack.com ↗)
1 points · by luispedrocoelho · 3y ago · discuss
4.
Grit: A non-existent alternative interface to Git(metarabbit.wordpress.com ↗)
1 points · by luispedrocoelho · 6y ago · discuss
5.
Towards Typed Pipelines(metarabbit.wordpress.com ↗)
2 points · by luispedrocoelho · 7y ago · discuss
6.
How (Jupyter) Notebooks Should Work(metarabbit.wordpress.com ↗)
2 points · by luispedrocoelho · 8y ago · discuss
comment 8y ago · link · parent
If they must allow Android branded phones that do not come with google apps, then the EC is making it harder for consumers to choose by disallowing the normal use of a brand to signal what it is that you are buying when you buy something. People may buy an Android cheap phone thinking that they are getting what is now an Android phone and end up with a shittier product.
Under a normal market, these OEM-branded phones would be sold as "ShitPhone OS 12.0" and it'd be clear that you have the option between paying slightly more for Android, a lot more for iOS or go with ShitPhone 12.0
comment 8y ago · link · parent
The EC claims that google have "denied European consumers the benefits of effective competition in the important mobile sphere", but I fear this will mean that cheap Android phones will have a shitty OEM-branded webbrowser and some random search engine link.
comment 8y ago · link · parent
It seems to me that the whole thing is "I bought travel insurance and I thought I would be getting global health insurance, but it turns out it's really travel insurance."
I guess because the NHS is paid through your taxes it may not have been so blindingly obvious to someone in the UK that anything similar to what he is asking for would have cost at least "300£ per month" (and that is assuming he is young and healthy) instead of "300£ for 18 months".
comment 8y ago · link · parent
Exactly, but you're saying it like it's a bad thing instead of "this is just what travel insurance is and why it's so cheap."
comment 8y ago · link · parent
I just claim that it's reasonable for the company not to take it at face value as the doctor is not impartial and may have been considering a different standard for "not fit to fly." I certainly do not take it at face value. Could he have been put on a plane with extra medical assistance, for example? That may still have been cheaper than surgery.
I think what the guy did was the best choice if he can afford it, but I also think it's not unreasonable from the company to say that it was not what travel insurance covers.
comment 8y ago · link · parent
Maybe he was indeed in no shape to fly, but he should have argued it properly in those days. Even now, it seems more like "it would have been awful to fly economy" and not "it would have been dangerous".
comment 8y ago · link · parent
He complains that "unless you are injured so horrifically that you cannot survive another moment without life saving surgery, odds are they’ll just tell you to fly home and have the surgery for free." But, to me, this is exactly what travel insurance is (which is why it's so cheap). Expecting fancy Singaporean hospitals unless it is strictly necessary seems totally unreasonable.
If they were not so communicative, he also basically decided to not get back to them on the vital "is he fit to fly?" issue for a few days (he had been OK to fly to Singapore after all), until after the surgery. There were a few days to go until the surgery, so that was enough time to get him back to the UK. Also, why hadn't he gotten in touch before? He texts pictures to friends, books flights, &c, and does not call the insurer or even ask somebody else to call on his behalf?
For what it's worth, I think he made the right decision in getting treatment in Singapore at his own expense, but that was still his decision.
comment 8y ago · link · parent
Thus, if we are talking about having (for example) a webservice where queries have a form that is known apriori, then it's a good solution. If you have output data from your processing that you will be slicing and dicing in different ways which you cannot predict ahead of time, then, they are not appropriate.
(Loading Terabytes of data into a database takes a while too).
comment 8y ago · link · parent
Reading in chunks is not bad (and you can just use `chunksize=...` as a parameter to `read_csv`), but pandas `read_csv` is not so efficient either. Furthemore, even replacing `isin` with something like `df['id'].map(interesting.__contains__)` still is pretty slow.
Btw, deleting `interesting` (when it goes out of scope) might take hours(!) and there is no way around that. That's a bona fides performance bug.
In my experience, disk IO (even when using network disks) is not the bottleneck for the above example.
comment 8y ago · link · parent
2. I don't care about faster at this point. The function is fast enough. Maybe there is some magic incantation of pandas that will be readable and compute the same values, but I will believe it when I see it. What I thought was more idiomatic was much slower.
I think this is more of a case of "the problem does not fit numpy/pandas' structure (because of how the duplicated indices need to be handled), so you end up with ugly code."
comment 8y ago · link · parent
Here is an earlier version (intermediate speed): https://git.embl.de/costea/metaSNV/commit/ff44942f5f4e7c4d0e...
It's not so easy to post the data to reproduce a real use-case as it's a few Terabytes :)
*
Here's a simple easy code that is incredibly slow in Python:
interesting = set(line.strip() for line in open('interesting.txt'))
total = 0
for line in open('data.txt'):
id,val = line.split('\t')
if id in interesting:
total += int(val)
This is not unlike a lot of code I write, actually.comment 8y ago · link · parent
Then, I spent a few hours and ended up with that ugly code that now takes a few seconds (and is dominated by the whole analysis taking several minutes, so it would not be worth it even if you could potentially make this function take zero time).
Maybe with a few more hours, I could get both readability and speed, but that is not worth it (at this moment, at least).
*
The comment about the benchmark data being large is exactly my point: as datasets are growing faster than CPU speed, low-level performance matters more than it did a few years ago (at least if you are working, as I am, with these large data).
comment 8y ago · link · parent
I even wrote up a few utilities to make use of multiple threads while working at a high level: https://hackage.haskell.org/package/conduit-algorithms-0.0.7...
comment 8y ago · link · parent
Speed is the main motivation, but total time is TimeToWriteCode + TimeToRunCode.
Python has the lowest TimeToWriteCode, but very high TimeToRunCode. C++ has lowest TimeToRunCode, but high TimeTowWriteCode. Haskell is often a good compromise for me.
Also, with Haskell, it can be very easy to take advantage of 20 CPU cores, while I don't have as much familiarity with high-level C++ threading libraries.
comment 8y ago · link · parent
"connect a resistor to the end of a power cord" is supposed to make it sound trivial, but operating the resistors needed for absorbing the extra power on the grid is a large scale operation with non-trivial safety concerns. Also, you need to own and maintain all that equipment, &c &c.