Better HN
topnewbestaskshowjobs
Log inSign up

jchb

320 karma · joined Sep 4, 2017 (9y ago) · 126 submissions

Submissions

1.

Nordea weekly: Papers please, and how to trade them(web.archive.org ↗)

1 points · by jchb · 5y ago · discuss

comment 5y ago · link · parent

Not on Apple platforms. The article links a "gtk and qt trend at Stackoverflow". Adding swiftui and uikit to that trend: http://sotagtrends.com/?tags=gtk+qt+swiftui+uikit&relative=t...

comment 5y ago · link · parent

By learning only the most important rules, and then enable the compilers undefined behaviour sanitizer(1) during development, making mistakes, and fixing them.

(1)https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#...

comment 5y ago · link · parent

You can remote debug webviews (from Safari on a Mac), but only web views in apps signed with a development provisioning profile (1). So to debug web content in iOS Chrome you would have to build and install Chromium for iOS yourself, rather than use the Chrome App Store version.

(1) https://webkit.org/web-inspector/enabling-web-inspector/

comment 5y ago · link · parent

> And these days all the documentation that Apple produces is in form of brief mentions in WWDC videos. Aaaarrggh!

There's actually a very detailed guide that explains both how to do it from the Xcode UI, and from the command line: https://developer.apple.com/documentation/security/notarizin...

comment 5y ago · link · parent

> You're just sending messages, so you can send a message over the wire and it would be as simple to the developer as sending it locally

