skysight-inc/HackerNews huggingface dataset:
> The problem is when you want validation errors which contains the field name, and a descriptive error message. Oh you want them localised as well?

So the above example would become something like this:

if (!string.IsNullOrEmpty(card.CardNumber) && CardNumberRegex.IsMatch(card.CardNumber))
validationContext.add("CardNumber", Localizer.MessageFor("InvalidCCNumber"));
if (x.ExpirationMonth < 1 || x.ExpirationMonth > 12)
validationContext.add("ExpirationMonth", Localizer.MessageFor("InvalidCCExpiration"));

Throw in some lambda's for the property name and static strings for the message names if you really need to be type safe. Also I'm not sure if FluentValidator handles this, but you need somewhere for root level errors, not all errors map neatly to a property.

> You have 8 fields coming in on your request. It's starting to look like a big method now with 8 if statements creating these localised validation objects.

There's no local state, the errors are stored in a glorified dictionary, it's a simple imperative series of if statements that anyone who's gone beyond hello world in any language can understand. Big methods are not bad just because they're big (not that 8 if statements is big), they're bad when there is a lot of mutable state that the programmer has to track in their head, validation logic rarely has this problem. It would be fine if there were 1000 properties because the complexity is flat.

> You also want to share your validation rules between different use cases.

So you make a function. It doesn't look like FluentValidator offers any improvement here, it seems like custom rules with this library basically just wrap a function call: https://fluentvalidation.net/start#including-rules or you create a "function" at runtime with rulesets: https://fluentvalidation.net/start#including-rules

> FluentValidation makes that quite quick and terse to achieve compared to simple if statements.

From the examples I'm not sure it's any quicker or more terse after you include the extra boilerplate setup. All it seems to do is turn if statements into where/must calls, for loops into RuleForEach calls and functions into custom RuleSets. It also adds the complexity of using a library.
Working on making knowledge sharing, onboarding, and development easier for organizations. The focus is on enabling team members to capture small chunks of knowledge (checklists, definitions, explanations, short updates).

Each chunk can be tagged and searchable (so that they’re easy to find), versioned (so there aren’t duplicates of the same information), and composable (so that they can be reused in different pieces/versions of training materials).
This is really cool! Kudos! I know CS is a great way to help improve underprivileged kids' economic status. As long as the person has certain kind of "wiring", is willing to work hard, and not giving up easily, it can bring about a bright future. So great to see someone goes extra-mile to bring this "gold-mine" forward. Hope many more people can be blessed by your book. Would love to also buy your book!
Thats an amazing story. Congrats on making it happen for the 17 kids. This is why HN is an amazing place and also why I wish there was a heart button in addition for special cases :)
Lisp-2 is intuitive to those who know shell.

foo()
{
echo hi
}

$ foo=1
$ foo
hi
$ echo $foo
1

$ var=$(foo)
$ echo $var
hi

$ var=$foo
echo $var
1

Separate space for variables and functions/commands. Hardly anyone bats an eyelash about this.

This provides a hygiene benefit similar to what we have in a Lisp-2. Specifically, suppose we do this:

$ ls=abc

by doing that, we have not shadowed the ls command. We can name shell variables without worrying about that sort of clash. This is so obvious, you don't see it being spelled out to anyone.
That's a separate threat model. DoH addresses surveillance, censorship, and injection by ISPs.

One DNSmasq already addresses in part through various asblock and malware-blocking DNS blacklists. I'm using one such that updates hourly or better. Requests to or for specific domains my be blocked (and are).

Keep in mind that by using DNSmasq at a centralised LAN server, you now have a single point of control to defend against such threats, rather than relying on multiple device- and application-specific points of control. Though software (such as browsers) offerring its own defences against such threats is in no way hindered.

You can further, and more appropriately IMO, defend against such threats at the firewall level, by blocking network space (rather than domains) and ports associated with malware. At the OS level, firewalls such as Little Snitch monitor and block traffic at the application / process and user level, and may detect, alert on, and/or block such malware.
Absolutely not.

