anvaka / common-words

visualization of common words in different programming languages
https://anvaka.github.io/common-words
MIT License
505 stars 27 forks source link

Can you add support for more languages? #4

Open gnu-user opened 7 years ago

gnu-user commented 7 years ago

Love your project, very interesting read! Would it be possible for you to add support for additional languages such as Lisp, SQL, Clojure, Rust, etc?

Thanks!

mbStavola commented 7 years ago

Kotlin and Rust would be cool!

dooglio commented 7 years ago

How about CMake?

chrisetheridge commented 7 years ago

Clojure / ClojureScript would be awesome!

anvaka commented 7 years ago

Absolutely!

I added sql (all files with .sql extension): https://anvaka.github.io/common-words/#?lang=sql And rust (all files with .rs extension): https://anvaka.github.io/common-words/#?lang=rust

What would be the most accurate file extension for Clojure/Lisp/Kotlin/CMake?

quangdatv commented 7 years ago

How about Swift and Obj-C?

chrisetheridge commented 7 years ago

Clojure / ClojureScript files all use the extension of .clj and .cljs respectively.

rmflight commented 7 years ago

How about .R and .r for the R language??

gnu-user commented 7 years ago

@anvaka And if you could also add Common Lisp while you're adding Clojure I would really appreciate it! The extensions for Common Lisp are most frequently .lisp or .lsp .

anvaka commented 7 years ago

@rmflight I had R before. Unfortunately visualizations were not usable for R - they were made mostly from numbers. That's because I can only differentiate languages by file extension. As it turned out .r was also used for resource files, which looked mostly like an assembly language (thus the numbers)

anvaka commented 7 years ago

Added:

Please let me know if something doesn't make sense or is missing

dooglio commented 7 years ago

For CMake, I love that you made it in the shape of the Kitware logo!

gnu-user commented 7 years ago

Thanks @anvaka this looks great! While on functional languages you could also try adding Haskell, the file extension most commonly used is .hs or .lhs also in terms of rendering the word cloud Haskell has a great logo.

You can find a high resolution version of the logo at the following URL: https://upload.wikimedia.org/wikipedia/commons/thumb/1/1c/Haskell-Logo.svg/2000px-Haskell-Logo.svg.png

derekbrown commented 7 years ago

Requesting Elixir.

anvaka commented 7 years ago

Added both:

ZevEisenberg commented 7 years ago

If you add Objective-C, keep in mind that .h is a header format shared across multiple languages, and .m is shared with Matlab (I think). You might need more advanced heuristics to figure out what language a file is. There may be some good language detection in cloc that you can use for inspiration.

ForNeVeR commented 7 years ago

That's very nice! Could you please add support for F#? .fs and .fsi are the extensions.

anvaka commented 7 years ago

@ZevEisenberg yes, unfortunately I don't have anything advanced yet. I guess one could use user defined function which would classify source code text more accurately...

For now I'm just considering .m and .mm as objective c/c++ code.

@ForNeVeR the same is true about .fs extension - I know Forth, GLSL, and Filterscript are using it. Please let me know if you see anything suspicious...

joneshf commented 7 years ago

This is great! Would you be up for adding PureScript (.purs) and elm (.elm)?

anvaka commented 7 years ago

Added

anvaka commented 7 years ago

@rmflight I added R language. I used case sensitive .R extension and results seems better than for .r (which was mixed with resource files). Please let me know if something doesn't look right:

https://anvaka.github.io/common-words/#?lang=r

anvaka commented 7 years ago

Erlang is here

rmflight commented 7 years ago

@anvaka That actually looks like it is capturing the relevant semantics of the language! Thank you!

bdkosher commented 7 years ago

Awesome visualizer! I'd like to request the addition of Groovy (.groovy).

The logo is quite busy, Groovy logo but there's a simplified version used as an icon for their console. Groovy Console icon

anvaka commented 7 years ago

@bdkosher here it is

nadako commented 3 years ago

How about Haxe (.hx)? :)