If you are expecting a reply, or some side-effect in another system, as a result of the message you sent (and usually you would expect that, otherwise you wouldn't send the message in the first place) then it's not that simple. If the actor is in the same OS process on the same machine, then message delivery is reliable, and you know you'll either get a reply OR a signal that the other actor died. If, on the other hand, the actor is on another machine across the network then the semantics are different. You cannot always differentiate between the remote actor dying and an intermittent network connection error. So you need to take that into account in your protocol design - for example by making operations idempotent.

I've many times seen Erlang code where the developers didn't make this distinction - because the message passing operation looks the same, remote or not - and as a result the system is not resilient to network failures.

comment 5y ago · link · parent

“might cause”, yes. But at least with Postgres that only happens if you add a default value to the new column. You can add the default value in your application instead, just like you would with your average NoSQL DB. Then, when you have low load on your system, you can migrate the rows in batches to have a default value, and eventually remove the application default.

comment 6y ago · link · parent

Second that, what's wrong with NTT? 250mbit fiber for a fraction of what it would cost in the US. IPv6 ready. Basically no down time in 5 years. Very polite service staff.

Sure, if you look at how they design their websites, signup process and router UX, it's... a bit special (from a "western" perspective) ... But it works.

comment 6y ago · link · parent

What about building a service, perhaps a web browser plugin, that overlays a trust-worthiness score + contextual information, over text (bonus for images) on the web?

If a user posts "I recommend product X", the overlay would say "Caution: This user also recommended the product Y,Z in the last 48 hours. 34/34 of the users post in the last month are product recommendations. Sentiment score for users posts: 100% positive. The following internet accounts are likely controlled by the same individual or organization: ..."

Is it feasible? Does it already exist?

comment 6y ago · link · parent

Even if that would be true (that US supported that coup), would the democratically elected Mohamed Morsi have promoted science education in Egypt? The Muslim Brotherhood's history of science education doesn't seem so rosy.

I am curious what you think of https://www.hudson.org/research/9881-the-muslim-brotherhood-... (yes, I know this is written by an Israeli)

comment 6y ago · link · parent

It seems so, a key part of that quote is "working in".

https://books.google.co.jp/books?id=d2tF-L00-X8C&pg=PA216&lp...

"My late friend, the distinguished Pakistani physicist Abdus Salam, tried to convince the rulers of the oil-rich states of the Persian Gulf to invest in scientific education and research, but he found that though they were enthusiastic about technology, they felt that pure science presented too great a challenge to faith. In 1981, the Muslim Brotherhood of Egypt called for an end to scientific education. In the areas of science I know best, though there are talented scientists of Muslim origin working productively in the West, for forty years I have not seen a single paper by a physicist or astronomer working in a Muslim country that was worth reading"

comment 6y ago · link · parent

Abdus Salam belonged to a school/sect of Islam that encourages open debate and promotes a scientific interpretation of the Quran.

"Salam was an Ahmadi Muslim, who saw his religion as a fundamental part of his scientific work. ... In 1974, the Pakistan parliament made the Second Amendment to the Constitution of Pakistan that declared Ahmadi to be non-Muslim. In protest, Salam left Pakistan for London." [0]

[0]https://en.wikipedia.org/wiki/Abdus_Salam#Religion

comment 6y ago · link · parent

Well, macOS 10.15 has a user-space network stack. 11.0 can run on ARM as well on x86. So there are a bunch of things going on under the hood

comment 6y ago · link · parent

Previously on HN:

Why Uber Engineering Switched from Postgres to MySQL (2016): https://news.ycombinator.com/item?id=17280239

A PostgreSQL response to Uber [pdf]: https://news.ycombinator.com/item?id=14222721

One important point is that Uber wrote this running on Postgres 9.2. The latest Postgres release is now 12.4

comment 6y ago · link · parent

I think this is less about wanting to protect criminals, and more about US sovereignty at all costs. And clearly upholding this sovereignty was one of Trumps election promises.

Under this philosophy (or doctrine, if you will) of sovereignty, US will never accept that the ICC - an entity that the US citizens have not explicitly delegated their sovereign power to - are trying to prosecute US nationals.

https://en.wikipedia.org/wiki/Popular_sovereignty_in_the_Uni...

comment 6y ago · link · parent

To me, a non-US citizen, it seems that the International Criminal Court (ICC) is being quite reasonable here. ICC wants to investigate US military personnel that, allegedly, committed war crimes on Afghanistan soil after 2003. They can do that because Afghanistan ratified the ICC that year. Clearly, if the US wants to commit war crimes, they should only do that inside their own borders, where they are actually perfectly safe from the ICC.

That being said, I don't like when this kind of issues are politicized ("Obama destroyed America", "Trump sucks on all issues", ...). So I looked up the numbers.

The US congress and senate passed a law, in 2002, that gave the president authority to "with all means necessary, prohibit the International Criminal Court from seeking to exercise jurisdiction over United States persons, and allied persons"

https://clerk.house.gov/Votes/2002328

Votes by party

Republican YEAS: 201 NAYS: 18

Democratic YEAS: 195 NAYS: 13

Doesn't seem to be a "current administration" issue only. Clearly the US was caught up in the post-9/11 panic at the time of passing this law. But it seems a good idea to repeal it - if there is no longer a majority in support of it.

comment 6y ago · link · parent

UDP on AT&T and other carriers is just fine, but you need to do NAT hole punching or proxy the UDP packets. See my comment to the grandparent.

comment 6y ago · link · parent

UDP is fine. We have apps on the App Store that use UDP. This is likely a NAT related issue. That is not going to be an issue just for App Store review, but also for tons of other networks out there. As of lately, carrier-grade NAT deployments are very common.

It's usually impossible to establish a two-way UDP "connection" between two peers that are both behind NAT. This varies depending on the type of NAT. If just one peer is behind NAT you can typically establish the "connection" using NAT hole punching. If both peers are behind NAT you may need to proxy the UDP packets using an intermediary server.

There are protocols for hole punching, such as ICE (https://tools.ietf.org/html/rfc8445), but you can also roll your own - if you control all endpoints.

"Connection" in quotation marks because UDP is a connection-less protocol, but the NAT port mappings that are established are sometimes referred to as a connection.

comment 6y ago · link · parent

Yes, but they only store data in China for Chinese customers (as per the registered region of the Apple ID). [1]

[1] https://support.apple.com/en-us/HT208351

comment 6y ago · link · parent

There is Speech Synthesis Markup Language (SSML). Amazon Polly and Google text-to-speech supports it, although the best neural-model based voices only support a small subset.

comment 6y ago · link · parent

> why is it up to me to do weird math to figure out if I actually have enough $$$ to pay for what I'd like to have.

Well, one reason is: to make you aware of the tax burden (and judge if that % is kept at a reasonable level), rather than hiding it in the total price.

comment 6y ago · link · parent

Scott Meyers has retired from C++ (his own blog post: http://scottmeyers.blogspot.com/2015/12/good-to-go.html?m=1) so the next C++ bible has to come from somewhere else. Maybe he saw it coming :)

comment 6y ago · link · parent

Second this, you get two free Technical Support Incident requests per year as a registered developer, and you can purchase additional ones. We regularly file such requests and have always got timely and helpful responses.

comment 6y ago · link · parent

Under the GDPR, that Microsoft Data Protection Officer will have 30 days to respond to you. If they don't respond, you can complain to the supervisory authority (in the case of UK that is https://ico.org.uk/make-a-complaint/).

Now, Microsoft does not necessarily have to tell you exactly what of your data was leaked. They probably do not know! In this case, they may just respond to your request with all of the personal data they hold.

The law just says that they have to notify you of the "nature of the personal data breach as well as recommendations for the natural person concerned to mitigate potential adverse effects".

comment 6y ago · link · parent

> Does anyone honestly think this: [ 'H:|[view1(==view2)]-10-[view2]|' 'V:|[view1,view2]|' ] is readable?

This is not Auto layout, it is just an alternative string-based API to express constraints in Auto layout. In practice no-one (that I know) uses Visual Format Language, as it is called, but instead sets up constraints in code or in Xcode Interface builder. In Swift code it would look something like this: view1.leadingAnchor.constraint(equalTo: view2.leadingAnchor, constant: 10) view2.topAnchor.constraint(equalTo: view1.bottomAnchor) ...

comment 6y ago · link · parent

> so it can't gracefully scale layouts down from desktop to mobile sizes (when you have a 3-column layout you have lots of control over column widths, but no way of turning them into 3 rows instead).

On Apple platforms (UIKit on iOS) handling such layout changes is done with another mechanism on top of auto layout. Something they call "Size Classes". You get a callback saying eg. "view has changed to Regular width, Compact height" and you switch to a another set of auto-layout constraints + animate as desired. This size class system is used for stuff like handling rotation on the iPhone and transitioning to split-screen mode on iPad.

comment 7y ago · link · parent

> ABI-resilience by default at dylib boundaries

Actually ABI-resilience is not the default, it is enabled by a compiler flag.

In addition to that, there are some current compiler limitations when it comes to cross-module usage of generics and inlining that affect performance. But those are not by design and can be improved in future compiler versions.

comment 7y ago · link · parent

Technically it is a form of garbage collection. However, garbage collection is a very broad term that arguably encompasses even C++ smart pointers. Typically one refers to a garbage collector in the meaning of a separate process that runs independent of the application. Either in the background or “stopping the world” to collect. ARC is part of the application code. It is also visible to the compilers optimizer, which can optimize away redundant redundant reference count operations.

comment 7y ago · link · parent

The bigger question to me, is why doesn't the US do combined gas/electricy/... trenches accessible by manholes, like you can see in most northern European cities? Is it just economic shortsightedness or does it have to do with density (or rather US cities being the opposite of dense)?

(yes there are regulations on minimum distance between electricity and gas pipes, so these trenches have to be pretty big)

comment 7y ago · link · parent

Tip: long press the image you want to save, tap Save.
12345