Hacker Newsnew | past | comments | ask | show | jobs | submit | anilakar's commentslogin

Most online merchants redirect me to my bank's web page when I enter my Visa credit card number. In theory it should be possible to have a card number that by itself is useless and always requires an external confirmation?

with a mastercard from a swedish bank that is the experience that i get. all online transactions pop up a page from my back with qr code, this is authenticated through an app that shows me the transaction details and requires pin confirmation.

Removing code paths that the programmer has explicitly laid out in the source code should be made a hard compile error unless the operation has been tagged with an attribute (anyone who wants to add the unsafe keyword to C? ).

Another commenter suggested using LLMs, but I disagree. Having clangd emit warning squiggles for unchecked operations (like signed addition) would be a good start.


> Removing code paths that the programmer has explicitly laid out in the source code should be made a hard compile error unless the operation has been tagged with an attribute (anyone who wants to add the unsafe keyword to C? ).

Dead code elimination is essential for performance, especially when using templates (this is basically what enables the fabled "zero cost abstraction" because complex template code may generate a lot of 'inactive' code which needs to be removed by the optimizer).

The actual issue is that the compiler is free to eliminate code paths after UB, but that's also not trivial to fix (and some optimizations are actually enabled by manually injecting UB (like `__builtin_unreachable()` which can make a measurable difference in the right places).


> The actual issue is that the compiler is free to eliminate code paths after UB

Not, that the compiler can also emit code paths before UB, as UB is a property of the whole program, not just of a single statement.


> free to eliminate code paths after UB

before.


Dead code elimination is run multiple times, including after other optimizations. So code that is not initially dead may become dead after propagating other information. Converting dead code into an error condition would make most generic code that is specialized for a particular context illegal.

This is trickier than it initially seems. Using preprocessor directives to include or exclude swaths of code is a very common thing, and implementing a compiler error as you described would break the building of countless C codebases.

Consider:

   enum op_t{ add, mul };
   int exec(op_t op, int a, int b) {
       if(op == add) { return a+b; }
       if(op == mul) { return a\*b; }
   }

   c = exec(add, a,b);
Should be the compiler be prevented from inlining exec and constant-propagating op and removing the mul branch? What about if a and b are constants and the addition itself is optimized away?

Without AI, both writing and reading code are bottlenecks.

How many times have you reviewed your old code and been appalled at the terrible quality? You personally created slop; it's no different from GenAI output except that a human had to spend precious time crafting it. You likely were indeed bottlenecked by your ability to churn out code that you just had to get to work, for one reason or another.

The real issue is in the asymmetry when one party can use automation to create more code than another party can possibly manually verify.


Those ATtiny85 boards that plug directly into a USB port are great if you need 1 to 5 GPIOs and/or a HID interface. At 2 dollars apiece or so it's worth having a few around.


When my mom remarried, her new husband started to manipulate her and isolate her from other relatives, trying to turn everyone against each other. The last time I met her, I was basically talking to two copies of him.

I've already dealt with the fact that I will not get my mom back.


That sounds like something you fight harder on instead of being defeatist.


The author argues that writing code cannot be a bottleneck because work always fills up the allotted time. Developer teams should instead focus on doing less and writing better specifications.

The error in the reasoning is that while you can increase your resourcing to tenfold and gain nothing in return, the inverse is not necessarily true.


That site itself violates at least "similarity", "proximity" and "common region" as everything is sorted in one alphabetical list.


We were on self-hosted Gitlab but after a merger were forced to Github. Navigation feels painful in comparison and basic features such as commit graph are now behind more expensive tiers.


> We were on self-hosted Gitlab but after a merger were forced to Github. Navigation feels painful in comparison and basic features such as commit graph are now behind more expensive tiers.

Same experience here. Add to that that even on Enterprise tier:

- 1 Enterprise : 1 namespace - although you can segment it with Orgs, we were advised not to do it because we're too small (~2k people) (GL: groups, subgroups, sub-subgroups, ...)

- SSH deploy keys are singletons across the entire instance and repo-bound (and Weblate for instance can only use its own key), so you need a service account for that (GL: instance-wide SSH deploy keys that you can activate in specific repos)

- GHCR only really supports classic PATs for authentication ( https://docs.github.com/en/packages/working-with-a-github-pa... - GL: proper deploy keys properly inherited throughout the hierarchy)

So all in all the experience so far is a huge step-down. I really liked pinning commonly accessed pages in the sidebar.


Interesting! I worked with Gitlab and I also thought it was quite clunky. If it was not for the stability issues GitHub is fine. Any other alternatives to GH or GL?


Self-hosting with open source code:

- SourceHut: https://sr.ht/~sircmpwn/sourcehut/

- Forgejo (used by Codeberg, etc.): https://forgejo.org/


SourceHut never really clicked for me. It doesn't give me anything useful that I don't already have in a bare git repo through a ssh.

Forgejo, on the other hand, is a drop-in replacement for GitHub.


Also:

- https://about.gitea.com/ (F/OSS MIT license self hosting GitHub like instance)


We switched from Bit bucket to Gerrit internally and it was a steep learning curve for the des but it's fine.

At a customer we're implementing GitHub Actions and even on our Dev environment there are so many hickups with GitHub.



Gitea might be an option also.


Jira / Bitbucket / Teamcity.

Might be pricy though.


Having used Teamcity for CI I cannot think of a more clunky and hard to use system (compared to GHA, which is what we migrated to).


Biometrics are "what you are", not "what you know" or "what you have".

Voice fingeprinting is essentially useless because it is easily recorded and reproduced.


I have been telling people for years that biometrics (face, fingerprint, voice) is your username, not your password. But people are easily swayed by convenience.


If your user name is tattooed on your forehead, yes.


For all intents an purposes it is, especially face ID. Also, courts in most countries can compel you to provide biometrics. But many cannot compel you to reveal passwords.


> that it looks just like an Apple system notification and it disappears without a trace afterward

Probably so-called SMS flash messages. They're shown as overlay popups on Android too.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: