Better HN
topnewbestaskshowjobs
Log inSign up

qbasic_forever

10,505 karma · joined Feb 3, 2021 (5y ago) · 2,505 submissions

Submissions

comment 5y ago · link · parent

No not with Knuth's original ideas for literate programming and cweb. There's an explicit abstraction between the location of prose and the final source code output and they can be woven in any way the author desires. You can even insert intermediate steps, like pseudocode that show building up the architecture in small incomplete steps, and all of that is removed entirely from the final source code result. It is actually quite complex and why more modern literate programming systems ditch it and basically turn into fancier comments.

comment 5y ago · link · parent

Purely from an opsec perspective I doubt we'll ever have world leaders as online and accessible on private platforms like Twitter as we did in the last years. It's just too much of a national security risk and every major state has to assume the CIA/Mossad/KGB/etc. is actively trying to intercept and undermine world leader's online presence. It is stupidly easy for a determined state actor to over time infiltrate and get an in with a private American company. The risks are just too great to have a world leader using Twitter or similar platforms for anything more than reshashed press releases and announcements. Smart nations will probably get ahead of potential hacking or other incidents by just having a blanket and clear policy that no official business will be communicated or done on Twitter or similar platforms.

comment 5y ago · link · parent

Or IMHO this is much better solved with a literate programming approach where the tour content lives inside the code as comments. Then as code is refactored and changed it's very obvious that the related docs and tour data has to change too.

comment 5y ago · link · parent

That doesn't really answer the question posed though--how does a tour stay up to date as code is changed? Does someone have to go in constantly and keep it up to date, pointing at the right spots, etc? It sounds like an incredible burden without dedicated staff or time to maintain--i.e. this is fine for projects established enough to have technical writers, evangelists, etc. but for 99% of projects it's just more burden and burnout. It's not really something you can farm out to your community or first time contributors either as deep analysis and understanding of a codebase takes real time and effort from the core devs.

comment 5y ago · link · parent

Run containerd and buildkit in a vagrant VM. You'll have a lot more control--you can pick what kernel you want (and even upgrade it as necessary), you can expose host filesystems and devices to the VM, etc. It's the same thing Docker Desktop is doing behind the scenes but now you control the full stack.

comment 5y ago · link · parent

This was a point of debate and arguments on BBS message boards back in the day. I don't think there was ever a definitive pronunciation.

comment 5y ago · link · parent

SICP for me was the missing link between learning syntax and code to designing actual programs that solve real problems. It made me step back and look at a problem not as something that just needs a layer of code thrown at it, but as a task to complete, with requirements, constraints, etc. to consider before a single line of code is even written.

comment 5y ago · link · parent

