Better HN
topnewbestaskshowjobs
Log inSign up

thomas-st

674 karma · joined Oct 13, 2008 (18y ago) · 85 submissions

co-founder close.com, personal website thomasst.ch
Submissions

comment 1y ago · link · parent

That's just the JSON equivalent of "we have data, and it's null" vs "data is missing", and consistency could be enforced using a constraint or by making it non-NULL in the first place.

It's more common in string fields, which in many cases just get rendered on a web form that doesn't differentiate blank (empty string) from null state, therefore in the database we should in most cases set it up as follows:

- Value required: field should be non-NULL + at least length 1 (via check constraint)

- Value optional: either field is non-NULL, or field is nullable + at least length 1

I'm curious if you prefer to store optional strings as non-NULL and rely on the length, or as nullable and have a length constraint.

comment 1y ago · link · parent

Previous discussion (with some calling it a scam): https://news.ycombinator.com/item?id=42803559

comment 1y ago · link · parent

I have a power bank that is PD capable, but I cannot charge it from my MacBook even if the MacBook is plugged in to power. I get around it by using a USB-C/A dongle and corresponding USB-C/A cable. Presumably this "downgrades" the connection and since the MacBook doesn't support traditional USB charging it has to charge the power bank. Does USB-C not have a way to indicate that a potential power source is a battery so that the MacBook can charge it if it's plugged in to power, and reverse roles otherwise? Is this a fault how the power bank or macOS implements power negotiation, or is this scenario simply unaddressed in USB-C?

Funny enough, if I plug the USB-C/A dongle on the end of the power bank and the cable into the MacBook, it also won't charge.

I also have a Philips One toothbrush with a USB-C charging input. Similarly, I can't charge it with a USB-C cable directly from my MacBook but have to use A in between (I unsuccessfully tried using either a thinner "lower speed" or a thicker "higher speed" USB-C cable). I'm assuming the toothbrush doesn't support PD, so then why can't it fall back to traditional charging with a C-to-C cable?

comment 2y ago · link · parent

Use (and shipping via mail) is allowed according to this article, so one of the articles is wrong/outdated:

https://www.straitstimes.com/asia/se-asia/iphone-16-allowed-...

comment 2y ago · link · parent

It looks a bit like a handwritten Polish ą

comment 2y ago · link · parent

> (by the way, by the time you have checked in and your boarding pass has been issued, a lot of companies just don't allow you to cancel anymore, so it's really a non-issue?)

Which companies have a cancellation policy that is contingent upon getting a boarding pass? I've cancelled checked-in tickets before. If the flight is operated by a different airline than the ticket issuer, you just have to call the operating airline first to undo the check-in (a few airline can even do this online). After that it should be possible to cancel the ticket by the ticket issuer without any problems.

comment 3y ago · link · parent

A while ago I was helping a friend pick a cell phone plan with T-Mobile USA. If you study their plans, the "Essentials" plan does not include "taxes and fees", but their "Magenta" plan does. When contacting T-Mobile, they could not tell me what the fees were even after providing the specific ZIP code. They said I would have to sign up for the plan first, and could then see the fees on the bill. Even when I told them that the choice of plan would depend on the amount of taxes and fees, they were not able to tell me and said that I could look at the current cell phone bill with the current carrier, and that the taxes and fees should be similar.

It is crazy they can't tell you how much you'll be paying before signing up.

8.

The Sad State of ESIM(thomasst.ch ↗)

3 points · by thomas-st · 3y ago · discuss

comment 4y ago · link · parent

I wish cookie settings were part of the browser (e.g. I want to reject all marketing cookies but not essential ones), have a way in JS/HTTP to indicate the type of the cookie, and never see those cookie popups again.

comment 4y ago · link · parent

Careful. My friend used Revolut virtual cards and forgot to deactivate the card after the purchase. Months (or a year) later he got a fraudulent charge and Revolut refused to waive it because they claim he should have deactivated the virtual card. If it were on a regular credit card he may have just been able to dispute it.

comment 4y ago · link · parent

To be clear, it's completely unacceptable they are charging for this repair. My intent was to give some perspective on how the repair process went overall, I needed the device back for work.

While apart from the cracked screen issue the hardware is amazing in my opinion, the overall software issues make using macOS painful sometimes (processes running at high CPU -- now mostly offloaded to the efficiency cores, WebKit views having issues loading, anything syncing to iCloud sometimes not working, sometimes working on the 2nd try, Messages/Apple Mail search only finding some of the messages, audio crackling issues with wired headphones/AirPods/built-in speaker, etc.)

comment 4y ago · link · parent

Honestly, if I had broken the screen, this seems like a fair cost for a new display like this. Apart from the the cost, I'd also like to mention the repair process (via mail at their Houston repair facility) was very speedy. I got a quote within hours of them receiving the product, and it was shipped the next day after I approved. The supervisor mentioned that if they ever set up a repair program for this issue, they will refund the fee.

