Better HN
topnewbestaskshowjobs
Log inSign up

roller

90 karma · joined Mar 24, 2009 (17y ago) · 43 submissions

Submissions

comment 4mo ago · link · parent

Microsoft SQL Server has had a similar feature for a while -- Multiple Active Result Sets aka MARS. I don't have a good read on whether it actually helps any workloads. I've seen adapters that don't support it because of the extra complication.

https://learn.microsoft.com/en-us/sql/relational-databases/n...

comment 2y ago · link · parent

Peter Alvaro gave a great presentation on Dedalus at Strange Loop 2015.

https://www.youtube.com/watch?v=R2Aa4PivG0g

comment 4y ago · link · parent

A combined approach works if want to encode the exclusive constraint:

    CREATE TYPE school_type AS ENUM ('college', 'high_school');
    CREATE TABLE schools (
      id SERIAL PRIMARY KEY,
      type school_type,
      unique (id, type)
    );
    CREATE TABLE colleges (
      id INTEGER NOT NULL,
      type school_type default 'college',
      check (type='college'),
      foreign key (id, type) references school(id, type)
    );
Ya, the syntax is annoying and repetitive. It would be nice if foreign key could be a literal to remove the extra column altogether. e.g.:

    foreign key (id, 'college') references school(id, type)

comment 6y ago · link · parent

Here's an example of a config system using prolog: https://github.com/larsyencken/marelle

It's a hard to tell where marelle ends and the config begins, since it's all just prolog.

comment 6y ago · link · parent

Rust on windows has targets for msvc or gnu. The MSVC integrates better with Visual Studio and other Microsoft libraries for development. One downside I've found is that it dynamically links against a msvcrt DLL. Which means you may need to download and install a Visual C++ Redistributable package to run.

The gnu target seems to be fully static and run everywhere with no dependencies.

comment 8y ago · link · parent

One interesting aspect of mercury is the number of available back-ends (grades) [1]. I'm curious if anyone has any experience using the FFI [2] for embedding mercury into a larger Java, C# or Erlang project.

[1]: https://www.mercurylang.org/about/backends.html

[2]: https://mercurylang.org/information/doc-release/mercury_ref/...

comment 8y ago · link · parent

Last time I tried to watch something via the HBO Now website, it said I needed to install Flash. That's the definition of terrible for me.

comment 8y ago · link · parent

I assume Lineage Driven Fault Injection stuff [1] has some overlap with Eve's ability to tell you "Why is this blank?": The datalog model allows you to find the logical dependencies of results.

Some other bloom related links:

- Anna KVS[2] showed up recently on hacker news[3] and morning paper[4]

- Lasp lang is in the same space[5], Christopher Meiklejohn has a comparison with bloom[6]

[1]: https://disorderlylabs.github.io/#

[2]: https://databeta.wordpress.com/2018/03/09/anna-kvs/

[3]: https://news.ycombinator.com/item?id=16551072

[4]: https://blog.acolyer.org/2018/03/27/anna-a-kvs-for-any-scale...

[5]: https://lasp-lang.readme.io/

[6]: http://christophermeiklejohn.com/lasp/2018/03/02/lasp-vs-blo...

comment 8y ago · link · parent

> ... DNS rebinding attack. And if your use case can support it, a random port is nice too.

Ah, that's a good explanation as to why zserge/webview recommends serving using ephemeral ports.

Also, wanted to pull in from the readme: webview supports interacting with the javascript environment directly, so a web server isn't strictly required.

comment 8y ago · link · parent

The gcc-7-base package (assuming that's what you're looking at) looks like it's just an empty directory to put various gcc things and some basic docs.

https://packages.debian.org/sid/gcc-7-base

https://packages.debian.org/sid/amd64/gcc-7-base/filelist

comment 8y ago · link · parent

In the feature category, I'd also mention direct support for unbounded collections. CBOR can be its own container format for streaming data.

comment 9y ago · link · parent

Cygwin still seems to be the go-to for any POSIX apps that need to interact with the actual Windows environment. For example, wslbridge[1] that connects wsltty[2] to WSL compiles the frontend component under cygwin.

[1]: https://github.com/mintty/wsltty [2]: https://github.com/rprichard/wslbridge

comment 9y ago · link · parent

fwiw, a Save As CSV from "Microsoft® Excel for Mac" 15.33 got me this:

test.csv: UTF-8 Unicode (with BOM) text, with CR line terminators

Apparently, even recent software is not up to date on what the line separator should be.

comment 9y ago · link · parent

The linked patch notes specifically mention the difference between this and table inheritance based partitioning.

  Because table partitioning is less general than table inheritance, it
  is hoped that it will be easier to reason about properties of
  partitions, and therefore that this will serve as a better foundation
  for a variety of possible optimizations, including query planner
  optimizations.

comment 10y ago · link · parent

