Better HN
topnewbestaskshowjobs
Log inSign up

devit

4,235 karma · joined Sep 10, 2015 (11y ago) · 1,525 submissions

Submissions

comment 5y ago · link · parent

Don't connect anything critical to any network, directly or indirectly, except a dedicated one separate from the Internet if unavoidable.

Never browse the web, read e-mail or otherwise run any Internet client from any machine with data on it and instead use a separate machine or if unavoidable a VM on top of a reasonably secure hypervisor to run the browser.

Secure every single systems assuming that the network is compromised.

Restrict access data to only those who need it.

Avoid software written in C/C++ for anything security critical at all costs unless there is no alternative.

Only hire competent programmers and sysadmins.

Invest in proper physical security.

comment 5y ago · link · parent

In PostgreSQL you can either add yourself as a replica with logical decoding (e.g. PostGraphile supports GraphQL with live queries that way) or do it manually with LISTEN/NOTIFY.

On top of that you can use transaction ids or manual transaction serials to get only new rows (but of course note that transactions can be long-running, so you need to either accept potentially unbounded repeated data, or serialize all write transactions on a single serial assignment single-row table, or record the whole set of committed transactions whose data you have processed rather than a single serial number).

comment 5y ago · link · parent

Have they sold the company to Microsoft?

"Microsoft SQL Server on Ubuntu delivers an optimised, cost-effective database platform"

Of course not, it's not free so it's not cost effective compared to the best database, which is PostgreSQL.

Integration with Active Directory group policy seems also a really bad idea since it allows insecure proprietary software to control your Linux machines.

comment 5y ago · link · parent

Well, you or whoever was the responsible maintainer completely failed in reviewing these patches, which is your whole job as a maintainer.

Just reverting those patches (which may well be correct) makes no sense, you and/or other maintainers need to properly review them after your previous abject failure at doing so, and properly determine whether they are correct or not, and if they aren't how they got merged anyway and how you will stop this happening again.

Or I suppose step down as maintainers, which may be appropriate after a fiasco of this magnitude.

comment 5y ago · link · parent

I doubt an university e-mail gives you significantly increased trust in the kernel community, since those are given to all students in all majors (most of which are of course much less competent at kernel development than the average kernel developer).

comment 5y ago · link · parent

The project is interesting, but how can they be so dumb as to post these patches under an @umn.edu address instead of using a new pseudonymous identity for each patch?!?

I mean, sneakily introducing vulnerabilities obviously only works if you don't start your messages by announcing you are one of the guys known to be trying to do so...

comment 5y ago · link · parent

They are much faster and memory-efficient than the tools written in JavaScript.

Part of it is language (e.g. obviously Rust is much better than JavaScript for algorithmic code) and part the fact that someone using another language is likely motivated to do a good job.

comment 5y ago · link · parent

The phone can use the cellular network when not docked and usually both laptop and phone are only used/docked in 1-3 different places (desk, bed, some other place).

comment 5y ago · link · parent

This is why you should use wired Ethernet and not Wi-Fi at home.

comment 5y ago · link · parent

Yes, it works the other way: Zink is the Gallium->Vulkan translation layer, while the main Mesa code is effectively an OpenGL->Gallium translation layer.

comment 5y ago · link · parent

If they only considered the parts where Autopilot is enabled, it's obviously biased since people are going to enable Autopilot only where it is most likely to work and not kill them, and in general where accidents are less likely overall.

If they instead considered drivers who never use Autopilot vs those who sometimes use Autopilot, it would make more sense, but then it might be biased in other ways due to self-selection.

