skysight-inc/HackerNews huggingface dataset:
It depends what your string is a string of.

Slicing by byte-offset is pretty unhelpful, given how many Unicode characters occupy more than one byte. In an encoding like UTF-16, that's "all of them" but even in UTF-8 it's still "most of them".

Slicing by UTF-16 code-unit is still pretty unhelpful, since a lot of Unicode characters (such as emoji) do not fit in 16 bits, and are encoded as "surrogate pairs". If you happen to slice a surrogate pair in half, you've made a mess.

Slicing by code-points (the numbers allocated by the Unicode consortium) is better, but not great. A shape like the "é" in "café" could be written as U+0065 LATIN SMALL LETTER E followed by U+0301 COMBINING ACUTE ACCENT. Those are separate code-points, but if you slice between them you'll wind up with "cafe" and an isolated acute accent that will stick to whatever it's next to, like this:́

When combining characters stick to a base character, the result is called a "grapheme cluster". Slicing by grapheme clusters is the best option, but it's expensive since you need a bunch of data from the Unicode database to find the edges of each cluster - it depends on the properties assigned to each character.
NFT on Me – Retrieve NFTs linked to an Ethereum address quickly
It's not always the case.

I work at one of those US bank.

The amount of inefficiencies in form of red tape, confusing processes, custom half-baked tools that crash half the time is just mind-boggling. I've spent more than a week now for opening firewall on one ip/port on one host just to test my prototype in dev environment(local machine or docker are not an option due to lack of admin rights ), and it's still in change approval stage.
If we weren't this giant too-big-to-fail bank we'd be out of business by now.
It was unknown to me until last week that web browsers can now share screens--I mean the whole desktop! I had to do a webex session, and I assumed I needed either Chrome or some kind of native app to do screen share. But, to my pleasant surprise, webex worked well with Firefox!

Also new to me is 'pointer locking'. I wonder/wish if/when browsers would be able to transparently pass key bindings that'd otherwise be captured by the OS, like Alt+Tab. Then, just by visiting a website, I could use, for example, Citrix desktop remote login through my browser as if it were a native app.
Wow, thanks for the insight and ideas!
Agree, having native running runtime at edge can can give a start to some interesting projects
Walk slower or quit. The efforts you have put in have not been apprechiated.
This is true, but alerts and monitoring software can fail in many ways, due to network issues, process crashes... Etc.

Due to the simplicity of this solution, there's not much that can go wrong.... unless you can't actually access the server anymore to delete the file...

I see this more as a second line of defence
Buy annual licenses. Then renew if you want to block the same amount next year OR don't renew and use it for what you actually need.
One thing that was taught to me in university related to this, is that in optimisation, "every little bit" does NOT help. This insight applies to everything, and is the cause of great frustration. The world should know about this law and that optimising the 3% case is useless in any field, if there's an 80% case staring you in the face.
I've heard this too, but as far as I'm aware Thomas has not confirmed this as the reason for why he's speaking up now.

Edit: Wanted to say that it's kind of weird to me to think that Thomas wasn't asking questions only because Scalia was. Maybe that's true, but it's just an odd thing to think for me after reading tons of Thomas' opinions. He definitely has a mind of his own.
I would assume that they either have direct value (bank notes cannot be smoked), or they're a more reliable store of value than bank notes, or they're more liquid than bank notes in the types of business they would need money for later.

In short, maybe cigarettes are a better money than whatever fiat bank notes could replace them.

