Better HN
topnewbestaskshowjobs
Log inSign up

wireprotocol

7,244 karma · joined Sep 25, 2010 (16y ago) · 2,593 submissions

Submissions

comment 6y ago · link · parent

There's the legality of freedom and the spirit.

I'd be pretty disturbed if an ISP all of a sudden prevented me from contacting wikipedia, or throttled my access to competitors. The ISP is private, but it's not really in the spirit of freedom to do so.

Similarly, if an airline said they won't sell me a ticket because I'm going to a rally for a particular politician. Or if the post office (or fedex) wouldn't carry my letter to the editor because they disagree with my opinion. Or if I couldn't get basic banking, insurance, or other business services because my legal business is politically unpopular.

There also is some legal murkiness because a federal judge ruled that Trump couldn't block people on Twitter[1].

[1] https://www.governing.com/topics/politics/gov-twitter-facebo...

comment 6y ago · link · parent

One of my theories about the success of HN is that we are grouped together based on one set of topics (on which we largely agree), but we discuss other topics over which we are just as divided as the general public.

I believe there is an anchoring effect -- if you are just in a discussion where someone helps you understand the RISC-V memory model, it feels wrong to go into another thread on the same site and unload a string of epithets on someone who feels differently than you do about how doctors should get paid.

comment 6y ago · link · parent

And the corrolary: just because the other party walks away from the argument doesn't mean that you are right.

comment 6y ago · link · parent

The whole point of political correctness is that there are a set of opinions that are unpopular enough that it's OK to inflict social isolation (or sometimes worse) on those who express them.

Even if those opinions are really horrible opinions, political correctness is still bad, because social isolation just makes the problem worse. Sure, you can't engage every crazy idea with a detailed rebuttal. But it's much more effective to befriend or relate to the person on other points, develop mutual respect, and through osmosis you will both understand each other a bit more, and each temper your views.

This is how families work. Hopefully you don't (hypothetically) hate your aunt because she occasionally says something that sounds racist. Maybe she has done many wonderful things in her life, and so you just kind of accept it as part of the complexity being human. You don't have to believe the statements are good, but you also don't have to obsess on them to the point of defining her by the statements.

The other reason political correctness is bad is because the rules are arbitrary enough, and the punishments are arbitrary enough, that you are never quite sure when they are going to turn against you. For a while it was politically incorrect to say "black", but now that's normal again and "African-American" is a bit more awkward[1]. There was no grand vote or decree to change it... it just changed like a fashion.

I honestly don't see how someone who travels at all could be one of the enforcers of political correctness. People in other countries say politically-incorrect (in the American sense) stuff all the time unless they have been trained otherwise.

[1] The median black family here has a lot more history in America than the median white family, so it seems a bit insulting to add a qualifier before "American".

comment 6y ago · link · parent

"His success was made possible, at least in part, by legacy media’s blind spots."

Blind spots generally persist because someone isn't held to account for reality. In this case, perhaps the editors are not being held to account. But how can that be fixed without just perpetuating the media meta-argument?

I guess the answer is variety: if you don't like the editorial decisions here, go somewhere else. That is a necessary solution with a free press, but ideally would not be the first line of defense.

The answer in this case is that Joe Rogan is simply taking on all of the roles: editor, interviewer, commentator, and sometimes the subject. But I have to imagine the separate roles were created for a reason... is it a net win?

comment 6y ago · link · parent

It may not be fully untrusted, but it's good to have barriers as well.

Also, this problem is fundamental and not limited to a single core, package or machine. Any time you are making opportunistic optimizations (of which caching is one), and the opportunities available depend on what happened outside of a privilege boundary, you can have this problem.

A similar thing happens at a higher level of abstraction with, for example, btree operation timings in a database.

comment 6y ago · link · parent

In a way, it's liberating. Look at it as a service the compiler offers, where lifetime errors are a normal part of the development cycle.

I use rust and I don't worry about the lifetime stuff. Just hack away and get the job done. Overall, rust is lower startup friction than most of the tools I use (though YMMV).

comment 6y ago · link · parent

Did you discuss the license with any free/open source software organization to get their input? Are other products adopting similar licenses, and if so, what are the differences?

I'm not fundamentally opposed to any deviation in licensing. But I am much less inclined to use software if the license hasn't been reviewed/endorsed/used by others widely.