Its more "decentralized crypto blockchain" nonsense. Nope, nope, and just nope.
Can you try again a few times? Let's see if it's reproducible. I think you are not at fault :-)
I make paintings about programming/code. Right now I'm developing a screen print, and I wanted to build on the same abstract style I used with one-off watercolor paintings.

I decided to make my first print about rubber duck debugging. I had a lot of fun rendering a crazy hatch-mark pixelated rubber duck, but I keep going back and forth on the final layout and composition. I spent an alarming amount of time this week doodling thumbnails of ducks with different abstract backgrounds.

You can see some of my stuff here :)
http://amydyer.art/wp/index.php/portfolio/technology/
> nobody knows who should be angry at you if you broadcast.

I suggest the law should say to successfully assert copyright infringement, your current contact info must be on file with the US Copyright Office, or your copyright is unenforceable.
https://outline.com/TLn5rM
Thanks, I'm surprised I missed that!
Oh no! My golden retriever mix is eating an Acana grain free dry food. Going to have to find something else.
Have you maintained anything after the first year where that wasn't the case? Especially if you had a high degree of churn on the developers.

I'll grant that it is easier in more stable API environments. But we are our own worst enemies in that race.
The subtitle made me expect something about a failure mode of MC methods in some popular application...
AMC series
You sure are playing it safe there.
I took the week off work to plow through Final Fantasy XIV: Shadowbringers so that's been most of my time, haha

I'm going to see how viable it is to host a Matrix/Riot server from my house. Looks like there's going to be a hard time with SSL given that my router has its hook into Port 80 regardless of DMZ. Perhaps I can just use a self signed cert.

I would host it in a VPS but I'm looking to use the bridges for Whatsapp/FB Messenger/Telegram
Also there were rumors of the iPhone for yeeeeaaaars. I remember people jokingly referring to it as "the jesus phone" while speculating about it.
Knowing whom is communicating with whom is pretty useful to know, even if you can't decrypt the data.
Lower Memory Usage of Your Rails App with Jemalloc
I LOVE IT <3
> The idea that you're going to ban something because one aspect of it has a negative social purpose is philosophically unsound

Uh, guns?
That's an outdated stereotype. I think they're really moving in the right direction.

Their deliveries are on point, the self checkout works perfectly, they're even a store pick up service where you just pull up to designated parking stops and the attendants load up your trunk with order which is ready by time you arrive at the shop.

It's a lot harder to get your product on a Walmart shelf than having it listed on Amazon. There's an existential quality assurance when you buy from Walmart than Amazon.
Has nobody at Quanta Magazine heard of the Many Worlds Interpretation? I'm tired of these awful articles from Quanta.
Using a combination of IO.inspect and IEx.pry, I've never found myself wanting or needing any other debugging tools.
There is a difference. When "everybody" has a unique query, there's no cache.
> Not most cars I've seen so far

Do you have an example? Every rental car I have tried in the past decade had this. At least 10–15 different models from a variety of different manufacturers.
I (we) are building a challenger bank in the U.S., focusing on checking and savings accounts that expose a full API.

On a personal level, I have been doing a deep dive into the Napoleonic Wars, and spend most of my free time reading. I had an idea the other day to attempt to build some sort of battlefield/timeline visualizer using the newly realized Google Earth Studio. Has anybody used it for anything other than simple flyover animations?
I don't know why this is something worth mentioning. If some one can MITM your HTTP requests, they can just as easily MITM your DNS and SNI etc.
>The most modern and often used version of the word "gimp" is an ableist insult.

Untrue. The most common usage is as an adjective/verb that has nothing to do with disabled people. "Switching from C to Java really gimped our performance." "Our marketing in Mexico is gimped because we didn't hire a native Spanish speaker."

Also this is pretty rich coming from GNOME, considering that's used as an insulting name for little person.
Great article showing how easy it is to experiment with probability using Monte Carlo methods. You don’t need any fancy libraries or deep mathematical knowledge.

