News for hackers. Stuff that matters.
Re:GitHub now supports TOML syntax highlighting by rurounijones on Monday February 25, 2013 @12:07AM (#5277403)
Well I guess I am going to have to be that guy:

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.

Re:GitHub now supports TOML syntax highlighting by rattray on Monday February 25, 2013 @12:16AM (#5277421)
It's lighthearted fun. Some guy at Github said, what the hell. And within a day of a new language being announced[1], it's already "supported" by github. Is this any kind of a big deal? no. But I know I cracked a smile.

[1] http://news.ycombinator.com/item?id=5272634

EDIT: was not aware that the "Tom" in TOML is the CEO of github. So nevermind.

Re:GitHub now supports TOML syntax highlighting by efnx on Monday February 25, 2013 @12:27AM (#5277460)
<jealousy> And now whenever we see a config file that looks like that style (which is common) it'll be considered TOML. Oh, the spoils of nerd fame ;) </jealousy>
Re:GitHub now supports TOML syntax highlighting by egonschiele on Monday February 25, 2013 @02:07AM (#5277717)
I'll second this. My friend made a pretty cool and useful language (moonscript.org) and after it got popular he submitted a pull request for syntax highlighting. It took months and lots of people commenting for it to get merged in. So to see this BS front-paged grinds my gears a bit.
Re:GitHub now supports TOML syntax highlighting by petercooper on Monday February 25, 2013 @04:30AM (#5278053)
Did you flag it? This site is a democracy (of sorts) so what does well is what everyone collectively votes for. If enough people flag items they think are offtopic and items disappear, that's also democratic.
Re:GitHub now supports TOML syntax highlighting by nicksergeant on Monday February 25, 2013 @01:11AM (#5277576)
This is not "released by GitHub". This is just a guy (who happens to have founded GitHub) who wrote something cool.

That's exactly what HN is (supposed to) be about.

Re:GitHub now supports TOML syntax highlighting by rurounijones on Monday February 25, 2013 @01:23AM (#5277602)
The "Wrote something cool" is all well and good and I agree that is the kind of thing that HN is 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.

Re:GitHub now supports TOML syntax highlighting by wololo_ on Monday February 25, 2013 @12:18AM (#5277427)
It's just someone posting it and if people like it, they upvote it. You seem to be part of the minority..
Re:GitHub now supports TOML syntax highlighting by dfc on Monday February 25, 2013 @01:37AM (#5277643)
Without commenting on the merit of this story I'd like to point out that 25 (or 500) upvotes does not mean that the majority of people like the story or that the people who do not like the story are in the minority. Unlike comments there are no downvotes for submissions.
Re:GitHub now supports TOML syntax highlighting by hboon on Monday February 25, 2013 @04:20AM (#5278027)
But one can flag a submission if need be.
Re:GitHub now supports TOML syntax highlighting by damncabbage on Monday February 25, 2013 @12:48AM (#5277518)
Nice. Can we figure all this out all these things before we get too far with this? https://github.com/mojombo/toml/issues/42
Re:GitHub now supports TOML syntax highlighting by jashkenas on Monday February 25, 2013 @02:22AM (#5277762)
Interestingly enough, TOML is somewhat similar to valid CoffeeScript hash/array syntax, apart from the auto-vivifying hashes bit (and native dates, natch). Here's the top of that highlighted document:

    # 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/3xV4P
Re:GitHub now supports TOML syntax highlighting by jrmg on Monday February 25, 2013 @03:18AM (#5277885)
That looks like valid YAML to me.
Re:GitHub now supports TOML syntax highlighting by ftay on Monday February 25, 2013 @12:04AM (#5277397)
Definitely top priority when they're still running Rails 2.3.
Re:GitHub now supports TOML syntax highlighting by manojlds on Monday February 25, 2013 @12:08AM (#5277404)
Why does it matter if they are on 2.3 or whatever if they can keep pushing the features? I don't care which Rails they are using ( provided they are secure, of course)

Now, why this is on HN, is a different question that is worthy of being asked.

Re:GitHub now supports TOML syntax highlighting by rattray on Sunday February 24, 2013 @11:48PM (#5277363)
Gotta love developer-driven companies.
Re:GitHub now supports TOML syntax highlighting by copyninja on Monday February 25, 2013 @01:13AM (#5277581)
Just because Tom created it! A few days old format definitely not used by many I guess
Re:GitHub now supports TOML syntax highlighting by leetrout on Monday February 25, 2013 @01:08AM (#5277569)
Very entertaining looking at all the libs that have popped up to support TOML.

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.

https://github.com/pelletier/go-toml/tree/master/src/toml

Re:GitHub now supports TOML syntax highlighting by melvinmt on Monday February 25, 2013 @01:59AM (#5277697)

    (*subtree)[keys[len(keys)-1]] = value
This is the first time I see this kind of syntax in Go, what does (*subtree) do?
Re:GitHub now supports TOML syntax highlighting by chc on Monday February 25, 2013 @03:26AM (#5277900)
I believe it means: Dereference the pointer `subtree` and assign `value` to the key `keys[len(keys)-1]` in the map yielded by the dereference.
Re:GitHub now supports TOML syntax highlighting by derekchiang on Monday February 25, 2013 @12:42AM (#5277502)
Can anyone tell me the motivation behind TOML? Why isn't JSON enough?
Re:GitHub now supports TOML syntax highlighting by mmahemoff on Monday February 25, 2013 @12:46AM (#5277511)
Discussed in yesterday's thread http://news.ycombinator.com/item?id=5272634

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.

Re:GitHub now supports TOML syntax highlighting by smrtinsert on Monday February 25, 2013 @01:33AM (#5277631)
first class dates, seems like its ready to replace xml and much more streaming/real time friendly.
Re:GitHub now supports TOML syntax highlighting by drivebyacct2 on Monday February 25, 2013 @12:25AM (#5277448)
It'd be nice if they'd add Rust to the list.
Re:GitHub now supports TOML syntax highlighting by epidemian on Monday February 25, 2013 @02:05AM (#5277711)
The good news is that anyone can do it :D

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

Re:GitHub now supports TOML syntax highlighting by steveklabnik on Monday February 25, 2013 @02:22AM (#5277761)
I _almost_ added support to linguist once, but something stopped me. I can't quite remember what it was... I _think_ it was that only edge pygments supported Rust.
Re:GitHub now supports TOML syntax highlighting by chr1 on Monday February 25, 2013 @04:30AM (#5278054)
Writing syntax highlighter for TOML takes ~10mins. Rust syntax isn't so simple.
Re:GitHub now supports TOML syntax highlighting by mh- on Monday February 25, 2013 @12:31AM (#5277472)
there's probably more TOML than Rust on GitHub already, though
Re:GitHub now supports TOML syntax highlighting by drivebyacct2 on Monday February 25, 2013 @12:35AM (#5277484)
I highly doubt that. At the very least: Servo.
Re:GitHub now supports TOML syntax highlighting by ben0x539 on Monday February 25, 2013 @12:39AM (#5277493)
Also: rustc
Re:GitHub now supports TOML syntax highlighting by drivebyacct2 on Monday February 25, 2013 @12:44AM (#5277509)
And core/std libs.