684 karma · joined Jun 20, 2017 (9y ago) · 230 submissions
comment 6y ago · link · parent
> The one way out of this trap would be if we could come up with some kind of server that did not require administration
To a large extent this is actually a goal of sandstorm.
I'd contest some of your requirements though: /Nobody/ has 100% uptime, even AWS. And most individuals are not in a position where an outage is going to cost them millions. It might suck, but people trudge through worse problems with their PCs; no reason a personal server ought to be different. So I think the bar is a bit lower than you suggest; I think it's possible to get a server to the point where it can be "administered" by someone who's capable of "administering" a laptop.
We're obviously not there yet; you still need to set up a Linux box before installing Sandstorm itself, and we don't really have a great Story wrt backups yet. But Sandstorm itself is already mostly fire-and-forget; it auto-updates itself, our security track record is rock solid, and I can't remember the last time I had to do anything that felt like sysadmin work for my Sandstorm box. There are a couple things I think still need to happen:
1. We need an automatic backups & recovery story.
2. We can't require the user to install Linux first; we'd need a "sandstorm distro" so folks can do the whole business together. The OS should be hardened by default and self-update with Sandstorm, as well as integrate with the admin panel for scheduling reboots.
3. Ideally, there'd be hardware you could buy that's just already running the sandstorm distro.
comment 6y ago · link · parent
But, even without that, I do think there's a reason to be hopeful that this is more than a momentary stir. The company shut down so suddenly and without really on-boarding new contributors, and I think much of the problem was that of getting over the hump of "all of the people who've worked heavily on this codebase disappeared at once." I think it might not have stalled in the first place if there were a couple folks outside the company who had been doing regular work on the platform. I still feel like our bus factor is a little low wrt to hacking on core, but I'm hopeful that we can get to a point where there's enough shared knowledge that we won't end up in quite that kind of slump again.
comment 6y ago · link · parent
https://docs.sandstorm.io/en/latest/administering/faq/#why-d...
Though that doesn't address the intranet issue of course.
comment 6y ago · link · parent
https://docs.sandstorm.io/en/latest/administering/sandcats/
...but yeah, now that let's encrypt does wildcards it'll be easier to do it on your own domain. I'd like to see sandstorm have some nice integration for this in the future.
(sandcats still works of course, and is still a good option to get started if you don't want to mess with DNS and certs right off the bat).
comment 6y ago · link · parent
Re: self-documenting, certainly sometimes (I mean, you shouldn't play code golf...), but in this case the code in question was:
2218 if (!valid_localpart(maddr->user) ||
2219 !valid_domainpart(maddr->domain)) {
....
2234 return (0);
2235 }
2236
2237 return (1);
It's not obvious to me what you would name the intermediate booleans that would be more self-documenting than the function names used there.comment 6y ago · link · parent
Communication in software development is a huge deal. While language barriers are a thing, I don't think you can or should compromise on documentation, and when it comes to commit messages I don't think this is the leading reason why folks don't write good ones.
I'm told by friends who were at RedHat when they decided to make the source repositories public (as opposed to just throwing release tarballs over the wall), and commit messages went way way up. This tells me: people knew better, they just didn't care if they weren't being held to account.
comment 6y ago · link · parent
Re: Email being an inaccessible silo: communities that use git-format-patch/git-am usually use mailing lists, which are archived, and subject lines have [PATCH] in them so searching needn't be difficult.
comment 6y ago · link · parent
Haskell has TemplateHaskell, which can be used for macro-like things, but it's substantially less ergonomic, not because Haskell isn't "homoiconic", but because the grammer is actually really complex and non-obvious. There's tons of little things that you don't think about when writing Haskell code, but you have to deal with when manipulating it. For example:
https://hackage.haskell.org/package/template-haskell-2.15.0....
That's a node in the AST that stands for something that is at most one character in the source text, and usually zero. So code manipulating this stuff gets really verbose and clunky. It's still powerful, but it's not the same.
As a side project, I'm actually working on an ML-family language with a macro system. It still has a more traditional ML-style syntax, but it is simple so working with it should be comparatively ergonomic. In an ML you wouldn't frequently want to be working with loosely defined data structures anyway; the first thing you'll do is convert it to a more strongly typed form that captures what you really want to be manipulating.
comment 6y ago · link · parent
It's not like the difference in input speed is really meaningful; as you'll see someone point out in any discussion about this stuff, the bottleneck in programming is thinking.
But what I find will often happen is:
1. I settle on a course of action. 2. I go to actually do it. 3. The editor doesn't do what I expect, because it's not vim. 4. I am momentarily confused, and have to think for a minute about how to do what I want. 5. I lose my train of thought entirely. 6. Rinse, repeat.
So for me it's not so much about any specific thing the editor does to make me productive. I do have opinions about some things, but what's important is that it just fades into the background and lets me think about the problem I'm trying to solve.
Beyond just being "different," I tend to eschew IDEs for much the same reason -- while many of the advanced features seem useful, I find them too distracting to be worth the trouble. Just me and the code, please.
comment 6y ago · link · parent
That's actually something that's a major hole for me; it would be like twice as useful if it did. But yeah, my solution is just: https://github.com/zenhack/vim-config
comment 6y ago · link · parent
If you're at all interested in doing anything about it, copyleft.org has a bunch of useful resources.
comment 7y ago · link · parent
Nothing is universally applicable.
But yeah, I certainly wouldn't use it for hard real-time tasks. If you can't tolerate missing deadlines ever, there is a very short list of acceptable tools.
But (and correct me if I'm wrong; it's not my area) HFT doesn't strike me as hard real-time? See also a sibling comment that asks about Jane Street's OCaml use.
It's not like GC pauses are happening constantly; Go programs don't allocate that much, and a well tuned program can go a long time between collections. It likely is appropriate for many soft or firm real time systems. And you can shut the GC off if there are sections where GC really must not happen:
comment 7y ago · link · parent
I'm convinced the term "systems language" doesn't have a coherent meaning at this point. See:
https://zenhack.net/2018/07/14/three-funerals-in-the-name-of...
comment 7y ago · link · parent
For me what did it was switching to wayland (sway[1] specifically, from dwm on x11). Now it's a good step faster than chromium.
I agree with the sibling comment; there's something wrong going on, what you're describing isn't firefox's baseline.
[1]: https://swaywm.org/
comment 7y ago · link · parent
Semigroup doesn't involve higher kinds at all. What you seem to be discussing is either type classes or just a pile of junk from abstract algebra. Fwiw, Elm has semigroup too -- it's called appendable (which is a much much better name...).
> Learning curve is a very high cost by itself; HKP is the reason Haskell is notoriously difficult to learn.
I don't think any one feature of Haskell is why it's hard to learn. I think the reasons are much more mundane, the main ones being:
1. The language is just enormous. It's a lot to need to have in your head to understand some bit of code you come across. Folks end up picking a (small) subset of it just to stay sane, but this doesn't help you when trying to come across a new library; you basically need to have most of the language in your mind somewhere to understand $RANDOM_NEW_LIBRARY reliably. And because it's an issue of sheer size, there's no short-cutting it. It has a lot of features with heavy overlap in use cases, so you spend a lot of time thinking about silly things like "Should I use FunctionalDependencies or TypeFamilies?" "I'm writing a library that needs to generate a bunch of boilerplate code, should I use GHC.Generics, TemplateHaskell, or something else?".
2. The community is really lousy about pedagogy. They tend to lead with the abstraction, which is just not how people learn. I really wish this[1] had been written like a year earlier; it would have saved me a lot of trouble wading through useless instructional material trying to learn this stuff. It doesn't seem like the bulk of the community took that to heart though, and while there are some good learning resources out there, there's a sea of worse-than-useless ones.
3. There's a culture of complexity/over-engineering. I don't think this is unavoidable, but it's particularly a hazard of being research language where to a large extent the whole point is to play with crazy ideas. The maintainers still see the language as primarily a platform for experimentation, so KISS can be a hard thing to push for.
> and it seems like it must be pretty steep if you stack up languages with HKP and their quality of error messages and docs against other typed languages that don't.
I'm not really sure I buy this; I think the list of languages that have these things and have seriously made good error messages a priority is pretty short (empty?). I can point to some simpler ML dialects that still have some really lousy error messages.
[1]: https://byorgey.wordpress.com/2009/01/12/abstraction-intuiti...
comment 7y ago · link · parent
comment 7y ago · link · parent
> It sounds like you disagree with the last bullet point. If so, then either we've had different experiences or we walked away with different conclusions from them.
I more or less agree on laziness (at least lazy-by-default; having a lazy type as found in OCaml available is a big win for little downside).
Re: Higher-kinded types: I'm curious as to what you think the high costs are? My impression is that they've mostly been left out of Elm due to pedagogical concerns. Is it just that or are there other things?
comment 7y ago · link · parent
But also, you can still get a malloc failure without actually be running out of memory if the allocator can't find a big enough contiguous chunk of address space.
This is highly unlikely on a 64 bit system, but if you try to malloc gigabytes on a 32 bit machine you might see it.
comment 7y ago · link · parent
Sure you can: https://homepages.inf.ed.ac.uk/wadler/topics/linear-logic.ht...
Rust's ownership types and lifetimes actually allow for this just fine. The latter is the essence of how Haskell's ST Monad works; you can use lifetimes to get locally-mutable state without violating global invariants, since once they go out of scope they can't be reused.
It's interesting to observe that, without "magic" standard library functions and `unsafe`, Rust's type system actually completely constrains mutability, and if a function doesn't have `mut` somewhere in its type signature, it doesn't break referential transparency.
That said, in practice, the language does have magic functions that violate this property, and they do so in a way that means you can't use the above reasoning principle at all. Also, mutability being constrained by the types is not the same thing as typical code not using it everywhere, which is the situation with rust-as-found.
comment 7y ago · link · parent
I haven't used Rust heavily enough to comment on how it compares in great detail, but comparing to Elm as a proxy for Haskell doesn't really work.
Frankly, paradigms are a really lousy way to think about languages. I wrote a series of blog posts about this[1], but this opening lecture from one of Brown's PL courses I think does a better job of making the point:
https://www.youtube.com/watch?v=3N__tvmZrzc
It's useful to talk about what say, GC, laziness, lifetimes, ownership, typeclasses/traits, higher-kinded types, higher rank types, variants, elm-style records, etc. do to a language, and how they compose, but I think you can't go very far talking about how "paradigms" compare.
[1]: https://zenhack.net/2018/07/14/three-funerals-in-the-name-of...
comment 7y ago · link · parent
"[0, 0, 0, 0, 0, <...gigabytes of zeros>, 0 0, 0, 0]"
So you need to limit the overall input size regardless of whether you already have a depth limit in place.
comment 7y ago · link · parent
In languages like rust/c/c++, this might be hard, since you can't grow the stack by moving them (since you'd need to update pointers, which are too visible in those languages, and even identifying a pointer at runtime is undecidable), and segmented stacks cause the "hot-split" problem.
But most languages could just make this problem go away by growing the call stack when needed. A few of them (incl. Haskell) do. I'm following suit in a language I'm working on.
comment 7y ago · link · parent
I've spent a bunch of time working in Elm, though I hadn't used it in anger before they dropped the FRP stuff.
My experience with post-frp Elm is that:
* It seems really elegant on small examples * When you start working with larger codebases, and you have some resuable UI elements you want to build, you end up writing a lot of "routing" code to shunt messages to sub-components. Conventional wisdom in the community is to try to keep app structure as "flat" as you can to avoid this, but I've not seen a codebase of meaningful size where this doesn't happen enough to be annoying.
I have a gut instinct that "real FRP" might shine a bit more at this point; it seems like it would make wiring together different bits of the UI easier.
comment 7y ago · link · parent
I've been using Arch since '06, back when Judd was still in charge and the repos were divided up in terms of "stuff Judd maintains" and "stuff other devs maintain." It was this small community project that nobody had really heard about, and I got so used to it just not being a thing that when (sometime in the range of '10 - '12?) folks started talking about it as a hipster thing, it really took me by surprise. A few years later it seemed like it was just one of the more well known "hands on" distros with great docs, and I was glad to have that phase be done with.
comment 7y ago · link · parent
Also:
* I don't see any reason to believe nobody has more than one "cultural identity."
* Race is really more about culture than biology too. Maybe less so, but if for some reason you were motivated to come up with some categorization of people based on their biological ancestry, the races that we talk about wouldn't make a ton of sense. When you hear people saying that race is "socially constructed," this is what they're talking about. The Irish weren't considered white a century ago, and it's not like the change came about due to some scientific breakthrough.