Also, I'm curious if you considered just addressing the license to anyone excluding $COMPANY_YOU_ARE_WORRIED_ABOUT. Not sure what the implications of that would be, but it would be interesting. Realistically, a startup has to prove itself in a relatively short period of time, and in that short period of time there are generally very few competitors (typically zero or one) that threaten your business model itself. If you have 10 competitors that actually threaten your business model, your business has already proven itself ;-)

comment 6y ago · link · parent

Are you using pg_dump or pg_dumpall? The latter will backup the global objects (like roles) as well.

https://www.postgresql.org/docs/current/app-pg-dumpall.html

comment 6y ago · link · parent

I expect there will be other changes to improve connection scaling first.

comment 6y ago · link · parent

Thank you. That's why I asked for modern c#.

It would be nice to see if some other codebases managed to free themselves from some of this cruft and make something more approachable.

comment 6y ago · link · parent

Yeah, clearly there's some code somewhere that does something. I just don't understand why there are so many files and so much code that does nothing and means nothing.

I'm fine with verbosity. I'm fine with lots of data type declarations, annotations, things that make the compiler happy, etc.

But a file full of getters and setters? I can put up with it, but I don't understand why.

comment 6y ago · link · parent

Looking at a random file in Powershell, the first thing I see is:

    private string _typeName;
    /// <summary>
    /// Add new type name to the specified object for TypeNameSet.
    /// </summary>
    [Parameter(Mandatory = true, ParameterSetName = "TypeNameSet")]
    [Parameter(ParameterSetName = "MemberSet")]
    [Parameter(ParameterSetName = NotePropertySingleMemberSet)]
    [Parameter(ParameterSetName = NotePropertyMultiMemberSet)]
    [ValidateNotNullOrEmpty]
    public string TypeName
    {
        set { _typeName = value; }
        get { return _typeName; }
    }
-- https://github.com/PowerShell/PowerShell/blob/15c2245af97486...

Honestly it seems like just a lot of code and very little meaning. I can't help but think that there's a better way of expressing the solution.

I could have picked the wrong file, but I was poking around in lots of directories before I found any significant C# code at all. It seems like there's a whole 'nother level of boilerplate in the directory structure.

comment 6y ago · link · parent

What is an example of a really good codebase written in modern C#?

There are quite a few appealing things about the language, but I'm having trouble shaking the feeling that it's kind of like Java. I know both languages have evolved a lot, but some codebases might get stuck in some old patterns.

comment 6y ago · link · parent

The text of the 4th could be interpeted to prohibit that kind of search. There are reasonable searches without warrants as well as unreasonable searches with warrants.

comment 6y ago · link · parent

And I seem to remember that FreeBSD can support linux binaries, too.

comment 6y ago · link · parent

I've been working on postgres-extension.rs[1]. The idea is that, instead of writing a PostgreSQL extension in C (which is the only option for interesting extensions), you can also write one in pure rust.

I've eagerly awaited many features to make this work reasonably well, and I've been very pleased how much rust has helped my use case over the last few years.

Although lots of languages have a C FFI, that's really not enough to extend a complex codebase. Postgres has it's own setjmp/longjmp-based error handling, it's own system of allocators, it needs a way to find the right functions in an extension and call them the right way, its own way of dealing with signals, etc. There are zillions of internal structs, and the extension needs to be able to read/modify them without copying/translation. Oh, and also, postgres doesn't like threads at all, so the extension better not make any (at least not ones that call back into postgres APIs).

The only language even close to getting all of this right is rust:

* it has no runtime that causes problems with threading, scheduling, signal handling, or garbage collection

* typically GC'd languages can't operate very well on unmodified C structs; rust doesn't have a GC so it can

* rust goes out of its way to support C-compatible structs without any copying/translation, and can even treat some plain C representations as more interesting types in a binary-compatible way (like a nullable pointer in C could be treated as an Option<&MyStruct> in rust)

* the tokio library allows nice concurrency without creating threads if you use the CurrentThread runtime

* it supports changing the global allocator to be the postgres allocator

* rust has good procedural macro support, which is important because a lot of postgres APIs heavily use macros, so making the rust version ergonomic requires similar macro magic

Areas rust could be more helpful, but which I'm trying to address on my own to the extent that I can:

* Support for setjmp/longjmp. I know this is not easy, but important for interacting with C code that already uses it. I realize it would be unsafe, and that it can't be wrapped up in a safe way directly, and it would be delicate to create safe APIs that use it at all. But I still want it. I made a crate[2] that adds support, but it has a few issues that can't be resolved without compiler support.

* Better support for cdylib shared libraries that might call back into the host program that loads the library. Right now, you have to pass platform-specific flags to get it to link without complaining about undefined symbols (because they won't be resolve until the library is loaded into the host program). Also, it's difficult to test the shared library, because you have to guess at the location of the built library to be able to tell the host program where to find it before you can begin your test. I made a crate[3] to help with these things also, but it would be nice to have better support.

Oh, and one more thing on my wishlist not directly related to this project is that it would be nice to have support for datastructure-specific allocators (like a mini-allocator just for a hash table). Then, you'd be able to monitor and control memory usage by inspecting that allocator; and when you destroy or reset the hash table, you can know that the memory is freed/cleared as well (without worrying about fragmentation). Maybe these mini-allocators could also be used in other contexts, too, but it would probably be easiest to get the lifetimes to work out if it was tied to a data structure.

[1] https://github.com/jeff-davis/postgres-extension.rs [2] https://github.com/jeff-davis/setjmp.rs [3] https://github.com/jeff-davis/cdylib-plugin.rs

comment 6y ago · link · parent

Interesting point about a style, but it sounds like the kind of rule that's meant to be broken.

The specific point about a gun seems even worse. It's cliche to show a gun early on that leads to some tragedy later, and bothers me when I see that done in a TV show/movie. It ties too much into an inanimate object when they could be developing a character. And in a lot of settings, guns are all around and have little to do with the actual story.

comment 6y ago · link · parent

So let's catch the stupid ones then?

comment 6y ago · link · parent

It could be a mix of culture, trust in government, and trust in the media. I wouldn't put it all in the "culture" bucket, because it lets government officials and media outlets completely off the hook.

comment 6y ago · link · parent

Why can't you aggregate? It's just whether the aggregator is making the deal with the restaurant or the customer. Making the deal with the restaurant has a lot of advantages.

comment 6y ago · link · parent

This white-label service would be B2B rather than B2C (like doordash), which wouldn't get the same buzz or VC valuation.

Great idea though. If I'm buying from a restaurant, I want them in control of the experience. Even for pizza.

comment 6y ago · link · parent

Cheating is a form of fraud. It's both just and practical to prevent those who use fraud as a strategy from establishing positions of responsibility.

There are two questions:

Should it be the job of teachers to catch cheaters? If not teachers, who?

How do you salvage "borderline" cases where someone cheats but may not use it as a life strategy (at least, not yet)?

comment 6y ago · link · parent

What are some examples of medium-large Go projects where the code is well-written? By that, I mean code that would make a good example for someone trying to learn the "right" way to do things.

I was briefly learning Go a while back. I'm curious how well gorotuines and channels have held up as building blocks, and how extensively they are used in real projects.

comment 6y ago · link · parent

Cool!

Curious why not WASM also? I have no use case for that, just asking.

comment 6y ago · link · parent

Is the asm!() macro going to stabilize? It seems important to ever make a real OS, right?

comment 6y ago · link · parent

Even if it's not a violation of the First Amendment, it's close enough that it flips the responsibility. Now the government needs to continually convince people that it's not a violation.

America is about freedom and limited government. That means some policy options are off the table or treated with extreme skepticism.

comment 6y ago · link · parent

Your logic is sound, but the calculus changes when dealing with matters that touch on rights and freedoms.

In all likelihood, these closures are a direct violation of the First Amendment. I think people are tolerant of these restrictions for limited periods of time, but when the emergency drags on forever and becomes increasingly arbitrary, it starts to lose credibility.

Politicians have limited power, even during an emergency. And especially when the emergency looks like it's going to be in effect to some degree for maybe a year.

Remember also that the people who go out are doing so by choice. And most people mostly choose to stay home. It's not clear that we need a big enforcement hammer here.

comment 6y ago · link · parent

Setting aside the AI angle, perhaps just recording the assumptions in a way that can be measured would be enough.

Tooling, runtime sampling, or just code review could reveal when the assumptions go awry.

comment 6y ago · link · parent

From a public health standpoint, it's still good even if it only helps some fraction of people. I think that fraction is pretty large.
1
567
87