(Though the text does seem to indicate that payment was often made in a combination of fiat and cigarettes, so maybe they're about equal in value after all.)
Build a pyramid on top and let scavengers do their thing
I have to disagree. In the neighborhoods most like to suffer gentrification, people rent and don't own their living space. Increasing real estate prices only mean higher rents, making it impossible for existing residents to stay, long term, in their apartments.

Only owners can sell, usually to investors. This is a major rent driver. Up to the poitn were small grocery shops can#t afford it anymore and have to close. And I am not sure how us building a house for us, and only us, had any positive impact on any of our neighbors.
Just use some thumpers and Shai-Hulud will save the day.
My favourite hotel with them with value/price with member rate was this Ritz Carlton in Portugal (less than 200 USD/night for standard room):

https://www.ritzcarlton.com/es/hotels/europe/penha-longa#HOT...

If you use their site, they give you some money that you can use to eat at their pricey, but amazing restaurants (also 2 of the hotel's restaurants has Michelin star, but I haven't tried those yet).

Their swimming pool / jacuzzi is bad, but the nature, the castle and the room is great.
Ideally the interface is named in a way that's self-documenting and makes it clear that it's not referring to moving around your house, no downcasting required.
If I type the following into ghci, I get the state flag of Texas:

putStrLn "\x1f3f4\xe0075\xe0073\xe0074\xe0078\xe007f"

The first character is a flag, the last character is a terminator, and in between are the tag characters corresponding to the ASCII for ustx. Just take those characters and subtract 0xe0000 from them, 0x75, 0x73, 0x74, 0x78.

https://en.wikipedia.org/wiki/Tags_(Unicode_block)

Edit:

Just for fun:

import Data.StateCodes

import Data.Char

putStrLn $ map (map toLower . show . snd) allStates >>=

\stateCode -> '\x1f3f4':map (toEnum . (0xe0000+) . fromEnum) ("us" ++ stateCode) ++ "\xe007f"
Why would it be? I have yet to see a convincing argument that popular juries make better (more just) judgements.
Debunking myths about audio cables
I don't say that a string has to be mutable, I am saying that when you assign a value to a string variable, such as during its first (and let's say 'only') initialization, it would be absolutely insane to also have to set the string's length.

Arguing against setters is like arguing that

String s = "foo";

must also be accompanied with

s.length = 3;

The two operations make zero sense to be done separately - doing so is just a minefield of bugs. The purpose of a setter is to combine similar inseparable operations together.

A trivial pass-through setter obviously provides ~zero value, but it also carries with it ~zero cost. Any compiler worth its salt will optimize its invocation away.
I found it interesting to see what happens on safari on iOS after each permission was requested. About 1/3 did nothing, a few of them were denied without a prompt, a few of them were as expected. And a few of them had weird prompts like the pan/tilt on asking for camera permission.

Was also interesting to see webauthn ask if I wanted to allow a site to use faceid which I didn’t know was even possible
The FAQ suggests that NFS is problematic for concurrent access:

> But use caution: this locking mechanism might not work correctly if the database file is kept on an NFS filesystem. This is because fcntl() file locking is broken on many NFS implementations. You should avoid putting SQLite database files on NFS if multiple processes might try to access the file at the same time.

https://www.sqlite.org/faq.html#q5
There's a great aversion to coding up any heuristic or rule system when you can learn about ML and apply it. It's more interesting, flexible and pads resumes. And sometimes it works as well or better than the rule systems, though it's rare.
Wow, the Chinook looks so tiny in comparison to the Mi-26.

40ft container maximum weight is 67,200 lbs. Skycrane max payload is 20,000 lbs and Mi-26 is 44,000 lbs. But do you think all the containers are at max weight? The ones on top are the lightest and the helicopters might be able to help with them after all, or maybe we can find a way to use two helicopters per container.

http://containertech.com/about-containers/40-standard-vs-40-...
sshd runs as root, so yes, it will be possible to login as any user -- the sshd daemon will be able to function. :-)

The only files that would be appended to on user login (by sshd, which is running as root) would be /var/log/{utmp,wtmp,btmp} to record the login (in practice I've only seen wtmp). After that you have sshd logging (e.g. /var/log/{messages,syslog,auth.log}) which is picked up by syslog-ng or its equivalents, which also run as root.

Regarding not being able to login via SSH as root by default: the sshd_config default is actually `PermitRootLogin prohibit-password` which means you can login if you use public-key cryptography, it just won't allow you to login with the root password (even if it's correct.) It's good practice these days to use public keys for SSH anyway, so I wouldn't say this is much of a setback.
Doesn't splitting by grapheme cluster also depends on which version of the unicode standard you use, since new standards come with new combinations?
I use Chromium and Puppeteer to automate creation of PDFs. I considered both wkhtlmtopdf and weasyprint but I decided you can’t beat a debugging UI like Chrome’s.
Running `tune2fs -m 0 /dev/sdaX` as root instantly makes the reserved blocks available. You could even just lower it by 1% which would be more than sufficient in the meantime: `tune2fs -m 4 /dev/sdaX`. When you've fixed the issue and freed up space, you can increase it to 5% again.