And then you get to google scale and realize using python for every config, like your entire build system, leads to a huge mess of completely non-deterministic build scripts that do wacky things like make HTTP calls to prod systems, depend on all kinds of global state stores, etc. So you build a new version of python that strips out all of the non-determinism and move your config to that (see starlark: https://docs.bazel.build/versions/master/skylark/language.ht... ).

comment 5y ago · link · parent

I really like task (http://taskfile.dev/) as a more usable layer on top of mydan/sh. Task is basically make but with a yaml syntax and built-in posix shell interpreter all in a single statically linked executable. It makes building something even on Windows a total breeze.

comment 5y ago · link · parent

A minimal single host cluster runs fine for me on a $10/mo DO droplet with just 4GB RAM. It would probably work on the $5 droplet too if you weren't running much more than a blog.

comment 5y ago · link · parent

Kubernetes The Hard Way if you want to start from first principles and learn all about low level tools and setup. In practice you're probably going to use a cloud provider or tool to automate all of this stuff, but it's useful to understand the core infrastructure like TLS certs, etcd, etc.

Otherwise the official docs are quite good and worth starting there. I'd be wary of buying books that are more than a year or two old--the k8s space moves fast and they regularly have major updates once or twice a year. Books and docs can get a bit stale or out of date with current best practices.

comment 5y ago · link · parent

cert-manager supports the Lets Encrypt DNS challenge, which supports wildcard certs: https://cert-manager.io/docs/ It's a little bit of one time setup and then easy-peezy SSL automatically for all your services.

Do note that you need a DNS provider with a good API to programmatically control it (the DNS challenge requires setting a special txt record that Lets Encrypt verifies). Read the docs to learn more, but most of the big ones (AWS Route 53, Cloudflare, etc.) should be fine.

comment 5y ago · link · parent

Read up on the philosophy of "pets vs. cattle". Kubernetes is meant to totally abstract the hardware and operating system. For a use case of one app on one machine it's not really doing anything.

But what if I told you that you needed to run that docker container on 5,000 machines with 2,500 load balancers in regions across the world? Are you going to SSH into thousands of boxes manually and run docker commands? Are you going to try setting up some monster ansible inventory to do the same? In practice the best minds in distributed computing have found those kind of practices break down at large scale--you just cannot reason or deal with individual machines when there are thousands of them.

This is where kubernetes comes in--it's an abstraction that lets you declare "here's the state I want, X machines running Y containers, all linked through Z services" and kubernetes will make it happen, period. It will take care of contacting thousands of machines, controlling the running containers, ensuring they stay running, handling failures, monitoring, load balancing, etc. You no longer think about problems in terms of low-level machines and instances, you think about the higher level objective like deploying code.

The beautiful thing is that it scales down nicely. A simple 50 line YAML file that declares running your docker container and load-balancing it with a service can easily deploy just to your local machine, or be scaled up to run on 5,000 machines by just changing a variable in the deployment scale. The same simple one-liner kubectl command kicks of either deployment and helps you monitor its progress. If you've ever worked in distributed systems it is really incredible to see this in action at scale.

comment 5y ago · link · parent

Yeah the server install instructions are a bit out of date it seems. It doesn't mention you need to run the 'make webapp' task to run webpack and generate the bundled HTML page. It also has you download an old version (0.5) and the docs on the config don't match what's in the repo now (with version 0.6.1).

Anyways, here's a Dockerfile I whipped up that builds and runs a local version configured to use sqlite. No nginx or other stuff, it's just simple localhost config (not production ready):

  # Focalboard v0.6.1 requires node 10+
  FROM node:15-buster-slim
  
  # Focalboard source to clone.
  ARG FOCALBOARD_REPO="https://github.com/mattermost/focalboard.git"
  ARG FOCALBOARD_BRANCH="v0.6.1"
  
  # Focalboard v0.6.1 requires make.
  RUN apt-get update && apt-get install -y \
        gcc \
        git \
        make \
  &&  rm -rf /var/lib/apt/lists/*
  
  # Focalboard v0.6.1 requires go 1.15+
  COPY --from=golang:1.16-buster /usr/local/go /usr/local/go
  ENV PATH="/usr/local/go/bin:$PATH"
  
  # Clone focalboard.
  WORKDIR /opt/focalboard
  RUN git clone --depth 1 --branch $FOCALBOARD_BRANCH $FOCALBOARD_REPO .
  
  # Build focalboard.
  RUN make prebuild \
  &&  make webapp \
  &&  make
  
  # Setup a localhost configuration with sqlite.
  RUN echo '{\
    "serverRoot": "http://localhost:8000",\n\
    "port": 8000,\n\
    "dbtype": "sqlite3",\n\
    "dbconfig": "/data/focalboard.db",\n\
    "useSSL": false,\n\
    "webpath": "./webapp/pack",\n\
    "filespath": "/files",\n\
    "telemetry": true,\n\
    "session_expire_time": 2592000,\n\
    "session_refresh_time": 18000,\n\
    "localOnly": false,\n\
    "enableLocalMode": true,\n\
    "localModeSocketLocation": "/var/tmp/focalboard_local.socket"\n\
  }' > /opt/focalboard/config.json
  
  # Uploaded files are stored here.
  VOLUME /files
  
  # Sqlite database is stored here.
  VOLUME /data
  
  CMD ["/opt/focalboard/bin/focalboard-server"]
It will need a volume at /files for uploaded file storage, and /data for its sqlite database. It exposes a server on port 8000, and an admin API unix socket on /var/tmp/focalboard_local.socket (read their docs for what it's useful for, like resetting passwords). The Dockerfile should be multiarch, but I can only test on amd64. Low spec hardware (raspberry pi) might struggle a bit with the build as it's a non-trivial go server build, and then production webpack bundle... weird failures might be OOM issues.

Here's an example of a basic build and run, saving the files and db to a local directory:

  <copy Dockerfile contents above to file>
  docker build -t focalboard .
  docker run --rm -p 8000:8000 -v $PWD/files:/files -v $PWD/data:/data focalboard
Access http://localhost:8000 and it will let you create a new user account.

(go wild with the Dockerfile above, I release it in public domain)

comment 5y ago · link · parent

I spent 8 years in engineering at MS in the 2000s--it was no worse or better than any other tech company. There was never an explicit expectation to work more than 40 hours, and most managers were good about not pressuring people into disturbing work-life balance.

But, at the end of the year you were calibrated against all of your peers and WLB was not a criteria that mattered. If you just put in your 40 hours you probably wouldn't get fired, but you definitely were not going to be promoted when compared to the people cranking out more work per week. There was a big divide with the younger, fresher folks working all the time (and making their work very visible).

Once you were a senior dev you kind of had a choice to make--if you wanted to keep a high 'promotional velocity' you had to keep working >40 hour weeks or be left in the dust. If you didn't want to climb that ladder then it was totally fine but you would never be promoted beyond another level or two. I knew folks who were senior devs for 10, 15, or even more years. In contrast the partners/high performers were all regularly getting promotions every 2 years or less and absolutely none of them I knew worked less than 60-80 hours a week. To get promoted up to principal and beyond levels required having a consistent history of promotions every couple years--there was no way to really pause or slow down without stopping your entire career development.

From my friends still left there I don't think much has changed over the years. It's a somewhat subtle system where managers and HR can proudly point to never requiring people to work crunch time. They can trot out plenty of 10 year senior engineers to give quotes and talk about how it's so great to just work 40 hour weeks. But at the end of the day if you want to be successful and rise up the ranks at MS, you are going to be working all the time, period (at least until you reach partner level).

comment 5y ago · link · parent

Marketing pages always love to have big pretty bar charts to compare whizbang product with the old standbys. This would be great to make a big hero chart that looks good, doesn't need any javascript, and has amazing SEO (the raw table data is slurped down by google indexing).

comment 5y ago · link · parent

So what's the end game here, is Dropbox going to keep building out an internal Kubernetes-like platform with Atlas, or do they plan to eventually just move to k8s? I noticed this line in particular:

"We evaluated using off-the-shelf solutions to run the platform. But in order to de-risk our migration and ensure low engineering costs, it made sense for us to continue hosting services on the same deployment orchestration platform used by the rest of Dropbox."

It sounds like they acknowledge they're reinventing a lot of stuff but for now are sticking to their internal platform. Perhaps Atlas is a half-step then to get teams used to owning and running their code as isolated services. But everything I read that they built in Atlas--isolated orchestrated services, gRPC load balancing, canary deployments, horizontal scaling, etc.--are bog standard features of Kubernetes today. I'd be very leery of maintaining a bespoke Kubernetes-like platform in 2021 and beyond--in some ways it seems like it's just shifting the monolith technical debt into an internal Atlas platform team's technical debt. What's the plan to get rid of that debt for good I wonder?

This hurdle shows there's already some cracks in the idea of long-term Atlas too:

"While splitting up Metaserver had wins in production, it was infeasible to spin up 200+ Python processes in our integration testing framework. We decided to merge the processes back into a monolith for local development and testing purposes. We also built heavy integration with our Bazel rules, so that the merging happens behind the scene and developers can reference Atlasservlets as regular services."

If I read that right does it really mean the first time a developer's code is run like it will run in production is when it goes out to canary deployment? I.e. integration tests are done in a local monolith instead of setting up a mini-prod cluster. That seems a bit nerve-racking as a dev to have no way to really test the service until bits are hitting user requests. In the k8s world a ton of work has been put into tooling and processes to make setting up local clusters easily. It's a shame to not have something similar for Atlas.

comment 5y ago · link · parent

I was taught to use the clove hitch as a fast and easy to check way to secure something, typically for a backup to a primary anchor or knot. Like once you get up to the top and are anchoring in you can throw a quick clove hitch on as a backup while you get a stronger anchor setup. We also used it in crevasse rescue situations as a backup for the prusik/friction hitch.

comment 5y ago · link · parent

Learn a munter hitch, it's extremely versatile and can do everything from securing something, to belaying or rappeling off it (with a locking carabiner). It is an extremely important knot for setting up rescue systems as it can hold a load under tension, yet can be undone and slack added to the system while under complete control.

comment 5y ago · link · parent

'personal monorepo' is what I like to consider this kind of organization. I have templated starter projects, direnv configs, etc. all in a hierarchy of folders in my home.

comment 5y ago · link · parent

The upcoming 0.5 release will feel like a rewrite to some folks though, the entire config system is Lua-first right down to support of an init.lua instead of init.vim in vimscript. I've been converting my setup over to Lua and it's so much more understandable and sane vs. some bespoke scripting language that made more sense in 1990.

(it should also be mentioned the old vimscript support isn't going away, you can still use old configs)

comment 5y ago · link · parent

What in the world are you going on about? Drugs can make your immune system's response less severe--this is straight medical fact, look up diphenhydramine (benadryl) or anti-histamines in general.

No where did I say any of these vaccines are 'live' or even attenuated coronavirus. It is 100% impossible to get infected with covid-19 from any of the vaccines. However it is possible to take a drug which lowers your immune system response and you fail to build a strong response to the vaccine and the spike protein RNA or other bits in the vaccine. Hence why I said _talk to your doctor before doing anything like taking aspirin right before the vaccine_.

This site is full of pure lunacy when it comes to any COVID-19 or medical issues. The comments in this thread and many others over the past weeks are just unbelievable low quality. Folks, stay in your lanes with software and startups...

comment 5y ago · link · parent

Talk to your doctor before making decisions. Taking aspirin right before a vaccine might not be a good idea as it can blunt your immune system response, but the whole point of a vaccine is to elicit a strong immune response that builds memory. I know acetaminophen is specifically mentioned as something not to take right before the COVID-19 vaccines (and afterwards, if you can deal with the immune response naturally).

comment 5y ago · link · parent

Is management at Mozilla completely rotten? They've had a couple rounds of big layoffs in the last year. I worry it's turning into a Hunger Games situation there, where every senior level person feels the need to assert their existence or else get the cut. Hopefully someone remembers to fight for the users...

comment 5y ago · link · parent

Add another voice to the I'm using this feature, please don't take away my functionality that costs you nothing to run or maintain.

comment 5y ago · link · parent

It proved Hubble right about the expansion of the universe, so all in all I think we can say with absolute certainty it was a smashing success.

Apparently the total cost for Hubble is on the order of 10 billion. That's just a fraction of what a tech company like Apple makes every quarter, so I think it was a totally reasonable expense relative to its discoveries.

And luckily we learned building giant, precise mirrors with 1980s technology maybe wasn't the best decision. The James Webb design is totally different and hopefully less prone to such problems.

comment 5y ago · link · parent

And Voyager 1 and 2 are still zooming as far away from our solar system as they can get and happily sending back teeny bits of data every now and then. Pretty wild to think their voyages are now over 40 years old.

comment 5y ago · link · parent

If we're lucky the virus mutates into a very transmissible but not very symptomatic or damaging to humans variant. It's speculated that's how the 1918 flu pandemic eventually ended.

comment 5y ago · link · parent

If you're running into containers that are writing logs to files, IMHO that's a code smell and something is off with how they're using containers. Most of the container ecosystem has settled on stdout and stderr as the defacto log locations and then leave it up to the container orchestrator (docker-compose, k8s, etc.) to deal with the log data. There might be some good reasons to use files for logs, but in 2021 they're likely exceptions and not the norm.

comment 5y ago · link · parent

If you're rolling CSS, etc. yourself work through this free resource: https://practicaltypography.com/ You will learn a ton in a short time.

Alternatively grab a design system built by someone who already took care of all the typography decisions.

1
767778
84