The only reasonable way to do this test is to randomly deny the use of Autopilot to some drivers who would otherwise use it and compare accident rates between those two groups (this still only applies to people who would want to use Autopilot, but it would be unethical to force people to use it since it's dangerous).

comment 5y ago · link · parent

"Do you want to let the website use WebGL? It's either for rendering 3D graphics, such as 3D games, or an attempt to exploit bugs in WebGL to maliciously take full control over your machine, which may succeed if you consent"

comment 5y ago · link · parent

I think most consumer telephony companies let you block calling premium numbers, so presumably Twilio could just ask their telephony provider to do so.

comment 5y ago · link · parent

It might, although current PrEP can cause kidney damage so it's a good idea to monitor for that, which means you need to draw blood anyay and so doing STD tests as well doesn't result in any additional inconvenience.

comment 5y ago · link · parent

Cow<'static, str> is exactly what you are asking for.

In general the String type is not very good, and you should use something appropriate to your use of strings for any string that is used more than a constant times in your program, which can be, for instance:

- String

- Box<[str]>

- Cow<'static, str>

- Cow<'a, str>

- Interned strings

- Rc<[str]> or Arc<[str]>

- A rope data structure

In fact I think putting String in the standard library might have been a mistake since it's almost always a suboptimal choice for anything except string builders in local variables.

comment 5y ago · link · parent

If testing is frequent and widespread enough, eradication or near-eradication will result.

PrEP is a good thing because people who are on PrEP can be required to test frequently as a condition to obtain new medication (not sure if that happens in the US, but it does elsewhere).

comment 5y ago · link · parent

It's just a normal blood test, routinely done as part of STD screening along with the HIV test.

comment 5y ago · link · parent

The issue is presumably that free, easily accessible and anonymous testing is not available in San Francisco.

Where it's available, you just do a blood test every 3 months, test for HIV and syphilis and start therapy if positive.

comment 5y ago · link · parent

Not sure it's that illogical.

mRNA vaccines are apparently better and don't seem to have serious side effects, so only using those is correct if it doesn't delay immunity too long.

According to the article, this might cause a 4 weeks delay: currently Denmark has around 2 deaths per day, thus possibly causing 60 additional deaths, which would match a vaccine death rate of 1/100000.

Denmark has a 6 million population, and it seems AstraZeneca kills around 1/1000000 so it seems COVID is only 10x more lethal than the vaccine in the general population.

However death rates for COVID are much higher in the elderly while vaccine clot rates are much higher in young people, so the AstraZeneca vaccine might be more lethal in present day Denmark for young people.

Even among elderly people they can eliminate their COVID risk by isolating but they would be forced to take the vaccine risk if the government only offers the AstraZeneca vaccine.

Finally any vaccine deaths can be more easily attributed to the person who made the decision to continue using the vaccine thon COVID deaths.

comment 5y ago · link · parent

It seems that it's open source (Apache 2.0) and can generate SQL for PostgreSQL and SQLite in addition to BigQuery.

comment 5y ago · link · parent

In DOSBox you can mount host directories to MS-DOS drives with the "mount" command (and of course you can use Linux bind mounts and mount namespaces along with it).

comment 5y ago · link · parent

If you don't call clone() then a clone doesn't happen...

comment 5y ago · link · parent

Is this just for a fun or is it actually better than dosemu2, dosbox and qemu in any way?

comment 5y ago · link · parent

How does it work?

Doesn't iOS inform the user when they are about to authorize a paid subscription?

comment 5y ago · link · parent

The latter change introduces an unnecessary clone(). The correct approach is to instead introduce a variable so that headerRegex can keep being a reference to either that variable or to HEADER_REGEX.

comment 5y ago · link · parent

It passes cargo check with this change.

  diff --git a/cli/src/test.rs b/cli/src/test.rs
  index ac4807bf..8b9882ab 100644
  --- a/cli/src/test.rs
  +++ b/cli/src/test.rs
  @@ -410,16 +410,17 @@ fn parse_test_content(name: String, content: String, file_path: Option<PathBuf>)
           .map(|b| String::from_utf8_lossy(b).to_string())
           .map(|s| escape_reserved_regex_chars(&s));
       
  -    let suffixHeaderPattern : Option<String> = suffix
  +    let suffixHeaderPattern : Option<String> = suffix.as_ref()
           .map(|s| String::from(r"^===+") + &s + r"\r?\n([^=]*)\r?\n===+" + &s + r"\r?\n");
       
  -    let suffixDividerPattern: Option<String> = suffix
  +    let suffixDividerPattern: Option<String> = suffix.as_ref()
           .map(|s| String::from(r"^---+") + &s + r"\r?\n");
   
  -    let headerRegex = suffixHeaderPattern
  -        .and_then(|s| ByteRegexBuilder::new(&s[..]).multi_line(true).build().ok())
  -        .as_ref()
  -        .unwrap_or(&HEADER_REGEX);
  +    let headerRegexFromSuffixHeaderPattern = suffixHeaderPattern.as_ref()
  +        .and_then(|s| ByteRegexBuilder::new(&s[..]).multi_line(true).build().ok());
  +
  +    let headerRegex = headerRegexFromSuffixHeaderPattern
  +        .as_ref().unwrap_or(&HEADER_REGEX);
   
       // Identify all of the test descriptions using the `======` headers.
       for (header_start, header_end) in headerRegex

comment 5y ago · link · parent

1. You mean Cow<'a, str>? It's an enum of either String or &'a str, typically used with 'static so you can either store an heap-allocated string or a static string without copying it to the heap

2. Given you mention "maps of option", probably you are doing something like opt.map(|x| &x.field) or equivalent which is obviously invalid (since you are returning a reference to a subobject of a function argument). Instead, you need to do opt.as_ref().map(|x| &x.field) (or as_mut() if it's mutable).

comment 5y ago · link · parent

That seems rather trivial, and I'm not sure how you could possibly have any issues with the borrow checker.

Just do the first regex search, then escape into a String with regex::escape, then build a regex from the String and search with it.

Of course what you are doing is probably wrong since you should use a string matching crate rather than escaping characters and using a regex matching crate.

comment 5y ago · link · parent

That's false, [ is a bash shell builtin (it's also a coreutils program, but the program is not called unless you specify /usr/bin/[ or use a shell that doesn't have it built-in).

comment 5y ago · link · parent

Don't use fractional scaling.

Use the closest integer scaling and adjust default font sizes (and if needed other sizes like window title height or panel height).

It's also best if you just don't buy monitors that have dpis that are not close to integer multiples of 96.

1
181920
51