HNHacker News
TopNewBestAskShowJobs

zalmoxes

1,251 karma · joined January 9, 2014

I write everything with Go, and learning Elm. https://groob.io/
submissionscomments
zalmoxes··on Let’s Encrypt, OAuth 2, and Kubernetes Ingress
That's cool, I've done pretty much the same thing for our internal services. I noticed you use the github org for oauth2proxy.

In our setup, I wanted to add authentication to a few dozen sub domains, but use a single oauth2proxy instance. Github Oauth makes this kind of gross, the callback must point to the same subdomain you're trying to authenticate. But it does allow something like /oauth2/callback/route.to.this.instead

In the end, to achieve what I wanted (a single oauth2proxy for multiple internal services) I had to - fork oauth2proxy and make a few small changes to the redirect-url implementation - create a small service with takes oauth.acme.co/oauth2/callback/subdomain.acme.co and redirects to subdomain.acme.co to comply with GitHub' oauth requirements - created a small reverse proxy in Go which does something similar to nginx_auth_request. I had a few specific reasons to do this (like proxying websockets and supporting JWT directly) https://gist.github.com/groob/ea563ea1f3092449cd75eeb78213cd...

I hope that someone ends up writing a k8s ingress controller specific to this use case.

zalmoxes··on Upspin – Another option for file sharing
I'm excited to see what kind of discussion comes up around this codebase.

It's worth noting /u/eneff's comment about the initial code though: https://twitter.com/enneff/status/834167073508978689

zalmoxes··on DigitalOcean introduces Load Balancers
I don't know if DO plans to provide a managed Kubernetes offering similar to GKE, but if they did I would use it.

having a Load Balancer is necessary to integrate with k8s similarly to GCLB and aws, so this is a step in the right direction.

zalmoxes··on Monitor web page changes with Go
html.Parse takes a io.Reader https://github.com/golang/net/blob/master/html/parse.go#L201...

an http Response.Body is a io.ReadCloser so you can pass it directly with `html.Parse(response.Body)`

But don't forget to defer io.Close the body.

zalmoxes··on The State of Go
There's a worldwide Go 1.8 Release Party on Feb 16th. If you're interested in Go, or want to discuss changes in 1.8, find a meetup near you.

https://github.com/golang/go/wiki/Go-1.8-Release-Party

zalmoxes··on Ask HN: Docker, Kubernetes, Openshift, etc – how do you deploy your products?
Yes, out of all solutions I'm most excited about GitlabCI and Drone.io

I've worked with a self hosted Gitlab instance before and that was nice, but I'm not quite sure how well the Gitlab CI would integrate when the code is on github.

zalmoxes··on Ask HN: Docker, Kubernetes, Openshift, etc – how do you deploy your products?
I recently(past 6 months) joined a new startup as the operations person, and we standardized on kubernetes for deployment. In the past I've worked with puppet/chef/ansible/heroku/aws/appengine/vmware you name it, and Kubernetes is the nicest and most flexible platform to build on top.

There's a learning curve, and new features are being added, but at this point I would not hesitate to recommend Kubernetes to just about anyone.

CI: We standardize on CircleCI and it gets the job done, but has some serious shortcomings. I've also come close to building my own on top of the k8s cluster and it's not the correct time investment for me right now, but I'd consider building my own in the future. I've yet to find a CI framework I really like.

zalmoxes··on Hitless TLS Certificate Rotation in Go
Nice writeup!

I wish there was a CA out there that could let you requests new certs more frequently.

Yes there's Let's Encrypt, which is amazing and works great but the ratelimits[1] really kill you if you're not careful. I've had a few issues where I've triggered the LE ratelimit with a production domain and got locked out of making new certs for a whole week. I would gladly pay for an ACME CA which does not enforce these ratelimits.

[1] https://letsencrypt.org/docs/rate-limits/

zalmoxes··on Go and Dogma
For context here is the author discussing Generics & Go:

https://research.swtch.com/generic https://news.ycombinator.com/item?id=9622417

zalmoxes··on Go Proposal: Accept GitHub PRs
The new github workflow is an improvement, but still has a lot of things which need to be better design/implementation.

I regularly collaborate on github with people who are familiar with either Gerrit or Phabricator, and I've yet to see someone praise github for having a better workflow. Much of what they announced recently feels like alpha quality/playing catch up.

zalmoxes··on Ask HN: What web framework do you use? Why did you choose it?
I write in Go, and use the following libs:

net/http: The stdlib package is robust and I find myself productive working with the provided APIs. gorilla/mux router instead of the default servemux.

I use go-kit https://gokit.io/examples/stringsvc.html for most production apps I write. I use go-kit because it provides a clean separation of decode/encode logic from the actual business logic of my application and includes some great packages for instrumentation, logging rate-limiting and bunch of other concerns.

On the frontend side, I prefer to write clients in Elm.

zalmoxes··on QuickCheck: A Lightweight Tool for Random Testing of Haskell Programs (2000) [pdf]
Go also has a version of this in the stdlib https://golang.org/pkg/testing/quick/
zalmoxes··on Version SAT
Relevant: Russ Cox, the blog author is one of the core members of the Go team. Russ gave a great talk on challenges with code refactoring at GothamGo last month: - writeup https://talks.golang.org/2016/refactor.article - video https://www.youtube.com/watch?v=h6Cw9iCDVcU

A group of community members have been working on a proposal for a package manager for Go. Sam Boyer also wrote an article about their progress here: https://blog.gopheracademy.com/advent-2016/saga-go-dependenc...

zalmoxes··on Gongular – A new web framework for Go
I'm sorry, but does anyone even glance at the source of these frameworks before they're upvoted?
zalmoxes··on Talk: Codebase Refactoring in Go (by Russ Cox)
Article: https://talks.golang.org/2016/refactor.article … Video: https://www.youtube.com/watch?v=h6Cw9iCDVcU&list=PLeGxIOPLk9... … Bug: https://golang.org/issue/18130
zalmoxes··on Go 1.8 toolchain improvements
No, the language got "faster" over the last 18 months. This graph is about compilation speed. Everyone in the Go community wants faster compilation times, hence why Dave is tracking these with every release.
zalmoxes··on M(DM)acOS
Someone is also working on an alternative to Apple Configurator(which is already nicer than the original) https://github.com/erikberglund/ProfileCreator
zalmoxes··on M(DM)acOS
You need to be an enterprise Dev and get a special APNS cert from apple. (It only costs $300/year, which any company should afford). MDM certs are still a pain, and it's hard to get involved with the project if you don't have one. Luckily, if you install Server.app from the App store and enables Device management, Apple issues you a push cert you can use. You just have to export it from Keychain access as a .p12 file.
zalmoxes··on M(DM)acOS
Not all, but most MDM Commands in the spec are already supported. You can see all the supported commands you can issue to devices here https://github.com/micromdm/mdm/blob/master/command.go#L233

There's a lot of work that needs to be done for micromdm to be a usable replacement in the enterprise though. Right now it's still a experiment -- the focus(at least for me) is to try to create a tool which is extensible(API driven) and one that will be acceptable in environments where people today use configuration management everyday.

zalmoxes··on M(DM)acOS
A few of us are working on a open source alternative to Mobile Device Management vendors.

https://github.com/micromdm https://micromdm.io/community/

Also, Apple has finally released the protocol, which previously was behind the Enterprise Developer portal.

https://developer.apple.com/library/content/documentation/Mi...

zalmoxes··on Debugging with Elm 0.18
That's been gone for a while.
zalmoxes··on Debugging with Elm 0.18
Right, I know how to get around this issue when I need to. My point was that the library makes a default assumption which is often enough false. And then I have to change things.

