Would this work, or is there more to it?
2,126 karma · joined June 21, 2009
https://github.com/CyberShadow
[ my public key: https://keybase.io/cybershadow; my proof: https://keybase.io/cybershadow/sigs/iQOqJAZGCVN0DykK2PLwcTGU247dIo3aZnm6s6VOgjk ]
Would this work, or is there more to it?
- The system should be able to efficiently store, manipulate, and search an unlimited number of clipboard entries with reasonable performance.
- The software should be cross-platform, and should have implementations for major desktop platforms (Windows, X11, Wayland, macOS).
- Non-text data (images) and rich text (e.g. HTML) should be supported.
- Clipboard history can be shared across instances using a network connection.
- Instances may temporarily go offline, and sync up with other instances once a connection is re-established.
- - All functionality should continue to be available when offline (other than sync).
- Deletions must be propagated across instances.
- Deleted clips must not be trivially recoverable.
- Deleted clips must be deleted everywhere, including any copies in OS clipboards.
- Sync should be incremental (and otherwise generally efficient).
- When connected, actions should propagate across instances in real time (instantly, as opposed to polling, and with no unnecessary roundtrips).
- Relaying should be supported (in a `A <-> B <-> C` scheme, A should be able to see C's actions).
- Network topology cycles should not result in a feedback loop.
- It should be safe and easy to simply copy the database file to another host, "pre-seeding" the clipboard history.
- Support "portable installs" (carrying the software, configuration, and database on portable storage).
- It should be easy to write interoperable implementations of bridges/clients in most programming languages.
- Non-GUI functionality should be separated (or separatable) from GUI functionality, so that a GUI toolkit doesn't need to be loaded at all times.
Any suggestions?
> e makes it super annoying
I rest my case?
That's not an argument against enabling it.
In bash, -o pipefail addresses this.
> and u is inconvenient when appending to PATHs
PATH should always be set. Try: env -i sh -c 'echo $PATH'
If you're prioritizing convenience over correctness, prepare to face the consequences.
> Every tool has its place, and dogma is often unhelpful.
Visual Basic's "ON ERROR RESUME NEXT" perhaps also had its place. That doesn't mean that using it is good advice.
If anything, I would consider the often cited wooledge etc. advice of not using -e/-u as dogma. Case in point: no one lost 77TB of data because they should not have used -e/-u.
1. Bind the behavior you want in the global map. (global-set-key (kbd "<key-here>") #'the-action-you-want)
2. Any time you encounter a mode which overrides this key, press C-h k <key-here>. It will tell you the name of the map in which the key is bound (usually foo-mode-map). Then, add: (define-key foo-mode-map (kbd "<key-here>") nil). This will unmap the key from the mode's map, revealing the binding in the global map.
Well, it does network access, so it would excluded.
> For another example, iterating through a set in Python will give you the elements in a different order on 32- versus 64-bit systems.
This is a good counter-point.
> Brainfuck does not standardize overflow behaviour and so the same program may behave differently on different systems.
Different implementations of Nix might have the same issue in some places. In this case, whether the language is fully defined is orthogonal to whether its behavior is deterministic; here, a particular implementation will continue to be as such.
As far as I know, Nix doesn't have a formal specification; it is defined by its reference implementation.
Pick any programming language. Now, remove access to I/O (except standard input and output), networking, time, random number generators, threads, OS syscalls, etc.
Given an input, the program will always generate the same output, i.e. it is deterministic. However, the program is still allowed to have global mutable state; the state is just encapsulated to the program's memory and execution time.
A trivial example is Brainfuck. It is most certainly not a functional programming language, but it is deterministic.
What about using a gas pump?
https://www.reddit.com/r/assholedesign/comments/ozu1up/havin...
Seems that the trend is going in this direction.
This is my last reply in this subthread; feel free to assume the same answer for all questions along the same line.
I also invite you to review the HN comment guidelines: https://news.ycombinator.com/newsguidelines.html
You can search online for my name / username to find my open-source contribution history, if you would like.
I hope that sufficiently answers your query.
I don't know what to tell you. It's not there.
https://dump.cy.md/9b2a31fa5184397159fe42a85c197242/16404476...
It is there if I check with cURL, though.
Edit: looks like this bug is triggered by the absence of Accept-Encoding in the request. When the server compresses the response, it neglects to include the Content-Type of the compressed content.
> You defend Microsoft, here and in other parts of this thread, as they sell the work of open source authors without attribution and in violation of explicit license statements in the code.
I did no such thing. Please stop.
Not a very good one - clicking the link produces a download dialog on Firefox (I'm guessing because the website neglects to indicate a Content-Type).
Ironically this is an argument against trying to do everything yourself - you might waste time chasing the long tail of thousands of little details that had been solved many times over elsewhere.
Yes. Additionally, the way such actions are performed is not great because the mechanism used does not provide any way to provide feedback - if the change was done by a user account, then they would have received notifications about the comments posted under the commit, but the ones received by the service account probably go nowhere.
> This is the open source management service account used for performing key GitHub operations on behalf of Microsoft employees and users.
Combined with the nonsense README change, this looks like a bot mis-use accident.
Edit: to clarify, in no way am I saying that this is a "honest mistake" which does not deserve scrutiny.
yt-dlp uses a different method than youtube-dl (I believe it uses the API used by the Android app, instead of by the youtube.com website).
If the conditional move doesn't happen, then the source (insofar as the move is concerned) is unused.
Consider this pseudocode:
int value = some_nontrivial_function_with_no_side_effects();
if (condition)
*target = value;
Note that the function can be as simple as a memory read.The compiler could compile this in two ways:
1. Observing that the function's result is used only if condition is true, move the function call inside the if block.
2. Always call the function, as in the source code, but compile the if block to a conditional move.
In such situations, it would make sense to allow programmers to indicate the desired strategy to the compiler.
I suppose CPUs might elide calculating the value even with a conditional move if they can predict the condition is [likely to be] false; I don't know how true that is in practice.
> Also, the “calculating a value” isn’t really the trade off being made between cmov and branching.
Depending on the situation and interpretation of terms, I also agree.