So why would you bother making a blank file? :)
Maybe it's the global warming but why is April so early this year? ^^
It is absolutely bonkers how well foobar works under Wine.

I too have a large library and foobar just picks it up immediately.
> Yes I do, I don't believe Amazon violates basic human rights, at least not on a regular basis (...)

Isn't the propensity to violate basic human rights in such a casual and nonchalant way albeit not systematic... Extremely damning and concerning?

I mean, what is there to say about the sentence "I know they commit crimes that hurt people and society, but not on a regular basis"
You'd think there would be liability insurance like with cars.
I think they use other methods for identity verification, including WhatsApp and Instagram. If you don't exist in their ecosystem, it's possible they think you don't exist.

A lot of friends who post blank avatars have been randomly banned as well, so you can't do that. Someone leaked an internal document several years back on their anti-troll/raid measures, and a lot of them try to identify if your personality aligns with those from 4chan, etc.
https://www.nicovideo.jp/watch/sm8628149

No one involved complained as long as end result remain roughly BY-NC and the music is cool so everyone just took it and put into various projects, which only made it increasingly famous.

The original song was for the PC-98 game by ZUN, vocal remix was by Alstromeria Records, I don’t think video creators for the concept and the famous version has preferred names to be associated with.
"Knock knock. It's the United States. With huge boats. With guns. Gunboats."
Should I bring drinks? Or should I bring my C manual signed by Dennis Richie for some fun party discussion?...never mind I'll bring both. I can't wait for an engaging discussion on the pros and cons of ANSI C!!!!
Hi! Thanks for your reply, I found the problem. I'm using NextDNS and it blocks the domain because it's been registered only a few days ago. I've added it to the allow list and now it works, thanks!
It seems that containers may be too heavy. The most powerful chopper (the M-26) lifts up to 20,000kg (with most heavy-lift choppers probably lifting about half that), while some containers may wel exceed 30,000kg.
‘Radiation upset’ confused computers and caused false alarm on the ISS
We've had FP, we've had OOP, the next paradigm to look out for is Data Oriented Programming. Tools like ECS with their systems and components have started to become rather popular in the gaming world, and is slowly spreading outside it while we find applications for it.

I understand it's not the best tool for the job, and object oriented is most likely is here to stay, but we need to broaden our horizon so we have more tools where applicable!
It really is fantastic how wonderful the English government is. Mr Turing would be proud to be represented by such an brave and forward thinking group of people.

It’s amazing how much has changed since his time, when he faced some legal difficulties for being gay - now, nobody is persecuted at all in England, and it’s all down to the brilliant government, who you can be sure Turing would have voted for.

Edit: Make up your minds. Yesterday, you didn’t like it when I said they persecuted him and were using his name and image for propaganda purposes. Today, you don’t like it when I fawningly shower them with praise.
In order to experiment with WebXR without having my Oculus continously on my head, I installed the WebXR emulator extension from Mozilla.

I'm stunned how often I get the permission prompt on completely unrelated websites.

I guess it allows tracking scripts to do even more fingerprinting.
As a point of contrast, I maintain a CI system at work, with a plain-old-HTML (almost javascript-free) log browser. Including ANSI syntax highlighting (server-rendered), timestamp tooltips, real-time updating, etc.

Chrome has no problems loading >140k lines of logs (~10mb, biggest job I could find) and scrolling/searching/selecting/copying/etc. Obviously not as snappy as smaller logs, and also not as snappy as downloading the log file to browse in IntelliJ, but it works OK-ish. It's a lot higher than the ~20k line soft limit they described in the post!