For an introduction to Dedalus with less reading, Peter Alvaro's 2015 Strange Loop talk was fantastic.

https://www.youtube.com/watch?v=R2Aa4PivG0g

---

Edit: Actually Chris Granger gave an Eve talk at the same conference. It's interesting to see how Eve has evolved since.

https://www.youtube.com/watch?v=5V1ynVyud4M

comment 10y ago · link · parent

I normally turn to ringojs[1] for "off-browser javascript" with Java integration. It's been around nearly 20 years[2] now! Is this a new take on the same concept? The examples seem web application focused, but there's not even a mention of JSGI[3] or whether it was even considered.

[1]: http://ringojs.org/

[2]: http://helma.org/

[3]: https://www.sitepen.com/blog/2010/01/19/commonjsjsgi-the-eme...

comment 10y ago · link · parent

I haven't seen it used directly, but it seems like Elixir macro based code could be altered and recompiled based on runtime configuration.

An example would be changing log level settings. Normally Elixir log blocks can be compiled entirely out when running in production mode. But it should be possible to fairly safely recompile with debug logs enabled and reload without missing a beat.

comment 10y ago · link · parent

While this format is more generic, an abbreviated encoding can sometimes accomplish the same thing. For example, just moving the "type" to be the object key and removing the implied secondary name gets you this far:

    { "mrow": [
        { "mi": "x" },
        { "mo": "=" },
        { "mfrac": [
            { "mrow": [
                { "mo": "-" },
                { "mi": "b" },
                { "mo": "±" },
                { "sqrt": {
                    { "mrow": [
                        {"mi": "b"},
                        {"msup": { "mi": 2 }},
                        {"mo": "-"},
                        {"mi", "4ac"}
                    ]}
                }}
            },
            { "mrow": [
                {"mi": "2a"}
            ]}
        ]}
    }
It's not as general, but works if you know your syntax is similarly bounded. I don't know how certain static languages would handle serial/deserializing, but makes construction via javascript literals much more pleasant.

comment 10y ago · link · parent

EFF's Privacy Badger does the same for me. After looking at the list of 10 different blocked tracking sites, I just gave up. It's too bad, I'd be otherwise be happy to visit their fine website.

comment 11y ago · link · parent

This is a key thing I'm curious about. How is drive mapping handled? If I "net use d: \\host\share" from one session, it won't nessarily translate and mount D: to all sessions (or will it)?

comment 11y ago · link · parent

I imagine everything said in the article also applies to the Nix package manager[0]. One of its nice features is the Nix expression language (aka Nix) [1]. It has an elegant mixture of purity and pragmatism. I imagine guile scheme would have a lot more integration opportunities outside of just system/build/configuration management. It'd be interesting to see Guix expressions that actually mix other scheme libraries or concepts, rather than just taking Nix expressions and removing the syntax.

[0]: http://nixos.org/nix/ [1]: http://nixos.org/nix/manual/#chap-writing-nix-expressions

comment 11y ago · link · parent

Will chrome be using this as a cache hint? It might be an explicit way to signal a change, but the real benefit would be to dedupe every resource on the Internet. If I have a cached resource with a matching sha256, do I really need to make another request?

comment 11y ago · link · parent

I've had this one stacked up on my reading list for a while: http://camdavidsonpilon.github.io/Probabilistic-Programming-...

It details how to use the PyMC library via iPython notebooks. I'm not sure if iPython qualifies as an easy to use app though.

comment 11y ago · link · parent

This seems like a great idea, even if it's just optional tags that get ignored. With <script> you suddenly have a valid html fragment that should work with any editor.

I guess as is, a make could include a grep -v </?script> step.

comment 11y ago · link · parent

It's a slightly odd comment, SQL queries performed by a C driver are one of the times that you actually get to release the GIL and let the thread do its work without the python interpreter. Depending on the SQL engine, you're ok waiting for the sql backend in parallel, but you may suffer single threaded python object creation processing the result set.

comment 11y ago · link · parent

With apologies for drifting off topic:

I love less's command line interface for some of this stuff.

The command line switch to chop long lines: -S The in-app command to toggle chop lines: -S

The reverse is almost true for things like /search, F (follow) or G (go to end). They can be used from the command line with +/search, +F or +G

comment 12y ago · link · parent

Just on your #2: I'm not entirely sure how the graphical executions plans help in the end. I've seen too many plans that wouldn't fit on 30" display. The postgresql explain text format is reasonable, and can even be automatically logged when queries are slow [1].

http://www.postgresql.org/docs/9.3/interactive/auto-explain....

comment 12y ago · link · parent

A simple way to edit Host: header so that it doesn't necessarily match the url host part used to get to the site. Debugging name based virtual hosts configs via editing host files is a huge pain point for me.

comment 12y ago · link · parent

In C#, these aren't 100% source-compatible either. For example, you can't pass properties using ref or out parameters.
12