News for hackers. Stuff that matters.

peq

Isn't this limit per client ip, server ip, and server port? (https://stackoverflow.com/a/2332756/303637)
Re:Google Tensor SoC debuts on the new Pixel 6 this fall on Monday August 02, 2021 @01:30PM (#28039789)
> Pixel 6 will have the most layers of hardware security in any phone**.

> **Based on a count of independent hardware security subsystems and components.

That does not seem like a meaningful measure for security.

Re:Faster CRDTs: An Adventure in Optimization on Sunday August 01, 2021 @05:58AM (#28025140)
It would be nice if pure benchmark papers were a thing. Most of the time system papers get accepted for some new idea. The evaluation section is often biased towards the new idea. Independent benchmarks could fix this.
Re:Fastly Outage on Tuesday June 08, 2021 @08:53AM (#27434489)
How would you make the button send a request without js and without navigating to another page?

Maybe css to load an image on :active or is there some better way?

Re:Twitter confirms Twitter Blue on Saturday May 29, 2021 @06:06AM (#27324196)
I tried following the webdev topic and it's just interaction-baiting bullshit. Like loops vs reduce. Or "offend a webdev with 3 words".
Re:Scala 3.0 on Friday May 14, 2021 @02:27PM (#27157925)
I think implicit conversions were added originally to support Java compatibility without boilerplate code.

It then turned out that they could be used to simulate extension methods, which is probably the main use case for implicit classes in Scala2.

And implicit parameters were probably just the result of trying to make type classes modular.

The CanBuildFrom approach came later than implicit parameters (https://stackoverflow.com/questions/1722726/is-the-scala-2-8...).

Re:Scala 3.0 on Friday May 14, 2021 @02:04PM (#27157583)
I don't think i will be much of a problem. Braces are already optional in Scala2 if you only use a single expression. The change just gives you the option to be more consistent and remove braces everywhere.
Re:Scala 3.0 on Friday May 14, 2021 @01:52PM (#27157404)
Scala is one of the smallest typed languages in terms of syntax.

See slide 13: https://www.slideshare.net/Odersky/preparing-for-scala-3#13

With scala 3, syntax has been simplified even more, e.g.:

No more braces necessary. Top level declarations. Extension Methods.

Re:Using Rust Macros to exfiltrate secrets on Friday May 14, 2021 @12:51PM (#27156472)
If I rememver correctly, the python plugin for vscode asks me whether I trust the project before running anything. At least that was the case when I last opened a Jupyter notebook in vscode.
Applications don't need generics, but libraries do.

The lack of generics is the reason for a lack of many useful libraries that I miss when writing applications in Go.

Things I missed lately: Sets, maps with arbitrary keys, lists, sorting, removing duplicates, priority queues, parser combinators, list transformation functions (map, filter), transactions.

Some of these exist for Go, but with awkward APIs.

It is related in some way.

Since Go has no generics, it does not have datatypes like Sets, Maps (go has maps, but only supports a few types as keys), or Graphs. It also does not have immutable collections.

This complects data modeling.

Re:Not Growing a Language on Saturday April 03, 2021 @07:15PM (#26685589)
At first "mathy" objects seem not so important, but it also involves:

- Vectors, matrices

- Immutable containers (lists, sets, maps, etc.)

- Domain specific languages (regular expressions, constraint languages, etc.)

And without good support for matrices, the data science and ML people will just use Python instead of Java to build their libraries. And then everyone will use the language with the best libraries, even if they don't use matrix math in their code.

For regular expressions, you have to use a DSL embedded in Strings in Java instead of using operators like | as operator on regular expressions directly.

Re:'Hovering ship' photographed off Cornish coast by walker on Saturday March 06, 2021 @08:51AM (#26367316)
A vacuum "filled" tanker would be lighter than a helium filled one :D
Re:Why I link to Wayback Machine instead of original web content on Tuesday September 08, 2020 @10:03AM (#24408440)
I would be careful in mirroring a site. It's very likely to violate copyright or similar laws, depending on where you are. I think archive.org is considered fair use, but if you put it on a personal or even business page it might be different. For example Google News in EU is very limited in what content they may steal from other web pages.
Re:What Comes After Zoom? on Tuesday June 23, 2020 @06:36AM (#23612123)
An underappreciatd feature of Zoom is the 40 minute restriction in the free version. Meetings are more productive with an enforced time limit.
Re:Ubuntu 20.04 LTS (Focal Fossa) on Thursday April 23, 2020 @07:56AM (#22954992)
Some problems I had with Snaps:

* Installed VScode. The terminal in VScode was in a different environment from the system terminal, so used different Python environments. Took me a while to figure out why installing a package was not working. * Installed Slack. When I click a link in Slack it opens a new Firefox process that does not have access to my normal profile, saved logins, etc. and is not shown as a Firefox window in the sidebar.

In both cases I uninstalled the Slack version and installed the "real" version.

They can probably learn from the German reunion. A lot of mistakes could have been avoided, like letting western companies buy and close east German companies that were previously owned by the state, or closing eastern youth organizations.
Re:Pan-European Privacy-Preserving Proximity Tracing on Thursday April 02, 2020 @10:04AM (#22759049)
As I understand this, the approach here is to bet on personal responsibility. This technology cannot be used to enforce quarantines as the authorities have no access to the data.

Basically, we have to stop 2/3 of infections to get an R<1. If 2/3 of the population use the app honestly and we keep up some other measures (no indoor events where people are in close contact, wearing masks while shopping, no visitors in nursing homes and hospitals, etc.) then this might be enough to contain the virus until we have a vaccine.

Re:TypeScript 3.7 Beta on Wednesday October 02, 2019 @04:48AM (#21134482)
> it would be even better if TS could do this automatically like Flow though

That would imply that the same function signature could produce different type checking results at the call site. That is something I find extremely frustrating as you can no longer reason about type checking locally.

Re:How fast can a BufferedReader read lines in Java? on Saturday July 27, 2019 @03:03PM (#20543544)
Your version still has the problem that since Java 7 the substring method allocates a new String, which in unnecessary when it is only borrowed to the parseLine function and not needed afterwards. What you probably want is a view that reuses the same underlying data. With the following I get around 2 GB/s:

    public void readString(String data) throws IOException {
        int lastIdx = 0;
        for (int idx = data.indexOf('\n'); idx > -1; idx = data.indexOf('\n', lastIdx)) {
            parseLine(subSequenceView(data, lastIdx, idx));
            lastIdx = idx + 1;
        }
        parseLine(subSequenceView(data, lastIdx, data.length()));
    }

    CharSequence subSequenceView(CharSequence base, int beginIndex, int endIndex) {
        return new StringView(base, beginIndex, endIndex - beginIndex);
    }

    static class StringView implements CharSequence {
        final CharSequence base;
        final int offset;
        final int length;

        StringView(CharSequence base, int offset, int length) {
            if (length < 0) throw new IllegalArgumentException("length must be >= 0");
            this.base = base;
            this.offset = offset;
            this.length = length;
        }

        @Override
        public char charAt(int n) {
            if (n < 0 || n >= length)
                throw new IndexOutOfBoundsException(n);
            return base.charAt(offset + n);
        }

        @Override
        public int length() {
            return length;
        }

        @Override
        public CharSequence subSequence(int beginIndex, int endIndex) {
            return new StringView(base, offset + beginIndex, endIndex - beginIndex);
        }
    }
Re:Mistakes we make using JavaScript Promises on Friday July 05, 2019 @02:31AM (#20360308)
It's easy to run tasks in parallel with just "await". Just start your tasks without await, store the promise in a variable, and then use await later when you actually need the value.
Re:Titans of Mathematics Clash Over Epic Proof of ABC Conjecture on Thursday September 20, 2018 @04:33PM (#18035226)
Mathematicians should do more computer verifiable proofs to avoid discussions like this.

> Definitions went on for pages, followed by theorems whose statements were similarly long, but whose proofs only said, essentially, “this follows immediately from the definitions.”

This sounds perfect for machine checked proofs, but I guess the proofs are actually a lot more involved than they are presented.

Re:Ask HN: What do you want to see in Ubuntu 17.10? on Friday March 31, 2017 @03:12PM (#14007144)
FLAVOR: Ubuntu desktop

HEADLINE: fix smart autohide of unity launcher

DESCRIPTION: it is really annoying that the launcher does not appear sometimes, when moving the cursor to the edge of the screen. There are several bug reports for this issue, which are open for a long time.

In general I would love to have a way to pay an Ubuntu dev to fix a specific bug.

Re:Protocol Buffers v3.0.0 released on Friday July 29, 2016 @12:53PM (#12188108)
I think the only reason to use json over the binary format is readability, so why care about this?
Re:Protocol Buffers v3.0.0 released on Friday July 29, 2016 @12:47PM (#12188064)
I agree. In particular in languages without null you will have a lot of Option types in the mapping. You no longer can generate useful type definitions from the proto spec.
Re:Go Packaging Proposal Process on Friday July 29, 2016 @11:54AM (#12187651)
Without versions you don't have package management, you have a download script.
Re:Facebook Launches Flow, Static Type Checker for JavaScript on Tuesday November 18, 2014 @06:50PM (#8627194)
I think sometimes types lead to simpler designs. For example why can't "then" just have the following type:

Promise A E -> (A -> A') -> (E -> E') -> Promise A' E'

That would eliminate some strange corner cases and make it easier to explain the function. The special cases could just get their own functions. Real algebraic data types would probably eliminate the need for E entirely and make it even simpler.

Re:Regular Expressions in 100 lines of Scala on Saturday September 13, 2014 @10:00AM (#8312388)
Regular expressions just need 3 things: sequence, alternatives (|), and repetition(*). Everything else is an extension.
Re:Ask HN: How best to learn software design principles? on Monday July 07, 2014 @05:13PM (#8001457)
http://principles-wiki.net/

A wiki with some nice explanations of design principles.

Re:No JSON/MAPS interoperability in 17.0? on Friday March 14, 2014 @10:28AM (#7398910)
Are S-Expressions a standardized data format? It looks very similar to Json, but harder to read.

Older »