The biggest difference I could find is that Github Action's log browser generates 6 HTML elements with ~673 characters of HTML overhead per log line, whereas our own log browser generates 1 HTML element with ~45 characters of HTML element per log line (basically a single div with a timestamp attribute for a non-colored line). In that light I guess it's not surprising that browsers have more trouble with Github Actions logs given how much more work they are making the browser do to render each line of logs!

The minimal-HTML nature of our log browser was an intentional design goal. It's interesting what kind of limits you hit: you cannot use opacity (too slow), no rounded corners (too slow), one-div-per-line is faster than using spans and line wrapping (no idea why), no per-line JS logic (attach your event handlers to the parent container and wait for propagation). Kind of restrictive, but it's certainly nice not to have to implement an entire virtualized scroll window (which I have done before, and would rather not do again if possible!)
Just spin up an instance of Golden Goose on Elastic Clownshoes
> No, I'm arguing that corporations aren't moralistic entities

But they are, aren't they?

Don't you understand that corporations are a bunch of person organized into a hierarchy?

Why would anyone claim that people working within a hierarchy are free to make any immoral decision because they manage some people but answer to other?

At most, you're only arguing that some hierarchies refuse to respect morals or legalities because no one is held accountable and were found to have zero consequences.
I have long pondered an answer to this question. There are some hacks for various DB mechanisms. But nothing truly on par. It's a business opportunity if anybody crack this!
Not really. A Unicode string is more like a sequence of data built from simple binary structs, which belong to a smallish group of valid structs. Additionally, some but not all, of these structs can be used to infer the validity of subsequent structs in the sequence if your parsing in a more byte-at-a-time fashion. Alternately if your happy dealing with a little less forward compatibility and go for explicit enumeration of all groups of valid bytes you can be a lot more sure of things but it’s harder to make this method as performant as the byte-at-a-time method, which given the complete ubiquity of string processing in software... leads to the dominance of the byte-at-a-time method.
I am surprised Uber Eats is losing money given how expensive it is. Is there a source on that? Could it be due to expansion costs in new cities/countries rather than losing on per-order basis?
Generics?
There are also languages like Nim which have a method call syntax, that means:

myMethod(myObj, myParams) == myObj.myMethod(myParams)
CoScreen has been a workflow game-changer for my team— the concept is merit worthy IMO.
Nice platitude but I’m not sure what it means.
It'd be way easier if I could turn if off device-wide instead of trying to work out how to modify the obfuscated app my bank provides.
> ARM has probably agreed to look the other way as long as they don’t draw attention to the fact

That makes it sound like it is some kind of "tacit understanding", "I won't say anything if you don't say anything". I'm suggesting that maybe Apple's license agreement explicitly states that they are allowed to do all this, but also maybe its confidentiality clauses prohibit either party from publicly acknowledging that fact without the other party's explicit permission.

A company like Apple – who has a well-funded legal department, and I've never heard any suggestion that they are anything other than competent – wouldn't set up a multi-billion dollar business on the foundation of "agreed to look the other way". They'd have it all set out in writing, crystal clear and totally secret.
There are a ton of use cases that demand it, so it was added a long time ago (around the same time as Fullscreen, I think). The current user experience for it (opt-out instead of opt-in) has likewise been around for ages. I think I remember seeing an explicit permission prompt very early on but they got rid of it.

"You could label that button anything" sadly applies to a significant number of dangerous things a website can do, pointer lock is not near the top of the list.
The lack of red-scare anticommunist propaganda in these articles isn't misinformation. Rather, one wonders why the same standard you expect for these articles isn't applied to those about the United States government and its own domestic and international abuses. In fact, wikipedia's owners support spreading regime change propaganda on the website [1]

1. https://thegrayzone.com/2020/06/11/meet-wikipedias-ayn-rand-...
I’m dealing with this right now with my manager and it’s infuriating.
> My pet peave is the way sqlite accepts non-aggregated columns in a GROUP BY query.

Funnily enough, this is my favorite feature of sqlite that I wish other RDBMSs had :))

