HN user

robfig

1,967 karma

[ my public key: https://keybase.io/robfig; my proof: https://keybase.io/robfig/sigs/g9mGTjjKb-jpdl5oFPjHuGZfkPfsJwVoHy2AIXRia5Q ]

Posts60
Comments117
View on HN
connect.build 3y ago

Connect – A Better gRPC

robfig
2pts0
catalyst.rocks 3y ago

Catalyst – Web Component System by GitHub

robfig
5pts1
kittycad.io 3y ago

KittyCAD

robfig
1pts0
grafana.github.io 4y ago

Grizzly: Deploy and Observe as One

robfig
2pts0
github.com 4y ago

Csproto – CrowdStrike's Protocol Buffers Library

robfig
1pts0
www.canarymedia.com 4y ago

Will advanced reactors solve nuclear’s problems?

robfig
2pts0
jvns.ca 4y ago

Linux tracing systems and how they fit together (2017)

robfig
5pts0
jpmens.net 4y ago

Jo – a shell command to create JSON (2016)

robfig
325pts94
github.com 4y ago

Docker for Mac Without Docker Desktop

robfig
307pts188
gokrazy.org 4y ago

Gokrazy – A Native Go Userland

robfig
160pts31
github.com 4y ago

Why Bazel is written in Java

robfig
15pts0
github.com 4y ago

Hello-World.rs

robfig
3pts0
developer.chrome.com 4y ago

Chrome: Record, replay and measure user flows

robfig
1pts0
pop.system76.com 4y ago

Pop OS – System76

robfig
203pts187
subgraph.com 4y ago

Subgraph OS: Adversary resistant computing platform

robfig
23pts9
www.youtube.com 4y ago

Fork Yeah the Rise and Development of Illumos

robfig
2pts0
fly.io 4y ago

The 5-Hour CDN

robfig
417pts85
web.stanford.edu 4y ago

Open Decision-Making (2014)

robfig
139pts37
cacm.acm.org 5y ago

Teaching other teachers how to teach CS better

robfig
156pts87
github.com 5y ago

Rationales for Tools/Tech Migrations

robfig
1pts0
nickcraver.com 5y ago

Stack Overflow: The Architecture – 2016 Edition

robfig
1pts0
paperswelove.org 5y ago

Papers We Love

robfig
4pts0
pkg.go.dev 5y ago

Rf: an experimental refactoring tool for Go

robfig
241pts50
github.com 5y ago

Proposal: Generics: use type sets to remove type keyword in constraints

robfig
4pts0
easyperf.net 5y ago

Performance Optimization Contest

robfig
26pts2
google.aip.dev 5y ago

API Improvement Proposals

robfig
1pts0
engblog.yext.com 5y ago

An improved error-handling package for Go

robfig
1pts0
samharris.org 6y ago

Making Sense – Pull Back from the Brink

robfig
5pts0
www.intelligencesquaredus.org 6y ago

IQ2 Debate – Is Policing Racially Biased?

robfig
1pts0
engblog.yext.com 6y ago

Making of Yext Pages – Technical Architecture

robfig
16pts0

We developed this for Roam (https://ro.am/ [1]). Roam is a virtual office environment for real-time collaboration - audio, video, whiteboards, personal offices, team rooms, theaters and group chat with ML-enabled tools layered on top. It's based on Chromium & WebRTC so that we can ship a cross-platform app (Electron) as well as a nearly-parity Web client with a tiny team.

We've had a good experience with this approach, although it is far from plug-and-play. We do have to identity and patch items in Chromium/WebRTC & the server (Pion) interaction to get our video quality up to compete with Zoom/Teams/Meet. We are able to effectively compare video quality across these providers and expect to reach their video quality with this stack.

Disclaimer: I work on Roam's Chat, AI, and API.

[1] We are currently in closed beta so there's not much there at the moment.

As a millenial with a good chunk of his net worth in property, it seems clear that real estate prices are inflated by the Govt via mortgage rates, and I am super nervous about how this plays out now that they are near zero in conjunction with QE. Nowhere to go but down? Yikes

Most of it doesn't. Take a look at net/http. I'm not aware of anything it does that your package could not. Certainly nothing that would move the needle on succinctness.

I see this argument made pretty frequently, and it might be correct for a team that's just starting out.

But service discovery and zero downtime upgrades are not that hard to implement and maintain. Our company's implementations of those things from 12 years ago have required ~zero maintenance and work completely fine. Sure, it uses Zookeeper which is out of vogue, but that also has been "just working" with very little attention.

A thought experiment where we had instead been running a Kubernetes cluster for 12 years comes out pretty lopsided in favor of the path we took for which one minimizes the effort spent and complexity of the overall system.

I have a similar (but much less severe) situation -- need to change my car registration, but my NY State online account has been locked "for security". Calling the phone number says "please use the online portal", but has an option to continue to wait for an agent. However, there is no queue, just a message that says there are high volumes of calls and try your call again. I called at various times over a couple weeks until giving up and just driving with an incorrect registration. Not ideal, tbh.

And don't get me started on the local USPS.

It seems to me that US politics took a turn for the worse in the past 20 years, and my response has been to disengage. Randomly, I picked up The Politics Industry by Michael Porter and Katherine Gehl, and I found it pretty convincing:

(a) The system of elections and legislation is responsible for the poor outcomes we see. It's not the specific personalities.

(b) That system's rules were written by the Republican and Democratic parties to entrench their power. It is NOT encoded in the constitution or otherwise set in stone. Both parties are winners with the status quo -- they do very well financially by drumming up tribalistic competition instead of cooperation and problem solving.

(c) The result of the current rules is that a politician's ONLY job is to appeal to primary voters, which is why they take an ideologic or hard line stance. "Reaching across the aisle" results in a primary challenger that costs them their job.

As an "average voter" that thinks the best route is probably somewhere in the middle (the world is complicated, and government is neither omnipotent nor impotent), me and everyone like me are not represented.

They present a surprisingly straightforward remedy:

(1) Adopt non-partisan primaries with Final Five ballots, which a couple states have already passed variants of (Final Four just passed in Alaska!)

(2) Ranked choice voting to remove the Spoiler reason ("don't throw your vote away") that keeps independents or third parties out.

I came away optimistic about the future. Highly recommended!

Here's their site if you'd like to learn more: https://gehlporter.com/

UPX compresses the binary and introduces a decompression step on startup, so you run exactly the input binary

Stripped means that the compiler does not include debug symbols.

They are completely different - you can use either or both.

It's hard to square these articles with the reality I see on the ground: our baseline memory usage for common types of Java service is 1 GB, vs 50 MB for Go. We do have a few mammoth servers at the top end in both languages though (e.g. 75 GB heaps)

The deploy JARs have 100+ MB of class files, so perhaps it's a function of all the dependencies that you "need" for an enterprise Java program and not something more fundamental.

These blog posts also present AOT as if its just another option you can toggle, while my impression is that it's incompatible with common Java libraries and requires swapping / maintaining a parallel compiler in the build toolchain, configuring separate rules to build it AOT, etc. I don't have actual experience with it though so I could be missing something.

One thing I omitted in the response which might be relevant is that usually you can only use one version of a package in any given build[1], so you have to use a version that works for everything that depends on it.

I think that might be a difference for folks coming from other ecosystems.

[1] The asterisk is that you can have multiple major versions coexist using Go modules, or you can use gopkg.in import paths, or some other workarounds, but in my experience that is not common and typically you do have to find a single version that works for your whole program.

Code duplication

It can be easier to maintain a small amount of code that you duplicate and check in and is purpose-built to your use case and treat as your own, compared to a general library imported for one routine that you have to think about (licensing, upgrading, auditing). Or sometimes libraries break backwards compatibility to add features you aren't interested in, and it makes busy work to stay up to date.

Is there no package pinning solution?

Multiple dependency managers have supported pinning since at least 5 years ago e.g. glock, dep, glide. Go Modules supports pinning.

Pinning is the solution for avoiding breakage due to dependencies

Related to the first point, in general you have to do work to upgrade your dependencies. If not because you care about bug / security fixes that happen, then because you use ANOTHER library that has the same dependency, and that other library uses a feature only present in a newer version. Any time you upgrade a library it takes work to verify nothing has broken, and potentially work to fix things that do break.

I thought Docker builds are not generally repeatable, since they often `apt-get update && apt-get install`, which depends on the current state of external package management?

They are definitely not reproducible in the sense of building bit-for-bit identical containers, unless you use Bazel.

That being said, I've found Dockerfiles to be a much more reliable build process than most others (recently struggled to get through LogDevice's cmake-based build.. ugh).

Terraform 0.12 7 years ago

Your favorite tool that produces json should be able to work. I'd probably use jsonnet, which has a multi-file mode so that one template file can render into many json files.

Terraform 0.12 7 years ago

Question that's been bugging me and I haven't quite wrapped my head around --

For light usage, I find managing Terraform's state to be a significant hurdle. You basically have no choice but to set up secure remote storage unless you want to check passwords into source control. In contrast `kubectl apply` is so easy to use since it's stateless. It just creates or updates any resources provided, and it even supports --prune if you want the set of configuration to be treated as comprehensive.

It seems like the main things that Terraform adds:

1. The ability to work with providers that require you to store their generated IDs to reference later. With kubernetes, the kind and name of the resource is enough to identify it; it does get assigned a UID, but you don't have to include that in the configuration since keys that are excluded are left as-is.

2. The ability to work with multiple different providers. I'm not sure how often you do have a single terraform project(is that the term?) with more than one provider, but I guess using the same set of tools, even if the configuration is provider-dependent, is nice.

Is that accurate? Does Terraform offer any other advantages?

If you were building a configuration mechanism for your system from scratch to allow your users to configure it as code, would you make .a Terraform provider over a command line tool that can apply [--prune] that same configuration?

At work we have a monolithic repo containing Java, Go, Python, etc, organized like this:

  Java //src/com/yext/..     
  Go   //gocode/src/yext/...
GOPATH is set //gocode. .gitignore allows us to track only our code under the GOPATH using this snippet:
  /gocode/bin/
  /gocode/pkg/
  /gocode/src/*/
  !/gocode/src/yext/
We use glock[1] to sync dependencies across the team, without having to check them in.

The whole thing works very well at 50 developers and ~100 dependencies.

[1] https://github.com/robfig/glock

Rust and Go 12 years ago

According to the announcement [1], gorename is able to rename just about any identifier (function, method, exported variable, local variable) throughout your entire GOPATH, not just a file. I tried it out and it seemed to work fine. Additionally, it seems to detect at least some cases where the rename would cause the resulting code to not work, although you can -force it to apply the changes anyway.

I happen to agree that Go could use more refactoring tools, but I think it's in good shape considering how young it is.

[1] https://groups.google.com/forum/#!topic/golang-nuts/96hGPXYf...

Impending kOS 12 years ago

So K is a general purpose programming language? If the claims are true, why don't they submit some entries to the Computer Language Benchmarks Game?

That's a graph from webmaster tools. It may be that the Google Bot is hitting some pathological case with the Django (e.g. server-side sessions) or Disqus. I don't think he ever tested the latency directly.

Is this true?

I'm not sure about C, but it's definitely the case that Go compiles magnitudes faster than C++, for any reasonable sized project. For example, the ~200k lines of Go standard library compiles in about 14 seconds on my workstation, while random C++ libraries frequently take much longer (just my anecdotal impression from waiting on "brew install").

How about "Right tool for the job"?

I think using carousels for content that is non-essential but that the user may want to see more of is fine. For example, photos -- some users are happy with 1 photo, and some want to see them all.

This is a straw man that demonstrates hiding the main content behind a carousel is bad.

Are you suggesting that the design would be better if instead Controller was an interface?

I agree that it seems enticing, for exactly the reason you mention. However, I think the interface solution would require setters and getters for every single field, which seems much worse to me.

Here's a big one: you can write your routines in a completely synchronous, blocking style. The Go runtime automatically async-izes that for you.

This is like getting the benefit of an evented system without paying the cost of structuring your code with callbacks (or other workaround).

I agree 100% that the current ORM situation is early. The existing ones [1] are already very useful for simple mapping from result set to structs, and they are still under development.

Out of curiosity, what ORM do you particularly like?

My ORM experience is mostly Hibernate and some Django, and I think that they are both too advanced -- I ended up with a deeper understanding of Hibernate than I would care to admit, but it is really a minefield for developers.

It seems to me that the sweet spot is between Gorp and Hibernate -- the ORM should be able to load collection-valued properties on my struct, but it doesn't need to have programmatic query builders, a session cache, etc. I would prefer to write plain SQL, and treat the ORM as a way to map the result set into Go (with sugar for common cases like FindById and FindAll).

[1] Gorp, Jet, QBS

===

On the topic of tight integration with ORM -- I was hoping to understand what kind of integration you had in mind?

For example, I used my own ORM on top of Play 1.x, and it didn't feel any different than using Django ORM, after adding a Play Plugin that started / committed / rolled back transactions for me.

Is that the extent of integration that you meant?

===

I'll reply to the "Why not vanilla Go" question in a separate comment, since it is raised a number of times.

Author here, to provide a bit of context.

Initially, this was just a fun project to see if I could replicate the magical Play! 1.x experience in much-less-magical Go. (Spoiler alert: yes)

Along the way, I started thinking more seriously about the right way to put together web applications and did more research into how Rails and Play 2.x are structured. Although Play 1.x was amazing, I think that there are some obvious areas for improvement -- the design of 2.x seems to be much better (although I'm personally allergic to Scala).

So the goal posts have shifted. I see this ending up as two things, conceptually:

1. A framework like Rack, in the sense of being a straightforward interface for writing and composing aspects of web applications. (Revel calls them Filters). Some components (Router, TemplateLoader) have defined interfaces so that other components can use them (but most components do not).

2. A default stack of components that work well together out of the box. No size fits all, but the two concrete use cases I have in mind are writing large business applications and REST APIs.

The goal is that the revel package shrinks to encompass just the "Rack"-like framework, and the revel command line tool can generate a project with the default components set up.

This appears to be achievable; it just requires a bit of work, and I have been quite busy with the day job. More people are using it than I anticipated, so I would like to complete the core design so that it can be properly released.

=====

APPENDIX (EDIT)

FAQ: "Why not just use vanilla Go, since it already provides X, Y, and Z":

Go certainly ships with more components in place than any language I'm aware of, but I still think there is a lot of value in providing a default stack of stuff with a fixed, conventional app organization in terms of lowering the cognitive load bar.

If you are making a single endpoint and are a Golang whiz, then Revel is not for you. But for many things it's about the concepts more than the code. For example, the code dealing with the flash cookie is not many lines; most of the value there is having it integrated, documented, and exampled. Empirically, I believe that Rails unlocked a latent desire for web development by lower the bar -- I think Revel can lower the bar for web development with Go in the same way.

Lastly, there is something to be said for having an integrated web framework instead of a franken-app composed of various libraries. Take parsing parameters as an example. With a library, how can you get close to the ease that Revel provides? [1]

You may think it's dumb, but I find it so much nicer to simply accept parameters as the type that I want them in, and let Revel figure it out instead of me having to figure out the right strconv / etc function to call. The goal is for Revel to take care of all that stuff and let me focus on the higher level stuff.

[1] http://robfig.github.io/revel/manual/binding.html#action_arg...

That's coming from Google, who makes money off page views. Amazon has a different model, so I could believe the latency sensitivity of its business is different.