Now, if only they could also fix the audio crackling issue that me and many other users are experiencing... (https://www.reddit.com/r/macbookpro/comments/s4r1m5/macbook_...)

comment 4y ago · link · parent

My 14" M1 MacBook Pro screen repair cost was $809. Supervisor refused the waive the fee. The screen cracked for no apparent reason and then completely stopped working.

Some firm already filed a class action complaint, and I submitted my details: https://classlawdc.com/2021/08/04/m1-macbook-screen-crack-in...

comment 5y ago · link · parent

Close | Engineering and Product positions | REMOTE | https://jobs.close.com/

We're building the sales communication platform of the future. With our roots as the very first sales CRM to include built-in calling, we're leading the industry toward eliminating manual processes and helping companies to close more deals (faster). Since our founding in 2013, we've grown to become a profitable, 100% globally distributed team of ~45 high-performing, happy people that are dedicated to building a product our customers love.

We are currently hiring for a few 100% remote positions:

- Senior Frontend Engineer - React https://jobs.lever.co/close.io/10a1e32b-1a59-48dc-b8f4-e6f0d...

- Software Engineer - Backend/Python https://jobs.lever.co/close.io/592193bf-8a9c-43cf-86a1-faeb7...

comment 5y ago · link · parent

Close | Engineering and Product positions | REMOTE | https://jobs.close.com/

We're building the sales communication platform of the future. With our roots as the very first sales CRM to include built-in calling, we're leading the industry toward eliminating manual processes and helping companies to close more deals (faster). Since our founding in 2013, we've grown to become a profitable, 100% globally distributed team of ~45 high-performing, happy people that are dedicated to building a product our customers love.

We are currently hiring for a few 100% remote positions:

- Senior Frontend Engineer - React https://jobs.lever.co/close.io/10a1e32b-1a59-48dc-b8f4-e6f0d...

- Software Engineer - Backend/Python https://jobs.lever.co/close.io/592193bf-8a9c-43cf-86a1-faeb7...

- Product Manager - Americas https://jobs.lever.co/close.io/21dca90f-06a3-4050-81a0-9659d...

comment 7y ago · link · parent

That's my main worry with Tesla not using LIDAR as a backup. Sure, the image recognition will work in almost all the cases, but occasionally (hopefully very rarely) there is going to be a pattern that it might not recognize (either deliberate by an attacker, or occurring naturally).

comment 7y ago · link · parent

That's a false rumor. https://forums.macrumors.com/threads/macbook-pro-16-17-comes...

comment 10y ago · link · parent

See https://hack.close.io/posts/ciso8601 on the use case.

comment 10y ago · link · parent

I had similar issues in Python, where the available date parsers weren't fast enough.

With my C module, I got 320ns, which was 62x faster than Python's less flexible strptime. See https://github.com/closeio/ciso8601/ for my benchmarks.

comment 10y ago · link · parent

I need to switch between two windows of different applications. Cmd+` only switches within the same application.

comment 10y ago · link · parent

Some other keys that work while using Cmd+Tab:

- Press "q" to quit the selected application

- Press "h" to toggle hiding the selected application

- Press "1" to show all open windows for the selected application

Does anyone know if there is a built-in way to only switch to the frontmost application window (by default Cmd+Tab puts all app windows in the foreground)? Sometimes I need to switch between two windows of different applications which I both want to keep visible on the screen, but switching to the destination app with Cmd+Tab ends up covering the entire screen because that application has other windows.

22.

TaskTiger – Python task queue with per-task forks, unique queues and batch tasks(github.com ↗)

5 points · by thomas-st · 11y ago · discuss

comment 11y ago · link · parent

What's "dumb" about the hash ring, and how exactly is your solution faster/simpler?

One nice thing about the hash ring is that it nicely rebalances when you add or remove nodes. There is no need split any buckets.

24.

Consistent hash ring Python library for building distributed apps with Redis(github.com ↗)

31 points · by thomas-st · 11y ago · 6 comments

comment 12y ago · link · parent

I did all the timeit benchmarks on the latest 13" retina MacBook Pro, 2.6 GHz Intel Core i5. The profiler screenshot is from one of our serves on EC2.

Of course there is always potential for optimization, but at this point it's fast enough for our purposes. If you can make it significantly faster please don't hesitate to submit a PR though :)

EDIT: Wouldn't most C compilers unroll the simple "for" loops? Direct link to the C code: https://github.com/elasticsales/ciso8601/blob/master/module....

comment 12y ago · link · parent

It doesn't cover all of it, for example week dates or ordinal dates are not currently supported. But feel free to submit any patches :)

comment 12y ago · link · parent

Good idea with the regex, haven't tried it. That being said, you didn't take the time into account to construct a datetime object, let alone attach time zone information. ciso8601 supports time zones using pytz' FixedOffset and UTC classes, see https://github.com/elasticsales/ciso8601 for additional benchmarks. There's potential for further speedup by using a tzoffset subclass written in C, but in our cases all dates were UTC anyway and so we didn't need the time zone.

28.

Show HN: A fast ISO8601 date-time parser for Python(hack.close.io ↗)

55 points · by thomas-st · 12y ago · 37 comments

comment 13y ago · link · parent

Does anyone know an encrypted database that allows for searches? E.g. implementing an algorithm similar to http://crypto.stanford.edu/~eujin/papers/secureindex/

comment 13y ago · link · parent

Chrome: I use Vanilla Cookie Manager. https://chrome.google.com/webstore/detail/vanilla-cookie-man...

Would be interested in something comparable for Safari. Anyone?

123