Closed iHiD closed 6 years ago
cs = csharp csx = csharp fs = fsharp fsx = fsharp
pony = pony
py = python java = java groovy = groovy
hs = haskell rs = rust yaml = yaml yml = yaml
typescript = ts swift = swift objective-c = .h, .m
@Theodus Pony isn't in my list and Prism doesn't seem to have a syntax highlighter for it. Is there something that would be close?
@masters3d I imagine .h
and .m
will be pretty controversial as they're used in multiple. I think I might leave these out and presume if you submit them then you should default to the language of the track you're on. Seem reasonable?
Sounds good. Basic C highlighting should be fine. Objective-C is weird.
R = r r = r
Delphi is not listed as one of the languages, but Pascal is, perhaps Delphi can be aliased in a similar fashion as it was in exercism/exercism.io#3451 if necessary
For the sake of item 2: pas = Delphi dfm = Delphi
These are the only file extensions I am expecting for submitted files.
None of these are likely to do a good job for MIPS. On the other hand, MIPS code really doesn't need syntax highlighting :)
scala = Scala
On Thu, Aug 24, 2017 at 11:24 AM Ozan Onay notifications@github.com wrote:
None of these are likely to do a good job for MIPS. On the other hand, MIPS code really doesn't need syntax highlighting :)
— You are receiving this because you are on a team that was mentioned. Reply to this email directly, view it on GitHub https://github.com/exercism/meta/issues/90#issuecomment-324717097, or mute the thread https://github.com/notifications/unsubscribe-auth/ABeHGynYn2aO_l7MvEwfjFu3V3TgAQSuks5sbb_ZgaJpZM4PBrrN .
SML is also missing from the list of supported languages, but using the Ocaml highlighting would be better than nothing: https://github.com/exercism/exercism.io/pull/3451/files
fun = sml sig = sml sml = sml
@iHiD Scala would probably be the closest thing to Pony syntax
ending | language | comment |
---|---|---|
*.erl |
erlang | main ending for erlang code |
*.hrl |
erlang | unlikely to get submitted but has a chance to |
*.config |
erlang | when in an erlang context at least; maybe similar to the problem with *.h in C, C++ and Obj-C? Shouldn't get submitted though |
*.app.src |
erlang | Shouldn't get submitted |
*.app |
erlang | |
*.idr |
(Idris) | Haskell is sufficient as fallback though |
*.ex |
elixir | |
*.exs |
elixir | |
*.rs |
rust | |
*.go |
go |
That are those that I have to deal with on a more or less daily basis…
.jl
Julia
2017-08-24 21:36 GMT+02:00 Norbert Melzer notifications@github.com:
ending language comment .erl erlang main ending .hrl erlang unlikely to get submitted but has a chance to .config erlang when in an erlang context at least; maybe similar to the problem with .h in C, C++ and Obj-C? Shouldn't get submitted though .app.src erlang Shouldn't get submitted .app erlang .idr Idris Haskell is sufficient as fallback though .ex elixir .exs elixir .rs rust *.go go
That are those that I have to deal with on a more or less daily basis…
— You are receiving this because you are on a team that was mentioned. Reply to this email directly, view it on GitHub https://github.com/exercism/meta/issues/90#issuecomment-324735335, or mute the thread https://github.com/notifications/unsubscribe-auth/AT5mySvrJ11-tke-qxYKythNKhXmi0eLks5sbdC9gaJpZM4PBrrN .
ml, mli = ocaml
kt = kotlin
kts = kotlin script
kts = kotlin script
which should map to kotlin in the supported languages list afaik!
dart = dart
.c, .h -> c *.lua -> lua
APL: .apl, .tc .tc files are GNU APL test cases. They're essentially interactive interpreter session logs, and should probably be highlighted as APL.
Dyalog APL (a popular proprietary interpreter) uses .dyalog, so perhaps we should support that for APL syntax highlighting too.
Doesn't the syntax highlighting library already have a list like this that we can use?
Doesn't the syntax highlighting library already have a list like this that we can use?
Nope, Prism is a syntax highlighting framework for the browser written in JavaScript, therefore it doesn't even know about a files ending.
@NobbZ Except when it does, apparently: http://prismjs.com/plugins/file-highlight/
I don't know if that would be useful to us, but I thought I'd at least point it out.
Oh, in general thats a nice one, but it does create additional requests to the server, which needs to be handled as well and therefore create further load. I do think, that predetermining the type and generating appropriate markup is easier for the server than to wait for a roundtrip and do routing, authentication, authorisation and filepicking again.
@NobbZ Yeah, probably the extra round trip is best avoided, but that plugin presumably contains a list of extension>language mappings...perhaps we could use just that bit from the plugin, instead of essentially reinventing the same list?
@marnen Thanks for pointing that out. It seems to only have the following though:
var Extensions = {
'js': 'javascript',
'py': 'python',
'rb': 'ruby',
'ps1': 'powershell',
'psm1': 'powershell',
'sh': 'bash',
'bat': 'batch',
'h': 'c',
'tex': 'latex'
};
@iHiD Oh well. It was worth a shot. :)
.lisp
needs Lisp syntax highlighting. The current display seems OK - but I don't see it in the originally posted list above.
In v1 there is a different highlighter used than in v2. We are currently collecting a list of filename mappings for v2.
But you are right, I can't find lisp in the above list as well. But there are scheme
and clojure
in the list, so one of those could be used?
RE: could scheme or clojure be used?
They might work - but it depends on whether the highlighter knows keywords in the language. For example in Common Lisp you define a function with defun
but it is define
in Scheme and defn
in Clojure. The basics of the syntax is the same however.
@iHiD I'm sure you already know about these, but just in case it might help - there are two project that are relevant for programming language identification:
linguist/languages.yml also has extensive information on file extension mapping.
Hello everyone. Thank you all for your great work on this.
There are a few outstanding languages. It might be that there is no good choice but I need to put something by them. There are also a few new options here on Prism since we started this process. I would really appreciate it if people could help get this one over the line. @kytrinyx @jackhughesweb - maybe one of you could use your magic tools to open issues on these tracks' maintainers for this too?
Thank you! đź’™
Reason track was started recently.
re = reason
.h
, .hpp
, .hxx
, .cpp
, .cxx
are common extensions for C++.
@stevejb71 Reason also uses the .rei extension
@iHiD Purescript uses the .purs extension. LFE uses the .lfe extension.
@lpil Thank you :) Do you know which Prism language syntaxes they should use from this list?
@iHiD for LFE => "lisp" should be safe, as well as PureScript => Haskell. Reason has its own highlighter in that list.
For Pharo... .st = Smalltalk
For the CFML track:
cfm = XML or HTML cfc = javascript
I don't see XML or HTML above, but surely HTML is something most highlighters support. If not, I wouldn't worry too much about it since I expect most code to be in a CFC and using the script syntax. (CFC's can contain tags, but since these exercises didn't template HTML, it wouldn't make much sense).
Greetings. I come bearing news of the Ceylon track.
The only relevant file extension is ceylon
ceylon = ???
Okay so what am I going to put in the ???. I don't know. You could try, in rough order of likelihood to work, (most likely) Kotlin, Scala, Java, C#, C-like, anything else I didn't list (least likely)
Please accept my deep apologies that I cannot offer the time to actually test out any of my proposals; they are utterly wild speculation, worth what you paid for them.
@bencoman Thanks for helping :) Is the file-extension for pharo files .st
? Just checking I've understood that correctly :)
@iHiD, Correct. More broadly, its common to all flavours of Smalltalk, derived from the first two letters of that word. Here is an example... https://github.com/pharo-project/pharo/blob/development/src/Balloon/BalloonEdgeData.class.st
vim = vim
factor = factor
Linguist information about syntax highlighting for Factor is here https://github.com/github/linguist/blob/master/lib/linguist/languages.yml#L1303
The TextMate bundle (used by Linguist) is https://github.com/factor/factor/blob/master/misc/Factor.tmbundle/Syntaxes/Factor.tmLanguage
v = coq rkt = racket
It looks like we've sorted what we can here. We also have an open issue to manage this in a slightly more practical way: https://github.com/exercism/exercism/issues/4385
Hi @exercism/track-maintainers
I'm trying to work out syntax highlighting for the solution viewing page on Nextercism. I'm doing this in two ways: 1) Each track has a default language that all files are rendered in (e.g. any files on the Ruby track will be highlighted as Ruby by default) 2) Having a mapping of filetypes to languages (e.g. if someone submits a markdown file as part of their solution, we understand to parse this as markdown, not Ruby)
All of the mapping for (1) is done. However, I am only just getting started on (2) and I need to crowd-source it to people that know languages. Could you please post below any files extensions that occur on your tracks, and the correct mapping. e.g.
The following are the languages that the syntax highlighter currently supports (ie, the RHS of the
=
in your comments).Thank you all đź’™