Live data from Hacker News

TOML, Tom's Own Markup Language

github.com

151–160 of 173 posts

Re: TOML, Tom's Own Markup Language

#151

Are arrays of maps a bad idea? Someone posted a pom.xml file pointing out how horrible it was, and I thought to myself "How would this look in toml?" I was all set to try a translation when I hit this section: com.google.apis google-api-services-drive v2-rev53-1.13.2-beta com.google.apis google-api-services-plus v1-rev22-1.8.0-beta com.google.api-client google-api-client 1.13.2-beta com.google.api-client google-api-c…

why not

[dependencies.com.google.api-client] artifactId = "google-api-client" versions = "1.13.2-beta"

[dependencies.com.google.api-client] artifactId = "google-api-client-servlet" versions = "1.13.1-beta"

Re: TOML, Tom's Own Markup Language

#153

Earlier quoted context omitted.

Because the primitive is called Hash my %hash = (); Hash.new So naturally people talk of Hashes etc. I understand where you're coming from, but it's really not very important, and it would be more confusing to talk of Hash Tables as learners would naturally look for HashTable in the stdlib.

That was the question: why the class is named Hash instead of HashMap or Dictionary? Was it done intentionally, or it is just an accident because someone did not know English very well?

> why the class is named Hash instead of HashMap

Why in golang is a function denoted by func instead of function?

I'd guess it's because programmers prefer fewer keystrokes as long as the term remains sufficiently mnemonic.

Re: TOML, Tom's Own Markup Language

#154
post #69

Earlier quoted context omitted.

This bit of ruby should take care of it HashMap = HashTable = Map = Table = Dictionary = Hash And if you're feeling adventurous, Object.send :remove_const, :Hash

Please never, ever do this

If doing this is such a bad idea then why is it so easy?

Re: TOML, Tom's Own Markup Language

#155

Are arrays of maps a bad idea? Someone posted a pom.xml file pointing out how horrible it was, and I thought to myself "How would this look in toml?" I was all set to try a translation when I hit this section: com.google.apis google-api-services-drive v2-rev53-1.13.2-beta com.google.apis google-api-services-plus v1-rev22-1.8.0-beta com.google.api-client google-api-client 1.13.2-beta com.google.api-client google-api-c…

why not [dependencies.com.google.api-client] artifactId = "google-api-client" versions = "1.13.2-beta" [dependencies.com.google.api-client] artifactId = "google-api-client-servlet" versions = "1.13.1-beta"

but the syntax is colliding there, You define dependencies.com.google.api-client.artifactId twice.

Also it creates the key value maps:

   dependencies.com
   dependencies.com.google
   
which shouldn't exist, so that doesn't seem right either.

Re: TOML, Tom's Own Markup Language

#156

Earlier quoted context omitted.

That was the question: why the class is named Hash instead of HashMap or Dictionary? Was it done intentionally, or it is just an accident because someone did not know English very well?

> why the class is named Hash instead of HashMap Why in golang is a function denoted by func instead of function? I'd guess it's because programmers prefer fewer keystrokes as long as the term remains sufficiently mnemonic.

The name 'func' doesn't collide with anything else though. It is an entirely more reasonable abbreviation.

Re: TOML, Tom's Own Markup Language

#158

Cool , the market isn't fragmented enough already. Yes , being the CEO of Github does give you the power to do whatever you want. Of course , drinking and coding is a great idea. The Ballmer peak isn't a joke, it's a way of life.

What's this fragmentation you speak of? Surely you won't be forced to use one particular format you don't like. An API usually supports multiple formats.

Re: TOML, Tom's Own Markup Language

#159

Earlier quoted context omitted.

why not [dependencies.com.google.api-client] artifactId = "google-api-client" versions = "1.13.2-beta" [dependencies.com.google.api-client] artifactId = "google-api-client-servlet" versions = "1.13.1-beta"

but the syntax is colliding there, You define dependencies.com.google.api-client.artifactId twice. Also it creates the key value maps: dependencies.com dependencies.com.google which shouldn't exist, so that doesn't seem right either.

Good point, I didn't notice that one. Certainly an interesting case. The ones that exist that shouldn't I don't think are as big of issues but it is certainly not an easy problem to solve here.
Post reply on HN