Of course you should always try to have a deeper understanding if you want to make serious conclusions. But I felt this article got the concept across really concisely! Nice work.
Distillery is a pain to set up, but once done, deployment is as easy as:

mix edeliver build release production && mix edeliver deploy release production

I've set this up as an alias in mix.exs to I just have to type:

mix deploy

1.9 makes configuration easier than Distillery, I think.
May I ask what’s AMC series?
This shouldn’t even be a debate. The name is horrible in every sense that matters to gaining adoption.
http://www.QuickCut.io - I built it because of the frustration I have editing courses I make for fun ( https://www.udemy.com/beginner-programming-intro-python-self... ). It blew my mind that we're still editing video the same way we have in the 90's - so quickcut was born
That sounds fucking awesome.
"Turn: Washington's Spies", as mentioned by your GP: https://en.wikipedia.org/wiki/Turn:_Washington%27s_Spies
But this is very costly.
Hey my agency creates profitable leads using Google and Facebook Ads.

We focus on high ticket industries like wealth management, real estate and legal services. We also sell a ton of info products.

Here to answer questions :) google analytics is your friend
If you have any work on openwrt I have relevant experience doing a GPS project and a home router project.

My page is

Http://profile.gayatri-hitech.com
Because a curious part of written internet culture is that of fixating on small mistakes that aren't even important to the overall context or meaning of a post, and ignoring the actual content. Why, I'm unsure, but I've been noticing it a lot more now that I'm aware of it!
Since half of your comment is plainly wrong, all I'll bother with is asking you to inform yourself. Here's a good start: http://www.imo.org/en/mediacentre/hottopics/pages/sulphur-20...
That's just plain nonsense, and reveals that you've never actually supported 100 or 1000 laptops at once and become familiar with real-life failure rates of PC laptops from 2005-2015 vs. Macs.
I have found cases in which async/await won’t cut it quite as cleanly as “return new Promise”. AWS Cognito’s API has functions that take an object parameter with properties onSuccess and onFailure. If these functions are being called with programmatically created values within promises you can use “await new Promise” but that means declaring an additional async/await function (and therefore a promise) that resolves with the resolution of another promise. When you are explicitly defining all of your operations in TypeScript you notice these anti-patterns. Of course you could also declare these functions elsewhere and use function parameters instead of scoped variables. In my opinion the best solution is the one that is most justifiable when described to an outsider while walking through the code so I sometimes feel grateful for the freedom to choose my promise implementations on a case-by-case basis. When the relevant code is entirely my own, however, async/await is the most elegant.

Async/await is pure syntactic sugar and should not reduce errors unless the Promise syntax was implemented incorrectly.
All of them? At least every BT keyboard/mouse that I have used does this.
I'm not sure but I think it's permanent. If you don't mind getting balder than you currently are, great.
Hear hear. These articles and really entire subfield of 'physics' appears to be philosophy trying to masquerade as a real science
Good point. Completely forgot about that one.
Yeah, I'm running the Martingale simulator in OP, and getting frequent outcomes where I was able to gamble 10+ days starting with $10000. I suspect that's what gamblers really like about it -- not more money, but more gameplay.

(There's also the gambler's calculus that while they're losing money playing, they're being comped drinks/rooms/meals/shows/etc at a resort.)
The difficulty I imagine with that is for components whose subtree's styling is modified upon interaction via JavaScript. For instance, a drop down that gets extra classes when you click on it causing it to appear. How do you account for that?
The language they're using seems to pretty much be BASIC with slightly different syntax, it even lacks user-defined parameters for functions just like BASIC does.
The site is ok, but loading images takes forever.
With respect to Promise.all:

> In this example, both promises will be processed asynchronously and only when both of them are resolved, we handle the result.

