Urg. Off topic, but I dislike this perl/ruby tendency of calling hash tables hashes . When I see the word hash , I always think of a value (ie a hash code) and not a data structure. Why couldn't they call it a hash map, hash table, map, table, dictionary etc like all the other languages...?
TOML, Tom's Own Markup Language
11–20 of 173 posts
Re: TOML, Tom's Own Markup Language
#12Earlier quoted context omitted.
Well, he's the CEO of Github, and he's probably been drinking, so I suppose a little bit of arrogance is expected.
For the love of baby jesus why can't people get the 'H' right.
Re: TOML, Tom's Own Markup Language
#13Re: TOML, Tom's Own Markup Language
#14Urg. Off topic, but I dislike this perl/ruby tendency of calling hash tables hashes . When I see the word hash , I always think of a value (ie a hash code) and not a data structure. Why couldn't they call it a hash map, hash table, map, table, dictionary etc like all the other languages...?
HashMap = HashTable = Map = Table = Dictionary = Hash
And if you're feeling adventurous, Object.send :remove_const, :HashRe: TOML, Tom's Own Markup Language
#15 [ [1,2], ["a", "b"] ]Re: TOML, Tom's Own Markup Language
#16Ruby parser here: https://gist.github.com/jm/5022483 Please fork and improve. :)
# line 36
text.split("#").first
This will have trouble with a line like: tweet = "TOML is #awesomesauce"
-- # line 43
array = $1.split(",").map {|s| s.strip.gsub(/\"(.*)\"/, '\1')}
You should recurse into coerce here, or you'll just lose types. (Also you're assuming arrays of strings.) array = $1.split(",").map {|s| coerce(s) }
--You're also not dealing with nested key groups. (eg. [servers.alpha]).
--
That being said, naïve string parsing is a terrible way to build a new markup language implementation. It's the reason the Markdown landscape is such a mess[1]. What this really needed is a formal grammar.
[1]: I actually tried to fixed that by writing a formal lexer & informal parser for Markdown in a side-project of mine[2]. It's not quite there yet, because for practicality reasons I wrote my own parser instead of a formal AST-generating parser.
Re: TOML, Tom's Own Markup Language
#17Re: TOML, Tom's Own Markup Language
#18Ruby parser here: https://gist.github.com/jm/5022483 Please fork and improve. :)
Re: TOML, Tom's Own Markup Language
#19This reminds me of a new project I'm working on called Leewh. It's based on Wheel and kinda has the same overall function, but I needed something to get my project rolling quickly and using .ini and JSON syntax separately felt... well... too square, I guess.
I figured I'll come up with something more well rounded.
Re: TOML, Tom's Own Markup Language
#20Earlier quoted context omitted.
For the love of baby jesus why can't people get the 'H' right.
As proper nouns become more common, they first lose any capitalization in the middle of the word, and then finally capitalization of the initial letter. It's human language. It happens.