skysight-inc/HackerNews huggingface dataset:
Manage/edit large, complex configuration files with sed and ed
#!/bin/sh
# 1.sh: search/dump
test $# -gt 1||exec echo "usage: $0 cfg-file [section]";
x=$1;shift;y=$(echo "$@"|sed 's/ /./g');sed -En "/$y/=;/./{/$y/,/[^L^K]/p;}" $x

#!/bin/sh
# 2.sh: delete/remove
test $# -gt 2||exec echo "usage: $0 cfg-file section";
x=$1;shift;y=$(echo "$@"|sed 's/ /./g');sed -iE "/./{/$y/,/[^L^K]/d;}" $x

#!/bin/sh
# 3.sh: add/insert
test $# -eq 2||exec echo usage: $0 cfg-file line-no \< section-file
(echo $2;echo a;sed '1{/^[1-9]*/d;}';echo .;echo wq)|ed $1

Objective: Without needing non-standard programs or large scripting laguages, manage and edit long. relatively complex configuration files that are divided into sections.

NB. I wrote this for me, not anyone else. It is shared here only because it demonstrates a stupid sed trick I have never seen anyone else use. I have been using this sed technique for over 10 years.

Example:

# 1.cfg: indented config file
# sections are separated with a left-justified control character such as ^L or ^K
# note for learners: ^L is inserted by typing Ctrl-V followed by Ctrl-L
^L
# SECTION W-a1
foo
^L
# SECTION X-b1
bar
^L
# SECTION Y-c1
baz
^L
# SECTION Z-d1
qux

Dump all sections

1.sh 1.cfg \# SECTION

The line numbers for all lines will be printed. This can be useful for adding/inserting sections. The output can also be edited to work as an ed script.

Dump sections W-a1 and Y-c1

1.sh 1.cfg \# SECTION [WY]-[ac]1

The line number for the section header will be printed. This number, e.g., N-1, can be useful when adding/inserting sections.

Dump section Y-c1 to a file for editing

1.sh 1.cfg \# SECTION Y-c1 > edit.txt

Delete section Y-c1

2.sh 1.cfg \# SECTION Y-c1

Insert edited/new section into config file, in the location previously occupied by section Y-c1 we deleted earlier

3.sh 1.cfg 9 < edit.txt

9 is the line number where we want the section inserted
It's certainly not as straighforward as learning a more popular language and environment, but there are online resources if you look for them. A quick search yielded https://github.com/openmainframeproject/cobol-programming-co...

There appears to be an active community around it, and I'm sure getting help in an apprenticeship sort of way is possible. Again, we're talking about a niche language, so you can't expect the same level of accessibility as NodeJS or Go.

As for finding jobs, they're probably few and far between, but appear to be well paid from what I've heard. Places that need COBOL programmers will announce it, opportunities will likely come up from other contacts in the community, and cold contacting companies you know are using it is always an option.
Sorry I reread and you said hibp so you know! Why not use the entire set?
Will probably work about as well as that time when I was young and decided to spend about a week signing all receipts with a signature that looks nothing like my usual one, just to see if it would ever be challenged.

Many people are, contrary to all pretense, mostly paid to not give any actual fucks.
That kind of "exception handling" is what I use Typescript for. JS decided back around ES4 that type hints were too complicated for browsers and they've been left to outside tools like Typescript and Flow.

I'm not always sure that was the right decision long term, but that was an informed decision of the time.
Its right there in the middle - labeled Free Space
Sounds like nonsense not common sense. It's not in my best interest for anyone but me to decide what's in my best interest. Not everyone measures their life by the same metrics.

The risk of going bankrupt is part and parcel of trying to suceed and live the life you want, whether in business, investing, day trading, or even just getting a university education in some places…
LimeWire: The Oral History of the App That Changed Music Forever
> What is missing is the man's ability to memorize the function and carry it out without the book. If he could, and the function truly produced a normal response to any Chinese phrase in existence, then he would speak Chinese.

No, the function would.

My CPU doesn't speak HTML. My web browser does. Does running my web browser mean the CPU speaks HTML, even if the whole browser is loaded into cache? I don't think it does; the CPU is still running machine code.