Compare this to Go, or even Fetch. You send a request, and you get back a response, with a Body, Headers and Status. A language error type is only expected in case of the request not succeeding, like a timeout. Here, the library makes 2 assumptions. That a non-200 status is an Error, and that the response is a String. These assumptions would be ok in a higher level library someone wanted to build, but as part of a core, they're too high level to work for everyone with the defaults.

zalmoxes··on Debugging with Elm 0.18
I've updated a few of my projects to 0.18 over the last couple weeks. The new HTTP library is much better than the one before. Working with Authentication Tokens, decoding errors etc is much easier now.

I also welcome the continuous work to remove things which are difficult for beginners and make code less readable, like the backtick syntax and the prime notation. I mostly work with backend code, and I wanted to learn some JS but found the ecosystem hard to swallow. Elm offers a very practical, and quick to get started experience for writing reliable frontend. For a quick win with UI work, also check out the Elm-MDL library. https://debois.github.io/elm-mdl/

---

Coincidentally, I was watching MPJ's FunFunFunction today, where he talks about JS libraries that coerce HTTP statuses into JS errors, and he managed to articulate some of my frustrations with elm-lang/http. The library tries to be helpful by returning a `BadStatus (Response String)` error if the status is not a 20x code. An error is what I want sometimes, but far from always. The result is also a string, while most of the API's I interact with return JSON for errors.

https://www.youtube.com/watch?v=gRsyY0kzXfw&feature=youtu.be...

zalmoxes··on Announcing Rust 1.13
The difference is that if I thought the Go style is easier to read/debug I couldn't prevent you from writing it in the complex one-liner way.

The go way is a little more verbose/uglier but we are both going to do it in the same way as will the 30 other developers working on the project.

zalmoxes··on Announcing Rust 1.13
As a Go developer, I'm curious how is the error handled when foo() or bar() fail? Could you show an example where `bar()` returns a re-triable error or a fatal error etc? something where I have to make a decision other than returning it up the call stack?.
zalmoxes··on Seven years of Go
If you're serious about learning Go and get stuck with your learning project, or with any of the resources already mentioned, don't hesitate to join the Go Slack. We have a #golang-newbies channel where you can ask all your beginner questions, and other channels like `#reviews` where you can ask for code review.

https://invite.slack.golangbridge.org/

zalmoxes··on A small dive into, and rejection of, Elm
Select example: https://gist.github.com/jinjor/bf37f10713028a1d9ef547724bcf5... Different Select Example: https://gist.github.com/manuscrypt/0dac581c25101526e2398228c...

Searching elm-discuss for <2 minutes.

zalmoxes··on Ask HN: Overwhelmed with learning front-end, how do I proceed?
I second this suggestion. I'm a backend developer(barely, mostly a sysadmin who happens to write Go backends for various reasons). I wanted to learn some frontend because I wanted to make some internal pages for my users. I tried React, but found the API surface I needed to learn to be productive overwhelming.

I tried Elm on a whim, and found it very focused on being productive. Functional programming was very new to me, but I spent a weekend with https://pragmaticstudio.com/courses/elm and it was enough to get me started.

The Elm Guide(http://guide.elm-lang.org/) and Elm Slack http://elmlang.herokuapp.com/ are both fantastic resources for learning the language.

zalmoxes··on Disney Open Source
FYI, a large number of enterprise orgs and Edus use Munki and Reposado to manage Macs. Among these: Google(their fork is called Simian: https://github.com/google/simian) and Facebook.

Not only is Munki used across a large number of organizations, it also happens to arguable be the best current software management tool for Macs.

Another project maintained by the same group of MacAdmins is AutoPKG https://github.com/autopkg/autopkg

zalmoxes··on macOS Sierra Stores and Syncs SSH Passphrases to iCloud
Passphrases are stored by default, and if you enable iCloud Keychain, they're also synced.
← PreviousPage 2 of 4Next →