GitHub now supports TOML syntax highlighting
github.com
github.com
Does EVERY new feature released by github require an HN announcement? I mean I can see reasons for the big, useful stuff used by many people, but this is such a non-event I am having trouble understanding why it is here.
[1] http://news.ycombinator.com/item?id=5272634
EDIT: was not aware that the "Tom" in TOML is the CEO of github. So nevermind.
That's exactly what HN is (supposed to) be about.
However that story was already covered yesterday: http://news.ycombinator.com/item?id=5272634
This story is nothing more than "Hey, Github now supports syntax highlighting of the brand-new nobody-is-really-using-yet config format written by its founder which was mentioned yesterday" which seems like a non-event not worthy of taking up space.
# This is not a TOML document. Boom.
title: "TOML Example"
owner:
name: "Tom Preston-Werner"
organization: "GitHub"
bio: "GitHub Cofounder & CEO\nLikes tater tots and beer."
dob: "1979-05-27T07:32:00Z" # First class dates? 'Fraid not.
database:
server: "192.168.1.1"
ports: [ 8001, 8001, 8002 ]
connection_max: 5000
enabled: true
servers:
# Indentation matters. Tabs or spaces. CS don't care.
alpha:
ip: "10.0.0.1"
dc: "eqdc10"
beta:
ip: "10.0.0.2"
dc: "eqdc10"
Proof: http://goo.gl/3xV4PNow, why this is on HN, is a different question that is worthy of being asked.
Has anyone looked at the Go version? For all the Go examples I've looked at (mostly networking) they are mostly short and easy to follow. I was shocked at how much code the author wrote.
(*subtree)[keys[len(keys)-1]] = value
This is the first time I see this kind of syntax in Go, what does (*subtree) do?The intention is to be easier for humans to read and write. Strict JSON requires a clutter of double-quotes, curly braces, parentheses and commas which have no place in a human-editable format.
Check out https://github.com/github/linguist. It's the library GH uses to detect and highlight languages; and _many_ people external from GH have contributed to it. It's just a matter of someone adding a lexer for Rust and submitting a pull request :D