There is no easy equivalent to `SELECT order_id, status AS latest_status, MAX(updated_at) AS updated_at FROM orders GROUP BY order_id`. Well, it's possible, but for example in Postgres you need some silliness with nested queries, `PARTITION BY`, and `ROW_NUMBER()`.
Has Elon Musk volunteered to fly out there with a portable submarine yet?
> They're breaking their own laws decided by their own people

Generally countries where petty corruption is rife aren't healthy democracies.
Sure, I understand it, I also first look at the hotels to go, but I go to a lot of reserves, and the best ones are quite often Ritz Carlton or Four Seaons. Four Seasons don't have member rates though.
Idk, but just a few weeks ago I started looking at Julia, partly because of the performance claims. I wanted to write a program a bit heavier than your average starter program, so I wrote a back-tracker (automatic layout for stripboards, to be precise). It was

* interesting (not fun) to find out how Julia works

* annoying AF to discover that much of the teaching material was hidden behind some 3rd party website, presumably in videos (I didn't bother to register, but started browsing the manual instead). What's wrong with text?

* unnecessarily complex because the documentation for the basic functions is nearly inaccessible to beginners.

But, I managed to get a simple layout system up and running, and it wasn't fast. I rewrote it in Go (the language in which I'm currently working most), and it was literally >100x faster. And that should not be due to the startup costs, because a backtracker shouldn't have that much overhead JIT-ing.

I think I can now say that I can't see the use case for Julia. "Faster than Python" is simply not good enough, and for the rest there are no redeeming features. Perhaps the fabled partial differential equation module is worth it, but that can get ported to other languages, I guess.
In the Honda CBF125 group on Facebook, a fellow Indian shared a photo of his bike. A British guy asked what's the switch, he's never seen one before. Same bike, same country of origin, but only certain markets get the switch and the recessed panel.
The State of PostgreSQL 2021 Survey
Yeah, I clicked that thing like 6 times before I understood.

For the confused: Check the address bar, clicking it actually changes the URL of the site (to flip you into/out of secure mode)
I went the feature phone route, bog standard Nokia with a 64 GB SD card in it for music/etc.

I managed three months and then a customer sent me an iPhone because sending SMS's was too much of a hassle when everyone else was on Slack 24/7, and because their authentication scheme was changing and they required a smart phone app for 2FA.

Years later, I still refuse to put Slack on my phone (now an Android), but I can't get away from various app requirements connected to my business number, and I can't be bothered to have two separate phones when I have two SIM slots in my phone anyway.
You can check an app on iOS called elytra for rss
Yet another cookie consent popup, but this one is neat
I have always been curious about this, because in my mind systems (however distasteful we may find them) do not arise for no reason. You imagine it reflects some underlying dynamics going on.

I have heard that Arabic / Islamic society is much more family, neighbor, who-you-know oriented versus western society trusting more the rules of some authority, even if not personally known to you. Even for example, mundane things like if you need your plumbing fixed, you don't look up the yellow pages, you ask your friend to refer someone.

Does this lead to "favors" being more acceptable, like as a gift to someone you know for having helped you? Interpreted in a more charitable way, bribes/baksheesh are an expression of gratitude (though now an obligation of doing business)?

You start to think such factors must be ingrained in a people's mentality, because otherwise, why don't we just declare laws that make this sort of practice illegal and everyone is happier?
Clearly not as Canada has a massive homelessness issue in Vancouver and a strong safety net.
> But do you put all your trust in your monitoring, 100%?

Yes. If I didn't feel that I can trust it, I would get another solution.

> You've never had a server fill up before you can respond to the alert?

I have. With the proposed hack in this article: it would fill up even faster: by that amount of time it would take the problem to write 8gb of data.

> Because believe me, they WILL go awry.

In my experience: not in any way that this would help. If your disk fills up, it's either slow (and your monitoring alerts you days or at least hours before it's a problem) or it's really, really fast. In the latter case, it's much faster than you can jump on your computer, ssh into the machine and delete your spacer file.

Invest in better monitoring, that's much, much, much, much better than adding spacer files to fill up your disk or changing the wall clock to give you more time.
Suez blockage is holding up $9.6bn of goods a day
Loop Alignment in .NET 6
This looks nice, I do hope it can stop me using a doc editor for this job.