github-linguist / linguist

Language Savant. If your repository's language is being reported incorrectly, send us a pull request!
MIT License
12.11k stars 4.2k forks source link

.lsl misdetection #3106

Closed larsbrinkhoff closed 5 years ago

larsbrinkhoff commented 8 years ago

The .lsl file extension is currently detected as Linden Scripting Language, but there are actually more hits for a Linker Scripting Language.

alexmayo commented 8 years ago

This is most likely because there are more active users of the .lsl (Linden Scripting Language) scripting language, namely over 1,500,000 active users, generating over $750,000,000 per year.

pchaigno commented 8 years ago

@alexmayo Well then, is it that our search for Linden Scripting .lsl files is too restricted or is it that they're not investing enough of that money into open source? :smile_cat:

alexmayo commented 8 years ago

@pchaigno, there are a limited number of linden scripting language developers, probably no more than 10,000 (Me being one of them) - however there's upwards of a million users of LSL, who can simply copy any .LSL code found, and run it within the virtual environment where it is used.

So, to put it simply, LSL may not be more popular developer-wise, however the number of end-users who can copy and paste the code for usage is much more popular.

In a way, Linker should be the default for .lsl from a developer's point of view, but anyone looking for a linden script who is not a developer will find it much more difficult.

pchaigno commented 8 years ago

In any case, I think the idea here was to try to recognize both, and not to drop support of one in favor of the other.

Alhadis commented 8 years ago

I think what @pchaigno means to say is

Pls

In all seriousness though, a simple heuristic should suffice. What's the most distinguishable trait about an Linda Scripting Language file that'd set it apart from a Linker Script?

EDIT: Lol, *Linden Scripting Language file. Name of my ex-girlfriend caused a Fruedian slip. So leaving that typo in there.

lukateras commented 7 years ago

Something like this should do it:

disambiguate ".lsl" do |data|
  if /^\s*(architecture|bus|core|memory)/.match(data)
    Language["Linker Scripting Language"]
  else
    Language["Linden Scripting Language"]
  end
end
pchaigno commented 5 years ago

Is Linker Scripting Language different from Linker Script?

pchaigno commented 5 years ago

Flagging as stale.

stale[bot] commented 5 years ago

This issue has been automatically closed because it has not had activity in a long time. Please feel free to reopen it or create a new issue.