HNHacker News
TopNewBestAskShowJobs

eric_bullington

1,433 karma · joined February 1, 2012

email = "".join(["eric", "@", "eric", "bullington", ".com"])

www.ericbullington.com

[ my public key: https://keybase.io/esbullington; my proof: https://keybase.io/esbullington/sigs/uogXrtJClPOujLreeG3Cp9wulxr3GSsdAoA2Glb-YzY ]

submissionscomments
eric_bullington··on What would have happened if the Normans had lost the Battle of Hastings?
> IIRC those words were not yet French; it always gets a bit confused with languages when we're referring back like this IMO.

They were Norman French, or just "Norman" is you insist, which was one of the Oïl languages (and as such, closely related to modern French).

The written form of the language, at least, is mostly mutually comprehensible with modern French.

Also, the Normans were culturally and linguistically akin to the modern French to a much greater extent that the Anglo-Saxon inhabitants of England whom they conquered were akin to the modern English, even if the Normans' heritage was Scandinavian.

*studied historical Romance linguistics in university.

eric_bullington··on Doudou Linux – For children from 2 to 12 years old
My kids used Sugar as their primary OS until they were about 4/6 respectively. It was great, and they really got a lot of enjoyment out of the games.

When they reached elementary age, I then moved them to Ubuntu, which they happily use now to play online games, do their homework, etc.

eric_bullington··on I'm choosing euthanasia etd 1pm. I have no last words.
Well done, Pieter. Thank you for your excellent writings and ground-breaking open source work, and for sharing your humanity. Farewell.
eric_bullington··on KrebsOnSecurity is now up and hosted on Google Cloud
This is the first I've heard of Google's Project Shield. Very cool project, is it relatively new? Does anyone know if this was the result of someone's 20% time or a top-down Google initiative?
eric_bullington··on Put Yourself on Internet with Jekyll, GitHub and Cloudflare
Nunjucks is an excellent JS template engine for this kind of work, since it permits template inheritance. It's quite similar to Jinja in Python, if you're familiar with it.

Other options would be Middleman or Metalsmith. I've used both of them successfully for relatively complex static sites. But I wouldn't call them simpler than Jekyll.

eric_bullington··on Ask HN: Stripe for 10k plus transactions?
Yes, this is an excellent point. And if you run into problems, work directly with Accounts Payable, not through your company contact, if at all possible.

Better yet, do as the parent comment recommends and try to make a contact with Accounts Payable to begin with (although that's not always possible, depends on company).

eric_bullington··on Pre-auth Remote Code Execution Vulnerability in Metasploit
So it's a metametasploit?
eric_bullington··on Ask HN: Stripe for 10k plus transactions?
> What are the most common ways to collect big, yearly contracts?

Yep, at least in the US, paper checks for some (still!) and wire transfer for others. You send them an invoice, and they send you an (actual, paper) check or make a wire payment to the account number you put in the invoice. Both should be pretty much free, if you have a decent bank (although some banks will charge a few dollars now for incoming domestic wire transfers).

I think for a yearly charge of $10,000+, it's probably worth the pain in the ass factor to invoice the charge, particularly given how much you'll save (about $300 if you use Stripe, more for others, assuming 10,000 charge). Most banks have banking apps now that let you cash checks using the app, so if you really get going with 10,000 checks flowing in by the batch, you can hire some one to help deposit them via app or dropping them by a bank branch. Not a bad problem to have, if it happens.

Just realize that most companies operate on 60 or 90 day terms, and some even more. You can often negotiate for 30-day terms if they really like you/your product and you're firm about it. Just be sure you factor this into your cash flow. And have a process in place for what to do if you don't receive payment by then.

Actually, regarding Stripe, and I may be wrong about this, but I don't think most companies will let you set up a recurrent yearly credit card payment of 10,000 dollars, at least not without going high up the corporate food chain. If that's the case, you'd need to break it into a monthly charge to go the Stripe option.

eric_bullington··on Music theory for nerds
Solfege/solfège is still used prominently in France, or at least it was ~25 years ago. I took music lessons when I lived in France as a teenager. My piano instructor was very confused by the fact that I spoke good French, was at a solid intermediate level at the piano, and yet I could not at all follow his solfège commands (like you say, I had only used numeric intervals back home, although teachers usually called the note by its alphabetic name, like most here I think).

I tried reviewing in my head each week before class what I remembered from the Sound of Music, but made the mistake of thinking that Do-Re-Mi etc. was a static C-D-E instead of realizing that my music instructor was simply describing intervals depending on the key we were in.

In the present day, I would just look it up online, but back in 1991, in a small city in northern France, I didn't have that privilege. It took me several months of twice-weekly instruction before I finally figured out that he was using solfège for intervals, I'm embarrassed to say (to my instructor's frustration and confusion). I'm wincing even now when I think of it.

I asked around at the time and was told it was pretty universal to use solfège there.

I do think using solfège to indicate notes is a much better system for students, since it emphasizes the importance of intervals and keys. It's probably harder at the beginning that just learning static A-B-etc., but worth it.

eric_bullington··on P4: a high-level language for programming protocol-independent packet processors
Just to be clear, p4 isn't actually a network protocol. It's a programming language, a DSL for programming network protocols. Small but significant difference between the two. But you're correct that it will require native support among router/switch vendors to be worth using.

Actually, p4 is aimed a solving a lot of the problems with OpenFlow that led to the situation you describe: incomplete support by vendors of all the different versions of OpenFlow. That's because each individual network protocol supported had to be written into the OpenFlow spec, thus the proliferation of versions. Whereas with p4, the vendors basically just provide a hardware runtime for the p4 language, and you install whichever protocols you wish to support (or write it yourself, if it's custom or new). It also has the potential to work very well with a scaled-down version of OpenFlow.

I'm not an SDN expert and am probably not doing justice to p4 with my description above, but it is important to realize this isn't just another network protocol. It would be like describing the Python or JS as just another program (the interpreter), and not as a program capable of running other programs.

eric_bullington··on P4: a high-level language for programming protocol-independent packet processors
Well, I switched to Lua because Snabb apps are built in Lua, and because the Snabb toolkit will ideally provide a lot of functionality for the runtime that I won't have to build myself. And Snabb is really quite impressive in itself.

That said, Elixir is an awesome language, and lovely to write lexer/parsers in. I took me only a few hours to build a functioning parser in Elixir, compared to several days to build one in Lua.

The p4 parser/lexer in Lua is here: https://github.com/esbullington/snabbp4

Next step would be to generate the parse graph.

eric_bullington··on P4: a high-level language for programming protocol-independent packet processors
It's pretty cool. I built a lexer/parser for the p4 language in Lua, with the intention of then building a "runtime" for it out of the Snabb networking toolkit (amusingly, I also finished most of a p4 lexer/parser in Elixir before switching to Lua).

I don't think be able to build a full p4 implementation with Snabb running as a substrate (although it's been 6 months since I last worked on it, and am blanking at the moment why not), but I think it could get pretty close. But it will be a ton of work if I get around to it, plus I don't have much experience doing networking programming at this low of a level. I got a bit distracted with work and other obligations, but I hope to pick it back up soon, particularly if p4 is finally starting to get some well-deserved attention.

p4 is an awesome idea, and solves a lot of the problems OpenFlow was running into with having to constantly update the spec for new network protocols. With p4, that's just a software update, not a protocol update. It has some other neat features as well, but unfortunately it doesn't seem as though p4 has yet caught on like OpenFlow did, even though it has many of the same people behind it as OpenFlow.

Some of the cool things that people have done with p4:

https://2016p4workshop.sched.org/info

eric_bullington··on Announcing BuckleScript 1.0
> We'll be publishing the React.js binding on HN in a few days.

Sounds great. Will this be announced on any email list I could subscribe to? Thanks!

eric_bullington··on Make Dope Beats with ReactJS
> I get that this is a for fun project it seems, just seems a little low on the practical scale for an artist.

It's a very new project, I believe. Seeing what this group has accomplished with the Victory React dataviz library, I wouldn't discount it yet. I'll be very interested to see what they put together. Or it may just remain a fun side project. Either way, cool to play with!

eric_bullington··on Make Dope Beats with ReactJS
While you check out this very cool repo on Formidable's Github, if you're interested in React and/or data visualization, be sure to also check out their Victory React dataviz project, and accompanying charts library.

Victory is somewhat similar to what we discussed putting together as the underlying React-based dataviz library for our react-d3 chart library, except they seem to be figuring out a nice animation API where we struggled.

I ended up burning out from (both paid and open source) overwork last year, and never got my (very basic) dataviz library code out the door, but I'm incredibly impressed with the comprehensive library Formidable has come up with[0], with lots more to come it would appear. I'm easing back into open source work now, but it's pretty clear there's no longer a need for a good low-level, React-based dataviz library.

If you're looking for an interesting new dataviz library to check out, take a look at Victory.

0. https://formidable.com/open-source/victory/

eric_bullington··on Setup Keybase.io, GPG and Git to sign commits on GitHub
Invites:

https://keybase.io/inv/4c100c57c9

https://keybase.io/inv/89cb21a5a6

eric_bullington··on From Linear Models to Machine Learning (draft) [pdf]
Did you look in statsmodels? I appreciate the suggestions, and for a moment I was hopeful about the need for survival analysis models, but it looks like both that and GLM are well-covered in the latest version of statsmodels (don't be misled by the old sourceforge site, there's been a huge flurry of recent activity in statsmodels, hundreds of new PRs merged, look at Github and the docs site linked from that repo: http://www.statsmodels.org/stable/).

There's even a Jupyter notebook comparing the R, Stata (that takes me back, used Stata in survival analysis class 10 years ago), and Python versions of proportional hazards regression: http://nbviewer.jupyter.org/urls/umich.box.com/shared/static...

eric_bullington··on From Linear Models to Machine Learning (draft) [pdf]
Thanks for the suggestions, I appreciate it. Alas, at the least, there are Python implementations of all those between scikit-learn and this project: https://github.com/selective-inference/Python-software. statsmodels has GLM capabilities, and there are even Python bindings for R's glmnet FORTRAN library.

I'm not sure how well those compare to the R implementations, but they look well-built at first glance.

Any other ideas out there?

eric_bullington··on From Linear Models to Machine Learning (draft) [pdf]
> R in some cases still has the best machine learning librari

Would you mind naming some specific machine learning techniques that are still better in R? I've been studying machine learning and linear algebra the past few months, and I'd love to have a try at implementing one myself in Python, as a learning exercise.

eric_bullington··on High Performance Browser Networking
This is a must-read for any web developer, frontend, or backend, or full-stack. It's short enough to be a fun read, but detailed enough to convey the most important browser networking facts.

If you can, buy a hard copy to keep as a reference. I have referred back to mine regularly (and will surely refer back to it in the future, likely next time I have to do something serious with websockets). It's fairly neatly organized by protocol, so if you just need a quick review of HTTP2 (for example), you can skip to that section and read it in isolation.

I highly, highly recommend.

eric_bullington··on Removing Python's GIL: The Gilectomy [video]
> In case there is interest for this I might actually get around doing that for once.

Yes, I'm very interested in your thoughts on this, particularly wrt interpreter design.

eric_bullington··on The Immutability of Math and How Almost Everything Else Will Pass
> functional programming (from the mathematical side it corresponds to various lambda calculi)

And category theory, in the case of Haskell. (and yes, to work with Haskell at a basic level, category theory isn't required. But as someone who is learning the basics of category theory, it sure helps understand the "why" behind a lot of things if you move to a more advanced level.)

eric_bullington··on Ask HN: Languages for safety-critical embedded work?
Ada. I personally lean more and more toward functional languages these days, but despite that, I'm incredibly impressed with modern Ada. Particularly the Spark subset of Ada, which is perhaps the best-thought out, more coherent, most secure language around for general programming. It's the epitome of a well-engineered project, with excellent tooling, and formal verification options to boot. If I had to build something safety critical, I wouldn't hesitate to choose Ada.

And it looks like some folks have already been using Ada on the ESP8266, here are instructions: https://github.com/RREE/esp8266-ada/wiki/Steps-for-building-...

eric_bullington··on Show HN: Hindley-Milner Type Inference Algorithm in OCaml
Check out RAML: https://github.com/raml-org/raml-spec Maybe it will fit the bill? It can even encode sum types. But I'm not sure if that's what you're looking for.

I'll ping you when I put my mini-ml in Python on Github.

eric_bullington··on Show HN: Hindley-Milner Type Inference Algorithm in OCaml
> I would like to see -- hint, I'm probably going to have to get my hands dirty! -- an implementation in either a dynamically typed language like Ruby/Python/Perl/PHP/Javascript/… or a non-functional language like C/C++/Obj-C/…

I understand where you're coming from. I'm working on a mini-ML in Python as a learning exercise for myself and possibly as a tutorial for others; will open source it soon.

As such, I've come across a few good resources:

check out Robert Small's Hindley-Milner in Python[0], as well as alehander42's Hermetic language in Python[1].

I also just found out about Hask, an implementation of many Haskell language features in Python. Looking at the source code, it's well-commented and clear, so I suspect I'll learn a lot from it as well [2].

Finally, even though it's not in a dynamic or non-functional language like you request, I highly recommend Andrej Bauer's Programming Language Zoo[3], which contains very simple and easy-to-understand implementations of various type systems in OCaml. Very elucidating.

0. http://smallshire.org.uk/sufficientlysmall/2010/04/11/a-hind...

1. https://github.com/alehander42/hermetic

2. https://github.com/billpmurphy/hask

3. http://andrej.com/plzoo/

Edit: Oh, and one more resource that's been extremely helpful has been "Introduction to Functional Programming through Lambda Calculus" by Michaelson. Well worth the cost of the book.

eric_bullington··on Show HN: Hindley-Milner Type Inference Algorithm in OCaml
> Would you be interested in something along those lines?

Yes! That would be very cool to read.

I've been working on an implementation of Mini-ML in Python using Robert Small's Hindley-Milner in Python [0] (and also eagerly awaiting the rest of Diehl's series on writing a Haskell).

I understand the fundamentals of the algorithm, but even now I don't think I could yet implement it from scratch. I'd love to read a detailed tutorial.

By the way, those Cornell lecture notes you referenced have also been very helpful to me.

0. http://smallshire.org.uk/sufficientlysmall/2010/04/11/a-hind...

eric_bullington··on A Protocol for Dying
> My best lesson I learned on programming from Pieter was to use code generators effectively.

Likely among other places, Pieter discusses code generators here: http://download.imatix.com/mop/introduction.html

> Thank you Pieter, you will be missed.

Agreed. I posted my thoughts on his blog, although the hundreds of comments on this page will also stand as a testament to Pieter's work and the lives that he touched.

eric_bullington··on React/Redux Links: a curated list of tutorials for React, Redux, ES6, and more
> Give it a try some time!

If you mean give TypeScript a try, I have! In production. And it was very solid. I haven't yet tried the JSX tooling, since that's a somewhat recent development and predates my last serious use of TypeScript.

> I also wouldn't say TypeScript strives to focus on OO features

Every single tutorial and howto I've ever read for TypeScript, official or otherwise, has emphasized the OO capabilities of TypeScript. And for good reason, TypeScript adds multiple OO features, and features associated with OO languages like Java and C#. I've heard more than one C# dev say that it feels almost like programming in C#. So I don't think I'm off base here.

That said, it's great that you're looking to emphasize your support for more traditional/idiomatic JS as well, as well as your support for React. (and I admit I'm surprised you don't use any classes in the compiler. Every TypeScript project of significant size I've ever seen uses lots of OOP. But I'm sure you're aware of many that don't.)

I do wish that TypeScript had disjoint union/sum types like Flow does, but I just checked and it looks like you might be seriously considering it! That's great.

Actually, it looks like you're getting closer to the behavior I'd like with your recent string literal type PR. If you add some nice to use type guards, I could program in TypeScript in somewhat approximating the style I've come to love with Rust/Ocaml/Elm/Scala.

There's no way you could encode exhaustivity checks to that, is there? I'm pretty sure that would require true disjoint unions, right?

In any case, I'll have to take another look at TypeScript, I'm glad to see you're pushing things forward. I'll keep my fingers crossed that you'll end up adding disjoint unions as well.

eric_bullington··on React/Redux Links: a curated list of tutorials for React, Redux, ES6, and more
TypeScript is fairly mature and conservative, whereas Flow has some reasonably innovative and bold (for JavaScript!) features.

I'd say go with TypeScript if you're looking for a type system closer to C# or Java (including extensive OOP features), and go with Flow if you're looking for a type system closer to F# or Scala (including things like type inference and disjoint unions), although Flow supports ES6 classes, too. In my opinion, the Flow approach is a more natural fit for JavaScript.

That's not to say that either project can actually achieve the coherence and completeness of any language designed to be statically-typed from the start, but those are kind of the the type system ideals that each project seems to lean toward.

Also, Flow is fully integrated into the React ecosystem, since it's built by Facebook. TypeScript can work with React, too, but TypeScript also tries to give first-class support to many other frameworks.

TypeScript is undoubtedly the more mature of the two projects (Flow is much newer), but I'm very happy that both exist since they're taking pretty difference approaches to the "JS problem".

eric_bullington··on Algebrite, a computer algebra system in JavaScript
There is a boxed 32-bit signed integer type in JavaScript, which can be instantiated by postfixing `| 0` to a number literal or variable of type number. You can also then convert numbers to an unsigned 32-bit integer by postfixing `>>>0`.

But yeah, for normal numeric operations, the default `number` double-precision is default.

That said, typed arrays of all the common types (u8,u16,u32 and their signed analogues) now exist in JS and are very important for performance reasons, particularly with WebGL and Emscripten.

You can also use typed arrays to get a single integer of the type you desire. For example, to convert a -1 to a signed integer, try this in your console:

    (new Uint32Array([-1]))[0]
You can then compare the result to what I mention above:

    -1>>>0
And this one gives what you would expect:

     var i = (new Uint8Array([-1]))[0]
     console.log(i)
← PreviousPage 2 of 18Next →