If I memorise a Turing machine, does that mean I understand the computation it's performing? No; I'd have to pick it apart and work out what each bit does, then put that meaning back together, in order to try to work out how it works.

Memorising the function would enable the man to teach himself Chinese (whichever language “Chinese” is), just like memorising a good mathematics would allow most people to teach themselves the concepts therein. But memorisation isn't understanding.
UiPath (and similar) as a "no code" solution is a bit of a joke (on those that don't know any better). Don't get me wrong, I think it's a good application for automating processes or certain types of jobs, but a lot of coding has to go into it. Often you are typing lots of VB.NET or C# code into boxes.

What's often really going on, is often "packaged libraries" that you add to do a task, then lots of typing of sort of "glue code" in boxes to get them to work together. Which can lead to getting bit in the butt with the problems of "no code visual programming", where there is boxes on top of boxes hiding stuff and potential troubleshooting headaches.

Often, the team needs a "real programmer" or close to it, that can handle the heavy lifting, troubleshooting, or custom solutions.
Tying a financial product with a web browser? I see MS has been hard at work finding innovative new ways to respect user browser choice.

Next step: Guaranteed skipping automated job application filters for CVs written using MS Word.
Tiger Global is venture capital's winning machine
You wouldn't even change your routine in a nuclear war, unless you live downtown in Seoul or Islamabad, in which case you'd drive or be evac'ed out of the city with smoke in the distance.

OP said - "if we all actually die in a nuclear holocaust armegedon". It's not technically possible let alone politically possible. You'd have to get everyone to stand in circles or eat radioactive rubble directly from the bomb sites.

Some people can and would die from nuclear war, and it is possible, quantum computing as far as I can tell is probably made up. You need to get with reality for such analogies if you want to make them.
Seems like you're relying on the dossier to dispute the comment you're responding to...?
You should look up the past of the germanys next chancellor
"Hey Infrastucture Finance Boss, we need a new database."

"Thats cool, how much per month should we budget?"

"$1.50 per 10 million rows inspected"

"What? How much is that per month?"

"TBC, and we won't know until we start using it"

"RDS is $x per month so you're sticking with that"
And it looked so clean! https://i.imgur.com/u9U8VLm.png
I see "tree shaking" as a common defense (too often IMO) from people arguing over bloated code and dependencies.

But in this case, tree shaking simply doesn't occur at all in this scenario since npm modules are installed on the backend, and tree shaking simply doesn't occur on the backend.
The reasonable ways to rigorously define sine and cosine functions (as functions) are: (1) (analytic continuations of) inverses of particular integrals (2) the sums of particular power series (3) solutions to a differential equation (4) as odd/even parts of the complex exponential, itself defined via (1), (2), or (3). Proving that these are all equivalent is a good exercise for a complex analysis student.

But all of these require calculus and quite a lot of hand waving about real numbers and limits and infinite sums, especially in a high school context. And most of their applications (per se) are pretty advanced.

At the high school level it’s probably best to explain that angle measure per se is a very tricky concept (an angle measure is a type of logarithm). We can get a very long way without ever having any explicit "angle measure" concept. E.g. there are no angle measures anywhere in Euclid’s Elements. (Angle measures come from astronomy and navigation.)

We can look at the complex coordinates of 2D rotations (points on the complex unit circle) without ever trying to turn that into a single scalar-valued quantity. And should do that in a lot of circumstances where angle measures are currently used. In e.g. geometric simulations (computer graphics, robotics, computational geometry, ...) it’s best to avoid angle measures as much as possible, and stick to vector algebra.
Your friend is the right person to make friends with.
He was able to sell a crude form you can build in a weekend and bootstrap a business out of it.

I can find plenty of students happy to build a simple prototype, but in my life I met less than 5 people who were able to turn a few HTML pages or even a full fledged product into money.
At this point, I'm frankly done attributing to stupidity what can also be attributed to malice.

There have been so many errors with the default browser choice somehow resetting to Edge that it doesn't matter anymore whether it's the result of malice or sloppy QA. The result is the same and it's a net win for Microsoft. Inaction is also action.
> And worse, the world is clearly not a computer -- as any non-trivial definition (eg., universal turing machine) cannot simulate properties the world has (non-determinism, chaos, etc.).

This is precisely wrong. With the possible exception of consciousness, in our current understanding of physics, the world is a computer. I Bieber some of your intuition fails because you have wormgly assumed this point to be obvious.

You're also mixing up the Chinese room experiment with the larger problem of an interactive AI. The Chinese room system is restricted, by definition, to only interact with the word through language. Over time, as it interacts with a person, it may decide that it likes them or not, and its responses may start changing based on this - that is allowed to be part of the algorithm that the human/machine inside the room is applying.

For a silly example, the algorithm may say that 'people who use the same word three times in a row are extremely nice', and use this state of 'extremely nice' to modify its future responses once the same word has been recorded three times in a row. This is no different, fundamentally, to me liking people whose face is symmetric, or the same gender as myself - it's not a choice I made, it's just an arbitrary rule of my (genetic) algorithm.
> to reinvent all of the wheels and catch up to the rest of the space.

Which of the public package systems are the state of the art that should be replicated?
Which would be a good situation for private address ranges.

They have 14 /8 blocks though - wow.
I can't answer your last question, but I don't see why it wouldn't be possible. From what I've seen there are z/OS emulators that can be used for practice, so it wouldn't be far fetched to transition to real hardware from there.

A quick search for COBOL resources yielded https://github.com/openmainframeproject/cobol-programming-co... , so it seems possible to learn without access to the hardware.
>How do we even mitigate against these types of supply-chain attacks, aside from disabling run-scripts, using lockfiles and carefully auditing the entire dependency tree on every module update?

Don't trust the package distribution system - use public key crypto.
Here's another hash function / mixer that uses only add, rotate and xor. Actually this is based on common ARX ciphers, but a lot smaller because it doesn't need to be a secure cipher.

It is 48 x86_64 instructions, compared to the 36 instructions of khash in the link. I am sure you could put more data into b, c, and d as parameters, but I've only used it as a U64 to U64 function.

static uint64_t rotl64(uint64_t n, uint8_t k) {
uint64_t a = n << k;
uint64_t b = n >> (64 - k);
return a | b;
}

uint64_t hash(uint64_t a) {
uint64_t b = 0;
uint64_t c = 0;
uint64_t d = 0;
for (uint8_t i = 0; i < 4; i++) {
b ^= rotl64(a + d, 7);
c ^= rotl64(b + a, 9);
d ^= rotl64(c + b, 13);
a ^= rotl64(d + c, 18);
}

return a ^ b ^ c ^ d;
}
Whilst I agree nobody is perfect when it comes to managing their own health.

But if the climate does warm past the expected number, having a clean bill of health won't do much to protect you.
I agree and I had an idea recently that I haven’t acted on but it has descoped from “should I is hasura?” to “I probably don’t even need a site at all, but a single HTML file will be handy enough validate this” in 2 hours of insomnia.

Talking to the submitted article: It took a weekend sure. But it also took developing a friendship over years.
I would much rather derive the sum-difference identities from the expansion of e^(i (a+b)), than treat the arbitrary-seeming sum-difference identities as axiomatic.
> The headline doesn't really fit the issue.

Commitment to security = security was broken. It's similar to "we value your privacy" and or "announcements about the future of the project". Finest newspeak.
In this case the server likely doesn’t have a ‘none’ option. The none option in the client will be translated into an empty array (or false for all the other options). So circumventing the client isn’t likely to get you very far.
Not in any way that IPv6 doesn't. Most internet users are using their phones these days, and most carriers (at least in the US) give you a IPv6 address. And more and more ISPs are getting their heads out of their collective butts about getting IPv6 support now that it's getting expensive to buy IPv4 addresses.

Also, most ISPs (probably not the phone carriers) when giving you IPv6 give you a /64, so you get 2^64 (18,446,744,073,709,551,616) addresses. Which if you're anti-corporation, gives you a lot more room to play with than a single IP that you'll need to NAT behind.
The Coquihalla is one of the more dangerous highways you will ever drive, particularly in winter, mainly due to altitude and bad weather. Not fun in a white out.
> browser-provided abstractions are trash for writing a web app

This is the key.

If browsers would improve here we wouldn't need half of the dependencies that we use now. It took nearly a decade to get from moment.js to some proper usable native functions for example.

Besides that we _really_ need to solve the issue of outdated browsers. Because even when those native APIs exist we'll need fallbacks and polyfills and lots of devs will opt for a non-standard option (for various reasons).

The web is still a document platform with some interactivity bolted on top, I love it but it's a fucking mess.
So is Netflix and others finally mainstreaming international content better than ever before?
Haven't seen Squid Games, but Tiger King is definitely worth it. Was slow in beginning but really picks up.
Planet 9 3/4?
Two of my friends got kicked out of their house because their wives accused them of domestic violence.
There was zero evidence but the police came and removed them from the home immediately.
They had to fight the temporary restraining order in court.
It took them weeks and tens of thousands of dollars.
Luckily for both of them the restraining orders got lifted (they still ended up with the "every other weekend" raw deal men get in the US).
There were Zero consequences for the wives.

Punishing false accusations of domestic violence could scare real victims to speak up.
So the bar is very low for the accuser and if / when caught up lying, there is no consequences at all (except loosing some credibility in the eyes of the judge).
Isn't that due to green being the highest energy of light for an LED available at that time?
IIRC, everytime a new material was created to get the increase in band gap for a higher energy photon (i.e. blue or violet), there was a Nobel prize given out.

Tuning the band gap with a new material back then was difficult I think.
Interesting to see the numbers. For example, Red Notice is #1 with 149 million hours viewed, and when you look at the Wikipedia entry for that film, it says:

> Due to the film's $200 million production budget and Netflix's global film chief Scott Stuber saying that the company's "big-budget tentpole films [need] to draw an audience of more than 70 million viewers within the first 28 days of availability," The New York Observer estimated Red Notice would need to total around 200 million hours (about 83 million household viewers) to be deemed a success

I guess by this definition, it can be deemed a success.
You wrote, "making ammonia requires hydrogen which comes from natural gas", without qualification. You and Walter are not the only people reading. Some people need more background than you.
Arcane is an odd case as it’s released in batches of 3 episodes instead of being full-dropped as most other Netflix originals.
They already knew JS.
I hate those requirements, but if at least they were enumerated in a programmatic manner, for example through a RegEx or password field parameters then a password manager could read those and offer a generated password that fits those requirements.
> I guess I'm having trouble fathoming how languages were so far ahead while computers were seemingly VERY primitive.

I have a much bigger emotional conflict when contrasting that with the current state of mainstream programming languages, that are only just beginning to tread onto territories like algebraic data types and pattern matching that ML paved almost 50 years ago. Is there any hope for true dependent typing to become popular before 2040?
I'm a non-native Portuguese speaker and type in Portuguese a minority of the time, but probably at least a little bit on most days.

I've become very accustomed to using a Compose key, which doesn't have to be held down but acts as part of a sequence. For example, to type "informação" I would press

i n f o r m a Compose , c Compose ~ a o

where the ~ also involves pressing Shift.

This feels reasonably normal and natural to me, but maybe if I were typing in Portuguese more than I do, it would feel tedious. Have you tried using a Compose key? How do you think it compares with your system or with the system you were using before that?

I think ~, `, and ^ as dead keys could be a problem for people working a lot on a Unix command line, as they all have relatively common meanings to the shell (although the ` is deprecated and many people don't have a strong habit of using the ^). I guess it also depends a bit on what kinds of software environments you're working in and with, since different environments and interfaces have very different punctuation with special meanings.
Look for a new job, if that is an option. But remember, most jobs suck. But it is still a win, if your new job sucks less than your current job.

Try setting artificial goals, just to make your tasks interesting. Like, doing it super fast. Or automating as much as possible.

If you’re working from home, try learning something new on company time. Before you downvote me for suggesting something unethical, remember a lot of people browse Facebook at work. Even browsing HN at work can be considered unethical too!

Unless your company is working on something noble (like a cancer vaccine or something like that), it is probably just another commercial place to make a handful of people rich at the expense of many. So don’t get attached to your job, it is just a way to put food on the table.
I tried to find a link on pubmed about depression and gaming.

"Depressive symptoms and suicidal are associated to screen time induced poor sleep, digital device night use, and mobile phone dependency." (https://pubmed.ncbi.nlm.nih.gov/29499467/)

This other study (http://irep.ntu.ac.uk/id/eprint/27290/7/27290_Kuss.pdf) seems to show some association between depression and addictive use of video games (The criteria for addiction is not about length but rather about how the behavior is effecting the person life). It should be noted however that social media has a slightly higher association with depression.

I doubt there is evidence that eight hours or more of weekly gaming would be any kind of evidence of depression for age groups 16 and up. If a person, of any age group, uses games or social media to the point where it prevents them from function in society and they don't sleep, then that is likely associated with risk of depression. Not 100%, but maybe with a pearson correlation coefficient of r=0.25.

Now I should really stop writing on HN and get some sleep before people called me depressed.
Thanks! Just looked through the docs, looks very well thought out.

I mentioned elsewhere in this thread that no/low-code tooling rarely ever works out in my org (mostly because its hard to make a generic framework to encompass what we like to do with internal tooling) — but will absolutely check this out and provide some feedback if I think I have something useful to contribute.

Cheers.
You can set "upstream" to another local branch, no remote is required, it's just how it's typically used. Under the hood it's just a way of naming another reference as a divergence point.

I use this extensively with Git(Hub|Lab) (PR|MR)'s. I set the upstream to "master" but push to "topic". The "push.default" docs cover how to have your cake and eat it too there.
I had seen the same thing on a (much older) switch, which is the only reason I thought to try truncating my password. Worked after dropping only one character, I was sort of expecting it to be 16 or maybe even 8.
Have you been on an Indian train recently? The cleanliness on Indian trains has really improved much in recent years.

I mean I still avoid using the toilets, but it is nowhere near as bad as it used to be.
Spoken by someone who has never worked on large complex systems before.
Computer science theory didn't get harder.

Instead, education became weaker :-(

See following link for foundations of computer Science:

https://www.youtube.com/watch?v=AJP1VL7shiI
I use a password manager and randomly generated ones for most everything, but I use diceware pass phrases I memorized for specific cases so that in an emergency, e.g. when traveling I can get access to some things even without any of my devices.
Wellll.... then there is https://www.verywellmind.com/what-is-revenge-bedtime-procras...

TL;DR - you have time for exercise and sleep. But you sacrifice that time for "fuck about freely to do what I want for once" time.
Hedge fund manager on sustainable investing, carbon, divestment, stakeholder cap
Whilst I'm not defending anyone. Some people need to realise that a judge or a person, might reasonably know the answer to a question they ask. But they ask it to allow people to provide their own case or opinion. Where by doing so might bring to light technicalities or areas the haven't considered.
obvious next step is to make the list clickable so you can click on it & start watching the show (if you are logged in)
btw, are all shows watchable in all countries or is there country-specific licenses ?
The best way for me to understand serverless is when Dave Syer made this quote:

["Serverless doesn't mean you don't have servers, you just don't care about them"](https://youtu.be/lJEYG2PjGNU?t=714)
I understand it better now that the worry is also about the future of the extension. The requirement is gone.
Thanks for your feedback :)
EV maker Rivian eclipses Volkswagen in value while Lucid overtakes Ford
https://archive.md/wlT2r
Only those too oblivious or occupied to notice we're all getting smaller by the day.
The price for the air-conditioned coaches are much higher.
> there is absolutely no doubt that eight hours or more of weekly gaming is evidence of depression for age groups 16 and up

I doubt that. Many critically acclaimed single player games take from 40 up to 120 hours to complete, so 8 hours a week puts you on track to play through one game in a month.
The Lightest Climbing Ledge