While that is true if all the promises resolve successfully, if any of the promises get rejected the catch block gets executed as soon as the first rejection occurs. Beware of that behavior, as if you're not aware of it it can leave your system in a bad state (speaking from experience, of course :)
If you meant to stay on topic (reads like a tangent), I believe firearm videos are still kosher on Youtube. Look up FPSRussia.
I’m giggling more than I probably should at the well-chosen sub-headers in the article.
That makes no sense as “password” is entry #1 in many password dictionaries
Why McDonald’s Flopped in Vietnam
https://en.wikipedia.org/wiki/Baader%E2%80%93Meinhof_effect?

> The Baader–Meinhof effect, also known as frequency illusion, is the illusion in which a word, a name, or other thing that has recently come to one's attention suddenly seems to appear with improbable frequency shortly afterwards (not to be confused with the recency illusion or selection bias[1]). It was named in 1994 after the German Baader–Meinhof Group, when a contributor to the Bulletin Board column in the St. Paul Pioneer Press reported starting to hear the group's name repeatedly after learning about them for the first time.
The Unifi AP firmware is definitely OpenWRT based.
> relatively simple power trains that can be serviced and don’t rely on much complicated technology.

In my part of the world people pay a higher price for 2nd-hand Toyota Hilux 4x4's from the 90's then they do for the more modern versions for just this reason.
Regarding Elixir being a dynamic language, I've programmed in Java, C#, and other strongly typed languages as well as Ruby, Python, Elixir, and other dynamic languages since the mid 90s. Throughout my entire career, I cannot think of a single time when I've thought, "It would be so much nicer if this language was statically typed." It just hasn't ever been an issue for me.

If typing is something you really want to catch at compile time, and pattern-matching and guards aren't enough for you, you can always define Dialyzer specs and run Dialyzer during your build process. I'm currently working on an Elixir codebase that does this, but I've worked on others that don't, and I haven't seen much of a difference either way. Personally, I think strong typing is overrated.
Something like https://gleam.run/?
modeling/growing cellulose for wound healing
The rationale offered is that automated decision-making will be more reliable. But a further attraction is that it serves to insulate various forms of power from popular pressures.

Who in their right mind would argue that? The benefit is that it's a lot faster. If machine learning worked as well as mechanical engineering, we would have a serious industrial revolution on our hands.
I work on Monte Carlo simulations professionally for casino slot games.

I wish that more depth was presented here: what percentage of the time do you get favorable vs unfavorable outcomes with each strategy? For further depth, use different types of players (with different exiting conditions).

Perhaps I should write such a blog post at some time..
Yeah, I definitely ran into issues when Googling to see whether I could use LaTeX within GIMP.
That's the same usage, which is offensive for exactly the same reason.
Staying sane by staying busy. My wife is slowly dying and is a thousand miles away at a hospital, hoping they can save her. Today I cleaned a workshop area that I'd been using for storage so that I could use it as an actual workshop. I have car parts to rebuild (Chevy 350 TBI at least) and I have things to build, like a recumbent bicycle from scratch.

I am also working on learning CW (aka Morse code), learning to play bass (already play guitar) and am trying to stay busy helping others too.

In addition to all that I do breakfix computer work on the side and a freelance gig writin technical tutorials for a site that specializes in selling small to medium sized, low budget VPSs. That has me learning things like Nginx and Redis, which I've never really spent any time on. It's great fun and my first professional writing job.

I also have a blog where I document my ham radio, automotive, and other misc projects, although I'm woefully behind on it. I built a 20 meter CW transceiver last week (from a kit) and have yet to post about that. I also had to repair a cracked body on the bass I am learning to play, but didn't even take pictures. Writing about things while you do them takes twice as long, at least. I'm lazy.

Lastly I took a recent promotion. I work remotely, training new employees at the web hosting company that I work at. I also develop training materials and am revamping how we approach that stuff. I've never done that before. It's the first time I've been off the front lines, and I like it. A lot.

