HN user

roller

90 karma
Posts0
Comments42
View on HN
No posts found.

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)

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.

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...

... 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.

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.

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.
Why Erlang Matters 10 years ago

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.

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.

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)?

Ruby on Guix 11 years ago

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

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?

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.

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.

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

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.

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

Git 2.0 12 years ago

We migrated SVN exactly the same way. Except I didn't write a corruption script. Turns out VSS was capable of corrupting itself beyond repair with no help from anyone! Or wait, did you work in my office?