News for hackers. Stuff that matters.
Re:Show HN: Easy-to-configure Web Server in Go by Uchikoma on Saturday July 27, 2013 @06:23AM (#6112426)
I always wonder with this kind of posts, is it minimalistic or is it an alternative?
Re:Show HN: Easy-to-configure Web Server in Go by jacques_chester on Saturday July 27, 2013 @09:04AM (#6112731)
The point is that it's written in language-du-jour and therefore fascinating and novel.

In fairness though, json will probably wind up being a common configuration format anyhow. And the idea of programmatically configurable system software is nice. I liked the Mongrel2 approach of having it in SQLite.

Re:Show HN: Easy-to-configure Web Server in Go by harrytuttle on Saturday July 27, 2013 @10:24AM (#6112962)
json is fine until your config system needs accurate numeric values.
Re:Show HN: Easy-to-configure Web Server in Go by shuzchen on Saturday July 27, 2013 @02:27PM (#6113865)
Nothing in the json spec requires that numbers are limited to those internally representable in a javascript runtime. With the right tooling, you can encode/decode very accurate numeric values. I'm not familiar with the go libraries, but python's simplejson has a use_decimal flag that interprets floats using python's Decimal module.

That said, I can't think of any reason a web server needs super accurate numbers. All the config options I can think of require nice round ints. Maybe specifying weights to individual backends to proxy to (so all the weights sum up to 1.0)?

Re:Show HN: Easy-to-configure Web Server in Go by harrytuttle on Saturday July 27, 2013 @03:03PM (#6114004)
99% of sites are CRUD apps, but we're math heavy financial software. We store a lot of reference data in configuration for performance reasons. This needs to be decimal format.

JSON is a subset of the ECMA JavaScript standard which declares only floating point.

Do "100!" on wolfram alpha and find me a parser that will load that as an example.

Re:Show HN: Easy-to-configure Web Server in Go by shuzchen on Saturday July 27, 2013 @10:33PM (#6115359)
Re:Show HN: Easy-to-configure Web Server in Go by harrytuttle on Sunday July 28, 2013 @01:25AM (#6115723)
I get a 404. ?
Re:Show HN: Easy-to-configure Web Server in Go by shuzchen on Sunday July 28, 2013 @05:05AM (#6116102)
Bad copy pasta (missing 3 at the end): https://gist.github.com/sirpengi/6097113
Re:Show HN: Easy-to-configure Web Server in Go by stock_toaster on Saturday July 27, 2013 @04:33PM (#6114331)
or until someone wants to put in a comment that documents a change they made at 3am to a production system.

I think I would prefer toml take off as a config language.

Re:Show HN: Easy-to-configure Web Server in Go by harrytuttle on Saturday July 27, 2013 @05:52PM (#6114595)
Good point.

We use XML (still after 10 years). For all its warts, at least parsers and deserializers work properly.

Re:Show HN: Easy-to-configure Web Server in Go by RyanZAG on Saturday July 27, 2013 @06:27AM (#6112435)
It's technically an alternative, but since it performs worse and has less features you would probably never actually use it as an alternative.

It should probably be described as 'an easily embeddable and extendable(?) option for hosting your golang web app'.

Re:Show HN: Easy-to-configure Web Server in Go by oakaz on Saturday July 27, 2013 @06:35AM (#6112448)
just updated the title now