Thankfully I have a lot to keep me busy so that my mind can focus on what I'm doing rather than on the troubles that plague my wife. She'll either survive or she won't, and my worrying won't affect it. All I can do is support her. Our adult daughter is her full time caregiver (I am not cut out for that, and we're all okay with it, I promise) and is with her, and that has to be good enough.

I've been blessed with an amazing support network and a few extra bucks to let me stay busy on projects. If I didn't have those to keep me going... eesh.

Lastly, I'm glad somebody asked this question. I had a lot to get off my chest. And if this didn't make a lot of sense, I apologize. It's a bit of a brain dump.
Firefox already has built-in tracking protection, which blocks trackers and by extension most ads.
I'll consider this though I it would be probably be sitting unused after trying it anyway as I really have no need for it. Thank you for the information. Just to clarify, we're both talking about a late 2013 macbook pro retina? The other helpful commenter mentions the 2015.
Just wanted to comment that Googling "KeBalanceSetManager" gives this article [1] among others (the article mentions the leaked source code but it doesn't contain the code itself, just the description). Many internal function names were leaked with debugging symbols, and some people were reverse engineering those functions (for example, people who deal with malware).

The similarity in code can be explained by reverse engineering. For example, constant names in switch are different (TimerExpiration vs STATUS_WAIT_0).

> Why does this code in ReactOS exist if it does nothing?

Maybe because there is software that relies on the existence of this thread?

Regarding assertions and local variable names and same declaration oder, I don't know where they come from. That looks suspicious.

[1] https://github.com/bowlofstew/rootkit.com/blob/master/90210/...
> The "poor" people are extremely poor to the point that you cannot comprehend.

There are people living 12 to a room on the first floor of my apartment block, probably 24 to an apartment. In Shanghai good construction jobs have dorms on site, bad ones they sleep on the floor or on the street in summer. I have a reasonable idea of what poverty looks like in middle income countries.

> And they have to stay there and live there for their entire lives because the current system forces them to.

No, it doesn’t. It constrains their choices, all of which may be terrible but it doesn’t force them to. They’re where they are because either they or their parents moved to the city because the city was better. Making building densely illegal forces them to live far from where they work. People choose some combination of price, density and location. Removing choices rarely makes people more free.

> It is impossible for them to move out because of how unaffordable the cities are and how heavily the system is rigged against them.

If the cities are that bad why don’t they move to the country? Unskilled agricultural labour doesn’t pay much but starvation is not common in Latin America outside Venezuela.

> They have nothing. These people are already commuting long distances and already live in unregulated, unmarked ghettos.

And if planning laws made building densely illegal they’d still live there but there’d be no prospect of moving closer to where they work. Sprawl would have been legislated in place of density. The middle class would have nice places to live where there could have been housing for those less fortunate.

> The only people who "lose" here are the current land owners of legal properties. Renters will end up with lower rent because housing will rapidly devalue to a tenth of its original value - every single house will stop being the foreign investment opportunity that it currently is.

If there is demand it will be supplied or it won’t. If it’s not supplied the people who don’t get it will be those with least resources. If 100,000 people demand housing and there’s only legal housing for 50,000 the other half will go unhoused or live somewhere illegally. Restricting supply will not change this.

How can not building housing possibly help the poor? How can building less housing possibly help the poor? How can forcing people to live far from where they want to live help them?
I think this phenomenon is an obvious sign of incompetent government based on my experience living and traveling in several countries (not in the same sub-continent mentioned in the article).

An apartment, smaller than the hotel room (typical 4x6m) is not a proper living place, whether it's meant for single guy or a small family. I like the approach in one country, where all the apartments must fit certain size, e.g. 80sqm for a family with 2 kids. Even, for low-income income families, they still have to get at least 50sqm, government will subsidize.
While I don't disagree with the people wanting to change the name here, I cant help but realize that they are essentially bullying the maintainers. The maintainers are people who spend their free time to work on a project they never get paid for. Sure its a project we all seem to use, but it's also their project. I don't feel like its anyones place to force them into something they dont want to do. The thread started civil but then turned into cyber bullying. Funny how those trying to "prevent bullying" are the very ones doing it.